10 December 2019

1 Before We Start

WARNING: This blog describes how to implement pseudo 3D graphics along with simple game engine from scratch. If you don't care about that game engine part then you can skip to part 6: Fundamental graphical operations. You're welcome.

As a game developer I always wanted to learn how to create 3D graphcis from scratch without using OpenGL or Direct3D, but didn't know how. Then I saw Markus 'Notch' Persson (original creator of Minecraft) working on his game for a Ludum Dare 21 competition called "Prelude of the Chambered" which was exactly what I was looking for so I started to copy his code and research as much as I could about this approach.

Prelude of the Chambered gameplay
Prelude of the Chambered gameplay

Then I've recreated the same game engine for my Bachelor Thesis which this entire blog is describing.

Below you can see my pseudo 3D engine implementation based on Markus's approach with custom 'depth only' mode which when enabled, it shows contents of a depth buffer as a black & white image which you can see on the gif as well.


My Pseudo3D Engine demo
My Pseudo3D Engine demo

After all rendering functions were designed and implemented, testing phase has been performed where I've measured and calculated individual time intervals to draw a single pixel. 

Functionality of this engine can be further extended by implementing simple physics model for AABB collision detection & response as well as AI for in-game entities. Therefore simple games can be created for Windows platforms where further optimizations will be necessary to accelerate the rendering for very large levels. Input handler as well as two predefined levels are already included to showcase all the rendering capabilities of my pseudo3D engine.

This blog is a detailed tutorial I wish I had back when I was starting to learn how it all worked.


1 comment:

  1. Cloudi5 is the web design company in madurai. Cloudi5 is also called as web development company in coimbatore. cloudi5 offering so many services, digital marketing, social media marketing, search engine optimization, landing page optimization, email marketing, website creation, website redesign, e-commerce web design, google ads, android app development and web development.

    ReplyDelete