« first day (530 days earlier)      last day (4480 days later) » 
00:00 - 20:0020:00 - 23:00

8:01 PM
Are there even any double diamonds anymore?
 
user4704
Wait that was actually a thing?
 
Yeah
At least, I'm pretty sure it was.
 
I don't think so
I remember it being around a loooooong time ago
but quoth the raven, "nevermore"
 
It actually was a thing? I just made it up....
 
Unity answers has it
and it's built on a copy of the original stackexchange system
 
user4704
8:09 PM
Yeah I found a meta post about it.
 
8:43 PM
I don't understand component-entity systems
I've read through quite a few articles but it hasn't really clicked
 
I understand pieces of them, but I read all these questions on here about "How do I get component X to communicate with component Y?" and think to myself: Man, that looks like more pain than it's worth
 
I don't understand the cache-coherency thing if, say, each sprite component has to do a key lookup into a transform component and the script component has to modify the sprite state component
 
:/ yeah, I don't know
 
@JohnMcDonald I do the same with any question relating to MVC and game dev
 
MVC is a bit better, in that there are obvious advantages to keeping your game logic out of your rendering logic
 
8:50 PM
yeah, but if you're doing a normal update/render game loop, then it's already done for you
 
kind of like how in Voxatron the game objects push bytes onto a 3D array that represents the voxels
 
I mean, there's some cases where MVC is good, but too often people are like 'how do i do mvc in game?"
 
and then the render handles turning 3D array into triangles
or like, not using game-world coordinates for rendering
if all your rendering coordinates are player-centered, you don't randomly have floating point errors when you're too far away from the center of the world even if you're using a low number of bits.
 
9:14 PM
Anyone in here has knowledge of skeletal animation systems and ragdoll animation systems that is willing to give me a few tips?
 
@PaulManta Ask away. If we can help, we will.
Even if someone later on is able to help (someone not currently in chat), you'll be informed of the response.
 
@TreDubZedd Well, for starters, in this 2D game I'm making I'd like to implement ragdoll animations and I can't get my head around a few things.
For example, while I'm animating the character, what should happen to the physical limbs?
Should they also be moved, or should they be left hanging freely around the character?
 
I suppose that depends on the effect you're going for
If you want it to look natural--up to the point that your ragdoll is flung through the air/against objects--you'd better animate the limbs along with the torso.
 
