How to RANDOMLY Place Tiles for Your Game in Pico-8 - Basic Procedural Map Generation in Pico-8!
Вставка
- Опубліковано 9 лют 2025
- FREE PICO-8 ESSENTIALS WORKSHOP: spacecat.podia...
-
📺 PICO-8 COURSE: spacecat.podia...
🖺 FREE PICO-8 STUDY GUIDE: spacecat.podia...
In this video we're placing RANDOM TILES. This is a really simple way to add some variety to even the most simple games. We loop through all the tiles and assign each one a random sprite.
So I’m using this to randomize ground tiles, but I still wanted to draw building tiles in set locations over them on the map. So,
after “rnd(1)
Great video! Yes, this was helpful. Thank you!
Really appreciate these vids! They're short, concise, and personable but teach just as well as longer tutorials! Fantastic for my weak attention span.
Glad you like them!
The 50000 dollars remark cracked me up 😂
Subscribed! Good and concise content! Keep it up!
Do you think you could go over how to give weighted choice to the tiles? Nice vid btw
I've been thinking about this, The angle I would take is to break this up into different functions that are basically identical but one grabs from some sprites and the other grabs a different set, that way you can adjust the density more specifically. you could also go more simple than this and have duplicates of tiles you want to see more. I have not tested but this seems like it would work
I just copy the “if rnd(1) < .5 then” part, switch the “sp” to a specific sprite, and adjust the chance.
niiiice ty again for another excellent tutorial
I'm having a problem where i followed all of the steps (also i have his collision, camera and pickup) but there are still soo much black tiles help me 🙏
you either need to change your density (full density is 1 , currently set to 0.1) or make sure you have the "+1" to avoid randomly pulling the zero/blank tile. you could also clear the screen to the color you want to avoid the black box "cls( [color number] )" and say make it green "cls(11)"
@@ScottSnowdenart my tile sets are at 64 - 71
Are you pulling the tile info from range from those specific numbers or are you adding +65 instead of +1?
Another guess is if you don’t have anything at 72 it’s pulling a blank tile so remove the +1. Lots of ways to go about this so the solution might vary
@@ScottSnowdenart I've tried everything i need you to show me
@@Demoninst
function place_tiles()
for x=0,15 do --fullmap ==127
for y=0,15 do --fullmap ==63
local sp=rnd(8)+64 --(a)+b
-- a == number of sprites
-- b == start number of sprite
if rnd(1)
I want to buy you course, but I close the window when i got prompt with the discount. Is there another way to get it back ? The conversion from canadian dollars to usd is rough man
This is helpful!🎉🎉
Glad you think so!
5min?! no way
Can you do a video using AI? like showing how to turn human language to code and how to put a game together?point out mistakes it made and rate your experience?
Chat gpt know how to code just type on what you want it to code