Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Professional Discussion / Making a character walk...

Author
Message
Indian Homie G
21
Years of Service
User Offline
Joined: 23rd Jan 2004
Location: San Jose, CA
Posted: 8th Aug 2004 11:24
So. I've coded the main game engine and added some features, right now using only a sphere as the player. I think its high time that I added a player. My question is, if i modelled a character, and had to make a walk cycle, how would I implement it into DB Pro? Right now, for moving the sphere I am only using move object 1,100, etc. Should I model/animate the guy walking in place, and then just loop it when the the upkey is pressed? Or should I animate him wlaking forward then PLAY that when they key is pressed? I want to get the walking as smooth as possible, like how they do it in GTA Vice City

Any help appreciated!
Catalyst
21
Years of Service
User Offline
Joined: 6th Sep 2003
Location:
Posted: 8th Aug 2004 12:00
You should have the walk animation loop when walking. The loop object is different that the play object, if you say play when I push the upkey, it will keep trying to play it every time it detects the upkey. So in effect, holding the up key will make it try to play it each cycle. For walking where you want to be able to hold the button down, use loop object.

And yes, you definately want him walking in place when you animate it.
Indian Homie G
21
Years of Service
User Offline
Joined: 23rd Jan 2004
Location: San Jose, CA
Posted: 8th Aug 2004 12:38
Okay, thanks, but if I keep the "move object", load him in, then loop it, wont it be sort of obvious that hes moving forward with a anim cycle? Thanks!
Catalyst
21
Years of Service
User Offline
Joined: 6th Sep 2003
Location:
Posted: 8th Aug 2004 12:57
Well, it depends on how you have it set up. One thing that will really make it look bad would be if he's being animated slower or faster than he's moving. Make sure you have something in your code to regulate both speed of movement and speed of animation. Other than that, yes he is just moving forward with an animation cycle. So are the characters in every game out there. Just make sure that the speeds are regulated and his animation times well with his steps and you're fine.
Indian Homie G
21
Years of Service
User Offline
Joined: 23rd Jan 2004
Location: San Jose, CA
Posted: 8th Aug 2004 14:02
Cool thanks a lot that really helped...except is there a command to slow down/speed up the animation?
Catalyst
21
Years of Service
User Offline
Joined: 6th Sep 2003
Location:
Posted: 8th Aug 2004 14:17
set object speed objnum,speed

Speed is integer, 1=slowest, 100=fastest.
Indian Homie G
21
Years of Service
User Offline
Joined: 23rd Jan 2004
Location: San Jose, CA
Posted: 8th Aug 2004 15:13
Thanks a lot dude that really answered my question much appreciated!!!
Catalyst
21
Years of Service
User Offline
Joined: 6th Sep 2003
Location:
Posted: 8th Aug 2004 16:03
No problem. Right now I'm a few steps ahead of you in my game, so I just got finished working with make object animate in response to keystrokes. If you still have some issues, I've been able to get mine working pretty well and can help out. I've got more than just walk cycles, actually I've got about 23 different animations linked to various keystrokes or just object interaction. Figured out some neat little tricks if you start running into problems.
Indian Homie G
21
Years of Service
User Offline
Joined: 23rd Jan 2004
Location: San Jose, CA
Posted: 8th Aug 2004 16:04
Cool, would you mind giving me your email address?

Thanks
Catalyst
21
Years of Service
User Offline
Joined: 6th Sep 2003
Location:
Posted: 8th Aug 2004 16:10
[email protected]

While working on DBP stuff, I actually tend to check the forums far more regularly than my email, so you're probably better off here.
Indian Homie G
21
Years of Service
User Offline
Joined: 23rd Jan 2004
Location: San Jose, CA
Posted: 8th Aug 2004 16:26
Yeah same here, 'cept whenever I want to ask you a question, I dont want to start a new thread . Just tryin to save TGC forum space
Catalyst
21
Years of Service
User Offline
Joined: 6th Sep 2003
Location:
Posted: 8th Aug 2004 16:28
No problem, whatever works

Login to post a reply

Server time is: 2025-06-06 17:13:57
Your offset time is: 2025-06-06 17:13:57