According to your YouTube comment, it looks like you got this solved! Let me know if you run into any other questions.
Recent community posts
Just saw your other replies. Glad you got it working. It's possible wall and key were set to the same number in the code? Not sure. Well, feel free to reach out if you run into any other problems. Great work so far! :D The sprites look great and I love the premise of the game, haha.
The best way to fix this is to make a separate, second wall sprite and make that wall both a wall and a key. That way all the rest of your walls use the sprite that's only a wall. Hope that makes sense! Let me know if you need help.
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.
Doing true enemies that move around the map is a little more complicated because they basically have to move like the player, but instead of waiting for input from the user to move via btnp() commands, they just have their own decisions to make on when and where they move. On top of that, if you only want them to move on specific tiles, you'd need a separate can_move() function for enemies that uses those specific tiles, instead of the generic "wall" tiles that the player uses to determined if they can't move somewhere. I hoe that makes sense.
It's definitely possible, but it does take quite a bit more code. If I have some time, I will try to make a video showing it.
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! I appreciate it. :) Also, just a note, you don't have to have a transparent color. For example, if you do palt(0,false) that will give you all 16 colors, including color 0 as non-transparent.
To be honest, I never tried using the web version. However, when playing with PICO-8, I just have them connected to my computer and it worked fine. I didn't have to do anything special. In terms of code, when detecting button presses, you can use a second parameter (0 through 4) to ask for that button press for a specific controller. For example, btn(0, 2) gets the left button (0) from player 3's controller.
Thanks for reaching out! I actually have something that can help you out. As part of an effort to create a French translation of the book, I have taken the content of the book and put each piece of text into a Google Spreadsheet so that each piece of text can be easily and correctly translated. If you put the translation into the spreadsheet, I can get it transferred into the source document and create a German version that can get posted for everyone to use. If you send me your Google account name, I can share the Google Spreadsheet with you. You can DM me on Twitter at @MBoffin, or that same account name at Gmail.com will work as well.
Thank you for the kinds words! I'm glad it was helpful to you. :)
The main reason I'm not using local variables is that while the tutorial is certainly useful for people who have some experience programming, it is designed to be able to be done and understood by someone who has almost no experience coding. As such, I tried to limit the use of local variables to just those variables passed into functions, as I didn't want to try to get into the concept of local vs global variables at this point. In my experience, it can be a tough concept for some people to get their head around, and they're already trying to absorb so many new concepts already. (This is also why each step of the tutorial just adds to code you've written, rather than going back and changing lines of code that are already written.) Hope that helps make it clear. :)
Unfortunately, the disabling of comments is from YouTube, not myself. It is unbelievably hard to reach a real human being to get it resolved, so until then, I can't enable comments. :(
Thank you! I'm really glad to hear they've been so helpful. 😊 Now that I have a workflow nailed down for creating these, I hope to do more. This kind of feedback is definitely encouraging and I appreciate it. 😄 I will definitely keep those ideas in mind for future tutorials.
You're welcome! I'm glad it's useful for you. :) If you have any questions or run into any problems, definitely feel free to ask. I'll always be happy to answer questions here, and the BBS is also another fantastic resource for asking questions. The PICO-8 community is amazing and so helpful. :)
Pretty simple. I just made a simple function called print_shadow. Looks like this:
function print_shadow(msg,x,y,c) for i=-1,1 do for j=-1,1 do print(msg,x+i,y+j,0) end end print(msg,x,y,c) end
When you make a change to your game's page, the next time you view it there's a message suggesting you post a new devlog about the change. Next to the "New devlog →" button is a text "Dismiss" link to dismiss the message. However, when you click "Dismiss" and it goes back to the Dashboard, you get the toast popup "Changes dismissed".
From a UX standpoint, this is confusing.
<internal monologue>Changes? What changes were dismissed? I was just trying to dismiss the reminder to write a new devlog. Did the changes I made to my game page get reverted? I thought I had saved already? I better check the page again to make sure nothing got reverted....</internal monologue>
This game was a blast to play. I love how the discs fly--the physics is totally awesome. Many times found myself leaning my body to "push" it in the right direction. The movement is super smooth. Loved the use of closing the hand to control the movement. Nice job! :D