Saving, Loading, Texturing, Awesomeness – Project Spikes 08/04

spikes-84

Saving and Loading

The big feature for this week’s update is saving and loading. Along with this comes a standalone version of the game, as the Web Player doesn’t allow for files to be saved to disk on the user’s system. The standalone versions for Windows, Mac and Linux can be found on my IndieDB page dedicated to the game, and as always you can play the Web Player version in the usual place, however this won’t be able to save your progress and might be phased out in later updates. It’ll stay here for a while, as it’s a quick and easy way to test the game. Right now, the levels you’ve completed and the secret cubes you’ve collected will be saved, but as I make progress with the game, more stuff will inevitably need to be saved. The .dat file is saved in what Unity calls the ‘persistent data path’ – on Windows, that’s “Users/[user]/AppData/LocalLow/danielthenerdyguy/Project Spikes”. To save, there’s a button on the pause menu, it’s as easy as that. Plus on the standalone version’s start menu, there’s now a quit button that shuts down the game window. I watched a Unity live tutorial for the saving and loading stuff, and if you’re looking for a way to save stuff to disk on your game, I strongly recommend you watch it too.

spikes-81

New Textures and models

Also, this update I’ve added many new textures, just to make the game feel a bit fresher.

spikes-82

Not all of them are really in the game fully yet, but they will be added at some point. All except the top-left and top-center are present somewhere in the hub world, so look around for them. I used the two with loads of lines crossed all over it in a section of the hub ship to look like parts of the wall have been torn off, and you can pick up the tiles on the floor next to it in the same way as you’d pick up a cube. Which brings me to another point: you can now rotate stuff you’re holding with the force gun. I struggled to find a nice control scheme for this, but I settled on ijkl in the end, so in a similar fashion to wasd, i/k will rotate the cube up/down, and j/l will rotate it left/right. The particle effect for activating a powerup is much better now too – it’s basically the same thing, but more in-your-face. And there’s now a new triangular type of wall that solves some issues I was having with stairs, which I’ll be rolling out to other levels soon.

spikes-83

General other stuff

The Hub World is pretty much complete on the whole, albeit without a new skybox, which I’m planning to make by next update to match the new space/sci-fi theme for the hub. There hasn’t been much progress with actual levels recently, but I’ll get back to properly doing them in the near future hopefully. I’ve also experimented with new types of cube – you’ll find a few new red cubes in the level selection corridor, to the right of the door. These cube spin on one axis, so in future puzzles, they can be used for swing bridges that spin when cubes fall on them.

spikes-85

The future!

I’ve been working on a brand new gun that fires explosive bullets, and it’s working so well right now. The actual concept is in place, and soon I’ll be making the actual model for the gun. Along with this, I’ll implement an animation system for the gravity gun. The new gun will be an enhancement and replacement for the vapourising/destruction gun, as it doesn’t really have many uses.

That’s it for the latest update. On IndieDB I’ve created a forum where you can post your ideas and feedback, as well as report bugs and ask for help. Have fun playing!

10/05/13 Update- Saving and loading

unity_platformer_18

I’ve done more work on my game over the past few days, and I’ve got an automatic saving and loading system working. This is a great achievement considering I’m not at all advanced at programming, and I’m pleased with how it works. Now, when you enter a portal, and therefore complete a level, your record number of gems is saved. This means you won’t lose all of your progress every time you exit a level, and any levels you’ve unlocked (i.e. if you have had enough gems to enter the level before) will remain unlocked. So that means you don’t have to collect loads of every gems in the hub world every time you want to go into Level 1, for example.

The record number of gems for the level you’re in is displayed in the corner, which is useful to tell you that you need more gems. Soon I will add a counter to tell you how many gems the level contains, but since there’s just a random assortment of gems in the level so far, that’s a rather pointless thing to add at the moment.

unity_platformer_21I’ve finally added some better, more colourful trees too. I had a play around with Blender too, and came up with some really basic scenery such as a bridge and this awesome rainbow (which looks a little weird when viewed from the side, but I’ll fix that). This rainbow is just a circle, cut in half, then I divided it into seven bands and added coloured textures to it. It look pretty cool in the game, along with another thing I added: more trees! These are simply re-textured leaves, coloured a nice dark pink. They look pretty awesome.

unity_platformer_trees_2The shape of the pinky-red trees are different, but ultimately the texture is the same as the green trees, just re-coloured. But they look awesome. I’ve also started work on another level, which will eventually be a volcano level with a rocky environment around it. You need 200 gems in the hub world to access it currently, but there’s plenty in the level so you shouldn’t have a problem.

unity_platformer_20There’s not much currently here, but it will hopefully evolve into a more detailed world. The game accurately keeps track of your highest gem record in this world too. I will add a transition level at some point between entering worlds, that may come next. I haven’t made a video on this update, but you can still download the .exe file for this to play around with it and give feedback or any ideas you have. Thanks for reading!

-Daniel