Author Topic: Zedd Physics Library  (Read 30003 times)

0 Members and 1 Guest are viewing this topic.

Offline Silver Shadow

  • Beta Tester
  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 817
  • Rating: +27/-7
    • View Profile
Re: Zedd Physics Library
« Reply #15 on: April 26, 2010, 02:50:59 pm »
Looking awesome!

This could serve as a game engine for some cool games... Maybe I'll mess around with this idea once I manage to finish Crystal Defenders.
Former Coder of Tomorrow


SirCmpwn

  • Guest
Re: Zedd Physics Library
« Reply #16 on: April 27, 2010, 06:27:45 pm »
Holy crap.  Just holy crap.  If you are releasing source code, I'm going to implement this into Source TI (the Half-Life 2: On-Calc) Engine.  I have been tearing my hair out over collisions, and I'm on the verge of ditching the project after 3 weeks of fruitless work on collisions.  (Please release the source ;D)

Offline Builderboy

  • Physics Guru
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5673
  • Rating: +613/-9
  • Would you kindly?
    • View Profile
Re: Zedd Physics Library
« Reply #17 on: April 27, 2010, 06:29:51 pm »
Dont worry, I will :) I just need to add a few more things before i release the full engine/source.  Just make sure to give credit where credit is due ;)

SirCmpwn

  • Guest
Re: Zedd Physics Library
« Reply #18 on: April 27, 2010, 06:35:36 pm »
Of course.  Also, you probably have taken care of this because you are awesome like this, but in your collision code, I presume that you loop through each object and check it back against each other object?  If so, then you should make sure that you don't check the same collision twice.  For instance:
Code: (Psuedo-code) [Select]
Start Loop For(var1, 0, numberOfObjects // or whatever it is you use
Stuff
Collision Loop For(var2, var1, numberOfObjects - var1
Stuff
End Collision Loop
End Loop

This will be amazing.  If I may, I humbly request that you also include map interaction.  It should be easier since it's a static body.
« Last Edit: April 27, 2010, 06:35:59 pm by SirCmpwn »

Offline Builderboy

  • Physics Guru
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5673
  • Rating: +613/-9
  • Would you kindly?
    • View Profile
Re: Zedd Physics Library
« Reply #19 on: April 27, 2010, 06:49:00 pm »
Actualy, the way i have my engine set up, it could create some horrible collision problems D: When block A hits block B, it changes block B's velocity, and when the engine goes to simulate block B's movement, it cant just blindly move the block, or exclude any boxes, or else moving block B might actually make it end up inside of Block A if the conditions are right. 

As for map collision, i forgot to put that on my list of things to do, but it might be tricky for objects that are wider than the tiles o.O

SirCmpwn

  • Guest
Re: Zedd Physics Library
« Reply #20 on: April 27, 2010, 06:51:58 pm »
That is the exact problem I had.  I ended up blindly moving the object and things could go through it under certain conditions, such as being pushed up against a wall.  I almost had it right once, only it was jittery and weird.  What sort-of worked for me is this:
1) Check for collison
  1a) Reverse collision (move colliding object outside of target object)
  1b) Change velocity of objects involved

Offline meishe91

  • Super Ninja
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2946
  • Rating: +115/-11
    • View Profile
    • DeviantArt
Re: Zedd Physics Library
« Reply #21 on: April 27, 2010, 07:31:13 pm »
What is map detection exactly?
Spoiler For Spoiler:



For the 51st time, that is not my card! (Magic Joke)

SirCmpwn

  • Guest
Re: Zedd Physics Library
« Reply #22 on: April 27, 2010, 07:31:34 pm »
Detecting collisions between objects and the map.

Offline meishe91

  • Super Ninja
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2946
  • Rating: +115/-11
    • View Profile
    • DeviantArt
Re: Zedd Physics Library
« Reply #23 on: April 27, 2010, 08:07:28 pm »
Ah ok, so kind of like on your Half-Life 2 was doing with the boxes?
Spoiler For Spoiler:



For the 51st time, that is not my card! (Magic Joke)

SirCmpwn

  • Guest
Re: Zedd Physics Library
« Reply #24 on: April 27, 2010, 08:08:27 pm »
Right.  Only, my Half-Life 2 thing kind of sucks right now, and I'm about ready to drop the whole fricken project.

Offline meishe91

  • Super Ninja
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2946
  • Rating: +115/-11
    • View Profile
    • DeviantArt
Re: Zedd Physics Library
« Reply #25 on: April 27, 2010, 08:13:08 pm »
Ah ok. And awww :( I hope you don't. You could just try working on some other feature for a while and then work on it again later when you've given your brain a chance to relax from that information.
Spoiler For Spoiler:



For the 51st time, that is not my card! (Magic Joke)

SirCmpwn

  • Guest
Re: Zedd Physics Library
« Reply #26 on: April 27, 2010, 08:15:45 pm »
No, now that I've seen this, it is staying alive.  Don't worry.

Offline meishe91

  • Super Ninja
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2946
  • Rating: +115/-11
    • View Profile
    • DeviantArt
Re: Zedd Physics Library
« Reply #27 on: April 27, 2010, 08:19:59 pm »
w00t O0
Spoiler For Spoiler:



For the 51st time, that is not my card! (Magic Joke)

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Zedd Physics Library
« Reply #28 on: April 27, 2010, 11:51:51 pm »
i hope you keep it alive SirCmpwn, it seemed quite nice and fast. You did a nice job so far

Offline ztrumpet

  • The Rarely Active One
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5712
  • Rating: +364/-4
  • If you see this, send me a PM. Just for fun.
    • View Profile
Re: Zedd Physics Library
« Reply #29 on: May 16, 2010, 04:57:58 pm »
Wow!  Builderboy, this is incredible!  I missed this when I was gone and am now thoroughly impressed.  Excellent job on this!  Will you release the source, and have you made any progress?  Great work! :D
« Last Edit: May 16, 2010, 04:58:11 pm by ztrumpet »