Perfect collision exemple

Post here your demos and examples with the source files.
Forum rules
Always post the games with a screenshot.
The file must have the ged and data files (complete game source)
Use the forum attachment to post the files.
It is always better to use the first post to put the game files

Perfect collision exemple

Postby Game A Gogo » Sat Feb 05, 2011 7:47 pm

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 :)
Attachments
Super Mario.zip
(52.51 KiB) Downloaded 1104 times
untitled.PNG
Programming games is an art,
    Respect it.
User avatar
Game A Gogo
 
Posts: 3466
Joined: Wed Jun 29, 2005 10:49 pm
Location: French Canada *laughs*
Score: 181 Give a positive score

Re: Perfect collision exemple

Postby NightOfHorror » Sat Feb 05, 2011 9:47 pm

cool :)
viewtopic.php?f=2&t=12136
"I have not failed. I just found 10,000 ways that wont work." quoted by Thomas Edison.
Over the year, I decided my motto for me is I am knowledgeable, but not practical.
User avatar
NightOfHorror
 
Posts: 1823
Joined: Fri Aug 27, 2010 2:50 am
Location: Cedar Hill, MO, of the USA
Score: 51 Give a positive score

Re: Perfect collision exemple

Postby poopbrigade » Mon Feb 07, 2011 2:57 am

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:
When life gives you oranges, make orange juice. When life gives you poop, make fertilizer not poop juice.

Image
Current project __ CorPsEdEaRtH
Estimated work done __ 12%
User avatar
poopbrigade
 
Posts: 129
Joined: Thu Aug 27, 2009 12:17 pm
Location: In Earth. Being Burried XD
Score: 46 Give a positive score

Re: Perfect collision exemple

Postby 157pl » Mon Mar 14, 2011 10:00 pm

i don't fully understand collision free
how does it work
User avatar
157pl
 
Posts: 109
Joined: Thu May 13, 2010 10:49 pm
Location: AZ
Score: 3 Give a positive score

Re: Perfect collision exemple

Postby Game A Gogo » Tue Mar 15, 2011 2:11 am

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)
Programming games is an art,
    Respect it.
User avatar
Game A Gogo
 
Posts: 3466
Joined: Wed Jun 29, 2005 10:49 pm
Location: French Canada *laughs*
Score: 181 Give a positive score

Re: Perfect collision exemple

Postby savvy » Mon Mar 28, 2011 6:12 pm

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!
--> For my help, i ask for a simple +1 if it helps! ^-^
--> I dont code, I type art which you dont understand.
--> I keep winning the 3D model challenge at college, teacher says: "you keep winning im not giving you prizes".
User avatar
savvy
 
Posts: 494
Joined: Wed Jun 03, 2009 11:55 am
Location: England
Score: 44 Give a positive score

Re: Perfect collision exemple

Postby Camper1995 » Tue Mar 29, 2011 7:29 pm

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)
Say hello to my little friend.
User avatar
Camper1995
 
Posts: 707
Joined: Tue Dec 30, 2008 7:20 pm
Location: Lost in the past.
Score: 44 Give a positive score

Re: Perfect collision exemple

Postby rykein » Wed Mar 30, 2011 6:37 am

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.
rykein
 
Posts: 63
Joined: Mon Jul 26, 2010 7:26 am
Score: 6 Give a positive score

Re: Perfect collision exemple

Postby Camper1995 » Wed Mar 30, 2011 1:13 pm

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:
Say hello to my little friend.
User avatar
Camper1995
 
Posts: 707
Joined: Tue Dec 30, 2008 7:20 pm
Location: Lost in the past.
Score: 44 Give a positive score

Re: Perfect collision exemple

Postby Chai » Tue Aug 23, 2011 3:52 am

I just have a chance to try this one and this is really nice example.
I learn a lot form this one.

Great work. >_<
User avatar
Chai
 
Posts: 361
Joined: Sat Apr 30, 2005 2:26 pm
Location: Thailand
Score: 30 Give a positive score

Re: Perfect collision exemple

Postby tintran » Tue Aug 23, 2011 5:12 am

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.
User avatar
tintran
 
Posts: 157
Joined: Fri Dec 24, 2010 1:34 am
Score: 30 Give a positive score

Re: Perfect collision exemple

Postby Game A Gogo » Tue Aug 23, 2011 3:19 pm

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!
Programming games is an art,
    Respect it.
User avatar
Game A Gogo
 
Posts: 3466
Joined: Wed Jun 29, 2005 10:49 pm
Location: French Canada *laughs*
Score: 181 Give a positive score

Re: Perfect collision exemple

Postby ikarus » Wed Aug 24, 2011 4:29 pm

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
>>>>>>>>>>>>>>>>>>>>> http://www.code1011.com <<<<<<<<<<<<<<<<<<<<<<<
ikarus
 
Posts: 143
Joined: Fri Aug 12, 2011 3:06 am
Score: 11 Give a positive score

Re: Perfect collision exemple

Postby Hblade » Wed Aug 24, 2011 5:30 pm

found a bug xD marios nose of power.

but dude this is awesome :D I might use this type of method.
Attachments
paint.png
Subscribe to my YouTube? - Yes| No
User avatar
Hblade
 
Posts: 4455
Joined: Fri Dec 08, 2006 11:14 pm
Score: 181 Give a positive score

Re: Perfect collision exemple

Postby Game A Gogo » Wed Aug 24, 2011 6:15 pm

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.
Programming games is an art,
    Respect it.
User avatar
Game A Gogo
 
Posts: 3466
Joined: Wed Jun 29, 2005 10:49 pm
Location: French Canada *laughs*
Score: 181 Give a positive score

Next

Return to Game Demos

Who is online

Users browsing this forum: No registered users and 1 guest

cron