Categories
Game Design Game Development Geek / Technical Linux Game Development Personal Development

LD24: Breakfast the First! #LD48

OJ and a mixed cereal. One cereal has a lot of protein and fiber. The other has a lot of B6, B12, and iron.

OJ and cereal

My wife suggested the idea of “Evolving Doors”, which I think is brilliant because (1) it suggests a game play mechanic of choosing to go through doors to evolve and (2) it makes for an excellent play on words.

Categories
Game Design Game Development Geek / Technical Linux Game Development Personal Development

LD24: Slept On It #LD48

Before I went to bed, I started working on getting a skeleton project up and running.

I know. I know. It’s supposed to be one of my pre-compo checklist items: “Is your build environment working? I’m using CMake, and I should probably prepare an LD24 project beforehand so I’m not wasting time trying to get the build scripts to work when I could have a buildable project with a blank window from the start.”

Well, I didn’t. So I spent the first few hours getting a window up. Basically, I took existing scaffolding code (a basic Game class, Command/Event interfaces, stuff like that) and slapped it together as minimally as possible until it could build successfully and leave me with a window that shows a title screen and can exit properly.

LD24 TitleScreen

The title is…evolving.

But the actual game design? Still only ideas right now.

I figured that a lot of people might try to make a Spore clone. I’ve seen quite a few screenshots with little primordial oozes as playable characters, and presumably you gain abilities, appendages, and interact with other units that might be more or less evolved than you. While I’m excited to play some of these games, I’m not sure Yet-Another-Variation would be interesting to work on.

I like the idea of an evolving landscape. A tile-based world that starts out with only one kind of tile with certain attributes, but as you explore it, you come across evolved tiles which might have new attributes or changes to existing ones that might impact movement, health, sight, sound, etc. And if I do it right, no two play sessions will be the same.

In terms of engineering, experimenting with neural networks might be fun. Maybe let the player pick a trait, and then have the system go through a few iterations to find out how healthy it is compared to others. On the other hand, that sounds like a lot of uncertainty and an unfinished compo entry.

Anyway, I’ll think about it some more over breakfast.

Categories
Game Design Game Development Geek / Technical Linux Game Development Personal Development

LD24: Evolution Actually Made it! #LD48

So, the theme was announced, and it’s Evolution.

Now, Evolution is the theme that was the Susan Lucci of Ludum Dare themes. It always made it to the final round of theme voting and always lost out.

Until today.

And somehow, I’m unprepared for it. Out of all of this LD’s themes, Evolution was the one I hadn’t given much thought to. And I even voted for it!

I’m a little worried about this compo. This morning, I woke up with pain in my hip and back. Walking is awkward, standing is difficult, and sitting seems to make it worse. I don’t know how much time I will be able to dedicate this weekend if I can’t be in front of the computer.

But I’m sure as the weekend evolvess (see what I did there?), things will come together. I’m going to spend the first few moments just thinking about potential design approaches.

Good luck, Ludum Dare participants!

Categories
Game Development Geek / Technical Linux Game Development Personal Development

Ludum Dare #24: Are You In?

August 24-27 is Ludum Dare #24. Ludum Dare is a 48-hour solo game development competition. It’s also a 72-hour game jam where the rules about tools, team sizes, and distribution are a bit more lax.

I realized that the last time I participated in a compo was Ludum Dare #20. It’s been too long.

I’m not sure if I will be working in C++ with libSDL or if I will be using Stencyl, which I used successfully during the 2011 Meaningful Game Play Game Jam to create two prototypes. I’d love to try out Unity, but according to the developers, they “currently have no plans or commitments to port the editor to Linux.”

Theme voting is happening right now. Friday night is the announcement of the theme and the kick-off of both the compo and jam. Are you in?

Categories
Linux Game Development Marketing/Business

Linux Game Publishing CEO Steps Down

Yesterday, I woke up to an email saying that Michael Simms is stepping down after 10 years of running Linux Game Publishing and Tux Games.

Wow, 10 years! That’s a lot of enthusiasm and work, and unfortunately it takes its toll:

