Spectrum wolfenstein engines?
category: general [glöplog]
I can hardly think of some wolfenstein engines in Speccy demos. I only remember Digital Reality's Doom z80, which was not using realtime texturing or some precalculated algorithm rather than stil gfx that changed according to the angle. I think..
But I can't remember having seen many wolf3d engines in demos, while in C64 demos I see a lot of them. Speccy is faster than C64 so I thought there would exist this kind of routine.
I want to have a look to some wolf3d engines, since I was thinking fake or not ways to do it on CPC which has a z80 too. I just want to see what spectrum is capable to do with wolfenstein3d engines. Suggest me any demos I missed, good or bad no matter, only matters that I will have a look at wolf3d spectrum z80 engines. The most famous demos don't have wolf3d as I remember, but they have a lot of gouraud/phong objects and stuff sometimes. Weird..
But I can't remember having seen many wolf3d engines in demos, while in C64 demos I see a lot of them. Speccy is faster than C64 so I thought there would exist this kind of routine.
I want to have a look to some wolf3d engines, since I was thinking fake or not ways to do it on CPC which has a z80 too. I just want to see what spectrum is capable to do with wolfenstein3d engines. Suggest me any demos I missed, good or bad no matter, only matters that I will have a look at wolf3d spectrum z80 engines. The most famous demos don't have wolf3d as I remember, but they have a lot of gouraud/phong objects and stuff sometimes. Weird..
...Wolfenstein 3d is soooo passé, they have DOOM on Spectrum :)
No ideas for the demos though...
No ideas for the demos though...
Any Spectrum emulators out there? I never had any experience with Spectrum :)
Exocet: Yes,. that's the Digital Reality DOOM Z80 game I am writting. Nice screenshot! Still it is a wolfenstein style engine with the monsters and gfx from Doom, no 8bit has ever done a Real DOOM style engine (Meaning not only right angle walls, diferrent sector heights and more complex stuff), all the 8bit so called DOOM engines are more simplistic wolfenstein algorithms (I think they are called raycasters) which are just called DOOM because it was more famous :)
Anyways,. what the hell I am ranting about there? I just remember I may have seen just one wolfenstein engine on spectrum with these 4*4 dithered grayscale blocks which looks sort of interesting, but in an not so known demo,. and nothing more. Perhaps the spectrum sceners in pouet would know some more example of Speccy demos with wolf3d engines..
Anyways,. what the hell I am ranting about there? I just remember I may have seen just one wolfenstein engine on spectrum with these 4*4 dithered grayscale blocks which looks sort of interesting, but in an not so known demo,. and nothing more. Perhaps the spectrum sceners in pouet would know some more example of Speccy demos with wolf3d engines..
Wain: http://users.auth.gr/~mkargas/olinks14.htm
Let me see...
RealSpec emulator link still works! (http://www.ramsoft.bbk.org/realspec.html)
The other link doesn't work.. or I think so. The other nice old emulator I was using was X128. And mostly because of the speed. But now RealSpec is much better and I have a fast enough PC too. I mainly use this..
Let me see...
RealSpec emulator link still works! (http://www.ramsoft.bbk.org/realspec.html)
The other link doesn't work.. or I think so. The other nice old emulator I was using was X128. And mostly because of the speed. But now RealSpec is much better and I have a fast enough PC too. I mainly use this..
well, DOOM is a raycaster too, except it uses a 2d bsp to speed up the casting, whereas Wolfenstein did it on a regular-spaced grid.
</blah>
</blah>
i think stellar contour by brainwave had a "doom" engine.
sagacity: no. Doom used perspective correct texturemapping but only for horizontal walls. I mean instead of calculating free movement triangles or quads, they calculated only a starting wall slice, an ending wall slice, they intepolated thru it and used perpective correct texture mapping horizontally and linear vertically. I tried to reproduce that using a simple wolf-3d like grid (even if i could use other, more free format, but i'm lazy to write a map editor, a map loader and a more complex collision detection than if (map[camera_y >> 7][camera_x >> 7]) // collide :-)) and i ended in that:
http://homepages.pathfinder.gr/badsector/badlab.htm
(ya, it sucks...)
however i didn't used perspective correct texturemapping :-)
Optimus: i could say you how to do somehow "perspective" correct wolf-3d engines without using raycasting (which is very expensive for spectrum) and you may do it in Spectrum (i would like to see it in my spectrum if you do it). Is a simple way i think and yes, it needs lots of precalculation :-)
http://homepages.pathfinder.gr/badsector/badlab.htm
(ya, it sucks...)
however i didn't used perspective correct texturemapping :-)
Optimus: i could say you how to do somehow "perspective" correct wolf-3d engines without using raycasting (which is very expensive for spectrum) and you may do it in Spectrum (i would like to see it in my spectrum if you do it). Is a simple way i think and yes, it needs lots of precalculation :-)
don't take the pill, go to eat kebbabs !
Use a voxel space raycasting to make the things easier and fast. If you want to use Breseham, use a modified Breseham one, wich pass by all the voxels interesected by a line. Else, use DDA or something similar, for 2D I think the best is modified Breseham.
BadSector: uh, so what you just described is raycasting on a 2d bsp, which is obviously *completely* different from what I said Doom used...
@sagacity:
you said: "well, DOOM is a raycaster too, except it uses a 2d bsp to speed up the casting, whereas Wolfenstein did it on a regular-spaced grid."
i said "no" :-)
DOOM doesn't use raycasting, but texture mapped orthogonal walls (orthogonal in 3d space). The rendered is based on 2d bsp, which tells to the engine which walls to draw. But doesn't have to do anything with raycasting. It's just some kind of "limited" texture mapping on quads (the limits are that walls are always 90 degrees with the floor, and can only be rotated around the Y axis).
The method that i used doesn't have anything to do with raycasting (except perhaps that because i used a 2d grid as the source for the map [note that internally the grid is translated to walls] it looks like some common raycasting engines).
you said: "well, DOOM is a raycaster too, except it uses a 2d bsp to speed up the casting, whereas Wolfenstein did it on a regular-spaced grid."
i said "no" :-)
DOOM doesn't use raycasting, but texture mapped orthogonal walls (orthogonal in 3d space). The rendered is based on 2d bsp, which tells to the engine which walls to draw. But doesn't have to do anything with raycasting. It's just some kind of "limited" texture mapping on quads (the limits are that walls are always 90 degrees with the floor, and can only be rotated around the Y axis).
The method that i used doesn't have anything to do with raycasting (except perhaps that because i used a 2d grid as the source for the map [note that internally the grid is translated to walls] it looks like some common raycasting engines).
Yeah! Continue writting on this thread. They are all interesting for me..
The question: I have done a buggy raycaster with the oldest technique (intersections in a grid). Would be the fastest way for such simple engines we see in 8bits,. or the method of interpolating beetween the starting slice and the ending slice of a wall would proove faster in some cases? The only problem would be to find the specific slices at the coordinates of where two walls meet, that I have to interpolate beetween. BSP? I should look that! What kind of algorithm does most of the 8bit wolf3d engines use? Also asked to the C64 guys too, if they know..
The question: I have done a buggy raycaster with the oldest technique (intersections in a grid). Would be the fastest way for such simple engines we see in 8bits,. or the method of interpolating beetween the starting slice and the ending slice of a wall would proove faster in some cases? The only problem would be to find the specific slices at the coordinates of where two walls meet, that I have to interpolate beetween. BSP? I should look that! What kind of algorithm does most of the 8bit wolf3d engines use? Also asked to the C64 guys too, if they know..
I was thinking and writting theoritical z80 routines yesterday for doing the output of the vertical slices. Some very optimum ones, with very precalculated unrolled speedcode for each slice! But just for the output. The non texture (flat like in this ) will be even faster and more easy to do, with the Z shading and dithering, the texture is not that hard either but I am not sure about CPC memory. I was thinking to do a little part with these slice speedcodes (how the C64 coders call the loop unrolled routines), where I will get all the Z values (distances from wall slices) at each frame precalculated. Like a video animation but with realtime output and not playable. It still needs a lot of memory and I would be able only to display less than 1000 frames, depending on many things. Then I was thinking to precalculate only the distances from the starting and ending slices of the walls and interpolate. But I have to get oneday how to optimize the floating point based raycasting of my engine for real use in the CPC. At least I have thought the slice output routine which prooves to be very fast for my needs!
This means that I still haven't thought of how to do a real wolfensteing engine for CPC but I know I can code a fake unplayable animation one with precalculated Zs and realtime fast speedcodes for each diferrent slice size!
there are several wolfenstein-alike engines done on speccy, much better looking than DR's "doom" cause that one is faked. in a smaller windows mostly tho.. one i can recall at the moment was by cobra/another world i think but i only have it on 5.25" floppies. the other one is part of PHT demo we wanted to release at enlight'97 but never did, i think i still have all the sources so i could find it for you optimus, maybe u're lucky enough to port it over to CPC.
BadSector: *HOW* is that not raycasting? it uses raycasting to determine the height of the vertical wallslices to draw, that's why it doesn't support rotation of the viewport for instance. but you're obviously the expert here.....
Sagacity: Raycasting is not the algorithm which determines the height of a vertical slice from the wallslice distance. This is the next step.
Raycasting casts rays inside the viewing angle. If the screen 320 in width, then we have to cast 320 rays from the left to the right of the viewing angle (which corresponds with the 320 vertical slices of the screen) and trace each ray till it hits any wall or object. If a ray hits something, then we calculate the distance from the eye to that specific wall slice. Now comes the part where according to the distance, we calculate the height of a slice, scale it and output it in our screen buffer. Raycasting is before that..
Doom doesn't use the raycasting algorithm of wolfenstein engines as far as Bad Sector had explained me oneday. I don't know about BSPtrees and how they work though. But if you find the distance of some specific slices, where some walls start, end, intersect or connect(This may need a scheme), then you can interpolate and find the intermediate Z values beetween them, after that calculate the slice heights for each Z. But you don't need to cast rays inside the viewing angle to find these Zs. The very few basic of them are found with algorithms like BSPtrees and the inbeetween with interpolation. I think. Grr,. I have to read about BSPtrees, I don't know nothing, it starts becoming interesting.. ;P
Correct me if I did any mistake, cause I also may miss some things in here..
Raycasting casts rays inside the viewing angle. If the screen 320 in width, then we have to cast 320 rays from the left to the right of the viewing angle (which corresponds with the 320 vertical slices of the screen) and trace each ray till it hits any wall or object. If a ray hits something, then we calculate the distance from the eye to that specific wall slice. Now comes the part where according to the distance, we calculate the height of a slice, scale it and output it in our screen buffer. Raycasting is before that..
Doom doesn't use the raycasting algorithm of wolfenstein engines as far as Bad Sector had explained me oneday. I don't know about BSPtrees and how they work though. But if you find the distance of some specific slices, where some walls start, end, intersect or connect(This may need a scheme), then you can interpolate and find the intermediate Z values beetween them, after that calculate the slice heights for each Z. But you don't need to cast rays inside the viewing angle to find these Zs. The very few basic of them are found with algorithms like BSPtrees and the inbeetween with interpolation. I think. Grr,. I have to read about BSPtrees, I don't know nothing, it starts becoming interesting.. ;P
Correct me if I did any mistake, cause I also may miss some things in here..
sure, it doesn't use the same algo as wolfenstein, but it's still the same basic principle. you take a 2d shape, and then cast rays against that shape to find out the distance of the intersection point from the viewer's position. if you do this in a step-based approach like wolfenstein, or if you just collision against a 2d bsp-tree, it's still casting a ray: only the method of finding the collision is different.
at least try to get your terminology right before you claim something is or is not what you're immediately familiar with.
at least try to get your terminology right before you claim something is or is not what you're immediately familiar with.
Unfortunatelly I am not familiar with BSP trees. But what I know about Doom is that it of course uses a 2dmap still, it scales vertical slices after finding the Z distances for them, but Bad Sector told me it doesn't cast rays anymore to determine Z distances, rather than using BSP algorithm and then interpolating for that. Let's better hear Bad Sector's view about that..
Thanks for the few spectrum wolfenstein suggestions, even few ones. I will search for the demos..
Raver: I would love to get that wolf3d z80 source and/or binary demo in my hands and have a look at it(I hope I can understand few things in there, hehe :). Should I send you an email and remind you or could you send it to me directly?
Raver: I would love to get that wolf3d z80 source and/or binary demo in my hands and have a look at it(I hope I can understand few things in there, hehe :). Should I send you an email and remind you or could you send it to me directly?
Hey TeXeL, did you got my emails? I think I had asked you about that voxel head twice but didn't got a reply!
optimus, again, just because it uses a BSP algorithm doesn't mean it doesn't cast rays anymore.
optimus: at least I runned stellar contour in unrealspeccy. Just open the file. LOAD in trdos, and select stellar (or something, with your mouse?).