Lots and lots of Archers. When i finish this i will probably make all the sprites animated GIFs or something, because this kills my computer.
Updates from August, 2010 Toggle Comment Threads | Keyboard Shortcuts
Geru and Pablo Bandin are discussing. Toggle Comments
This video shows how i have everything setup so i can easily create units and formations without spending hours coding. Also i show here that the units has very few lines of code because everything is a composition of many individual parts.
Testing the walk animation of the Archer Unit + a complete change in internal architecture of the code. Now it’s easyer to experiment.
Internally, all Units (Warriors, Archers, etc) are defined by 3 objects now. The Unit Settings Object, the Unit Behaviour Object and the Unit Sprite Object. All these 3 objects interact with each other to make the Unit work.
Behaviour Objects uses Tasks Objects to make diferent stuff. Tasks uses a variable number of actions implemented as a Strategy Pattern.
Ok, today i hope i can finish the archer unit. This is what i have so far. Have in mind that this is made by hand in Flash not in 3d so it’s hard.
I will be changing the internal structure of my game sprites…
The base of all the fun in the game, the projectile system!
Super early test, i just finished this, just a prototype.
Ok, time to some refactoring and optimization before doing anything else. I will be posting the ‘attack behaviour‘ preview in 1 or 2 days if i have time this weekend to work on it, or next week if i dont.
Simple behaviour, or i should say, Warrior behaviour: just go after the enemy, no fear 🙂
So now they can walk, move from obstacles, chase enemies, now they need to attack them. This system will be interesting because i will use an approach that i never used before. It’s gonna be fun 😀
A little better, more fluid.
Yes, i was gonna do the attack behaviour, but decided to finish this behaviour first. Now the next step is “attack behaviour”.
Well, i dont know if this is old news or what but i just found out that DisplayObjects, on their X and Y properties (and mabe others) do not behave as a normal Numeric propertie. Here some screenshots:
Using a MovieClip to store Numeric values:
Using a Point object to store the values and then pasting it on the MovieClip:
After a closer look with the old friend trace()
Conclusion: if you need precision to set the path of a DisplayObject, dont rely on DisplayObjects numeric properties.