Jump to content
gfvh

Very crude raycaster

Recommended Posts

Hello. This is a very crude and horrendous raycaster I made. It is devoid of any complex math, just matrix comparisons.

The screen is rotated 90 degrees to take advantage of the Player Field graphics.

There is a little map below to show where you are and the structure of the walls in the world.

I didn't test it in Stella yet.

 

Source code: http://mauisland.byethost24.com/vh/ray2-6.txt

 

Thanks!!!

ray.bin

Edited by gfvh
  • Like 1

Share this post


Link to post
Share on other sites

I tested it in an emulator for android that I suppose it's based on Stella. It worked. But it is so horrible this raycaster that you may think it is not working :)

Share this post


Link to post
Share on other sites

I tested it in an emulator for android that I suppose it's based on Stella. It worked. But it is so horrible this raycaster that you may think it is not working :)

Thanks for verifying this.

Share this post


Link to post
Share on other sites

It runs in Stella 5, too (actually, we are not currently aware of any broken ROM at all). However, your frame height seems to be inconsistent during movement --- this causes jitters on real CRTs (and on Stella if TV emulation is turned on). Also, moving backwards doesn't seem to work, either.

Share this post


Link to post
Share on other sites

Yes, during movement is where the tracing occurs, so it takes some time, but I think I can fix it using a timer, I'm not using timers. I will check not being able to go backwards. But in javatari it works. I am using javatari because I can't install Stella in my workplace ;)

Share this post


Link to post
Share on other sites

Didn't work for me in either Stella 4, Stella 5 or 6502.ts (provided back is 'joystick back') :) I haven't checked in real hardware though.

Edited by DirtyHairy

Share this post


Link to post
Share on other sites

By the way, it works really good in 6502.ts, great emulator. It made an awful code like mine to run smoothly.

Edited by gfvh

Share this post


Link to post
Share on other sites

By the way, it works really good in 6502.ts, great emulator. It made an awful code like mine to run smoothly.

 

Thanks :) I think what you are seeing is the result of 6502.ts being very (as in unrealistically) tolerant about frame timings.

Share this post


Link to post
Share on other sites

I guess I know why you cannot go backwards. Maybe you are playing with the first version. It's my fault I named both ray.bin. The first version allows you to rotate left and right and moving forward but not backwards. The second version allows you to go left and right (no rotation) and forward and backwards.

Share this post


Link to post
Share on other sites

I guess I know why you cannot go backwards. Maybe you are playing with the first version. It's my fault I named both ray.bin. The first version allows you to rotate left and right and moving forward but not backwards. The second version allows you to go left and right (no rotation) and forward and backwards.

 

Indeed, you're right. Going back works fine with the newer version. I thought I had tried that one before, but obviously, I messed up :) Sorry for the hassle!

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...