Lasers and Why Gravity is Hard to Change

Just to start with, today won’t have an update, just a sneak peak about upcoming features and stuff I want to add, but will be difficult to implement. First of all, the next update will have a vastly better Laser Gun; much like the previous one improved the Force Gun, with a new animation controller, new model, new everything, I’ve now done the same for the Laser Gun.

spikes-73I’ve also been busy adding lots of scenery to each level. So far all of World 1 is complete, and some of World 2 as well. Basically, I’ve added a roof and some scaffolding-type blocks to make the whole place look more facility-like. Along with that I’ve added some decorative textures that light up and look like they’re moving, but you’ll have to wait and see what they’re like.

Gravity is a constant, and it’s really bugging me *lol puns*

But the main reason why this update’s taking a while is because I want to add a new type of gun, one that switches the direction of gravity. Changing gravity for physics object is literally one line’s code worth of work, but I want to be able to turn the character controller round too, which is proving to be much more difficult. I may just make the gun turn gravity for physics objects around for now, but that’s much less fun than being able to drop down onto a faraway ceiling, which is the feature I’m going for here.

The system doesn’t work

Also I’ve been trying to add a timer and score counter for different types of level and game modes (such as a time trial mode), however I’ve run into trouble with how the system will work. Long story short: it doesn’t. I’m not entirely sure how the score should relate to the time, and how timed levels should be, if I implement them. Also I’m unsure whether any actions you take in the game should give the player points, and if so, which actions. Another problem I had was with the display, as the built-in Unity OnGUI stuff is horrible, but I’m unsure of how to implement my own GUI for this. I’ll have a score system eventually, but if you have any ideas on how to go about it, they’d help a lot.

These are some of the many problems I face when adding new features, such as how to add them, how to make sure everything works, but also how fun it ends up being. Things such as lives, which seemed fun to begin with, ended up detracting from the gameplay a lot, stopping the “one more go” approach to solving puzzles. That’s extremely counter-intuitive, when you think about it. I’m also considering getting rid of gravits, as they also seem to make little sense. Feel free to leave our views on where I should take this below.

13/05/13 Update

Today’s update has been focused a lot on the title screen. Now it has a space themed skybox, with a couple of rotating planets in the background and a stream of asteroids flying past the background. You can also see some dust on the planetoid you are standing on blowing to the left to show you are moving (in reality you aren’t, but it’s a nice effect). There are also two options for starting a game now: continue game and new game. Selecting new game allows you to create a new save slot, starting you off from scratch, and then when you complete levels the number of gems saved is unique to that player. If you select continue, then you can carry off from a previous save. Currently I made 3 slots for saves but I will probably increase that later.

 

unity_platformer_25

unity_platformer_24

 

You can’t see the asteroids much but if you play the game they will be clearer. ¬†Another thing I’ve done is a bit of bug fixing. I found out a while ago that if you die then try to pick up gems, then it won’t work, but now I’ve fixed it so you can still pick up gems. I’ve added more scenery too, in the form of some little houses. They’re basic, but I’m only a beginner so they will be improved in the future.

unity_platformer_23The rainbow is also thinner and doesn’t look wrong when viewed from the side, and I’ve made a better model and effects for the respawn pads. They now sparkle lots when activated, and a little bit when inactive.unity_platformer_22I have also obtained more textures and materials to use on terrain and other game objects. One example is the title screen skybox, which was part of a really high quality space set. The amazing thing is all of the stuff I’ve used to make this game was completely free so far, not a penny has been spent. One day that will have to change, but hopefully not for a while. If you want to try out the game, just download it here, and have fun playing! I’ve left some hints as to what’s coming next, too.

-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