LoginLogin

XSCREEN and Touchscreen Questions?

Root / Programming Questions / [.]

JINC_DEVCreated:
So I've decided to use the bottom screen(touchscreen) in my game and I'm trying to use BGFILL on it. I used DISPLAY 1 and XCREEN 3 but then all the stuff of the top screen disappears, and when I don't use XSCREEN I get a "OUT OF RANGE" error. So how do I put stuff on the touch screen with BGFILL and not have everything on the top screen disappear???

what do you mean? when i use the touch screen nothing on the top screen disappears. please give me a picture of your code so i can see what's wrong.

You must use XSCREEN 3 first and then DISPLAY 1. Also, when you use XSCREEN all the sprites and backgrounds dissappears because you can set how many sprites and bg layers will be on the top and bottom screen.

You must use XSCREEN 3 first and then DISPLAY 1. Also, when you use XSCREEN all the sprites and backgrounds dissappears because you can set how many sprites and bg layers will be on the top and bottom screen.
How do you set the amount of sprites and bg layers per screen???

You must use XSCREEN 3 first and then DISPLAY 1. Also, when you use XSCREEN all the sprites and backgrounds dissappears because you can set how many sprites and bg layers will be on the top and bottom screen.
How do you set the amount of sprites and bg layers per screen???
XSCREEN Screen Type,number of BG allocations,Number of SPrite allocations

You must use XSCREEN 3 first and then DISPLAY 1. Also, when you use XSCREEN all the sprites and backgrounds dissappears because you can set how many sprites and bg layers will be on the top and bottom screen.
How do you set the amount of sprites and bg layers per screen???
XSCREEN Screen Type,number of BG allocations,Number of SPrite allocations
don't forget, those two numbers are only for the top screen. The bottom gets the remaining unallocated layers and sprites.

You must use XSCREEN 3 first and then DISPLAY 1. Also, when you use XSCREEN all the sprites and backgrounds dissappears because you can set how many sprites and bg layers will be on the top and bottom screen.
How do you set the amount of sprites and bg layers per screen???
XSCREEN Screen Type,number of BG allocations,Number of SPrite allocations
don't forget, those two numbers are only for the top screen. The bottom gets the remaining unallocated layers and sprites.
i didn't know that.

Every time you use XSCREEN, sprites and BG will reset. Just use XSCREEN at the beginning of your code, after the ACLS and before your gameloop or any sprite/graphics preparation.

Every time you use XSCREEN, sprites and BG will reset. Just use XSCREEN at the beginning of your code, after the ACLS and before your gameloop or any sprite/graphics preparation.
This might sound stupid but what is a game loop, I always here about it but I don't have a clue what it is.

Every time you use XSCREEN, sprites and BG will reset. Just use XSCREEN at the beginning of your code, after the ACLS and before your gameloop or any sprite/graphics preparation.
This might sound stupid but what is a game loop, I always here about it but I don't have a clue what it is.
Just a loop that constantly updates the characters, does textbox things, and whatever else is in your game. For example:
'Setup
X=0
Y=0
SPSET 0,0

'Game loop
WHILE 1
 VSYNC
 IF BUTTON() AND #UP THEN:DEC Y
 IF BUTTON() AND #DOWN THEN:INC Y
 IF BUTTON() AND #LEFT THEN:DEC X
 IF BUTTON() AND #RIGHT THEN:INC X
 SPOFS 0,X,Y
WEND