Roku Developer Program

Join our online forum to talk to Roku developers and fellow channel creators. Ask questions, share tips with the community, and find helpful resources.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Trevor
Visitor

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 1
RokuJoel
Binge Watcher

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