Loerbeek, Nederland
carving@nielsbrouwers.com

Roku development III: untouchable!

Roku development III: untouchable!

Here we are with part 3 of the ongoing process with the Roku port! First a small note: each of these posts describe a step in the process of bringing the Carter Jones Adventures to the Roku device, however please keep in mind that I can not spend more than about an hour a day on this project because I have a family and day-time job to take care of as well. Thus, each post represents about an hour of real work.

So, after getting things up and running, the first thing to do was map some keys to the Roku remote control so I could navigate to the gameplay part and see how that looks/performs. Doing that was pretty straightforward: just adding in some

s3eKeyboardGetState() 

calls to pick up on the keypress events and we had a game running on the big-screen. Check my Twitter (also on the right of this page for a neat picture of my TV with the Roku just visible on the bottom right). Nice, I could play the first level, albeit with some hick-ups and weird initialization things going on!

Next step was developing some logic for handling the navigation in the user interface. Carter Jones was built for touch-devices and my TV certainly is no touch device. So, I started on the title-screen, introducing something of a ‘focus-concept’, where I highlight the selected user interface element and when OK is pressed a ‘tap’ is registered on that element and the corresponding logic is executed.

I could have made some nice generic framework code to handle this, but because the number of user interface elements in the entire game is relatively small I decided to program this out for each screen separately. This will be a bit more manual labor but it is a proven solution and it does the job (I always tend to embrace the KISS principle here, even if it means a little more ‘work’ for me). 

So for now, the title screen is ready. The following screens are still on the to-do list: levelselect, credits, options1, options2, gamescreen, game-over, level finished. I think I can probably delete the option screens because I can’t adjust the sound from my code and there is no touch-screen, so that leaves little to configure!

Geen reacties

Je reactie toevoegen