Vituri : Forget this thread. :P

http://www.pasteall.org/pic/show.php?id=25191

Hello everyone. :slight_smile: I will be participating in the Blender 2012 Summer Game Competition. I started on this game a few weeks ago.

I don’t really have much to show at the moment… but when I do, it’s all going here.

Vituri will be a side scroller Action/Adventure game.

From the title it looks dark. Looking forward to seeing some screenshots.

Screenshot. :stuck_out_tongue: http://www.pasteall.org/pic/show.php?id=25200

I’ve got a question. Should I pick option 1 or option 2? Which would be better?

http://www.pasteall.org/pic/show.php?id=25300

Screenshot’s somewhat dark, but it’s looking pretty good. As for your question, it’s kind of depends on how you handle your physics. If you’re going to use Bullet to align your character to the ground, then you should be sure that he won’t push upward on the slope more than you need to push him (so that he doesn’t fly up at any point). If you choose option 1, then you’re probably not going to rely on Bullet to move the character up hills. If you do it right, he won’t fall down hills either, though.

Thanks.

and I will be using bullet physics for my physics. :stuck_out_tongue: You start talking gibberish to me about halfway through the paragraph though…

But basically what I am asking with that picture is that…
Should I align the player’s armature to the slope? (option 1)

or should I just align the main parent (AKA physics cube) to the slope? (option 2)

I’d align the main parent to the slope. It will be a lot easier to walk along it, since you won’t be pushing into it.

However, if you notice, when you run up a slope, your body doesn’t become perpendicular to the ground you run on. You could (and most games do) get away with running with choice 1 and just have the player oriented with the cube.

It’s actually 1 that have the jump problem (if You drive the collision box with local forces). In 2 local forces are parallel to the ground so it should not result in jumping. (it’s when You apply force to stop sliding and possible to run downhill You may get jumps in case 1).

update: If You want to align the armature to the ground the best way is to align the collision box. If Yo want the armature upright but just align the animation it’s more of an open question.

I didn’t think of that, so I could just have the feet aligned to the ground instead… how would I do that? Is there a way to get the bones to do that?

But how would I stop the jumping when I move up it? (I am using getLinearVelocity/setLinearVelocity for movement.)

Thank you all for your replies. :slight_smile:

The cleanest way is to make sure Your forces (or velocity change) is parallel to the ground. You have to figure out the ground orientation anyway (a ray reading the ground normal should do) if You want to adjust the animation. I don’t know much of animations yet. But the new animation code that allow to blend layers should make something really pretty possible.

If you want just the Character’s Feet to align, then basicall align the whole Collision Box to the Slope’s Normal (Option 2) and in Addition set a Bone Constraint to the Torso Bone – a Transform Constraint maybe, to tell the Body always to stay upward.
This will probably look awkward, but it can be a Base for a better System in the Future.

You mean rayCast? and is it possible to get the owners orientation so I could simply do something like


owner.orientation = ground.orientation

Option 1 is definitely the way to go. Aligning feet to a surface is not done by rotating the entire character. I actually just thought of an easier way to align feet, which I’ll tell you on Skype soon. Maybe I’ll make a little demo for you :wink:

Don’t align anything to the slope except the feet. When you go up a hill, you don’t lean back to match the slope, you actually lean forward.

Yes, but that depend on style to, in a cartoon like game it might be the right thing to align the character to the slope.

Update: From the style of the pics posted it’s completely a matter of taste for this game.

That’s what I had in Mind with »awkward«. I have seen the Method on Oddworld: Munch’s Oddysee, but it has indeed been done better before.
The best Way to go would actually be to have two Cubes/Empties which tell the Feet (Bones) where to go. So, you could make a whole Locomotion System for the entire Body. (Take, for Example, a Look at the Game Limbo, it has some really good though subtle Locomotion, or the Game Outcast has such a System for the Feet/Legs – Assassin’s Creed would be to much to look at. :wink: )

Okay, so I will go with option 1… :stuck_out_tongue:
How will I keep it from jumping?
(Sorta off topic) How do I get the children? (foot = sce.objects[‘rig’].children[‘foot’]? Is that how I do it?)

Children: Yes. And if you want to get all Children, then use .childrenRecursive, but the Way you wrote it should work for acessing a particular one.

To keep characters from jumping off a slope, I use a negative z motion of -.5 or -1.0. It works best if you can use python to avoid motion actuators. I think there is a script on my AE thread or blog that could help you with replacing the motion actuators.

@PlanetKiller, I am actually using python for most of the stuff in here. :slight_smile: but thank you, anyway. :stuck_out_tongue: and I have decided to not have slopes as it will just be trouble anyway and I do not mind not having them. :slight_smile: I think this game will be better without them.

@All, I have been slowly developing a story… Please try not to confuse this with Angry Birds wink wink but here is a work-in-progress enemy pig. (Actually, all (or most) of the inhabitants of this game will be pigs that look like this. [both good, bad, and neutral])

http://www.pasteall.org/pic/show.php?id=25788