Category: 40-Hour Games

Okay, Break’s Over.

I’m going to try something kind of crazy tonight.

The ClanDestiny prototype needs to get done, first so it can be done, but also so I can move on to the Star Kittens prototype and get some feedback on which I should flesh out first.

So I’m going to try some livecoding. I’ve created an account on JustinTV and will be streaming my coding session tonight, live. Once I’m done, I’ll encode the thing and upload it to YouTube, but if you want to chat with me while I’m working and make suggestions you’ll need to visit my brand-spankin’-new JustinTV channel.

I should start livecoding around 8 PM EST.

Update: Um…between technical issues and family responsibilities, this didn’t happen. I’ll try again Wednesday night.

ClanDestiny Update: Um…still 8 hours.


If you’ve played Inaria, you can probably tell that that’s Inaria’s level-up screen. It’s been repurposed as the “research technology” screen for ClanDestiny. But the icons are all over the place! What gives?

Well, knowing that I’m going to be fiddling with and re-jiggering a non-square group of icons, I put an “edit” mode into the base GUI object. When this mode is on, you can drag the icons around the screen. They’ll still work, of course.

Since this was work on the framework, it doesn’t count against my time. But I thought you’d like to see what I’ve been doing.

ClanDestiny Update: 8 Hours

I gave up on the Ultima tiles, they don’t minimap well. Right now I’m generating my minimap by drawing the base sprite at a really small size; the amount of black in the Ultima tiles made that impossible.

Plus, I could not resist the pretty.

In the minimap area you can see the results of my terrain generation algorithm, which I’m liking a lot for the size and style of landmasses it creates. The number/layout of the special terrain tiles like hills, swamp and desert leave a bit to be desired but I can fix that later.

Plus we’ve got cities and units on the map. They currently do not belong to any team and are non-interactwithabble. That will change very, very soon.

I have 32 hours left. The two most complex things in the game will be the AI (the prototype WILL have one) and the tech tree. AI can’t really be done until the base systems are in, so I’ll probably start that around the 30-hour mark. So putting in the tech tree now would probably be a good idea.

I’m currently thinking about dividing the tree into three basic areas – combat, science and culture. And instead of a tree I’m thinking of a wheel, since all three can interact to provide additional options. Hopefully I can get a mockup of that soon.

ClanDestiny Update: 5 Hours

And now we’re back to this:

Now, of course, that represents lots of work under the hood, making data structures, deciding on terrain types, etc, etc, etc.

Trust me, it’ll look better soon.

I deliberately used sprites from Ultima V because a) it has all the river and road transitions I want and b) when the time comes to replace this art with real art it’ll be easy to see what needs replacing, since I’m so familiar with these sprites.

Next comes some terrain generation, which is going to be kind of specialized, since I’m not sure if I want boats in the game or not. Since this is supposed to be a much smaller-scale game, boats may not make much sense. On the other hand, they may be more fun to play.

When the Internet teases, she teases HARD.

I was looking for some basic terrain tiles I could use for the ClanDestiny prototype.

I found some.

I found this on some guy’s photobucket.

It’s got everything I need – trees, grass, mountains, tundra, desert, rivers, huts, villages, cities – and has a slightly Japanese feel to it without being too over-the-top.

For a while I couldn’t figure out where they came from, leading me to believe that I might be able to use them for ClanDestiny.

It turns out they are from Fire Emblem: Blazing Sword for the Game Boy Advance.


I can still use them for the prototype, but at some point I’m going to have to pay for some art, and good Lord, art is expensive. This is why I couldn’t get any animated tiles for use with Inaria, and instead had to go with public domain stuff.

ClanDestiny Prototype Update 0: 0 Hours

Okay! So, like I said, I can think about the game all I want.

So here’s what I’m thinking.

There are four bits to the game:





That’s it. You have one resource – production. You use production to do everything in the game,
from improving cities to buying technologies to making units.

BUT, you cannot save up a ton of production and then unleash hell in one turn because you can only do as many things as you have cities (you don’t have to do them all to/in one city, but that’s your limit). That’s the number of Actions you can take. An action is:

Buying a technology
Building a unit
Improving a city
Building a new city

When you build units, you can choose any of your cities for them to appear in. Thus, mopping up is easier because you can build all your units “on the front” instead of having to move them from the back.

