Omnimaga

Calculator Community => Other Calc-Related Projects and Ideas => TI Z80 => Topic started by: Builderboy on April 24, 2010, 11:49:31 am

Title: Zedd Physics Library
Post by: Builderboy on April 24, 2010, 11:49:31 am
A seed was planted when SirCmpwn noted that he was writing a physics engine for his new game, and i insticntivly started working on my own.   ::)  Well collision was a bitch, and i went through many rewrites and many RAM clears before I even got a version that didnt crash every five seconds.  The trick was to make an engine that supported an undefined amount of polygons, but enough blabbering lets get to the specs:

Supported:
Rigid Body Physics Collisions
Friction between Objects and on Walls
NO Terminal velocity cap, objects can move as fast as they need to
Edge Sliding*
External Force Application

Planned:
Different sized objects
Objects with different masses
Built in subs for accessing different objects

And here are 3 screenshots i made to demonstrate my engine.  Note that the engine itself only handles the collision solver, anything extra like springs or buoyancy is handled by the client program.  Since the engine supports full external force application, you can attach boxes with strings, submerge them, remove gravity, or give them magnetic properties and the collisions solver will compensate.

Screenie 1:  Just a basic Demo with the plain engine.  In the beginning you can see an example of edge sliding, where boxes close to falling off with slide a bit to the right or left.  Its mostly to make box stacking more realistic because without it, boxes would stay still even if it was only partly on top of another box.  I am then applying gravity with the arrow keys to make them fly around the screen.

Screenie 2:  Now demonstrating the dynamic force application.  The code for the spring is not inside the Zedd engine, but the solver still can take in all the resulting forces of the spring and simulate the collisions accurately.  I am applying a force to one of the boxes with the arrow keys.

Screenie 3:  Now demonstrating more of the dynamic global effects you can achieve with Zedd.  I wrote a small bit of client code to handle buoyancy and let the boxes go into this tub of water.  Zedd handles the rest!  I am moving around one of the boxes and trying to stack them on top of eachother to show how well Zedd redistributes forces and transfers momentum.

RELEASE: I am not releasing the engine just yet.  There are still some bugs to hammer out, as well as implementing some screen partitioning to improve speed, because as of now, it runs a bit slow on the 6Mhz processors, and i think i can get some more speed.  I also need to implement a few more features, and write the handy subs to work with objects :)
Title: Re: Zedd Physics Library
Post by: DJ Omnimaga on April 24, 2010, 11:58:03 am
WOW! That's awesome!

I wonder how you manage to do all that stuff. I myself would never be able to do things this complex. The only thing I ever did that had some physics like dynamic force was Boss #3 in Metroid II Evolution and even then it had full of bugs. It would be nice if eventually you released it with tutorials or code commented in a txt file with the examples so people can figure out how to use them in their game. I especially love the 3rd part. It reminds me Super Mario world when jumping on floating blocks on the water.

Also the 2nd screenshot reminds me the java physic engine you made a while ago.

Nice job on this

Do you think I should move this in its sub-forum?
Title: Re: Zedd Physics Library
Post by: Raylin on April 24, 2010, 12:16:44 pm
Yes, I think you should.
This more than deserves its own subforum.
Title: Re: Zedd Physics Library
Post by: Galandros on April 24, 2010, 12:39:12 pm
Interesting, I also wanted to come with a physics engine someday. And I don't know how you could come up with with such flexible engine. :o I was thinking on a way but never got it.

For making this engines you need to understand some physics. Having a list of formulas comes handy. Builderboy, what resources you have that help coding the engine? I use Wikipedia or MathWorld for math stuff, Wikipedia for algorithms but for Physics I never searched...
I am curious to see the source code because it seems very powerful and relatively ease to implement new stuff.
Title: Re: Zedd Physics Library
Post by: meishe91 on April 24, 2010, 05:20:55 pm
This is really cool! Great job on this, Builder! Can't wait to see what more you come up with :)

@Galandros
I actually have some pages that my AP Physics teacher gave us. It's full of formulas and such and I'll upload that in the Miscellaneous Discussion Board. It's similar to my Trig. Resources (http://ourl.ca/4577).
Title: Re: Zedd Physics Library
Post by: Quigibo on April 24, 2010, 06:43:00 pm
Holy crap that's awesome!  :o  I couldn't even get that stuff working well in my C++ physics engine!

Its strange, I've hardly seen any calculator games with real physics engines before, but after Axe Parser, it seems like a lot more people are interested in using them for some reason (Like Portal X, Half-Life, and a few others).  Maybe they're just generally too messy when written in actual assembly and this simplifies the process...
Title: Re: Zedd Physics Library
Post by: Eeems on April 24, 2010, 07:36:50 pm
WOW! amazing!
can't wait for you to release it so I can play around with it!
Title: Re: Zedd Physics Library
Post by: bwang on April 24, 2010, 09:34:59 pm
Yay! Finally you posted this, Builderboy :)
The boxes shake a bit in the 3rd screenie, though. Is that a feature or a bug?
Title: Re: Zedd Physics Library
Post by: meishe91 on April 24, 2010, 11:48:57 pm
I think that is part of the buoyancy engine but I could be wrong.
Title: Re: Zedd Physics Library
Post by: mapar007 on April 25, 2010, 01:48:58 am
I guess this is Axe?

Awesome job, pal!
Title: Re: Zedd Physics Library
Post by: DJ Omnimaga on April 25, 2010, 01:59:05 am
Yeah, Axe language
Title: Re: Zedd Physics Library
Post by: Builderboy on April 25, 2010, 02:34:17 am
Hey thanks guys :) I have actualy been working on this for a while, but only recently did I make a breakthrough in the collision code that allowed me to write demos like these. The demos are a little glitchy tho, like in the spring demo I had to remove some code in the enging to make it work right, and as bwang pointed out in he boyancy demo the water friction isn't totaly accurate.  But that stuff is mostly client error :P

As soon as I iron out a few more bugs and clean up some codes I will get a release goingwith some commented source and a few more fun demos :) I also can't wait for libraries in axe so that this will be fully supported ^^
Title: Re: Zedd Physics Library
Post by: meishe91 on April 25, 2010, 02:47:53 am
That's cool :) Glad things are coming along. How long do you think everything will take?

