LET movex = 0LET movey = 0CREATESPRITE 1, "star", TRUE  //This is the backgroundMOVESPRITE 1, -1250, -1350, trueCREATESPRITE 3, "ship", TRUE  //The Player's SpriteMOVESPRITE 3, 285, 130ON TIMER 2 //The background moves every 2 miliseconds  PUSHSPRITE 1, movex, movey //Moves the BackgroundEND TIMER
SELECT CASE KEY$ CASE UPARROW$  RECREATESPRITE 3, "ship" //changes ship direction to Up  IF movey < 20 THEN  //Max speed of ship LET movey = movey + 1 //Acceleration of Ship  END IF CASE DOWNARROW$  RECREATESPRITE 3, "shipdown" //changes direction to down  IF movey > -20 THEN LET movey = movey - 1  END IF CASE LEFTARROW$  RECREATESPRITE 3, "shipleft" //changes direction to left  IF movex < 20 THEN LET movex = movex + 1  END IF CASE RIGHTARROW$  RECREATESPRITE 3, "shipright"//changes direction to right  IF movex > -20 THEN LET movex = movex - 1  END IF END SELECT
LET movex = 0  //X axis movement variableLET movey = 0  //Y axis Movement variableLET up1 = 0  //walking animation for upLET down1 = 0 //walking animation for downLET left1 = 0  //walking animation for leftLET right1 = 0  //walking animation for rightLET tup = 1  //variable to allow sprite to turn immediatelyLET tdown= 1  //variable to allow sprite to turn immediatelyLET tleft = 1  //variable to allow sprite to turn immediatelyLET tright = 1  //variable to allow sprite to turn immediatelyCREATESPRITE 1, "scrollbg", TRUE //backgroundMOVESPRITE 1, -750, -1150, trueCREATESPRITE 2, "mandown", TRUE  //player spriteMOVESPRITE 2, 285, 130ON TIMER 2  PUSHSPRITE 1, movex, movey //moves background  IF dir$ = "up" then  //If the Direction of the player is up then...    IF movey > 1 THEN  //If speed of Player is greater then 1 then...     IF up1 = 0 then  //This is checking which walking animation it is on...       RECREATESPRITE 2, "manup" //This changes the animation to look like it is walking     END IF     IF up1 < 4 then  //Now it repeats for the other direciton       LET up1 = up1 + 1     ELSE IF up1 = 4 then       RECREATESPRITE 2, "manup1"       LET up1 = -3     END IF    END IF  END IF  IF dir$ = "down" then  //Now this does the same animation for the down direction    IF movey < -1 THEN     IF down1 = 0 then       RECREATESPRITE 2, "mandown"     END IF     IF down1 < 4 then       LET down1 = down1 + 1     ELSE IF down1 = 4 then       RECREATESPRITE 2, "mandown1"       LET down1 = -3     END IF    END IF  END IF  IF dir$ = "left" then  //Now this does the same animation for the left direction    IF moveX > 1 THEN     IF left1 = 0 then       RECREATESPRITE 2, "manleft"     END IF     IF left1 < 4 then       LET left1 = left1 + 1     ELSE IF left1 = 4 then       RECREATESPRITE 2, "manleft1"       LET left1 = -3     END IF    END IF  END IF  IF dir$ = "right" then //Now this does the same animation for the right direction    IF movex < -1 THEN     IF right1 = 0 then       RECREATESPRITE 2, "manright"     END IF     IF right1 < 4 then       LET right1 = right1 + 1     ELSE IF right1 = 4 then       RECREATESPRITE 2, "manright1"       LET right1 = -3     END IF    END IF  END IF    IF movex > 0 then  //If positive X-Axis speed is greater than Zero then...    LET movex = movex - 1  //This decreases the speed to stop.  END IF  IF movex < 0 then  //does the opposite as the one above.    LET movex = movex + 1  END IF  IF movey > 0 then  //This does the same as the movex but it is for the Y axis    LET movey = movey - 1  END IF  IF movey < 0 then    LET movey = movey +1  END IFEND TIMER
SELECT CASE KEY$ CASE UPARROW$IF tup = 1 then  //checks if sprite has just turned to up direction, if so, changes direction immediatelyRECREATESPRITE 2, "manup" LET movey = movey + 4 //gives a speed boost to look naturalLET tup = 0LET tdown = 1 LET tright = 1LET tleft = 1END IF  IF movey < 5 THEN  //Top speed player can move LET movey = movey + 2  //acceleration of player  END IF LET dir$ = "up"CASE DOWNARROW$ IF tdown = 1 thenRECREATESPRITE 2, "mandown" LET movey = movey - 4LET tup = 1LET tdown = 0LET tright = 1LET tleft = 1END IF  IF movey > -5 THEN LET movey = movey - 2LET dir$ = "down"  END IF CASE LEFTARROW$ IF tleft = 1 thenRECREATESPRITE 2, "manleft" LET movex = movex + 4 LET tup = 1LET tdown = 1LET tright = 1LET tleft = 0END IF  IF movex < 5 THEN LET movex = movex + 2 LET dir$ = "left"  END IF CASE RIGHTARROW$ IF tright = 1 thenRECREATESPRITE 2, "manright"LET movex = movex - 4LET tup = 1LET tdown = 1LET tright = 0LET tleft = 1END IF  IF movex > -5 THEN LET movex = movex - 2LET dir$ = "right"  END IF END SELECT
the download didnt work for me, i was looking at the code and it doesnt even look like it can handle boundries. you should at least expain what makes it so advancedI can convert gm to sc, but not sc to gm, silver probly can
i can convert gm to sc, but not sc to gm, silver probly can
Code: [Select]LET movex = 0LET movey = 0CREATESPRITE 1, "star", TRUE  //This is the backgroundMOVESPRITE 1, -1250, -1350, trueCREATESPRITE 3, "ship", TRUE  //The Player's SpriteMOVESPRITE 3, 285, 130ON TIMER 2 //The background moves every 2 miliseconds  PUSHSPRITE 1, movex, movey //Moves the BackgroundEND TIMER
backgroundsprite$ = "Star.gif"playersprite$ = "Ship Up.gif"moveX = 0moveY = 0playerX = 285playerY = 130SPRITE 1 -1250 -1350 $backgroundsprite$$SPRITE 3 playerX playerY $playersprite$$ON TIMER 2 Â SPRITE 2 moveX moveYEND TIMER
Key Down:Code: [Select]SELECT CASE KEY$ CASE UPARROW$  RECREATESPRITE 3, "ship" //changes ship direction to Up  IF movey < 20 THEN  //Max speed of ship LET movey = movey + 1 //Acceleration of Ship  END IF CASE DOWNARROW$  RECREATESPRITE 3, "shipdown" //changes direction to down  IF movey > -20 THEN LET movey = movey - 1  END IF CASE LEFTARROW$  RECREATESPRITE 3, "shipleft" //changes direction to left  IF movex < 20 THEN LET movex = movex + 1  END IF CASE RIGHTARROW$  RECREATESPRITE 3, "shipright"//changes direction to right  IF movex > -20 THEN LET movex = movex - 1  END IF END SELECT
ON KEYDOWN Â IF keydown$ = "UPARROW" THEN Â Â playersprite$ = "Ship Up.gif" Â Â SPRITE 3 playerX playerY $playersprite$$ Â Â IF moveY < 20 THEN moveY = moveY + 1 Â END IF Â IF keydown$ = "DOWNARROW" THEN Â Â playersprite$ = "Ship Down.gif" Â Â SPRITE 3 playerX playerY $playersprite$$ Â Â IF moveY > -20 THEN moveY = moveY - 1 Â END IF Â IF keydown$ = "LEFTARROW" THEN Â Â playersprite$ = "Ship Left.gif" Â Â SPRITE 3 playerX playerY $playersprite$$ Â Â IF moveX < 20 THEN moveX = moveX + 1 Â END IF Â IF keydown$ = "RIGHTARROW" THEN Â Â playersprite$ = "Ship Right.gif" Â Â SPRITE 3 playerX playerY $playersprite$$ Â Â IF moveX > -20 THEN moveX = moveX - 1 Â END IFEND KEYDOWN
i was looking at the code and it doesnt even look like it can handle boundries.
Though I have been working on a sprite collision code, it doesn't use a grid though. Its actually turning out pretty well.
wheres the sourse for the sc version of the space nav?
In my opinion, the rpg nav feels too floaty... I think that this is better suited for a space game.
Gm should get the command "Pushsprite".