Words…

So, I bit the bullet the other day and implemented something that I knew I’d be needing soon. Annoyed that I didn’t have a text-rendering system in place to display things like the current FPS on the screen (and because I hate reading console output), I sought out a decent portable text rendering solution for OpenGL that I could easily port to Direct3D later down the road if needed.  Normally, on the mac platform, I’d just drop into Core Graphics and render the text string to a blank bitmap and roll that bitmap into a texture.  But since I’m trying to be portable, I can’t rely on anything specific to mac os, or windows, or anything!

One thing became readily apparent was that any solution I devise will use FreeType2, a very useful portable font library for rendering TrueType fonts.  One thing that I was not predicting however, was that there exists a multitude of libraries that run on top of FreeType2 (such FreeTypeGL) as whose sole purpose is to use freetype to render text on OpenGL.  This annoyed me.  I don’t want to drop in an entire heavy-weight font library complete with 30+ source files, with its own license, just to render a single static string to a texture.  Furthermore, these libraries become another barrier for portability in terms of OpenGL/Direct3D abstraction.  I’m ok with linking graphics-independent libs such as freetype, but entire subsystems relying on OpenGL, that’s where I draw the line.

So, I decided to do it myself. Freetype can’t be that hard anyway right?  So it really only takes about 100 lines of code to use freetype to render to a image buffer suitable for rolling into an OpenGL texture.  So here you have it, my experimental, non-optimized Text Texture class..

 

Not very efficient yet, but it works!

To save memory, I decided to store the text image in a single channel texture (GL_RED format).  So, I have to use a special swizzle in the GLSL code so the texture doesn’t render red.

And.. it works!

Finally.  I can show my FPS on the screen like a proper game.

 

More Screens!

Bringing the blog up to speed, here is more-or-less the current state of the game and tools.

The initial control system is done, font rendering, basic physics, texture rendering, basic shaders, etc.

From here, the plan is to focus fully on the level editor so I can save my ideas to level files and work up to an initial “first level” kinda demo.

I can’t predict the weather past the storm…

 

My Journey started before I knew where I was headed..

About two years ago, I started work on one of my biggest software projects, Verto Studio 3D.  I started the project because I wanted to prove myself as a software developer.  I wanted to prove that if I put my mind to it, and really pushed myself, I could come up with a product that was a real accomplishment.  Looking back, I’m satisfied with Verto.   But something is missing.

I’ve lost touch with my roots.  Ever since I was a kid, I’ve wanted to make video games.  I learned C/C++ and OpenGL because I wanted to be a game developer.  Yet, I haven’t ever made a good game.  Good games are defined by critical acclaim, and every game I’ve ever made has had none.  Furthermore, I’ve never really been proud of any game I’ve tried to make.  Not since I was 18 years old anyway.  The other day, my old game dev website got taken down, and it made me reminisce.  Ever since I learned 3D graphics, I’ve always tried to make large epic 3D games by myself – focusing more on the programming and graphics techniques than the gameplay.  This will change.  It’s time to make a simple 2D game, and attempt to make it good.  I’ll post my experiences here.

It’ll be fun to someday look back at some of these earlier posts, and see how bad the game was and watch it mature overtime… or descend into oblivion whichever happens first.

SimpleStorm+Platform2D+LevelEditor

SimpleStormFront (ssf) is a 4th generation game API.  It’s the 4th time I’ve rewritten my C++ OpenGL classes.  This time, I’m focusing on modern graphics systems and OpenGL3.x/GLES2.x core capability, and am considering Direct3D10 down the road.  I’ve also extracted out all system-specifics, so the code can be ran on any system I desire to port the core to (windows, mac, sdl, cocoa, iOS, xbox, etc).  For now, It’s designed to run on any graphics system that supports shaders and VBOs.

Platform2D is currently the name of the set of c++ classes running on top of ssf.  In-short Platform2D is the terrible name I’ve given to the game engine.  Platform2D will be written 100% against ssf and other portable 3rd party libraries, not allowing it to touch anything but ssf API permits maximum portability down the road.

LevelEditor is the name of mac/cocoa tool that will be used to create the levels for Platform2D.  All these “things” will come together to help me make “The Game”, a nameless, shapeless project that will mature over time.  Apart from a few visions in my head, not much about the game or it’s designed is set in stone.  All I know is that it will be a 2D platformer.

Stay tuned..