Technologies are devided into three basic types – combat, civilization improvements and religious/cultural. Since this is the stone age, combat advantages amount of “oh, you discovered that leather makes your guys take a little more damage” and such, and your cultural improvements involve discovering that certain rocks sound nice when struck. But there’s only one tree and it’s not very big – in fact, it should fit on one screen without having to scroll. The tree is going to look very similar to a WoW talent tree.

So let’s see. Several tribes all starting at the edges of the map. Lots of settlement sites in the center that are either vacant (so you can easily build a city there) or have unaligned cities on them (which you must either conquer or culturally absorb). Once everything is claimed, the tribes will start trying to take territory away from the other tribes. Culture still works, but it’s much harder on aligned settlements, so the traditional way will be to attack them with armies.

Armies. We’re going to greatly simplify how units work by allowing the player to group them into armies. Armies are basically just a stack of units. BUT, once you put a group of units into an army, you can’t remove them (though you can add more units). So stacking units is actually a good thing, where it was a
terrible thing in the original Civilization. You can have an army guard a city, or move it around the map and attack with it.

So, the game progression is as follows:

You start with three settlements (thus, you can do three things a turn).
You build up your tech.
You make units so you can start taking unclaimed settlements.
You make combat units so you can start taking claimed settlements.
Everything eventually gets claimed and the infighting starts.
You try to attack or subvert your enemy’s settlements into joining your side.
Somebody gets all the settlements. They win.

The stack of doom. I think making it so that you can’t undo armies makes it so that you’ve got a Death Star: yeah, the town its currently attacking is doomed, but all the other towns are relatively undefended because you’ve spent so much production on this one thing. It also may not be using the best technologies.

So you’re wandering around with your stack of doom. You attack a city and are repulsed by the city’s defensive bonus plus the fact that while there are fewer units, they are better-equipped than you.

Meanwhile, several small, fast strike forces are taking the undefended cities in your backfield. Can you pull your SoD back in time to take them back? Either way, you’ve been put on the back foot.

So I don’t think the SoD will be that big a problem.

I think this design works, and even better, it’s not that difficult to program.

Multiplayer is also possible.

The Return of the 40-Hour Game

So. Got two games. Which should I make? The answer, of course, is both, but the order and priority I give both games is important.

What both Star Kittens and ClanDestiny need are prototypes.

Well. I can make prototypes 🙂

So all hail the return of the 40-hour game! I’ll be writing a version of both Star Kittens and ClanDestiny and going from there based on your feedback from them. I won’t release the prototypes until they are both finished, so you can try them both out at once. And I’ll only have 40 hours to spend on each prototype.

Again, the standard rules apply:

1. Only actual coding/art/sound time counts. I can think about stuff as long as I want.

2. The forty-hour deadline is hard and fast. Once the clock runs out, pencils down and publish.

3. I can use anything I’ve already coded for free.

4. I must blog the entire process as much as possible; the constant feedback is a really good motivator.

I believe I’ll actually do ClanDestiny first, as I think I’ve got its design more fully-formed in my head than Star Kittens.

Zeta Update: Three Hours

No, I worked more than three hours on Zeta this weekend, but a lot of work was done on the map editor. Just like with Inaria, any work I do improving my framework doesn’t count towards my time.

Basically all I have to do is make the map editor a little more flexible and I’ll be set. I eventually want an excellent map editor, with variable map size, lots of data for each cell, and lots of extra features, but that’ll be in the future.

Here’s a more detailed look at how I intend to pursue Zeta:


TIER 1: Must be completed within the 40 hours or the project is a failure.

Each “zone” in Zeta will be 64×64 tiles, so we can use our existing editor.

Our character will be able to initially run, jump, climb ladders, and shoot left and right.

We will have at least one enemy type for our character to overcome.

We must have at least two zones with a zone link between them.

Our goal must not be accessible until the player finds an upgrade of some sort. (Probably double jump.) This is what makes it a metroidvania.

All graphics should be ripped from Wizard for now, for speed’s sake.

At this point, a playthrough of the game will probably take about ten minutes.

TIER 2: Bring the game closer to feeling like a full game.

A menu.


More zones.

More powerups, and more areas to explore.

More enemies. Steal attack patterns from other games.

Add at least one musical track.

Sound effects from SFXR.

At this point, a playthrough of the game will probably take about half an hour.

TIER 3: Finalize the game.

Start replacing the Wizard graphics with Zeta-style graphics.

More music.

Add a conversation system that will allow us to tell our story.

Add some boss fights.

