Gamestudio Links
Zorro Links
Newest Posts
Help with plotting multiple ZigZag
by degenerate_762. 04/30/24 23:23
M1 Oversampling
by 11honza11. 04/30/24 08:16
Trading Journey
by howardR. 04/28/24 09:55
Zorro Trader GPT
by TipmyPip. 04/27/24 13:50
Data from CSV not parsed correctly
by jcl. 04/26/24 11:18
Why Zorro supports up to 72 cores?
by jcl. 04/26/24 11:09
Eigenwerbung
by jcl. 04/26/24 11:08
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (degenerate_762, AndrewAMD), 846 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
wandaluciaia, Mega_Rod, EternallyCurious, howardR, 11honza11
19049 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Basics for an FPS game #453186
07/10/15 19:25
07/10/15 19:25
Joined: May 2014
Posts: 179
The lit part of the Truth
C
CyberGhost Offline OP
Member
CyberGhost  Offline OP
Member
C

Joined: May 2014
Posts: 179
The lit part of the Truth
Where can I learn the basics for the player behaviour in an FPS game, especially the code for motion, gravity and jumping?

I have been working on that for a few days and I always get weird bugs ,especially when it comes to gravity and collision ....

Last edited by CyberGhost; 07/10/15 19:28.

Nothing to say ....
Re: Basics for an FPS game [Re: CyberGhost] #453188
07/10/15 23:57
07/10/15 23:57
Joined: Apr 2005
Posts: 1,988
Canadian, Eh
DLively Offline
Serious User
DLively  Offline
Serious User

Joined: Apr 2005
Posts: 1,988
Canadian, Eh
Check out my youtube channel laugh


A8 Pro 8.45.4
YouTube: Create Games For Free
Free Resources: www.CGForFree.com
Re: Basics for an FPS game [Re: DLively] #453200
07/11/15 14:04
07/11/15 14:04
Joined: May 2014
Posts: 179
The lit part of the Truth
C
CyberGhost Offline OP
Member
CyberGhost  Offline OP
Member
C

Joined: May 2014
Posts: 179
The lit part of the Truth
The problem is that this distance_to_ground gravity method doesn't work for me. I keep manipulating all the values and tried many stuff, but many times the player keeps flying or ascending upwards. And even the video_screen variable makes some bugs in gravity although it shouldn't be related to all that .....

I think I need another kind of gravity/jumping code frown ....


Nothing to say ....
Re: Basics for an FPS game [Re: CyberGhost] #453201
07/11/15 14:29
07/11/15 14:29
Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
Superku Offline
Senior Expert
Superku  Offline
Senior Expert

Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
Have you seen the following tip yet?
http://opserver.de/swik10/index.php?title=Gravity


"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: Basics for an FPS game [Re: Superku] #453213
07/12/15 10:55
07/12/15 10:55
Joined: May 2014
Posts: 179
The lit part of the Truth
C
CyberGhost Offline OP
Member
CyberGhost  Offline OP
Member
C

Joined: May 2014
Posts: 179
The lit part of the Truth
It worked fine ,but the player gets on some models/blocks so easily. I mean these models have some height and the player should just stop when encountering them because they are high a little bit and I am not jumping. However, the player 'jumps' automatically on them ...

Last edited by CyberGhost; 07/12/15 16:38.

Nothing to say ....
Re: Basics for an FPS game [Re: CyberGhost] #453215
07/12/15 13:07
07/12/15 13:07
Joined: Oct 2011
Posts: 1,082
Germany
C
Ch40zzC0d3r Offline
Serious User
Ch40zzC0d3r  Offline
Serious User
C

Joined: Oct 2011
Posts: 1,082
Germany
Srsly, if you would have read the tutorial instead of just copy and pasting you would know what code you have to change to fit your needs.

Last edited by Ch40zzC0d3r; 07/12/15 13:07.
Re: Basics for an FPS game [Re: Ch40zzC0d3r] #453217
07/12/15 15:59
07/12/15 15:59
Joined: May 2014
Posts: 179
The lit part of the Truth
C
CyberGhost Offline OP
Member
CyberGhost  Offline OP
Member
C

Joined: May 2014
Posts: 179
The lit part of the Truth
Originally Posted By: Ch40zzC0d3r
Srsly, if you would have read the tutorial instead of just copy and pasting you would know what code you have to change to fit your needs.


"Srsly" I already read the tutorial and tried several times but this still happens. And btw., the downloadable code has some stuff that are not mentioned at all in the tutorial.

Please, if you don't want to give a helping reply, don't post in this thread


Nothing to say ....
Re: Basics for an FPS game [Re: CyberGhost] #453229
07/12/15 20:08
07/12/15 20:08
Joined: Jan 2006
Posts: 968
EpsiloN Offline
User
EpsiloN  Offline
User

Joined: Jan 2006
Posts: 968
Try on your own, starting simple. Just applying a z motion !AFTER!(in a separate call) a forward or side motion.
Then, limit the feet height, as your model will probably sink a little...and then build on that base what ever you want.

I'm saying this in general, because there are many ways to limit the feet and to implement jumping. I am limiting the z height of the feet with c_trace calls downward in my game...

Basically, its a struggle to get a bug-free FPS movement with jumping and proper collision. But there are numerous ways you can try and build it.

PS.: Tip - always try to avoid glide as much as you can. Use it only when you really need it. It uses up to 6? c_move calls to make your entity glide, it produces seemingly random results every time and its a nightmare when you come to the MP programming for movement and synchronization grin
For gravity, it'll be too advanced, but you can always try to implement gliding on your own along a surface normal...But thats for when you have the proper gravity method already.


Extensive Multiplayer tutorial:
http://mesetts.com/index.php?page=201

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