dabyx
Processing Plant
Posts: 27
|
Post by dabyx on Feb 15, 2024 9:35:31 GMT
Hi everyone,
It's me again.
I seem to be having a slight problem when using SCREENLEFT/RIGHT/UP/DOWN
On certain screens I get sprites appear where they shouldn't
In this video at the top left, the player sprite appears on screen2 but every other time.
I also have some screens place multiple player sprites and other unknown graphics when moving between them.
I have tried adding a REDRAW, a CLS and REDRAW (and RESTART but that positions the player incorrectly)
and nothing seems to work.
Does anyone have an idea what is happening and why?
Many thanks.
|
|
EdD
Wacky Amoebatron
Posts: 34
|
Post by EdD on Feb 15, 2024 15:08:52 GMT
Look inside that sprite positions screen, and see if there's an extra sprite there.
|
|
dabyx
Processing Plant
Posts: 27
|
Post by dabyx on Feb 15, 2024 21:09:04 GMT
Look inside that sprite positions screen, and see if there's an extra sprite there. That's not it. In the above example, the sprite grpahic is out of the game window. (Also just double checked positions)
Another example is going from
then SCREENUP to
A lot of garbage sprites here. Which CLS and REDRAW do not remove.
|
|
|
Post by flopping on Feb 15, 2024 23:02:48 GMT
Hello, this happens because you have not defined a player position on those screens, place a player position on those screens and you will see how garbage no longer appears.
|
|
dabyx
Processing Plant
Posts: 27
|
Post by dabyx on Feb 16, 2024 6:45:41 GMT
Hello, this happens because you have not defined a player position on those screens, place a player position on those screens and you will see how garbage no longer appears. Oh! I didn't realise it was a requirement. I'll give that a go, thank you. 🙂 So if I wanted to have the player in different locations depending on screen entry I would also have to add extra code I'm assuming?
Edit: Oh the program knows when the player has entered the side of a screen no matter where the sprite position has been placed. That's great!
Thanks everyone for your help.
|
|