Monday, November 21, 2011

Stage Game Jam Post-Mortem

I'm taking a little detour from design analysis to share some insight on design, programming and project planning of our game jam project from last weekend. It's mostly going to be programming though, and mostly don'ts - we didn't finish the project in time. We got quite close though, so I'll come back to the design once some final bugs have been squashed and some levels have been created for the game.

I'll try to add some pictures soonish...

1. Scoping


I've game jammed successfully twice this year. Both games were in fact quite good. They were also very well scoped down, and thus finished. This time around, I decided to take more risks with the scoping, and also do stuff I've totally not done before. This project definitely ramped the challenge up from the last two as evidenced by the fact that we were unable to finish in time with three full-time programmers and one apprentice. We had three main tasks: gameplay engine (it was a platformer with some twists), graphical effects and sound system. None of these were trivial, and no one in our team had really done anything of the stuff they were going to work on. I was in charge of the gameplay engine since we were developing with a library that I was the most familiar with.

Nevertheless, I think the scoping was realistic. In fact, I think our effective working time per person was less than 20 hours - clearly less than what I've had in previous game jams. Ultimately, we were not very far from first playable level. We had some minor bugs, some of them ignorable with level design. What we really lacked was levels. Kind of hard to show any gameplay with them. However, looking at the list of what we actually did build, it's fair to say we did really well. Here are some highlights: isometric platformer with climbing instead of jumping, sound system complete with radio channels and static between them, knobs for tuning frequencies and level elements affected by these frequencies, and finally, enough high quality art for a few levels.

On with the lessons...

2. Lesson: JavaScript with sleep-deprivation is bad


Okay, I think this for me personally was the biggest factor hindering development. I was already tired on Saturday morning when we started actual work, and around 8pm I was way too tired. Programming anything should not be done tired, but JavaScript is special. It's really easy to make invisible errors with JS and tracking them down is really freaking annoying. Moreover so when tired. When tired, it's increasingly hard to escape one's thought patterns, leading to looking over the same piece of code all over again because "the error has to be here somewhere" when ultimately it is not. JavaScript has this annoying tendency to quietly accept almost anything. Between Sat 8pm and Sun 2am I really didn't get that much done, but I did get really annoyed. Hindsight: I should've left around 10pm and come back earlier on Sunday.

3. Lesson: even when used as constants, magic numbers are still really bad


