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

05/05/13 Update

Today I’ve been working on a few things, wrapping up a few loose ends and things I’ve been a bit behind on finishing. The first thing I’ve done is (finally) add amethysts. I tried before and for some reason the mesh didn’t look right when I imported from Blender to Unity, but I’ve played around with a few settings and it’s fixed now.

unity_platformer_16They look more transparent than the other 5 types of gem, but that’s by no means a bad thing. The colour of these amethysts is pretty darn cool, and they sparkle well. I’ve now added sparkles to every gem, too.

The main thing I’ve been working on in this update are the portals. I’ve added a proper portal frame and a few decorations to go with it.

unity_platformer_13The frame is basic, but it’s a damn sight better than the red cube I had before. The particles move both up and down, giving an awesome portal-y effect. The lights and the particles only become active when the player has enough gems to use the portal, which took quite a bit of programming for a newbie like me. It works really well, and I’ve included some really small details like the lights gradually brightening rather than becoming live instantaneously. You can see the difference between the on-state and off-state portals in this picture:

unity_platformer_15I started to add bits of scenery in the game today too. It isn’t much, but I added huge versions of the gems on a hillside.

unity_platformer_14You can jump on these gems and climb over them without them being picked up. You can see some of the smaller details on the gems much better like this. I also worked on trees today, but with limited textures, I didn’t get far before realising the need to find more varied textures, or make my own. I will try to find more textures so I can create a more varied forest of trees, as I want that kind of variety in my game.

I worked on a little cube that emits gems today too. The script for this picks two random numbers between 0 and 1, and depending on the results, spits out a random gem (or doesn’t, depending on the number chosen). This is the basis for the crates I will add, which will be breakable and will release gems upon destruction. The cube I have added will only spit them out at random and is not yet destructible, however.

unity_platformer_17

I will tone down the rate of emission for the playable download, as too many gems could potentially crash your computer. I had a few thousand rolling about, and my FPS decreased quite a lot, so it’s best, for testing purposes, to limit this. If you want to try it out, you can download it from my Dropbox, and if you want to see my video on this update, just go to my YouTube channel. Thanks for reading, and I hope you have fun playing!

-Daniel

04/05/13 Update

I’ve done more tweaking of the gems, and I’ve now added some sparkles to each gem, to make them a bit more pretty. I’ve also added one more gem, the diamond.unity_gems_5These are really sparkly, and this is something I will transfer to all the other gems next. The shape of the diamonds is quite cool, as the light reflects off them in a really cool way. Diamonds are worth 10 gems, making them extremely valuable to collect, but also they will be rarer in the final game. This now means there are 5 gems with the upgraded models I’m using.

unity_gems_all_2Another thing I’ve done is to upgrade the colliders of the gems from sphere colliders to mesh colliders. With the old sphere colliders, gems would occasionally roll around indefinitely and fall off the level, but now they will rest on their edge, which is a lot more realistic and looks much better.

unity_platformer_11This means gems can be found on their side or upside-down, although the default position of the gems in the game will be face-up. All this means is that they can be deflected across the level from an explosion and land in a realistic position. The way I tested this was by putting many gems in two containers,  with one container filled with gems with the sphere collider, the other with mesh colliders, then starting the game. As they fall from the container, the sphere collider gems roll out in all directions indefinitely, but the mesh collider gems land in a neat pile.

unity_platformer_12This works really well, and now all the gems have mesh colliders. You can see this happen in the YouTube video I produced about this update. I will start to do video updates along with some of these blog updates, to show what I mean in more detail. Download the game here and give it a go, feel free to give feedback or ideas what I could do next. I will be working on trees later, so there should be another update relatively soon. That’s it for today, thanks for reading.

-Daniel