It's all starting to take shape...

Hey guys,

Well this week has been one of the best weeks I feel, as all of the little bits of code I've been working on are all slowly starting to come together :)  And it's starting to feel more like the game I've dreamed of :D

So in this update, I'll be talking about...

  • Adding some functionality to the UI to allow choosing which tournament or level you want to play
  • Finishing off the shadows on the inner walls
  • Storing game progress data

(Spoiler alert...)  There's a video at the end of this post, showing off some of the new features (and hopefully not too many bugs, lol)

Ok, since I've been working on getting the level loading stuff to work recently, it made sense to add a way to choose which tournament/level you wanted to play.  All the hard work on the UI, with the designing and drawing it, had already been done a while back; so all I really had left to do was editing the UI scripts.

First was the script commands to increase/decrease the currently selected tournament ID, and update the display with the new tournament name, text description, icon and show an appropriate number of buttons depending on how many levels the tournament had.

In order to do this, I had to add some more stuff to the tournament data files, thinking of names for the tournaments, and the descriptions.  Fortunately the Icons were something created at the same time, so again, no graphical work was necessary at this time :)

The bit where the button images were changed so the progress bar displayed the level progress was slightly trickier.  For this, I had to come up with a system which could handle extra tournaments being added at a later date (This DLC idea really has been a royal pain in the behind, it's caused so much extra work as none of this is accounted for in any of the design documentation)

Saving this data was straight forward enough, but I seemed to have no end of issues getting the images to display.  I checked everything meticulously, starting with the image ID's, then moving on to checking the values stored in memory, still nothing.  It wasn't until I checked the actual function to load the progress file that I finally found why the images weren't displaying properly...

No wonder it didn't work! lol.  Apparently I'd neglected to write anything to actually load the data in! *sigh*.  It didn't take long to write it though, and eventually I did manage to get the buttons to work.  (Actually, I noticed when I was recording the video below, that the buttons aren't quite finished, as the inverted image remains the padlock, rather than matching the normal image)

I still need to write something to toggle the selected level button, and untoggled the others.  But one thing at a time, I'll add that to the next weeks to do list :)

Here is a picture of the progress bars in the level selection buttons displaying the level progress.  As there is no actual game progression right now, I had to manually edit the progress file to test it.

The last thing I did this week, was finally get the inner wall shadows working!  I'm really pleased with the results, so here's a video to show it off with :)

The original idea was just to use a single shadow tile, and assign one to each wall object.  But as the shadows are transparent, it caused artefacts in the shadows where they overlapped and were darker.

This problem was solved by splitting the original shadow object into 2 halves, and then using all 3 objects to produce the shadow

Using the above patterns, I worked out that the shadow pieces could be placed as following.

  • If the piece on the right is a wall, then give it the LH object 
  • If the piece above is a wall then give it the RH object
  • If there is no piece to the right or above then give it the Whole object
  • If there are pieces to the right and above then there is no need to give it a shadow.

Since I recorded the video I also edited the inner wall shadow colour to match the baked on shadows of the arena walls more.

And that is just about all I have for this week.  I'll be back in a fortnight with more Snakerunner news, so don't forget to check back :)

Until next time :)


Leave a comment

Log in with to leave a comment.