Non Sequitur: 600th post! ;D
Title: Re: Zedd Physics Library
Post by: DJ Omnimaga on April 25, 2010, 12:28:52 pm
Holy crap that's awesome!  :o  I couldn't even get that stuff working well in my C++ physics engine!

Its strange, I've hardly seen any calculator games with real physics engines before, but after Axe Parser, it seems like a lot more people are interested in using them for some reason (Like Portal X, Half-Life, and a few others).  Maybe they're just generally too messy when written in actual assembly and this simplifies the process...
I think it's mostly because there aren't a lot of people in the TI community who were into physics or were physics gurus, so they usually had rudimentary physics in their games. For example in Super Mario 1.2/2.0 when stopping walking, you stopped instantly instead of sliding a little bit. Also ASM code can be confusing when it gets large so maybe it discourages some people from having very complex physics. As for BASIC, well, it's just too slow to have any good physics inside a game.

And now we got Builderboy and Calc84maniac who are into physics stuff a lot plus the option to use a language that is almost as fast as ASM (if not the same speed?) but where graphical commands are almost as easy as BASIC :D
Title: Re: Zedd Physics Library
Post by: TIfanx1999 on April 26, 2010, 06:18:32 am
Hey!, This looks super special awesome! The speed on this is actually quite good IMO too. I don't really know much about physics, so I currently wouldn't know where to begin with something like this. Great stuff tho. ^_^
Title: Re: Zedd Physics Library
Post by: Silver Shadow 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.
Title: Re: Zedd Physics Library
Post by: SirCmpwn 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)
Title: Re: Zedd Physics Library
Post by: Builderboy 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 ;)
Title: Re: Zedd Physics Library
Post by: SirCmpwn 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.
Title: Re: Zedd Physics Library
Post by: Builderboy 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
Title: Re: Zedd Physics Library
Post by: SirCmpwn 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
Title: Re: Zedd Physics Library
Post by: meishe91 on April 27, 2010, 07:31:13 pm
What is map detection exactly?
Title: Re: Zedd Physics Library
Post by: SirCmpwn on April 27, 2010, 07:31:34 pm
Detecting collisions between objects and the map.
Title: Re: Zedd Physics Library
Post by: meishe91 on April 27, 2010, 08:07:28 pm
Ah ok, so kind of like on your Half-Life 2 was doing with the boxes?
Title: Re: Zedd Physics Library
Post by: SirCmpwn 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.
Title: Re: Zedd Physics Library
Post by: meishe91 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.
Title: Re: Zedd Physics Library
Post by: SirCmpwn on April 27, 2010, 08:15:45 pm
No, now that I've seen this, it is staying alive.  Don't worry.
Title: Re: Zedd Physics Library
Post by: meishe91 on April 27, 2010, 08:19:59 pm
w00t O0
Title: Re: Zedd Physics Library
Post by: DJ Omnimaga 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
Title: Re: Zedd Physics Library
Post by: ztrumpet 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
Title: Re: Zedd Physics Library
Post by: _player1537 on May 31, 2010, 07:38:37 pm
how is this coming along?
Title: Re: Zedd Physics Library
Post by: ztrumpet on May 31, 2010, 08:38:29 pm
I hope this (and Portal X and Portal 2 and Serenity) are coming along.  I'm looking forward to them all.  Has there been any Zedd progress? ;D
Title: Re: Zedd Physics Library
Post by: DJ Omnimaga on June 01, 2010, 02:22:03 am
Me too.

Btw some ppl refers to the Zedd library screenshots in the Axe vid. They ask me what's the name of those programs ^^
Title: Re: Zedd Physics Library
Post by: bwang on June 01, 2010, 02:52:32 am
I think builderboy is rather busy with finals and such right now.
Title: Re: Zedd Physics Library
Post by: DJ Omnimaga on June 01, 2010, 03:14:43 am
True.

I also noticed you weren't posting as much either D: so I guessed you were probably both busy with exams
Title: Re: Zedd Physics Library
Post by: meishe91 on June 01, 2010, 04:31:17 am
I would think finals/AP tests would be over by now though in the US, I could be wrong though. That's just how it is here in CO so I don't know.
Title: Re: Zedd Physics Library
Post by: DJ Omnimaga on June 01, 2010, 02:41:41 pm
Well, I heard that some people finishes school only on June 29th or 30th in USA. In Canada I know it's mid May for college and mid June for hi school.
Title: Re: Zedd Physics Library
Post by: nemo on June 01, 2010, 03:31:33 pm
for high school in the U.S. it's usually around mid-june. but if you live in a really cold/snowy place, the school sometimes just makes you finish later like june 29th but gives many snow days during the year to compensate.
Title: Re: Zedd Physics Library
Post by: DJ Omnimaga on June 01, 2010, 03:44:07 pm
Aaah ok. Over here there are usually about 1-4 snow days a year. 4 is rare, though.
Title: Re: Zedd Physics Library
Post by: TIfanx1999 on June 01, 2010, 03:48:41 pm
Apparently, different school districts do finals at different times even within the U.S. My brother is *JUST* taking finals now.
Title: Re: Zedd Physics Library
Post by: nemo on June 01, 2010, 03:50:39 pm
it's not uncommon. my finals are next week and i live in the U.S, while a neighboring town got out of school two weeks ago
Title: Re: Zedd Physics Library
Post by: jsj795 on June 01, 2010, 05:00:05 pm
I only have 2 days of school left :) And finals are next week :(
In US, the time the school ends depend mostly on each individual school or a school district.
AP should have been finished, since that's given national wide and it's during mid-May.
Title: Re: Zedd Physics Library
Post by: DJ Omnimaga on June 01, 2010, 05:08:33 pm
Isn't there some sort of AP test during mid september too? I noticed sometimes the community and forums really gets extremly dead around that time.
Title: Re: Zedd Physics Library
Post by: ztrumpet on June 01, 2010, 08:36:30 pm
My school gets out in a week!  I have 5.5 days left... ;D
Title: Re: Zedd Physics Library
Post by: calcdude84se on June 01, 2010, 08:41:52 pm
I only have the rest of the week unless I fail any EOC's/exams. (I'm counting days for finals as days of school)
And back on topic... (well, sort of) I can't wait until more work is done on this. Keep up the good work!
I don't know if this has been said, but just having this as a mini-physics playground (like phun, but scaled down a lot) would be pretty awesome.
Title: Re: Zedd Physics Library
Post by: ztrumpet on June 01, 2010, 08:43:57 pm
I don't know if this has been said, but just having this as a mini-physics playground (like phun, but scaled down a lot) would be pretty awesome.
Yup!  I've been wondering, how easy is this to pass values to?  What do you have to pass to it, and how many bytes is that (normally).  :)
Title: Re: Zedd Physics Library
Post by: meishe91 on June 01, 2010, 10:59:09 pm
Ya, they really need to make school districts more uniform in the US :P

