Cookies help us deliver our services. By using our services, you agree to our use of cookies. Learn more

Tech

Game Dev Diary (Pt. 16) - Black Triangle Days

Posted by Mark Alexander on 25 September 2015

I was complaining the other day on Twitter that I didn't have much to show for all the work that I'd been putting into Skein these last few weeks and someone linked me to this article here on the Rampant Games blog. The tl;dr version is that some devs were all excited about drawing a single black triangle on the screen, and someone else thought that they were exaggerating as drawing a black triangle is nothing particularly special. However, the black triangle symbolised months of behind the scenes programming to get it to render correctly and opened the door for further more complex advances...

This is appropriate for the situation I've been in with Skein this last few weeks, as I've been working very hard on the engine itself, optimising and adding in new systems, but to the outside spectator I've nothing really spectacular to show for it! That doesn't mean I haven't been busy, however, as you'll see...

Abracadabra

Magic plays a fundamental part of my game, with a great deal of the variety in playing coming from the different spells you can find and use. However all magic was available to all players and it made me wonder whether that made the different character classes redundant. I mean, why play a weak wizard if the strong melee class gets the same spells? My first thought was to split the spells into different types of items with a quiver item for ranged characters, an armour item for melee characters and a spell book item for the mage characters, but I quickly realised that this would require a lot of work, both from a programming perspective as well as a graphics perspective. I've been working on this game almost a year already so didn't really want to stretch out the development time any longer, and the current magic setup works beautifully.

 

"If it ain't broke, don't fix it", someone somewhere said once, so rather than "fix" the magic system I simply decided to adapt it by keeping spells in general, but making only certain types available to the player depending on their class. So, no items or anything, just scrolls to pick up, but you can only pick up those that are appropriate to the character. This meant I only had to tweak the pickup code slightly to see which character was doing the pick up.

A knock on effect if this was that it meant I could suddenly add much more strategy into the game! Now, Skein is fundamentally an arcade game (more on this later), which means that I'm not expecting players to think too much while playing. However that doesn't mean that I can't add some depth to the gameplay and let the user discover it for themselves if they want. What am I talking about? Well, by separating out the spells like this, I could now have synergy between characters - where maybe the melee character uses a stun spell, and then the ranger character summons a poison cloud to kill everything that is too stunned to run away - and this will make co-op play far more interesting. I could also make my spells more character related - melee characters now specialise in lighting and critical physical spells, ranged characters specialise in poison and subterfuge spells, while mages will specialise in fire spells with lots of AoE and huge damage values.


All this added an extra layer into the code and also requires me to create a lot of new spells for the player -  the final count should be over a hundred, as I want at least 25 unique spells per class, and then another 25 general spells that all classes can use. Changing the current code to adapt to this idea turned out to be simply a case of changing the pickup and spawn scripts for spells so that only spells appropriate to the characters playing are spawned, but it had the knock on effect of making the code for saving more complex... so time to revise that too!

Saving Revisited

I covered saving the game not long ago, but now had to revise it completely as the spells I was adding included status effects and I wanted them to carry over from level to level. To deal with these I added another dsmap to the player where I made new keys for each of the current status effects, with the value being the time left for them to count down. This map can then be written out as a string and stored in the ini file for the player save.

I took this time to revise other aspects of saving too. Like I mentioned previously, Skein is an arcade game, so I wanted it to play like one! In actual arcade games you can't usually reload a game from a previous point after you've died, but in Skein you could. This felt wrong to me, so I ripped that out and now if you die the saved game file is erased and you have to start again, although if you pause the game and quit, you can come back and start from where you left off - I don't want to penalise my players for having to go take the dog for a walk...


Another detail that I added in at this point was the ability to name each of the characters in the game, individually and have those names saved to a file and so persist over multiple plays. That's twelve names being saved there, as you can name the player one characters independently of the player two characters. You can rip right into the game and ignore this option altogether (characters will simply be named Valkyrie or Warlock, etc...) but these types of touches are what I like to see in a game as they make things more personal, so if I like it I'm sure others do too. I then carried the name over so that when the player dies and their tomb is later robbed, you get a nice message saying "RIP Cecil" (or whatever) which is another detail I liked - and yes, when you die, the level you died on, your gold, and some other stuff are all saved so that if you reach that level again there is a tombstone that can be robbed to get the dead players loot!

