Gamestudio Links
Zorro Links
Newest Posts
Executing Trades on Next Bar Open
by vicknick. 06/13/24 08:51
Zorro Beta 2.61: PyTorch
by jcl. 06/10/24 14:42
New FXCM FIX Plugin
by flink. 06/04/24 07:30
AlpacaZorroPlugin v1.3.0 Released
by kzhao. 05/22/24 13:41
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 13:28
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
3 registered members (Joey, flink, AndrewAMD), 1,226 guests, and 4 spiders.
Key: Admin, Global Mod, Mod
Newest Members
AemStones, LucasJoshua, Baklazhan, Hanky27, firatv
19059 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Need help for convincing player walk, camera bob #395081
02/19/12 18:31
02/19/12 18:31
Joined: Mar 2006
Posts: 14
California
R
Rockfleet Offline OP
Newbie
Rockfleet  Offline OP
Newbie
R

Joined: Mar 2006
Posts: 14
California
My game scenarios rely on a convincing player walk, with footsteps sounds for different terrain, realistic walk speed, and realistic camera movement. I want to be this guy (girl) first person! I'm getting closer but have difficulty putting all together, especially camera bob (movement) to match with animation footsteps.
Scripting still difficult, but thanks to AUM, and others! I'm a modeler, not a scripter . . .

Re: Need help for convincing player walk, camera bob [Re: Rockfleet] #395108
02/19/12 21:48
02/19/12 21:48
Joined: Jan 2012
Posts: 55
K
kmega99 Offline
Junior Member
kmega99  Offline
Junior Member
K

Joined: Jan 2012
Posts: 55
Even though I'm still new grin , I can offer advice on how I would do it.

For different terrain detection, I would try creating invisible low polygon entities over different terrain that will control camera shake movement variables, walking speed vars & sound upon collision or detection.

Re: Need help for convincing player walk, camera bob [Re: kmega99] #395130
02/20/12 02:19
02/20/12 02:19
Joined: Mar 2006
Posts: 14
California
R
Rockfleet Offline OP
Newbie
Rockfleet  Offline OP
Newbie
R

Joined: Mar 2006
Posts: 14
California
Thanks kmega99, good idea. I'm hoping I can figure out a consistent method for perpetual walking camera shake, but this would be useful for special conditions or surfaces.

Re: Need help for convincing player walk, camera bob [Re: Rockfleet] #395135
02/20/12 04:07
02/20/12 04:07
Joined: May 2009
Posts: 1,816
at my pc (duh)
darkinferno Offline
Serious User
darkinferno  Offline
Serious User

Joined: May 2009
Posts: 1,816
at my pc (duh)
I dont suggest models, you can use look at pixel_for_bmap, with it, you could use an additional surface texture/mask for your terrains, then with calculations, find the position on that mask that the player would fall, that returns the pixel color, then use that to determine what effects you want, with this you pretty much unlimited control over as many terrain surfaces as you want laugh

I think theres an include file called terrain.c or something similar in which you can find the functions for getting the position the player is in relation to the mask

Re: Need help for convincing player walk, camera bob [Re: darkinferno] #395198
02/20/12 20:56
02/20/12 20:56
Joined: Mar 2006
Posts: 14
California
R
Rockfleet Offline OP
Newbie
Rockfleet  Offline OP
Newbie
R

Joined: Mar 2006
Posts: 14
California
Thanks! This has given me a lot to think about. I'd better do my homework, but before I go, is there a simple way/instruction to get the first person camera to bob up and down in time to a player's walk? I apologize for being stupid, but there's got to be something simple I can't find . An example would really help.

Re: Need help for convincing player walk, camera bob [Re: Rockfleet] #395199
02/20/12 21:40
02/20/12 21:40
Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
Superku Offline
Senior Expert
Superku  Offline
Senior Expert

Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
var camera_bob = 0;
...
in your player action:

camera_bob += 10*(key_w || key_s || key_a || key_d)*time_step; // assuming you have WASD movement
camera_bob %= 360;
vec_set(camera.x,player.x);
camera.z = player.z+player.max_z*0.75+10*sinv(camera_bob); // you can try different values here
...


"Falls das Resultat nicht einfach nur dermassen gut aussieht, sollten Sie nochmal von vorn anfangen..." - Manual

Check out my new game: Pogostuck: Rage With Your Friends
Re: Need help for convincing player walk, camera bob [Re: Superku] #395207
02/20/12 22:43
02/20/12 22:43
Joined: Mar 2006
Posts: 14
California
R
Rockfleet Offline OP
Newbie
Rockfleet  Offline OP
Newbie
R

Joined: Mar 2006
Posts: 14
California
Much obliged, Superku! This is precisely what I was looking for. You're correct, I do need to go back to the beginning for many things, but thanks for your helping hand anyway.


Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1