Sunday, May 13, 2007

More Updates

The old blue bullet was beginning to annoy me in Asteroids because since changing the background (also blue) its become harder to see. It was also a little to big in comparison to the ship. So I hopped into Photoshop and put this new bullet texture together, its pretty small but it uses more predominant colours (red and orange) and stands out a lot more, I'm also happier with the size of it in relation to the ship.

Another thing that has been annoying me is the fire that comes out of the back of the ship. At the moment the emitter actually starts from the center point of the ship so a lot of it is actually rendered behind the ship, and also because it starts from the center point it turns/curves all wrong. I attempted to get the fire to sit at the back of the ship by applying some extra units to its location, but in doing that it was producing undesired results were the fire emitter would either not move from the center of the screen or it would move in strange directions around the screen.

Pete and I were talking about combo's and I suggested earlier that we should have a pop up when you complete a combo, weather it pop up were the combo ended or just somewhere on the screen. I made the below texture, nothing much to it at the moment.

Combo Texture.

I've been looking at Asteroids and having the ship firing just the one bullet doesn't look right, I decided to make the ship fire two bullets, one from each wing. The tricky part is trying to get the bullets to fire from the wings all whilst the ship is moving around and rotating. I'm lucky Pete wrote up some good vector classes for me, I made use of a Polar Vector to move out 90 degree's towards the wings, doing that seemed to work a treat.

Ship firing two bullets.

I've been trying to design some art for Missile Command, I am trying to use Illustrator as my starting point and try and gain some inspiration from the vector drawing, but my drawing skills are just to poor to be able to draw anything useable. I've been asking around at uni and in forums and all sorts of places for people that can draw and possibly help us with some art, but it feels like I'm hitting my head against a brick wall. Were going to have to figure something out soon once the desperation sets in.

I coded some health into the players ship, the idea being that when it reaches zero the player's ship explodes and he/she loses the game. If a player collides with an asteroid the velocity of the ship and the asteroid is taken into account when calculating the amount of damage the players ship will incur, so if the player is traveling really fast and collides with an asteroid they will die immediately compared to traveling slowly and tap the asteroid only causing slight damage. I got Pete to add an explosion effect to the ship when it died that turned out pretty good.

Pete asked me if I could update the networking code to include the strength of an event between players, so each client can interpret the strength according to the game style. For example, Missile Command wouldn't be able to handle a 100 hit combo from Asteroids because it would spawn to many missiles, whilst it would take to long to gather a 100 hit combo in Missile Command leaving Asteroids with nothing to do. Anyway I simply updated the current command for triggering an event and tacked on the strength, when the event is parsed into the client it is split down into sections allowing each part to be read separately. After writing it up and doing some basic tests it worked as expected, now Pete can continue to work on the scoring mechanisms for the game and make use of the strength.

When Pete was finished doing some work with the new event code we decided to some testing to see if it would work in a real situation and to check out the cause and effect of sending events down the network. After a couple of tests it proved to be a success, the games were reacting just how we had anticipated but with the exception being that we hadn't really written any code to normalize the incoming strength so we were experiencing a lot of asteroids appearing on the screen at once, which meant the average time spent playing a single game was around 20 to 40 seconds. But either way, our original concept of having old retro games in a new multiplayer environment is being achieved and I think its bringing new life to some old classics.

Lastly, I tried to export the engine into a jar (executable Java file) using Eclipse, but after testing it I discovered that the GUI wasn't reacting as expected. The buttons were not reacting at all making it impossible to even start a game. I looked over the files in the Jar notably the manifest file, which is designed to contain the base information and references for the Jar file to read. I compared the newly created manifest file with one generated using Netbeans and found that Eclipse was providing an almost empty manifest. I replaced the eclipse one with the Netbeans one and the game began to work, this is interesting considering I thought that I setup Eclipse properly, but maybe I haven't.

No comments: