Jump to content
  • Advertisement
Sign in to follow this  
fguihen

classes needed to create a simple person?

This topic is 5469 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

hi. im new to all this game programming. i am making an application that shows the chaotic behavour of crowds. i want to do it in 3D. im wondering what would be usual ( and possibly best) method to create a simple stickman. my idea would be to create a class called "stickman". this would have a number of methods like "run", or "move_arms" etc.there would be a seperate class called "mans_intelligence" which would be the intelligence for my man. im not sure how it would work when i want the man to run, and move_arms at the same time,if id have to have each method in a seperate thread or something.are there any other ideas of how to do this properly that anyone can tell me? thanks.

Share this post


Link to post
Share on other sites
Advertisement
Stay away from threads -- they won't help.

Don't worry about animation until after the simulation is working.

Don't try to apply multiple animations to a model. If your stick man has three types of leg movement (stopped, walking, running) and three types of arm movement (still, swinging, flailing), then you will have nine animations. Generally, it is more effective and it looks better when an artist creates all the combinations rather than doing it in the software.

Share this post


Link to post
Share on other sites
IMO, it'll be very useful, if several animattions can be combined together. For example, if a charecter is walking on the street, as soon as he sees one of his old friends, his leg animation still remains the same, and a hand waving animation will be applied to the charecter's upper body(or just one of his arms).

It can be achieved by storing some specific boneIDs(or boneWeight) in the animation data. In the above example, the walking animation moves arms and legs, and hand waving animation only moves one arm, but has much higher influence on the arm and no influence on the other parts, so the two animations will be blend to form the final animation based on the weights.(and for boneID case, you can just replace the arm animation)

Of course if a charecter has diffrent body structure to the original one, the animation won't work correctly.

http://www.gamedev.net/community/forums/topic.asp?topic_id=272184

Share this post


Link to post
Share on other sites
Don't use threads for animating multiple objects at once. Rather, just loop through the objects every frame and move each one. Your main game loop should look as follows:

while(true) {
currentTime = getTime();

foreach(person p in people) {
update(p, currentTime);
}

render();
}

I suggest looking at a general tutorial on animation (for 2D games for example); then you can apply this in 3D with stick people fairly easily.

Share this post


Link to post
Share on other sites
Quote:
Original post by wanzi
IMO, it'll be very useful, if several animattions can be combined together. ...


Useful -- yes.
Easy to implement -- no.
Easy to make it look good -- no way.

Share this post


Link to post
Share on other sites
Quote:
Original post by JohnBolton
Quote:
Original post by wanzi
IMO, it'll be very useful, if several animattions can be combined together. ...


Useful -- yes.
Easy to implement -- no.
Easy to make it look good -- no way.


He's right. There are better ways to implement this sort of thing.

Share this post


Link to post
Share on other sites
AFAIK Quake has already use somewhat similar technique. They call them tags, the main purpose for tags is to minimize the animation data(KeyFrame not bones though)

Share this post


Link to post
Share on other sites
im a little more beginner than you all realise. can you explain what you mean by adding bone weights to the animation, and also more about the key frame method that you say they use in quake. im really beginning here so i need a lot of info and i need it to be put basicially.thanks all

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!