Why?
It was finally time I bite the bullet and learn Unity. This is my first project with it. Even if it is a pretty basic game, I wasn't following a step-by-step tutorial to make it; but rather, I made it with the knowledge I gathered from learning Unity's basics from their foundational lesson course.
Tools & Contributions
Development:
- Unity
- C#
Process
I was reading through beginner tutorials for Unity, trying to figure out what to do for my first project when I got a gist of the overall system. Near the end of one, that was going over 2D gravity & collisions, it mentioned a Pachinko game as a project to try out a user's newly learned collision skills. I digged the idea, & went with it.
I didn't really look at any of the directions after that point because I was confident in my ability to set up the base system and find what I needed to set up the next steps. So I set up the basic layout and collisions for the pegs that the ball hits.
After that, I planned what would make it more interesting:
- Score tracking
- A cute sprite that reacts to score changes
- All vibes~
I imported a free penguin sprite asset from the Unity Asset Store for the game's fluff character. I learned how to add its built in animation events to the scene's sprite instance, and added my own in there as well.
I added code components to the ball, penguin, and trigger events when the ball hit any of the ice floors.
Hurdles
- Figuring out how to connect different GameObjects in GUI's with manually written C# scripts.
- Figuring out how sprite animations work.
- Using transform parameters are not relative to the sprite prefab, but based on scene's coordinates(?/.)
-
Making a build cuts off the default viewport size that Unity sets for the game.
- This one makes me angry.
- I used a workaround by making the executable window resizable.
What did I learn?
- Collisions.
- Implementing C# scripts with GameObjects.
- Triggering events./li>
- Adding sprite animations.
- Making a build to WebGL & to Windows executables.