So I've been Gloob'n it up for a little while now, and I've gotten a fair share of tasks completed. Apparently, there was some progress stagnation before I joined up, and I was the breath of fresh air that the group needed for a nice motivation boost. Which makes me feel all bubbly inside. In this post, I'll touch on the tasks that I've completed so far in Gloobs. Since I've been there for a little while, this might be larger than furute posts, so it gets numbers 0 & 1.
1. Wheel of Gloobs
When I started to dig in, I discovered someone had already started on the project. However, it was... pretty janky (in my opinion). The way they were doing it was to have the diamond pointer at the top "read" the object it was touching. Which meant they needed the wheel to be separated into segments and re-aligned into a circle in-editor. Then each segment would need a script attached to it hold the values of itself. It would probably work, but that setup seemed messy, hard to organize, and had the possibility for the wheel segments to have ugly gaps in it and cause the diamond pointer point at nothing. So I started this one from scratch. I'm not in the habit of deleting old things (even though we're using a repository), so I threw the old scripts into some dusty folder that needed some love and set off.
My implementation only has 2 parts. The wheel and the manager. Technically, there are 3 wheels, the main colorful wheel above and 2 silver multiplier wheels.
I made a generic WOG_Wheel script that could accommodate these and just tell whoever asked what the top prize is. This script asked for how many prize slots there were, and if they were all the same size. If yes, life is easy. Each slot is the same size, so a simple equation would discover which prize tab was on top.
return wheelZones[Mathf.FloorToInt(zRotation/anglePerZone)];
Nice and easy. But there are two problems that need addressed. One I've mentioned, The other though is a little less obvious.
- What about tabs that are different sizes (see the gold tab on the silver wheel above).
- The wheel GameObject starts at Rotation=0. But the pointer is in center of the tab. So the actual rotation is not 0, it is halfway through the first tab. So we have to compensate. And this only got stickier when you have tabs of different sizes.
I should note, the gold sector of the wheel is NOT the only sector with an adjusted size. The two "x1" sectors gave up a part of themselves to make the gold area, therefore they are also smaller than the rest of the sectors.
I'm sure other people have solved this issue before, and perhaps more cleanly than I, but I like my solution. In the WOG_Wheel script i made a struct that could be edited in the Inspector for each wheel tab. This struct contained what the prize of the tab was (using an Enum, just to be safe from typos [such as "type='prize_multipleir']), it's value (allowing for different tabs of the same prize to have different values), and its "altered angle size" or AAS (internal angle of this particular circle sector). The AAS is hard to find from Unity, I had to make a small snippet that printed out the circle's current angle and do some math at different angles to get the right numbers. However, these adjusted angles are the only ones you have to worry about, and the script will fill in the rest of the mathematically correct sizes.
The manager is more complex, but easier to describe. It manages which wheel is active, which state of movement it was in (spinning, idle, or coming/going), told wheel when to spin (via player input), and awarded the prizes to the player. The hardest part was getting the wheel to spin in the correct direction relating to your finger.
2. A Resource System
Each time you started the game, you would just be assigned something like 500 GEL and 10 gold, the in-game currencies. This is obviously a problem because if someone works hard to get their points, and then stop playing, they reset to those base numbers. So I dug into PlayerPrefs and saved them. In order to keep them safe, we looked at 2 options.
- Use a 3rd party PlayerPref Encryption
- Do it ourselves
We tried some 3rd Party things, but they are a little slow for mobile. So I did it myself. It isn't Apple quality encryption (But the Government doesn;t want to crack our phone game). I won't go into any details about how I implemented this security for obvious reasons, but it'll keep the script kiddies away, and those who want a (little) challenge can try to break it. If you do break it, come tell me about it, I'd like to know.
3. A loading Screen + Mini Game
For those who didn't know, Loading Screen mini games are no longer patented. So I thought this would be a good opportunity to make use of that little fact. I have plans for at least two more potential games that could appear when the game loads. For now, I have one implemented for the Beta release.
![]() |
You don't appreciate how hard it was to take this screen shot |
It's simple enough: tap the GEL, Nommy eats it, you get points, and that GEL is added to your GEL Reserves. It's simple, and honestly pretty addicting. Although it is pretty hard to do with a mouse.
4. A Better Tutorial
There was already a tutorial for Gloobs when I got there. But it was pretty linear, and easily disrupted. So they wanted a better system, and I jumped on the case. In the making of it, I reduced the number of gameobject in use, made it completely discovery based, and attempted to made it "fool proof".
As I said, the old version was very linear, having the player follow instructions to make their first Gloob. But it didn't explain anything, and you get stuck at certain points. I restructured it to be less linear, more discovery-based. The only thing we really instruct is "This is the tool that does things" (in the corner) and "this is how you interact" (touch it). Then you're off! When you click on something new, you get a quick few lines of info, and your back to the game! To help with debugging, I also made a quick-n-dirty editor to show which tutorial flags had been triggered or not. This window causes some bugs when compiling the game, but that's fine, we just delete it when we make the builds and SVN puts it right back when we want it.
That's all for now. I have added some other things as well. Better keyframes, reorganizing some HUD pieces, etc. But they are small and mostly just visually pleasing. Lemme know if you've read this, or what you think of Gloobs, me, or if there is anything lacking with my writing style.
UPDATE ABOUT OTHER THINGS
We have an ongoing AMA on Reddit. Feel free to stop by and ask something. I am /u/GloobsGuy. If you want to ask me anything over there, feel free to send a PM or tag me in a post.
IndieGoGo is going well. Smooth sailing and a steady uptick of the % reached.