Jump to content
IGNORED

Why can't the player move beyond his starting point?


Recommended Posts

hi guys!, i have been making a game in batari basic from scratch, and i was testing it but for some reason, it cant move beyond his starting point or does it return to it, im not sure but does anyone have any idea what it is and how i can fix it ?

 

 

im going to leave the code here:

 

default.bas

Yeah, you have to be careful where you declare the initial starting values for sprite locations as you could have some code to control the movement later and then in the kernel yoyo them back to the original starting spot before the drawscreen.   I've learned that lesson myself... repeatedly... over and over.  :)

9 hours ago, man2600 said:

so that means i have to set the player0y=48:player0x=27 out of the go to main

 

Yes, you can set the player's initial position in the "start" loop. Also you don't need to go to the "sprites" label as they are defined in the "main" loop. And bB sets the tv-type to NTSC by default so you also don't need that line.

Just have a look at this re-arrangaded version of your code, it works as intended:

 

default2.bas

default2.bas.bin

 

 

  • Like 1

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...