I was experimenting with fill patterns and then went back to the sprite editor to notice something quite out of place. It was drawing pixels according to the fill pattern and would let me fill in the tile completely !
Try pasting this in immediate mode:
fillp(0b0011010101101000) circfill(64,64,20, 0x4e) |
Then go to the sprite editor and try drawing pixels.
This is not at all desirable behavior for the sprite editor, @zep, and it should disregard any patterns you were working with.
You can also play it on itch.io here!
CONTROLS
Arrows: Move
X: Toggle Lantern
Z/X: Advance Text
You can also skip dialogue from the pause menu.
ABOUT
It's the Winter Solstice and you've been tasked with inviting the local nature spirits to join the celebration. Use your lantern to navigate three different areas of the forest in this mini seasonal adventure!
This was made over November and December 2021 for the 2021 PICO-8 Advent Calendar. This ended up being my first time really exploring the extended PICO-8 color palette.
This version of the game is expanded from the original one released through the Advent Calendar on December 21, 2021 with a whole third area and some extra bits of polish.
This is my first pico-8 game, feedback welcome.
Things I want to add/improve (that I don't necessarily know how to do):
-
m̶a̶k̶e̶ ̶t̶h̶e̶ ̶h̶u̶d̶ ̶f̶o̶l̶l̶o̶w̶ ̶t̶h̶e̶ ̶p̶l̶a̶y̶e̶r̶ ̶t̶o̶ ̶a̶ ̶n̶e̶w̶ ̶r̶o̶o̶m̶ ̶(̶i̶'̶m̶ ̶h̶a̶l̶f̶ ̶w̶a̶y̶ ̶t̶h̶e̶r̶e̶ ̶j̶u̶s̶t̶ ̶n̶o̶t̶ ̶s̶u̶r̶e̶ ̶w̶h̶a̶t̶ ̶e̶l̶s̶e̶ ̶t̶o̶ ̶d̶o̶!̶)̶
-
enemies that move left to right and up and down (half working)
-
knock back when taking damage on spikes or lava when stepped on (currently just contact and take damage)
-
print the value of an object next to it when buying from the merchant
-
ability to swing a sword and attack
-
change player direction when moving and moving animations
-
m̶u̶s̶i̶c̶ ̶a̶n̶d̶ ̶m̶o̶r̶e̶ ̶s̶o̶u̶n̶d̶ ̶e̶f̶f̶e̶c̶t̶s̶ ̶(̶d̶o̶n̶'̶t̶ ̶k̶n̶o̶w̶ ̶h̶o̶w̶ ̶t̶o̶ ̶p̶r̶o̶g̶r̶a̶m̶ ̶t̶h̶e̶ ̶m̶u̶s̶i̶c̶ ̶i̶n̶)̶
-
a̶d̶d̶ ̶i̶n̶ ̶c̶h̶e̶c̶k̶p̶o̶i̶n̶t̶s̶ ̶a̶f̶t̶e̶r̶ ̶e̶a̶c̶h̶ ̶r̶o̶o̶m̶ ̶(̶s̶t̶r̶u̶g̶g̶l̶i̶n̶g̶ ̶t̶o̶ ̶s̶e̶t̶ ̶a̶n̶d̶ ̶r̶e̶c̶a̶l̶l̶ ̶t̶h̶e̶ ̶X̶,̶y̶ ̶o̶f̶ ̶t̶h̶e̶ ̶c̶h̶e̶c̶k̶p̶o̶i̶n̶t̶ ̶w̶h̶e̶n̶ ̶p̶l̶a̶y̶e̶r̶ ̶d̶i̶e̶s̶)̶
-
a̶d̶d̶ ̶a̶ ̶t̶i̶t̶l̶e̶ ̶s̶c̶r̶e̶e̶n̶ ̶a̶n̶d̶ ̶s̶p̶l̶a̶s̶h̶ ̶s̶c̶r̶e̶e̶n̶ ̶(̶n̶o̶ ̶c̶l̶u̶e̶ ̶h̶o̶w̶ ̶t̶o̶ ̶d̶o̶!̶)̶
-
equipment that changes stats
-
pause screen that displays equipment information
- mini tarot game at start that lets you pick a card to give items and stats/
Any help or advice on improving this would be much appreciated
thank you to the community for giving me lots of help learning the basics of lua and helping me realise a new hobby :)
much thanks to @remcode for help coding and fixing the number puzzle!
̶P̶.̶s̶.̶ ̶c̶a̶n̶'̶t̶ ̶f̶i̶x̶ ̶t̶h̶e̶ ̶b̶u̶g̶g̶e̶d̶ ̶s̶e̶c̶o̶n̶d̶ ̶l̶e̶v̶e̶l̶ ̶c̶u̶r̶r̶e̶n̶t̶l̶y̶,̶ ̶u̶s̶e̶ ̶d̶i̶a̶g̶o̶n̶a̶l̶ ̶b̶u̶t̶t̶o̶n̶s̶ ̶:̶)̶
previous versions:
Hi there,
I'm new to pico-8 and was playing around with a system to generate levels for a top-down adventure game on the fly. My setup is as follows:
- in the map editor, I have screen-sized (16x16 tiles) compatible level blocks
- when I call my generate_map() function, it makes a table with a predefined number of entries, each containing the coordinates to row/columns in the map
- in my draw function, I then loop through this table and draw the map
--generate the map function map_setup(map_size) total_area=map_size level={} for area=1,total_area do level[area]={flr(rnd(7))*16, flr(rnd(3))*16} end end --draw the map function draw_map() t=1 for i=0,sqrt(total_area)-1 do for j=0,sqrt(total_area)-1 do map(level[t][1],level[t][2],i*128,j*128,16,16) t+=1 end end end |
This works for drawing the map nicely, however I am having a lot of trouble getting the collision detection with the map tiles to work. After digging around for hours, it appears my problem is that when I check player.y and player.x and feed these into mget (after dividing by 8 to convert to row/column coordinate), that mget returns whatever is at that coordinate in the map editor, not in my actually drawn map.
I have come across a bug with the rendering one-off characters using a binary encoded string. If they binary encoded string ends in a nul \0
the character will not render.
For example:
"\^.⁸\0\0\0\0\0\0\0"
doesn't work, the character will not render
"\^.\0\0\0\0\0\0\0⁸"
does work and the character renders as expected; as does other combination tried as long as the last value isn't \0
None of this appears to be an issue if values are not string encoded first. Using a variable to store a binary value and using it to render a one-off character works in a cart regardless if there is a \0
at the end.
Doing this on the Pico-8 command line:
didn't work
print("\^."..chr(255)..chr(0)..chr(0)..chr(0)..chr(0)..chr(0)..chr(0)..chr(0))
worked
print("\^."..chr(255)..chr(0)..chr(0)..chr(0)..chr(0)..chr(0)..chr(0)..chr(1))
This isn't an issue when using hex values e.g.:("\^:FF00000000000000"
always appear to work as expected)
Paint a Char
A utility for creating one-off characters for use in other carts.
Immediate load this cart by load #paintachar
Creating and exporting
Paint your desired character and send to the clipboard using "c" button.
Select the type of output desired being Hexadecimal string or Binary String.
Press "x" to clear and start new.
Importing
Import hex codes to verify how they look, or edit them further.
To import a hex code:
- Set Paint a Char to receive hex from clipboard
- Copy the 16 digit hex code you want to import
- Paste (e.g. ctrl-v) the value in to the app
Hey all, working on an endless runner and running (lol) into a couple issues.
Here's the cart:
Basically I can't seem to get the 'enemy sprites' to actually kill the player. I've given them their own tables of values, flags etc but I don't know how exactly to check their flags for proper collision. Alternatively, I would maybe like to generate the enemies using the map_gen() function so the placement is relatively random, and that works to kill the player, but then I can't make them move.
This goes hand in hand with making the runner go on indefinitely until player death - currently it only generates 8 screens and then repeats. Another forum member mentioned I should pick a midpoint then 'copy' the second half of of the map back at start, move the player instantly, and then generate the second half again - but I have no clue how to go about that.