So this is my 3rd game made in Unity. I chose a silly subject so that I could be experimental without getting too serious about the project. Unfortunately though it’s taken me AGES to finish and I’ve put quite a bit of effort in (see my other post “I’m literally polishing a turd”).
I said in my last article that the last 10% takes 90% of the time, and it definitely felt like that for this project. Doing simple things to finish the game has taken a long time. The intro, the message at the end when you complete the game, and the start menu, all took far longer than I was expecting. And tbh it’s irritated me how difficult those things are to do in Unity compared to Flash (which I used to use to make games – although that was many years ago), although this could just be my imagination and I’m looking back with rose tinted glasses, but I did seem to make progress faster in Flash, despite it’s flaws, (and everyone I know giving it a lot of hate these days).
Play the game!
Okay so if you do what to play this game, you can play it in the browser on Newgrounds.com here.
(It has to be Firefox tho, as Chrome has killed the Unity plugin. Grr!)
I also made a downloadable windows version as many people won’t have Firefox. I’m quite pleased with this because I used free software called Inno which creates an installer.
Download the windows version from IndieDb here.
Download the Mac version from IndieDb here.
Intro & end screen
So I wanted to show text in sequence, and the user can page through these by clicking. Simple right? Sounds easy right? I can write a script that does that by putting the text in an array, or at least a reference to the UI text on screen, and hide/show them when needed. And another script to fade the text in/out. Problem is I don’t have the patience to do all this manually on Unity script. It should be a solved problem! It’s actually be easier to do this in HTML, and whenever I start thinking stuff like that, I panic. Then start thinking I’m doing the entire project wrong and I should be doing it differently. Then I get into a sort of spiral which sends me crazy.
I end up thinking a bit too long about stuff when I should just be getting it done. Like this…
Anyway I settled on unhiding text in sequence for the intro (couldn’t be bothered to fade it), and a movie credits style scrolling text for the intro which was easier than mucking about with timing text to come on at the right moment, or clicking through with the mouse. That’s sort of thing would be easier in Flash, but I had to put that out of my mind or I’d go crazy and want to start the entire project over!
Making it reusable and open-source
Most of these scripts will be reusable in other projects. I’ve even put them on github in a public repo in case anyone else can make use of it.
But mostly that’s just a handy and searchable place for me to keep it backed up!
Anyway I’ve learned a lot. Here’s what I’ve focussed on:
- Unity’s canvas UI items, and hiding/showing panels.
- Fading the screen in/out
- Loading new levels & initialising them (I might do this differently next time though)
- Loading dynamic elements from resources
- Sound effects and music, and changing the music on the fly.
I’m glad to finish this project and move on to the next idea!
Oh btw, I got a review – Yes ONE REVIEW! See it here.