It took me some months to notice what was going on, and even longer to accept that my burnout was going to kill LGP unless I did something about it. The lack of drive slowed down production of new titles, shipping, customer service, everything that I either handled or had a big part in helping with, was all being compromised.

But I didn’t want to let the company die. Of course not, I have invested too much time, money, blood sweat and tears into LGP to just say ‘That is it, bye’. And so I sat down and had a long think about how to save it.

Clive Crous will take the reins at LGP and Tux Games. Good luck, Clive, and good luck with your future endeavors, Michael!

Categories
Game Development Geek / Technical Linux Game Development Personal Development

Why It Is Important to Document Even the Smallest Decisions

A week or so ago, I was configuring the hero summoning queue for my villages in “Stop That Hero!” (still available for pre-order!), and I couldn’t figure out why I had a special “END_QUEUE” for the last item in my queues. None of my code handled it, so it got ignored, and removing it didn’t change anything adversely that I could see, so I removed it since I couldn’t remember why I put it there in the first place.

Today, while working on a new level layout, I created a village that summoned only one farmer. When play-testing, I found that right when the farmer appears, the game ends in victory for the player.

Premature Victory

That’s odd…why would that happen?

My victory monitoring code checks all entities to see if there are any that are not on the player’s team. If there aren’t, then it checks all structures that summon entities owned by non-player teams to see if they are currently summoning anything. The idea is that at the beginning of the level, when no heroes have been summoned, the game doesn’t end in victory since they’re still coming, and victory only occurs when there are no more heroes being summoned AND there no more heroes left in the level.

The issue I was seeing is that right when a village spawns a farmer, the farmer doesn’t exist yet. It’s simply a new command to create a farmer. But the village no longer has a farmer in its queue and is empty. So the victory condition goes off and creates the end-game-in-victory-for-player command. So that’s why I see the farmer when the victory screen comes up. The farmer gets created and the game ends because both commands are run in the same update step.

And that’s why I had an “END_QUEUE” summon that doesn’t do anything. It’s to prevent this situation from happening. Now I remember. I ran into this issue before. The END_QUEUE summon is ignored, but the victory condition monitor sees that there is still something in the queue. By the time the END_QUEUE is “summoned” and gone, the entity creation should have happened for the previous item in the queue.

It was a stupid abuse of the system that I should have handled better the first time, but I didn’t think much of it. I needed to get things done, so I did the quick solution and promptly forgot about it.

Since I didn’t document what “END_QUEUE” was supposed to do when I came up with it, I spent part of my day trying to figure it out.

So there you go. Document your decisions, no matter how small. In fact, maybe the small decisions are even more important to document than the bigger ones.

Categories
Game Design Game Development Geek / Technical Linux Game Development

Stop That Hero! Development Summary

The last time I wrote about Stop That Hero! development was in July. Here’s a quick summary of the work I’ve done since then:

Fixed memory bugs

I fixed a number of issues in July, specifically with weird corruption issues that seemed to result from the use of std::vector<bool> which is apparently not a real vector of boolean values. I was easily able to discover where memory leaks were occurring with Valgrind.

Recently, I ran into a bizarre unit test failure when adding code to a module that had nothing to do with the unit test, and I discovered that I had introduced a bunch of memory leaks that were finally manifesting in such issues. It wasn’t hard to fix since I once again was able to use Valgrind, but it was tedious work. A lot of it was fixing dumb mistakes, too. I have no idea why I thought I could get away with the code I wrote when I wrote it.

Unless there are corruption problems, memory bugs are not usually a big deal during development. Still, it would be nice if I used tools that made it easier to avoid the problems in the first place. I use UnitTest++, but these memory leak issues would have been caught had I used a tool such as CPPUTest which fails tests if memory leaks.

Added more minions, entities, and projectiles

Once I made combat revolve around projectiles, I added fireball-launching dragons and warlocks. Warlocks will eventually have a magic spell they cast, but they launch fireballs because that was the only projectile I had at the time.

Recently, I added new heroes. Archers shoot arrows, and wizards cast lightning bolts. I eventually want to add villagers and knights and get rid of the generic Hero character.

More Heroes Added

Optimized rendering

