Page 3 of 11
New demo uploaded: Wolfenstein 3D - raycasting demo with textures
Posted: Sun Mar 14, 2021 9:29 am
by Jeffrey
7 minutes ago, Ed Minchau said:
There's something else that might speed things up for you on the programming side: you can write assembly language code that writes assembly language code. Lots of what you're writing is just various LDA VERA_DAT_1 and STA VERA_DAT_0 in various combinations. You could pick some vertical scale to display, say 152 pixels, and have an assembly language routine generate all of those height scale subroutines for you automatically.
Yes. I do that now. I generate 512 routines for 512 possible heights. See my previous posts about it.
New demo uploaded: Wolfenstein 3D - raycasting demo with textures
Posted: Mon Mar 15, 2021 3:40 am
by Ed Minchau
18 hours ago, Jeffrey said:
Yes. I do that now. I generate 512 routines for 512 possible heights. See my previous posts about it.
OK, due to VERA's autoincrement you're actually going to have faster software than the original Wolfenstein. 8 cycles per pixel instead of 15. This version might be better than the original.
New demo uploaded: Wolfenstein 3D - raycasting demo with textures
Posted: Mon Mar 15, 2021 6:07 am
by Jeffrey
2 hours ago, Ed Minchau said:
OK, due to VERA's autoincrement you're actually going to have faster software than the original Wolfenstein. 8 cycles per pixel instead of 15. This version might be better than the original.
I doubt it. The 286 was 16 bit and apparently they capable of writing 2 pixels at the time to VGA. They reached 60 fps i believe.
We could maybe reach 15 fps (when I do some hand calculations). And thats hard.
New demo uploaded: Wolfenstein 3D - raycasting demo with textures
Posted: Mon Mar 15, 2021 6:44 am
by Cyber
34 minutes ago, Jeffrey said:
We could maybe reach 15 fps (when I do some hand calculations). And thats hard.
With appropriate graphics even 10 fps can be pretty pleasant to look at. So I think It's worth a shot.
New demo uploaded: Wolfenstein 3D - raycasting demo with textures
Posted: Mon Mar 15, 2021 9:58 am
by Ed Minchau
3 hours ago, Jeffrey said:
I doubt it. The 286 was 16 bit and apparently they capable of writing 2 pixels at the time to VGA. They reached 60 fps i believe.
We could maybe reach 15 fps (when I do some hand calculations). And thats hard.
If you do exactly like wolfenstein you'll have the same limitations with an 8bit machine, yeah. But there's shortcuts that they didn't try until Doom like binary space partition that could help.
New demo uploaded: Wolfenstein 3D - raycasting demo with textures
Posted: Mon Mar 15, 2021 10:16 am
by Jeffrey
24 minutes ago, Ed Minchau said:
If you do exactly like wolfenstein you'll have the same limitations with an 8bit machine, yeah. But there's shortcuts that they didn't try until Doom like binary space partition that could help.
Yes. Those sort of shortcuts will help (although I am starting now with how Wolf 3D did the raycastings).
A more fundamental problem is the cycle budget: blitting 304*152 pixels using 8 cycles per pixel takes around 370k cycles. Per vsync tick we only have 133k cycles available. So 60fps seems out of reach for the x16.
Thats without doing any raycasting/space partitioning, sprite scaling, AI etc.
But thats ok. Im fine with 10-15fps.
?
New demo uploaded: Wolfenstein 3D - raycasting demo with textures
Posted: Mon Mar 15, 2021 3:07 pm
by Jeffrey
Its starting to work in assembly:
Right now its about 5fps. Can be improved quite a bit. I'll have to do some cleaning up and I would like to add some small features (maybe more than one texture). Then I'll probably release a new version.
Have fun!
?
New demo uploaded: Wolfenstein 3D - raycasting demo with textures
Posted: Mon Mar 15, 2021 4:27 pm
by Jeff Pare
Very nice - the speed improvements are already impressive!
New demo uploaded: Wolfenstein 3D - raycasting demo with textures
Posted: Mon Mar 15, 2021 10:36 pm
by Ed Minchau
12 hours ago, Jeffrey said:
Yes. Those sort of shortcuts will help (although I am starting now with how Wolf 3D did the raycastings).
A more fundamental problem is the cycle budget: blitting 304*152 pixels using 8 cycles per pixel takes around 370k cycles. Per vsync tick we only have 133k cycles available. So 60fps seems out of reach for the x16.
Thats without doing any raycasting/space partitioning, sprite scaling, AI etc.
But thats ok. Im fine with 10-15fps. ?
I did a video demo about 18 months ago that did 10fps, and I thought it looked OK. My upcoming demo is 20 fps but it's 160x68, and it looks great. Anything in that 10-12-15 fps range should be good.
If you could get away with a vertical stretch, 304x96x8 = 233472, so maybe 20 fps is possible?
New demo uploaded: Wolfenstein 3D - raycasting demo with textures
Posted: Mon Mar 15, 2021 11:16 pm
by desertfish
If you make the textures mirrored across the Y axis you can cut the required texture samples in half again, and just mirror the bottom half from the upper half of the screen.
Don't know if you wanna do this because it may start looking really ugly if the textures are constrained this way perhaps....
Also for non-wall textures (monster sprites?) this surely is a nasty restriction