View unanswered posts | View active topics It is currently Thu Jul 24, 2014 12:58 pm






Reply to topic  [ 5 posts ] 
F-Zero SNES playing robot 
Author Message
Expert
User avatar

Joined: Sat Sep 20, 2008 12:16 pm
Posts: 106
Location: Curently fighting aliens on P3X-828
Post F-Zero SNES playing robot
I have a collection of F-Zero videos from a guy called faust. I was thinking of programing a robot to play F-Zero, and I have been using the videos as research. I would like help in programing the robot. here is my code so far, I still have to make the Include files for the programs so I can make the program in modules:
Code:
#pragma config(Hubs,  S1, HTServo,  HTServo,  none,     none)
#pragma config(Servo,  srvo_S1_C1_1,    servoA,               tServoNormal)
#pragma config(Servo,  srvo_S1_C1_2,    servoB,               tServoNormal)
#pragma config(Servo,  srvo_S1_C1_3,    servoC,               tServoNormal)
#pragma config(Servo,  srvo_S1_C1_4,    servoD,               tServoNormal)
#pragma config(Servo,  srvo_S1_C1_5,    servoE,               tServoNormal)
#pragma config(Servo,  srvo_S1_C1_6,    servoF,               tServoNormal)
#pragma config(Servo,  servo1,          servoG,               tServoNormal)
#pragma config(Servo,  servo2,          servoH,               tServoNormal)
#pragma config(Servo,  servo3,          servoI,               tServoNormal)
#pragma config(Servo,  servo4,          servoJ,               tServoNormal)
#pragma config(Servo,  servo5,          servoK,               tServoNormal)
#pragma config(Servo,  servo6,          servoL,               tServoNormal)
//*!!Code automatically generated by 'ROBOTC' configuration wizard               !!*//

int mode1;
int mode2;
int mode3;
bool boost;
int modetrack;
bool drift;
bool wind;
int track;

task main()
{
  mode1 = 1;
   modetrack = 1;
   while(mode1 == 1)
  {
     if(nNxtButtonPressed == 2)
     {
        --modetrack;
        wait10Msec(100);
     }
     if(nNxtButtonPressed == 1)
     {
        ++modetrack;
        wait10Msec(100);
     }
     if (modetrack == 1)
     {
        eraseDisplay();
        nxtDisplayCenteredTextLine(2, "Mute City");
        if (nNxtButtonPressed == 3)
        {
           ++mode1;
        }
     }
     if (modetrack == 2)
     {
       eraseDisplay();
       nxtDisplayCenteredTextLine(2, "Big Blue");
       nxtDisplayCenteredTextLine(4, "NOT PROGRAMED YET");
     }
   }
}

Any usable code is desired, and anyone who would like to write partial code or full Include files for the project will get credit if their code is used, so no odd off-topic snipits of code to try to get credit.

_________________
:downloading:
Sorry, your program could not be downloaded. Please reboot your computer.
FTC Team #2959 Team Smash Bros CLICK HERE.(or click www)
Quote:
What the world needs is more geniuses with humility, there are so few of us left.

Agreed


Wed Oct 01, 2008 4:31 pm
Profile WWW
Expert
User avatar

Joined: Sat Sep 20, 2008 12:16 pm
Posts: 106
Location: Curently fighting aliens on P3X-828
Post Re: F-Zero SNES playing robot
...

I guess no one else is interested

Anyone?

...

_________________
:downloading:
Sorry, your program could not be downloaded. Please reboot your computer.
FTC Team #2959 Team Smash Bros CLICK HERE.(or click www)
Quote:
What the world needs is more geniuses with humility, there are so few of us left.

Agreed


Thu Oct 02, 2008 5:15 pm
Profile WWW
Moderator
Moderator
User avatar

Joined: Wed Mar 05, 2008 8:14 am
Posts: 3162
Location: Rotterdam, The Netherlands
Post Re: F-Zero SNES playing robot
Sorry mate, I don't have a SNES and I have no idea what F-Zero is :) Can't help you, man.

Xander

_________________
| Professional Conduit of Reasonableness
| (Title bestowed upon on the 8th day of November, 2013)
| My Blog: I'd Rather Be Building Robots
| ROBOTC 3rd Party Driver Suite: [Project Page]


Fri Oct 03, 2008 4:17 pm
Profile WWW
Guru
User avatar

Joined: Sat Mar 01, 2008 12:52 pm
Posts: 1030
Post Re: F-Zero SNES playing robot
I know what f-zero is (Xander: Google is your friend ;-) ) - but I don't have the game and neither a Nintendo nor a servo mux :(

_________________
regards,
HaWe aka Ford
#define S sqrt(t+2*i*i)<2
#define F(a,b) for(a=0;a<b;++a)
float x,y,r,i,s,j,t,n;task main(){F(y,64){F(x,99){r=i=t=0;s=x/33-2;j=y/32-1;F(n,50&S){t=r*r-i*i;i=2*r*i+j;r=t+s;}if(S){PutPixel(x,y);}}}while(1)}


Fri Oct 03, 2008 4:35 pm
Profile
Expert
User avatar

Joined: Sat Sep 20, 2008 12:16 pm
Posts: 106
Location: Curently fighting aliens on P3X-828
Post Re: F-Zero SNES playing robot
I just need basic algorithms for driving. I don't need course specifics.

_________________
:downloading:
Sorry, your program could not be downloaded. Please reboot your computer.
FTC Team #2959 Team Smash Bros CLICK HERE.(or click www)
Quote:
What the world needs is more geniuses with humility, there are so few of us left.

Agreed


Fri Oct 03, 2008 6:00 pm
Profile WWW
Display posts from previous:  Sort by  
Reply to topic   [ 5 posts ] 

Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  



Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.