Tag: Spacefight

Spacefight – Game finished – Part 12

The game is finally complete! You can find it under the download section on this blog, if you want to try it out. You can also look it up on Bitbucket. I’m quite happy how it turned out. I have

Tagged with: , , , ,

Spacefight – Building and distributing the game – Part 11

The game starts to look complete and I am getting ready to build versions of the game, for the platforms I initially had in mind which are Linux, Windows and Mac OSX. Building for Windows First off I hoped I

Tagged with: , , , , , , , , , , ,

Spacefight – Packing all the resources into one file – Part 10

While the project is in development phase it is very convenient to have all the assets laying around in folders. But when it’s time to distribute your game it doesn’t look as professional when everything is lying all over the

Tagged with: , , , , , ,

Spacefight – Sound and music – Part 9

One of the most overlooked things when you create your first game, is the sound. For me, the sound really makes a game come to life. I can just look back to when I was a kid. I could play

Tagged with: , , , , , , ,

Spacefight – Gamecrash, memory leaks and frustration – Part 8

In software development there are different types of bugs. C++ is a hard typed language which makes it easy for the compiler to detect errors in the code. So if there is type error (int is not a float, or

Tagged with: , , , , , ,

Spacefight – Things are moving, but do they collide? – Part 7

Now the game is as far in the development phase and things are moving around on the screen! In order to put some logic into the game I’ll need some kind of a collision detection. I will use a very

Tagged with: , ,

Spacefight – The game-loop – Part 6

All games contain loops of some sort. The most important loop in the game is simply called “game-loop”. This is a short example how it will run:

This is a short version of what is happening in the code.

Tagged with: , , , ,

Spacefight – Subclassing into enemies, player and other stuff – part 5

In the last post I made a GameObject class. Now it’s time to subclass from the GameObject class into an enemy. The enemy object will make use of the shared functionality in GameObject, like position, access to a shared AnimationLibrary

Tagged with: , ,

Spacefight – The GameObject – part 4

A lot of objects in the game has a many things in common. They contain an Animationlibrary, a position on the screen, width and height. They also got common functions like: Listen Sends any event from the user’s keyboard/mouse/joystick to

Tagged with: , , ,

Spacefight – Sprites and animations – part 3

Sprites. The small animated objects are essential to a 2D game. My game will contain quite a number of sprites like enemies, bullets and of course the the player. There are different approaches how to arrange your sprites. Some developers

Tagged with: , , ,