This one was my biggest personal failing, since I can't really blame any of the tools on this one. 2D-programming is often riddled with all sorts of offsets, margins and whatnot, because of the way sprites are handled. This is especially true for isometric 2D as sprites can hide behind each other, and characters are not standing on top of floor sprites but in the middle instead. All sorts of constants. The mistake I made was basically that I did not have any system, I just made estimations for each value using Stetson-Harrison, and at some point the entire system just crashed down on me hard. So hard in fact that I was only able to recover the situation on Sunday morning after a night's sleep. In the end, I did it right in about two hours and now the system makes a lot more sense. I also actually measured all the offsets from the sprites (this would have been impossible earlier though, since the sprites were not finished and we hadn't really agreed on any specific measurements).

4. Lesson: isometric graphics in a platformer = way more trouble than it's worth


When we started out I was thinking about simple side-view 2D. However I didn't communicate this clearly enough, and our artist started with isometric graphics, and me, not realizing what a pain that would end up becoming, okayed it since it did look pretty damn good. What a big big mistake. See, one of the biggest problems is that while in side-view 2D collision detection is easy, with isometric it is not because the sprite size is not equal to the space it takes in the game's internal logic. To further complicate the issue, the library we were using did not support custom hitboxes for collision detection for both parties. Since none of our sprites were equals of their hitboxes, there was trouble. Unfortunately even more so, because I tried to figure my way out of this mess with offsets and margins.

Another problem with isometry is the z-order of sprites. For example, when on the left side of an obstacle, the player sprite has to be behind it, but when on the right side, it needs to be in front. This got even trickier when we chose to use climbing instead of jumping (a sound decision, jumping in a horror game does look a little silly). During climbing from the left side, part of the player sprite needs to be in front of the obstacle (the top half, which is above the obstacle) while the rest is behind. This was solved by splitting the player sprite in two parts during climbing, and was not that hard in the end. Another consequence of climbing is that the sprite can only climb a given fixed height without making the animation look stupid. This is just a level design issue though, and indeed most platformers have their level elements placed on square grids anyway.

Later on I also realized that this is going to come back to haunt us with our ghost enemies, because they can move through everything in the game. It's going to be pretty damn painful to figure out a system where they can at the same time be in front and behind objects...

5. Lesson: plan for earlier integration


Three programmers working separately is okay, especially with version control. However, I would advise planning for integration at milestones, not just the end. It's really crushing to motivation sometimes to only see your part of the game nearing completion, and never getting a glimpse of the end result until, well, the end. We did this mistake in the last game jam where we literally had no idea if the game idea would ever work before it was about one hour away from complete. Fortunately it did work... This time around, since we had no time to make any actual gameplay, I'm still not sure if this idea actually works. So yeah, the old wisdom of prototyping early should be followed in game jams as well.

Conclusion


I guess that covers it for now. As promised, I'll get back to design after I have had the chance to make some gameplay. The game will be released online and be playable without any special plugins, so you can hopefully see the end result for yourselves as well.

Thursday, November 17, 2011

Dark Souls

Since I spent all of my free time for over a month playing this game, I suppose I should share my perspective of it. A lot of these points apply for Demon's Souls alike - after all, they are mostly the same game. In case you don't know, both Souls are famous for being ridiculously difficult (on today's standards) fantasy action roleplaying games. That, and very high quality gameplay.

1. Feeling of danger through difficulty


Being ridiculously difficult is not just a thing in the Souls games, it's a core part of their essence. These games are certainly tests of patience, but that's not all there is to it. Difficulty introduces some serious feeling of danger to exploration. Nothing in Dark Souls is to be taken lightly because even the most rank and file enemies can slice through a careless player in seconds. Entering a new territory is always a bit unnerving because death lurks quite literally around every corner. The suspense is often more than most horror games have at their best moments, and Dark Souls is not even competing in that genre.

Even the most difficult enemies would not be much without a threat of serious loss. The immediate effect of dying in Dark Souls is to have to return to the last bonfire rested at (think checkpoints) and have all the enemies respawned. That, and leaving all your unspent souls (experience and currency) and humanity (another resource) behind with your bloodstain. The final catch is that not only you have to defeat all those enemies again, should you fail to reach your bloodstain, everything is gone. That can hurt. A lot. It really doesn't help that when a lot is at stake, it's easy to lose courage and change fighting style to more conservative. Again, wise in many games, but often a grave mistake in Dark Souls.

High difficulty and a lot at stake are in fact both key elements for creating a real feeling of danger, and this is where horror games often fail. Furthermore, in Dark Souls there is no taking back, because the backstory allows the protagonist of the game die and revive. The game saves constantly whenever something happens, and that way doesn't allow for second chances. Whatever you do, you have to live with. I got a good taste of this when I was swinging a big sword a bit too close to an NPC and accidentally hit her, making her aggressive. There went my ability to buy miracles for the rest of the playthrough.

2. Fair game mechanics


Although the shouts from my apartment at 2 am might suggest otherwise, Dark Souls is in fact overall a really fair game. Sure, it takes a lot away from you if you fail, but there's not much else to blame than yourself when it happens. The rare moments when it doesn't feel particularly fair are those few when From Software is really testing the limits of the word. Most of these are simply the player being stubborn and not adjusting their tactics but a few times From Software crosses the line. My "favorite" would probably be one boss where you are facing a ratlike demon, armed with two big-ass swords and accompanied by a couple of dogs, in a room approximately the size of your kitchen. Try and evade... and don't even dream of blocking.

The game focuses a lot around combat, and on the surface the system is quite simple. There are not scores of different attacks, just a few for each weapon. Defense is handled by movement and blocking. The key thing is quite simple: (almost) polygon-perfect hit detection. Evading blows by careful movement can be done with confidence. Simply put, if the attack visibly does not connect, it misses. There are no magic hitboxes that would make attacks that seem to miss actually hit, and nothing is random. It's up to the player to learn the reach of every attack so that they can effectively position themselves in all situations. There is not much else in the system really, neither is there need for more.

The system encourages two things: careful observation (read: patience) and confidence. Impatiently attacking when there is no window to attack is suicide. Having too little confidence in one's own judgement leads to never being able to attack, and ultimately making a mistake such as backing off a cliff. Curiously, this is quite close to what actual melee fighting feels like (based on my 2 years experience of fencing), except for the cliff part. In fact, of all the games I've played, Dark Souls feels the most like actual dueling, although it doesn't look like it. So yeah, cowering behind a shield is not a strong tactic in Dark Souls, and against many enemies, their attacks need to be dodged by rolling towards them.

3. Making enemies difficult - the right way


This one is quite simple. Most of the enemies in Dark Souls don't have a lot of hit points, but they do a whole lot of damage. Often they are also fairly hard to hit safely, especially if facing more than one at a time. I like this paradigm of enemy design, as it makes for interesting but short fights instead of boring slugfests. This way also not all enemies are defeated the same way, which is always fresh. In general, high hit points should only ever be allowed for some boss fights, and even in them used sparingly. From Software clearly understands it, and Dark Souls is a better game for it.

4. Doing healing right


Another interesting thing done right in Dark Souls, and one of its biggest improvements over Demon's Souls, is the way healing is handled. The player holds a flask that can initially be used 5 times for healing. The flask can be recharged at bonfires. The system successfully defeats the common problems of item based healing: farming and having too many (which makes all taken damage trivial). Healing also takes some time, and the AI now clearly reacts by charging forward as fast as possible as soon as the player tries to take a sip. Just like everything else in the game, healing mid-combat is a risk.

5. Innovative on/off multiplayer


Another thing the Souls are famous for is their multiplayer system. The games are and are not multiplayer, and players can choose how much they want to take part in online activities. There are two online aspects: passive and active. All players partake in the passive online experience. This means seeing ghosts of other players in their own game world, seeing messages left by others (and writing their own) and being able to touch bloodstains left by others to see their last seconds before dying (and maybe avoiding the same fate). These are all interesting features and especially the messages allow players to lend a hand to others by giving hints and warnings. The message system is console friendly and allows only selection of message template and keywords from lists. This also evades the issues of verbal abuse.

Even more interesting is the active online content. Explained very briefly, players can visit each others' games under certain conditions either as helpers or invaders. While especially the invasion concept sounds a bit catastrophic, players can opt out of all this simply by not being in human form. However, in order to benefit from the aid of others, human form is also needed, which opens the host to invaders as well. What is cool about this whole system is that it's integrated into the single player experience. If I want to help, I'll draw my summoning symbol, go off to fight my own baddies and see if I get summoned. The same mostly goes for invasion: I start the invasion process, keep doing my thing and if an opponent is found, I'm summoned to their world.

I liked especially the helping concept. As was said, the game is tough. Really tough. While I myself am stubborn enough to want to defeat everything by myself, a lot of other people can really use a hand in some of the tightest spots in the game. As a helper, you get to play the role of a protector and it becomes your task to see that the host gets the next boss down successfully. I also like how the game puts a lot of limits on communication since players can only do gestures. There is something in these brief encounters where you just appear into someone's virtual life for a while, shield them from harm the best you can and then when you get the boss down together, you part ways. I really like this concept. It also sounds a bit like what Jenova Chen's next game Journey will be about.

I'm not much of a griefer, so invading the worlds of others has less appeal to me, although I do enjoy a fair duel. In Dark Souls, the introduction of covenants makes this a bit more interesting because now there are more ways to invade. I especially like the covenant whose members are summoned to fight against sinners (players that have been indicted in one way or another). Overall the covenants make player vs player somewhat more interesting. Still  I feel they have a lot more potential that wasn't fully realized in Dark Souls. Maybe next time? The biggest thorn in pvp's side at the moment is...

6. Careful with the balance


Unfortunately Dark Souls has some serious balance issues at the moment. Before going in, let it be noted that the next patch, already out in Japan, seems to address every single issue. So although irrelevant in the near future, I find it useful to highlight some of the biggest mistakes. I'm going to skip the glitches as these are honest errors, not design choices. Pvp in Dark Souls contains a lot of movement and the most clearly imbalanced tactics reduce the opponent's abilities to move. One ring makes the wearer untargettable, which in the game's terms means it's really hard to face the right way when fighting them. The worst offender however is a spell that makes everyone else around you move a lot slower and unable to dodge roll.

Another thing that's screwed up is weapon balance: elemental weapons that do not have their damage depend on the wielder's stats are far too good, most of the time stronger than stat-dependent weapons wielded with high stats. In a game that supposedly has a huge variety of tactics, making one type of weapon a no-brainer selection certainly hurts balance. Finally there's poise, a concept that is new in Dark Souls. Heavy armor grants you poise points, and poise reduces stagger from attacks. The introduction of the concept is a sound idea since heavy armor in Demon's Souls was crap as it slowed down movement too much. However, poise in pvp is not particularly cool. Fighting someone with high poise is frustrating because they will never stagger, which means even when you hit them, that doesn't stop their attack. Of course there are tactics against high poise, but in general I think it reduces tactical variety.

Single player game is also hurt by the imbalance, because at the moment there are some tactics that are vastly superior. Wearing heavy armor and casting Iron Flesh is one, as it makes even bosses do negligible damage, and they cannot even stagger you. There's also a shield that can throw a projectile that does ridiculous damage. They also introduced pyromancy, which is a form of magic that doesn't depend on any stats but is nevertheless equally powerful. This is bad as it devalues stat-based magic and makes high damage magic projectiles available to any build. Unsurprisingly, the next patch tones pyromancy power down. They also repeated one mistake from Demon's Souls, which is the access to a really good weapon that surpasses everything by the time of its earliest acquisition and for a good while afterwards.

While in single player it's always possible to choose not to use any of the overpowered tactics, I feel it is frustrating that at the moment there exists one clearly superior build (pour everything into two vitality and endurance, use elemental weapons and pyromancy) that other builds will never match. It's also kind of annoying to know, after dying for the Nth time against the same boss, that if only I used some of the OP tactics, this would be ridiculously easy. It also takes something away from the game's reputation. Like, this game is very difficult *unless* you know this and that trick in which case it in fact becomes pretty easy.

Conclusion
Dark Souls is a very successful design effort in many ways. It has the best combat system of any action RPGs I have played (well, tied with Demon's Souls obviously). It creates the feeling of danger more effectively than most horror games exactly because it is difficult. It has a multiplayer system that I actually want to play, as it is so strongly integrated into the single player experience. On top of everything else, the game has a world well worth exploration. The only flaw with the game at the moment are its balance issues, which are going to get fixed real soon, and some performance issues. Dark Souls demands attention and patience but it also rewards in kind.