I’ve had the same update/rendering code for a long time, and on a whim, I added some logging to my game to find out why I wasn’t able to get 60 FPS even though I didn’t think I was doing much.

It turned out, I wasn’t doing much. All of my code ran within a millisecond, but the actual SDL call that blits to the window took between 30-50 ms to run! The good news is that my own code isn’t slowing me down, but mathematically it’s impossible that SDL MUST render this slow since so many other SDL games run much faster. So I looked to find out what other people did to make it work.

Here’s the code I was using to set the video mode:
m_screen = sdlInstance->SDL_SetVideoMode(m_x, m_y, m_bitDepth, SDL_DOUBLEBUF);

And here’s a much faster version based on a thead at Ubuntu Forums that I apparently did not bookmark:
m_screen = sdlInstance->SDL_SetVideoMode(m_x, m_y, m_bitDepth, SDL_SWSURFACE | SDL_ASYNCBLIT | SDL_DOUBLEBUF | SDL_ANYFORMAT | SDL_SRCALPHA);

So I went from 30-50 ms to 8 ms. The game runs so much more smoothly now, and it didn’t take a lot of work at all.

Switched away from pie menu

Pie menus are great for usability, but only if you can guarantee that the menu can be displayed in its entirety around the mouse cursor. Since one goal with “Stop That Hero!” was to make the interface as simple as possible, I didn’t want a scrolling world. The entire world fits on the screen at once. To use pie menus, I’d have to reduce the world size to provide a border all so that buttons could fit on the screen if a tower was selected near the edges.

So I removed the pie menu and went back to a traditional UI at the top of the screen.

Added resources and minion costs

Before, I was adding minions to the game whenever I wanted. Now there are resource costs, and it takes time to summon a minion from a tower. The player starts with a base set of resources, and the current system adds 1 resource every second. It’s simple, and it works. I can experiment with resource mechanics, such as adding rewards for killing heroes or if certain minions collect items and bring them back to the player’s castle, but the basic system is in place.

Made object creation more generic/data driven

I initially tried to make the game as quickly as possible, so instead of trying to genericize object creation, I created a bunch of separate commands: CreateHeroCommand, CreateDragonCommand, CreateOrcCommand, etc.

While it worked, it was also very limiting. Each time I added a new type of entity or in-game object, I had to create a new command. Maybe that’s fine if I know what entities and objects I want to create up front, but it limits the design. Maybe I want to make weak squires, regular soldiers, and strong knights as variations on each other. The effort to write the code for the separate creation commands would be tedious and slow.

So I replaced all of those CreateXYZCommands with CreateObjectFromTemplate. Instead of having coded commands to create an orc, I create a template called Orc, which defines components and data that an orc would have. CreateObjectFromTemplate(“Orc”) then creates the components with the correct data, and an orc appears in the game world.

Templates can be created and changed much more easily than hardcoded commands, which means adding and tweaking minions, heroes, and other in-game objects is easier, which means game design and balancing is easier. It also allows me to data-drive the game a lot more, which means more interesting entities and game situations.

Added timer-based summoning queues

Both heroes and minions take time to appear. Minions are summoned and there is a summoning bar that lets you know how finished the current summon is. By using the same summoning queue code, I now have a Village which pops out heroes over time.

Timers seemed like a special case of general triggers. It would be nice to have dwarves pop out of caves if any entities come near or have other similar scripting in the game, but my initial attempt at general triggers might have been trying to do too much. Maybe for another game.

What’s Next?

The game is still silent, so eventually I would like to add some sound effects and music. Animations and special effects would really punch up the visuals, which need a consistent art direction. It’s all functional programmer art and will get replaced.

But the biggest thing left to do is improve the AI. Dragons can attack from distance, yet they still try to run up to the heroes the way melee fighters do. Also, entities tend to bunch up. 10 orcs attacking a hero tend to look like a single orc attacking the hero, and it is hard to see what’s happening.

My initial attempt at solving these problems resulted in unacceptable slowness last week, but I’ve identified what’s going on and think I have a fix for it.

