Article written

  • on 05.06.2010
  • at 03:37 PM
  • by Pedram

introduction about Flixel game framework 2

Jun5

Flixel Framework width=These days I have had some projects around Flash games, and I think building games with AS3 topic is the best suggestion for me!
We have many ActionScript frameworks to build games, and I don’t think need to explain more about all of these frameworks (although I think it’s a very good topic for a few blog posts), but eventually we need a basic framework to do our project, and I selected flixel 2 framework among those libraries.

A bitmap rendering is a very good point in this library, means all visual objects are bitmap in this method; so performance in this kind of frameworks is very considerable as far as its developer says flixel can manage over 5,000 animated object in a normal PC! (it’s very interesting for me and it’s enough for many kinds of games), then you need to create your own bitmaps, at first glance you think it’s very easy and you need to save graphics to bitmap file(like PNG), but it has a very simple point.

As I mentioned earlier, everything is bitmap and now when you have an animated graphic how you have it?
I made a simple and smart tool to generate for myself, this small file just makes a long bitmap file by an animated movieClip, you can see its result below:

This movie requires Flash Player 9

Let’s go to see a very abstract sample with flixel.
Totally we need to create a stage with flixel framework and make some objects for our environment and interactive objects as simple as that.
(it’s not e step-by-step tutorial and I know you can work with it very easy)

This movie requires Flash Player 9

Download Source file(340kb)

A quick description about this sample:
Flixel games need a basic stage called FlxGame; it’s like our Flash stage, next we should have State, FlxState is our container, every game can have many states; for example each level can be a state. In this case we have only two classes to run this view!

A few tips I like to say
Rendering:
Every visual object in flixel needs to be rendered in order to update its view, and flixel do this very easily.

Garbage Collection:
Wow, you know it’s very important stuff in our Flash Platform world! but when you want to make a game, you need to know some tips about this subject, just for example, suppose your game player can shoot with his gun, and you have to create a pellet per click, and if you want to create a new instance from pellet class per every click, after a few minutes your game will have used your PC’s memory like an OS! There is a simple solution for this issue, you have store pellet instances in an array and after that you need to manage visibility (exists, dead in flixel framework), and change positions and other properties.

Collision Detection:
Collision detection is a very important thing in game development, this case is very easy in flixel framework but you must know collision calculation isn’t friend with your computer’s CPU!

Have a good time

subscribe to comments RSS

There are 2 comments for this post

  1. Nice post.
    I am interested to test fixel.

    have fun

  2. Mj says:

    interesting framework
    tnx

Please, feel free to post your own comment

* these are required fields

Pedram Pourhossein is powered by WordPress and FREEmium Theme.

1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16|17|18|19|20|21|22|23|24|25|26|27|28|29|30|31|32|33|34|35|36|37|38|39|40|41|42|43|44|45|46|47|48|49|50|51|52|53|54|55|56|57|58|59|60|61|62|63|64|65|66|67|68|69|70|71|72|73|74|75|76|77|78|79|80|81|82|83|84|85|86|87|88|89|90|91|92|93|94|95|96|97|98|99|100|101|102|103|104|105|106|107|108|109|110|111|112|113|114|115|116|117|118|119|120|121|122|123|124|125|126|127|128|129|130|131|132|133|134|135|136|137|138|139|140|141|142|143|144|145|146|147|148|149|150|151|152|153|154|155|156|157|158|159|160|161|162|163|164|165|166|167|168|169|170|171|172|173|174|175|176|177|178|179|180|181|182|183|184|185|186|187|188|189|190|191|192|193|194|195|196|197|198|199|200|201|202|203|204|205|206|207|208| online pharmacy viagra australia top viagra store buy cheapest wholesale generic viagra garanteed can viagra be purchased off prescription how to buy viagra on ebay australia 365 actos but viagra with no prescription how to get free viagra order kumagra australia viagra drugstore london medicare cover for viagra lowest price for generic viagra generic clomid montreal viagra prescription viagra for sale without prescriptionAccutane Online Doxycycline online Buy Cheap Lexapro Online No Prescription Prednisone Online Buy Accutane No Prescription