vrijdag 30 april 2010

30/04/2010: debugging, debugging, ...

Last week was quite heavy on development and debugging. I encountered one bug that was really difficult to track down, and by searching for it I found one new bug that was not easy to fix. Anyway, this is wat has been done:
  1. Implemented a GameInput class. Until now, the game only processed 'Button presses', but not button clicks. So the GameInput notifies the game when the user 'clicks' a button (= a press and a release). The GameInput class also monitors the amount of time a button was pressed. This will be handy for making variable jumps or throws.
  2. Implemented a Weapon and WeaponBullet class. The catapult is the weapon, and the pine cones are the bullets. So, now, Simon can throw cones to his enemies. When an enemy is hit, it disappears. I could make an animation for that, but it will be more easy to make some blinking animation instead.
  3. Provided a debug mode on GameObjects.  This is really handy to discover physics problems.
    1. This debug mode plots the upper left corner and bottom right corner of a related physics object.
  4. Provided a debug mode on Paths. This was necessary to track down one of the nasty bugs. It seems that the Farseer physics engine does some strange things with geometries that consist of multiple vertices: the final position of vertices is not what one could expect. Anyway, there is a workaround now.
    1. The debug mode plots all points on the screen.
Today, I also went to the store to buy a decent microphone since next week is audio recording week!

A nice bug

woensdag 21 april 2010

21/04/2010: processing...

Wednesday already!

I polished the animations of Simon, the dog and the farmer (some follow-through here and there, some arm movements, ...) and exported them to PNG's. Then transformed each action to one texture by means of the Animation Texturizer tool (see yesterday's post). And finally tested how they look in the game!

Processing the farmer's attack animation takes 3 minutes and uses all memory and 1 CPU core. Image processing is indeed very hungry on resources!


As you can see it soups up one of my two cores and gradually takes all memory. This is quite obvious since 48 HDTV (1920x1080) files are processed pixel-by-pixel and are stitched to each other at the end... I could use some of the parallellism features of .NET 4.0 and some additional cores too :) The result of all that processing is:



Tomorrow and friday I will be working on:
  • A solution for animation textures that are bigger than 2048x2048 pixels. Yes indeed, the farmer's attack animation takes 2048x3167 pixels. There is already a solution for background textures, so I'll probably use the same solution.
  • Process the other figures: bull, crow and level boss.
    • And put them somewhere in the game.
  • Implement the AI for all those nice guys
    • AI sounds cool, but in fact every figure will have 1 .NET associated class with all intelligence built in :)
  • Implement a jump action
    • The jump animation is ready, the jump physics are ready, ... but they don't like each other for the moment. So, I'll have to finetune... Additionally, the jump animation will need to expose events that state if the jump is starting or ending.
  • Implement a shoot action
    • The shoot animation is ready, but there is still the need for some 'projectile' functionality.
  • Implement a HUD (heads up display)
    • The HUD will be used to show the health
  • Background design
    • Some houses should be added to the background layer, and the background should look more 'spooky'. I think that Photoshop will help here... :)
It is a lot of work, but next week is also available for working on those features...

dinsdag 20 april 2010

20/04/2010: crow animation and the long-awaited "Animation Texturizer"

Today, I did two things:
  1. Draw a crow in Illustrator, import it in Anime Studio and create a flying bird animation. All went quite well, since I know the drill now :) You can see the video below.
  2. The other part of the day I spent on writing the long-awaited animation texturizer tool! Creating one big texture file for XNA based on multiple PNG's export goes really fast now! You can see a screenshot of the tool below. The tool also outputs an XML configuration with all the necessary information about each image (X, Y, pivotX, pivotY, ...).


