All posts by Tomáš Andrle

NLEngine

As I wrote in my previous post, I’m using C++ to write Superforce. I had to unlearn a lot of Java habits and get up to speed with C++ again. C++ is much more powerful and expressive than Java. Not having garbage collection actually helps me write better code. The C++11 update is great.

Great to be back
Hello C++, it’s great to be back

I didn’t want to use a 3rd party engine for the same reasons I stopped using Java. I want to be in control of the core technology and I want to build it myself exactly the way I need. So even before writing any game code, I built an engine.

NLEngine is what I call it. Nice Little Engine. Don’t laugh, it’s a separate project in Xcode, so I had to give it a name, OK? And “Source” was already taken. Shut up! Anyway, it is aimed at 2D action games. I’d love to build a few with it and Superforce will be the first one. The overall goals are:

  1. Ease of use
  2. Simplicity in design
  3. Reasonable performance

So far it does the following things:

  • Sprite renderer with batching
  • Sound playback with ogg streaming, OpenAL output
  • Reading touch, accelerometer, mouse, keyboard input
  • File I/O, can use mmap, supports PAK files
  • Image loading
  • Fonts
  • Geometry utilities, cameras
  • Scene management with transitions
  • Texture atlas
  • Tile maps with material masks
  • Particles
  • Animations such as fade, rotate, scale, move etc. with easing curves
  • Timers – realtime, fixed step and a scoped timer for quick performance profiling
  • IMGUI
  • Undo/redo history (for editing tools)
  • SQLite wrapper (for keeping game stats, highscores etc)

External dependencies are kept to a minimum: stb image, stb vorbis, rapidxml, sqlite. I do use the STL but stay away from Boost.

It uses OpenGL which is good enough for now. I’m just blasting sprites on the screen. I’m looking forward to using more modern graphics APIs but right now I feel it would be too much new stuff at once.

It runs on iOS and Mac OS X. There’s a good chance I’ll get it to run on Linux. Later I might look at the Android NDK, but I’m not sure what to think of the absence of OpenAL there. Windows port is not planned.

All game code is written in C++. I don’t want to use a scripting language and rather focus on designing good APIs and abstractions in C++. Sooner or later taking care of the bindings for a scripting language would become too complex for me. If I absolutely had to pick a scripting language, it would be Lua.

From Java to C++

My previous games used Java and LWJGL but I decided to make a big change and leave Java behind.

Superforce is written in C++.

When I started making games, I thought Java was a good choice. It is a nice language. I know it really well. The IDEs are super powerful and garbage collection usually doesn’t hurt too much.

But when the iPhone and the App Store appeared and started gaining momentum, Java left me out in the cold. First, I was just disappointed. Perhaps they would add Java support in a few months. But it didn’t happen. Disaster.

It wasn’t an easy decision to change my main technology. I took it very seriously. After completing two games, I had a lot of reusable code which seemed valuable. But I knew needed something solid that really does run everywhere.

So for Superforce, I quite literally started from scratch. Clicked Xcode > File > New Project and started rewriting my engine in C++.

Superforce

Hello, it’s time to announce my next game.

Superforce

It’s an action game called SUPERFORCE. It will run on the iPhone.

Superforce is going to be my first iPhone game. It is inspired by River Raid, Renegade Ops and Devastro.

There is no release date. Keep an eye on this blog for updates.

Superforce screenshot

Devastro and Type Raiders now free

Devastro and Type Raiders are now completely free.

Mac versions now include their own private Java runtimes. This means that they will run fine on systems that don’t have Java installed.

Windows versions are no longer available.

Big thanks to everyone who has purchased either of the games throughout the years. Sales have obviously gone down since the game had been released and I no longer feel the need to keep the purchase system working. It’s been fun.

Type Raiders updated to 1.1

After a long time I’m releasing a small update for Type Raiders.

What’s new in Type Raiders 1.1

  • The game is now completely free. Demo limits have been removed.
  • Mac version now includes its own Java runtime, which means it should run on any new Mac without the need to install Java separately.
  • Windows version is no longer supported. Sorry.
  • Updated the LWJGL library to 2.9.0 for improved compatibility and stability.
  • Enable crash reporter. Crash reports contain no personal information.

Devastro updated to 1.9

After a long time I’m releasing a small update for Devastro.

What’s new in Devastro 1.9

  • The game is now completely free. Demo limits have been removed.
  • Mac version now includes its own Java runtime, which means it should run on any new Mac without the need to install Java separately.
  • Windows version is no longer supported. Sorry.
  • Updated the LWJGL library to 2.9.0 for improved compatibility and stability.
  • Enable crash reporter. Crash reports contain no personal information.

NLTemplate – HTML template library for C++

Don’t ask me why, but I needed a simple HTML template library for C++. I looked at a few of them, but there wasn’t a clear winner. Most were too heavyweight, hard to build or I didn’t like the syntax.

So I decided to write my own. How hard can it be?

NLTemplate is really simple. It comes in a single source file, has no extra dependencies and you can just drop it in your project and it will work. It does variable replacement, optional or repeatable blocks and file includes. You can define your own file loader to deal with path resolution and file I/O. To insert a variable, you write {{ variable }}, to define a block, you write {% block name %} and then end it with {% endblock %}.

Get the source code here.