But anywho, I agree! Back on topic. How is this coming?
Title: Re: Zedd Physics Library
Post by: Builderboy on June 01, 2010, 11:20:23 pm
Not much has been worked on in regards to zedd right now, i have been (ans still am) very busy with school and finals.  School will be totaly out in about 1.5 weeks so yay :)

As for how the engine manipulation is going to work, it will have a bunch of usefull subs that you can access with arguments, and also return values.  Here are some that i am thinking about

GetPosition             returns the current position of the object (upper left corner)
 in:  N - index
 out: A - X position
      B - Y position

GetSize            returns the height and width of the object (currently locked at 8x8)
 in:  N - index
 out: A - width
      B - height

GetVelocity            returns the current velocity of the object
 in:  N - index
 out: C - X velocity
      D - Y velocity

GetFriction            returns the amount of friction the object experiences when sliding
 in:  N - index
 out: E - object friciton

SetPosition           change the current position of the object (does not account for collision errors)
 in: N - index
     A - X position
     B - Y position

ApplyForce            applies a force on the object with a given direction
 in: N - index
     C - X force
     D - Y force

Move                   moves an object a given distance (does not account for collision errors)
 in: N - index
     A - x distance
     B - y distance

SetFriction           sets the amount of friction an object experiences
 in: N - index
     E - friction

Collision             tests if there is a collision between 2 objects
 in:  N - index 1
      O - index 2
 out: A - 1:true  0:false

CollisionAny        tests if a given object is colliding with any objects
 in:  N - index
 out: A - 1:true  0:false


Note that you cant change size, as this would cause bad game errors on most occasions.  I might include some routines that check for safety, but it would be a tad bit slow, checking against all other objects.  We shall see.
Title: Re: Zedd Physics Library
Post by: ztrumpet on June 02, 2010, 08:18:56 am
That sounds really useful. :)
Can we use Zedd in our Axe contest entries, or is that against the rules?
Title: Re: Zedd Physics Library
Post by: DJ Omnimaga on June 02, 2010, 12:54:59 pm
mhmm interesting stuff. I hope it is easy to integrate in many types of games such as ones with tile-mapping.

@Ztrumpet it is, since help is allowed, but if like half of your game code is Builderboy's I think it's a bit unfair for him if you win, since you would get a prize even if you only did like half of the work. Plus, using someone else's code (if we discover it) can affect your originality score as much as if you make a clone/port of an already existing game. This is stuff to think about when participating, although again it is up to people if they wish to volunteer to help or not.
Title: Re: Zedd Physics Library
Post by: ztrumpet on June 02, 2010, 04:49:02 pm
@Ztrumpet it is, since help is allowed, but if like half of your game code is Builderboy's I think it's a bit unfair for him if you win, since you would get a prize even if you only did like half of the work. Plus, using someone else's code (if we discover it) can affect your originality score as much as if you make a clone/port of an already existing game. This is stuff to think about when participating, although again it is up to people if they wish to volunteer to help or not.
Ah, okay.  I don't think I'll use it, but it's nice to know that I could. :)
Title: Re: Zedd Physics Library
Post by: Builderboy on August 17, 2010, 05:28:02 pm
Alright after a long period of nothing happening on Zedd, i am releasing the unoptimized and messy source.  Feel free to mess with it and play around with it.

Also, i am going to now do a detailed explanation of how Zedd does its physics calculations.  Each object has multiple variables, 256x precision location, and regular velocity variables.  In the physics portion, Zedd loops through each object.  For each object, the object is moved along its Y axis in the distance of its Y velocity.  It then checks for any collisions with any objects, and if there is a collision, the movement is reversed, then the transfer of forces takes place.  All forces acting on the current object in the Y direction are transfered to the colliding object(s) and all colliding objects transfer any forces they are experiencing in the Y direction onto the current object.  The velocities are recalculated with momentum and energy equations, also taking into account a 'stickiness' threshold, where if the objects are moving at a slow enough velocity, they will both just stick to each other.  There is also friction calculated in the X direction, perpendicular to the plane of movement.  And there is also tipping calculated, if an object rests on the edge of another object, it will 'tip', as in a force is applied to the object to make it slip off the edge.  This entire process is then repeated for the X direction.  After handling the floors and sides in a similar manner, the process is now complete, and the loop moves onto the next object.

The most magnificent thing about Zedd is the transfer of forces, objects collide with other objects and transfer their forces onto others, so if you put a block on top of another, it pushes that block down, and the more blocks you stack, the more force there is. 

As for how the individual scenarios work, here is an example behind the physics of the specific things:

1st screenshot:  Is pure Zedd, the only thing added is forces attached to the keypresses.

2nd screenshot:  Springs.  The way springs work, is that there is a force applied to each box, and it is a direct relation to the distance between them.  So if the X distance is 500, the force is 5, if the distance is 100, the force is 1 lets say.  Since forces are independent of Axis, you do that for both objects, in both axis, and you are golden :)  A fancy spring animation seals the deal.

