| Physics Engine (NEW VERSION) | |
|
|
Author | Message |
---|
Piddagoras Map Maker
Number of posts : 592 Registration date : 2008-05-22 Age : 36 Location : California
Your Character Level: 1 Primary Move: Cosines and Sines.
| Subject: Physics Engine (NEW VERSION) Tue Sep 09, 2008 8:29 pm | |
| Link: http://www.mediafire.com/download.php?kmshe4g05wjChanges: Recoded force field interface to allow for different shape types, new black hole force field demonstrated using a sphere shape and a (force/rho/rho) vector field is now in top right corner. Optimized incline method for increased efficiency when objects are idle. Fixed issue with projectile's iterate method's ground detection. Slightly optimized impact method for ground bouncing. Added a pit with wisps that do not detonate on contact.
Updated Information in BOLDFeatures:-Up to 6 players supported. -Kobolds and Yetis to hit each other *Press the A button, the regular attack replaces the attack order -Jumping abilities -Dash abilities -Grenade and boulder abilities -Jumping Johnny Ethereal Bombs -Hero Stats effect physical attributes and engine behavior -Collision between objects -Units take damage if the velocity of a collision or bounce is past a certain threshold -Tornadoes -Black HoleIssues:-Units moonwalk under certain circumstances. Plans:-A "Warlock" style arena map with rounds and abilities and equipment -The ability for the player to select hero stats to add upon a levelup
Last edited by Pythagoras on Sun Sep 21, 2008 2:05 am; edited 1 time in total | |
|
| |
Guest Guest
| Subject: Re: Physics Engine (NEW VERSION) Tue Sep 09, 2008 8:46 pm | |
| looks cool ill check it out soon.. |
|
| |
Jay.J Head Admin
Number of posts : 3470 Registration date : 2008-05-21 Age : 33 Location : Toronto
Your Character Level: ∞ Primary Move: Moderate
| Subject: Re: Physics Engine (NEW VERSION) Tue Sep 09, 2008 9:28 pm | |
| | |
|
| |
Piddagoras Map Maker
Number of posts : 592 Registration date : 2008-05-22 Age : 36 Location : California
Your Character Level: 1 Primary Move: Cosines and Sines.
| Subject: Re: Physics Engine (NEW VERSION) Thu Sep 18, 2008 6:26 pm | |
| I have now solved the problem of high speed collision detection. I actually developed a perfect sphere collision detection algorithm, but it's too inefficient to use when a lot objects that are in collision range, due to the calculations involved, so I just check for the object's speed to see if a priori is necessary, or if a posterion will suffice. I will post an updated version after some short balancing changes, maybe tonight, maybe tomorrow. For those of you who are interested, the algorithm is basically selecting a point on the surface of each sphere that is closest to the other sphere, then solves the distance formula for those points equal to zero (When the distance between the two points closest to the other spheres is equal to zero, that is the exact point in time at which a collision occurs). The both the position of each sphere and angle between the spheres changes with respect to time, which is why its so complicated, but the ending quadratic that I have the algorithm solve using the quadratic formula is as follows: - Spoiler:
t=time variable, is the only unknown in the formula x1=x position of the first object x2=x position of the second object y1=y position of the first object y2=y position of the second object z1=z position of the first object z2=z position of the second object v1x=velocity of the first object in the x direction v2x=velocity of the second object in the x direction v1y=velocity of the first object in the y direction v2y=velocity of the second object in the y direction v1z=velocity of the first object in the z direction v2z=velocity of the second object in the z direction r1=radius of the first object r2=radius of the second object - Quote :
(v1x2+v2x2+v1y2+v2y2+v1z2+v2z2-2v1xv2x-2v1yv2y-2v1zv2z)t2+
(2(x1(v1x-v2x)+x2(v2x-v1x)+y1(v1y-v2y)+y2(v2y-v1y)+z1(v1z-v2z)+z2(v2z-v1z)))t+
x12+x22+y12+y22+z12+z22-2x1x2-2y1y2-2z1z2-(r1+r2)2=0
And yes, I did have to derive that formula through some lengthy algebra, it took me about 2 hours of going in a horribly wrong direction (solving the derivative of the function equal to zero, would have resulted in three times as many terms to deal with before I could realize that everything cancelled) then I had an epiphany and realized that since it was going to be quadratic anyway, I could just solve the original equation equal to zero since I was picking points with respect to time. After I realized that it only took me about a half hour.
Last edited by Pythagoras on Thu Sep 18, 2008 7:44 pm; edited 2 times in total | |
|
| |
Lagger09 Legendary
Number of posts : 535 Registration date : 2008-05-23 Age : 31 Location : SoCal
Your Character Level: 1 Primary Move: I am the Destroyer of Time... guess...
| Subject: Re: Physics Engine (NEW VERSION) Thu Sep 18, 2008 6:31 pm | |
| Is this the same we played yesterday? If so, it works very well. No slowing issues to date. | |
|
| |
Piddagoras Map Maker
Number of posts : 592 Registration date : 2008-05-22 Age : 36 Location : California
Your Character Level: 1 Primary Move: Cosines and Sines.
| Subject: Re: Physics Engine (NEW VERSION) Thu Sep 18, 2008 6:38 pm | |
| - Lagger09 wrote:
- Is this the same we played yesterday? If so, it works very well. No slowing issues to date.
The version we played yesterday wasnt even using my algorithm, because I forgot to change the group units filter from the global to a local one that I put in with an if-then to check velocities. This is why the bullets were doing unpredictable damage and going through units sometimes. Because they will actually hit things now, I divided their radius by 15 and gave them a random factor for aiming. Its still very efficient in practical use. The only problem is that JASS is apparently very slow, and with those 20 wisps floating around in the black hole, the new algorithm is used almost 40*20*20 times per second. But my framerate still hovers around 40-45. If I allow ALL units to use the new algorithm, that wisp pit+black hole tears my computer asunder, 5fps and still dropping. It should be fine, in any real maps there wont be units going fast enough for long enough with enough units nearby to make it hurt. | |
|
| |
TanK_OwneR Apprentice Sage
Number of posts : 718 Registration date : 2008-05-26 Age : 31 Location : The Shadows
Your Character Level: 1 Primary Move: Flying Face Pwn
| Subject: Re: Physics Engine (NEW VERSION) Sat Sep 20, 2008 4:28 pm | |
| lol DBC Rapid Peas and myself played a Control the Hill on the new one and that was FUN as hell | |
|
| |
RapidFireOmega Moderator
Number of posts : 394 Registration date : 2008-05-21 Age : 115 Location : Look behind you.
Your Character Level: 1 Primary Move: Controlled Spontaneous Combustion
| Subject: Re: Physics Engine (NEW VERSION) Sat Sep 20, 2008 4:31 pm | |
| 2 suggestions for later development: 1. Enable allies so teams can be made 2. Maybe make different arenas with different objectives such as King of the Hill, Castle Siege, etc, etc, etc | |
|
| |
RapidFireOmega Moderator
Number of posts : 394 Registration date : 2008-05-21 Age : 115 Location : Look behind you.
Your Character Level: 1 Primary Move: Controlled Spontaneous Combustion
| Subject: Re: Physics Engine (NEW VERSION) Sat Sep 20, 2008 7:22 pm | |
| 2 new ideas:
Make a mage hero so you have a total of 4 heroes, spell could be fireball and blink
capture the flag mode and king of the hill mode | |
|
| |
Dragonheart91 Godlike Sage
Number of posts : 2358 Registration date : 2008-05-21
Your Character Level: 1 Primary Move: Cursed Waves (pwned much?)
| Subject: Re: Physics Engine (NEW VERSION) Sat Sep 20, 2008 7:23 pm | |
| The movement is still too screwy for me. It is difficult to go where you want.
Also, projectiles should be aimed at an angle according to the height of where you target them. Without that, it is very difficult to shoot up or down hills properly. | |
|
| |
Piddagoras Map Maker
Number of posts : 592 Registration date : 2008-05-22 Age : 36 Location : California
Your Character Level: 1 Primary Move: Cosines and Sines.
| Subject: Re: Physics Engine (NEW VERSION) Sat Sep 20, 2008 9:20 pm | |
| - Dragonheart91 wrote:
- The movement is still too screwy for me. It is difficult to go where you want.
Also, projectiles should be aimed at an angle according to the height of where you target them. Without that, it is very difficult to shoot up or down hills properly. Yeah, the projectile thing was a current plan, and I'm actually having trouble completely disabling pathing for some reason. The units decide to cry when you click over cliffs and so they start moonwalking and your jump wont be in the direction you're moving. I'm not sure how to fix this completely. - RapidFireOmega wrote:
- 2 new ideas:
Make a mage hero so you have a total of 4 heroes, spell could be fireball and blink
capture the flag mode and king of the hill mode Yeah, I was thinking some sort of warlockish hero that would bring a stun feature to the table, units can't move while stunned and their decelleration is disabled (Stop and hold position won't slow you down) Game modes and arenas are also a priority | |
|
| |
Sponsored content
| Subject: Re: Physics Engine (NEW VERSION) | |
| |
|
| |
| Physics Engine (NEW VERSION) | |
|