Raycaster POC #132
Replies: 5 comments 9 replies
-
Hi, I've changed calculations from float to fixed point math and now raycasting calculation is few times faster. |
Beta Was this translation helpful? Give feedback.
-
Changing from float to fixed point calculations along with optimized rectangle drawing gave quite an speed improvement. raycaster_20241108.mp4 |
Beta Was this translation helpful? Give feedback.
-
Hi, I've managed to speed this up and added floor shading. raycaster_20241112.mp4 |
Beta Was this translation helpful? Give feedback.
-
I've made some progress. Textures seems to work quite well. I'm also using whole 320x180 screen. Still a lot of work but I think I'm going forward. Now I have to add sprites. raycaster_20241206.mp4 |
Beta Was this translation helpful? Give feedback.
-
I wonder if I can use some sprites along with normal bitmap graphics. Now I'm loading converted image as full screen asset like this:
Video mode is set like this:
Then I draw other stuff as normal pixels, lines etc. It would look much better if instead of simple drawing the compass needle using lines I could put sprite there and just rotate it. |
Beta Was this translation helpful? Give feedback.
-
Hi,
I've tried to write simple raycaster. It kinda works, but it's really slow.
Part of this is due to drawing filled rects which you can see when screen is updating.
I know that using floats for calculations is bad idea for 6502.
I've tried to replace some of those operations with integer math with scaling. It's little bit faster but gives me some errors so I've left floating math version for now.
Code is available here: https://github.com/grakoczy/RP6502-raycasting-llvm-mos
Maybe someone with more skills will be able to make it run faster?
Anyway it's a lot of fun writing programs for this little machine :)
raycaster.mp4
Beta Was this translation helpful? Give feedback.
All reactions