3rd screenshot:  Water buoyancy.  The physics that makes this screenshot cool are more Zedd than the custom water physics, its really not that complicated.  When a box is fully submerged, there is a constant force of say 500 upward.  The complicated part is where the border is.  Basically you take a percentage of how submerged each object is, and you take the same percentage of the force.  50% submerged is 50% of 500.  20%, take 20% of 500.  Not submerged at all, there is no force :) Zedd takes care of the rest.  So that you get these fun stacking effects with he transfer of forces.
Title: Re: Zedd Physics Library
Post by: SirCmpwn on August 17, 2010, 05:28:49 pm
^_^ finally!
HL2: OC is probably back on track now.
Title: Re: Zedd Physics Library
Post by: calcdude84se on August 17, 2010, 05:32:09 pm
So water acts like antigravity? :P
Nice to see a release, I hope you can get more work done on it.
Title: Re: Zedd Physics Library
Post by: ztrumpet on August 17, 2010, 05:34:52 pm
Wow.  I wasn't expecting it to make this much sense, but still, Wow.  Wonderful program.  I can't wait to try it. ;D
Title: Re: Zedd Physics Library
Post by: Builderboy on August 17, 2010, 05:38:52 pm
Yep, basically water acts like anti gravity ;D There isnt any dampening to speak of, although that wouldn't be too hard to implement.  The reason the boxes flicker and jump in the screenshot is because the boundary of the water is right at the transition of one pixel to the next.  I changed it to in the middle of a pixel and everything looks a lot smoother :)
Title: Re: Zedd Physics Library
Post by: ztrumpet on August 17, 2010, 05:40:18 pm
Um, prgmZedd does not have a header.  Shouldn't it be .Z1? :)

Wow, this is fun to play with. ;D
Title: Re: Zedd Physics Library
Post by: meishe91 on August 17, 2010, 05:40:36 pm
Wow, awesome work :) Glad this is finally in some sort of releasement stage ;D
Title: Re: Zedd Physics Library
Post by: Builderboy on August 17, 2010, 05:42:56 pm
Um, prgmZedd does not have a header.  Shouldn't it be .Z1? :)

Wow, this is fun to play with. ;D

Oh whoops ;D The original Zedd was created back when Axe didn't have headers if i remember correctly.  An easy fix ^^
Title: Re: Zedd Physics Library
Post by: calcdude84se on August 17, 2010, 05:43:05 pm
It probably didn't have a header because it was developed before the recent versions of Axe that allowed external libraries.
Before those versions you'd have to recall the library into the program manually, making a header meaningless.
Just my guess ;D
Edit: Ninja'd :P
Title: Re: Zedd Physics Library
Post by: bwang on August 17, 2010, 06:28:45 pm
O.o a release!
You should make a game based on this.
Title: Re: Zedd Physics Library
Post by: DJ Omnimaga on August 17, 2010, 10:11:22 pm
wow amazing, just played around with this and it's truly epic!
Title: Re: Zedd Physics Library
Post by: Builderboy on August 18, 2010, 02:16:48 am
Thanks guys :) Well im going to try to work on cleaning up the engine, and releasing a full fledged library.  And after that, i have an idea for a Physics Sandbox as an expansion library that implements Zedd and gives you ways to interact with the world and achieve more effects that push Zedd to the limit.
Title: Re: Zedd Physics Library
Post by: DJ Omnimaga on August 18, 2010, 03:24:56 am
A game with that would really rule o.o
Title: Re: Zedd Physics Library
Post by: matthias1992 on August 18, 2010, 09:44:40 am
A game with that would really rule o.o
Indeed. Awesome job Builderboy!
Title: Re: Zedd Physics Library
Post by: Builderboy on October 13, 2010, 02:09:00 am
Okay i actually have been working on rewriting this in my spare time.  It is now approximately twice as efficient as the previous engine, and has been rewritten with variable sized sprites in mind.  The friction and momentum transfer code is also being revisited for higher accuracy and speed.  I have a basic engine up and i have collision back up to 100%, although friction and momentum have not been implemented as of yet.

Also i am planning to implement Mass so that collisions can have a more realistic feel to them, although that hasn't been implemented yet.  At least collision was been finished ^^ that has taken me the better part of this week, going through handfuls of rewrites.

Here is a basic screenie of the new engine in action:
Title: Re: Zedd Physics Library
Post by: DJ Omnimaga on October 13, 2010, 02:29:03 am
Looks awesome! Glad you are working on this again :)
Title: Re: Zedd Physics Library
Post by: Builderboy on October 13, 2010, 02:46:59 am
Me too :) I cant say i was not influenced by the progress of Half Life 2 on calc either :D haha what can i say, i like a little friendly competiton ^^
Title: Re: Zedd Physics Library
Post by: DJ Omnimaga on October 13, 2010, 02:52:42 am
Lol :P

But yeah it's still cool to see this alive again :)

Btw does it runs at 6 MHz speed?
Title: Re: Zedd Physics Library
Post by: Builderboy on October 13, 2010, 02:55:13 am
That specific Screenie is at 15Mgz, but this version of the engine runs with a very reasonable speed at 6Mgz with a basic amount of objects, so its usable on both platforms :)
Title: Re: Zedd Physics Library
Post by: DJ Omnimaga on October 13, 2010, 02:58:04 am
You mean MHz? Ahh I see. Hopefully we can still achieve some hardcore games with this on 6 Mhz too :D
Title: Re: Zedd Physics Library
Post by: Builderboy on October 13, 2010, 03:08:04 am
Oh yeah MHz XD And i really hope so :D
Title: Re: Zedd Physics Library
Post by: AngelFish on October 13, 2010, 03:25:37 am
Builderboy, would it be possible to implement some kind of simple velocity-fluid resistance relational system into the water simulation? The balls appear to go a bit farther underwater than would be expected for differing impacts.
Title: Re: Zedd Physics Library
Post by: Builderboy on October 13, 2010, 03:51:21 am
Ah you mean how when you try to move through the water faster it resits you more?  Yes this could be implemented with some client code and would make the water demo a lit more realistic.  The actual physics and coding might be tricky though
Title: Re: Zedd Physics Library
Post by: AngelFish on October 13, 2010, 03:56:36 am
Yep. Assuming you're already working with the component forms of the vectors, you could use (1/2)CV² where V is your velocity component along a particular axis and C is an arbitrary drag coefficient. This is a simplification of the standard fluid resistance approximation of (1/2)ρV²CA, where ρ is the fluid density and A is the surface area being acted on.
Title: Re: Zedd Physics Library
Post by: Builderboy on October 13, 2010, 03:58:24 am
Precisely and since Zedd works completely in component vectors it makes life very easy :)
Title: Re: Zedd Physics Library
Post by: AngelFish on October 13, 2010, 04:04:41 am
The problem with that particular method is that the (1/2)v^2 term could lead to some decimal numbers, which Axe isn't particularly good at handling.
Title: Re: Zedd Physics Library
Post by: Builderboy on October 13, 2010, 04:10:20 am
Yeah, but note that you can generalize even further into simply CV^2 and half your constant. 
Title: Re: Zedd Physics Library
Post by: AngelFish on October 13, 2010, 04:15:32 am
Ah, that would give you nice whole numbers if you round the constant before you use it. It unfortunately gives you an unsigned upper limit of 256 for your velocity, though.
Title: Re: Zedd Physics Library
Post by: Builderboy on October 13, 2010, 02:02:31 pm
Well you should probably be dividing your velocity by a constant inside of the square so that it doesn't reach ungodly numbers, so the equation is evolving into something along the lines of V/C^2 where C is now our constant, although it is starting to mean something different XD The greater C, the more slippery our water is.

