Log In  
Follow
Foppy_Deluxe
[ :: Read More :: ]

Hey there!

I'm very new to Lua/Pico-8/programming in general, and I've been cobbling together code from Youtube tutorials and other threads to make this cart. Ideally, I want to make a super basic, top down adventure game (game length about 4 mins) with the player being able to trigger dialogue from different characters on different screens (I just made the "NPCs" background tiles with x,y values that trigger dialogue, because that seemed like the easiest way to implement that...).

I've been looking at a bunch of tuts for camera control, but I can't seem to wrap my head around it (every time I THINK I'm making a table for my player, there is an error). However, I did find a way to change screens Zelda 1 style (right now, the character can walk down at bottom into a new screen and back up into the first screen).

Cart #yotatowoka-2 | 2019-02-25 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA

1) BUT, the problem that I'm running into is that my flagged tiles/collisions from the first "area" are carrying into the next segment. I understand that there is a way to offset the collisions so that each "screen" is unique, but I'm totally lost on how to create an offset/local variables for the different screens. Could someone explain how to do this/what offsetting really means? If I want to make collisions on different screens, will I have to recalculate the f(get) m(get) each time? (sorry if that doesn't make sense haha)

2) Similarly, the only clear code I could find for triggering dialogue was based on whether the player entered certain x,y coordinates on the screen. I actually quite like the simplicity of that function, but is there a way to offset that as well so that dialogue triggers from one screen differ from the next?

3)Lastly, I'm realizing that my game will start on what technically should be the last screen. Once I figure out the offsetting, is there a way to reposition my player so that it will start at a different "screen" of the world map?

Thanks in advance! I've been pouring through the forums and through video tuts, but I haven't really found anything that was clear/simple enough for me to follow!

NOTE: I apologize that my code is probably very sloppy, but I have no prior programming knowledge!

P#62241 2019-02-25 17:00 ( Edited 2019-02-25 17:01)