Sunday, 28 October 2012

I Hate Fluid Simulation!!!!!

For the last four days I have been working on a fluid simulation in pixel bender.  While originally I thought this would only take a day, which it did, I realized that the example I was using (www.derschmale.com) did not take into account the velocity of the mouse when calculating the change in the pixels, it just took the mouse position and made the upwards velocity increase and then react to the boundaries of the image.  This is not what I wanted so I started from scratch turning my old flash fluid sim into pixel bender.  It has taken me a long time but it is almost done.  Almost!

Monday, 22 October 2012

Menus

Today I have made the start menu and the pause menu.  They both need custom buttons and backgrounds but they work as they should.  I  will probably do some work on the predator breeding sometime today as well.  Tomorrow I will make the game start as we want it to with two herbivores at the start and then introduce the predators after 'x' amount of herbivores have been met.  Also tomorrow I want to meet up with the group and talk about what the goal of the game is specifically because at the moment I feel as if it is a bit too vague for the user to pick up on immediately and an obvious goal, I believe, will help us get the message across better.

Friday, 12 October 2012

Opacity and Hunger

Today I made the herbivore have hunger and  this hunger now effects the way that the herbivores act.  I am currently working on making the herbivores opacity change as a way of indicating the hunger levels of the the creatures, there might be a better way of indicating this but for now this will do.

Tuesday, 2 October 2012

Pixel Bender is the Bomb

Today I showed Ben(the tutor) the code that we had so far and he said that it was much to slow mostly due to the fluid solver.  He suggested looking up pixel bender fluid sims and using a shader to do the calculations.  The first example we found was a lot more complex than the fluid solver I had written in flash but ran substantially faster than my code.  So now I am moving the code to pixel bender.  Also Ben suggested I change the collision code so that the collision function only goes through all the sprites in the same cell rather than the entire board.  Doing both of these things should increase the speed of the game phenomenally, making the game nicer to look at.