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.
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
How this translates into MOSprites physics, I don't know, maybe it involves the perennial DepthCheck variable, and things.
1/(MV)=S(1) Sharpness to penetrate 1px of 1 integrity I/(MV)=S(I) Sharpness to penetrate 1px of I integrity I/(MV)=S(I) -> MV"S(I)"=I and P=MVS, ??? Integrity seems to be the Impulse/Momentum needed to penetrate a pixel
Questions:
How much Momentum/Impulse does a MOPixel need to inflict an entry/exit wound on a MOSprite
How does a MOSprite impart an Impulse on MOSprites, and Pixels?
How do Material/Pixel properties affect the characteristics of MOSprites/MoPixels
How are distances calculated in non-rectilinear directions? Would a perfect 45 degree transit through a px be 5*2^(1/2)cm? (This is important to penetration through a thickness of px, and MOSprites) (At the very least, MOPixel-px collisions seem to be surface-blind, and freak out on non-smooth surfaces)
Thu Jan 09, 2014 8:22 am
Arcalane
Joined: Sun Jan 28, 2007 10:32 pm Posts: 1609 Location: UK
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?
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot post attachments in this forum