so maybe this is impossible, or maybe theres something similar that works, but i can't seem to come up with an idea
for reference, this is relating to https://www.lexaloffle.com/bbs/?tid=3585
so right now, the grid for the maze is a two dimensional array. i'm creating it with all values set at 1 (wall), then manually setting values for blocks as 0 (for walkable areas)
this is fine for the little 8x8 maze i made manually for the WIP, but won't scale very well for 16x16 dungeons with multiple floors, just the legwork/tokens required is awful to think about. so i'm trying to come up with other ideas on ways to do this
what im thinking is, its easy to draw the maps as sprites, but is there some way to like..read the sprites as data into an array? like if i could parse 16x16 worth of sprite so that each pixel is a datapoint in a 16x16 array, that would save me tons of space (and effort), but im not sure if thats actually possible. i cant come up with any way to do it anyway, but if someone knows of a way to make this happen im all ears
(alternatively if someone has an idea of an easier way to handle this im always curious about clever suggestions)

Is it possible to get an option in the config file for where to save GIFs and screenshots?
Saving images and gifs really quickly is great but it can fill up the desktop, and it's nice to keep them all in one place. An option in the config file would be great for choosing where they go.
Is there anyone else who would appreciate the option, or is there a simple way to do it already?

You miss built-in lua functions such as ipairs or getmetatable in pico-8? Well, fear no more.
Currently supported Lua "built-in" functions
getmetatable
setmetatable
rawget
unpack
ipairs
table.pack
table.unpack as an alias to unpack
table.insert
table.remove
table.sort
|
Tested to imitate their counterparts
Travis-CI is set to test missing.lua against test.lua, which compares results of this library functions with the built-in ones. Well, tests may be incomplete, so do not hesitate to flag a bug to the issue tracker if something goes wrong.
[b]How to use

For your games, you could have to manage a score greater than 32768 (I like games were I can score millions), and often, you want the score displayed in a fixed length, prepended with zeros (00072635).
But managing this can consume lot of tokens.
I came accros a solution I'm quite proud (I'm still learning Lua...) and wanted to share.
In Lua, if you do : "the score is "..score , score is converted into a string and then concatenated to the first one.
So to convert a number into a string, you just have to write : ''"..score
I wrote a recursive function that takes a string and a number (the length) and returns a string padded with zeros at its beginning to reach the desired length :
function pad(string,length)
if (#string==length) return string
return "0"..pad(string, length-1)
end
score=723
print(pad(""..score,7)) -- will display 0000723
|
Elegant and thrifty, isn't it ?
Then, you can use two variables, score2 will store the 10 thousands, score1 anything under 10000
each time your player scores something, you add it to score1 and you test if it's above 9999 :
if score1>9999 then
score1-=9999
score2+=1
end
|

Hello, i'm coding a character movement but it don't work, why ? :(
Code :
function _init()
hero = {}
hero.x = 64
hero.y = 64
end
function _uptade()
if btn(0) then
hero.x = hero.x - 1
end
if btn(1) then
hero.x = hero.x + 1
end
end
function _draw()
cls()
spr(0,hero.x,hero.y)
end
|
my character don't move :(

Pico Cup
Pico Cup is a game about European football/soccer. Do penalty kicks and shoot goals. Hear the crowd cheer. You're the player. The fate of the team depends on you. Don't fail and make your favorite team win the cup.
Controls
Arrows - select options, kick ball
Z - kick ball up-left
X - kick ball up-right, accept team selection
Hi, for a game I'm working on, you can choose between two characters. But I dont have enough space to store the two characters in the same cart. I was thinking about releasing two carts, each one with a character.
The issue is that a given thread in the BBS only show the most recent cart in the "splore" of Pico 8.
Do I need to make two separate threads then ? Or is there a way to show or choose what cart is shown in splore ?
I could also try a multiple cartridge thing, like with a main cart with a selection menu, and two cart for the characters. But I dont think it work in web player or in splore. You would need to download the 3 carts manualy.
Is there a better idea than two separate threads ?

Accidentally found a fun wavy transition effect while screwing around with math.
I added nice comments to the source. Try pulling it down and tweaking the values to see if you can make it even cuter-looking.
--timer t=0 function _update() --increase timer t+=0.05 end function _draw() cls() --this crazy bit loops through --limited background colors, --and changes it when the --screen is covered with white local c = 12 + ((t-2.55)/4)%4 rectfill(0,0,128,128,c) for i=0,8 do -- column loop for j=0,8 do -- row loop --x positions are snapped --to 16px columns local x = i*16 --this number sweeps back --and forth from -1 to 1 local osc1 = sin(t+i*0.1) --this number also sweeps --back and forth, but at --a different rate local osc2 = sin(t/4+j*0.03) --y positions are influenced --by one of the sweepy --numbers local y = j*16 + osc1*10 --the circles' radii are --influenced by the other --sweepy number circfill(x, y, osc2*15, 7) end end end |





10 comments







































