Roku Developer Program

Developers and content creators—a complete solution for growing an audience directly.
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Level 7

3D Raycaster Game Demo

Hey guys, just messing around with the Roku again and coded up a little raycasting demo. It's not much at the moment, but it does work and can be a decent starting point for a full fledged game. Check it out:

*** Trevor Anderson - - ***
0 Kudos
1 Reply
Roku Employee
Roku Employee

Re: 3D Raycaster Game Demo

Very cool.

It does work on older devices, but, kinda annoyingly slow. Made a few tweaks to see if I could improve the speed, but not much improvement on older devices, some significant improvement on Roku2, however:

BtnPrs = Msg.getmessage()

eliminates the wait delay

in Createworld():

m.WorldMaxX = (20 * 1024) - 1 'Maximum coord still on the map
m.WorldMaxY = (20 * 1024) - 1 'Maximum coord still on the map

create constants for things that always calculate out to the same value, including replacing 3.14159/180 with 0.0174533 on the Scrn.Drawline at the end of the drawworld function

moved "SetAlphaEnabled(false)" to the line following the creation of the roScreen and removed alpha from the loop, don't see any problems without it.
0 Kudos