Log In  
Follow
chickenxhat

I've been searching around various forums and can't seem to find a definitive answer. Is it possible to set up Pico 8 to boot directly into a game, and have it run automatically? Pico 8 is an awesome platform for writing silly applications and I would love to make a dedicated hardware setup that boots directly into one of these applications (think: cosplay gadgets!). Anyone have experience with this?

8 comments



Cart #52950 | 2018-05-23 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA

Several updates, but one new curious problem:

I'm attempting to transition the player to a third scene (the second floor of the yurt), which sets player.x=#, in this case around 340, which is the appropriate x value relative to the area of the map I've used to design that scene. However, it appears using the code I've designed (which has worked just fine for transitions between the first and second scenes) the largest X coordinate value I can assign in this transition method is x=295. Setting to x=296 causes the player to become stuck, and no button input is registering. Its almost as if the draw method is no longer working at that point, because the player doesn't move at all. Typically when I've accidentally made the player's coordinates persistent, pushing in the directions still causes the directional animations to play out, but not in this situation. Is this a known issue that I'm unaware of, asking the player's x value to be set higher than 296? If so, how do we get usage out of the total map area? I'm at a loss here.

Curious.

[ Continue Reading.. ]

3 comments





Hello!

New user here, and absolutely in love with Pico-8!

Having followed several available tutorials online, I've cobbled together a few concepts to get this game running. Its just a player moving around a game field with some actors standing in the first screen. The player is repelled by the actors, which is sortof how I want to handle collision between the player and most objects. I may tweak that depending on what the player is bumping into.

I'm posting here because I've run into a dead end with my attempts to change the map displayed on screen. I intend to set triggers that switch what area is displayed on the screen (like the player walking onto a door tile), but currently I'm trying to figure out the necessary code to change what is displayed while the "trigger" is tied to btn4.

As you can see in the referenced WIP cartridge, scene_counter is set to "1" in _init, and if scene_counter == 1 then the map region (0,0,0,0) is drawn to the screen. However, if btnp(4) then the map region is changed to (16,0,0,0), which is the next region on the map data I'd like the "scene" to be framed at. With my current code the map background is changed correctly (and an empty desert scene is drawn, with marker-tiles on the outer corners to ensure I've set the new map coordinates correctly), however --

As you can see (if you run the game and press Z) the map is changed but the player appears to still be interacting with the constraints of the previous map scene on the island. Moving up and down, you still interact with the screen as if the two NPC actors are still present, and as if you are still on the island with the un-walkable water tiles and the yurt present in the center. You should don't see them.

I'm curious if anyone can review my code (and identify which tutorial I pulled the concepts from ;) ) and assist me in identifying why my game is showing the map correctly, but not actually moving the coordinates of where the action is taking place to the correct region in the map-editor data? Am I understanding whats happening correctly?

Any assistance would be great, and any constructive criticism would also be helpful. As a side note, it should be painfully obvious from my code that I'm a novice to any and all programming and could probably get done what I'm doing here with shorter code, likely with more advanced methods. I'm manually checking a lot of coordinates for my "collision detection", which works but is taking up more tokens that it probably should.

As an additional note, please ignore my in-code comments at the beginning. They're mostly just for me so I don't forget how the heck this all works, and more then a bit pretentious.

Thanks, and enjoy!

9 comments