Game Development

Smart Pointer System

I’ve taken a liking to smart pointers lately. The overhead is negligible and it’s vastly easier than having to keep track of pointers all over the place.

I read a bit about the std smart pointer. I don’t understand why the articles on smart pointers are so long or complicated, or why the boost library made a smart pointer. To me this seems the easiest thing in the world. Perhaps I don’t understand all the issues involved?

Smart Object

Smart Pointer

To use it, just derive your class from RakSmartObj. When instantiating your class, assign the pointer to an instance of RakSmartPtr. When all instances of RakSmartPtr are deleted or assigned to 0, then the class instance is automatically deleted.


Thinking about Rak3D

RakNet is nearing completion. About the only thing it doesn’t have is a cross-platform lobby system. I’m not really equipped for consistent cross-platform development, but I think this will be a good next feature.

After that I’m considering writing Rak3D, an easy to use 3d graphics engine in the same spirit as RakNet. There’s a lot of graphics engines out there already, but as I’ve seen they are all deficient in at least one of these 3 ways:

1. Too low level such that unless you are a graphics programmer already you won’t be able to exploit the best features
2. Lacking in integrated tools, or the tools already there suck
3. Slow

The best designed of the ones I’ve used is, in many ways it reminds me of RakNet, though it lacks the features of Ogre 3D.

The goal of my 3d engine would be

1. To better learn graphics programming myself
2. To provide all the common ancillary features people need (GUI, exporter integration with built-in scene view, animation sequence tool, debug output, predefined shaders)
3. To be easy to use such that you really don’t have to be a graphics programmer to get nice scenes.
4. To perform complex operations and optimize them internally, relieving the user of this burden.

I would do this with two layers. The first layer would be more low level and an analogue to the 3D engines already out there. The second layer would make decisions as of a necessity, using the first layer for this, and is intended to be what most people would use, with the first layer as a backup.

Game Development

RakNet in Develop Magazine

Alan Lawrance pointed out to me that Develop Magazine had an article on networking middleware and listed RakNet. Here is a screenshot.

RakNet article

He also sent me the article. Right click to save as.

They spelled the name wrong, and didn’t mention that RakNet also supports the Mac and Linux. They also put that the license is $5000, while actually that is the site-license, and the regular licenses are as low as $100. There are also quite a few companies using RakNet that aren’t listed on the front page.

In other news, Auran is using RakNet for Battlestar Galactica too, which just came out on the XBOX 360.