Description
CXMW is a 3D Unity remake of the racing game Need for Speed: Most Wanted. It is
an in-progress project that is being developed by a group of 4 people, where I
recently became a co-leader. It is still in-progress and is being developed mostly
in spare time.
Features
- Made in Unity Engine.
- Reverse-engineered map loading, physics, particle systems and AI.
- Implements most of the features that the original game has.
- Adds new game modes, quality of life changes, car customization options, and more.
- Enables extensive mod loading without need to recompile existing files.
- High-performant map rendering that uses almost no game objects.
- Cross-platform and supported on both desktop and mobile platforms.
Motivation
The goal of the project is to make modding possibilities more profound and easy, as well as bring
many fixes and quality of life improvements (since regular PC version of the game is pretty flawed).
In addition to that, since the game is made using Unity engine, code plugins may be supported on
desktop platforms if compiling with Mono backend. One more goal is to increase the quality of all
assets that the base game uses, as well as make the game cross-platform for desktop and mobile platforms.
Problems
The main problems when making the game were correctly implementing the world rendering routine, the
one-to-one identical physics (since the original game is well-known for them), as well as particle systems,
light and flare systems, AI, and more. For that, countless hours were spent reversing the original game,
understanding how those systems work, and then reimplementing them in Unity preferably in a better way.
One major issue that we encountered is the way assets are loaded in the base game, so I had to change the way
they are loaded in the remake so that the memory consumption would not be too high. Another problem encountered was the fact
that original external files from the base game are incompatible with Unity, especially textures and geometry
(since base game uses DirectX for rendering, while Unity uses its own Mesh and Texture classes), so I had to
recompile most of the files (specifically map files) to be compatible with Unity. One last major issue was the
memory and performance in general when rendering high-poly maps; I had to efficiently utilize cache and custom
allocators to reduce the number of game objects used to the minimum, since their performance overhead was too
high and significantly impacted the game's performance.
Results
The result Unity game is shown below. For more information and visuals
on how it looks like, check out the YouTube link on top of the page.
The game visuals look very similar to the original game. That is because the way world is renderered is
identical to the base game, in addition to completely reversed shaders which were ported to Unity HLSL.
The car customization is more extensive than the base game, allowing players to edit parts that are not
available in the original game.
The lighting and shadows are all dynamic, as a result of time-of-day implementation. The game has several
levels of graphic detail, allowing it run with a good performance even on old computers. The dynamic LOD system also
contributes to the performance of the game, rendering distant objects at a lower detail. The particle system
is reverse engineered and uses custom emitted geometry; all the game data is being read from external files like many
non-Unity games do, which allows for simple and extensible mod loading.
The UI is made in Unity UI, however, it might get changed to UI Toolkit to enable UI modding as well.
To preserve the feeling of the base game, car physics were made to be almost identical to the original ones.
In addition to that, all game modes that the regular game has are supported, as well as new ones, such as cash grab,
drift races, and more. Finally, AI implementation is reversed and partially ported, though there is still more work
to do in regards to it. In addition to that, the game has backwards compatible online mode, as well as split screen
option, allowing two players to play at the same time on the same game instance against each other.
Conclusion
The project is still work-in-progress and it might take a bit more time to fully polish the game before its release.
The memory and performance can be improved by a significant margin via introduction of a custom scriptable render
pipeline, utilizing forward and deferred shading for different objects. In addition, UI may be rewritten in the new
UI Toolkit to enable modding support. Working on this project strengthened my leadership and teamwork skills, as
well as greatly increased my Unity knowledge and experience in general.