DaisyMoon

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.

Name That Game: The Triumphant Return!

You know what? I’m not going to let the internet spoil our fun. That would just be stupid. So once again, Name That Game!

This one had a lot in common with Crusader: No Remorse, except it had an even darker storyline.

Name and developer, please! If you win, I promise not to implant a bomb in your head and send you out on suicide missions.

Edit: The game was Meat Puppet, by Kronos Digital Entertainment.

Michigander

So, how exactly is Michigan different from Texas?

Snow – Let’s get this one out of the way first. Yes, the weather in Michigan is much colder than Texas, and I’ve never seen so much snow in my life. Georgia would have a heavy snowfall every ten years or so, but after I moved to Texas such a thing was a distant memory.

I think falling snow is beautiful. I’ve always loved it. I’m sure I’ll get sick of it by March, but right now my enthusiasm is not dampened, and neither is my children’s.

The good thing is that I do much better with cold temperatures than I do with hot. (I think my brain is overclocked or something.) I can walk around outside in just a shirt and coat (no hat, gloves or scarf) until the temperature gets down to the 20’s or so. Then I have to zip up my coat.

It’s Like Living in the Shire – It takes me about twenty minutes to drive from my home in West Bloomfield to work. As I do so, I pass through five towns: Commerce Township, Farmington Hills, Novi, Livonia, and finally Plymouth. All of these towns abut and few of them are more than five miles across either way. The entire Greater Detroit Area is like that. It’s incredibly confusing to navigate even with a GPS.

Lane Ends – Dear god, does it ever. The surface roads around here tend to be close, narrow, poorly lit, and (unfortunately) poorly paved. Plus, streets will widen to create a right-hand lane as you approach a light. These lanes are not turn-only, and if you’re me, you tend to think, “Oh, good, the street is now two lanes wide.” No. That lane merges back into the left lane as soon as you get through the light. After a while I figured I could stay safe by just staying left all the time…until I got on the highway to go to work and had the left lane disappear on me several times.

Penalty For Injuring or Killing a Worker: $7500 and 15 Years in Prison – Okay…I understand that the roads are narrow, but is this such a big problem up here that they have to put the penalty on the traffic sign to get people to not run into construction workers?

Strong Spirit – There are lots and lots of churches up here. As we entered Michigan during our move we passed the biggest mosque I’d ever seen. People up here seem to take their faith very seriously.

Vice – On the other hand, a lot of things that people like to do that are needlessly curtailed in other states are legal here. Gambling? Yeppers; every night I pass a restaurant that has a sign that reads, “Poker Room Open”. Alcohol? You can buy liquor at your neighborhood grocery store, even on Sunday. Guns? Not only is private ownership of guns legal, but Michigan is a shall-issue state so citizens can get a concealed-carry license with a minimum of fuss. I approve of all of this.

The Michigan Left – In yet another bit of driving weirdness, making a left turn here in Michigan usually involves turning right, then making a u-turn at a nearby pass-through. This is called the Michigan Left. It’s designed to prevent accidents caused by people darting across two lanes of oncoming traffic to turn left. I would guess that it probably works, but it’s going to take some getting used to.

Overall I’m liking it, and not just because I could become gainfully employed by moving up here. I’ll probably post more observations later.