|
Post by flopping on Jun 22, 2023 14:56:33 GMT
Hello, I'm making a new game and I have a problem when going from one screen to another, for now, I have a map like the one you see here: What I want is to be able to go from screen number 15 to number 16, but these two screens are not next to each other, how can I go from 15 to 16 if one is not next to the other?, any way to get that? Normally, during the game, I can go from one screen to another by crossing the edges of the screen I'm on and appearing on the next one next to it, but if they are not together, can that step be done somehow?
|
|
|
Post by tomasiano74 on Jun 24, 2023 11:04:58 GMT
Hi, I recently started developing a game and I'm not a programmer either so it can probably be done in a more optimal way. But it occurred to me this way and it works:
IF SCREEN = 15 IF Y >=158 LET SCREEN = 16 ENDIF ENDIF
Greetings
|
|
|
Post by flopping on Jun 25, 2023 18:19:00 GMT
Ok, I'll try it, although this is still a little better.
IF SCREEN = 15 IF Y >= BOTTOMEDGE LET SCREEN = 16 ENDIF ENDIF
and to return from 16 to 15? maybe this way?
IF SCREEN = 16 IF Y <= TOPEDGE LET SCREEN = 15 ENDIF ENDIF
Would it work? Or have I messed with the limits?
|
|
|
Post by tomasiano74 on Jun 25, 2023 19:07:03 GMT
Hello, when you try it, I would like you to tell me if it works. In my game it conflicts with the fall mortality calculation and kills the hero if he crosses.
Greetings
|
|
|
Post by flopping on Jun 25, 2023 20:57:56 GMT
Hello, I have tried your method
IF SCREEN = 15 IF Y >=158 LET SCREEN = 16 ENDIF ENDIF
and it works, but if I go from screen 15 to 16, the character appears on screen 16 at the bottom, with which screen 16 is practically not visible and almost goes to the next one, the 17, I don't have death problems, since my character doesn't die from falling from the top.
|
|
|
Post by flopping on Jun 25, 2023 21:27:56 GMT
Hello again, I think I have it.
Test your game with this, to see if the player no longer dies when passing the screen.
IF SCREEN = 15 IF Y >= BOTTOMEDGE LET SCREEN = 16 LET Y = 20 ENDIF ENDIF
IF SCREEN = 16 IF Y <= TOPEDGE LET SCREEN = 15 LET Y = 158 ENDIF ENDIF
CHANGE THE NUMBER OF SCREENS FOR YOURS AND THE SCREEN LIMITS (UP AND DOWN) IF NECESSARY
|
|
|
Post by tomasiano74 on Jun 26, 2023 20:33:46 GMT
Thank you very much for your contribution.
I am glad to have helped you. Good luck with your game. Mine is also in a very advanced state.
Greetings
|
|
|
Post by xavisan on Dec 7, 2023 15:44:27 GMT
Hello, when you try it, I would like you to tell me if it works. In my game it conflicts with the fall mortality calculation and kills the hero if he crosses. Greetings The way is to use DATA and apply it when necessary, this will save memory, it will be more efficient, and you will be able to generate a loop control.
|
|