Data Realms Fan Forums http://45.55.195.193/ |
|
How does Cortex Command do its sprite physics? http://45.55.195.193/viewtopic.php?f=4&t=45545 |
Page 1 of 1 |
Author: | ryry1237 [ Thu Jan 09, 2014 12:59 am ] |
Post subject: | How does Cortex Command do its sprite physics? |
In particular, how is it capable of creating semi-realistic 2D physics interactions from nothing but sprites? A sprite is only composed of a bunch of tiny squares, yet if I draw a sprite circle and place it in the game, it acts as if it were actually round, rolling about and deflecting bullets at angles (given sufficient hardness). I'm not really asking for any specifics, merely the general concept of how a physics system is capable of "detecting" angles from a bunch of squares. Just a curious question |
Author: | Foa [ Thu Jan 09, 2014 8:22 am ] |
Post subject: | Re: How does Cortex Command do its sprite physics? |
I think there are several posts about how reflection works in CC (it has no concept of line/surface detection), and particle physics (something something, sharpness is an inversely proportional to a particle's size). I don't know if there was a post about MOSprites, though. What I could scrounge up about MOPixels-on-px physics Code: M, mass -- kg (a standard measure)? oz. (gold's value/weight per px)? S, sharpness -- (m/"px/m")/S; "px/m" is defined in Base.rte/Settings.ini, I think. V, velocity -- Knowable, but unknown; it probably involves px, or "px/m" P, momentum/impulse? I, structural integrity MSV = P P-I = P' P'/M/S = V' MSV' = P-I D, distance --D(n px)=m/"px/m" -+-- By default, 1px is 5cm, or m/20px -+-- In practice, this means MOPixels are smaller than 1px when \S > 1\, because S(n) = D(1px)/n Questions:
|
Author: | Arcalane [ Thu Jan 09, 2014 4:55 pm ] |
Post subject: | Re: How does Cortex Command do its sprite physics? |
ryry1237 wrote: In particular, how is it capable of creating semi-realistic 2D physics interactions from nothing but sprites? A sprite is only composed of a bunch of tiny squares, yet if I draw a sprite circle and place it in the game, it acts as if it were actually round, rolling about and deflecting bullets at angles (given sufficient hardness). I'm not really asking for any specifics, merely the general concept of how a physics system is capable of "detecting" angles from a bunch of squares. Just a curious question As far as I can see? The game automatically generates a collision 'mesh' based off where pixels are and aren't, using the AutoGenerate feature of the AtomGroup and DeepGroup chunks. In theory you could probably set and build your own, but I'm not sure whether it expects a full list of every pixel or just a series of coordinates. I'm sure there's at least one object that has an entirely manually defined AtomGroup, but I forget what. Long story short; the ball is round because you made it round. Make sense? |
Page 1 of 1 | All times are UTC [ DST ] |
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group http://www.phpbb.com/ |