Inspiration
Our inspiration for car physics and overall racing game concept within ChronoRacer was Asphalt 8 with its widely various maps, which maintains a third-person view whilst offsetting/rumbling upon input on the horizontal axes, and using damps/lerps for wheel-turning mechanism. Along with car mechanics, the creation of the Viking Map, Modern City Map, and Future Rising Levels maps were further inspired by Asphalt 8's Alps, Tokyo, and San Diego scenes respectively. Various open-source car assets on Unity asset store were utilized into implementing and assimilating the CarController script, and were used for creating aesthetically designed meshes with custom materials. Leaderstats system was inspired by Cruis'n USA utilizing lengthy bricks as triggers to detect changes in position, and the name for the game "ChronoRacer" was inspired by time-manipulating Chrono Odyssey. Critical asset for URP Unity Viking Village is linked adjacent: Viking Village.
What it does
ChronoRacer is a high-octane, hypercasual racing game where you commandeer your vehicle through breathtaking landscapes across various historical periods--from the times of Medieval Viking terror to the metropolitan calamities of rising sea levels. Players require to outsmart the AI opponent, mastering unique challenges exhibited by the various time scenes, and time-jumping mechanics in a frantic race against competitively pathfinding opponents, and the clock. The game consists of three major UI screens: the main menu, and race position screen--all of which have navigation back to the menu. ChronoRacer also contains three intricate maps including the Viking Village, Modern City, and Sunken City--all of which depict differing time periods within the same location. Players are compelled to pursue a portal which will transport them to the next scene, proctored by either a predefined path, or their own wits. A car utilizing a scripted artificial intelligence heeding to waypoints, final destination, and player position competes against the racer being programmed the same purpose. Utilizing longly protruding triggers atop the cars, race position is incremented and decremented upon both cars and displayed as TMPro. The game consists of three cars--past, modern, and futuristic--for AIs and Players respectively. Players obtain access to the Ford, Bugatti, and then the BMW I8; meanwhile; NPC opponents use a 70's Sedan, McClarin, and Futuristic Sentinel Armored Car lobbied by a turret atop. These cars are utilized in the three maps respectively, as screens are depicted to the user based on position, and are sent back to the main menu post-5-seconds. Players can replay the experience how many times over against the steely AI.
How we built it
Built with Unity 5, ChronoRacer is scripted with C# and utilizes many assets and libraries from both the Unity Registry, and commercial creators including UniRX for subscribing to IntReactiveProperites in different car properties for CarController--including Mass, Speed, Acceleration, Drive Force, Brake Force etc--and a myriad of car and scene packages. Using the many packages, we assembled the three maps whilst using Asphalt 8 as reference to certain elements. After completing the construction of the map, we restricted certain areas using bricks on the Modern City to create a prescribed route, whilst the Sunken City Map is rendered impossible without following through the skewed paths of drowned buildings. We had to create many, many box colliders to respect collision, and soon added low-poly modeled portals with triggers to send user to different scenes utilizing SceneManager.LoadScene() method within OnTriggerEnter2D at the end of the map. Each scene contains a car prefab corresponding to that scene with CineMachine hence creating the reactibility of the camera to user input, along with a CarController C# script containing logic for keyboard input, FixedUpdate() car physics based on aforesaid input, wheel movement animation using damping and lerped eulerangles, and serialized fields for speed, acceleration, mass, brake force, etc. To expand, waypoint system for race position used protruding BoxCollider triggers added to each car's prefab used to detect cars passing past one another, and decrementing/incrementing position based on whether the other collider's gameObject tag was player or AI. AI opponents were scripted using pathfinding/checkpoint asset from Unity Asset Store (link) and script that took into several waypoints on map and player position for dynamically editing its Vector3 for position and rotation in spite of collisions with player, whilst using baked navmeshes to heed to upcoming obstacles. Keyboard input was also used in starting the game (Space), as well as in custom drifting method.
Challenges we ran into
Certain challenges we ran into were the large tolls of several imported assets, of which took 20-30 minutes to include and many times were not operative. Many times, materials would not be adequately shaded to URP and would appear as bright pink--forcing us to create our own custom materials, and consuming much time. Furthermore, the rigging and nuancing of individual cars for desirable speeds and acceleration took many runs and barebones trial-and-error. Assets were oftentime destroyed upon the loading of new scenes which was persistent until we discovered the LoadSceneAdditive() method of the SceneManager class. Another major challenge was cars continuing to accelerate when the key isn't pressed, which we debugged by researching execution times/layers of each Unity built-in function, choosing the correct one, and implementing more significant customized frictional and brake force. Lastly, creating UI with image buttons were unfeasible since they strangely were covered by all other elements existent within the UI Canvas. This issue was resolved via scrapping the idea of using buttons in menu and rather using a 5 second timer until sending user to menu, and for users to press the space key in order to start the game.
Accomplishments that we're proud of
We are incredibly proud of our CarController script and various car prefabs with their race position, driving, drifting, and overall operative capabilities which almost frequent driving mechanics of many higher caliber vehicle games. The greatest accomplishments--however--were the creation of Racer AI utilizing waypoints and shaking off collisions whilst also developing three large-scale maps and interactive UI to supplement them, creating an immersive time-machine racing experience no other game but ChronoRacer presents.
What we learned
We learned how to use navmeshes, physics forces, and waypoint systems to enable Artificially Intelligent car movement along with using Unity's legacy input system and text to get axes and set gradients/magnitudes to speed and acceleration, and to display important in-game information respectively. We also learned how to use blender to create custom models--although basic--to fit the esque and help create the time-thematic maps/scenes existent within ChronoRacer. Furthermore, we learned how to use AudioSources and AudioListeners to play sounds, and used Animation/AnimationEvents to create a reactive racing experience for player vehicles. We also learned how to use singletons to copy and access methods and properties scripts, learned how to organize scene management, and to organize/employ ourselves in the project itself, while learning key values of working communicatively with a team, and taking consideration of individual creations, concoctions, and ideas. Without these non-archival, and heavily informational experiences and overall learning, ChronoRacer would not be half of what it has become in its now semi-publishable state.
What's next for ChronoRacer
As aforementioned, ChronoRacer is only in a semi-publishable state. The objective from here on out would be to duplicate AICar prefabs and place them across scenes whilst storing them in scriptable objects so they can be transferred across scenes. Then, 1-2 more maps would need to be introduced, and the selection menu which has currently been created must be implemented into the main game for car selection--which in turn will decide the order of the maps; likely Ancient Egypt/Mesopotamia, New York, a Cyberpunk-esque City, and several many others for past, modern, and future maps respectively. Furthermore, a multiplayer version of the game where lobbies can be hosted and changes in-game can be updated to all users over a web socket or network, and hence a voting system would be implemented for map order. ChronoRacer will also likely introduce new cars for both past, present, and future maps that can also be selected within the already created selection menu. Lastly, we can add speedometers, improve the UI, and fix bugs with the car physics and reset system. Regardless, these are not all the possibilities to which ChronoRacer can pursue, as the possibilities for this game are near-endless. Time never stops ticking, and ChronoRacer doesn't either.


Log in or sign up for Devpost to join the conversation.