View Single Post
Old 17 April 2021, 23:48   #1
mateusz_s
Registered User
 
Join Date: Jan 2020
Location: Poland
Posts: 181
[C, RTG] My raycaster funtime - sharing code and progress..

Source codes. Executables for Amiga and Windows.
https://github.com/mateusz83/msRay

--- UPDATE - 26.08.2022 ---

msDevPack v0.33 features:
- wall/floor/ceiling textures
- new, faster floor/ceiling render algorithm (based on screen projection and clipping)
- mipmaps (256x256 --> 32x32)
- baked lightmaps
- distance shading
- glowing pixels


video:
[ Show youtube player ]


--- UPDATE - 05.07.2022 ---

msDevPack v0.32 features:
- wall/floor.ceiling textures
- mipmaps (256x256 --> 4x4)
- baked lightmaps
- distance shading
- glowing pixels

Test video (includes V1200 test):
[ Show youtube player ]

Source code. Check out if you are interested in RTG coding,
Amiga framework, ReAction etc.:
https://github.com/mateusz83/msRay/t..._devpack_v0.32

Executables for testing:
http://mstanisz.website.pl/tmp/amiga/msRay-32.zip



--- UPDATE - 15.01.2022 ---

Hello again,
I send some time optimizing the engine and adding features.

Right now I have on V1200:
- 320x200x32 - average 50 fps, near the walls its 70-80 - generally its fast and smooth.
- 640x400x32 - average 16-18 fps (slowly but playable)

Check out demo level (this video is from WinUae)
[ Show youtube player ]

Also check out how its working on Emu68 in INSANE resolutions
[ Show youtube player ]

Checkout the exec yourself (needs RTG)
https://mstanisz.website.pl/tmp/amig...v0.31-exec.zip

The whole "devpack" with all sources (PC and Amiga, editor etc)
https://mstanisz.website.pl/tmp/amig...pack_v0.31.zip

The simplify "devpack" with Amiga sources only:
https://mstanisz.website.pl/tmp/amig...31--SIMPLE.zip



--- 17 April 2021, 23:48 ---


Hi,
Recently I spent some time to develop my Racycaster thinking mostly about Vampire accelerators. But the main point was to test the RTG possibilities and render something at 24 or 32 bits.

Right now, I get to this point (with 1:1 pixels)
- 320x240x32 - about 15-18 fps
- 640x480x32 - about 4-5 fps
on Vampires, the Warp 1260 at now is about 2-3x slower, but as far as I know the RTG is noy yest fully optimized

but please note that these are my coding limits not Vampire or Warp limits


VIDEO OF MY RECENT PROGRESS:
[ Show youtube player ]


I was coding in C, I don't know assembler so I don't think I can optimize the speed any further by now.
But the engine like this should problably works on Vampire like at least 40-50 fps in 320x240x32 and maybe at least 20 in 640x480x32..
it was my first RTG and System Amiga coding attempt, I am glad of the results so far. I hope I will back soon to this project
and optimize it much better.

The textured walls itselfs with shading was very fast even in 640x480x32, but adding floors and ceiling slow donwn everything. They can't be so much optimized as walls.

I also wrote a Launcher that scans thru available display modes (in fullscreen or window) that can be filtered and formated by user.


NOTE!
I would like to share my code to encourage users and coders to use more RTG modes and higher resolutions or color depths.
I would like also to hear your opinion and maybe ideas to optimize the performance
Probably the floor/ceiling is the major problem right now..


DOWNLOADS:
1. exec from the VIDEO: http://mstanisz.website.pl/tmp/amiga/ray8.zip
(works only on 32bit - fullscreen or window)

2. all C sources including Launcher application: http://mstanisz.website.pl/tmp/amiga/ray8-source.zip

3. C source with only main render loop to look up: http://mstanisz.website.pl/tmp/amiga...ender-loop.zip


KNOWLEDGE SOURCES
For people interested in Raycasting and graphisc programming I am sharing
some links:

1. probably the best Raycaster approach and tutorial: https://lodev.org/cgtutor/index.html

2. different Raycasting approach: https://permadi.com/1996/05/ray-cast...e-of-contents/

3. Watch 3 minutes of this clip first to get the idea: [ Show youtube player ]

4. wolf3d algorithm expalined: [ Show youtube player ]

5. javidx9 (aka One Lone Coder) - yout tube channel - lots of inspirations and knowledge: https://www.youtube.com/channel/UC-y...UJZvieEligKBkA

6. Graphic Gems book series (I-V) lots of graphics algorithms

7. Pikuma Raycasting course - trigonometric approach: https://courses.pikuma.com/courses/raycasting-c

8. another channel with cg aspects coding: [ Show youtube player ]

9. and another yt channel: https://www.youtube.com/user/Bisqwit

Last edited by mateusz_s; 19 April 2023 at 00:23.
mateusz_s is offline  
 
Page generated in 0.04410 seconds with 11 queries