People Like Grapes: Project Spikes 21/09 Update

It’s been a week since the last update, and I’ve gotten some feedback on some issues in the game, which I’ve been trying to fix, along with adding new stuff. I present to you the latest update, playable here!


Behold my modelling skills!

I’ve added bunches of grapes around some levels, which restore 50 health to the player. It’s a pretty basic model, which will likely be improved in time. Along with this I’ve added a new type of moving platform, one that stops temporarily after it has moved, before moving again (some have spikes on too. Super hardcore mode activated!), and transparent platforms which are a little harder to navigate.

spikes-13Along with this, there are billboards at the start of some levels that show the user useful information such as controls through use of little pixellated pictures, to aid the player get used to the game. The health counter in the corner has been replaced with a health bar that is centered in the middle of the screen below the lives bar, and also re-sizes itself when the health changes.

I have also added turrets, which take aim at the player if they are in range and fire bullets at them, which in turn damages them.

spikes-14They do need a bit of work done on them to make them a bit better, which will hopefully done in an upcoming update. I’ve also added crouching so that the player can reach into spaces they couldn’t before –  this will be vital in level 3.

This time around there are only three levels, but I’ve made them a bit longer (and hopefully more interesting too), so give it a try, and leave a comment if you have any improvements or bugs you’ve found!


-Grapes, which restore health
-New platforms that have a delay after moving
-Transparent platforms
-Turrets, which shoot bullets at the player
-Billboards to display information
-Health bar

Changed / fixed:
-Levels changed again -  longer, more features
-Spikes now damage the player every half-second while still stood in them

Random Code: Bottomless Pits

Feeling random today, so I’m starting a new series of posts where I give examples of the code I have used in my games, written in Javascript, and for use with Unity. Today I will post some code that will run when the player falls off a level. First you need a collider of some kind placed below the level; make it wide enough so that your player always lands on it when they fall of the level, and as far down as you want (but not so far it will take ages to fall to it). Make sure the collider is a trigger, then attach to it a script containing this code:

function OnTriggerEnter(other: Collider)
    if(other.tag == "Player")
        other.SendMessage("Die", SendMessageOptions.DontRequireReceiver);

This code basically checks if the collider falling into the trigger is tagged “Player”, and if so, it will send the message “Die” to the object, which will call the Die() function in any scripts attached to the player; this is useful for putting some respawn code in the Die() function, so the player gets respawned whenever they fall off the level. If the object isn’t tagged “Player”, then it simply gets destroyed, so enemies and scenery will just disappear rather than fall indefinitely. Just remember to tag your player as “Player”, and then you’re good to go! Also, it would help if someone could tell me why WordPress is colossally bad at letting me indent text, it was a pain to type this post, but I hope it helps anyway.


I’m also making progress with Project Spikes, and another update will come around pretty soon. For now, a teaser image!

spikes-11Yeah, grayscale images ftw! Anyway, happy coding peoples!



Project Spikes: 14/09/13 Update

Play it here!

This update has quite a few new features, so give the game a try –  any feedback is appreciated! Firstly, I added a few coloured skyboxes (a skybox is a textured cube that will appear really far in the distance in your game and surround the game world, like a background), with all of World 1’s levels having a light blue skybox.


This is much better than the really horrible basic blue skybox from before. I’ve also done a bit with the GUI, adding some crosshairs and a lives bar at the top with 5 icons representing one life each. If you collect the secret in the level, another icon will appear in the corner, but I will change this in the future.

spikes-7The crosshairs were added to help players sense the direction they’re facing; I will also be adding a shadow for the player to help in the future. One of the green rectangles turn red when you lose a life. I’ve been doing some optimisation of scripts and some modifying of the levels –  they should be more interesting now. One new addition is platforms that will trigger an event when stood on, for example standing on certain platforms will cause it to be influenced by gravity and will fall until it hits something. This may be used in the future as an obstacle for the player. Along with this I’ve added a button that will also trigger certain events when pressed, such as initiating the movement of platforms.


The playable version this time around has fewer levels than before, but they will be added back in later on. This is because I wanted to improve the levels I already had and thought it would be easier to start from scratch. Plus, every level now has a collectible secret in it. I will also be working on more game mechanics to add in future worlds. Also, if you didn’t click the link at the top, here it is again: play the game!