I haven't had as much progress as I wanted last week, but at least I managed to start thinking about the main character in the game. I haven't decided what it is yet (human/animal/robot) but I've got the basic size and proportions done. As you can see from the image below it is far from complete, but I'm posting it so that we can have a nice comparison once it is done.
Big head so I can show some emotion and big hands so the water cannon can be held properly. Other than that, it's pretty basic. Still a long way to go.
The engine is working pretty well now and I think I can get the water cannon to be quite fun. However, in order to push on with the game I feel that I need to get some graphics done. Even if I just make temporary stuff I need to get the general look and feel of the game into place. So that's what I did, results below. What do you think? I want the different type of tiles to be easily and quickly distinguishable so I tried to use contrast and colors to make them stand out from each other.
The new animated water looks much better than the old conveyor belt look-a-likes. I also have little splashes where it hits the ground. So far - so good, now I really need to start thinking what kind of creature the player will actually be controlling. Something that shoots water... Any suggestions?
All right! I've made quite a lot of improvements since the last demo. Not all of them are visible but things are running a lot smoother under the hood, the new collision engine in particular. I've also added a lot of small things to the map editor which speeds up testing and level creation. That said, there are still some new things that you can try out.
First out is our first gameplay mechanic, the water cannon. It doesn't do much at the moment except shooting water, but I have list of fun thing you will be able to do with it in the future. Feel free to try it out below.
[kml_flashembed publishmethod="static" fversion="10.0.0" useexpressinstall="true" movie="flash/demo3/TheProject.swf" width="448" height="352" targetclass="flashmovie" fvars="url=http://johanpeitz.com/flash/demo3/"]
One thing that I hope to accomplish with the water cannon is to allow the player to play a bit with the direction of the beam. By using PVM, players should be able to learn how to control the beam. With upgrades the beam will shoot longer, last longer etc.
Other than that I've also tweaked the player's movement a bit. Most obvious is that you now only jump 2 tiles instead of three. I'm not sure I like it yet. On the pro side it compresses levels and makes the game less jumpy, but on the con side it makes making interesting levels a lot harder. How do you feel about it?
You can also see (in the top corner) the FPS and how many objects that are rendered each frame - isn't that interesting!
There are few things in software development that I find as satisfying and rewarding as refactoring. You've had some old code laying around for a while and it works, but you know that it is crappy and could/should be optimized. The feeling of having picked things apart, refined them, put them together, and finally see everything working again (but better), is hard to beat.
As I was trying to fix some issues regarding the collision solver which handles the collisions between entities in the game and the tile map itself, I eventually snapped. The code that I have been using for tile map collision has been around since '98 or something and has been a part of every single platform game I've ever made. So it is obviously stable and all, but since I'm adding a lot of new exiting stuff to my engine it becomes apparent that the code has limits. All though it works, it is not very flexible to handle and has special case stacked on special case ad infinitum ad nauseum. In other words, not good enough.
Back to the snapping. I snapped and ripped it all out, bit the bullet and rewrote the collision code from scratch. This time I used AABB (axis aligned bounding boxes) and a SAT-type algorithm (separate axis theoreme) which is a proven method of actually doing these kinds of things. Took a while to make the changes propagate properly through the engine but now it works really nice. Still has a few minor issues (mainly handling objects that move too fast) but those I had before as well and now it should be much easier to fix.
Chalk up another one for refactoring.
And when I say spring I mean the kind of spring you find in a pen, not the one you find in a forest... Anyway, I've been happily adding little things to the engine. First out is a classic spring. Land on it and it will bump you back in to the air. If you're holding down the jump button when you land on the spring, you will jump a lot higher. In the editor I can now also add little nodes. These can also be named, which is a good thing because that means that I can pass a set of nodes to my newly implemented moving platform and it will move along the nodes. Very convenient! I've put both these elements into the demo below.
Again, arrows to move and X to jump.
[kml_flashembed publishmethod="static" fversion="10.0.0" useexpressinstall="true" movie="flash/demo2/TheProject.swf" width="448" height="352" targetclass="flashmovie" fvars="url=http://johanpeitz.com/flash/demo2/"]
One interesting level design issue that arises is pacing. As you can try out for yourselves from the demo above, waiting around for a moving platform breaks any flow that the player might have. This doesn't have to be a bad thing, but compared to the previous demo the experience is slightly different. This type of waiting is okay if the player feels safe or isn't in a hurry, but if the opposite is true having to time platforms is not so fun.
I've also started to think about the overall game design. What kind of actions that will be available to the player etc. Haven't tried anything out in code yet but when I play it in my head it is surprisingly fun. Don't want to say too much about it just yet, but it does involve water.
Finally, adding moving elements into the engine is likely to spawn a few defects, so if you spot any, let me know.
I really tried to come up with a better title, but I failed. Sorry. Anyhow, as the title does suggest, I have something to show! As I mentioned earlier I am using my engine Pixelizer which is optimized to make pixel graphics run like greased lightning. The demo below doesn't neither need or use it, but it does showcase some basic stuff like player movement, collision against both solid tiles and tiles that you can jump through from below ( I usually call them "jump throughs" but maybe there is a real name for them? ). You can also see some animated tiles. Everything so far is configurable via xml so if I want to change the frame rate of the waterfalls or something similar it is easily done without having to recompile the game. I hope this will be a huge time saver once I start drawing tiles.
I've only made a small test level so far but it should show off the idea. Jump height and run speed and things like that are just default values and feels a bit wonky for my own personal taste. Arrows to move and X to jump. Have fun exploring!
(Oh, you might have to click the flash to focus it.)
[kml_flashembed publishmethod="static" fversion="10.0.0" useexpressinstall="true" movie="flash/demo1/TheProject.swf" width="448" height="352" targetclass="flashmovie" fvars="url=http://johanpeitz.com/flash/demo1/"]
Please don't be alarmed by the lack of color -this is not a 4 color game! It is just my temp graphics so that I can focus on the engine instead of being carried away pixeling. There are also a few other things that the engine can do already, but I'll introduce them as I the development continues. As it is now, what do you think?