Weekly update

For those that celebrate it, Happy Easter!

Last week’s screenshot and this week’s won’t look too different, functionally speaking. Some of the graphics have changed, but there are only a couple new mechanics. Namely, you can now shoot and asteroids rain from the top of the screen. Innovation!

A lot has changed in the code, though. I added Box2D physics, movement is framerate-independent, and the component-manager is much more feature-complete. Overall, I feel close to being able to actually make a game here. Did I say that last week?

You can follow me on twitter to see what I’m working on during the week or ask questions.



Things are going well!

I didn’t get a post done last week. That was partly because I wrote 75% of one and then didn’t know how to end it, and partly because I was busy coding.Progress is excellent. Life is good.

About a week after my last entry, I was getting rather fed up with the amount of information I needed to absorb. I decided to take a day off and learn about Allegro. I had a blast! I had previous experience with SDL, and Allegro’s API felt similar. After playing around a bit, I decided that I might do a quick project for fun.

It wouldn’t be perfect, it wouldn’t take too long. My main project has a strict separation between engine and game code. Which turned out to be one of those invisible burdens you don’t realize you have until it’s removed. I flew through code until…

…I had to build an entity manager of some sort. This was the exact problem I was taking a break from solving, but here it was again.

Okay, how to solve this? I had at least a dozens tabs open, but I didn’t know where to start. Before sinking into frustration, I hurriedly chose a single article that looked complete and didn’t ask you to read 10 other articles to understand it. After reading, I quickly wrote what must be the most horrible component-based object system ever. It works.

What’s happening now? I’ve decided to continue the side project. I will be able to finish something quicker, get experience, and (most importantly, perhaps) I have little desire to withhold information until things look good.

It’s a top-down space shooter about dogfighting. I hope it will be fun to watch, because it’ll be fun to make! I’ll have more information soon, but now I’m going to go work on it. 🙂

Weekly update

Here’s a quick update, because I’d like to get something posted once a week at least. So, here are a few of the week’s accomplishments:

  • I learned about library search paths on Linux. Currently you have to run a script that tells the OS where to look for the libraries, but I hear there’s a method to make the binary itself set a custom search path. If anyone has information on what standard practices are for this, I’d love some advice!
  • The input system was rewritten to use Boost signals. I’ve heard that this is not a fast solution, so I must be cautious about just how dependent I become on them. All the same, this is a great improvement on the previous code and makes the engine more structured.
  • I wrote a getVersion() function for the engine. I thought it was pretty neat, because it uses the Mercurial changeset and automatically updates when building the game. (tutorial) This should help when it comes time to test beta versions.

Next week I plan to work on the entity manager. There is already existing code, but I expect it will need a near-complete rewrite anyway. Teaching oneself means you’re never sure you’re doing things the “right” way, so every decision is a balance between going with what works at the moment, and what you expect is the correct way to do things. It’s easy to spend too much time debating which solution to go with. StackExchange (especially the gamedev section) is a priceless tool in figuring out these problems.

Summing up the features I’ve worked on is very humbling.

My development logs show I’ve been working on this since September of last year. It’s been a bit longer than that, really, and for all that time I rather expected to have completed something a little more… playable.

As it is, there are many half-integrated libraries and many more features on my to-do list. This isn’t discouraging, as I’m already able to create little applications that show off what I’ve done and look nice. They look cool, so I’m happy.

By far the largest section of the engine so far is the graphics. I’m using OpenGL within an SDL window. Texture loading is currently done via sdl_image, but I intend to swap that out for libPNG at some point in the future. I’ve also created a simple sprite class, which has some basic features like blend modes, render ordering, rotation and scaling…

Audio support is beginning to come together. I can currently load OGG files (sticking with open formats), and play them by accessing OpenAL/Alut functions directly. Eventually I hope to abstract and simplify this so that all of the backend libraries become invisible, accessed only by engine-functions.

Box2D will handle the physics of this game, and I’ve already put together a demo where you can stack some boxes on top of one another. Depending on the needs of my game, I may make a simple GUI-based physics editor. Right now I’m still accessing the library directly to do everything.

