P3 - More Polished UI and Game Scenes
More Scenes and More UIs
Besides the main racing scene, I made two more scenes: Welcome Scene and Team Selection Scene.
Welcome Scene
The first scene simply contains a static raw image, and a button.
Team Selection Scene
This scene requires much more work.
In my marble racing game, I designed 4 different teams with unique colors and marble textures. Each team contains two marble racers. In the team selection, player can choose one team to focus on. The UI panel on the left shows team name, team color, and physics attributes, and a short background story for each marble.
To made the scene more lively, I added a small camera movement for creating the breathing effect.
After clicking the "start race" button, the race scene will be activated. During the race, only marbles in the selected team could be focused by the camera.
Race Scene
Compare with project 2, I added the following UIs:
- On the left bottom corner, I added a mini map. To implement this, I added another camera, and limit its rendering layers to be track only. One issue is that the marbles are too small to be visible in the mini map. Thus I attach a large sphere to each marble with linear shader, and set it to be only visible to the mini map camera.
- The right panel shows the leader board, and the overall laps. I added the team color before the racer names (and I also renamed the marbles). Text color for the marble in focus is rendered as the team color.
- The middle bottom panel shows live comments for the race, generated by a local LLM. I will elaborate on it in another dev log (where I will also explain the small bar on the top of the screen)
I also made a race results UI, which will only be triggered as the race ends (when the first marble reaches the maximum laps). All other UIs will be disabled. However, the marbles will continue running in the background to make the scene more fun.
This UI shows the overall race result. Each marble will earn some points (PTS) based on their rank, and the team will be sorted based on the overall PTS.
Sharing Data Between Scenes
One challenge for me is to share the data between team selection scene and the actual race scene.
I registered a script into a ScriptableObject, and rewrote scripts in project 2 to support it. This object contains the variables related to the marbles, including the prefabs of all marble racers, and the team in focus.
Get Simulation Project 2&3 Smart Marble Race
Simulation Project 2&3 Smart Marble Race
Status | Prototype |
Author | ricercarg |
Genre | Simulation |
More posts
- P3 - Interaction from a Different Realm50 days ago
- P2 - Race Manager and UI73 days ago
- P2 - Marble State Machine73 days ago
- P2 - Track Design & Shader81 days ago
Leave a comment
Log in with itch.io to leave a comment.