Page List

Sunday, February 27, 2011

Moving and shooting


Ok, things are starting to shape up. I have further refined the movement of my ship. To get the ship to move exactly as I need it to I had to finish up the weapon firing mechanism. This would be done with two classes, a projectile class and a weapon manager class. The importance of the weapon manager class in term of movement is it would track the cool down between weapon bursts. This is importance since the player ship is powered by the recoil of shooting it's weapons. Every time the weapon is fired the ship moves in the opposite direction. I'll let a video of the game in action explain the rest.

You will also notice I have added a window in the upper right hand corner showing which weapon is selected. I have only implemented the blaster. Hopefully by my next update I will have implemented the cannon and flamethrower.

Friday, February 18, 2011

Geometry my old enemy, we meet again!

When we last left off my attempts to get the player ship to move resulted in jerky movements and spiraling off into infinity. Things have gotten slightly better.

Remember how some old games use to have cheat codes that let you unlock debugging mode. When I was younger I was always irradiated that all this did was make a bunch of numbers appear in the corner of the screen. I've learned those numbers are my friends.
A bit of yellow text and suddenly finding out what was going on was much easier. Using break points can be a pain in the ass when certain methods and lines of code get ran 60 times a second. My biggest problem is that I seem to have forgotten everything I know about geometry and trigonometry. I did not help that geo and trig are probably my worst mathematical subjects so I didn't know much to begin with. I need to brush up on somethings.

I checked my bookshelf but unfortunately I sold my geo and trig math books for money that was probably wasted on junk food and other university supplies. I wasn't completely out a luck, my modern philosophy book was of no value to anyone and thus remains in my possession. I since Descartes was the father of analytical geometry his Discourse on Methods might shade some light on my problem. A little reading revealed that by assuming everything I can doubt does not exist and only accepts things I know are absolutely true I should be about to completely rederive all of geometry and trigonometry from innate concepts. 

A half hour and one existential crisis later and I decided to just check Wikipedia. Ultimately my ship is now moving in the proper direction when press the move button.

Probably would demonstrate my progress better if I captured some video, maybe next time

Next step: Smooth out ship movements and handle collisions with screen boarders. Begin writing code to handle ships weapon.


Saturday, February 5, 2011

Welcome to Game Expiment

I love video games. Always have, and unless something drastic happens, always will. I first picked up a controller at 3 years old (my parents Atari 2600) and have been playing ever since. I would be lying if I didn't say it was my fascination with video games that lead me to study Software Engineer in university so I could eventually take part in my video game industry myself. Which is why I decided to stop wishing I could make video, and decided to grabs some books and start developing. With tons of free and inexpensive development tools now available and direct to user publishing platforms, now is probably a better time than ever to venture into the world of independent game development.

The purpose of this blog is to document my progress and problems as I experiment with game development. Ultimately, I would like to someday produce something that wouldn't be embarrassed to publish and ask money for. For now I am going to try and make something that at least resembles a video game.

Which brings me to my first project tentatively titled "Stuck in Space".

The best way to describe it is pretty much an 'Asteroid' clone, except that the player space ship's engine is disabled. What this mean is that in order to move around and dodge the variety of nasty objects that threatening the ship the player will have to rely on the recoil from the ships weapons. The player will have to think carefully about what they fire at as a bad shot can spend them into spend them into something that they should be avoiding.

My reasons for starting with an 'Asteroid' clone mainly has to do with the fact that an 'Asteroid' like game is both simple but offers a lot of room to be creative.

I am writing this game using Microsoft Visual C# Express and XNA Game Studio. The biggest deciding factor for using XNA Game Studio is that amount and quality of the leaning material available.

Finally, lets talk about the current status of the game:




As you can see after about an hour or two of playing around I have my space ship sprite on a blue background. I have also gotten the space space to point in the direction that the user moves a game-pads analog stick. Unfortunately that's about all of the constructive progress I have made, my early attempts to make the ship actually move has had some interesting results. At first the ship wouldn't start moving, next it wouldn't stop. Make the ship move is actually a fairly simple task, and with a simple movement pattern I would probably already be past this stage. Unfortunately, because of the game mechanic of using the ships gun recoil to push the ship (as well as my own desire to have the accelerate and decelerate smoothly) I am forced to make a somewhat more complex system of movement other than push a button to go forward. I guess the best solution for now is to try to get the ship to move properly using a very simple system of physics and then expand upon that.

Well, I work on it and report on how it goes.