But hey, this is AI work. I already know I can’t expect that I’ll figure it out in a matter of hours or days. There’s going to be a lot of changes, tweaks, and fixes until it looks right.

And besides game development work, there’s the work of marketing and selling the game. There’s a “Stop That Hero!” Facebook page, and I just sent out a newsletter to my list announcing the upcoming release. I’m hoping to get a pre-alpha release out soon.

Categories
Game Design Game Development Geek / Technical Linux Game Development

Stop That Hero! Dev Video: Slimes Throw Chests??

It’s really exciting when I add a feature to Stop That Hero! that I can actually show to someone, and in the last week or so, I’ve added two.

First, slime monsters now leave behind a slime trail. If the Hero steps in the slime trail, he is slowed down temporarily. The slime trail and the slow effect both wear off eventually.

Second, to actually take advantage of the slime trail’s slowing effect, I added projectile weapons. The idea is that the player will strategically send out slimes ahead of stone-throwing orcs or fireball-launching dragons. Their weapons should be more effective against a slowed Hero since they have more time to attack more often.

Once I changed attacks in the combat system to be projectiles, a quick test was to take an existing entity in the game and change its weapon configuration. Since I only had Heroes and slimes, I gave slimes the ability to throw a projectile at the Hero. Instead of attacking from one tile away, they can now attack from 10 tiles away. And to give the projectile an image, I used an existing sprite rather than spend time making something that looks good.

So for this test, it is the Hero versus treasure chest-throwing slimes!

The development video below is a demonstration of the results. Please excuse the lame art. I’m focusing more on the game mechanics/dynamics and less on the aesthetics for now.

I’m pleased to say that it only takes a handful of slimes to defeat the Hero instead of requiring a small army. While it means that my test worked as expected, it also means I’ll need to make some of the Heroes more powerful once I create some orcs or dragons, who should be stronger than the slimes.

Categories
Game Design Game Development Geek / Technical Linux Game Development

Continuing Development on Stop That Hero!

After returning from Europe, I spent over a week dealing with being sick. Even though I couldn’t get back to work right away, I was able to read through all of the advice I received on my post on the importance of speed, and I really appreciate all of the feedback. Thanks, everyone!

In that post, I expressed frustration with how slow my game development has been, especially with Stop That Hero!. I wondered if the project was too much for me at my current skill level, and if I needed to step back and try lifting lighter weights, so to speak. I know some game developers leverage a library of personal code that they have written and updated over the course of years. Others leverage existing engines.

While I have some boilerplate code, it’s not nearly as comprehensive as I would like it to be, and the stuff I do have isn’t always as easy to work with as it should. As I said in that post, 2D engines for GNU/Linux, my development platform, by and large do not exist, so I find I have to write a lot myself. If I had more to leverage, I’m sure development of STH! or any other game would be a lot faster since I wouldn’t have to stop and implement scaffolding technology to support a feature every time. It would already exist.

The advice I received fell into a few camps:

  1. Muscle through and get the game finished. Your tech will be ideal and perfect for YOUR needs.
  2. Stop targeting GNU/Linux and desktops in general as platforms, and focus on more “marketable” platforms.
  3. Stop working in C++, and use Flash/Unity/higher-level programming language/engine instead.
  4. Break your project down into smaller projects so you can have finished games and build your needed tech.
  5. Stop writing your own tech from scratch, and leverage the hell out of libraries/engines/existing source.
  6. Stop worrying about writing “good” code. Hack something together and get it done faster!

I didn’t know whose advice to ignore first! B-) Seriously, though, let me clarify some things about what I’m trying to do.

First, I am not making games just for GNU/Linux, and I never said I would, yet this seems to be a common assumption about my business plan. I am not locking myself to only one platform. My original plan all along was to release games for GNU/Linux, Windows, and Mac. It turns out that ports to mobile platforms, which are a huge opportunity these days, would also be fairly easy, so I went from following supposedly dying tech to being relevant again.

Second, I’m using C++ because it is what I know, and my choice was to make a game or spend time learning a new language to make a game. I chose to go with what I already know, even if it supposedly limits me, because I wanted to start running right away instead of figuring out how to put on my shoes. I can always use the next project to learn a new language if I want to, and switching languages on this project would be way too disruptive and set me back way too much.

