From my squishy brain to yours.

Building the bricks so I can make a house

I’m falling into the bad habit of not wanting to make a blog post until I have something significant to show.  However, since progress is slow when you are working on the basic engine that sits beneath the game, and I don’t get a lot of time to program anyways, I wind up not posting at all.  And that is bad.

So here’s my attempt at posting more, even if the updates aren’t earth-shattering.

Test sprites, lines, and fonts

Test sprites, lines, and fonts

The above image is one of the test pages for my engine/library.  Here I’m testing simple drawing primitives (lines, rectangles, xor’ed rectangles, setting draw color, sub-canvases, checkerboards, TGA file reading, sprite encoding, sprite display, reversed sprite display, clipped sprite display, solid sprite display, clipped solid sprite display, etc. etc.)

I’m also testing out my bit-mapped font display routines, displayed as both simple rectangle copies per glyph and sprite encoded glyphs.  The advantage of encoding one’s own fonts is that you have a lot of control over how the glyphs look, and don’t have to worry about certain fonts being installed on the target platform.  The downside is that it makes supporting porting to languages like Japanese, Chinese, and Korean much more difficult.  Ah well, I’ll cross that bridge when I come to it.  Once upon a time I worked with Shift-JIS, bitmap-encoded Japanese fonts in the days before Unicode, and I’m sure I can pull off something if need be.

In the lower right hand corner are a couple of buttons driven by the new Immediate Mode GUI library.  Many years ago I wrote a GUI library which saw light of day in games like Business Tycoon and the original version of Galactic Civilizations 2, and I’ve been salvaging what I can of either code or ideas from it to build the new IMGUI library.  It is actually simpler to develop my own Widget library than to try and use an existing one, and it will again give me complete control over how the interface looks and responds.  It also makes the code very portable across platforms (Win/Lin PC, Mac, Pandora, Nokia Internet Tablet, netbooks, etc.) since I just need a surface to draw on and I’m good to go.  Also it will be possible to display the widgets through 3D surfaces in the future if need be, though the game engine is currently only 2D.

I’ve also been busy with the scripting engine.  I overhauled the old C-syntax scripting language I wrote for an RPG engine a decade or so ago, and brought it up to integrate with my modern code base.  I’m combining ideas from C, C++, and Python all into one language, and with the tight integration with my world representation / scene graph, it should suit my purposes nicely.  I also wanted to write my own scripting language rather than using Python or Lua or somesuch, so that I could make sure the syntax and flow works exactly how I want it to.  (Do we see a theme developing here?)  Also I wanted to insure maximum portability and minimum external dependencies in my code.

I’ve also been working on a dialog script parser, that is similar to the script parser in RenPy.  RenPy’s dialog scripting approach made a lot of sense to me, so my own dialog scripts are… errr… heavily inspired by it.  This is the code that currently has my focus, and I hope to be driving a dialog interface with the code before too much longer.

So there you have it.  Lots of individual bricks have been built, but there’s no house yet.  I haven’t started on any art or story yet, so my Visual Novel is lacking both visuals and a novel.  All that will come in good time… I just need to get around to building the house!

About The Author


Leave a Reply