Perhaps the most complete feature so far is the font generation and rendering. Not wanting to integrate yet-another-library, I opted to use bitmap fonts with metadata about the glyphs stored in transparent pixels of the texture. I use a Gimp script written in Python to create the fonts. Then I can load them just like any other texture, extracting the metadata afterwards by grabbing the information from the texture buffer. It feels a workaround and the letters can easily become blurry, but there are bigger things to work on at the moment.

Finally, I’ve been using TinyXML to do all my file parsing. I know many developers don’t care for XML, but right now I’m happy with it. I don’t have to worry about file input/output, and that saves time. Time saved is good.

As you can see, it doesn’t appear that I have a lot done yet. This is true, but I am already able to build small demos with the engine. In that way, I like to think my progress is greater than the sum of its parts.

As for planned features, I’m reaching a point in development where the basics (graphics, audio… library integration) aren’t as important as abstract features like entity management, world handling, and signal/slots. This is exciting, but also challenging because the path forward isn’t as clear. I have to decide what the API looks like and how things are structured based on very little experience.

All the same, I feel very close to actually being able to start on the game! I wouldn’t be surprised if I made some giant leaps forward this month.

Enter, the Toolset

So to start things off, I thought it would be good to do a short series of posts about where things are in development now. This means development tools, art programs, implemented features, which libraries I’ve chosen and how they’re being used.

I’m currently developing using Linux Mint 11. It’s not the most recent or popular OS, but I’m reluctant to upgrade or switch just yet. I’m relatively comfortable with my toolset. That isn’t flashy, but there’s value for me in being able to count on my software remaining consistent. There are also the custom tweaks I’ve made to the OS over time.

With that said, many parts of this distro are showing their age, and I know lots of positive innovation has happened in GUIs. I’m generally hesitant to adopt new desktop environments, since it means relearning techniques that currently work fine most of the time. Eventually, however, I plan on upgrading to Ubuntu.

I’m rapidly nearing the point where I need to stay current, though, as game dev in Linux seems a step behind everyone else anyway. It’s still my favorite OS!

Just like most (all?) Linux developers, I’m using g++ to compile my C++ code. On top of that, however, I’m using Make to streamline the process a little. It feels outdated, and I know there are more modern tools out there that help automate the process. Perhaps one day I’ll try them.

Geany is currently my IDE, although I use it for little more than text editing. I don’t bother to create project files. As development progresses, I may find it helps me be more productive to use more advanced features, but I haven’t needed to yet.

I’m managing my code using Mercurial. It was easy to setup, and gives me a safety net when it comes to breaking code – I can always go back and get an earlier revision! At first I had my entire project tracked by Mercurial, including art files and binaries. Things are a little more sensible now.

Doxygen was added after I’d taken a break from development and couldn’t remember how my code worked. It was easier to setup than I expected and does a fantastic job at documenting my code. As my project grows larger, I’m sure it will only become more useful!

Finally, I’m learning about QT Creator. This is an amazing suite of programs and libraries intended for GUI design, and I can’t wait to use it for things like a level editor and animation tools! It also introduced me to the concept of signals and slots, which I’m working on implementing in my code. That alone made the effort to learn it worthwhile.

That covers most of my coding tools. If you’d like to know more about any of the above or have suggestions, I’d love to hear what you think.

Next: State of the game engine.

Hello again, world!

There’s probably no mystery in announcing that “something is happening” on this blog. Mystery needs interest, and that’s not something my chronic silence creates.

Nevertheless, I’m a sucker for intrigue and vague announcements made by interesting people. Pretending that applies here, I give you the following:

Something is happening…

I am making a game. It was a thinly veiled secret mostly kept hidden by its obscurity and irrelevance, but there you go.

Now, this news isn’t special, except to me. I hope to make things interesting for you all by blogging about the experience, but that’s not unique either. Honestly, if you find a reason to ride along, I’m not sure what it will be! Do you want to read about the misadventures of an amateur developer with no budget using mostly open-source software to make a game? I guess that would be a reason.

We’ll see what happens!

He's not alone!

Good morning!

The sun set on this blog a long time ago, but night is just for resting and I believe the dawn is coming…

Can you see the sunrise?