COLUMN: @Play: Introducing Mayflight - Using Roguelike Design Lessons in a Non-Roguelike
September 2, 2010 12:00 PM |
['@ Play' is a monthly column by John Harris which discusses the history, present and future of the Roguelike dungeon exploring genre. This time, John uses this column to introduce his first-ever game project, Mayflight, which uses Roguelike concepts in a platform game.]
NOTE: I've fixed a few bugs and created a new version. The one on YoYoGames' site, linked below, is currently locked at v1.01. A more recent version is available here. Details are given below, behind the fold.
It's been a while since the last @Play column! Sorry for the long delay. I was working very hard on a personal game project. I bring it up because, as luck would have it, that project is the subject of this column....
The months I was MIA I spent working on a personal game development project, called Mayflight. (It's available for download from here. I've put most of a demo playthrough up on YouTube in this playlist.) And in its construction, I ended up using a good number of roguelike design concepts to make a game that no one would mistake for a roguelike.
I'm still recovering from the development process so I need to get back into the swing of things concerning roguelikes (Dungeon Crawl had another major release while I was gone!), but considering that Mayflight uses random area generation and more than a few roguelike design principles, it might be useful and interesting to go over some aspects of the game's design, especially since the game, itself, is not a roguelike, not even in the style of Spelunky, which prizes object interactions.
Some years ago I had an idea for a randomly-generated platformer game. The concept was what we might call non-traditional: there were no enemies, there was no explicit goal, and there was no real purpose to the game.
What was there was a few ideas as to how to create random terrain algorithmically, and the hope that this would be interesting enough by itself. Really, I think it isn't. (I actually think that it can be, but we aren't there yet. I may say more on this later.)
Some time back I registered a copy of YoYoGames' beginners' game development kit Game Maker 8. After poking around with it, I found that it was actually much more powerful than I had expected. One can jettison the annoying "drag an drop" scripting system and use C-like code almost exclusively.
It also maintains the DirectX commands for you, and generally lets you get on with the work of constructing your vision instead of wrestling so much with APIs. I will not say that it is perfect. If you prove the edges of the system you sometimes unexpected problem cases, such as if you try to generate random numbers within a very large range.
It also has real problems concerning keeping code to yourself; as it stands, anyone can take any published Game Maker game and fairly easily get the scripts and resources out of it. However, "real" games have been made with it before, most notably to my mind two games we've mentioned here in the past, Spelunky and Desktop Dungeons.
Around the time I installed Game Maker on a new system, a news post opened up on its greeting screen about a game development contest YoYoGames was sponsoring, "Competition06."
I gathered from the text that they were working on a Game Maker runtime that would be runnable on Playstation Network systems, most notably the PSP. Because of that, the requirements for the contest were fairly restrictive, and geared towards producing games that could run on the PSP. There was some prize money offered, and the theme of the contest was discovery....
Discovery. That got me to thinking about my old random platformer idea, and wondering if it could be adapted. I decided to give it a good, solid attempt. That was the middle of May. The deadline, as I write these words, was six hours ago. After three-and-a-half months of near-obsessive work, the game that I submitted to the contest was Mayflight.
Postponing mortality two seconds at a time
Your character in Mayflight is a fairy named Aurora. She exists in what is almost an infinite world: the game terrain is created algorithmically as you enter rooms. It uses pseudorandom number generator seeding creatively to make its terrain consistent.
Although the structure and graphical look of each room is overwritten in memory the moment you leave it, if you were to return to it in backtracking it can recreate the area just as you had first seen it. The game does store some data on which items you collected in a room and which enemies you killed, so the state of vacated rooms are preserved to a degree.
If it were just Aurora running and flying around a bunch of terrain, even if the graphics were fairly interesting (I think they are; judge for yourself from the screenshots on this article), it still wouldn't be a very interesting game. This isn't a roguelike lesson; it is obvious.
Strong roguelike game designs have one essential element that drives the play, some danger or process that forces the player to keep exploring territory instead of staying in an easily-controllable area and grinding. In many roguelikes this is provided by the food requirement. In Mayflight, this is provided by a harsh time limit. Aurora's species of fairy has a ludicrously short lifespan: she only can survive ten seconds on her own.
To overcome this dire predicament, Aurora can collect "sparks," spinning balls of light that are scattered everywhere in the world with the ubiquity of Mario's coins. Each grants her from 0.5 to two seconds of continued existence. (The amount varies according to time remaining; the more time you have, the less you get.)
Although the collection mechanism is a lot more pressing than having to find a food ration every two or three levels, it is the same idea at heart: to force the player to explore ever more terrain to find time extenders, and in the process stay alive.
However, in Mayflight, the further you explore from the start the rarer sparks become, decreasing the player's time income. Eventually equilibrium will be reached between time gained and time lost, and after that the player will go on a slow march towards oblivion. The player's skill in maneuvering determines where exactly that equilibrium is reached. Too, other dangers will often intercede before that, taking tolls of time both directly and in navigation hazards.
A factor that works in the player's favor is that some places naturally have more sparks than others. In the center of each "area" there is a shrine that always has several sparks, rooms with only a single exit will tend to have more sparks than well-connected rooms as a compensation for hitting a dead-end in the maze, and the rare one-screen-size rooms that are rarely generated always contain lots of sparks, and other powerup items besides.
Maps that may be randomly found in the game give the player an overview of a local area of the maze, and thus allow him to devise strategy about which rooms to visit. The maze generator is purposely imperfect; there are biases in the area structures it creates, and a canny player may take advantage of those to find these special areas with slightly greater frequency. This may be viewed as analogous to the usefully-predictable maze builder in Rogue.
Morbo says your quest is doomed. DOOOOMED!
Randomly-placed goal rooms were originally planned for the game, but time drew short before I could implement them and the other game features that would make them useful to the design. (Work may continue on the game into the future, at a reduced pace, and these things will probably be an early addition.) So the focus of the game is another roguelike borrowing, one that they themselves borrowed from arcade games: the game is played for two types of score, and a high-score table is tracked for each.
One is raw distance from the starting screen, measured in "meters," and the other is a general score that takes into account a few different kinds of accomplishments. I am not actually sure if the score-based design is compelling enough for sustained play; when you're working full-tilt on an idiosyncratic personal project up against a strict deadline, things like this don't always get tested for. It was interesting enough for me to continue play-testing it, at least, enough so that my best distance score is over 1,700 meters, which took about an hour to achieve.
There are not a large number of monster types in the game, although their behaviors vary depending on the difficulty of the current area. In truth, the real challenge of the game is in keeping Aurora alive by collecting sparks, but that isn't varied enough to make a generally-accessible game.
Holding down the Z key allows Aurora to throw "darts" at the monsters, and pressing different arrow keys hurls them at different angles. She can also stomp them, which does a bit more damage but carries with it the risk of getting hit. Later on the monstrous opposition ramps up considerably; in the demo playthrough video given you'll notice times in the later levels where Aurora is swarmed with monsters.
There is a rudimentary physics simulation that both Aurora and the monsters follow. It's not particularly detailed (this is one of the things that I had to wrestle with Game Maker in getting to work), but works for the game. Unfortunately, this is the closest the game comes at the moment to providing a roguelike cause-and-effect system.
The original idea was to provide physics-based traps and tools that could be used against the monsters if triggered creatively, but I couldn't get a more-complete physics system going than this without things getting stuck in walls, clipping weirdly and shooting off towards the stratosphere randomly on contact with each other, despite expending several development days on it.
Engineering an arms race that does something other than escalate
As it is, there is still some of it in place. If Aurora's speed is over a certain level, she becomes invincible. This is shown in the game as a fireball aura that surrounds her. There are several ways to build up enough speed to reach this state. At the start of a game falling from a height is the only thing that will even come close. Once wing strength has been powered up a bit, there come brief flashes of fire from flapping that can immediately slaughter a monster only if timed and aimed exactly right.
As wings continue to get stronger these flashes become longer, and eventually almost continual. Once run speed and jump strength have been improved a bit, jumps made while running at a good clip will produce a streak of fire that will tear through monsters. Eventually just running will provide enough speed to destroy monsters, but the game is balanced that this happens only when max run speed is near or at the top level.
To counter the player's increased avenues for invulnerability, monsters gain much more health towards their most powerful levels, so much that Aurora's stomp and dart attacks become much less useful. The idea is not to provide a linear increase in power on the player and monster's parts so that they are evenly matched through the game.
This may seem to be sensible game design, and certainly a lot of MMORPGs subscribe to this school of design, but it's actually fairly uninteresting. If the opposition is always matched to your level in power, then the game feels exactly the same as you progress, promoting boredom.
At its worst, this thinking has given us RPGs in which the monsters are artificially scaled to the player's level, which I consider to be a grave sign of design decadence. The two approaches are the result of design philosophies that are different at the root: the idea that the game is a set challenge that the player must overcome, and the idea that the game is an interesting experience for the player to have.
Neither is good or bad in itself, but currently the prevailing trend in experience gaming is towards trying to cook the game's challenges in order to always just be slightly beneath the player's ability to overcome, through techniques like level scaling and dynamic difficulty adjustment. I hereby go on record: this is a bad trend. It is treating the player like a pet, trying to induce him to feel powerful through largely artificial means.
To return to Mayflight, the game gives the player more frequent and longer moments of invincibility, but makes monsters much stronger in the elite levels of play so he has to rely on them. This helps Mayflight to feel like its play changes in the later phases of a long game. The roguelike this is most like is Rogue itself, where the monsters get stronger faster than the player so that ultimately he must rely on his accumulated consumable equipment, and sometimes just plain-out running away, to survive.
EDIT: Changes to version 1.02 (Warning: I haven't had a chance to test it yet):
- Empty Zones (which occur when you return to a zone some time after leaving it) now shouldn't slow down the machine and bring it to a halt. Problem (if I understand it right) was caused by overzealous message displaying.
- In highly advanced games (I encountered the problem around 3km) a problem existed in which it was possible for enemies outside the normal difficulty range to be generated. The problem hasn't been found, but it shouldn't be a problem anymore.
- In extremely advanced games, high-powered players can subside entirely on a diet of monster kills. This should still be possible, but has been made slightly more difficult. (Monsters are generally worth a third of a second less bonus time.)
There is so much to talk about concerning Mayflight that I'm splitting it up into two columns. This has been the overview and introduction column. The next one will concern design details, the nitty-gritty of how its levels are constructed, the thinking that went into object placement, and how the backgrounds were constructed.
Most of these things were deeply inspired by roguelikes. After that I should be recovered enough to start up talking about other peoples' games again, and I expect we'll be covering either Baroque for the Wii, the newest version of Dungeon Crawl, or Crawl's special game mode Dungeon Sprint. See you soon!
Categories: Column: At Play








22 Comments
Glad to have you back!
ja | September 2, 2010 12:40 PM
This looks very interesting! (A shame it isn't available for Mac, or I would have tried it out right away.) I'm looking forward to part 2 of the article. I'm developing a game myself with is also based on a huge procedural but constant world (see the blog on my website for more details) and it's always interesting to exchange experiences.
Rune | September 2, 2010 1:46 PM
Only one problem with the game. Man you have to hit the jump button a lot. My hand is in pain after the hour or or I have been playing it.
Otherwise I am finding it very fun. It is much more complex than I originally thought it would be.
The random powerups make each game that I have played play fairly differently each time. And I just love the huge flying bonus that you get when you go above 2 minutes of life left. It is almost like you are a frog jumping around in the air, awesome.
I have only had a game last 20 minutes or so so far, but unfortunately my longest game crashed when I still had a minute left on the clock.
So yea, pretty fun game, and welcome back. It has been a while.
Scott | September 2, 2010 6:20 PM
Scott, what happened when the game crashed? Did you write down the message? I found a crash bug after I submitted the game, I'm not allowed to fix the copy on YoYoGames' site, but I can post a V1.02 to my own webspace or here. It only should affect games that get very VERY far however, we're talking 3K meters or thereabouts. (I discovered this on my personal best game, which probably lasted at least an hour and a half. I'm thinking the game needs a difficulty increase....)
On the jump button: I wanted jump to be the space bar, I really did, but when I changed the jump/fly command to being direction-dependent it wouldn't register some combinations of keypresses. The Z/X/C keys don't seem vulnerable to this, probably because they aren't on the same horizontal line of the keyboard as the arrows, at least on my computer.
There is actually a obscured USB gamepad mode. Press Left Shift+Left Ctrl+G for analog sticks. If that doesn't work, try Left Shift+Left Ctrl+A to switch to using the POV hat, which is what some controllers call a control pad. If you do this, the game will be unresponsive to keyboard unfortunately; press LShift+LCtrl+K to go back to keyboard mode.
John H. | September 2, 2010 9:15 PM
(The controls are not configurable besides using gamepad/POV hat/keyboard. The contest has fairly strict limits on which controls were acceptable unfortunately, and I was working on other features and fixing bugs on this thing almost up to the deadline.)
John H. | September 2, 2010 9:26 PM
Well I was playing along for a pretty long while. I think I probably got to about 250- to maybe 400 meters. I ran into a pretty long dead end. So I had to go around to the other side of the map pretty much.
Now while I was doing this I ran into an empty zone or something. (not sure if that was what it was called. I haven't heard anything about it so it might be a game feature?). It had nothing to pick up in it so I thought I would probably die before I could find a place to pick up any sparks. Well anyways, suddenly it started lagging gradually getting worse and worse. Then froze after it got really bad. I got no error message and had to close up the window.
Also don't worry about the button thing, I was more joking on how surprisingly long(for me) I played the game strait.
Scott | September 2, 2010 11:03 PM
Aaah, you found an Empty Zone!
Those are what happens when you return to an area long after you leave it. The game only remembers item data for the last six areas seen. Older areas are discarded, but the fact that you've been there isn't. Those become "empty zones," which as you determined are dangerous places to be. They aren't well tested, but I don't know what would make them cause slowdowns.
John H. | September 2, 2010 11:12 PM
I should add, Empty Zones are not a bug. They're supposed to be empty. The best thing to do when confronted with one is to backtrack, because you might not survive a trip through one.
John H. | September 3, 2010 1:28 AM
Ok, I had the same problem with the empty zone. It got slow and then the game froze with 100 percent cpu usage.
I left them as soon as possible the next time I played and didn't have any trouble.
I had a lot of fun DBZing around an hour in. I really think the controls, monsters, and combat could use some tweaking though. It doesn't feel smooth. I would sort of like an ending too. Once you get super powerful you should get to burst out of the earth and fight god or something. :)
I got up to 3:00 minutes for a few seconds. Not sure what it did but there was a second powerup point.
Anyway, great job. I'm pretty sure with some tweaking you could sell it. Put it on i-phone or something.
Corey Holcomb-Hockin | September 3, 2010 3:58 AM
Cool, welcome back. I'll have to give this a download and a shot when I get home.
Mike | September 3, 2010 6:12 AM
There are plans for a kind of ending. The theme of the game is exploration, so to win you'd have to find a goal room. The idea is that between areas there would be a kind of global map that shows a number of nearby areas. Some of them would be marked with question-marks, which would indicate an area where special rules applied. Some of those would be goals.
At three minutes the effects are: total invulnerability (all enemy contacts are treated as stomps, Aurora takes no time or stun damage), attack damage (both stomps/contacts and darts) are doubled over normal, and her speed goes up tremendously, to even faster than it can go through collecting the maximum top speed items. The tradeoffs are that, at this level, sparks grant close to the minimum extra time and even enemies aren't worth that much, so it's very hard to remain at that level for long. Also, the two-minute powers -don't- carry over, meaning you have to be more careful about flying. However, if you're good at running and jumping, you can really motor, getting the high-speed fireball on runways and leaping through rows of monsters.
John H. | September 3, 2010 11:23 AM
"At its worst, this thinking has given us RPGs in which the monsters are artificially scaled to the player's level, which I consider to be a grave sign of design decadence."
Arg! Surely this suits Bethesda's RPGs - it increases freedom because you don't HAVE to be a certain level to go anywhere. With specifically levelled monsters you have a much more linear experience (not necessarily actually linear, but definitely *more* linear).
I love you columns but can't see how this is "decadence" on any level?!
Omroth | September 4, 2010 2:10 AM
I'll have to concur - I don't think it's a sign of 'decadence', but an alternative game design technique. Just to name an example I play most days, the MMOG "City of Heroes" relies heavily on instanced 'mission' areas that always contain enemies of about your level, unless you intentionally change your difficulty settings. Furthermore, if you team up with another player, you are auto lowered or raised to the level of whomever owns the current mission, or the team leader otherwise.
However, the strict combat level statistic is only mildly related to actual combat power. A low-level character will not have many superpowers to choose from (it's a superhero game), and they will be poorly-enhanced. Using the level 50 damage scale will not improve the selection or enhancement, and the enemies become MUCH nastier at higher levels on the assumption that you have the tools to handle them.
Not a Roguelike, obviously, but it sounded like you were proclaiming it as a universal game design rule, and I just don't see it. Even Nethack does this a little since monster generation is an average of the dungeon level and your own, after all.
Aliasi | September 4, 2010 7:26 AM
It is decadent in that a game designer is ignoring a fundamental aspect of these types of games, the fact that in adventure games the primary challenge is in overcoming obstacles, in favor of a higher-level benefit, that of ensuring fairness dependent on player state. At best it feels like the game is pulling punches on the player's behalf, at worst it wrecks verisimilitude (as in Oblivion, where opponents mysteriously get stronger just because the player does, like the strengths of the monsters that roam the wilds is mysteriously tied to the combat ability of this one guy), can be shoddily implemented and result in monsters that always overpower players no matter how strong he may become, and (most often in the case of MMORPGs) reduces the opponents in a game to a generally-equivalent gruel of similarly-scaled monsters where it doesn't much matter what you're fighting against, because level matters a lot more to your success than your playing ability.
Nethack does, in fact, do something like this, and I've mentioned it before. I consider it, mostly, to be a flaw of that game.
John H. | September 4, 2010 10:59 AM
The curious thing is, while apparently your starting point was 'exploration based platformer using design techniques learnt from' you wound up with something that, had I been asked without knowing the origins, would have guessed at 'Metroid meets N with algorithmic level design'
Gizensha | September 5, 2010 3:35 PM
Just to get my thought processes out there, I have to admit that I was probably inspired a bit by N as well. I had been planning (and still plan) to add a wall jump feature, just to make the influence a little more concrete.
John H. | September 5, 2010 4:17 PM
The music gets repetitive. It needs more music variation. Sometimes the enemies are too close to the entrance of the next area and hit the player as they're moving vertically to the next zone.
The projectile attack isn't useful enough and wastes time where escaping danger is better. How about enemies leaving sparks when they die?
What about difficult mode where there are traps like webs, destructible barriers, and weather effects.
The concept of dying no matter what is bleak even if most the world is splashed in bright primary colours. Bright but gloomy.
verse | September 6, 2010 1:19 PM
Argh, it's one of those cases where people are never satisfied....
It's a limited-time project with one developer and one busy person providing music. We did what we could with what we had. A later version could well have more music.
The fact that escaping danger is better than attacking is not a bug, it's a feature. Later on, however, it's probably better to kill monsters if you can slay several in rapid succession.
Running into enemies upon changing screens is an unfortunate problem and will probably be fixed a bit in a later release. It's actually better than it was a few days before release, when enemies could be generated right _in_ the entrance....
For a later release I have a large number of extra game modes planned. Really, there should be at least a half-dozen different ways to play the game. One of them could well be one where the difficulty starts out higher. Also, more varied terrain and graphics are definitely on target to be fixed.
On the bleakness contrasting with the bright colors: I _hate_ gloom! Moody art and music has been way overdone lately. Instead, I think the contrast works well. The world should seem awesome and bright so it would be a place Aurora would _want_ to live in, instead of just balling up in a corner and waiting out the clock.
John H. | September 6, 2010 3:16 PM
Eh, it's a fair enough cop to say it can be done poorly - and Oblivion's "bandits in Daedric Armor" flaw was on of the first things player mods went in to fix - but I maintain it can be a highly useful tool in other situations. Take Fallout 3's modified version where only certain areas used it, and the setting remained so no matter how often you went away and returned. While this meant you could game it by visiting every such area at a low level, over a normal, non min-maxing playthrough it meant there was no particular order you needed to visit locations. However, because it wasn't universal, there remained areas that you very definitely should never enter unprepared.
Game design isn't much different from any other artform - there are rules to be followed most of the time, but most of the really good stuff bends a few of them. You don't get a Shadow of the Colossus otherwise, y'know?
Aliasi | September 6, 2010 10:50 PM
It is true, and I've said in the past, that it is difficult to make hard never-do-this rules about game design. And of course it is POSSIBLE to make use of enemy leveling in a way that isn't either condescending to or cheating the player. The system you lay out in Fallout 3 is certainly among the less evil examples I've seen or heard of. However, a really good design might find a way of avoiding even situational enemy level scaling.
Keep in mind, older (better) games that allowed for freeform exploration often used monster strength itself as a way of partitioning out the game world. There is nothing other than monster difficulty that prevents you, in a game like Dragon Quest, from walking right up to (almost) the very gates of the evil Dragonlord's castle itself. The Legend of Zelda, being an action game, is remarkably good at this. A newbie player will be hard-pressed in the early zones, but an advanced player can (carefully) roam all over the map with just the three hearts and wooden sword he gets at the start. This is not a flaw, I think, to let players who have played through before to wander into areas they "shouldn't" be and experience greater challenges. The historical argument against doing this is that newbie players might end up wandering into them accidentally and getting squashed, but that's more a failure of the game to provide other warning of advancing enemy difficulty.
(Your "Shadow of the Colossus" comment seems to be a non-sequitur. What does that game have to do with this, other than being an example of a really good game?)
John H. | September 7, 2010 2:35 PM
Very interesting game and article. Worth the wait!
Edwin | September 7, 2010 10:36 PM
"It is true, and I've said in the past, that it is difficult to make hard never-do-this rules about game design. And of course it is POSSIBLE to make use of enemy leveling in a way that isn't either condescending to or cheating the player. The system you lay out in Fallout 3 is certainly among the less evil examples I've seen or heard of. However, a really good design might find a way of avoiding even situational enemy level scaling."
It's a strange one, for me - It's not so much if the enemies scale to my level/combat abilities that annoys me, it's if it feels like they are doing, though there doesn't seem to be any hard and fast rule of what will cause it to feel like they are doing.
Gizensha | September 8, 2010 11:40 AM