Archive for Game

Game Algorithms

I’m checking game algorithms these days. Found a lot funny things and some not good enough or fit with Flash. Most of traditional algorithms are run directly on OS so there’s no much limitations for the speed and CPU/memory usage, but Flash not the case. Though it’s interest to try different algorithms and I could also get some ideas from those.

Algorithms are mathematics involved. But it could be trade-off and not necessary for all details due to my time. Some time I will try to look on math equations but most time I will directly to code them in Actionscript 3 first and see whether I understand and comment directly.

I saw some code written in C as someone discussed it as much effective than regular ‘best practise’ C code. He said it’s because those codes got idea from Assembly actually. Of course if you code C with assembly method, you could check the machine code (read: mov, add, goto) and you know they’re effective or not. But for Flash, it’s a little bit more hard. Maybe if some day I found an algorithm if necessary to be optimized, I will try to read low level code (similar to read Assembly) with the decompiler provided by Adobe. Also have to have some experiential testing.

Squirrel Bubble Game AS3 – Beta

Current version: 0.2.0 (Beta)

Updates:

Game save/load supported. Score list available. Audio added. Message class added. Improved rules: 1. No chanllenges 2. Life points count, after 5 fails a new line of bubbles will be pushed in. (But you can get points back in some case). 3. Push double lines of bubbles. 4. No points reward so you have to finish your game.

If you find any bugs, please let me know. Thanks.

Next game suppose to be a FPS tank game in 3D. Big topic for me right now.

A part of source code available for download. It’s the method to load assets from external SWF files and use them dynamically in this game.

Squirrel Bubble Game AS 3 Experiment

I began to code AS3 games so started with a popluar bubble games, squirrels are lovely and could see everywhere in Canada, so I use ‘Squirrel Bubble’ as the name of my first AS 3 game. A squirrel will transfer a bubble to fire. ;)

Later I will add some script-based animation for another squirrel, walk around here and there, and improve the bonus part. Also it will have a top-10 score board, as well as sounds.

This alpha version I finished in 4 days, most of time coding and debugging (and a whole day for thinking and making squirrels). The debugging of Flash 9 IDE alpha is very limited, what I can do was only ‘trace’ and ‘try…catch’, costed me big hours.

Some rules:

After 80 shots there will be a health bar to indicate you have only 5 chances to failed before a line of additional bubbles will be pushed down. After 400 shots as health exhausted double lines of bubbles will be pushed down.

To play this game alone: http://www.neatfilm.net

Current version: 0.1.0

Todo list:

Add back-end module – Top-10 score board. AI module: Another squirrel will play on the back here and there dynamically and greet you sometime.

I found my ‘lab explorer’ has something weird so I checked today. Actually the new AS3 flash.text.TextField is by default mouse enabled. I turned .mouseEnabled to false then it’s ok now.