Making a 3d game in assembly Autumn and Winter 2019

During the Autumn of 2019 I started working on the actual game project. Most of the time was spent trying to learn and understand DirectX 11, I probably had to understand it a bit more than most have to when starting out with DirectX since I had to connect it to my assembly code. I had to recreate all structs that are used by DirectX functions carefully making sure the data sizes of each element in the structs matches. It was a very good exercise even if it was quite frustrating at times.

I started with just making vertices that connected to each other to look like roads together with some basic camera controls. I used additional vertices to draw lane marking lines. A short video of this is shown below.

Then I created a small road editor allowing to place road segments on the map. The mouse picking for translating the mouse 2D screen position to a 3D position in the world was the most challenging part of it. A short clip showing the road editor in action as it was can be seen below.

After that I started to work a bit on a simple lighting model with diffuse and specular lighting. I also improved the camera to allow changing the angle of it. A small demo is shown in the video below.

Then I added the first terrain, first a simple version with some very artificial hills followed by terrain based on a heightmap from a bitmap file. I also added water by creating a plane with a grid of vertices. These vertices are then animated in the vertex shader. Since I want to have a low poly look on the water the normals need to the same for each vertex on a triangle. And since the vertices are changed each frame by the vertex shader to create the animated water I had to calculate the normals in a geometry shader each frame to get them right. The heightmap version of the terrain with the water can be seen in the video below.

For more frequent updates follow me on twitter or subscribe to our Youtube channel

Twitter: https://twitter.com/gurkbanan
Youtube: https://www.youtube.com/channel/UCGCHhFjRwHr7iYLGeVgkEJw

Published January 4, 2021 2:04 pm in

Tags: , , , , , , , , ,