Wireframe raycaster

developing/porting a new game or gaming framework? post in here!
Post Reply
User avatar
0xC0DE
Posts: 1300
Joined: Tue Mar 19, 2019 7:52 pm
Location: The Netherlands
Contact:

Wireframe raycaster

Post by 0xC0DE »

Wireframe raycaster for Acorn Electron and BBC Micro.
Video only at the moment (running on Elk): https://www.youtube.com/watch?v=C2SSCCcKdY8
Runs about twice as fast on Beeb of course.
Don't know where this is going but it was good fun getting this to work in the first place :mrgreen:
0xC0DE
"I program my home computer / Beam myself into the future"
:arrow: Follow me on Twitter
:arrow: Visit my YouTube channel featuring my games and demos for Acorn Electron and BBC Micro
User avatar
tricky
Posts: 7694
Joined: Tue Jun 21, 2011 9:25 am
Contact:

Re: Wireframe raycaster

Post by tricky »

Looking good and faster than I would have expected.
User avatar
dominicbeesley
Posts: 2210
Joined: Tue Apr 30, 2013 12:16 pm
Contact:

Re: Wireframe raycaster

Post by dominicbeesley »

Wow! How did you do that
User avatar
0xC0DE
Posts: 1300
Joined: Tue Mar 19, 2019 7:52 pm
Location: The Netherlands
Contact:

Re: Wireframe raycaster

Post by 0xC0DE »

Thanks tricky and dominic!

I started by reading the tutorial at https://permadi.com/1996/05/ray-casting ... -contents/.
Then I wrote my version of a raycaster in C (using floating point at first, then fixed point integers only), which I subsequently translated by hand to 6502 asm. What followed was a long process of optimisations (tables, tables, tables) and sacrifices (like choosing a smaller viewport and using extra fat vertical slices). There is more info (and work in progress videos) on my Twitter timeline.
0xC0DE
"I program my home computer / Beam myself into the future"
:arrow: Follow me on Twitter
:arrow: Visit my YouTube channel featuring my games and demos for Acorn Electron and BBC Micro
User avatar
0xC0DE
Posts: 1300
Joined: Tue Mar 19, 2019 7:52 pm
Location: The Netherlands
Contact:

Re: Wireframe raycaster

Post by 0xC0DE »

Now with shaded walls and floor https://www.youtube.com/watch?v=wR54miNxQDg
0xC0DE
"I program my home computer / Beam myself into the future"
:arrow: Follow me on Twitter
:arrow: Visit my YouTube channel featuring my games and demos for Acorn Electron and BBC Micro
User avatar
Cybershark
Posts: 736
Joined: Wed Jun 14, 2006 11:16 pm
Contact:

Re: Wireframe raycaster

Post by Cybershark »

That is quite some tech demo! =D>
User avatar
fizgog
Posts: 618
Joined: Thu Jun 17, 2021 3:18 pm
Location: Nottinghamshire
Contact:

Re: Wireframe raycaster

Post by fizgog »

Excellent work as always =D> =D> =D>

Have you seen this for the C64 in C with source code?

https://drmortalwombat.itch.io/minotrace
Pitfall, Gridrunner, Matrix: Gridrunner 2, LaserZone, AcornViewer, AcornPad
User avatar
0xC0DE
Posts: 1300
Joined: Tue Mar 19, 2019 7:52 pm
Location: The Netherlands
Contact:

Re: Wireframe raycaster

Post by 0xC0DE »

fizgog wrote: Sun Nov 06, 2022 9:43 pm Excellent work as always =D> =D> =D>
Thank you! :mrgreen:
fizgog wrote: Sun Nov 06, 2022 9:43 pm Have you seen this for the C64 in C with source code?

https://drmortalwombat.itch.io/minotrace
Wow, that is really fast and impressive. It is not for the first time I wish the Electron had a true text mode for this kind of thing.
0xC0DE
"I program my home computer / Beam myself into the future"
:arrow: Follow me on Twitter
:arrow: Visit my YouTube channel featuring my games and demos for Acorn Electron and BBC Micro
User avatar
tricky
Posts: 7694
Joined: Tue Jun 21, 2011 9:25 am
Contact:

Re: Wireframe raycaster

Post by tricky »

Jafa only, that is if it really gives mode 7 as I'm not really sure what it is :lol:
I guess like me and my games a base electron is a must. I have done a couple that need sideways ram, but I guess that is on a par with a plus 1 - assuming that is the most common expansion.
User avatar
0xC0DE
Posts: 1300
Joined: Tue Mar 19, 2019 7:52 pm
Location: The Netherlands
Contact:

Re: Wireframe raycaster

Post by 0xC0DE »

tricky wrote: Tue Nov 08, 2022 7:39 pm I guess like me and my games a base electron is a must.
I'm sure this will sound familiar to you: I like diving right into the tricky, technical bits and almost always want to see them work on a vanilla machine (Electron of course, and if I can be bothered the Beeb as well :mrgreen:) That is where the challenge and fun is for me.
0xC0DE
"I program my home computer / Beam myself into the future"
:arrow: Follow me on Twitter
:arrow: Visit my YouTube channel featuring my games and demos for Acorn Electron and BBC Micro
User avatar
tricky
Posts: 7694
Joined: Tue Jun 21, 2011 9:25 am
Contact:

Re: Wireframe raycaster

Post by tricky »

Yep, 100% and when most of the reward is in the doing, you have to enjoy it.
You may have noticed that my "secret" project is B/B+ only but it does need two ROMs/SWRAM banks.
Post Reply

Return to “new projects in development: games”