The animation texturizer tool is a plugin of the custom Game Editor (= Windows Forms project) I had to create. The tool reads in a directory with all animation PNG's exported by Anime Studio + a directory with all pivot point PNG's (see yesterday's post). The tool outputs one XML and one big texture PNG. Below you can see the ouput for Simon's walk animation:


maandag 19 april 2010

19/04/2010: game animations

New 'in-game' animations have been created (click the links to see the videos):
  1. Bull animations
    1. This one was difficult to make, but I got some help from Eadweard Muybridge and his 1885 book 'Horses And Other Animals In Motion' which is really nice. Yep, animals still move the same way after 125 years... Anyway, Eadweard did not take photograps of bulls, but the Buffalo galopping photo sequence was close enough for me ;)
  2. Boss animations
    1. This one was fun to make, the throwing part is loosely based on a funny baseball player that I found in the book Cartoon Drawing (Preston Blair)
    2. The first two animations are not some kind of dance moves, but in the game the boss will switch lanes, so these animations will be used in combination with some vertical displacement.
  3. Dog animations 
    1. This one was not easy too, due to all the vectors that are moving in different directions. To make it more difficult I stumbled across a bug in Anime Studio... But, hey, that's called learning :)
Note: these are in-game animations which are played sequentially, but in the game each action will be triggered by an event of course!

I also worked out some 'pivot point' tracking mechanism: a simple cross that moves along with the 'pivot' point of a figure. This cross will then be tracked by a tool (which I'll develop tomorrow) in order to know where a figure is at each point in time. This will then be used to create one big texture :) Let's hope it will not take too long to develop!

zondag 18 april 2010

18/04/2010: 'holiday' week #2

Today, my second holiday week started: a week that will be filled with stuff to do for the game! So, no real holidays yet (would be difficult too with all those ashes in the sky).

The past 2 weeks did not result in a lot of deliverables:
  1. I got a new, fresh Windows 7 install on my laptop and had to reinstall everything to continue development of the game. It's amazing how much tools I need to create just one game!
    1. BTW: Windows 7 rocks :)
  2. I installed and played with Anime Studio Pro. In fact, I did all 6 tutorials and now the tool has no secrets for me anymore (yeah right). 
    1. BTW: Anime Studio Pro is quite fun and powerfull to use. Only disadvantage: everything is in 2D, so rotating a figure is not a good idea. Anime Studio has some 3D features, but it is very basic.
 The last couple of days following stuff has been done:
  1. All figures have been imported into Anime Studio. That was NOT fun. The tool requires Illustrator 8 formatted files that have no gradients. Additionally, every part of the figure had to be exported separately since Anime Studio does not imports layers.
  2. Three animations of Simon have been finished: walk, jump and shoot (Simon has a catapult)
  3. Three animations of the Farmer have been finished: sleep/wake up, walk and attack.


    zondag 4 april 2010

    03/04/2010: the XBox 360 controller

    Last week was low on blog posts due to the Microsoft Techdays. Those 3 days were reallly interesting for my job but there were also two lunchbreak sessions that were interesting for my game project:

    1. XNAsteriods : How to develop the asteroids game in 30 minutes with the XNA framework. Two things I learnt that could be interesting for the game:
      1. The use of Game Components: the game currently does not use the game component concept. This was a decision that was made at the start.
      2. The use of a previous controller state. That could be handy for the game; will try to implement it one of those days.
    2. Introducing the Windows Phone 7 Series developer experience. It seems that XNA will be very important on that platform; can't wait to see a Windows Phone 7 device :)
    Today (saturday) I presented a status update to my mentor and got feedback on the project. As for now, the game is still on track and everybody is happy, yippie :) I also bought a Xbox 360 controller and tried it out: it works like a charm!



    Two things will have to be added to the game engine in the weeks to come:
    1. HUD: when playing the level, the player should be able to see the health bar, the lives, the ammo, ... by means of a HUD. I think it will not be too difficult to integrate that in a clean way.
    2. Pixel-perfect collisions: the physics engine calculates collisions by means of bounding box collisions, but sometimes this can be frustrating for a player. So I will try to implement pixel-perfect collisions.
    However, from now on, more focus will go to the figure animation by means of the Anime Studio Pro software.

    Volgers