Reviving my Game Engine and Loading Warcraft 3 Maps
A few weeks ago, while watching a YouTube video of a professional Warcraft 3 match, I thought: "It would be awesome to load a map and have an NPC moving around in my own engine."
So I went for it. I revived an engine I had developed while learning C++ and OpenGL and got to work:
Expanding the Project
Originally, this project was intended to load a Warcraft 3 map into my personal engine developed in OpenGL3. Once I accomplished that, I wanted to take it a step further by introducing controllable actors that could move around the map while executing animations. Initially, these animations were calculated on the CPU, but now the mesh is modified on the GPU using shaders, allowing for a significant increase in the number of actors rendered simultaneously.
Glossary of Features in My Project:
Challenges and Learning Experiences
This has been an amazing project. I managed to revive my personal engine, fix numerous bugs, and gain a much deeper understanding of the engine pipeline. I built my own AnimInstance with a State Machine, which blends between different states and animations. I successfully loaded and rendered a Warcraft 3 map using my custom engine.
However, it wasn't always smooth sailing. One of the biggest challenges was the lack of reliable documentation on Warcraft 3's file formats. Extracting and properly rendering the map required piecing together bits of information from some forum posts and trial-and-error experimentation.
Another challenge was dealing with shadow resolution. Due to the large scene size, the shadow quality was extremely poor. To address this, I developed a technique that only projects shadows for currently rendered objects. While not perfect, it significantly improves the visuals and performance.
Useful Resources:
With everything I’ve built so far, my engine has become a fully functional Warcraft 3 map loader, supporting NPCs walking around dynamically. I have plenty of exciting ideas for further development, but at the end of the day, this project was mainly about learning and having fun