10.25.2010

Event-based programming

One think I started to find interesting ActionScript is it's event-based call system. I can remember finding it a bit unusual when I learned ActionScript, but thinking about it, it offers me a great solution for frameloop-less programming. It's one thing I'll never like when making time-based applications: coping with frames and associated timing problems. There are some concepts to work with frame-based loops and get time deltas and so on. Personally, I like my own system which can abstract a framerate into partial frames of other framerates. So I can keep several intervals splitted (like different screen and physics frame rates or just purely logical framerates for gameplay-related events) and update them seperately. Used it to seperate physics update frame to keep movement visible every time the screen becomes an update. I quite like this but haven't thought any other use of it. But the more I see existing concepts, the more I get good ideas of what is easier to deal with, not only for frames and timing. I didn't have any real ideas for my game engine besides rendering and physics. I had some in my 1D game attempt, but these where kinda not so well-thought and very limited to this special engine. Game events are essential and shouldn't get underestimated. My most favourite video games heavily depend on unique action defined between all kinds of game objects and further differentiated by what states these objects have etc. I'm quite inspired by ActionScript's event system and would like to integrate it in my own engine. More important, it can't hurt to explore the languages I already know a bit more and study their utterly in-depth features and concepts. It can teach me more than my personal studies did, especially because it's simpler to just read and use them instead of researching and thinking all the time. Personal brain-storming teaches, too, but also consumes a lot of time. Even if it's an already depply explored area like cryptography or sorting alghorithms, you can still do your own research later and use what you personally think is best for your case (or maybe a cmbination of multiple solutions).

I also like how Adobe wrote it's ActionScript documentation. Clearly understandly and nice to read. And if you're not just a designer or in know of progamming and OOP (like me), you can simply read with half a brain and look a video game walkthrough while reading. Speaking of video games, I'll get Fallout 3 on tuesday. I'm also looking a speedrun of Super Mario Galaxy 2 and was quite surprised how different it is from the original game. It looks like a combination of New Super Mario Brothers (the world overview, the progress system) and Super Mario Galaxy (the ass-crazy level constructions) as well as a good portion of oldschool Super Mario elements like Yoshi, different suites with interesting abilities and also a few music remixes/reuses from older parts. The cheese bridge comes to my mind. Nice stuff, better than the previous Galaxy game. But I still want a new game like Super Mario 64 cause of the very restrictive level system of newer Mario games.

No comments: