Тёмный

Is Pixel Perfect Collision Impossible? - CODING SECRETS 

GameHut
Подписаться 150 тыс.
Просмотров 184 тыс.
50% 1

A look at how I achieved pixel perfect collision detection in my first published game - Leander.
Is That You or Are You You by Chris Zabriskie is licensed under a Creative Commons Attribution license (creativecommons.org/licenses/...)
Source: chriszabriskie.com/reappear/
Artist: chriszabriskie.com/

Игры

Опубликовано:

 

15 апр 2018

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 462   
@scotts918
@scotts918 6 лет назад
Programmers - if you tell them something can't be done, even if you're the developer of the hardware.... They. Will. Find. A. Way.
@pumpkin6429
@pumpkin6429 5 лет назад
Scott S 👏 👏 👏 👏 👏
@imdone8243
@imdone8243 4 года назад
I'm still trying to figure out how to be happy. Scuffs
@alakani
@alakani 4 года назад
​@@imdone8243 We could use CRISPR/Cas12a to make you happy, but being happy all the time would actually be pretty antisocial. I suspect you would automatically be happy without any personal code changes, if the genes responsible for narcissism were supressed in the general population, but the resulting loss of genetic diversity might lead to the extinction of our species if the environment changes too rapidly.
@CrossoverGameReviews
@CrossoverGameReviews 4 года назад
Just like players playing your game. "I've tested this for bugs and exploits. You can't cheat your way out." But they always find an exploit.
@decrodedart2688
@decrodedart2688 4 года назад
yeah bro haha its probably a good reverse psychology trick! haha
@NoahNCopeland
@NoahNCopeland 6 лет назад
It amazes me the ingenuity you guys had back in the day.
@ficolas2
@ficolas2 6 лет назад
Noah Copeland indeed, nowadays something like that is as simple as a broadphase and then checking for sprite collision. Even possible for 3d meshes
@ficolas2
@ficolas2 6 лет назад
Big part of game developement nowadays is code monkeying.
@bangerbangerbro
@bangerbangerbro 6 лет назад
ficolas2 How do you just "check" for a sprite collision when most modern hardware are blitter systems. The only thing the hardware really does on its own is draw images and distort them in different ways.
@ficolas2
@ficolas2 6 лет назад
No one You know cpu, not gpu. Thats the thing, with a broadphase checking boundix box collisions and calculating the collision areas, modern CPUs are capable of doing this. Ofc it depends on how many collisions will have to be checked.
@VulpisFoxfire
@VulpisFoxfire 6 лет назад
Yeah...devs are relatively lazy these days, since they generally have processing and storage to spare instead of having to cram it all into very small parameters like they did on older machines.
@matt4193
@matt4193 6 лет назад
Working with limited hardware and space sure made things tricky and at times almost infuriating, but man, do we get some amazing dev diaries explaining their struggle and clever ways to get even further than what the machines were capable of.
@jc_dogen
@jc_dogen 6 лет назад
Matt using features built into the hardware isn't exactly exceeding the capabilities of the machine
@digiorniboy
@digiorniboy 6 лет назад
Matt *than what we thought the machines were capable of
@riddleiddle
@riddleiddle 6 лет назад
Sometimes I think their limitations sparked their creativity and brought us the best aspects in gaming.
@johneygd
@johneygd 6 лет назад
Math Helper i guess those hardware limitations did not only sparket creativity but it may also have sparked the idea to produce systems more economically. For example if my first revision of a speak & spell gedjet contains a 1bit DAC for voices,,, but once i will descover that it is also possible to mimic 1Bit voices on a much cheaper PSG soundchip by using tricks, then i will implement that PSG chip in my 2nd revision of my speak & spell gedjet, and so on, this is just simply amezinf, seeing,doing more with less.
@euphorik3120
@euphorik3120 6 месяцев назад
obviously & evidently not further than what the machines are capable of.
@Diveji
@Diveji 6 лет назад
Videos about techniques and how (and why) were they developed are the most interesting in my opinion.
@ChronoPhoenix
@ChronoPhoenix 4 года назад
you should watch how Chrono Trigger music was done for a magic experience.
@RobertSzasz
@RobertSzasz 6 лет назад
This is one of those titles where the initial answer is easy (of course it can be done, it just takes resources you want for other things), but the workarounds are the interesting bit.
@paulmarko
@paulmarko 6 лет назад
Yeah, sadly even interesting videos have to use click-bait headlines in order to get views. "Coding pixel-perfect collision on Amiga hardware" just doesn't have the same zing to it. Cracked.com is famous for this. They always have something interesting to say, but it's wrapped in the most sensational click-baity title, because that's often the difference between 20,000 and 80,000 views.
@ENCHANTMEN_
@ENCHANTMEN_ 6 лет назад
IMPOSSIBLE multiplication hack! Can the SEGA Genesis do math? CODING SECRETS!
@okarowarrior
@okarowarrior 6 лет назад
THESE 2 DISGUSTING SECRETS AMIGA CEOS DONT WANT YOU TO KNOW 4k flak rare version Frozen Spiderman Despacito 2.0
@sonicmastersword8080
@sonicmastersword8080 9 месяцев назад
@@paulmarkoClick-bait needs to die. When everything is competing for attention with absurd statements and excessive editing, nothing is perceptible as legitimate anymore.
@paulmarko
@paulmarko 9 месяцев назад
@@sonicmastersword8080 Thats the tragedy of the commons. Unless it stops working or until some top-down market control can be implemented, there's no way to prevent the arms race that is click-bait, sadly. :(
@phrygianphreak5408
@phrygianphreak5408 6 лет назад
The amiga offered some interesting shortcuts. I always used three pass hit detection: Are two objects in the same region? If so, do their bounding boxes over lap? If so, do their pixels overlap? If so, collision detected. The main problem I found with collision detection is you spend way more time figuring out two things aren't colliding than you do are colliding. This is even true on the cpu level; the cpu will usually figure out two pixels are overlapping faster than finding out no pixels are overlapping. I figured if I just give the program plenty of easy opportunities to bail out of detecting collision between two objects that clearly aren't colliding most of the resources wasted on detection would be freed up
@BdR76
@BdR76 6 лет назад
Wow, very clever use of the hardware there. Reminds me of an article "Contra Collision Detection" about clever use of hitboxes in Contra on NES, a system with only limited CPU power.
@KuraIthys
@KuraIthys 6 лет назад
BdR76 Mmh. NES doesn't have hardware collision either. Though never underestimate a 6502 for doing the seemingly impossible. XD
@fedup7496
@fedup7496 6 лет назад
This channel always has the most fascinating videos.
@thosediamonddreams
@thosediamonddreams 6 лет назад
this channel is so damn good. I'm not a programmer of any sort and these breakdown videos are so fascinating, emphasized by the hardware limitations of old times. so clever. I love it.
@Gikkman
@Gikkman 4 года назад
These videos of yours are just mesmerizing. Thank you so much for sharing all these insights! It makes me view many of these old games in a new light, and appreciate them even more
@Yourname942
@Yourname942 6 лет назад
I love the logic of your coding. Thanks for sharing with us!
@JackBz
@JackBz 6 лет назад
This is just a classic and concise coding secrets video. Your channel is such a joy
@TheGuruMeditation
@TheGuruMeditation 5 лет назад
That was a great video, thank you! You made something that is very technical extremely easy to understand for a noob like me. That takes a lot of skill. This is my first video of yours that I watched. I am very glad I found your channel and can't wait to watch more!
@MattLacey
@MattLacey 6 лет назад
Easily one of the most interesting series of videos I've ever found on RU-vid. Keep it up!
@GanjsmostPrime
@GanjsmostPrime 6 лет назад
You have been such a blessing to the RU-vid space. Keep doing you man, we love your insight
@froilanrivero2826
@froilanrivero2826 4 года назад
your channel is amazing you deserve way more subscribers! I always get such nice insights from this channel. thank you so much in advance
@dancannova
@dancannova 6 лет назад
Thank you. It's been a blast watching your videos.
@USJbroly
@USJbroly 6 лет назад
I love these explanations. It's great to hear about the technical stuff in the background of games. Thanks so much for sharing!
@schwiftynintendonerd
@schwiftynintendonerd 6 лет назад
thank you for the regular uploads ! :)
@Lilithe
@Lilithe 6 лет назад
No wonder you got to work on so many great things. You come up with some really clever solutions!
@jstock2317
@jstock2317 6 лет назад
These types of videos are always so interesting! It's so cool to see how the hardware dictated game design and was used to leverage what was given. Thanks!
@denisevans213
@denisevans213 3 года назад
Great, short easy-to-follow technical explanation from a gaming pioneer - thanks! - I LOVED Leander - The music, smoothness, tight control - superb classic! PS - Only just discovered your channel, will be subscribing!
@jackfrost884
@jackfrost884 6 лет назад
Great work my guy! Just found your channel and its sick
@jon4715
@jon4715 6 лет назад
Incredible, please don’t stop making these!
@banggugyangu
@banggugyangu 4 года назад
Just plowed through 5 videos.... This is a fascinating channel.
@nekononiaow
@nekononiaow 6 лет назад
Thanks for the video Jon! I am very happy to see some Amiga related videos and indeed Leander is impressively colorful for a dual playfield game.I hope we will see more Amiga videos coming.
@KallyNui
@KallyNui 4 года назад
Shoutouts to that artist for making such beautiful art with only SEVEN colors.
@DrTexx
@DrTexx 6 лет назад
So awesome, your channel is one of my favourites 😃
@almaelma11
@almaelma11 6 лет назад
Loved this. Keep up the great videos!
@Islandswamp
@Islandswamp 6 лет назад
I feel like you are a genius at this. I don't have any programming skills but your videos still amaze me.
@munchymcmouthington298
@munchymcmouthington298 4 года назад
feeling awestruck to see this up on youtube. Leander was one of my favourite amiga games of all time :)
@benbaez6044
@benbaez6044 6 лет назад
This is not an empty compliment. This is not a blatant thank you. THANK. YOU. FOR. BEING. SO. DANG. CLEVER. This stuff is probably the single most intriguing thing I have ever found on the internet. Simply. AMAZING!
@AlexVideoPlayer
@AlexVideoPlayer 5 лет назад
Thanks for the very interesting video and the brilliant Leander. I still play it every now and then.
@chrisf1600
@chrisf1600 4 года назад
I started programming in the 80s, and as soon as you said you'd found a way to solve the score collision problem, I guessed it had to involve chasing the raster :) That technique opened the door to so many clever hacks. Great video!
@ripoutyourprejudice
@ripoutyourprejudice 6 лет назад
This was a brilliant and insightful video.
@BOLL7708
@BOLL7708 4 года назад
I found this just now, and I think it's a great showcase of how something can be done when optimized/developer for a specific hardware platform. Mostly thinking of PC vs console regarding this, but this was easy to understand and fascinating at the same time 😁 Thanks!
@ArneChristianRosenfeldt
@ArneChristianRosenfeldt Год назад
More like hardware optimized for specific software found in arcade
@RaymuHakurei
@RaymuHakurei 6 лет назад
Always enjoy these. Thanks for making them. on a side note, have you any plans on continuing those Genesis coding lesson videos further?
@seronymus
@seronymus 6 лет назад
This is gold. You're like a wise elder bequeathing his knowledge to the next generations. Every video just gets better!
@marceltiel7919
@marceltiel7919 2 года назад
Me and a friend were very impressed by Leander back in the Amiga days, loved the gameplay and the graphics plus the nice intro!
@TheRealE1337ist
@TheRealE1337ist 4 года назад
It's incredible that you manage to find elegant solutions to a lot of the challenges you're faced with. I don't think I would have done the same.
@EmanuelFrias
@EmanuelFrias 6 лет назад
Great video as always! Thanks for sharing some good knowledge with us! Take care
@sadcrowcaws
@sadcrowcaws 6 лет назад
These videos make the perfect companion to my morning coffee, love it!
@tcindie
@tcindie 4 года назад
That you were an Amiga developer was enough to earn my subscription. :) Great content is a nice bonus
@yabbaso
@yabbaso 6 лет назад
Love hearing these coding secrets. Thank you so much for sharing.
@TheRealKaiProton
@TheRealKaiProton 5 лет назад
Another amazing insight into how games work.
@RabbitEarsCh
@RabbitEarsCh 6 лет назад
Brilliant hardware solution! I love this kind of out of the box thinking. Fascinating stuff.
@androidgameplays4every13
@androidgameplays4every13 5 лет назад
So you were the creator of Leander? WOW, I've spent my childhood playing and enjoying that game, nice to you see you here :)
@RussDnB
@RussDnB 4 года назад
Amiga fan here! Whilst I knew the Amiga was a special machine, and knew of its wonderful chipset, I never got into coding on it (Okay, a bit of AMOS, but not a lot). It’s videos like this that I absolutely love to see after all these years. More on Amiga projects please 😊
@randomizer2240
@randomizer2240 6 лет назад
I sometimes wonder how people fit so much into their days? I assume as well as being a lead developer at Traveller’s Tales and a movie producer that you have a family and children you spend a lot of time with? And then you have enough free time to have a hobby making technical RU-vid videos and making director’s cuts of your old games. Anyway hats off to you man, I can barely get out of bed in the morning. Let alone work on that game I always planned to develop but never did. Love your channel keep up the great work!
@GarrettStelly
@GarrettStelly 6 лет назад
love your channel!
@markduncan7638
@markduncan7638 2 года назад
I've spent so many hours playing this game, loved it, and the music.
@Larry
@Larry 6 лет назад
What was the reason to rename it from Leander to Legend of Galahad?
@SirRigbyBaconKaiser
@SirRigbyBaconKaiser 6 лет назад
Basically: EA.
@GameHut
@GameHut 6 лет назад
Larry Bundy Jr EA preferred an Arthurian Legend spin for the US Market so we changed the game intro sequence and the name.
@badreality2
@badreality2 6 лет назад
Watch the Top Hat Gaming Man. He made a video, focusing on you, Billy Mitchell, AND Channell Awesome. It is interesting. Good for you, for staying with Channel Awesome, even though they never promoted your channel, and you grew your own fanbase, with your RU-vid Channel.
@badreality2
@badreality2 6 лет назад
NuvYou You're welcome.
@hdofu
@hdofu 6 лет назад
+NuvYou rumor are Doug and Rob aren't sticking with the channel (there were 3 prerecorded shows from what I heard, he's also changed his face book status to say worked for Channel Awesome)
@blackattack1840
@blackattack1840 6 лет назад
this channel is a game programming goldmine 😍
@sotem3608
@sotem3608 6 лет назад
I really love this channel!
@sotem3608
@sotem3608 6 лет назад
Thank you very much for sharing all your information!
@null-sweat
@null-sweat 6 лет назад
Awesome video man.
@caharkness
@caharkness 6 лет назад
Very clever use of hardware for the time. I always imagined pixel-perfect collision detection to be unnecessarily expensive, but I didn't know there was ever a hardware-level implementation of collision detection made until now. I'd have to say that collision boxes are still my preferred way of collision detection, as we have plenty of CPU time to handle the collision of even hundreds of on-screen entities on today's hardware. Often times, I have both a vertical and horizontal collision box for player-like entities so that vertical and horizontal collisions aren't confused when calculating where to move the player (for things like walls and floors).
@flatfingertuning727
@flatfingertuning727 4 года назад
Pixel-perfect collision detection in software isn't hard if one can spare some space for pre-shifted shape tables. If monsters can be up to 29 pixels wide and players up to 20, store four copies of each monster shape, shifted horizontally 0, 1, 2, or 3 pixels, and four for each player shape, shifted horizontally 0, 4, 8, or 12 pixels. Select a proper tables, figure out the starting offsets and amount of overlap, and the actual collision detection would be three instructions per row of overlap.
@sheik124
@sheik124 6 лет назад
I thought the level select crash handler was the best clever game design I'd seen, but this is better. Love your videos
@howieb4217
@howieb4217 6 лет назад
Man, that takes me back! I remember saying to my brother, back when Leander came out on the Amiga, that games would never look better than this. Top game! Cheers for the memories.
@AdamvanAlderwerelt
@AdamvanAlderwerelt 6 лет назад
I don't know a darn thing about coding, but I love your videos anyway. Keep up the good work!
@Holammer
@Holammer 6 лет назад
Was the Megadrive version easier to write, or did it introduce new challenges?
@XBladenoJutsu
@XBladenoJutsu 6 лет назад
EA ported the game to MD, so I seriously doubt Jon would know.
@Imgema
@Imgema 6 лет назад
He worked on other games on MegaDrive though, like Mickey Mania and Sonic 3D Blast, so i'm sure he has an idea.
@GameHut
@GameHut 6 лет назад
XBladenoJutsu Actually we ported it, so I would know...
@GameHut
@GameHut 6 лет назад
Was easier to write as it had better hardware so we could do more without worrying so much about the frame rate.
@XBladenoJutsu
@XBladenoJutsu 6 лет назад
@GameHut Huh... Ok. Didn't know that. I figured it was earlier than when you started up with the Genesis. I admit though, I never played it. I was always put off by EA games, even back then lol
@sauzeefy
@sauzeefy 6 лет назад
Good Lord, this is insane! I'm so impressed!
@lahma69
@lahma69 4 года назад
A very clever and elegant solution! There is nothing more satisfying than figuring out how to accomplish a task such as this in such an efficient manner requiring very little overhead or wasted CPU cycles. Obviously though, it takes an intelligent individual to come up with these types of clever tricks otherwise (most likely) most games would have been utilizing the same workarounds.
@Valegator
@Valegator 6 лет назад
Even thou I have no experience in coding and have no idea what you are talking about 50% of the time, I still find your videos fascinating.
@sablesanctum
@sablesanctum 6 лет назад
You made one of my favorite games of all time? I salute you, sir!
@Toffeemeister
@Toffeemeister 6 лет назад
Great video, great game and great computer!
@Tinfoiltomcat
@Tinfoiltomcat 6 лет назад
This is my favorite youtube channel
@thepirategamerboy12
@thepirategamerboy12 5 лет назад
Somewhat off-topic, but I just wanted to say that I think it's really awesome you included twin fire buttons support. Such a nice thing to have on an Amiga game.
@NeilIves
@NeilIves 5 лет назад
Fascinating! Thanks.
@Timmymantwo
@Timmymantwo 6 лет назад
Brilliant work
@dacanizares
@dacanizares 6 лет назад
Beautiful!
@brynshannon6692
@brynshannon6692 6 лет назад
Oh, that's a question/idea. Have you or are you planning on doing an episode with one or more of your former coworkers from Traveller's Tales?
@novafawks
@novafawks 6 лет назад
Wow, very informative! This helps me a lot, as a beginner programmer
@Possi_ball
@Possi_ball 6 лет назад
You have done Leander too?!?!? I accidentally subscribed to the channel of a legendary pioneer!
@Xalusc
@Xalusc 6 лет назад
Hell yes, I love Leander so much Thanks, Jon!
@feosTAS
@feosTAS 6 лет назад
So somebody was using it!
@79toddy
@79toddy 6 лет назад
I totally dig the use of copper to flag the screen elements - mind blown!
@brynshannon6692
@brynshannon6692 6 лет назад
Yunno, I think I enjoy learning about how older games on older systems were made because the same kind of ingenuity comes into play when I'm optimising my builds on Armored Core games. Well, not exactly the same, but clever tricks and work-arounds abound in both situations.
@Arphael
@Arphael 6 лет назад
Thank you, for amazing and interesting videos!
@MrVolksbeetle
@MrVolksbeetle 4 года назад
Man, that was fascinating. I genuinely wish I knew more about programming...
@notthere83
@notthere83 6 лет назад
This approach reminded me of how I kept thinking about today's tech "But surely, there must be a way to use stencil buffers or something like it for collision detection!". Unfortunately, I don't have a lot of time to spare for game dev experiments and my limited research efforts have resulted in "Nope, not possible [possibly as in 'not feasible']" so far.
@DennisRamberg
@DennisRamberg 6 лет назад
I really love the programming secrets series you have going. A question, would it be possible to pull off the same kind of parallax effect on the Amiga as you guys did on the Mega Drive version? Perhaps not in Leander since there was really no playfield left for the background, but could you use the copper and a background playfield to create the same parallax effect seen in The Legend of Galahad and the Sonic games?
@jeroenboth167
@jeroenboth167 6 лет назад
Thanks for this video 😁👍 i love your content
@mukinha
@mukinha 6 лет назад
I love these videos
@namakudamono
@namakudamono 6 лет назад
Many thanks for this fascinating explanation Jon! Leander was an absolutely beautiful game back in the day, and it still holds up incredibly well today - a fantastic achievement given the modest hardware of the time. I’m curious as to whether there are any changes you would make to the game today? Perhaps there features you would have liked to have implemented, but simply ran out of time, or memory? I really appreciate watching your videos, but those featuring Amiga titles are the most enjoyable, as it is the machine I grew up with. Thanks again, keep up the great work!
@anothergol
@anothergol 6 лет назад
I'm way more in favor of multi-rectangle (or poly's) collisions, though. Makes a lot more sense for gameplay. To start with, you only want your blade to act as a weapon, not the character's ponytail. Then, games that favor the player by enlarging their hit boxes & shrinking the enemy's, are more fun to play. Then different box IDs are useful to mark spots from which bullets are shot, items are held, etc. Having multiple boxes isn't even much time-consuming, as a pre-test using the largest bounding box already eliminates most of the objects.
@Cowcatgames
@Cowcatgames 5 лет назад
I'm a consoles gamedev and I was expecting more comments like this. On a gameplay side, it makes much more sense to use multiple rectangles rather than precise collisions because you WANT to make the player able to defeat enemies easier (and the opposite for enemies) This is what I fixed for the consoles versions of Xenon Valkyrie+ and Riddled Corpses EX to make their gameplay more enjoyable. And what you said about the blade not extending to the entier character body makes perfect sense. Precise collisions should be used for things like terrain, not characters/objects interactions.
@DIGITALSWOON
@DIGITALSWOON 4 года назад
The guy in the video, near the end, is mostly talking about saving time computing collisions by only calculating them when the player character's pixels are rendered on screen. I'm sure you can implement whatever method of collision you want this way, right?
@TheBauwssss
@TheBauwssss 5 лет назад
So elegant!
@TheBcoolGuy
@TheBcoolGuy 6 лет назад
Woah. I think we take modern collision for granted. Thanks for yet another intriguing look into a veteran programmer's masterpieces!
@retrofraction
@retrofraction 5 лет назад
Leander had larger sprites than most games at the time, was really impressed with it. Makes sense since you were able to optimize it better.
@jardel_lucca
@jardel_lucca 6 лет назад
Great video.
@Klausterfull
@Klausterfull 6 лет назад
Hey Jon, great explanation! Is there a possibility you make a video series commenting the Sonic 3D Blast source code? It will be very interesting for all your programmers subscribers :)
@OrioPrisco
@OrioPrisco 6 лет назад
but does that mean that if another's objetc box toucher your box but doesn't overlap your pixels WHILE another object overlaps one of your pixel the collision detection returns that you're hitting both objetcts ?
@GameHut
@GameHut 6 лет назад
In theory, but in practice it doesn't really happen due to how I placed the enemies and collectables.
@OrioPrisco
@OrioPrisco 6 лет назад
so you were aware of that little flaw. Very interesting video
@607
@607 6 лет назад
Orio Prisco Background objects overlapping would probably introduce other problems, so it makes sense that he designed the levels so it wouldn't happen. :)
@GrimRize
@GrimRize 6 лет назад
I was a bit perplexed till I realized this was made on ancient hardware hahahaha, these days you can check against everything a million times and not skip a beat with these kinds of games.
@Templarfreak
@Templarfreak 5 лет назад
Maybe something that could help iron out more issues is also figuring out which objects are closest, and if multiple boxes overlap then only the closest one would actually deal damage and perform knockback. That, and some invulnerability frames which I believe are already in the game right?
@lerabot
@lerabot 6 лет назад
Legendary! very inspiring!
@alasyon
@alasyon 6 лет назад
Damn, that is clever!!! My hat is off to you.
@VenusHeadTrap2
@VenusHeadTrap2 4 года назад
Sometimes these secrets amaze me so much that I think you were born to code video games
@antjarvis
@antjarvis 6 лет назад
Leander was my favourite game, still have it! Thanks Jon :O)
@iMernerner
@iMernerner 6 лет назад
Those thoughts. amazing
@104d_3rr0r_vince
@104d_3rr0r_vince 6 лет назад
I wish you made a new Amiga game.
@KuraIthys
@KuraIthys 6 лет назад
Huh. I know about that feature on a lot of older systems, but I personally never really understood what it gets you that's worth bothering with. Interesting solution, certainly. Probably my lack of appreciation for it stems from learning to code on PC which lacks any such feature, (and since we're talking pentium 2/3 era stuff checking bounding boxes for a few dozen objects is kinda trivial). Also for the retro hardware I work with... SNES has no hardware collision support. And the Atari 800XL... Well it does, but it does collisions based on which background/sprite palette pair is involved... Probably still has some utility I guess. Pixel perfect collision isn't always desirable of course, so it does require caution. Part of what rendered E.T. on the 2600 so broken was the pixel perfect collision between the player sprite and the pits in the game, which had an effect which was counter-intuitive. Then again that kind of orthogonal top-down perspective actually calls for ignoring collisions with the ground and walls for most of the sprite; Only the base of the sprite should collide with ground based obstacles. (yet the whole sprite should collide with enemies). Collision detection is such an overlooked topic...
@EposVox
@EposVox 6 лет назад
Nice
@gfdgdfgdfgdfggfdgdfgdfgdfg9709
@gfdgdfgdfgdfggfdgdfgdfgdfg9709 4 года назад
after having programmed many games, distance is the best collision detection. Because it is circular. It's perfect and fast. The problem with boxes is you can't rotate them well and they are unprecise compared to the entity. For my fighting game and space ship shooter I used dist (circles), because even for something long straight like a laser I just place distance tests along the line. the advantage over line colision is that it works 100% the time. With line colision detection I had the problem of lines going through other lines sometimes. I guess rounding errors. Anyway, the other advantage of distance colision over other colisions is, that you have different colision zones for different effects. Pretty cool video. Amiga coders are the best. Also best artists and music.
Далее
Crushing Sonic to an Impossible Size - Coding Secrets!
4:52
How we fit an NES game into 40 Kilobytes
12:04
Просмотров 3,5 млн
Rocket Knight Adventures GEN - Games I Beat
45:09
World's worst video card? The exciting conclusion
24:23
The 3 Types of Detective Game
23:44
Просмотров 702 тыс.
A problem so hard even Google relies on Random Chance
12:06
Why Old Games Still Look Great!
8:55
Просмотров 681 тыс.
Non-Euclidean Worlds Engine
5:15
Просмотров 11 млн