90's style 3D (Now with USB keyboard scancodes)
Rayman
Posts: 14,553
See attached pic.
Update: Now working on P2 Eval. Source code posted here.
Getting ~37 fps using just one cog on 250 MHz P2 Eval.
But, speed can be dramatically improved (by using more cogs).
Features background, textured walls and textured floor.
Far away walls now a bit darker.
You can see where I got this idea from here: https://permadi.com/tutorial/raycast/demo/5/
I've made some notes on the coordinate system, attached here for reference.
Update: Rev. Main3b now uses USB keyboard scancodes for movement
Update: Now working on P2 Eval. Source code posted here.
Getting ~37 fps using just one cog on 250 MHz P2 Eval.
But, speed can be dramatically improved (by using more cogs).
Features background, textured walls and textured floor.
Far away walls now a bit darker.
You can see where I got this idea from here: https://permadi.com/tutorial/raycast/demo/5/
I've made some notes on the coordinate system, attached here for reference.
Update: Rev. Main3b now uses USB keyboard scancodes for movement
zip
138K
Comments
j
https://permadi.com/tutorial/raycast/demo/5/
there's a pretty good tutorial and demos...
I'm guessing you converted the Javascript to something that will run on P2? If so, did you have an automatic tool for it, or did you have to do it by hand? Either way I'm impressed .
Maybe Marathon instead, so that we could look up and down
Reminds me of Bard's Tale which was one of my favorite games.
Windows test exe attached. It's very slow, but you can move with WASD
The floor is what's really making it slow. Background too. Wall drawing is super fast.
But the author has this note on drawing the floor:
So, I think it can be improved...
That's rocking, the little music jingle reminds me of Pink Floyd On The Run.
Some one should make a remake for the PropII. : ]
Well, at least it's fully operational.
Now, need to work on speed and precision...
Download the binary from the first post to try it out.
If I had a way to run it, I would.
gotta' wait until I get a sample board.
Prop 1 96MHz
Why not PM Baggers and see if he can share his Wolf 3D Demo with you ?
I'm impressed with the fact Baggers was able to get Wolf 3D to work in under 32k.
I mean you need a screen buffer, place to store textures. That's impressive!
P2 should be able to pull off a lot more!
Compression on the fly should help with the small amount of storage. That and there is a lot of talk about using HyperRAM for frame buffers.
Yes the P2 has so much internal memory bandwidth now. It's 1GByte/s at 250MHz per COG! A '486 at 33MHz back in the day running Doom had nothing like that. So it will mainly just be the external memory latency that holds it back but people will be inventive as usual. All sorts of things will become possible. Gonna be great.
I am also confident he will be able to make it faster on the P2 given time to optimize.
Comparing a SoC (System on a Chip) P2 to a multichip 486 is not quite apples to apples.
Also remember that there were clock doubled, tripled, and quadrupled versions on the 486 as well as Vesa Local Bus.
I think VLB ran at double the system speed.
This chip is fast enough to potentially draw that scene dynamically, using only a handful of line buffers.
They are working in 24-bit color mode, so it's easy.
But, in 8-bit mode, it's more of a challenge.
I was able to make 2 additional copies of the brick wall, each a bit darker. This works OK.
For a real game though, you are probably going to want several different wall bitmaps and then memory usage might become a problem.
I'm toying with the idea of using tricks with the palette to do this instead.
But, the palette is limited too...
Problem is that there are only 2 shades of gray.
Won't work for this gray wall very well..