Tag: C++

My timeline of text editors

I’ve been coding on and off since the beginning of the 90’s and along this journey I’ve been stumbling over quite a few editors and IDE:s. In this post I will go through some of them. It’s a selection of

Posted in Other, Programming Tagged with: , , , , , , , , , , , , ,

So much to learn, so little time

Recently I have been doing a lot of researching for my new game. In order to develop a larger game, I really need to acquire as much knowledge beforehand as possible and avoid the most common pitfalls. I need a

Posted in Game programming Tagged with: ,

“Smart” pointers

During my vacation I’ve been drawing pixel art for my next game and brainstormed around some basic game structure. Creating pixel graphics is consuming a lot of time.  In round terms it takes at least 5 hours (for me, the

Posted in Programming Tagged with: ,

OSDir fixing accessing important directories

When I’ve been building for different platforms in C++. I’ve experienced that there are no easy way to get the path to important directories. Each platform has it’s own code to get it’s own specific paths, and they are also

Posted in Libraries 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

Posted in Game programming 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

Posted in Game programming 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

Posted in Game programming 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.

Posted in Game programming 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

Posted in Game programming 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

Posted in Game programming Tagged with: , , ,