3D raycasting

Pagina 16/16
9 | 10 | 11 | 12 | 13 | 14 | 15 |

Van mars2000you

Enlighted (6260)

afbeelding van mars2000you

06-02-2012, 00:50

There's indeed a big difference for the speed between both emulators in this case ... Something to fix obviously ! Wink

Btw, nice SCC music ! Cool

Van cavas10702

Supporter (3)

afbeelding van cavas10702

24-05-2022, 14:29

I am sorry to bring back that thread from the grave but I am trying to understand the code (https://github.com/artrag/mz3d2) and sadly struggling.
I was hoping to improve my chances by debugging the binaries but can't find the latest botsdemo.dsk anymore.
Does anyone still have it ? @artrag maybe ?

Van ARTRAG

Enlighted (6846)

afbeelding van ARTRAG

24-05-2022, 22:35

Its C ans ASM sources are here
https://github.com/artrag/mz3d2

Van ARTRAG

Enlighted (6846)

afbeelding van ARTRAG

24-05-2022, 22:53

To run it, just download the whole repository and expand it in a directory.
Mount the directory with dirasdisk on openmsx, select Panasoninc FS-A1GT as machine and start the emulator.
Pressing CTR during the boot you get mouse supprt, do not do that if no mouse is pugged.

If you turn right very soon, just after the start of the demo you will see a walking robot that is going to leave the room where you are, you can follow it to see its full animation.

If you edit the file dungeon.txt you can decide the shape of the level, which texture is applied to each wall, where you start in the game and where the robots will be.

P is the player
0-7 are walls with different textures
C,D,E,F,X are sprites
I cannot recollect which letter is the walking enemy but I remember that there has to be a list of "nodes" that compose its path.
Let me know if you want to continue the project!

Van cavas10702

Supporter (3)

afbeelding van cavas10702

25-05-2022, 00:42

Thank you very much for your help, I got it running with disk as drive and was able to attach the debugger.
At this point I am only trying to understand what you did in detail, and there is a lot to digest. This code is quite an achievement !

Van ARTRAG

Enlighted (6846)

afbeelding van ARTRAG

25-05-2022, 20:24

The npc movement is in the AI subdirectory.
It was a draft but has a nice feature, the speed of the robot is independent by the frame rate

Van erpirao

Paragon (1264)

afbeelding van erpirao

25-05-2022, 20:51

I don't want to get excited... but
to msx?

Van ARTRAG

Enlighted (6846)

afbeelding van ARTRAG

25-05-2022, 21:06

Mine is closer to Wolfstain than to Doom

Van cavas10702

Supporter (3)

afbeelding van cavas10702

03-06-2022, 09:27

I think I got the dda, but I am having a hard time understanding tex_coord, not clear to me how it could work.

Van ARTRAG

Enlighted (6846)

afbeelding van ARTRAG

03-06-2022, 18:36

It is in asm, look for texcoord.asm.
It is more tahn 10 years since I've seen this code last time...
From what I can remeber it returns the colum number of the texture on the wall hit by the ray. It is using x,y of the ray at the hit point and the direction and side of the solid block hit.

Pagina 16/16
9 | 10 | 11 | 12 | 13 | 14 | 15 |