And More Eye Candy!  Yayy i implemented Masses fully, and now the inelastic collisions are physically accurate!  Basic sliding friction has also been implemented, although it is not at 100% yet.  In this screenshot there are 16 randomly generated shapes of the same density but different sizes, meaning they each have a unique mass.  And then there is a very large block with a large mass so you can see how the equations affect the performance :P

Note that while Mass is represented by a number from 1-255, anything over 32 starts to cause bad errors.  the big block in this screenshot is 16Mass, the rest are from 1-4.

Title: Re: Zedd Physics Library
Post by: AngelFish on October 13, 2010, 02:07:42 pm
Zedd was already pretty cool, but this is getting amazing. That looks very realistic for monochrome. A bit of sprite work in 4-lvl could make a great sandbox. How is mass calculated though? Could one attach sprites to mass data stored in a list?
Title: Re: Zedd Physics Library
Post by: Builderboy on October 13, 2010, 02:14:37 pm
When the object is generated, the height and width are randomly chosen from 2-4.  The Mass is the product of these numbers divided by 4.  H*W/4 = M.  To give each pixel of the object about a 1/4 mass.

Sprites have not been implemented yet, but each object will have a sprite number from 0-255.  255 will represent a filled rectangle with no sprite attached to it, and all of the other numbers will take an offset from sprite data given to Zedd in the form of a pointer.

And yes, i am already planning to make a simple sandbox program with this :) Where you can create and erase objects, apply forces to them, set global forces, and pause and resume the simulation.  Coupled with Object selection and property editing i think it owuld be a great way to experiment with Zedd :D I might even start it right now and it will evolve automatically as Zedd improves.
Title: Re: Zedd Physics Library
Post by: ASHBAD_ALVIN on October 13, 2010, 02:15:56 pm
making a game with this would be sweet :D
Title: Re: Zedd Physics Library
Post by: AngelFish on October 13, 2010, 02:18:56 pm
Already working on it ;D

Don't expect it anytime this year though :P
Title: Re: Zedd Physics Library
Post by: Builderboy on October 13, 2010, 02:25:22 pm
I hope many games to use Zedd in the future :) Thats why im planning a complete interface for accessing and modification of both objects and the Zedd world.
Title: Re: Zedd Physics Library
Post by: ASHBAD_ALVIN on October 13, 2010, 02:27:01 pm
I'd make something with that -- maybe a sidescrolling open world where you can blow things up :D
Title: Re: Zedd Physics Library
Post by: matthias1992 on October 13, 2010, 02:31:39 pm
Very cool builderboy! Now I don't intend to sound demanding saying this but I would like to see angular momentum (spin) in this, that, I think, would finish it off...
I am well aware it is difficult, maye not even possible, to implent...It's just something that would finish it all off. First problem is with the sprites/objects themselfs, if there is spin then the sprite must rotate...
Title: Re: Zedd Physics Library
Post by: Builderboy on October 13, 2010, 02:35:49 pm
That would require a feature i have not yet implemented into Zedd, an Open World.  Right now the entire world is stored with x256 precision.  That means that at some point, the numbers loop back to the beginning.  Well 2^16 = 65536 / 256 = 256 pixels wide of a simulation screen.  Unfortunately that doesn't give us much scroll space, but i am planning to implement an *open world* where if an Object goes outside of the 256 pixel region, it reverts to x1 accuracy and rudimentary (read: non accurate) physics.  When it comes back into the world, it is converted back into x256 accuracy. This might be tricky to implement, but the 256 region is big enough where i could even possibly freeze objects in place when they go outside and not have any physics at all.

EDIT: And in no circumstances will i be implementing Rotation unfortunately.  Not only does that make the collision many times more difficult, but the collision physics themselves would take exuberant amounts of time.  The entire reason for Zedd's speed is *Because* there is no rotation.
Title: Re: Zedd Physics Library
Post by: DJ Omnimaga on October 13, 2010, 03:33:55 pm
Wow nice Builderboy. Could you make a screenshot with even more different sprite sizes like a 8x8, 8x16, 1x1 and 24x24 one?
Title: Re: Zedd Physics Library
Post by: Builderboy on October 13, 2010, 05:24:22 pm
Im actually working on a sandbox demo to give everyone 100% control of Zedd and the new features :)
Title: Re: Zedd Physics Library
Post by: ztrumpet on October 13, 2010, 05:29:32 pm
Wow.  I can't wait for a demo.  Wow. ;D
Title: Re: Zedd Physics Library
Post by: SirCmpwn on October 13, 2010, 06:37:23 pm
Wow BuilderBoy!  Nice!  My physics engine also supports calculating collisions with maps, static (non-movable) objects, and has two bytes per object reserved for user data (such as a sprite).  It does variable widths, too.  I want to see some competition here :)
Title: Re: Zedd Physics Library
Post by: bwang on October 13, 2010, 06:42:00 pm
Whoa, Zedd lives again! Excellent :D
Title: Re: Zedd Physics Library
Post by: Builderboy on October 13, 2010, 06:46:21 pm
Competition it is then :) I plan on implementing static objects, as that is probably useful, and the map code would just be an extension of the current floor code, so that shouldn't be too hard.  I am particularly happy with my mass code however ^^ And graphics are coupled directing into the Zedd engine so sprite number is going to be built in, also with an option to draw a rectangle (multiple types) instead of a sprite.  You will also be able to customize the locations of your sprite buffers and the object buffer that Zedd uses.  How many bytes per object are you using?  I currently am using 16, although some of it is empty and some of it can be optimized.
Title: Re: Zedd Physics Library
Post by: SirCmpwn on October 13, 2010, 06:53:15 pm
I'm using 16, I believe, including space I have set aside for mass, which is currently unimplemented.  I leave all the drawing up to the user, and I'm going to use a callback sort of routine to allow them to draw all the objects without using a second loop.  The map is also totally user-specified, although the engine does provide a map drawing routine.  I'm trying to leave the user free to do what they like, I just provide an object management system.
Title: Re: Zedd Physics Library
Post by: Builderboy on October 13, 2010, 06:58:21 pm
Map is user specified meaning what?  And yeah thats also the approach im taking with Zedd, i just decided having the graphics engine built into Zedd would make it faster, and in some cases easier to manage, since you don't have to worry about sprite offsets, you just specify a sprite number.

