Shop OBEX P1 Docs P2 Docs Learn Events
3072 Sprites demo - Page 2 — Parallax Forums

3072 Sprites demo

2»

Comments

  • RaymanRayman Posts: 14,633
    edited 2023-09-29 22:20

    Another kind of game is the Doom type of raycasters.
    I made an assembly version for the FPGA P2 that probably could fly now with real P2.

    But, also just tried raycastlib with new FlexProp and seems to work now:
    https://codeberg.org/drummyfish/raycastlib/src/branch/master

    This is getting 10 fps in QQVGA resolution (160x120), but perhaps could be helped with more cogs...

  • RaymanRayman Posts: 14,633

    Guess I already got my raycaster working on real p2:
    https://forums.parallax.com/discussion/169389/90s-style-3d-now-with-usb-keyboard-scancodes/p1

    Could definitely use some updating though...

  • Wuerfel_21Wuerfel_21 Posts: 5,051
    edited 2023-09-29 22:39

    Doom isn't raycasting at all. (Infact, raycasting is actually quite a poor technique in most cases - the main benefit is that it's easy to understand. Later Wolf3D ports use a more doom-like technique for better perfomance).

    Where raycasting works kinda backwards and creates the wall by samping occlusion column-by-column, the doom method draws columns for an entire wall at a time. Obviously each column should only be drawn once (disregarding sprites and upper/lower steps where floor ceiling height changes). You could just figure out which wall is closest for each column, but the doom solution is to use a pre-calculated BSP tree to provide total ordering (not necessarily by actual depth) of convex subsectors in the map relative to position and view direction and by-extension an ordering of the walls bounding the subsectors. The walls are iterated front-to-back (skipping subtrees out of view) and any columns already drawn (tracked by ranges of filled columns, not individual column flags) are not drawn over again. When all columns filled, rendering stops. Adding floor/ceiling changes and making them co-operate with sprites is another can of worms.

  • RaymanRayman Posts: 14,633
    edited 2023-09-29 23:26

    Shouldn’t have said doom, that is a bit more advanced. But this stuff is better than wolf3d
    Raycastlib looks close to Doom though...

  • RaymanRayman Posts: 14,633

    Quake was the one with the more sophisticated algorithms…

Sign In or Register to comment.