@TreDubZedd In that case, how should they actually be moved? Afaik, most physics engines (I'm using Box2D) aren't good at handling moving the bodies around directly. They expect you to apply some force to the bodies, and the physics engine will calculate their next position.
Doesn't moving the limbs alongside the animation imply you have to set their position directly, at every frame?
 
If I were doing it, I'd probably have (at least) two states: ragdoll_enabled and its opposite (something like programmer_controlled). I'd only allow the physics engine to operate on individual limbs when ragdoll_enabled is true.
 
9:23 PM
@TreDubZedd yeah, a lot of games do that
 
As soon as my character was hit by a cannon ball (e.g.), and ragdoll effects made sense, I would change modes and stop explicitly animating the limbs.
 
So like in Unreal Tournament, the character models are rigid and controlled until you die, then all of a sudden, your limbs are loose and free to do whatever
 
@TreDubZedd But say for example you wanted something like this: you have an animation where the character raises its arm; a bullet is fired and it should actually hit the arm at the position the animation indicates it is; if the limbs are not actually in the position indicated by the animation, the bullet might not hit the arm, even though the action as seen on the screen makes it seem like it should have hit it.
 
@PaulManta I don't think I understand the problem.
 
personally, unrealistic ragdoll = more fun
 
9:27 PM
unrealistic = more fun :P
like, Bethesda arrows have 0 mass except for the one that kills you, which weighs a ton and knocks you back 20 feet.
 
@Jimmy Actually, those arrows still have 0 mass (or, close to 0), they're just going really fast.
 
well, mass * velocity is still huge
to knock a bear 20 feet back, you need a lot of momentum
 
Yeah. the mass is about the same mass as an atom, they're just going at light speed when they hit :P
 
@TreDubZedd A clearer example: if the physical body is static, and it's standing up right all the time (for as long as the character is alive), then even though the crouching animation is being played, his body still gets very high exposure to bullets.
This means I have to somehow move the body alongside the animation, but how do I do that in a way that doesn't mess up the physics simulation?
 
@PaulManta That seems like you have a problem with collision detection, not ragdoll
 
9:30 PM
@PaulManta If he's crouching, and bullets are going through the air over his head, and still hitting him, you're doing collision incorrectly
 
You seem to be talking about how a skeleton system interacts with the collision system
 
@JohnMcDonald Yes, exactly! :D
 
Seems to me like you'd want to check the bullet against each limb
 
@JohnMcDonald That's not my problem. Collision detection is done by Box2D.
My problem is, how do I make the physical model match the animation? (Each limb at the correct position.)
 
Does Box2D not provide a mechanism for overriding they physics-calculated positions with your own?
 
9:34 PM
Ohh, hmm. So you have an animation that is a single graphic, then you are modeling the animation again in box2d with all the limbs and want to know how to sync the two?
 
The problem has two sides, too: (1) how do you make move the limbs without breaking the physics simulation; and (2) how do you architecturally implement communication between the animation and physics systems, cleanly.
@JohnMcDonald Basically, that's it.
 
So what does this have to do with ragdolls?
 
Perhaps your "animation" should be guides for physical forces--apply forces to each limb in order to get it into the desired position for the end-result animation.
 
@TreDubZedd Not that I know of. Wouldn't that be something very dangerous to allow?
@TreDubZedd Does Blender/ Maya/ whatever other tool support this? If not, it would be a PITA for both the programmer and the animator.
 
It sounds to me like you're trying to combine, in your animation, meshes that should not be combined.
That is, you should have a set of frames for your torso animation...and a separate set of frames for your right arm animation.
 
9:38 PM
it seems.... really weird to try to force box2d to match a pre-rendered animation
 
@TreDubZedd How does that solve my problem with syncing the aniamtion with the physical simulation?
 
@thedaian yeah, I've been thinking the same
 
@thedaian How would you implement something like this, then? Or is it never done?
 
Well... what is the desired end result?
 
@PaulManta Can you change any physics properties at run-time?
 
9:40 PM
@TreDubZedd Yes.
 
Normally, I'd think you'd make a box2d figurine, have it move the way you want it to, and add graphics for each individual limb (one for the head, one for each leg, one for the torso, one for each arm, etc)
 
usually the limbs are controlled by box2d as separate objects. if you've got a pre-rendered animation, then just use that and redo your collision detection code for that, don't try to force box2d to follow your animations
 
@JohnMcDonald That doesn't allow for finer animations. There's only so much you can do with pushing and pulling bodies.
 
Define: animations then
You mean like facial expressions?
or..
 
@JohnMcDonald I did say it's skeletal animation, so I'm talking about realistic leg movement while walking, realistic arm waving, maybe protecting one's face from an explosion by covering it with a hand, etc.
@JohnMcDonald Facial expressions are easily done as different sprites for the same body drawn at different keyframes.
 
9:44 PM
I was pretty sure all of that was possible with box2d + images for the limbs
watches soldat video again
 
@thedaian You're saying I should have two collision detection systems?
 
user4704
@PaulManta As in inverse kinematics?
 
Yeah, it's a bad video, but I'm pretty sure Soldat uses the method I'm describing: youtube.com/watch?v=TEzAC6jK858&feature=related
 
user4704
IK is usually what is used to do those kinds of things.
 
user4704
Doesn't really have anything to do with collision.
 
9:47 PM
When you're alive, the walking, running, rolling, jumping, aiming, shooting animations are all controlled by the skeleton, and different images are sometimes drawn over the limbs. When you die, the skeleton turns into a ragdoll, so that's proof that they are using a skeleton for all of that
 
@PaulManta Actually you should only have one collision detection system. Either use separate objects for the limbs and figure out how to recreate your realistic animations doing that, or drop box2d for collision detection because it's not going to sync up with your realistic pre-rendered animations
 
@JohnMcDonald Not exactly what I would call 'fine' animations. Can you do anything remotely close to Outland (youtu.be/8Ff-I6x2KSA) without prerendered animations?
 
Is there a part of the video I should look at? 7 mins is a bit long
 
@JohnMcDonald Skip somewhere at the middle, I guess. Look at how the character is moving.
@JohnMcDonald The most impressive animation I've seen done solely with a physics engine is from the Box2D testbed, the Theo Jansen Walker. It was a pretty amazing feat, using motors and whatnot to actually achieve the effect.
Physics-only animations are good for robotic stuff. You can't really do fluid animations without pre-rendering them.
 
I was pretty sure the walker was just an example of how you could use motors to make something move. I don't think the only way to move stuff in box2d is to apply a force, is it?
 
9:53 PM
@PaulManta Those are god animations, I'm not familiar with the game in question, so I don't know if there's ragdoll...
or even limb specific collisions
also ~3 minutes into that video is a good starting point for actual gameplay
 
@thedaian I don't know either. I am curious how it might be possible to have both limb collisions and finer animations.
 
So, why do you want to map out the limbs?
 
@JohnMcDonald Two reasons: (1) the crouching example again, collision should (ideally) occur with the character being in the position indicated on-screen; and (2) so you can easily switch to ragdolls when the character dies.
 
Well, point #1 can be handled in other ways than to have a skeleton set up, but the only way (that I know of) to handle #2 is to have images drawn for every limb
 
@PaulManta Frankly, I expect the character model in Outland uses some sort of basic skeletal rigging, or it's just well animated and who cares if a bullet hits a limb or doesn't
 
9:59 PM
@JohnMcDonald At point (2): that goes without saying (I already mentioned I'm using skeletal animations).
 
So, you have 2 sets of graphics? One set with the character pre-rendered, and an other set of pieces for each limb for when the character dies?
 
@thedaian I'm not trying to copy Outland. It might use skeletal animation as well, but it certainly is pre-rendered skeletal animation. There's no way they achieved that by applying forces to limbs.
@JohnMcDonald How I store my data on disk is not yet fully decided, but it will be soemthing along these lines: a sprite for each lib, and each sprite has an associated shape (the shape is used by the physical simulation).
 
box2d has 3 settings for objects, and one of those is a way to manually set the position of limbs
 
@PaulManta I guess my confusion is part from "what are you actually doing"
 
The animation themslves are bones and keyframes, and each bone is associated with one of the sprites.
 
10:03 PM
cause I'm pretty sure you can move limbs manually in box2d
 
@JohnMcDonald I know. But that is highly discouraged to do in the middle of the simulation.
 
Middle of what simulation?
 
@JohnMcDonald While the game is running.
 
box2d doc for the 3 modes: box2d.org/manual.html#_Toc258082973 and we're talking about the b2_kinematicBody
"They can be moved manually by the user"
Where is the discouragement?
 
@JohnMcDonald Hmm, I skipped that bit. Let me take a closer look at it to see if it's what I need.
@JohnMcDonald Can a body be changed from kinematic to dynamic in the middle of the simulation?
 
10:09 PM
Random guess: yes
 
So I could enable ragdolls when the character dies?
 
"You should establish the body type at creation because changing the body type later is expensive" - box2d.org/manual.html#_Toc258082973 7.2
So: "yes", but don't do it often
 
@JohnMcDonald Good to know.
 
@Paul even if you cant change the body type, just create new bodies and destroy the old one.. nothing to worry about
 
And a slightly related question: how does the character stand up? Kinematic bodies and collide with static ones (the ground), so should I have a platform tied to the character's main body?
 
10:12 PM
I don't know how easy it would be to make animations like the ones from Outland, but I also doubt that Outland used animations based from a skeleton like this
 
@MaikSemder That's probably more expensive than just changing the type, though. Anyway, I should ask this on the Box2D forums to make sure.
 
nothing to worry about too much, its gonna be fast enough, dont worry
@Paul which platform?
 
@MaikSemder Windows (I don't like the term "PC" used to denote a platform :P )
 
yeah definetely fast enough :p
 
@JohnMcDonald You think they are frame-based? They'd need a whole lot of frames to make movement that smooth.
 
10:16 PM
yeah, I really don't a whole lot about box2d other than the little bit I researched a while back. And yes, I think those animations are "frame based"
 
we create all bodies and constraints for the ragdolls in the frame our pawn dies, and its not on a modern pc, its on 5 years old platforms, xbox and ps3, if it works there, its gonna be fast enough on a todays PC :p
 
@MaikSemder Thanks! :D
 
pleasure :)
 
yeah, especially if it's only something that's going to happen once or twice during a frame, and not every frame, the speed should be alright (unless it's a behemoth)
 
@JohnMcDonald It is possible to combine the two. The Outland character has a cape that is certainly "frame-based", though it would be just a bone with different sprites pasted on top of it at different keyframes.
 
10:22 PM
tbh, I'm not sure I'd actually have a bone for the cape if you were going to also have "frame-based" animation for it. I might include it with the torso frames
 
@JohnMcDonald Of course, whatever fits the particular character better. :)
 
It's just a graphical device, it doesn't have any gameplay effect or physics that apply to the real world
It would be a different matter if you were actually going to attempt to model it with physics and wind
 
@JohnMcDonald No thanks! :)) This is already hard enough.
 