Im also including tons of helper subroutines that do things like access objects locations, velocities, and global forces.  Global forces are something i implemented so that Zedd wasn't going to turn into a Gravity specific engine.  It runs in default with all of the objects floating in Zero-G.  But when you initialize the Zedd engine, you can specify some global forces that are applied onto the objects every frame, and so you can do things like gravity.  But with this you can also bypass gravity and flip the world upside down if you want :D
Title: Re: Zedd Physics Library
Post by: SirCmpwn on October 13, 2010, 07:01:15 pm
ooo, global forces sounds nice.  Mine doesn't use that, the user has to specify the gravity.  It runs in zero-g by default, too.  As for user-specified maps, I mean that they provide the data and are free to draw it however they like.
Title: Re: Zedd Physics Library
Post by: Builderboy on October 13, 2010, 07:04:43 pm
Ah gotcha, yeah drawing of tilemap would be handled by the user in my case as well, although i am going to implement tilemaps way in later development because i plan on implementing things like scrolling and such.  And currently i was silly when implementing global forces, and so every object has a copy of the global forces, a total of 4 bytes that are also stored in the World data x.x well thats 4 bytes i have free now :) Zedd has 16 bytes to store world data such as number of objects and other things like global forces.

I also have Zedd set up so that it doesn't modify the user variables ^^ Although i plan on making it slightly more elegant than just backing up the vars before and after simulation :P
Title: Re: Zedd Physics Library
Post by: SirCmpwn on October 13, 2010, 07:08:44 pm
What is the precision of your objects?
Also, let's see who can get hinges and springs done first :)
Title: Re: Zedd Physics Library
Post by: Builderboy on October 13, 2010, 07:12:21 pm
x256 for Zedd.  And as for hinges and springs, those are not going to be a part of Zedd, as they are more of client code.  I will probably release a physics expansion kit later that uses Zedd as the base, but right now Zedd is going to stay a collision solver, a base solver to provide advanced physics collisions in a physical environment (oooh that sounds catchy :D)

And even so, you can go tackle hinges on your own :P I'm going to stick with springs myself, hinges are a nightmare to code, haven't gotten a working one myself yet.
Title: Re: Zedd Physics Library
Post by: SirCmpwn on October 13, 2010, 07:18:00 pm
If you use 256, you can only scroll up to 255 pixels.  My engine uses x64, which is a bit slower, but it allows for 1023 pixels before wrapping.
Title: Re: Zedd Physics Library
Post by: Builderboy on October 13, 2010, 07:22:03 pm
yeah i am aware of this, but i chose speed over size, that is after all over 2.5 screens wide already, and 4 screens tall.  i don't think i need hard physics in a window any more than that :) Any farther from the view screen and i am most likely just going to freeze physics or go to a rudimentary less accurate system using x1 simulation accuracy, which pretty much sucks, but if you cant see it all that matters is that it doesn't fall apart :P
Title: Re: Zedd Physics Library
Post by: SirCmpwn on October 13, 2010, 07:28:18 pm
Fair enough :)
Title: Re: Zedd Physics Library
Post by: Builderboy on October 13, 2010, 07:31:19 pm
Heh indeed :) I am actually in the process of writing a sandbox that uses Zedd as a subroutine, and it is coming along nicely ^^ Soon you shall all be able to play! :D
Title: Re: Zedd Physics Library
Post by: SirCmpwn on October 13, 2010, 07:34:03 pm
I look forward to breaking playing with it ;)
Title: Re: Zedd Physics Library
Post by: Builderboy on October 13, 2010, 07:35:39 pm
Haha i look forward to all of your bug reports, i know there will be some :P
Title: Re: Zedd Physics Library
Post by: Michael_Lee on October 13, 2010, 08:06:33 pm
Ooh - this looks like fun!
Title: Re: Zedd Physics Library
Post by: meishe91 on October 13, 2010, 09:29:23 pm
Wow, that was a lot to read and take in :P I thought competitions were meant to be handled by Raylin though ;)

As for this, sounding and looking great, Builder :D I can't wait for the sandbox demo. It shall be epically epic ;D
Title: Re: Zedd Physics Library
Post by: DJ Omnimaga on October 14, 2010, 02:13:30 am
Lol SirCmwpn :P

