Despite my lack of journal updates, I've been doing quite a bit of work on Angels 2X.
So after getting the terrain finally working the way I wanted to, I needed something to decorate it with. I decided to implement trees as the first objects in the game because they're technically the simplest ones, and because it's tradition. Trees were the first object I implemented in Angels 22 and I would wager they were the first non-flat tile for Angels 20, so it's only fitting they were in there first for A2X.
The trees in A2X are pretty much the same as the trees in Angels 22, except that they can be knocked down instead of just caught on fire. So now depending on what weapon they are hit with, trees will either catch on fire, get knocked over, or both. This results in a cool effect, with explosions blowing down trees on either side of them, and burning the trees within a certain radius. It's pretty neat to see in action, but until I make a video of it, screenies are just going to have to do:
Trees just sitting there:
Trees knocked down:
This was a late addition to Angels 22, and it added so much "oomph" to the explosions. I recently implemented screen shake in A22, so explosion and whatnot can rock the screen back and forth. Once again, hard to show in a screen shot, but in the up coming video, you'll see what I'm talking about...
One night Mark and I were screwing around in the A2X editor and we realized we were making our own sound effects for when the explosions went off. Soon after, I had imported the old Angels 22 sound system to A2X, and we had actual explosion sounds going off. So yeah, sound now...
I'm pretty proud of how well this turned out for how much effort I ended up putting into it. For Angels 22 the water was a simple gradiented rectangle drawn on top of the terrain. I always wanted to have a better system, but I was never able to figure out how to do good, simple 2D water. Well after playing a few 2D indie games I decided on a good system, and got to work implementing it.
It's pretty simple, essentially there's a mini dynamic heightmap, with each of the points on the map moving independent of each other. It was really easy to implement, and it looks pretty good IMO. Another improvement over the A22 system is making the water into an actual object, so we can have many different bodies of water on one map. Also, all the aspects of the water is modifiable as well, such as the max wave height and the roughness.
This was a big priority of mine. Getting proper Save/Load stuff working was a real pain in Angels 22, but with that experience in mind, the A2X system is much better. It still uses the A22-style text files, but the A2X system has one huge improvement that I call "Special Data". In Angels 22, all the objects were saved with only 4 variables, their class, type, xposition, and yposition. As you can probably guess, this really limited what kind of stuff could actually be saved. In A2X, the same 4 basic variables are saved, but there is the option to use "Special Data" to fill in the blanks on more complicated objects.
For example, the tree objects have many internal variables that dictate their outward appearance. An example would be "STUMP", meaning the tree has been cut down. By using the "Special Data" system, the game can save the specific state of the tree, so that when the level is reloaded, the tree looks the same as it did when saved.
The whole system is probably sounds really wierd to all you XML folks out there, but it works well, and I learned alot from making it.
These little objects are pretty simple, and were the second actor type I created. They exist in two states, alive and dead, so it was pretty simple to code them. The closest A22 equivalent for these objects are the old buildings. They have multiple damage states, and they transition instantly from one to the other. This works well for the smaller objects, such as sheds and whatnot, but for larger buildings and structures, a better system is required, but thats for another journal entry[wink]
Using my surprisingly flexible particle system, I was able to make pretty good looking fire using the same textures that are used for the explosions. A simple overlap of smoke and flame emitters with different lifespans and fade rates resulted in a pretty good looking effect. I'm sure they'll start to look better once Mark makes me some actual fire textures, but until then, I think this will do....
Well, thats all I have time to write down for now, I have a long plane ride tomorrow, so I'm sure I'll get some more work done then. As always, comments/questions are welcome. Peace Out!