I worked on Midnight Street while at Infinity Vector. While development had its challenges, I was able to contribute to the game from an early stage, and over the course of its production, I learned a lot in the process.
Results Screen
Youtube Preview (no audio) | |
---|---|
![]() |
Dialogue System
Youtube Preview | |
---|---|
![]() |
Dynamic License Plates
One of my first contributions to the project, I developed a system to generate a Japanese license plate for any given car using random numbers and a set of pre-defined data. It had to be randomly-generated at first, but customizable from the in-game garage. And most importantly, it had to look good and believable while in-game.
Before I even started putting down code, I needed to learn how Japanese license plates even worked. It’s more than just a string of numbers; there’s also the location of the motor vehicle department where you registered your vehicle, a smaller 3-digit number that’s dependent on your car’s class, and a single hiragana character used as a prefix to the main 4 numbers. And there’s also not always 4 digits! There can be up to 4, so for plates where there are less than that, a dot is added where the numbers would have been.
With the above knowledge in mind, I created a list of valid registration locations, a small handful of typical vehicle class numbers, a set of valid hiragana prefixes, and a full set of numbers plus a dot. Any time the player received a new car, this system would pick a random location, hiragana prefix, and number/dot string, and then assign it an approximate vehicle class based on the car. However, when you unlock cars after defeating characters in the story mode, the location is based on the registration center closest to the area where you defeated them.
I initially had difficulty coming up with something that could be easily changeable by the player while also looking good during races. License plates have visibly raised lettering, and it needed to look raised during gameplay. But with our setup at the time, it wasn’t feasible to have this 3D effect carry over to the customization. Instead, I used UGUI to render the license text, and once the changes were saved, a grayscale screenshot was taken of the plate exclusively, and would be output as two texture files: a diffuse, and a normal map generated with the help of a special shader created by another Infinity Vector engineer. In-game, the UGUI text was removed and the two textures applied to the plate, finishing the effect.