How to make a doom-like engine/game?

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
Jsin
Prole
Posts: 4
Joined: Mon Jul 31, 2017 2:03 pm

How to make a doom-like engine/game?

Post by Jsin »

Hello! I have been working on an arena shooter in the GZDoom engine, and I thought to myself "If doom is just projected 2D, why don't I make my own engine to suit the game?" (Yes, I know GZDoom is actual 3D, but I was meaning the original doom). So I got to work on a renderer, and I have made a simple ray-caster inside of love2D (file attached). However, all I have managed to do is draw walls (all uniform height) and have 2 rectangles for the ground and sky. So, if anybody would be able to help me, how would I go about implementing any of the following:
  • Projected floors with textures
  • Multiple types of walls
  • Sector lighting (like in doom)
  • BSP (for optimisation, as it isn't too well optimised)
  • Multiple heights (or heights like doom)
  • Simple weapon sway
  • Sprites with coords on the map, that will be displayed as sprites in 3D
client.love
Game
(20.1 KiB) Downloaded 426 times
EDIT: According to you guys, doom wasn't a raycaster and relied solely on BSP. I researched and you were right, so I changed the name of the question to be more fitting.
Last edited by Jsin on Mon Aug 21, 2017 3:56 pm, edited 3 times in total.
User avatar
raidho36
Party member
Posts: 2063
Joined: Mon Jun 17, 2013 12:00 pm

Re: How to make a doom-like raycaster?

Post by raidho36 »

Take a look at Zdoom source code.
MasterLee
Party member
Posts: 141
Joined: Tue Mar 07, 2017 4:03 pm
Contact:

Re: How to make a doom-like raycaster?

Post by MasterLee »

Doom isn't an raycaster. Doom use BSP tree traversion for rendering and hidden surface removal.
Also attached file is missing.
Jsin
Prole
Posts: 4
Joined: Mon Jul 31, 2017 2:03 pm

Re: How to make a doom-like raycaster?

Post by Jsin »

--REMOVED AS I WAS WRONG AND WAS AN IDIOT--
Last edited by Jsin on Mon Aug 21, 2017 3:43 pm, edited 2 times in total.
MasterLee
Party member
Posts: 141
Joined: Tue Mar 07, 2017 4:03 pm
Contact:

Re: How to make a doom-like raycaster?

Post by MasterLee »

Jsin wrote: Sun Aug 20, 2017 2:34 pm
MasterLee wrote: Sun Aug 20, 2017 2:28 pm Doom isn't an raycaster. Doom use BSP tree traversion for rendering and hidden surface removal.
Also attached file is missing.
It is still, for all intensive purposes, a ray caster. Raycasters can use BSP in the same way full 3D engines can
But i does not
https://www.doomworld.com/forum/topic/7 ... raycaster/
User avatar
zorg
Party member
Posts: 3465
Joined: Thu Dec 13, 2012 2:55 pm
Location: Absurdistan, Hungary
Contact:

Re: How to make a doom-like raycaster?

Post by zorg »

That thread there is the best example why we, here, should not have this discussion;
let it be known that the thread title should be edited to either
"How to make a doom-like engine/game"
or
"How to make a simple raycaster engine/game"
instead.
Me and my stuff :3True Neutral Aspirant. Why, yes, i do indeed enjoy sarcastically correcting others when they make the most blatant of spelling mistakes. No bullying or trolling the innocent tho.
MasterLee
Party member
Posts: 141
Joined: Tue Mar 07, 2017 4:03 pm
Contact:

Re: How to make a doom-like raycaster?

Post by MasterLee »

Look here and watch in slowmo how the screen is actually rendered:
http://fabiensanglard.net/doomIphone/do ... nderer.php
Well there is the same for Duke3D
http://fabiensanglard.net/duke3d/build_ ... ernals.php
User avatar
zorg
Party member
Posts: 3465
Joined: Thu Dec 13, 2012 2:55 pm
Location: Absurdistan, Hungary
Contact:

Re: How to make a doom-like raycaster?

Post by zorg »

All the spelling errors in those articles are slowly killing me, but otherwise, both of them are a neat write-up.
Also, just for the record i was agreeing with you, though i still think it'd be better to focus on what the original question was intended to ask, not the issues that arose from terminology related stuff (like whether doom is or is not a ray-whatever)...
Me and my stuff :3True Neutral Aspirant. Why, yes, i do indeed enjoy sarcastically correcting others when they make the most blatant of spelling mistakes. No bullying or trolling the innocent tho.
MasterLee
Party member
Posts: 141
Joined: Tue Mar 07, 2017 4:03 pm
Contact:

Re: How to make a doom-like raycaster?

Post by MasterLee »

I didn't put the links there to oppose you. I was curious of how Doom really did it. I have read many about Build engine. They got cars, well moving sectors, and only think i knew about Doom was that that is not possible there because of the BSP tree. So i searched for article that described how it worked.
Also Pie in the Sky looks interesting. But i never heard about before.
User avatar
Davidobot
Party member
Posts: 1226
Joined: Sat Mar 31, 2012 5:18 am
Location: Oxford, UK
Contact:

Re: How to make a doom-like engine/game?

Post by Davidobot »

There have been plenty of raycasters made in LOVE over the years, including mine (feel free to look around that one's source code). It's not particularly hard if you follow a tutorial.
PM me on here or elsewhere if you'd like to discuss porting your game to Nintendo Switch via mazette!
personal page and a raycaster
Post Reply

Who is online

Users browsing this forum: Google [Bot] and 2 guests