Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

PICO-8: Top-Down Adventure Game Tutorial

A beginner-level tutorial for making a top-down adventure game in PICO-8. · By MBoffin (Dylan Bennett)

Interiors

A topic by insens created May 14, 2020 Views: 480 Replies: 10
Viewing posts 1 to 3
(6 edits)

Working to learn pico-8 from this tutorial, the game game i have in mind is one where the player enters several houses. I’m thinking I’d wall off parts of the map and draw the interiors there, then it should be possible to instantly transport the player over to that part of the map if he hits a door, (or rather the sprite on top of the door to make him hit the up arrow). Could you point me to any resources on how to do that?

Even though my ambitions are greater than my abilities right now I’m having so much fun with this,  enjoying your instructional vids a lot, they are very concise and clear so thanks a bundle for that.

Developer

Thanks for the kind words. :) I'm glad they're helpful.

You are absolutely on the right path to solving your problem. All you need to do is make new "teleportation tiles". Basically, if the player tries to move onto a specific teleportation tile, instead of doing something like opening a door, or getting a key, it would change the player's X and Y coordinates to a new location inside the house (the separate part of the map). And then in the house, you would have another teleportation tile whose job it would be to send you back to the coordinates back out in the world. I hope that makes sense! Let me know if you would like more explanation.

Thanks for the swift reply. So a sprite flag called, say, TELE then? I will surely have more questions, but let me give it a go on my own first so I can pinpoint exactly what to ask.

Developer

Just a heads-up, you're probably going to want to do the "More Tile Types" bonus video step when creating the teleportation tiles. It allows you to have more than just the 8 flags and lets you have basically as many tile types as you want.

Ah excellent. That one was a head scratcher, making do with just eight.

(3 edits)

But before I get to that: I’m A little confused by the way the setup varies in the different tutorials. Wanted to add camera_follow to my adventuregame.p8-style game, but it didn’t seem like just adding that bit of code worked. Do I need to modify the setup as well or is there something else I missed?

Edit: While adventuregame player moves 8 pixels per arrow click, camera_follow player moves smoothly from pixel to pixel. Guessing this is where the problem lies. Will try again using that setup instead.

Developer

The top-down adventure game tutorial uses player movement is map-tile by map-tile, and a lot of things in that game's code kind of rely on that fact. For example, the map screens changing as you walk around rely on the idea that the player is only moving in map-tile-sized movements, as opposed to one pixel at a time. Or knowing what map tile you are standing on. Also, the animated tiles function, toggle_tiles(), also assume that the camera is moving left/right and up/down in 16-map-tile increments, as opposed to staying centered on the player. So yes, you can do smooth pixel-by-pixel movement, and have the camera smoothly follow the player around, but that particular game isn't really set up to work well with that kind of player and camera movement.

(1 edit)

Okay, its early days yet. I don’t mind scrapping what I did so far and try starting with a camera_follow setup, building an adventuregame.p8-style game from that, (apart from the fact that I’m kind of proud that I managed to make the player sprite two tiles high, with his top tile torso tile triggering actions like picking up keys and such, although ideally both legs and torso should do that). But I’m sure to run into trouble with the huge gaps in my knowledge of coding. I’m all about the art; draw like a pro, code like a noob. :L

But, its worth a try.

Are you on the pico-8 server on Discord? I’ve buckled up the courage to start asking questions there, the advice varies a little bit in how useful it is, but they are quick to help. 

Developer

I am! Fine bunch of folk there. :)

Yeah they are. A friendly atmosphere. It feels good to know you’re there, even though I will try to spread the interrogation a bit so it doesn’t hit too hard. Thnx for the guidance so far.