One Player Games

One Player Games

Postby mrmm314 » Sun Jan 23, 2011 9:02 pm

Has anyone written any single player games for this shield? I only have one nunchuck, and I am trying to write some games, but I want something to do with my shield while my programs are in progress.
mrmm314
 
Posts: 2
Joined: Sun Jan 23, 2011 8:55 pm

Re: One Player Games

Postby layne » Sun Jan 23, 2011 10:33 pm

Hello! We've got a really nice single player game that was recently released. A clone of Tetris was adapted by Myles (the TVout library author) and we extended it to work with the Video Game Shield's Nunchuck or Classic Controller interface. You should be able to use it with a single Nunchuck.

You can find Tetris in the examples folder under Video Game Helpers in the Arduino IDE after you've installed the Video Game Shield libraries, either from the zip file download, or from github.

Let us know if you run into any issues with the Tetris code.
Matthew "Layne" Beckler - Wayne and Layne, LLC - http://wayneandlayne.com/
layne
Wayne and Layne staff
 
Posts: 156
Joined: Thu Aug 19, 2010 12:51 pm
Location: Pittsburgh, PA, USA

Re: One Player Games

Postby mrmm314 » Fri Jan 28, 2011 12:59 am

Thanks for the info. Do you happen to have a comprehensive list or index of the way that your functions and commands work? and the syntax info? I think that would thoroughly help me get better acquainted with the strength of your libraries, and I could make that fit with what I want to do.
mrmm314
 
Posts: 2
Joined: Sun Jan 23, 2011 8:55 pm

Re: One Player Games

Postby layne » Fri Jan 28, 2011 8:48 am

The VideoGameHelper library has some useful functions in it. All of our example games are also packaged as examples for this library. If you look at the VideoGameHelper.h file, here are the helper functions defined:

title_screen_init_nunchucks()
This function initializes nunchucks, displays the game title, and ensures that the proper minimum number of controllers have been connected.

question_box()
Displays a question and multiple choice answers, allowing the user to select one of them.

nunchuck_calibration()
This is a wizard-like series of screens to allow you to calibrate a nunchuck. Probably the most useful of these functions.

high_score_get_name()
Asks the player to enter in their three initials. Doesn't do any high-score saving or anything, just the user input for the initials.

high_score_show_list()
Shows a list of high scores. Doesn't do any high-score loading or anything, just displaying a list of names and scores.

So yeah, the functions aren't totally awesome, but some might be useful to you. You might also want to read the code from the example sketches, as there is a lot of useful stuff in there. Good luck!
Matthew "Layne" Beckler - Wayne and Layne, LLC - http://wayneandlayne.com/
layne
Wayne and Layne staff
 
Posts: 156
Joined: Thu Aug 19, 2010 12:51 pm
Location: Pittsburgh, PA, USA


Return to Programming

Who is online

Users browsing this forum: No registered users and 0 guests

cron