Keep up the good work on both your engine and good luck :D
Title: Re: Zedd Physics Library
Post by: matthias1992 on October 14, 2010, 04:37:07 pm
Maybe I missed something but I didn't realize that axe supported subs with arguments? If it does then how? this seems to be undocumented (at least in the official PDF document)
Title: Re: Zedd Physics Library
Post by: SirCmpwn on October 14, 2010, 04:39:59 pm
use sub(NAME,arg1,arg2,...,arg6
arg1 is stored to r1, arg2 is stored to r2, and so on.
You can get these from [2nd]+[Vars], [R!ght], [3]
Title: Re: Zedd Physics Library
Post by: matthias1992 on October 14, 2010, 04:45:36 pm
cool! I never knew that! makes me wonder whether or not it is possible to make a sort of 'Gamemaker' which is just a bunch of useful subs copied into the program :P.
/me runs off and starts programming in Axe again (attempt no5)
Title: Re: Zedd Physics Library
Post by: Builderboy on October 16, 2010, 02:09:28 pm
Okay so now that the sandbox is in working stages i can resume work on the actual engine that powers it :D Next up on my list is fully supporting friction between the walls and all objects.  The friction will be greater the more the objects are pressed together :D
Title: Re: Zedd Physics Library
Post by: meishe91 on October 16, 2010, 05:15:28 pm
Great, can't wait :) Good luck.
Title: Re: Zedd Physics Library
Post by: DJ Omnimaga on October 17, 2010, 03:58:46 am
Nice to hear, I hope adding the friction is not too challenging
Title: Re: Zedd Physics Library
Post by: Eeems on October 19, 2010, 11:28:34 am
This is really exciting :D
too bad rotation isn't an option on the calc...
Title: Re: Zedd Physics Library
Post by: Builderboy on September 07, 2011, 06:46:02 pm
Alright guys, the date of the next release of the Zedd physics library is drawing near!  And as a results I have a whole new engine and a whole new set of features for you guys to implement into your games!  First off is the most important aspect of the engine in my opinion, which is the ease of use.  The engine is designed to be usable completely through subroutines, that way you don't have to go messing with Zedd's code, and still retain a high level of complexity, compatibility, and customization.

The second feature that should be very beneficial for anybody wanting to write a physics game is the ability to add in libraries that interface directly with Zedd and add new features.  This can be useful for using Zedd to simulate rope physics as well for example.

The third feature that is now supported is a physics callback method.  This can be used by the programmer to impart rules and forces to each object in the simulation, as you get to define a method that is applied to every object during the simulation.  This can be used to impart global forces that impact all objects, such as a global water line that applies buoyancy to the objects.  

The fourth and last major addition to the Zedd library is universal object friction.  All objects now impart and receive frictional force from the objects and world they collide with.  Not only does this mean more advanced stacking features, but also clever uses such as conveyor belts and moving platforms.

Now unfortunately in it's current state, Zedd is unable to be compiled with any current version of Axe, so the release cannot happen until a few bugs (namely the ** and *^ multiplication bugs) are sorted out.  Nevertheless, I have composed a screenshot demo of the new engine, and used it to create a world that demonstrates all 4 of the new features.  In the screenshot you can see rope physics, using an outside library.  Water physics, implemented with a callback function.  A conveyor belt, using the newly implemented friction.  And the control of the claw itself, which uses the built in functions of Zedd to interface with the simulation.

To play with the demo yourselves, merely send the AXE.8xp program, an the M.8xv appvar to your calculators ARCHIVE, and run the AXE program!  Controlls are arrow keys to move the claw, alpha to grab with the claw, and 2nd to move the conveyor belt.  Have fun!  And keep an eye out for the first official Zedd release!

Title: Re: Zedd Physics Library
Post by: squidgetx on September 07, 2011, 06:48:59 pm
O_o
Title: Re: Zedd Physics Library
Post by: Eeems on September 07, 2011, 06:53:09 pm
I might even play around with axe again just to try out working with zedd :)
Title: Re: Zedd Physics Library
Post by: Michael_Lee on September 07, 2011, 06:55:59 pm
That is awesome.
Title: Re: Zedd Physics Library
Post by: FinaleTI on September 07, 2011, 08:02:28 pm
Words cannot describe my giddiness. Er, words besides these, that is.
Title: Re: Zedd Physics Library
Post by: Builderboy on September 07, 2011, 08:04:11 pm
I'm glad everybody is interested :D I can't wait for the release so I can see how people are going to go about implementing it in their games ^^
Title: Re: Zedd Physics Library
Post by: ztrumpet on September 07, 2011, 09:46:15 pm
This is insane.  Excellent, excellent job, Builderboy.

How did you make the Demo compile?  O.O
Title: Re: Zedd Physics Library
Post by: Builderboy on September 07, 2011, 09:54:04 pm
Thanks :] I had to first downgrade to 0.5.3 to get all multiplication support, and then directly modify the Zedd engine and bypass all the user friendly stuff that Zedd should be offering, but that couldn't be offered because 0.5.3 doesn't support constants.  I also had to change all the names of the subroutines because I was using 5 characters and 0.5.3 only supports 3 X.X  It looked a lot worse, but still worked pretty well.
Title: Re: Zedd Physics Library
Post by: LincolnB on September 07, 2011, 10:58:19 pm
I can't wait for the release so I can see how people are going to go about implementing it in their games ^^

Oh, I well absolutely use this in my current project.
Title: Re: Zedd Physics Library
Post by: Runer112 on September 07, 2011, 11:00:30 pm
Thanks :] I had to first downgrade to 0.5.3 to get all multiplication support, and then directly modify the Zedd engine and bypass all the user friendly stuff that Zedd should be offering, but that couldn't be offered because 0.5.3 doesn't support constants.  I also had to change all the names of the subroutines because I was using 5 characters and 0.5.3 only supports 3 X.X  It looked a lot worse, but still worked pretty well.

Wouldn't Axe 1.0.2 work fine? I'm THINK all the flash corrupting bugs were solved by 1.0.2, although it still sometimes throws bad flash errors when it shouldn't.
Title: Re: Zedd Physics Library
Post by: Builderboy on September 07, 2011, 11:29:40 pm
It probably would work, but I don't like releasing software that relies on software that occasionally gives bad flash errors :P
Title: Re: Zedd Physics Library
Post by: annoyingcalc on September 10, 2011, 02:08:15 pm
that demo is cool
Title: Re: Zedd Physics Library
Post by: Builderboy on September 10, 2011, 03:56:58 pm
Thanks :) There is a bug somewhere in there due to a map design oversight, did anybody find it?
Title: Re: Zedd Physics Library
Post by: Xeda112358 on September 10, 2011, 06:00:41 pm
O.O I would love to use this! I plan to learn Axe, now!

EDIT: I cannot move objects that I have grabbed! What do I do? O.0
Title: Re: Zedd Physics Library
Post by: annoyingcalc on September 10, 2011, 06:40:17 pm
Thanks :) There is a bug somewhere in there due to a map design oversight, did anybody find it?
I did
Title: Re: Zedd Physics Library
Post by: Xeda112358 on September 10, 2011, 06:42:14 pm
I did! And now that I got it working properly, this is cool

