{"id":44569111,"url":"https://github.com/rafapp/doomcaster","last_synced_at":"2026-02-14T02:00:08.588Z","repository":{"id":63870596,"uuid":"571368922","full_name":"Rafapp/DoomCaster","owner":"Rafapp","description":"Project created to master C/C++ which renders a map created in the \"map builder\" using a ray casting algorithm in a style similar to games like Doom, or Wolfenstein. The map can be traversed with the wasd keys.","archived":false,"fork":false,"pushed_at":"2023-01-17T04:31:50.000Z","size":72,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2023-03-09T01:27:12.067Z","etag":null,"topics":["3d","doom","graphics","rendering","videogames"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Rafapp.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-11-28T00:55:48.000Z","updated_at":"2023-01-10T22:39:50.000Z","dependencies_parsed_at":"2023-02-10T07:40:12.690Z","dependency_job_id":null,"html_url":"https://github.com/Rafapp/DoomCaster","commit_stats":null,"previous_names":[],"tags_count":null,"template":null,"template_full_name":null,"purl":"pkg:github/Rafapp/DoomCaster","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Rafapp%2FDoomCaster","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Rafapp%2FDoomCaster/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Rafapp%2FDoomCaster/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Rafapp%2FDoomCaster/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Rafapp","download_url":"https://codeload.github.com/Rafapp/DoomCaster/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Rafapp%2FDoomCaster/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29431593,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-13T22:20:51.549Z","status":"online","status_checked_at":"2026-02-14T02:00:07.626Z","response_time":53,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["3d","doom","graphics","rendering","videogames"],"created_at":"2026-02-14T02:00:06.882Z","updated_at":"2026-02-14T02:00:08.575Z","avatar_url":"https://github.com/Rafapp.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1 align = \"center\"\u003eDoomCaster\u003c/h1\u003e\n\n\u003ch3 align = \"center\"\u003eAn exploration of 3D rendering\u003c/h3\u003e\n\n\u003cp align = \"center\"\u003e\n  \u003cimg src = https://user-images.githubusercontent.com/38381290/211689275-7d02cc0c-1e8c-4878-843b-039323d413a3.png width = \"500px\" align = \"center\"\u003e\n\u003c/p\u003e\n\n### What?\nDoomCaster is a project that renders a pseudo-3D map using a raycasting algorithm. It has the following features:\n- Map editor.\n- Top-down raycast algorithm visualizer.\n- 3D map, which can be explored with the WASD keys.\n\n### Why?\nI wanted to practice, and strengthen my C/C++ programming skills to become a more competitive programmer in the Game Development industry, as well as learn more about 3D graphics, 3D mathematics, and rendering algorithms as much as possible.\n\nDoom is one of the most disruptive videogames ever created, as it set a new standard for the games industry, and was the stepping stone in the transition to 3D graphics in games. It began development in 1992, and was released in 1993 by John Carmack, John Romero, Adrian Carmack, Kevin Cloud, and Tom Hall selling more than one million copies!\n\nI have nothing but respect for the developers of id software, since they are some of the game changers that moved the industry forward and a huge inspiration to me. It blows me away what they were able to achieve with the limited technologies they had during their time, so I wanted to learn how they did it firsthand!\n\n\u003cp align = \"center\"\u003e\n  \u003cimg src = https://user-images.githubusercontent.com/38381290/211686234-05585deb-82ef-4e1c-8829-e7bb69e1722a.jpg width = \"500px\" align = \"center\"\u003e\n\u003c/p\u003e\n\n\u003e*The team at id software in 1993 from left to right: John Carmack, Kevin Cloud, Adrian Carmack, John Romero, Tom Hall, and Jay Wilbur*\n\n### How?\n\n#### C/C++\nI started by refreshing my knowledge of C and C++. To do so, I created the programs learning.c and learning.cpp in the /learning folder, where I studied math functions, I/O, bitwise and logical operations etc. After doing so, I wanted to get started with 3D graphics.\n\n#### OpenGL\nOpenGL (Open Graphics Library) is a cross-platform API (Application Programming Interface) for rendering 2D and 3D computer graphics. I chose it, since it's standardized among the industry, and although its use is not as frequent nowadays, it can give a solid understanding of computer graphics.\n\nMy first step, was to create a simple program, this is the \"Hello world!\" of 3D graphics, which is drawing a triangle by connecting 3 vertex with different colors.\n\u003cp align = \"center\"\u003e\n\u003cimg width=\"400\" src=\"https://user-images.githubusercontent.com/38381290/231918211-7a48428c-6925-44c6-9067-08079a7b16a5.gif\"\u003e\n\n\u003c/p\u003e\nThe original program was rather simple, so I decided to make the triangle spin using circle geometry, and the sin/cos functions ( Script is in /LearningFiles/Triangle ) and it spins given a movement speed, which is fun!\n\n\u003e In progress ...\n\n#### Rays:\u003cbr\u003e\n\nThe aforementioned games build upon one of the foundations of 3D rendering, which is Ray Casting. To begin, we can define a ray in its parametrized form as a point $(X_0, Y_0, Z_0)$ with a direction vector $(D_x, D_y, D_z)$, where points in the line are accessed with a parameter $t$ which all lead to the following equations:\n$$X = X_0 + (t * D_x)$$\n$$Y = Y_0 + (t * D_y)$$\n$$Z = Z_0 + (t * D_z)$$\n\nThese rays can be casted in multiple ways from a \"camera,\" which is a perspective. The most popular ones are:\u003cbr\u003e\n\n#### ***Isometric***\u003cbr\u003e\nThe projection lines are completely orthogonal to the screen, meaning completely \"Straight.\" This perspective is used commonly in city building games such as Age of Empires, or StarCraft.\n\u003cp align = \"center\"\u003e\n  \u003cimg height=\"300\" src=\"https://user-images.githubusercontent.com/38381290/212803113-7ee86e60-cbad-49ba-a6ff-c13f5fa647e0.png\"\u003e\n  \u003cimg height = \"300\"  src = \"https://user-images.githubusercontent.com/38381290/212802817-4befeda8-da38-47b1-9385-48e523917127.jpg\"\u003e\n\u003c/p\u003e\n\n#### Perspective\nThe projection lines all funnel out from a single point, in a similar way to how light and depth are perceived by the human eye or a pinhole camera. This is the most used form of rendering in modern games, as it is the most realistic (to humans, I wonder how aliens see the world 👽).\n\u003cp align=\"center\"\u003e\n  \u003cimg height = 300 src=\"https://user-images.githubusercontent.com/38381290/212804706-502141b0-37ee-4b27-bd9a-b4830fc95dbd.png\"\u003e\n  \u003cimg height = 300 src=\"https://user-images.githubusercontent.com/38381290/212804836-a7e1ca33-79c7-4915-83c2-65fddae25112.png\"\u003e\n\u003e\n\u003c/p\u003e\n\n#### The Ray Casting algorithm\nWe will be using one of the early forms of ray casting, which casts rays in a 2D map which translates to a 3D environment.\u003cbr\u003e\n- In order to render the screen at any given point, the following steps are taken:\n1. Given geometric definitions of game surfaces (i.e. walls) $n$ rays are projected at regular angle intervals, so that each ray can intersect with a different map element to be rendered on the screen. \n2. We store the $t$ parameters from these rays in an array we call t[n], this gives us the distance in $x,y,z$ coordinates to a wall hit or wall exit.\n3. We store the $S$ surface which was hit. This surface may have information such as material, transparency, and color and is stored in an array S[n].\n\u003cp align=\"center\"\u003e\n  \u003cimg width=\"600\" src=\"https://user-images.githubusercontent.com/38381290/212807160-137bf0a2-f147-4a34-9b2a-b97ff5e87901.gif\"\u003e\n  \u003cp align=\"center\"\u003e\u003ci\u003eVieira L., Own Work, 2012\u003c/p\u003e\n\u003c/p\u003e\n\n\n### Run it!\n\u003e In progress ...\n\n### Resources used:\n- OpenGL: https://www.opengl.org\n- Learning OpenGL: https://learnopengl.com/Getting-started/OpenGL\n- Wikipedia, ray casting: https://en.wikipedia.org/wiki/Ray_casting\n- Wikipedia, id software: https://en.wikipedia.org/wiki/Id_Software\n- Doom Fan Wiki, Logo: https://doom.fandom.com/wiki/Logo\n- w3cschools, c++: https://www.w3schools.com/cpp/default.asp\n- Video that helped me a ton: https://www.youtube.com/watch?v=eOCQfxRQ2pY\n\n\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frafapp%2Fdoomcaster","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frafapp%2Fdoomcaster","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frafapp%2Fdoomcaster/lists"}