Alice Community

Alice Community (http://www.alice.org/community/index.php)
-   How do I...? (http://www.alice.org/community/forumdisplay.php?f=16)
-   -   Bullet Collision (http://www.alice.org/community/showthread.php?t=4861)

debussybunny563 08-11-2010 04:26 PM

Bullet Collision
 
1 Attachment(s)
[SIZE="2"]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.[/SIZE]

debussybunny563 09-11-2010 04:16 PM

No replies?
 
[SIZE="2"]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!


[SIZE="4"]Two-hundred and twenty-second post. [SIZE="5"]YEAH![/SIZE][/SIZE][/SIZE]

Dameria 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.

debussybunny563 09-12-2010 04:56 PM

[SIZE="2"][QUOTE=Dameria;25217]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.[/QUOTE]

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.[/SIZE]

Dameria 09-12-2010 05:40 PM

[QUOTE=debussybunny563;25223][SIZE="2"]

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.[/SIZE][/QUOTE]


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.

debussybunny563 09-12-2010 05:49 PM

Well, better than other bullet collisions...
 
[SIZE="2"]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! :D


Look forward to your snipe example. :D[/SIZE]

Dameria 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.

debussybunny563 09-12-2010 06:15 PM

[SIZE="2"][QUOTE=Dameria;25242]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...[/QUOTE]

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.



[SIZE="1"]244th post. Yay.[/SIZE][/SIZE]

Dameria 09-12-2010 06:16 PM

[QUOTE=debussybunny563;25243][SIZE="2"]

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.[/SIZE][/QUOTE]

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.

debussybunny563 09-12-2010 06:19 PM

Misunderstanding
 
[SIZE="2"][QUOTE=Dameria;25244]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.[/QUOTE]

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=Dameria;25244]EDIT: Dangit, I wasted my 700th post, lol. BTW my Sniping program won't be out till late tomorrow.[/QUOTE]

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 ;) ).[/SIZE]


All times are GMT -5. The time now is 09:35 PM.

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