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.

КОМЕНТАРІ • 24

  • @ScottSnowdenart
    @ScottSnowdenart Рік тому +10

    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)

    • @EBHawellsGames
      @EBHawellsGames Рік тому +1

      Great video! Yes, this was helpful. Thank you!

  • @avni462
    @avni462 Рік тому +1

    Really appreciate these vids! They're short, concise, and personable but teach just as well as longer tutorials! Fantastic for my weak attention span.

  • @eduardolrgil
    @eduardolrgil Рік тому +1

    The 50000 dollars remark cracked me up 😂
    Subscribed! Good and concise content! Keep it up!

  • @CamAlert2
    @CamAlert2 Рік тому +4

    Do you think you could go over how to give weighted choice to the tiles? Nice vid btw

    • @ScottSnowdenart
      @ScottSnowdenart Рік тому +1

      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

    • @thefog13
      @thefog13 Рік тому +1

      I just copy the “if rnd(1) < .5 then” part, switch the “sp” to a specific sprite, and adjust the chance.

  • @missing_score
    @missing_score Рік тому +1

    niiiice ty again for another excellent tutorial

  • @Demoninst
    @Demoninst Рік тому

    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 🙏

    • @ScottSnowdenart
      @ScottSnowdenart Рік тому

      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)"

    • @Demoninst
      @Demoninst Рік тому

      @@ScottSnowdenart my tile sets are at 64 - 71

    • @ScottSnowdenart
      @ScottSnowdenart Рік тому

      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

    • @Demoninst
      @Demoninst Рік тому

      @@ScottSnowdenart I've tried everything i need you to show me

    • @ScottSnowdenart
      @ScottSnowdenart Рік тому

      @@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)

  • @pyropingouin
    @pyropingouin 8 місяців тому

    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

  • @danielsoe4
    @danielsoe4 Рік тому

    This is helpful!🎉🎉

  • @niilokolehmainen
    @niilokolehmainen Рік тому

    5min?! no way

  • @obvious_giraffe8386
    @obvious_giraffe8386 Рік тому

    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?

    • @Mob-Inc
      @Mob-Inc 3 місяці тому

      Chat gpt know how to code just type on what you want it to code