Page 1 of 5

Perfect collision exemple

PostPosted: Sat Feb 05, 2011 7:47 pm
by Game A Gogo
Graphics are copyright of Nintendo!
Here is a collision system that is what I can call, perfect. Of course it's quite primitive at some point, but if people want me to add more, please ask :)

Re: Perfect collision exemple

PostPosted: Sat Feb 05, 2011 9:47 pm
by NightOfHorror
cool :)

Re: Perfect collision exemple

PostPosted: Mon Feb 07, 2011 2:57 am
by poopbrigade
Wow cool XD I didn't know that booleans could be used this way.. +1
I read about using mathematical equations instead of if statements very COOL :shock: :lol:

Re: Perfect collision exemple

PostPosted: Mon Mar 14, 2011 10:00 pm
by 157pl
i don't fully understand collision free
how does it work

Re: Perfect collision exemple

PostPosted: Tue Mar 15, 2011 2:11 am
by Game A Gogo
CollisionFree(Actor, x position, y position).
It will return TRUE (1) when Actor would not collide with any actor if it was at x position and y position, otherwise it will return FALSE (0)

Re: Perfect collision exemple

PostPosted: Mon Mar 28, 2011 6:12 pm
by savvy
why is it that people on this forum NEVER look at the helpful stuff? they look at things which almost certainly will never help them, GUYS YOU COULD LEARN FROM THIS!
IT IS HELPFUL! you should look at all of Game_A_Gogo's stuff, DST, BEE-ANT, Dark Paradox and generally all the older people's work.

for example: this gets 4 posts+ this one... CMON!

Re: Perfect collision exemple

PostPosted: Tue Mar 29, 2011 7:29 pm
by Camper1995
Yeah come on! Don't be so cruel. Download this 50x and then post a comment. :D im kidding, but I completly agree with savvy! People
should learn from this. But you know.. people are lazy and they better look at easy and "stupid" stuff than learning something new. 8)

Re: Perfect collision exemple

PostPosted: Wed Mar 30, 2011 6:37 am
by rykein
who are these people you speak of. plenty of people look at these type of things. not everything needs a comment when you look at it and for the most part you can tell who does look at these type of examples and those who dont. you cant inspire (and by inspire I mean on the lines of force) people to want to learn. so yes there are the lazy ones but there are also the busy ones and the quite ones and the notthatinterested ones and the not enough skill to learn from an example of this caliber and many more. came up with more than I was going to do :roll: game editor takes all kinds.

Re: Perfect collision exemple

PostPosted: Wed Mar 30, 2011 1:13 pm
by Camper1995
I didn't want to offend you xD Sure there are the busy one's who want to learn. There will always be a laze one's who don't care about it.
I dont know, this demo helped me a lot. Don't know what about the others one, but now I understand CollisionFree much better.
:wink:

Re: Perfect collision exemple

PostPosted: Tue Aug 23, 2011 3:52 am
by Chai
I just have a chance to try this one and this is really nice example.
I learn a lot form this one.

Great work. >_<

Re: Perfect collision exemple

PostPosted: Tue Aug 23, 2011 5:12 am
by tintran
Very nice.
Only one thing that bugged me a little was when i jumped and hit the ceiling (or upside down ground) the xvelocity gets instantly set to zero (like as if bumping a vertical wall).
Maybe it's a feature :)
+1 for superior compacted code and collisionfree usage and...view folllow mario technique.

Re: Perfect collision exemple

PostPosted: Tue Aug 23, 2011 3:19 pm
by Game A Gogo
Thanks a lot!
Although this collision seems perfect, you can't have top-only collision or not collide with an actor without CollisionState("Event Actor",FALSE);
So it's not really that great :P
I also have another perfect collision exemple whith top-down collision and everything, but uses like 7 actors to detect collision... I'm sure I can pull it off with only one actor now!

Re: Perfect collision exemple

PostPosted: Wed Aug 24, 2011 4:29 pm
by ikarus
OMG this is awesome was just wondering on this, prolly gonna use this on my next game. And can't wait for the next version of not colliding with some actors if you try that. Just one request, could you comment a bit more next time XD

By the way, not nitpicking but did you notice the slight bounce when going down a slope? Not really significant or really matter, just wondering if you tried to fix that and it wasn't possible

Re: Perfect collision exemple

PostPosted: Wed Aug 24, 2011 5:30 pm
by Hblade
found a bug xD marios nose of power.

but dude this is awesome :D I might use this type of method.

Re: Perfect collision exemple

PostPosted: Wed Aug 24, 2011 6:15 pm
by Game A Gogo
Hblade wrote:found a bug xD marios nose of power.

but dude this is awesome :D I might use this type of method.


how did you make that happen? (Btw the mario sprite has nothing do to with collision, it's on another hidden actor, so his nose got nothing to do with it o: )

EDIT: just found out how... pretty strange, I think it's because it's not detecting anything under mario, so the yvelocity=0; happens later, or something S:

ikarus wrote:By the way, not nitpicking but did you notice the slight bounce when going down a slope? Not really significant or really matter, just wondering if you tried to fix that and it wasn't possible


This happens because of how fast mario is walking, unlike the SNES (with super mario world), we cannot really detect it's a slope mario is under and "clip" on the slope.