Sprite collision detection

Поділитися
Вставка
  • Опубліковано 11 жов 2024
  • A video that explains how to determine the collision between sprites (English version). #commodore64 #sprites #collision #detection
    If you liked the video and want to see more, please "like", share and subscribe! Thank you!
    Italian version: • Rilevamento collisioni...
    Voices generated via TTS from the site: ttsfree.com/te...

КОМЕНТАРІ • 13

  • @batlin
    @batlin 9 місяців тому +2

    Now that brings back memories. I started coding as a kid by typing in programs from the C64 User's Manual, which included this hot air balloon as the basic sprite example. Good times.

    • @agpxnet
      @agpxnet  9 місяців тому +1

      Yes, exactly that hot air balloon! Probably my very first program ever typed :-)

  • @Eskodisk
    @Eskodisk 9 місяців тому +3

    Excellent video. It helps to understand the old 8-bit c64. There are a lot of old books, but modern media like this helps to speed things up. Great work, please keep making this kind of tutorials.

    • @agpxnet
      @agpxnet  9 місяців тому +2

      Thanks, if I see that there is interest I will continue to make videos on 2D game programming applied to the C64. There are so many topics to cover, the next one could concern collisions with the background (a more complex stuff). Stay tuned and, if you liked the video, please share the link or my playlist on the C64. Thanks.

  • @mrdarbab
    @mrdarbab 9 місяців тому

    i lived this in the eighties. taught me 6502 assembly language. Then the sprites would move so much faster and smoother and pixel collisions instead of rects. That is the thing i'm working on now in pygame. not the 6502 but the armv7 sprites

  • @igork3522
    @igork3522 9 місяців тому +1

    Thank you

  • @rickyrico80
    @rickyrico80 9 місяців тому +1

    A different overlap test is if ( greatest - smallest ) > 40 = no collision ( for x ). Maybe faster than the or.

    • @rickyrico80
      @rickyrico80 9 місяців тому +3

      This is another great vid btw 👍🏼 I didn't know that that was the reason peek doesn't clear the bit, it's just a fresh bit set due to slowness 🤣

    • @rickyrico80
      @rickyrico80 9 місяців тому +1

      Also the overlap test assumes there already was a sort done for the multiplexer

    • @agpxnet
      @agpxnet  9 місяців тому

      In this test: "( greatest - smallest ) > 40 = no collision ( for x )", you have to establish the greatest and smallest coordinate along the X-axis and this will require one or two additional tests (16 bit) and so probably is not so convenient.