Since my last post I had been planning for the game, putting all my ideas into the Groove Workspace and so forth. I had also decided to incorporate some planning methods learned from school which I know will be annoying to manage but will keep me much more organised. The planning is relatively complete, I have written a document detailing some things I would like the game to include, why I would want them in the game, what kind of audience I will try to target etc, which can be found here.
Recently I had come across a serious problem concerning rotation. Initially I had decided that I would need to create 360 or 180 images of the tank and its gun to allow a good degree of rotation, however when it came to just drawing a square 180 times to represent a tank for the test, it proved to be extremely long and tedious. Thinking ahead, I know that the changing tank style would represent what upgrades it had and how powerful it was therefore I would need to create lots of drawings, each with 180 different orientations! That is forgetting about animations! I decided to take a leaf from the 3D game programming book about texture mapping and implement one into my 2D engine which would allow rotation, skewing, scaling, etc. It took me around a week of learning before I felt confident to implement it and now after 3 days of bug fixing, even though there are still bugs, I have finally come up with my texture mapper! I have created a demo of the texture mapper here for you to try. You can use W,S,A,D T,F,G,H I,J,K,L and UP,DOWN,LEFT,RIGHT to control the movements of each corner point of the bitmap. Left Shift and Left Control also rotate the bitmap round. It is still rather buggy as I haven’t completely finished the error checking such as straight lines in the polygon but it is rather good. The texture mapper uses point sampling with no filter methods or anti-aliasing but I may try to get some put in to make it look a little nicer, further since it is an affine texture mapper, scaling and skewering can produce slightly odd looking results similar to the image on Wikipedia.
Now that I have completed that first hurdle, I can continue to make the game which I have now decided to call: Panzer! If I see the game developing into a fast and fun game I will keep the exclamation mark on the end of the title to make it seem more fun, however if it develops into more of a serious game, which i doubt, i will remove the exclamation mark to make it seem serious :).
Whilst making the texture mapper I also discovered Verlet Integration! Verlet Integration is a surprisingly simple and easy way to produce physics models on the computer. When I first found out about it I thought it was so simple that it was stupid! I have created a small rope demo which shows the capabilities of around 4 lines of mathematical code to produce such an amazing outcome.
Links:
Panzer Game Detailed Document
Texture Mapper Demo
Verlet Physics Chain
