Alice Community  

Go Back   Alice Community > Alice 2 > How do I...?

Reply
 
Thread Tools Display Modes
Bullet Collision
Old
debussybunny563
Senior Member
 
debussybunny563's Avatar
 
Status: Offline
Posts: 852
Join Date: May 2010
Lightbulb Bullet Collision - 08-11-2010, 04:26 PM

Not so much asking for help, but to help others ahead of time.

In this world, I have a way of making collision detection without making the actual bullet move.

Anybody else who might like to contribute their examples, feel free to do so.

WASD to look.

Penguin will flap its wings as long as it's within the line of fire.
Note that it is not meant to be a finished world, and you would need more variables to make the collision happen only when you're firing and whatnot.

To see what I did, look at the world.collisiondetect method and the world.collision function, located in the methods tab and functions tab respectively.
Attached Files
File Type: a2w collisionexample.a2w (749.6 KB, 169 views)
   
Reply With Quote
No replies?
Old
debussybunny563
Senior Member
 
debussybunny563's Avatar
 
Status: Offline
Posts: 852
Join Date: May 2010
Question No replies? - 09-11-2010, 04:16 PM

lol 13 attachment views and no comments.

Seriously, do you think this is useful/better than perhaps other conventional methods for bullet detection?


And, if you think you have a good idea, go ahead and upload it!


Two-hundred and twenty-second post. YEAH!


Last edited by debussybunny563; 12-21-2012 at 12:00 AM.

|--------------------------------------------------------------------------------------------------|
|Link to weapons collection: http://www.alice.org/community/showthread.php?t=7368 |
|--------------------------------------------------------------------------------------------------|

I have been dead for quite some time now; not much hope for resurrection.

Last edited by debussybunny563; 09-11-2010 at 04:18 PM.
   
Reply With Quote
Old
Dameria
Senior Member
 
Dameria's Avatar
 
Status: Offline
Posts: 978
Join Date: Sep 2009
Location: United States
Default 09-12-2010, 03:18 PM

This is the same way that I do my bullet collisions. The only thing that I do differently is, instead of "distance in front of" and "distance behind", I have "distance above" and "distance below", it seems to make it more accurate for me.

I am actually about to post a new world that I created, a Sniper example, that will demonstrate how to zoom in on Alice, how to add random recoil to a gun, and how to add this type of bullet collision (no bullets) that effect different subparts of the body, you will see it either later today or tomorrow.


Check out my best projects so far and please comment:

Tic-Tac-Toe 2.0 ................... http://www.alice.org/community/showthread.php?t=3548
Alice Paint ........................... http://www.alice.org/community/showthread.php?p=23408
Real-Time Clock .................. http://www.alice.org/community/showthread.php?p=12725
Maze Game ......................... http://www.alice.org/community/showthread.php?t=4301
   
Reply With Quote
Old
debussybunny563
Senior Member
 
debussybunny563's Avatar
 
Status: Offline
Posts: 852
Join Date: May 2010
Thumbs up 09-12-2010, 04:56 PM

Quote:
Originally Posted by Dameria View Post
This is the same way that I do my bullet collisions. The only thing that I do differently is, instead of "distance in front of" and "distance behind", I have "distance above" and "distance below", it seems to make it more accurate for me.

I am actually about to post a new world that I created, a Sniper example, that will demonstrate how to zoom in on Alice, how to add random recoil to a gun, and how to add this type of bullet collision (no bullets) that effect different subparts of the body, you will see it either later today or tomorrow.
The way my bullet (or reference) is oriented, I have to use in front of and behind, so whatever.

Zooming, you change the viewing angles in the seldom used properties of the camera.

Random recoil, use the random number function and use min and max as your parameters.

For different subparts, just use the same bullet collision function, but in the parameter put the subpart in, and then make a method for each.


Last edited by debussybunny563; 12-21-2012 at 12:00 AM.

|--------------------------------------------------------------------------------------------------|
|Link to weapons collection: http://www.alice.org/community/showthread.php?t=7368 |
|--------------------------------------------------------------------------------------------------|

I have been dead for quite some time now; not much hope for resurrection.
   
Reply With Quote
Old
Dameria
Senior Member
 
Dameria's Avatar
 
Status: Offline
Posts: 978
Join Date: Sep 2009
Location: United States
Default 09-12-2010, 05:40 PM

Quote:
Originally Posted by debussybunny563 View Post


The way my bullet (or reference) is oriented, I have to use in front of and behind, so whatever.

Zooming, you change the viewing angles in the seldom used properties of the camera.

Random recoil, use the random number function and use min and max as your parameters.

For different subparts, just use the same bullet collision function, but in the parameter put the subpart in, and then make a method for each.

Yeah I know, thats how I am going to make my Sniping example. It looks pretty cool so far, I want to know you opinion once I post it.

EDIT: Oh yeah, and the one thing that I have found wrong with this system of detecting is that it is not very accurate, for instance put the torus just a little above or below the penguin, it still makes him flap even though you are not aiming specifically at him, so its not the best for games because of it's inaccuracy. I have done extensive testing on this type of collision in the past (its the kind that I use for my walls as well, it works better as a 2d collision detection), and I found that it is never completely accurate unless the boundary of the object is the exact same size as the root of the object, making the object bigger or smaller will screw up the collision just a little bit, but making a huge difference when it comes to accuracy.


Check out my best projects so far and please comment:

Tic-Tac-Toe 2.0 ................... http://www.alice.org/community/showthread.php?t=3548
Alice Paint ........................... http://www.alice.org/community/showthread.php?p=23408
Real-Time Clock .................. http://www.alice.org/community/showthread.php?p=12725
Maze Game ......................... http://www.alice.org/community/showthread.php?t=4301

