? Realistic Raytracer ● SmileBASIC Source

Sign In

Register
*Usernames are case-sensitive
Forgot my password

Realistic Raytracer

Submitted
Updated
Author
Simeon
Public Key
EKR432HE
Min. Compat.
All
Version
1.0
Size
7.8KB
Rating
14 votes
Description A slow, yet realistic raytracing engine that handles sphere luminance, light refractions, and reflections. Notes This is a tech demo to prove that it is possible to do, but this is also very processor heavy and as such, should be considered a benchmark instead of a program.
Categories
Keywords
16 Comment(s) snail_ snail_ QSP Contest 1 Contest Participant I participated in the first SmileBASIC Source QSP Contest! Helper Received for being very helpful around SmileBASIC Source Achievements Amazing Contributor Someone thinks I'm an awesome person who has done so much for the community! Achievements Why doesn't it work anymore? random_god random_god Intermediate Programmer I can make programs, but I still have trouble here and there. Programming Strength QSP Contest 1 Contest Participant I participated in the first SmileBASIC Source QSP Contest! Video Games I like to play video games! Hobbies It still works. It just makes 5x5 blocks instead of smaller ones. To change this, go into the code. There is a variable (forgot whatnit was called) at the very beginning. This variable is set as 5. Set it as something lower for better image (keep in mind it's slower) set as something higher for a horrible image that generates fast. amihart amihart I just get a random assortment of pixels... MochaProbably MochaProbably Expert Programmer Programming no longer gives me any trouble. Come to me for help, if you like! Programming Strength Night Person I like the quiet night and sleep late. Express Yourself Drawing I like to draw! Hobbies https://youtu.be/ghOnicrDT6Q TheV360 TheV360 Pokemon Is Awesome! I love Pokemon! Express Yourself First Day Joined on the very first day of SmileBASIC Source Website Night Person I like the quiet night and sleep late. Express Yourself SmileBASIC unfortunately can't run like this. This demo is running on the 3DS's actual CPU, while SmileBASIC operations have to go through interpreters and functions and abstractions, each slowing them down a little bit. 12Me21 12Me21 Syntax Highlighter Received for creating the code syntax highlighter on SBS Night Person I like the quiet night and sleep late. Express Yourself That's just a silly demo anyway. The 3DS's GPU can produce much better effects at a useful speed. So, you could make something like that in SB, and it would be just as practical (as in, not at all practical) as the homebrew version. snail_ snail_ QSP Contest 1 Contest Participant I participated in the first SmileBASIC Source QSP Contest! Helper Received for being very helpful around SmileBASIC Source Achievements Amazing Contributor Someone thinks I'm an awesome person who has done so much for the community! Achievements There would be a point to this demo if it were rendering a realistic scene and not a few spheres. MochaProbably MochaProbably Expert Programmer Programming no longer gives me any trouble. Come to me for help, if you like! Programming Strength Night Person I like the quiet night and sleep late. Express Yourself Drawing I like to draw! Hobbies So you think maybe possibly you could make this faster? NateDogg1232 NateDogg1232 Night Person I like the quiet night and sleep late. Express Yourself Avatar Taboo I didn't change my avatar for 180 days Website Intermediate Programmer I can make programs, but I still have trouble here and there. Programming Strength Quick thing, to edit the quality of the rendering, change STEPSZ at the beginning 12Me21 12Me21 Syntax Highlighter Received for creating the code syntax highlighter on SBS Night Person I like the quiet night and sleep late. Express Yourself Why is the image so noisy? Simeon Simeon Scholar Received for knowing a great deal about programming topics Achievements Amazing Page Hidden Achievements Drawing I like to draw! Hobbies I've been trying to figure that out too. It isn't supposed to be like that Nathaniel generated this: Not on a 3DS, but that is what the result should look like I will update the key if I can find out what's causing the problem. Simeon Simeon Scholar Received for knowing a great deal about programming topics Achievements Amazing Page Hidden Achievements Drawing I like to draw! Hobbies Simulated floating points I think are a bad idea, usually end up being slower But it's possible that you're correct I don't fully understand the code myself either (since it's a port) so good luck to you but if you are right then the fix is as easy as initializing the variables to 0.0 It's a little late for a response but I'll go back and look at the code, and see if I can improve performance and make the end result look better Thanks! auceps auceps this is scarily good snail_ snail_ QSP Contest 1 Contest Participant I participated in the first SmileBASIC Source QSP Contest! Helper Received for being very helpful around SmileBASIC Source Achievements Amazing Contributor Someone thinks I'm an awesome person who has done so much for the community! Achievements Raytracing* Not to be THAT guy, but raycasting is when you shoot rays into a 2D map to figure out wall distance etc. Ray TRACING is when you follow light rays backward from the camera to the scene. Regardless, nice work. Simeon Simeon Scholar Received for knowing a great deal about programming topics Achievements Amazing Page Hidden Achievements Drawing I like to draw! Hobbies Oh, oops, thanks! PesticidePoison PesticidePoison Good Page Hidden Achievements Spring 2017 Contest Runner Up I placed 2nd in the SmileBASIC Source Spring 2017 Contest! Programming Contest Third Year My account is over 3 years old Website Lol, I was waiting for someone to point that out. (By the way, great work Simeon)