Sprite Stacking in Python and Pygame

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

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

  • @redfloat5163
    @redfloat5163 2 года назад +32

    This channel is so underrated

  • @sg4644
    @sg4644 2 года назад +16

    I've shared your videos with my computer graphics professor and he was impressed, especially dealing with niche topics like these. Great stuff, man. Keep it coming.

  • @AntonioLatronicoDeveloper
    @AntonioLatronicoDeveloper 2 года назад +9

    Really, really incredible tutorial! Keep up the awesome stuff!

  • @Eric-ms7hc
    @Eric-ms7hc Год назад +1

    Dude, you are great! I am glad i just found your channel :)

  • @Heavy_Lvy
    @Heavy_Lvy 2 года назад +2

    This video is 🔥 heat🔥 keep up the great work

  • @addevel
    @addevel Год назад +2

    Amazing stuff, i love sprite stacking graphics and i'm definitely gonna use this for a game! Your channel is a fantastic source for python game developers, keep it up!!

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

    You quickly gained my sub! Wow what a video! Kept me entertained, focused, it was clear cut. That was pure magic!

  • @vncubers
    @vncubers 2 года назад

    hey, I just found this hidden gems, thanks for making this channel, keep it up !!!

  • @gooficat
    @gooficat 8 месяцев назад

    This is an amazing technique to me, I find pseudo-3D to be something very interesting, reminds me of the hacks and techniques used for old 2.5d games like doom and duke nukem

  • @asenvelkov301
    @asenvelkov301 2 года назад +6

    I'm literally studying Python Fundamentals, (and basic stuff) and I looked up alot of your videos, and I'm like: How much dedication and discipline does this man have to know and do all of this.
    Like you've also been in Hello World and to reach stuff like this must feel really nice. But sadly i barely understand most of the code, like when there are some 3D or Open GL stuff, is it really hardcore math and formulas behind the scenes, how are you not getting confused at some point, like how is all of this learned xd, anyway thanks for making these!

  • @eladon19153
    @eladon19153 2 года назад +2

    You are amazing! Tnx man

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

    Very Impressive! Good work

  • @agni8840
    @agni8840 Год назад +1

    spasiba brat, siljna pomogaet

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

    omg this channel is so great, very helpful

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

    This is incredible, thanks for sharing

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

    man you are my hero

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

    Man, this video is awesome!!!

  • @netervati
    @netervati 2 года назад

    Incredible work. You are talented!

  • @JohnnyCarlsen
    @JohnnyCarlsen 2 года назад

    Thanks for the video. Nice 3D effect 👍and thanks for sharing the code 👌👍💪

  • @謙虛的學仔
    @謙虛的學仔 2 года назад +3

    this video opens my dog eyes

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

    That looks incredible, but I can definitely see myself getting a headache after half an hour.

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

    It looks very nice!!

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

    I have been have been learning and experimenting with Python and Pygame myself and these videos are great! I would like to suggest a video on 2D lighting and sprites with normal maps which is similiar in being a 2.5D kinda look. One place where i saw this was the application Sprite Lamp and i think it would be cool if you could implement in Python/Pygame. Thank you for the great videos/info.

  • @philtoa334
    @philtoa334 2 года назад +2

    So Nice .

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

    great video

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

    oh serius its genius!

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

    i don't understand python at all, in fact my first programming language is java, and now i am a flutter enthusiast. I dont prefer dynamic lang, confusing to me, really hard to read, what this function return, what data type you get from this variable, what about null safety, ..etc. BUT, i love the math and logic behind your vid. is amazing. i will rewrite it in dart for sure. in the end syntax dont matter right? math always wins. thanks for the video, great work. keep it up

  • @vnkslv
    @vnkslv 2 года назад +10

    Very cool job, thank you! Author, do you think it's possible through PyGame (or another Python library) to make a game in the spirit of The Final Station and put it out for commercial use?

    • @CoderSpaceChannel
      @CoderSpaceChannel  2 года назад +6

      yes Pygame is quite suitable for such 2d games

    • @Gawain-hi5pd
      @Gawain-hi5pd Год назад

      why do so many people say pygame is bad for creating games

  • @2spooky2play66
    @2spooky2play66 2 года назад

    I really like this video, but I wish you went over collision. this video is really cool regardless!

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

    Amazing!!!

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

    Super Amazingggggg

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

    This is cool AF but it'd be even cooler if there was a human voice

  • @mgguy5550
    @mgguy5550 Год назад +1

    Really hot stuff man! But is there anyway to input enemy AI into the dancing kitty entity?

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

    First of all, great work! I had no idea there is so many different ways of making 2D games pretend to be 3D!
    Second: Are there some commercially available games using this Sprite Stacking method?

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

      marketplace.yoyogames.com/assets/7494/lucid-engine-pseudo-3d

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

      @@CoderSpaceChannel thanks, but how about real games made in this way, that we can play, on Steam or any other platform, are there any?

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

      @@grzegorzkozinski2308 I have not researched the market, I am interested in the technology itself and the resulting graphic effect. But there certainly are such games.

  • @chanchu7579
    @chanchu7579 2 года назад

    This game is insane. Looks like pokemon in gameboy

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

    damn i wantt to go back to python now

  • @yajneshskandhan2756
    @yajneshskandhan2756 2 года назад +3

    nice vid bro, you are a genius,
    can you do a video about 3d procedural generation using opengl and noise

    • @CoderSpaceChannel
      @CoderSpaceChannel  2 года назад +3

      Yes, I was planning to make a video about it in the future.

  • @THE_ONLY_REAL_WAFFLE
    @THE_ONLY_REAL_WAFFLE 2 года назад

    Cool!

  • @oliverdowning1543
    @oliverdowning1543 4 месяца назад

    When ur entire world is just shell texturing.

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

    As a beginner coder, with rusty math skills, I'm struggling to understand the logic of this code (couple of my vars named different but same logic):
    discrete_angle = -math.degrees(self.player.angle) // self.viewing_angle + self.rot
    self.angle_key = int(discrete_angle % NUM_ANGLES)
    ...What I don't get is why the negative in the math.degrees conversion? After some laborious study I can only think of the different signs put in front of the mod operator. if discrete_angle is increasing from zero, the angle_key increases from zero; OTOH if discrete_angle is decreasing from 0 (increasing in negative direction), then angle_key starts at 0, jumps to the last element (NUM_ANGLES - 1) then decreases from there (NUM_ANGLES - 2, ...). What I'm struggling with is coding this logic and how it translates to the screen.
    Wrapping my head around angles in pygame is a little frustrating ngl!
    Also I note that python truncates the int operation toward negative infinity; does this have something to do with the logic? For example, at a small angle, 0.0165 rads, using the negative is the difference between outputting 0 and outputting -1. Anyways, thanks if OP or anybody can assist this rusty brain of mine.

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

    Amazing, I love it when a new vid comes out.
    One question: how... How could I add shadows?
    I had the thought of baking a dark alpha texture to the bottom image and depending on if there was anything above setting the alpha. However, this means that the light appears to always be above it and so:
    I was wondering if there was a way to have some sort of source lighting effect?

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

      The most straightforward approach is to draw a shadow as the bottom layer for each sprite. Then the shadow will rotate at the same time as the world

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

      @@CoderSpaceChannel yeah, that's what I thought about, but I was wondering if there was a way that it could be projected out at all in real time?

    • @CoderSpaceChannel
      @CoderSpaceChannel  2 года назад +3

      @@icotwilight Then for this it is better to use GPU acceleration, for example, the Pyglet or Arcade module

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

    When I ran the code at 6:38, I got the error "TypeError: can't multiply sequence by non-int of type 'pygame.math.Vector2'". Can anyone help because I followed the tutorial very closely, I don't think I'm missing anything and, I've wasted a good amount of time now.

  • @tinracic8244
    @tinracic8244 8 месяцев назад

    How would one go about animating spritestacks? Implementing magicavoxel animations to things such as trees and maybe player and entities.

  • @malibaranigames6841
    @malibaranigames6841 2 года назад

    Super

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

    It's so cool. Can I know your PC specifications?

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

    Can you make an tutorial for an Racing game with AI racers, cop chases and an campaign aka career?

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

    Would it perform better if the sprite rendering part was written in python opengl? Then I guess there would be no need to use caching

    • @CoderSpaceChannel
      @CoderSpaceChannel  2 года назад

      yes it will be better, but then you will have to abandon all the functionality of Pygame, except for Opengl initialization, keyboard event handling and sound

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

    hi, thank you.. btw how pygame those days i heard its no longer support or something

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

      Pygame is fine. Although another development branch appeared - Pygame-CE

  • @Шлепус-ъ2ш
    @Шлепус-ъ2ш 2 года назад

    Hey Coder Space! How can i texture the floor in ray casting? i very need that.

    • @CoderSpaceChannel
      @CoderSpaceChannel  2 года назад

      you can use the technique from mode 7 video but you need to find the correct formula to calculate the FOV

    • @Шлепус-ъ2ш
      @Шлепус-ъ2ш 2 года назад

      @@CoderSpaceChannel thanks coder space

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

    Hey, how would I save the sprites to the disk?

  • @user-dc9zo7ek5j
    @user-dc9zo7ek5j 2 года назад +1

    Question, is diablo 2 made the same way?

  • @artistic.autist
    @artistic.autist Год назад +2

    Loved this Tutorial ! Followed & Added quite a bit: ruclips.net/video/GvqRD7GCnQQ/видео.html
    Modified the code & then extended it - first *caching* (needed), multi-channel audio with f/x , collisions w/animations triggered on target, interactions & other action triggers, other action/adv type game logic. Thanks so much for posting your excellent work "Coder Space"!

  • @Hekysei
    @Hekysei 11 месяцев назад

    how to get y_offset for everry sprite?

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

    May I follow this tutorial for my commercial use game?

  • @Hassan-Sabah
    @Hassan-Sabah 2 года назад

    I like you

  • @JhomelToledo
    @JhomelToledo 2 года назад

    What's the IDE name