Last edited by Dameria; 09-12-2010 at 05:44 PM.
   
Reply With Quote
Well, better than other bullet collisions...
Old
debussybunny563
Senior Member
 
debussybunny563's Avatar
 
Status: Offline
Posts: 852
Join Date: May 2010
Unhappy Well, better than other bullet collisions... - 09-12-2010, 05:49 PM

Anyway, I find it's a heck of a lot better than most other collision methods.

Once again, this is a thread to help people with bullet collision, and I strongly suggest, if you have a good/better example, post it!


Look forward to your snipe example.


Last edited by debussybunny563; 12-21-2012 at 12:00 AM.

|--------------------------------------------------------------------------------------------------|
|Link to weapons collection: http://www.alice.org/community/showthread.php?t=7368 |
|--------------------------------------------------------------------------------------------------|

I have been dead for quite some time now; not much hope for resurrection.
   
Reply With Quote
Old
Dameria
Senior Member
 
Dameria's Avatar
 
Status: Offline
Posts: 978
Join Date: Sep 2009
Location: United States
Default 09-12-2010, 06:12 PM

I agree, this method is better because there is no actual bullet, therefore if there were 10 people shooting at once, it would not lag like crazy. I want to know how the people who made COD did collision detection and bullet detection then maybe we could do our collision on Alice like that.

EDIT: hey, 699 posts, I guess I'll save my 700th for the Sniping example. FYI its not a game, so dont get hyped up for points and timers, its just a simulation showing how you can zoom and such.


Check out my best projects so far and please comment:

Tic-Tac-Toe 2.0 ................... http://www.alice.org/community/showthread.php?t=3548
Alice Paint ........................... http://www.alice.org/community/showthread.php?p=23408
Real-Time Clock .................. http://www.alice.org/community/showthread.php?p=12725
Maze Game ......................... http://www.alice.org/community/showthread.php?t=4301
   
Reply With Quote
Old
debussybunny563
Senior Member
 
debussybunny563's Avatar
 
Status: Offline
Posts: 852
Join Date: May 2010
Thumbs up 09-12-2010, 06:15 PM

Quote:
Originally Posted by Dameria View Post
I agree, this method is better because there is no actual bullet, therefore if there were 10 people shooting at once, it would not lag like crazy. I want to know how the people who made COD did collision detection and bullet detection...
They can actually MAKE OBJECTS SOLID, hint, hint for 3.0, wink, wink, but I don't know whether there would actually be bullets coming out of the gun.



244th post. Yay.


Last edited by debussybunny563; 12-21-2012 at 12:00 AM.

|--------------------------------------------------------------------------------------------------|
|Link to weapons collection: http://www.alice.org/community/showthread.php?t=7368 |
|--------------------------------------------------------------------------------------------------|

I have been dead for quite some time now; not much hope for resurrection.
   
Reply With Quote
Old
Dameria
Senior Member
 
Dameria's Avatar
 
Status: Offline
Posts: 978
Join Date: Sep 2009
Location: United States
Default 09-12-2010, 06:16 PM

Quote:
Originally Posted by debussybunny563 View Post


They can actually MAKE OBJECTS SOLID, hint, hint for 3.0, wink, wink, but I don't know whether there would actually be bullets coming out of the gun.
No, I don't think their objects are solid. On many games, have you ever noticed that you walk into somebody kind of, and at a certain angle you can see through them? You see just an empty body with their 2d exoskeletons. There is really no possible way to make a true 3d person on the computer, all objects are made out of 2d shapes made into objects.

EDIT: Dangit, I wasted my 700th post, lol. BTW my Sniping program won't be out till late tomorrow.


Check out my best projects so far and please comment:

Tic-Tac-Toe 2.0 ................... http://www.alice.org/community/showthread.php?t=3548
Alice Paint ........................... http://www.alice.org/community/showthread.php?p=23408
Real-Time Clock .................. http://www.alice.org/community/showthread.php?p=12725
Maze Game ......................... http://www.alice.org/community/showthread.php?t=4301

Last edited by Dameria; 09-12-2010 at 06:20 PM.
   
Reply With Quote
Misunderstanding
Old
debussybunny563
Senior Member
 
debussybunny563's Avatar
 
Status: Offline
Posts: 852
Join Date: May 2010
Exclamation Misunderstanding - 09-12-2010, 06:19 PM

Quote:
Originally Posted by Dameria View Post
No, I don't think their objects are solid. On many games, have you ever noticed that you walk into somebody kind of, and at a certain angle you can see through them? You see just an empty body with their 2d exoskeletons. There is really no possible way to make a true 3d person on the computer, all objects are made out of 2d shapes made into objects.
No, I meant with things like collision detection, so that you can't walk through things. Of course, it would be ludicrous to attempt to make an object REALLY solid.

Quote:
Originally Posted by Dameria View Post
EDIT: Dangit, I wasted my 700th post, lol. BTW my Sniping program won't be out till late tomorrow.
Ah, well, jedi wasted his 2000th post (at least, I think he did ).
And by wasted, I just mean nothing special was done (I think ).


Last edited by debussybunny563; 12-21-2012 at 12:00 AM.

|--------------------------------------------------------------------------------------------------|
|Link to weapons collection: http://www.alice.org/community/showthread.php?t=7368 |
|--------------------------------------------------------------------------------------------------|

I have been dead for quite some time now; not much hope for resurrection.

Last edited by debussybunny563; 09-12-2010 at 06:23 PM.
   
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



Copyright ©2019, Carnegie Mellon University
Alice 2.x 1999-2012, Alice 3.x 2008-2012, Carnegie Mellon University. All rights reserved.