Why not just have just one for each scene? Or as some people have eluded to only one for their whole app, attached to the stage.
Unless you are thinking of writing Win-8-RT using Gideros Even then you could still get by with only 1 enterFrame which updates each object in the scene.
Maybe you could use a state engine and only update certain elements each frame, again from a single enterFrame.
Personally - I try and use only one and then have each object expose an "update" method that is called.
I believe it to be a cleaner and simpler (and potentially more efficient) approach, plus there's less risk of you forgetting to remove the event listener at a later time and causing hard to find bugs or leaks.
WhiteTree Games - Home, home on the web, where the bits and bytes they do play! #MakeABetterGame! "Never give up, Never NEVER give up!" - Winston Churchill
Personally, I just use one enterFrame listener attached to the stage. But then I've written my code in an old fashioned imperative (non-OO) style. If you're writing in an OO style you might prefer to have an enterFrame for each object so that each object updates itself in an autonomous way.
@Mells - exactly at this rate your coding will be as good as your artwork, so *WHEN* is the beta for Game going to open?
WhiteTree Games - Home, home on the web, where the bits and bytes they do play! #MakeABetterGame! "Never give up, Never NEVER give up!" - Winston Churchill
@techdojo I got affected by the.... OCRD (Obsessive Catatonic Refactoring Disorder) (?) virus, but I'm again on track My next milestone is november 20th but I'd like to start hosting live painting hangouts (G+) before to make people interested. I'll see. Thank you for your interest
@Mells how about producing some nice high rez wallpapers and hosting them on your site, that might start to generate a little interest - or maybe a "prequel" web comic?
Also rather that live hangouts, how about a youtube tutorial on how to create art in that style with procreate?
WhiteTree Games - Home, home on the web, where the bits and bytes they do play! #MakeABetterGame! "Never give up, Never NEVER give up!" - Winston Churchill
I have enterFrame handler on every object in the scene /well almost every/ ships, turrets on the ships, lauchers , missiles. Only engines and propellers run on movie complete event. Its about 70 ships and more than 200 objects total for this example: On ipod 4, single core 800Mhz Arm, retina, it runs stable with 30 fps. This framework rulez!
@plamen - looks seriously cool, are you using Box2D to handle the movement and collisions or are you doing it yourself?
WhiteTree Games - Home, home on the web, where the bits and bytes they do play! #MakeABetterGame! "Never give up, Never NEVER give up!" - Winston Churchill
Thanks guys, @techdojo - yes i am using box2D for all ships, mines and island hulls, missiles and turret projectiles. All are fully simulated dynamic bodies /except islands and mines which are static/ you can see ship is moving back when hit by missile or turret. Flamethrower and Tesla lightnings are simple movie clips. Mines and small ships using 1 fixture and medium sized ships use 2 circular fixtures per body. Dreadnought is the only with polygon fixture. As i know from MOAI , box2D got some impressive performance and i am happy to find physics here perfectly wrapped. @Tom2012 I'm using classes for instantiation of ships and their parts and there is enterFrame handler in each class. As you can see it is multiplied by the number of ships and their parts and still its not of a problem. The reason i use 30fps instead of 60 is support for slower devices and to give more time for Box2D to do the magic
@OZapps, In fact it is inspired by exactly same game. I was about to start writing space game with MOAI when i found there Crimson:Steam Pirates. I tried it and got frustrated of turn based gameplay breaking cool shooting action after each turn. At same time i was following development of Iron Sky /the nazi on the moon movie/ and voila :-) So my idea is to turn the strategy game to a tactical top-down shooter and emphasize more explode/destroy action than strategy moves. I am working on this with my brother who is responsible for music/sfx and if we have luck maybe will manage to release in April or May. I hope maybe earlier...
Good luck with the project, I hope it's a success.
WhiteTree Games - Home, home on the web, where the bits and bytes they do play! #MakeABetterGame! "Never give up, Never NEVER give up!" - Winston Churchill
Comments
Unless you are thinking of writing Win-8-RT using Gideros Even then you could still get by with only 1 enterFrame which updates each object in the scene.
Maybe you could use a state engine and only update certain elements each frame, again from a single enterFrame.
Website: http://www.castlegateinteractive.com
https://play.google.com/store/apps/developer?id=Castlegate+Interactive
I believe it to be a cleaner and simpler (and potentially more efficient) approach, plus there's less risk of you forgetting to remove the event listener at a later time and causing hard to find bugs or leaks.
#MakeABetterGame! "Never give up, Never NEVER give up!" - Winston Churchill
Do you mean something like this (Codea Style)?
(just to be sure that I get it)
https://github.com/gideros/gideros
https://www.youtube.com/c/JohnBlackburn1975
#MakeABetterGame! "Never give up, Never NEVER give up!" - Winston Churchill
I got affected by the.... OCRD (Obsessive Catatonic Refactoring Disorder) (?) virus, but I'm again on track
My next milestone is november 20th but I'd like to start hosting live painting hangouts (G+) before to make people interested. I'll see. Thank you for your interest
Also rather that live hangouts, how about a youtube tutorial on how to create art in that style with procreate?
#MakeABetterGame! "Never give up, Never NEVER give up!" - Winston Churchill
Likes: gorkem, OZApps, phongtt, hgvyas123, atilim
Author of Learn Lua for iOS Game Development from Apress ( http://www.apress.com/9781430246626 )
Cool Vizify Profile at https://www.vizify.com/oz-apps
@plamen
looks great
#MakeABetterGame! "Never give up, Never NEVER give up!" - Winston Churchill
@Tom2012 I'm using classes for instantiation of ships and their parts and there is enterFrame handler in each class. As you can see it is multiplied by the number of ships and their parts and still its not of a problem. The reason i use 30fps instead of 60 is support for slower devices and to give more time for Box2D to do the magic
Website: http://www.castlegateinteractive.com
https://play.google.com/store/apps/developer?id=Castlegate+Interactive
Author of Learn Lua for iOS Game Development from Apress ( http://www.apress.com/9781430246626 )
Cool Vizify Profile at https://www.vizify.com/oz-apps
Likes: OZApps, gorkem
#MakeABetterGame! "Never give up, Never NEVER give up!" - Winston Churchill