
This was actually way more complicated than I thought it would be, and I cheated by using PlayerPrefs, a separate variable for each level. Like an Angry Birds style game, I wanted to show how many of the 3 stars (they’re actually glowing yellow cubes) you’d collected per level. Again I used PlayerPrefs to store the number of the highest level, and when showing the options (which are disabled by default), activated only the ones needed. When you complete a level it unlocks the next one, which is a staple for games, but saving this and loading it took a while. It sets a variable of “PlayedBefore” to a PlayerPref so it knows not to show it next time. The controls are quite confusing, so I added some instructions which only show for the first time.

Instructions which only show on first play When the player picks up the key, a particle effect appears underneath, and sets a special state, which means that if the player is close to the gate (a collision detection on a trigger) it’ll draw a line to the blue box thingie, and delete the gate. This is just programming, but I’ve tried to write it in a way I’ll reuse in other projects.

I think it looks really cool, especially when combined with the camera shake. There’s also the bloom effect which animates in when the timer is counting down less that 10 second. I’ve not added too many, but have a blur at the top and bottom to simulate a tilt-shift effect (there is a focal blur effect I could use but it seemed a bit complicated and inefficient). Camera effectsĬamera effects can make a scene look really cool. I decided not to bake the scenes in this project too because it was just taking ages, and the baked result at the end of all the processing didn’t look like how I wanted, and it was just taking a long time.Īlso, objects made in Magicavoxel are really inefficient in terms of polycount, and they all have a bottom, back and sides that you won’t ever see, and they sit there adding to the polygon count of the scene, making it take longer to load – something that I really noticed in this project. I freaking love MagicaVoxel, it’s so nice and easy to make stuff, which immediately looks nice in the editor, although when you import into Unity it can look like crap unless you endlessly play around with graphics settings, light, shading, shadow, materials etc. I don’t regret adding this at all, camera shake is awesome! It took a long time to figure out though, even though I got a script that did the actual shaking, making it work with a moving camera was a bit of a challenge. Why aren’t there 100 seconds in a minute?! Camera shake

I had to figure out timing functions, stop it, start it, reset it, even the basics of making it work in seconds rather than decimals because time is stupid. And time is hard! I wanted to have a timer which counts down. So, things I learned for this project: Countdown
Magicavoxel modular building for android#
I feel like the effort / play ratio is way off! 😛ĭownload Escape the sector for Android here So I’ve spent a long time on Escape the sector, which is unfortunate because if you actually play it all the way through, 6 levels lasting 2 minutes it’ll only take you 12 minutes. Ok, this might not be of much interest to anyone other than me, but as I’ve been writing other stuff about my game here, it seems like a good place to put it.