Lives That Matter

Up until now, Skein had no lives in it. If you died in 1 player mode, the game was over. If you died in 2 player mode, you could just resurrect - assuming player 2 was still alive - with no real penalty other than having no gold or magic. This didn't seem quite right to me, and so I again started thinking about the arcade roots of the game and how I could improve this. I decided to introduce lives into the game, in the shape of soul-orbs that you can use to resurrect a companion in co-op mode. 


Now, you start the game with one soul orb and you can pick up more on your journey through the Skein, up to a maximum of three. However, you can't use these on yourself - since you're dead - so in one player mode you can still collect them, but if there isn't another player then they are useless. That might seem a bit odd, but it means that at any time in a one player game, a second player can join in, just like another player coming to the arcade machine and adding a coin. This, again, encourages cooperative gameplay, but doesn't actually change the experience for a single player either. If you have no soul orbs left and a player dies, then you'll just have to try your hardest to find one...

Dealing with lives in this way removed the need for any extra menu options and additionally complicated code. My original plan was to have a dedicated one or two player "mode" with menu buttons and distinct saves for each, but that started to get complicated when I decided that I wanted players to be able to join at any time - changing game "modes" just wasn't a simple task. So this arcade approach works perfectly and has greatly simplified the whole 1P/2P business.

Straight To The Action

While playing the game, Mike Dailly pointed out to me another flaw in the gameplay which I've also been fixing - the tutorials, introduction and menus. He pointed out that in an arcade game, you just want to press a couple of buttons and GO, not hang around and read a mountain of text. I mean, really, Skein is about getting loot and killing as many monsters as possible! So, having a tutorial pop-up every time you find something new for the first time breaks the game a little, taking the edge off of the action and generally just gets in the way of having fun.

The menus too were annoying. Yes, they look nice as they all fly in off the bottom of the screen then fade out when finished, but it takes time, and while testing I've even found myself button mashing to try and get past them quicker. If I'm doing it then so will others, so I sped up all my tweens for the menus and they move and fade at double the previous speed, making getting started that bit quicker and the whole thing feels more agile.


Removing the tutorials from the main game doesn't mean that they are gone completely and I decided that I'd make a tutorial dungeon where a new player can go to find out exactly how to play and this tutorial dungeon will be accessible through a main menu option rather than be forced upon the player. What is still forced upon the player is the short introduction I wrote. Even though the game is not an RPG or anything particularly story driven, it does have a story and I think that the player should know about it to help set the mood for the game (and I spent a good long time writing and programming it!). I'm not so stupid as to think that this won't annoy a lot of users, so I also added a skip button and only actually force the introduction the very first time you play. After the very first run of the game, the introduction is automatically skipped and you have to choose to watch it again - a decent compromise I think.

One final tweak to the game menus helped further decrease the time from load to playing, and that was having the game store the last character played and automatically set the player character to it. This change, along with all the others, meant that you can now start a game with just three mouse clicks or button presses, which takes about 5 seconds... much better than the previous way of doing things!

Content, Content, Content!

I feel like I'm getting nearer the end of development of Skein, in so much as the core engine and gameplay are pretty much finished. That doesn't mean however that I haven't still got some ways to go, as what's missing now is content. In a game like this, it's very important to reward the player for progressing with shiny new things and so far my game was very linear. To change this I'll be spending the coming weeks adding more magic, adding more enemies, and designing the first traps to be added into the game as well as some more graphic touches to the rooms. Then comes the difficult task of balancing all this content! I've also decided that this is the right time to launch my <a href="http://steamcommunity.com/sharedfiles/filedetails/?id=519655043" target="blank">Greenlight campaign, which is something I'm both excited about and nervous about... I'll come back and tell you all about it later when it's done...

 

Back to Top