heh, yeah, no doubt
I just came across this video when thinking about how to get a character to stand up: badlogicgames.com/wordpress/?p=2017
 
@JohnMcDonald Hmmm, thanks! I'll bookmark this.
 
10:29 PM
Or these guys just use a circle and forget about the skeleton: huesforalice.com/project/40
 
@JohnMcDonald Yeah, but that's not what I do. I might use that as the "support body" (the one I actually move around, while the limbs and torso are just attached to it).
 
yeah
Soldat is free and may (or may not) give you some ideas. I don't think it uses box2d, but they must use something similar
 
There's one last thing I'd like to ask about: how to actually organize the files in the game's directory. As I said, for every sprite I have a body (forearm.jpg has forarm.body) -- that's the easy part.
Then I should probably have some animation files: walking.anim, jumping.anim, etc, that reference the sprites and define keyframes.
How can I (and should I) have a separate character.model file that references the forearm.body-type of files to actually define the final body of the entity.
I'm thinking this would ensure that my animations are all coordinated (one doesn't have more limbs than the other, and it also makes mapping of the animation to the physical limbs easier during initialization).
 
Soldat is pretty old. Older than Box2D I think.
 
True enough. Box2D: September 11, 2007. Soldat: August 23, 2002
 
10:41 PM
6
Q: Map Tiling Algorithm

Dan PrinceHTML5 & Javascript RPG 200 x 200 map Map generated from heightmap 6 types of tiles 24x24 px tiles Example Map Ok, so I am writing a game in JavaScript with HTML5, in which a 200x200 map is generated from a randomly created heightmap. I have a fairly simple algorithm which extracts the c...

Perfect question that might help me solve my tiling as well. :D
Favorites it
 
that guy gets my +1 cause those pictures he included
 
It's a well written question.
 
that too
 
00:00 - 20:0020:00 - 23:00

« first day (530 days earlier)      last day (4480 days later) »