Sooo, yeah... A few days ago I realized that my Devblog #3 had disappeared. I am still kind of upset about it because I talked about many things and I had cool .gifs to show you the 'throw feature' (it was the main subject of this devblog...) and how it works. Since I moved to the south of France for my internship, I took my laptop but didn't make a backup of my work (which stayed on my other computer...). This week did not start very well...
Anyway, I wanted to rewrite it, but I do not have much time and I thought that a short summary could be enough. So, what did I talk about? I talked about this new feature I called the 'throw feature' which allows players to throw packages towards a target by sliding their finger on a touchscreen, or with their mouse on a computer.
|Now do a 360 throw!|
Then, I also talked about the mobile version (and there was this gif, it was awesome!) and it turned out to be better than I expected, so I decided to continue on this path, while of course, still working on the pc version. But I have to admit, this 'throw feature' has a better feeling on a touchscreen device!
And to conclude this (not so) short summary, I talked about this new tutorial level, that looks like you are taking a driving lesson on an empty car park, and how I found it difficult to make sure that players learn all mechanics in a short period of time. Maybe I will have to make more tutorial levels, because this one is actually quite difficult...
I think that's it. So yeah, sorry for that. But, there are new things to talk about now (yey!)!
🚗 The Good, The Perfect, and The Miss
Not so new actually, because I'm going to continue to talk about this 'throw feature'. Indeed, now that players can "choose" where packages will go, I had to work on those targets. It's actually very simple: the nearer to the target the package is, the better. For now, I use colliders to detect the package's position. It works, but I have to manually set those in each level for all targets. I could use code to save me some time, we'll see.
As you can see on the gif (the title was a clue too), there are different rewards. 'Perfect', 'Good' and of course 'Miss' if players miss their throw. There's also a fourth one, called 'Special Landing'. The special landing reward is given to players who managed to make their package land on, well... special places. They are not shown to the players and need to be discovered. They're not very intuitive, and I think players' reaction will be like "oh, okay... cool I guess." In conclusion, I'm not sure if I should keep this one.
🚗 Unity Tip
Those feedbacks were added on a canvas set in world space. Thus, when those were behind a building, players could not see what was written (you can actually see this happening on the second gif I show you earlier). But I wanted to keep them in world space, to make them appear at the package position, and stay at that position even when the camera moves. I tried so many things and it didn't work...
But thanks to this guy, I managed to do it! Here are the steps he described that you have to follow if you want your world space canvas to render elements on top of everything (well, it worked for me at least):
- Put your UI on a Layer called UI (if it isn't already).
- Duplicate your Main Camera and call it UI Camera.
- Parent your UI Camera to the Main Camera.
- Remove scripts like camera control, post effects and audio listeners from the UI Camera.
- In the Main Camera Culling Mask turn off UI
- In the UI Camera turn everything off but UI.
- In the UI Camera change Clear Flags to Depth only
- In the UI Camera change the Depth to something higher than the value on your Main Camera.
- Then in your Canvas set the Event Camera to the UI Camera.
But because of the zoom effect, I had to apply this to the UI Camera too, in order to keep the feedback at the same position.
🚗 Reload System
So now, throws can be missed, but I didn't want the fact that players can miss one shot to be a way to lose the game, because of the innacuracy I think it would be cruel. Okay, the thing is, indirectly, it is actually a way to lose the game, but it is because a player took too much time and missed A LOT of shots.
To make sure players do not run out of ammunitions because of their lack of ski-... I mean, because of the innacuracy, a new package appears if they miss their throw.
🚗 And now what?
What is going to happen now? Well, if I have the time, I will continue to work on the 'throw feature' because I already found so many ways to improve it. especially when packages are landing on targets. And when this will be done, I will work on a scoring system.
Then, I will rework my tutorial level (maybe levelS), and create more levels! When I will have enough of them, I'll release an early version on pc and android to make some playtests. And, well, we'll see how it goes!