Edit: Is there a source I can look at (the Axe code). I want to get a feel for how I would use Zedd
Title: Re: Zedd Physics Library
Post by: Builderboy on September 10, 2011, 07:11:08 pm
Zedd is not released yet, but I hope to make it extremely easy to use, through subroutines such as addZ() to add an object, and pushZ to apply a force, and such.  Everything is made to be super user friendly :)
Title: Re: Zedd Physics Library
Post by: LincolnB on September 10, 2011, 07:39:05 pm
wait, like having it install hooks and stuff that changes some tokens?
Title: Re: Zedd Physics Library
Post by: Builderboy on September 10, 2011, 08:14:33 pm
No, they are subroutines, since this is in Axe :)
Title: Re: Zedd Physics Library
Post by: LincolnB on September 10, 2011, 08:15:44 pm
Oh ok. that's still cool :) you could consider making it an axiom? although I'm not complaining.
Title: Re: Zedd Physics Library
Post by: Builderboy on September 10, 2011, 08:53:11 pm
Actually yes!  Me and Runer were talking about the possibility of making it an Axiom  ^^  But not until later releases :P
Title: Re: Zedd Physics Library
Post by: LincolnB on September 10, 2011, 09:35:03 pm
Oooh, that's exciting.
Title: Re: Zedd Physics Library
Post by: shmibs on September 11, 2011, 04:39:32 am
i very like the way this is looking. i probably won't ever use it for a project, though, because physics is just too fun to completely skip over in the writing process. what's the restitution on those boxes? they bounce a lot.
Title: Re: Zedd Physics Library
Post by: Builderboy on September 11, 2011, 01:59:46 pm
They do have perfectly elastic collisions with other objects in this specific version, which is why they bounce so much :P But that is 100% modifiable
Title: Re: Zedd Physics Library
Post by: Builderboy on September 19, 2011, 02:16:10 pm
Alright update with this, I was trying Axe 1.0.2 like you guys suggested, but apparently it has some issue parsing static pointers that is messing majorly with the engine.  0.5.3 doesn't have the static variables, 1.0.0 and 1.0.1 are unstable, 1.0.2 can't parse static pointers, and 1.0.3 has problems with multiplication.  There is officially no version of Axe out that can compile Zedd right now D: So this project is going to have to remain unreleased until I can bug Quigibo to fix the multiplication in Axe 1.0.3
Title: Re: Zedd Physics Library
Post by: Eiyeron on September 19, 2011, 03:12:16 pm
WOooh, that sounds incredible!
I'm interesssed too, or I WANT IT!
Title: Re: Zedd Physics Library
Post by: Eiyeron on April 15, 2012, 09:10:37 am
Bump, and to say I got some time to begin a port for Casio.
Buildy, If you get too some times, could you send me a PM? I would like to get some explanations ;)
Title: Re: Zedd Physics Library
Post by: leafy on April 15, 2012, 12:14:21 pm
I thought somepony already got the entirety of the Chipmunk fysix engine to run on the Prizm - I might be wrong though.
Title: Re: Zedd Physics Library
Post by: Eiyeron on April 19, 2012, 11:38:26 am
I though that was on CX CAS :S

Anyway, I ask someprecisions, Zeed is almost non-human readable, and I want to be sure that works too with objects that are bigger/smaller than 8*8
Title: Re: Zedd Physics Library
Post by: DJ Omnimaga on April 19, 2012, 04:20:49 pm
Hey Eiyeron nice to see you again :D, and nope this was always for the 83+. Written in Axe language :)
Title: Re: Zedd Physics Library
Post by: LincolnB on April 19, 2012, 05:33:57 pm
TBH the Zedd source is a lot more readable than I expected it to be. :) It's really optimized, and if you understand a few pretty easy-to-grasp Axe optimizations, some things will make a lot more sense. I think there's an official thread for Axe opts...
Title: Re: Zedd Physics Library
Post by: leafy on April 19, 2012, 07:06:52 pm
It can actually be even more optimized, but Builder wanted it to stay readable :O
/me runs
Title: Re: Zedd Physics Library
Post by: Eiyeron on April 20, 2012, 01:06:07 pm
Hey Eiyeron nice to see you again :D, and nope this was always for the 83+. Written in Axe language :)
Thanks Captain Obvious! ;) That's why I'm porting it in C ( for a porject, but hush)
Title: Re: Zedd Physics Library
Post by: LincolnB on April 20, 2012, 05:06:38 pm
Small confusion...no need to lose your cool.
Title: Re: Zedd Physics Library
Post by: DJ Omnimaga on April 21, 2012, 09:15:07 am
Yeah I was pointing out since you seemed to think it's for Casio or something. <_<
Title: Re: Zedd Physics Library
Post by: Eiyeron on April 21, 2012, 11:58:47 am
I didn't lose my cool atm...
Title: Re: Zedd Physics Library
Post by: DJ Omnimaga on April 21, 2012, 08:27:10 pm
I think he probably saw your reply to my post as offensive or something.
Title: Re: Zedd Physics Library
Post by: Eiyeron on April 25, 2012, 05:28:17 am
Really? I didn't mean it :S
Title: Re: Zedd Physics Library
Post by: DJ Omnimaga on April 25, 2012, 10:54:38 pm
I think it might have been the "Captain Obvious" remark, but it's ok don't worry :P
Title: Re: Zedd Physics Library
Post by: Eiyeron on April 26, 2012, 08:06:07 am
^^
So, is buildy still present sometimes on this site? I must ask him some questions:
1- Is Zedd made for variables sized objects?
2- COuld you comment a bit the code? I'm trying to convert him, but it's-a-bit hard to decypher Oo
Title: Re: Zedd Physics Library
Post by: Builderboy on April 26, 2012, 02:11:50 pm
Yes Zedd works for any size rectangle, although with the current tile detection things might get a bit weird if you make the object larger than the tiles.  And sure, why don't you send me a PM and we can work through some of the code that is giving you trouble :)
Title: Re: Zedd Physics Library
Post by: Eiyeron on April 29, 2012, 06:56:42 pm
I dunno why not... ANyway I want to part the graphic part with the logic part, because Some objects could be not sprites (functions, or something else)