Roku Developer Program

Developers and content creators—a complete solution for growing an audience directly.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Highlighted
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: http://bloggingwordpress.com/2012/08/roku-3d-raycaster-demo/

*** Trevor Anderson - bloggingwordpress.com - moviemavericks.com ***
0 Kudos
1 Reply
Highlighted
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.WorldMaxX10=m.worldmaxX/1024
m.WorldMaxY = (20 * 1024) - 1 'Maximum coord still on the map
m.WorldMaxY10=m.worldmaxY/1024


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