8 Months of C++

by Joe Flood on 30 June 2014

Looks like I've been working in C++ for 8 months now... how time flies!

While a lot of people are moving away from C++ and towards "managed" languages like Java and C#, I'm staying native – and this is why:

  1. You can compile and run almost anywhere, because there's no need for anyone to write interpreters (JVM, CLR, ...) for the language. (Okay, so the JVM and CLR are more JITted these days, but I'm sticking with "interpreters"!)
  2. It's actually a really, really nice language!
And I don't think I need to go much further than reason #2.

For example, I can do things like:

vec3 myVector = { 20, 10 };
vec3 myOtherVector = myVector + 20;

Which is rather nice. And I can do colours like this:

Colour red = 0xFF0000;
std::cout << "Red has " << red.R << " amount of red and " << red.G << " amount of green" << std::endl;

And last but not least, compare this in Java and C++:

Vector3f javaVector = someOtherObject.getPosition();
vec3 cppVector = someOtherObject->position();

What happens when I change javaVector now? someOtherObject is changed too because the 2 variables point to the same object (gah!). But when I change cppVector? Well, it was copied so someOtherObject is left well alone... yay!

Long live C++!

“Platformer2D”

by Joe Flood on 29 June 2014

Presenting our newest project: Platformer2D!

Clearly this is a working title, but the game idea is more or less complete. Basically, we're building a randomly generated platformer. It'll be different every time you play it, unless of course you manually override the seed number (like in Minecraft!).

The idea of the game will be to manoeuvre through dangerous dungeons and treacherous terrain to find gold, jewels, and most important of all: the door which leads to the next level down!

And here it is:
Screenshot

Our next focus is on making the level generator WAY better. While it currently creates levels which are traversable (they contain platforms and the rooms are connected together), they are not fun to play, nor are they challenging. And some of the levels are completely impossible with massive jumps or jarring walls.

Our next attempt will be using pre-created slabs of levels cemented together at random (a bit like Rogue Legacy, actually!). Watch this space!

Easy does it...

by Joe Flood on 18 May 2014

I've been having some issues with our in-house engine Equinox – memory management isn't where it should be and crashes were becoming a bit of a pain. Damn, blast, and shoot.

Well, I've managed to coax the thing to at least work and not *seem* to leak memory, so that's great. Seems to crash under certain conditions in one game, but not in the other 2 test projects though, so I'm guessing I've borked up that one game somewhere!

In other news though... managed to get something pretty cool to potentially work:

PS3 Controller







Hmm... watch this space!

Over the final hump!

by Joe Flood on 11 March 2014

And now I'm pleased (and absolutely astonished!) to say that I've finally ditched Qt once and for all!

I've migrated over to CMake, which was about 2 hours' work to do for 2 small games and the engine tech – not very long at all.

I'm now using JetBrains' new C++ IDE with it too – and it's amazing! It's got its fair few bugs and issues, but no more than any other beta software has. In fact, it's not once crashed on me, and it's not really ever got in my way either... not bad going at all!

What about GUI apps you say? I'm not worried. Qt is really, really, really good at allowing you to make GUI apps in C++, but that doesn't mean it's the best. You also pay through the nose to actually use it outside of a very restrictive set of situations! So – what can we use instead? wxWidgets of course!

Progress, progress, progress!

by Joe Flood on 10 March 2014

Finally found out the real cost of using Qt in my game engine – around £3,000 per developer seat per platform(!!).

Since I'll be targeting Mac, Windows, Linux, Android, and iOS, it would be prohibitively costly to go with Qt, and completely non-scalable if I add additional developers into the mix!

So with this in mind, I took to removing Qt from my game engine in its entirety! Fast-forward a few weeks and here we are – completely Qt-less. I also built in support for swappable backends too, so if I ever switch again, it'll be very easy to do so and porting will be about a day's work rather than upward of a week!

So what am I using instead? Good old open-source, free licensed software of course! We're now using GLEW to pull out the OpenGL functions, SOIL to load in images/textures, and GLFW to create the contexts (at least for the desktop anyway!)

All that remains now is to migrate from using Qt Creator and qmake to using another IDE (maybe JetBrain's new one?) along with CMake

Here goes nothing...

Next Page

©2012-2014 Javawag. All rights reserved.