Log In  
Follow
binaryeye

Cart #binaryeye_coda_10-0 | 2024-12-13 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
12

Caverns of Dark Adventure is a traditional roguelike for PICO-8. You've become lost in an unknown cave system while collecting luma crystals for your village elder. Gather more luma crystals to light your way and escape the dangerous caverns!

Use the directional buttons to move. To ascend a passage or pick up an item, press X. To attack a creature or harvest luma crystals, move in their direction. To wait a turn, press X. To wait until fully healed, hold O and press X. To view your inventory, hold O and press up. On the inventory screen: To select an item, press up/down. To equip, unequip, or use an item, press X. To drop an item (if unequipped), press right. To return to the main screen, press O. For more information see the manual:

[ Continue Reading.. ]

12
7 comments



I'm having trouble getting rid of a graphical glitch in a game I'm working on.

When the player dies, the game state switches from the main gameplay screen to an intermediate screen that waits for a keypress before returning to the main gameplay screen. If that doesn't make sense, it's similar to Super Mario Bros.; when Mario dies, the main gameplay screen is replaced by a black screen that shows lives remaining, then after a short time returns to the main gameplay screen.

The glitch happens at this return to the main gameplay screen. Before the first frame is drawn, the screen flashes with what appears to be the last frame drawn to the main gameplay screen before it changed to the intermediate screen. Is this the back buffer? It seems like it shouldn't be, because I'm drawing other stuff on the intermediate screen. Is there something else that could be saving the last frame drawn?

I'm running at 60fps and using cls() at the beginning of each _draw() call. The draw operations for each game state are called from within _draw() based on the current game state.

I found the following in the manual: "If your program does not call flip before a frame is up, and a _draw() callback is not in progress, the current contents of the back buffer are copied to screen." Might this have something to do with it?

4 comments



To allow more room for maps in my current project, I'm planning to use many of the sprites flipped to achieve more visual variety. While I can easily do this for sprites representing the player or enemies, I'm not sure how to implement it for the maps. I don't believe I can use the map() function, even with the flexibility of its layer flags option. I could of course store a table representing the map, with additional flags to indicate whether or not a cell should be flipped, and draw each individual sprite instead of using map(), but I'm worried this will be too slow and generally cumbersome.

Is there a good way to go about this or am I stuck using no flipped sprites for maps? Or should I instead be looking at ways to compress the map data so I can use more room for sprites?

5 comments