At 9/13/24 11:25 AM, xeiavica wrote:Are there any major downsides to AS2 compared to AS3? For games, would I get sluggish slowdown in certain situations I wouldn't get with AS3?
The thing with AS2 is it has a lot of baked in code that is always imported, and always executes, even if you don't actually need it. That can add some unwanted overhead, BUT, having that stuff always present makes it a little easier to just use, especially if you like doing a lot of code right on objects and timelines via the Flash IDE.
AS3 requires you to import everything you need, and it only runs what you import. It also has a much richer set of features. Everything you do in AS3 is strictly typed, eich can make it more rigid than AS2, but also makes debugging much easier.
The other interesting thing with AS3 is you can dig up some tools like FlashDevelop to make games 100% free without needing a copy of Flash at all. You don't get the stage and IDE so you'll either have to work with exported swc libraries, or use raster art for most things. If you go that route, Starling was a pretty cool framework for managing sprites as textures that get rendered on the GPU.
That said, if you were going to dive into AS3 and use something like FlashDevelop, I'd strongly suggest just not using Flash at all and look at something like Phaser.io which does a lot of the same stuff with similar sensibilities, and it's all native HTML5 so you don't have to worry about Ruffle supporting everything you want. They also have a Flash-like program called PhaserEditor that now has a 30 day free trial if you wanted to go that route.
In fact, if you are just getting started with making games, I'd honestly avoid using Flash at all. While it can be fun and easy, you'll pick up habits and sensibilities that don't translate as well to real gamedev frameworks, and then if you ever want to move on to something bigger, you are back at square 1 of learning that stuff. Just learn it now!