…and removing the need for compatibility scripts!

Recently, a GameMaker asked me if I could update the “3D Road” project from the game-maker.ru site to GMS2 and remove the need for compatibility scripts.Since this is a general project that proves a good example for updating any D3D based project to GMS2, I think it is worth me writing about!

“3D Road” is a GameMaker 7 project from 2010 which appears to be created by a user named Vendet., which demos dynamically generating a 3D road model using 2 paths (a layout and a height map) and some math.

The problem is that it’s a 10 year old project targeting an (at this point) ancient version of GameMaker, and updating it straight to GMS2 does not work – it doesn’t crash, but textures are mapped incorrectly, the field of view is messed up and it has to use compatibility scripts to “function”.

So, let’s fix this, going step by step on how to upgrade this project.

Here is a download for the updated project that can be imported to GMS2: roadtest22GMS2GuideVer.yyz

I’ve provided this download for learning purposes as you get to poke around the code, but it would probably help to read the guide, to help understand the process of updating this project.

A supplemental video version of this guide is available on Youtube: Video

Now we must update the project and fix all these issues.

Let’s deal with this step by step:

At this point, we can close the camera object because we are done with it, and move on to textures

At this point, we could consider the update done, but I was asked to replace the compatibility scripts, so I will!

Now you may delete the compatibility scripts, and the project will work just fine! We have successfully updated a 10 year old 3D project from GameMaker 7 to GameMaker Studio 2.

But wait! There’s more: That second method of updating textures!

Well, I think that covers everything! If you have any questions, leave a comment and I will try to answer!