Tuesday, March 24, 2009

Bug fixes and 2 new important menus added

I just fixed a few annoying bugs, so the game is working really well now. In the past, while managing the menus, you sometimes needed to press the '5' key to make the menu work, instead of the 'Fire' key. I solved that annoying bug, so now almost all the menus work without any problem.

Also, now when you start the game, you first get a build menu, where you select which components you want to add to your ship. If you want 4 lasers, go right ahead, 2 lasers 4 rail guns, be my guest, extra shields, no problem! And only after that you get to play your game. This ensures that every time you pick up the game, you have a different playing experience.

The second screen that I added was that of the 'Options'. now you can control how much the star density should be, so that the low end phones can run the game smoothly. You can also select the number of opponents, the difficulty of AI, the FX and music volume, among other things.

The next thing to do is to put some building time while capturing planets or asteroids. I am still not sure  if that should be done or not. Right now, the planets are captured instantly. Then, I need to set some cost for making a hyperjump, right now its free. Still, a lot of things remain to be done before I start working on the AI.

Friday, March 20, 2009

Weapons firing done

One of the big problems that i encountered was to get the weapons to fire automatically, based on the position of the enemy. You find the angle by using tan(a) = y/x and then use sin(a) and cos(a) to make the weapons fire the projectile in the right direction. Now the next thing that I will do is to make the shields flicker whenever the ship takes damage. That ought to be fun!

Wednesday, March 18, 2009

Ship movement done

I was finally able to do the ship movement and that too properly. Now the left and right keys are used to rotate the ship and the forward key is used to move it forward. The problematic part was to rotate the ship at an angle and then move it according to the angle. Not to mention that I also needed to corelate the appropriate sprite to the appropriate angle. You can see the ship moving about in the screenshot below. 

Tuesday, March 17, 2009

Sprites are here

When I started coding for this game, I opted to go for vector graphics, instead of sprites to make this game. Although that idea had its advantages in the long run, but right now working in vector graphics will take me away from completing the game, and complicate the whole process of collision detection and other calculations.

I just completed a sprite for the ship that the player is going to use and it is shown below. J2ME has a good sprite support which makes collision detection easier, which will be a big part of this project. The code for the vector graphics is there, but it will stay in active till I find time to do it.

With vector graphics you can greatly reduce the amount of memory that is used by the application and do different effects and create a particle system, something that I would love to do, but not right now. Do note the cool glow around the engines.



Friday, March 13, 2009

Double Buffering Enabled

I just implemented double buffering into my game. What double buffering does is that, it stores a frame in the memory buffer as an image and then pastes the image when it draws the game. This avoids flickering which is normally encountered when drawing complicated scenes. The best thing was that, it required only 6 lines of code to do all that.

I just tested the game on my mobile, which is Nokia 3110c and the game is running smooth. I also made the game full screen, thus it looks much better than before. The next step will be to make the weapons work.

Thursday, March 5, 2009

making an empire

The recent update has been that now you can capture/populate planets and asteroids. As a result, if you watch your empire screen, the asteroids and planets just captured will be displayed there. Apart from that, the rate of resource generation will also be updated on the main screen.

I have also added popup boxes that come up as soon as an action is done, like capturing a planet or if some action cannot be done, like when you want to capture a planet and its status is already owned or neutral. Capturing an asteroid or a planet costs population resource which can be filled up with the growth rate. I am also thinking that the user can only refill his crew on a planet, so if he is down on crew, he will need to go back to a planet to get more crew.

The next thing to be done is to make the weapons fire. This can be a bit tricky, so i should get on it soon.

Tuesday, March 3, 2009

The work so far

The work you see in the picture below is about as far I have come into developing my game. The screenshots with the coloured backgrounds show the different courses of action that a person can take while managing the menus. All you see here is working code and there are almost no bugs. You will notice that there is no spaceship in the shots as at the time I made this big picture, there wasn't any ship. But now, there is one and I am currently making it move.

In the beginning I made a design decision that the ship will only be able to jump to different quadrants. Later I realised that this might actually take the fun out of flying the ship. Now as the ship crosses the screen, a new quadrant is drawn and the jump is only used to jump to a different quadrant instantly. So the things that need to be done right now are:

- make the ship move properly so that it comes up at the right spot when it crosses the screen
- change the current quadrant to the new quadrant
- create the cool down time for the hyperjump

here is the screenshot:

Game Publishers

Once my game is complete or at least is in a state where I can provide a demo, I will surely contact these publishers to see who can provide me with the best deals ... if it is possible. Just putting them down here for future reference.

Shadow of Empire

This is a welcome message to whoever stumbles upon this blog. It has been made to inform about the progress that I have made on a game of mine. I think I will stick to the name 'Shadow of Empire' for my games as I could not get 'Kayenaat' from blogspot... surprisingly. I guess someone beat me to it/ But I guess shadow of empire ain't bad at all. Now first come fist, I should write down the publishers of mobile games in a new post followed by the things that I am working on at the moment. So here starts the game blog...!