Third, because my development platform is GNU/Linux, which makes targeting GNU/Linux dead-simple and a no-brainer, it means that engines like Unity are not options for me. I might be limiting myself in terms of access to premium development tools such as Photoshop and Adobe Flash, but I have been using GNU/Linux exclusively as my main desktop environment for a long time, and I’m not about to start booting into Windows just because most everyone else does. I’ve had to find non-proprietary alternatives for a lot of applications and tools, and I’m doing it for game development as well.

All that said, I think everyone had great advice, whether it was about my tech or my business plan or my development process. Without sales, my savings account is going to get smaller and smaller, and my biggest concern was where I should be focusing my time.

My choices:

  • I could continue to work on Stop That Hero!. I have been discovering how much more complex it is and how much longer it is going to take to finish it, and there’s a worry that by the time it is done, I’ll be out of savings. To make it worse, I’m very much aware that I can’t expect sales to take off just because the game is released. Sales is going to to be a lot of work, and I might not make enough to cover my expenses early on, forcing me to spend time and effort making money in other ways, which takes away from my business. And I’ll admit that I do not know what the reception of this game will be once it hits a real audience, although I do plan to get feedback from play testers once I have something I feel comfortable showing to people, which should help. Still, it might be an unsellable flop that can’t be salvaged no matter what I do. That’s a lot of pressure on this one game.
  • Put STH! on the backburner and work on something smaller. My intention was to work on multiple small games over the course of the year. I’ve since learned more about my capabilities as a game developer and the limitations of my existing tools and tech. Essentially, STH! was not as “small” a game as I originally thought. STH! was meant to be a one-month game project in the first place. Since the schedule has slipped so far, perhaps it is best to cut my losses or at least put the game on hold and work on something I can accomplish in a matter of weeks. I have a couple of Ludum Dare projects that could be candidates for simple games. The diversified portfolio I could create in a matter of months could help reduce risk. If one game doesn’t do well, I’d have another one on the way shortly, and cross-selling might help improve sales. On the other hand, what kind of sales can I expect on a bunch of quickly-produced games that must compete with all of the free and low-priced casual games being produced every day, as opposed to focusing my efforts on my current project? Also, I run the risk of having two unfinished projects since it is possible that a lot of the problems I’ve encountered with STH! could crop up in another project anyway.

If finishing STH! would take two years, and my savings will only hold out for three months, I’d do best by switching to a smaller, faster project in the hopes that I can make at least some income. On the other hand, the race to the bottom in the pricing of games doesn’t provide me with a lot of encouragement to produce small, disposable games. Perhaps the fact that STH! is a bigger project means that the finished product can be something that a fan base could build around.

Since STH! is not a two year project and I expect to finish it before I have to worry about my savings disappearing, I’ve decided to continue working on it. My goal is to get it commercially ready to sell in June.

I did not have a playable game to release yet, but I looked at the remaining features to implement and various ideas I wanted to try, and I started pushing a bunch to Version 2.0. I spent a good chunk of the remainder of April in a self-imposed crunch. I ignored my project planning system, ignored writing for the blog (which explains the lack of posts in the previous month before Ludum Dare), and dedicated as much of my time as I could to making a friends-and-family playable game.

By friends-and-family playable, I mean I wanted to implement enough of Stop That Hero! so that I can hand it to my fiancée or a friend and say, “Here, play it with the understanding that this is an early Alpha version. The graphics suck, there’s no sound, and the game play is raw.”

While that Alpha build isn’t ready yet, I will say that April has been a very productive month, especially considering that I was only able to do all of the work in the final couple of weeks. And since recovering from Ludum Dare #20, I’ve started off May with some quality development time as well.

I’m seeing this project through, and I’m confident Stop That Hero! will be a great game.

Categories
Game Design Game Development Geek / Technical Linux Game Development Personal Development

LD20: Hot Potato Windows Port Now Available!

I updated my final Ludum Dare #20 Jam entry to include a link to the Windows port of Hot Potato. Whew! Now I can get back to working on Stop That Hero!. B-)