Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length

 
Advanced search

1075919 Posts in 44152 Topics- by 36120 Members - Latest Member: Royalhandstudios

December 29, 2014, 03:32:50 PM
TIGSource ForumsDeveloperTechnical (Moderators: Glaiel-Gamer, ThemsAllTook)Structurizing classes in AS 3.0
Pages: 1 [2]
Print
Author Topic: Structurizing classes in AS 3.0  (Read 1912 times)
Moczan
Level 5
*****



View Profile
« Reply #20 on: April 19, 2011, 12:48:02 PM »

You can be stubborn and only use draw() and copyPixels() in your game and only instance a single clicker object and never touch the Flash rendering or event APIs in any other way, achieving a fully static initialization that you can, in fact, new() over, but you're really fighting an uphill battle to do that. Believe me, I tried.)

I didn't read the whole topic, so I'm not sure if it has been covered, but I strongly disagree. Using Flash built-in renderer and event system is uphill battle because they haven't been designed with games in mind.

While Sprite is not that slow (and you must use Bitmap when you blit), MovieClips and Events are just irrational. Sacrificing a weekend or two writing your on little framework to handle input, sound, rendering etc. will save you hours of frustration in the future.
Logged
X-Tender
Level 1
*



View Profile WWW
« Reply #21 on: April 21, 2011, 12:48:48 AM »

Hm, what's wrong with Flash intern Event System?
And how would you code an own Event system?
Logged

Glaiel-Gamer
Moderator
Level 10
******


Stoleurface!


View Profile WWW Email
« Reply #22 on: April 21, 2011, 01:07:34 AM »

Hm, what's wrong with Flash intern Event System?
And how would you code an own Event system?

nothing important, and you shouldn't

for the record, people who complain about flash's movieclips + event system do so because they learned a different style and are more comfortable tweaking flash to fit the style they're used to than conforming to the stuff it uses. They're perfectly OK to use for beginner and professional projects alike.

Quote
Using Flash built-in renderer and event system is uphill battle because they haven't been designed with games in mind.
This used to be true for AS2 (heavily based on AS1 which was not made for games) but AS3 completely changed that, as it was a ground-up re-write of the language. Its not meant for blitting-based games, but it was meant for vector-based games that use flash as an art tool  too.
« Last Edit: April 21, 2011, 01:13:33 AM by Glaiel-Gamer » Logged

SFBTom
Level 1
*



View Profile WWW
« Reply #23 on: April 21, 2011, 02:42:03 AM »

Hm, what's wrong with Flash intern Event System?
And how would you code an own Event system?

nothing important, and you shouldn't

for the record, people who complain about flash's movieclips + event system do so because they learned a different style and are more comfortable tweaking flash to fit the style they're used to than conforming to the stuff it uses. They're perfectly OK to use for beginner and professional projects alike.

AS3 events are great, and suitable to nearly every task you might have.

Sometimes though, in special cases such as the depths of physics engines and other such intensive gubbins, they're slower than they could be. The fact that they cause a lot of object creation also means that if you're trying to write memory managed code with object pools and the like, they'll cause the garbage collector to run more often than you might like.

Personally, I use AS3 events a lot, but in those special cases I prefer AS3-Signals.
Logged

Pages: 1 [2]
Print
Jump to:  

Theme orange-lt created by panic