Testing to make sure the basic gameplay is sound and the game can be completed.

At this point, a playthrough of the game will probably take about 45 minutes to an hour.


So what exactly is DaisyMoon?

DaisyMoon is a fairly complete black-box game engine produced by Oxeye Games as their internal engine. It’s a Lua-based extension of Daisy, which was their previous engine. All of Oxeye’s game-specific code for a DaisyMoon game is written in Lua.

You can view the official wiki for DaisyMoon here, and even download the latest version here. Unfortunately, the docs in the wiki are incomplete – most pages have lots of red entries, signifying that there’s no associated explanation for the at function.

Fortunately, you have four very different games with the full Lua source code avaiable: HouseGlobe, FillAuth, Because It’s Fun, Fay, and Horror Tactics.

About the only thing DaisyMoon doesn’t do is 3D, but I don’t really need that for Zeta. Hopefully between the solid engine and copious code swiping I can get Zeta up and running quickly.

And now for another twist – I’m not going to just blog this, I’m going to video blog it. Every Friday I’ll have a video up on YouTube talking about what I got done on Zeta and what I learned about DaisyMoon.

Should be fun.

Technical Difficulties

So why haven’t I started on Zeta?

I could hem and haw, but the truth is that I haven’t started because of the Oxeye guys. It’s all their fault. Since encountering the amazing stuff they did in a short period of time for a competition, I have become thoroughly dissatisfied with my own game framework. It’s time for a revamp…if I can make myself feel up to it.

So what does it need?

Cleaner layout. The display code in particular is pretty awful. Not only do I not have a scene graph, but things don’t even draw in the order they are passed in because I haven’t implemented an IDrawable interface class. Right now polys draw first, particles draw second, sprites draw third and lines draw last. That’s sufficient for Planitia, but it’s just not going to cut it for anything more complex. I also need to abstract a lot about the drawing code to make it easier to throw objects at the renderer.

Second thing, UI code. Ugh. Not only am I missing lots of necessary UI widgets (like text input boxes), but my UIs are laid out using a custom text format when they should obviously be using XML.

Third, scripting. Again, a custom language. Here I’m torn. Lua is so popular these days (the Oxeye guys use it and all World of Warcraft mods are written in it), but we’re actually using Python at work. In the end, I’ve used both and they aren’t that different (they are both scripting languages in the end) so it probably wouldn’t be hard to convert between them. So I think I’ll integrate Python, since it’s more directly related to my job.

Fourth, performance information. I have a very basic profiler that I stole out of Game Programming Gems 1, it needs to be seriously revamped. I like the colored bars I’ve seen on a lot of games in development where the length of the bar denotes how long it took the last frame to render and the colors on the bar tell you which subsystems took the most time.

Plus, we need smart pointers. Yes, I know, I should already have smart pointer integration. All I can say is that it wasn’t a priority when I started coding up my little 3D terrain demo three years ago. I’ll probably use boost:shared_ptr, although the last time I tried to download and integrate boost it was a complete pain in the butt.

But that’s not all, of course, because we haven’t even talked about tools yet.

The two biggest tools that I absolutely must have are a GUI editor and a 2D map editor. These will both probably be written in C#. A 3D map editor would be fantastic but it’ll go on the back burner.

So what do I like in my code?

States and events. I think I handled this pretty well. States are black boxes, and they have OnEnter() and OnExit() methods so that I can do things like animate GUIs for a state. I can also have multiple states running at once, or “pushed” states that run exclusively until they are “popped” (think about pressing ESC to get the main menu of a game – usually this causes all other activity in the program to stop until the main menu is cleared).

The event system is abstracted and works well, though it needs more event types and the types it does have could probably use some cleaning.

Networking. Works okay but way too much “raw” code. Need to wrap that up into easier-to-use functions and debug some stuff. But networking works with the events to create a system that stays in sync well, at least on a LAN.

Text handling. This may seem silly but I think text and fonts are a really low priority for most game programmers. My system can return metrics for a string, thus allowing things like centering the text and word-wrapping that works correctly even if the text in the string changes later. It also supports drop shadows, transparency and colored text. I use bitmap fonts because I don’t want to depend on system fonts since I’ll eventually want to go cross-platform.

Now do you see why I haven’t started on Zeta yet? I basically need to write a new framework to replace my existing one before I can write any more games. Yes, that framework will make making games so much eaiser, but…

Ah, well. Now that I’ve made the list, I don’t think I can help but follow it.