Custom Text System in Pygame

Поделиться
HTML-код
  • Опубликовано: 25 дек 2024

Комментарии •

  • @DaFluffyPotato
    @DaFluffyPotato  4 года назад +13

    If you want transparency on your text background, just use .set_colorkey((0, 0, 0)) on the character images (if your font image's background is black). I'll likely be making a video on palette swapping next week, which will be useful for changing the color of the text, so keep an eye out for that video.
    Also, I kinda messed up the audio. I tried putting the microphone in the air next to my mouth (I got a microphone arm), but that picked up a lot of keyboard noises because the microphone I use is actually meant for recording things that would normally be in the background. Next time I'll try putting it in the air above me.

  • @freeware9515
    @freeware9515 4 года назад +2

    Thank you so much, I really needed this for my project. I also dropped a like :)

  • @CarlosAndre-yu8ml
    @CarlosAndre-yu8ml Год назад

    Thanks for this awesome tutorial it helps too much!

  • @anthonydrakefordshadow
    @anthonydrakefordshadow 2 месяца назад

    Rolling through the oldies, what’s up fluff ❤

  • @hextav
    @hextav 4 года назад

    Thank you so much!

  • @theofficialyoutubechannel855
    @theofficialyoutubechannel855 4 года назад +4

    Great job! Can you make a tutorial on how to make in-game intractable menus?

    • @dafluffypotatovr7362
      @dafluffypotatovr7362 4 года назад +3

      ruclips.net/video/0RryiSjpJn0/видео.html
      If you're asking about how you do it in the normal gameplay specifically, just render the menu last and block the input from going towards the normal gameplay mechanics (like moving).

  • @arbitervildred8999
    @arbitervildred8999 Год назад

    I've been following your videos for a while, and now i started a project recently, I returned here knowing your videos, might re-watch some of them and also if you let me steal some code concepts ^-^ I will include you in the credits if so, that's all I can do in exchange for now

  • @i.a.m2413
    @i.a.m2413 Год назад

    Old video, dunno if you'll still see this. But can you elaborate on the clip function?
    1. why the copy? Is the passed surface sprite sheet prone to be modified? Even if it goes out of scope, it shouldn't be GCed as long as a subsurface is referencing it. Also, the local copy would have the same issue.
    2. Why the set_clip/get_clip dance instead of just using the rect in the subsurface call?
    What am I missing?

  • @surajsalian583
    @surajsalian583 4 года назад +2

    Can you make video on level selector in pygame

  • @v-dev4800
    @v-dev4800 4 года назад

    fluffy croping thank you

  • @johntisch5669
    @johntisch5669 4 года назад +1

    Thanks for useful video. For cutting out images from a sprite sheet I make a surface of the size I want to cut out and then blit onto that the appropriate part of the sprite sheet. Is there an advantage to the way you're doing it?

    • @DaFluffyPotato
      @DaFluffyPotato  4 года назад

      Not really. I was just using methods that were built into Pygame. Your way might be slightly slower, but that doesn’t matter in most contexts.

    • @johntisch5669
      @johntisch5669 4 года назад

      @@DaFluffyPotato ok. Thanks.

  • @tawfikkhetib6097
    @tawfikkhetib6097 3 года назад +1

    why does this make the transparent pixels in the sheet go black, isnt there anyway to make it keep the transparent pixels so i can put it anywhere and keep the background appear

    • @lucasmichelsivao4277
      @lucasmichelsivao4277 2 года назад +1

      just use set_colorkey(PIXEL), so every PIXEL will be transparent and you blit it

  • @juncker7542
    @juncker7542 4 года назад +3

    Why do you never use classes? Is is just easier for you not to do it? or does it get more complicated when using classes?

    • @DaFluffyPotato
      @DaFluffyPotato  4 года назад +8

      I use them where they’re convenient. For a lot of stuff, it’s not. Classes are best when you’re working with other people and/or you don’t know the full scope of the project.

  • @jorgengullstrand5988
    @jorgengullstrand5988 3 года назад

    What's the best implementation of scaling for this? I tried but can't get it work

  • @angelsinternetcafe226
    @angelsinternetcafe226 3 года назад

    hey when I try using my large font image it keeps saying its out of range, any solutions

    • @dasshaker2372
      @dasshaker2372 3 года назад +1

      I had a similar problem. Make sure that you double-check the "character_order" list matches the font image. My list was missing a small character.

    • @tawfikkhetib6097
      @tawfikkhetib6097 3 года назад

      u can also print out the characters disctionary and see if the letters are with the dimensions the should be in, in my case the was a problem that made me remake the whole font sheet

  • @kelvin.conego
    @kelvin.conego 2 года назад

    how to clear text?

  • @dokenguy
    @dokenguy 4 года назад

    Wouldn't it be easier to store all the characters in a single string rather than a list with one string for each character?

    • @DaFluffyPotato
      @DaFluffyPotato  4 года назад +1

      That makes it a bit harder to tell what’s going on for a lot of people.