#Open source First Person Controller in Godot 4

306 messages · Page 1 of 1 (latest)

karmic widget
#

I'm also working towards making this controller along with the graphics and some of the assets that come with it for FREE for the public to use in Godot

gaunt harness
#

oooooo

karmic widget
willow sinew
#

Looks good!!

whole solstice
karmic widget
trim yoke
#

This is looking really crispy

celest quiver
#

The movement is so smooth!

karmic widget
#

Thanks!

feral tangle
#

Oh damn this is looking great!!

#

I remember seeing you on the fishnet discord wondering if you could replicate the cool looks of your unity ball game on Godot, I guess you found out the answer is yes? XD

brave tangle
karmic widget
feral tangle
#

Looking forward to seeing more from you \o

whole solstice
#

Are the models final or placeholder? The textures and the movement look so good, really incredible stuff

#

How do you do all the running and jumping camera movement? Do you happen to have any links to get started?

karmic widget
karmic widget
#

You can take a look at this video as this is what I followed and extended, I wrote in C# however.

https://www.youtube.com/watch?v=xIKErMgJ1Yk&pp=ygUSZ29kb3QgZnBzIG1vdmVtZW50

There's a few bad design patterns he used here, so I recommend you clean up your code while following his steps.

whole solstice
#

Thank you very much for the detailed input, appreciate it!

karmic widget
#

Was working on some custom stair implementation throughout the past couple of days. It still isn't perfect. But it works great for most situations. Will come back on it to make it more fully functional.

#

^ Will have to adjust the sounds on the steps for it to work nicely along with adjusting speeds on steps.

#

^ For situations where there are curved steps, this is very useful as it will save the level designer a lot of time instead of making a custom ramp collider for the steps.
And there will be other edge cases where this comes useful. Currently it's very modular as you can just add it as a node and reference your character body.

stoic mango
#

I am really interested in this project especially seeing you haven't uploaded a while on this

(PS Is their going to be another devlog?)

karmic widget
south inlet
karmic widget
south inlet
#

It's not built in afaik

south inlet
#

I followed this tutorial but used a raycast's hit distance as delta x

#

I think a damping of .7 was pretty good overall iirc

karmic widget
#

I'll stick with what I have for now as that definitely would look like something I'd have to commit to if I need to perfect the implementation 🤣

#

Thanks for the suggestions either way

timid jewel
#

this game feels like this video challenge but on buildings
waiting for the game graphics are awesome atm

karmic widget
#

Made all the post processing work all together along with the movement for some of that extra game juice.
It's in a neat post processing manager similar to how you work with Unity's post processing stack.

The gif showcases lens flares, motion blur, radial blur, vignette, lens distortion and chromattic abberation.

whole solstice
#

The roll feels a little abrupt, im not sure if this would work but just throwing out a suggestion: maybe start the roll before the player hits the ground?

karmic widget
#

The plan is to put an actual model in there similar to how you'd see in mirror's edge

karmic widget
#

Showcasing the current state of the controller in action.
https://fxtwitter.com/unde3dog/status/1712954058804183479

Thanks to everyone for the recent support! Been hard at work to make this first person project and I've forgotten to mention that I'm giving the project away for free soon just to contribute to the Godot Community.

#GodotEngine #Godot4

▶ Play video
karmic widget
manic ermine
#

this is coming along great, really looking forward to seeing where this goes

#

you're super cool for releasing your controller too, thanks!

cunning agate
#

I took a look at the code but I haven't really had a chance to digest it and I'd Love to see more about how you're handling stair stepping with those raycasts.

beyond that graphically this looks amazing,

#

awesome work keep it up

karmic widget
karmic widget
vestal thunder
#

Oh, I've been following this on twitter

#

This looks sick as fuck honestly

#

Cool action movie player controllers are a guilty pleasure of mine, I think

#

both on the making side of things, and playing side

#

I blame growing up as a Source engine nerd and playing stuff like surf

karmic widget
#

Thanks Dogman, will work on it more to make it better 🫡

karmic widget
#

Been a while since I've posted, but I've been revamping the code for this controller to further make it even more cleaner.

I'm now using a finite state machine to handle all the states. And one central script that acts as an any state.

Going forward I can add a lot more features that will have less dependencies as they are handled in the form of states.

#

You move through other states in the form of signals.

#

https://github.com/theRealUnd3rdog/GODOT-Underdog-First-Person-Controller

You can grab it here, the first release is the one before the FSM implementation since I think some people might not prefer that.

But going forward I'll be adding things like vaulting, wallrunning, ledge grabbing and all that good stuff with the FSM.

GitHub

NOSHOT First Person Controller. Contribute to theRealUnd3rdog/GODOT-Underdog-First-Person-Controller development by creating an account on GitHub.

karmic widget
karmic widget
#

Open source First Person Controller in Godot 4

nocturne abyss
karmic widget
cunning agate
#

looks really great

karmic widget
#

If you're near any object while you're sprinting, just press jump and you vault over it. If you're near a ledge while in the air, you automatically vault over.

cunning agate
#

out of curiousity, how's your stair stepping on slopes

#

it's the last problem i have to deal with for a true cast up forward down based approach

#

i know you wre using rays, but i'm a bit curious if it was something you ahd to think about

karmic widget
#

Could you clarify what you mean by stair stepping on slopes?

cunning agate
#

easiest way to describe it would be by saying what it isn't

for example a 'regular' stair case that isn't too deformed, the angles arne't too insane, etc, vs two differently sloped surfaces touching eachother

visually, here are some examples

#

the former being a sloped stair, technically

#

ah, i think it might be because you're just using ray checks vs a true shapecast

karmic widget
#

Which reminds me, I should do so and test it out, although I'm unsure if it would work the same.

cunning agate
#

yeah, i was considering just flaggiing this as an invalid step condition and not worrying too much about it - but i'm positive this is something that should reasonably work out fine and i just must be missing a small thing in the check, or maybe i should just add a fixed step forward offset

#

thanks anyway - good luck :)

karmic widget
karmic widget
cunning agate
#

yeah i'm gonna force jumps or if the slope is steep enough just slide against the wall

cunning agate
#

~~small update: i toyed around with the Jolt solver, ccd and penetration settings. i think a balance is needed there too, if you go with this approach

my next idea is adding some jitter to the down check left and right to adjust~~

i just re-wrote a different move_and_slide for air movement as i noticed it would go between states. the air move didn't do a stair check. this seemed to resolve a dramatic amount of issues:

feral tangle
#

@karmic widget are you running into any lag spike issues? I'm trying to do a 3d third person game and I'm getting a weird recurring lag spike even on a pretty empty project with barely anything. Been trying to turn things off and simplify things but I keep seeing this lag spike ><;

karmic widget
feral tangle
#

but right now on your project there is no spike?

karmic widget
karmic widget
#

I haven't enabled V-sync by the way.

feral tangle
feral tangle
#

I think my laptop was just running too hot. I shut it down, left it in the freezer for a bit, rebooted and the lag spikes were gone ._.

manic ermine
inland jasper
#

unironically projects like this will help esports. the problem with esports is "every game" has different rulesets

standardized movement code is a step towards standardizing esports rules

cloud oasis
#

an interesting thought

karmic widget
inland jasper
#

imagine if there's a huge FPS tournament and the announcer says "AND THE GAME TODAY IS USING UNDERDOG'S PATENTED MOVEMENT RULES SET FOR STANDARDIZED PLAY"

manic ermine
karmic widget
karmic widget
cunning agate
inland jasper
#

ideally, for FPS esports to work, there would be

  1. standardized movement rules set(s)
  2. standardized equipment package(s)
  3. standardized level package(s)
#

and a tournament would pick one package or rules set from each category, have someone "build a game" using these open source assets (just plug-and-play)

#

and then the players would play in that game

#

you would then have debates between professionals that, instead of "I prefer Halo to CoD" would sound more like

"I prefer the way Underdog handles slides and scaling, but I can understand why someone would prefer sinewave's crouch standards"

#

or "I prefer the VALVE weapons package because I dislike the way recoil is handled in the QUAKE package"

#

which is a much more translatable conversation from physical sports to esports

#

because it would be akin to talking about college rules vs professional rules

#

sorry i went on a mild rant here lol

karmic widget
#

Interesting..I never thought about it that way.

karmic widget
inland jasper
#

LoL has succeeded as an esport because it has a standardized rules set, and the game is free

#

the only barrier to entry to play basketball, for example, is that "someone owns a ball"

#

otherwise it's free to play basketball.

same with LoL.

#

it also entirely boils down to personal skill within your role.

top laner, jungler, mid

quarterback, receiver, offensive guard

karmic widget
#

Doesn't that go for any f2p game though?
Dota, Fortnite, Overwatch, Apex, etc?

inland jasper
#

it's why overwatch eventually died - too many variables outside of the players' control

#

a sport requires consistent rules, which is why standardized systems like yours would be good for esports

#

anyway im done ranting lol

trim yoke
#

Haven't checked in on this project in a while, looks really cool!

#

That vaulting looks smooth

vital ibex
#

i love looking at the beginning of showcase threads and then skipping to the end

#

:o

karmic widget
#

Happy new year guys, I'm still developing the controller to make it even more solid and better than before.

I've decoupled the scenes for it to work a bit better and to make it a bit more modular. I've upgraded the whole project to 4.2

Added a couple of new sounds, slightly played around with the settings to increase FPS. There's only a few bugs.

I'm going to be working on wallrunning, climbing (ladders, poles) next, that'll be the fun stuff.

shy stratus
#

bro just change your name to Upperdog already, i've been trying to make a movement system like this for ages, if i can use it would help a lot

karmic widget
karmic widget
shy stratus
#

i thought it was gscript, but i can try c#

#

thx

shy stratus
#

hey uh...
how can i disable the post processing? my pc kinda can't handle it

copper skiff
#

Oh, I saw your video! Good job

karmic widget
#

Additionally try disabling anti-aliasing in the settings.

karmic widget
inland jasper
#

so you know I've been shilling your controller every time someone hops into #godot-4-chat and asks "is godot good for 3D?"

#

i honestly think you have something amazing here

#

I would even say push your physics handling to try for an official inclusion

grizzled sierra
#

I like the motion blur how do you make it?

karmic widget
karmic widget
grizzled sierra
#

wait

#

I'm using the same technique I used the radial blur too I calculated the camera velocity and then crank it up too! but wy does your looks so good

karmic widget
# grizzled sierra I'm using the same technique I used the radial blur too I calculated the camera ...

Thanks yo, well you can take a look at it, nothing really special except it's controlled by my velocity and a few artificial values.

I use this function for most of my post processing.

public float GetVelocityBasedEffect(float maxVelocityMag, float velocityExponent, float minEffect, float maxEffect)
    {
        Vector3 playerVelocity = _playerVelocity;
        float velocityMag = playerVelocity.Length() / maxVelocityMag;
        float velocityScale = Mathf.Pow(velocityMag, velocityExponent);

        float desiredEffect = Mathf.Lerp(minEffect, maxEffect, velocityScale);
        desiredEffect = Mathf.Clamp(desiredEffect, minEffect, maxEffect);

        return desiredEffect;
    }
#

Got the wall detection up and running using a no raycast approach.
Thought I could make it as robust as possible by using the CharacterBody's kinematic collision.

cunning agate
#

move_and_collide(motion, false) is a powerful one

#

i'd recommend looking into a combo of PhysicsServer3D.cast_motion combined with get_rest_info() if you need anything spicier. it's how my stair stepping works

#

looks good though :D

karmic widget
cunning agate
#

it is some goooood st uff

karmic widget
#

I'll take a good look at this, will definitely prove useful

#

Thanks 🫶

karmic widget
#

Just finished up the wallrunning, this one was pretty tough to do.
I still have more polishing to do for it, but I'm feeling pretty good about this one.

inland jasper
#

slick as all hell

whole solstice
#

Looks awesome!
I think the landing would benefit a lot from some more impact or punch, maybe some downwards camera movement when landing

pliant portal
karmic widget
viscid birch
#

damn this looks incredible, i took an attempt to do this a while back but the lack of skill held me back

karmic widget
#

For people curious, I haven't quit the project or anything, just college exams and I've been working on a personal game that'll be using this controller.

There's a lot more to do for this project, after a little more features, I'll begin polishing up the code to make it as modular as possible and hopefully increasing the performance of the entire project.

It should run at a solid 60 on 1080TI's atleast, but some world features would obviously have to be turned off.
I'm not doing anything graphically expensive here as well, it's just the post processing which takes up only a few frames.

The rest of it is just vanilla Godot stuff.

At the end, most of the content will be free to use (Need to double check). The assets here all CC0.

Thanks for the support everyone gdsalute

neat valley
#

My guy made Mirror's Edge Catalyst in Godot... but cooler! You're a god 🙏

karmic widget
karmic widget
karmic widget
#

Just published a video on how I made the wallrunning and the rest of the movement.
https://youtu.be/cMtEagxz4h0

#

Just grab the latest release. Should be about 300 megabytes

karmic widget
vale owl
#

Do you have clambering/mantling? I notice it's a CharacterBody not RigidBody? Do you have/allow clambering of RigidBodies? If so, how do you deal with the glitchiness that can happen with that? Kinematics can send RigidBodies flying if you're not really careful. There's workarounds, just wondering how you did it, if you did.

karmic widget
# vale owl Do you have clambering/mantling? I notice it's a CharacterBody not RigidBody? Do...

If you consider clambering vaulting over objects then yes.
Yeah it's a CharacterBody, I felt there was of no necessity of a RigidBody controller when the CharacterBody was already miles better than whatever Unity had.

I'm using a coroutine to basically lerp the position of the CharacterBody from 1 point to another when it enters into a "clamber" state. When that happens all of the movement logic is stopped and it waits till it clambers.

The reason it doesn't glitch is because I'm using a curve so that the body doesn't intersect and get stuck with the collider beneath it. Ofcourse this may still happen in extreme edge cases, I have yet to test it more.

#

When I add in character animations, I'll only handle the lerps from the animation side and just basically snap the position to avoid this problem. For now however it works quite well.

vale owl
karmic widget
whole solstice
#

@karmic widget A few days ago I was talking to a friend on call and he randomly sent me your yt channel and said he really LOVED your videos :D

karmic widget
whole solstice
#

Keep up the good work 👍

limpid marten
#

ur cool underdog

vale owl
heavy bough
#

Bro who needs unreal engine when you’ve got Godot

karmic widget
#

Faxx gdsalute

karmic widget
#

Started roughing out an indoor map in Blender blendot

cunning agate
#

you poor soul, it looks great, but blender as a map editor - I could never

#

ok but seriously that is so pretty LOL

#

i am a sucker for the big open rooms with the spiral staircases up and down, it's such a classic encounter type

karmic widget
cunning agate
#

if it works for you, that is the important part

#

it's good with complex geometry in a familiar workspace; not every project needs the classic level editor(tm)!

karmic widget
#

Yeah, I don't think I can work without curve tools and arrays xd

cunning agate
#

yeah, that is one thing I am ab it limited on - if I want really smooth 3D geometry, it's gotta be a prop on the level, because there's only so many divisions the csg tools can really do with planes in radiant, etc

#

how is it creating the actual world environment? do you do any of that in blender or all in godot?

karmic widget
cunning agate
#

that or anything else

#

I'm just curious to learn about someone's process

#

It's always interesting and gives new insight

karmic widget
#

Well I kinda just make build out the base map in Blender first.
I then import the blend file into Godot to see if the scaling is fine and the collisions are good.

Then I start adding props and just make some rough lighting in Blender to see if it looks good.
Then optimization and texturing.

I then import all of that into Godot and then just dress it up.
I'd probably add a few more props, probably a few decals and then do all of the lighting necessary.

inland jasper
#

didn't Bungie model their entire level then import them for the Halo series?

karmic widget
#

Not too sure.
I'd assume they have inhouse tools to build base maps in the engine itself.

inland jasper
#

or am i misremembering their pipeline

karmic widget
#

But I honestly prefer building in Blender cause of the control.

#

People recommend Trenchbroom and Qodot, which I think is a real good alternative, but then you're still using a different program to do all of the levels.

There's a tool called Probuilder in Unity which I used to use a lot.
It's a pretty decent tool and you could pretty much do basic modelling with it.

If there was a similar probuilder like tool for Godot that I can use real-time I'd probably use it.

inland jasper
#

idk i learned how to build levels in unreal

#

which is basically: whitebox it out and submit an art request to 3D

then 3D fulfills it and ships it

and you replace all instances of "box named shrub" with the shrub

cunning agate
#

Regardless, thanks for the info, I need to figure out texturing in blender one of these days

#

Looking forward to whatever this cool map becomes

karmic widget
#

This is fair, for your project that is actually quite necessary.
The map I'm building right now is more of a test map though.

I haven't really settled on a particular "level set" that I'd use throughout all my maps yet.

narrow bone
#

Having just seen everything since then, I'm impressed with the work put in!

karmic widget
#

Thanks fam 🙏

analog shuttle
#

Love your videos man , looking forward to how you develop this project further

brave tangle
#

I tried it out prior to the most recent update. It worked alright, but kept crashing after the level became more complex. Maybe that's been fixed since, but I don't know

karmic widget
gentle fjord
#

This is cool more people need to see this project to see what can be done 3d wise with godot

mystic sand
#

this thread is back!

#

oh wait this thread has been alive for quite some time now that im reading it through

#

i wonder why it didnt show up for me again

mystic sand
karmic widget
karmic widget
mystic sand
#

Im 99% sure that the vignette and lensflare shaders are the same ones used in PS o-o

analog ember
#

Great work on this!

#

Looking forward to seeing what you do next 🙂

karmic widget
#

Appreciate it fam

subtle sundial
karmic widget
#

Which is fine for a tutorial, he did a good job.
But you'd probably need to clean all that up and make sure it's scalable for later if you're building a bigger game.

past hearth
#

That sounds very relatable to how I used to code when I started XD

#

Project looks cool btw! Been lurking ever since you popped up here

karmic widget
#

Thanks yo, I haven't been active lately cause of college deadlines, but after that's done I should be able to finish whatever I didn't finish gdsalute

past hearth
#

||Sorry for the ping :[||

karmic widget
mystic sand
#

bump

celest quiver
#

This is one of my favourite fps controllers that I’ve ever seen

karmic widget
#

Ahaha thanks yo gdsalute

karmic widget
#

Sorry for the lack of updates, I just started working on the controller again but more focus towards level design to facilitate the parkour mechanics of the controller.

I built a custom csg node that allows you to see the measurements of the CSG blocks along with a nice little reference text.

karmic widget
ripe grail
#

Nice, looks good

gentle fjord
#

good work

gentle fjord
#

I'm really looking forward to this even if just a tech demo that gets released

#

It might be a good showcase for what u can do 3d wise in engine

karmic widget
gentle fjord
#

Sound good

karmic widget
#

I previously have used Unity, and the game that I'm making right now is actually feasible in Godot (graphics wise). Hence why I chose to lock in with Godot.

gentle fjord
#

Plus godot is open source and progressing fast as a engine

#

Unity is not and lots of plug in arnt free for unity

river niche
karmic widget
#

Sorry for not being active on this.
Had a lot of college work. (I am on break so I'll be posting more often)

Been working on a dynamic spatial audio system for the controller gdsalute

vapid thunder
karmic widget
vapid thunder
karmic widget
#

Still have to do more polishing to make it feel better.

#

I have also fixed up some of the previous underlying bugs with vaulting and wallrunning, however some of the movement needs to undergo through proper measurement changes.

They do not respect real measurements which kinda bugs me.

#

The vertical wallrun however, respects a given height. Currently you can only wallrun vertically by 3m.

analog shuttle
#

🔥 keep cooking dawg

karmic widget
#

Unintentional feature but you can perform a vertical wallrun on a platform that's low in height and get a huge boost compared to just regular vaulting.
Seems kinda fun to leave in, maybe I'd do some balancing to it.

It's an advanced movement though cause you do need pick up some speed before performing it.

ripe grail
#

It definitely looks intentional :D

#

The vertical wallrunning looks good. Really nice btw with the sound of the player coming to a halt at the end of the previous vertical speedrun video

subtle sundial
#

Add a gun..

past hearth
#

Looks super good! Looks like it would play super smooth

elfin nexus
#

This is awesome. I'm working on a parkour project right now. This will help so much. Thank you, captain.

grand cairn
#

can't wait for this to release ! (one day i wanna make a surf movement game like cs source and your project would be a great base)

analog ember
#

The subtle camera transitions between movement states are really juicy

karmic widget
#

Thanks guys gdsalute

karmic widget
#

Sorry for the inactivity guys.
I was working on a graphics video (It's in Godot gdsalute )
https://youtu.be/0qNVfTFqUJs

grizzled sierra
#

noice.

granite mason
#

very neat

karmic widget
#

Appreciate the support guys. gdsalute
The next video might be a new devlog on the controller.

It'll also conclude the end of the entire thing with it being as polished as possible.

mystic sand
#

look who showed up on my recommended :O

karmic widget
grizzled sierra
#

how do you do the camera feedback when you land

#

i am making a bodycam parkour

#

also what are the gravity and jump height settings

normal elk
#

\

grizzled sierra
#

?

cloud oasis
#

=

normal elk
#

( (k+2) (1 - [wz + h + j - q]^2 - [(gk + 2g + k + 1)(h + j) + h - z]^2 - [16(k + 1)^3(k + 2)(n + 1)^2 + 1 - f^2]^2 -[2n + p + q + z - e]^2 -[e^3(e + 2)(a + 1)^2 + 1 - o^2]^2 -[(a^2 - 1)y^2 + 1 - x^2]^2 -[16r^2y^4(a^2 - 1) + 1 - u^2]^2 -[n + l + v - y]^2 -[(a^2 - 1)l^2 + 1 - m^2]^2 -[ai + k + 1 - l - i]^2 -[((a + u^2(u^2 - a))^2 - 1)(n + 4dy)^2 + 1 - (x + cu)^2]^2 -[p + l(a - n - 1) + b(2an + 2a - n^2 - 2n - 2) - m]^2 -[q + y(a - p - 1) + s(2ap + 2a - p^2 - 2p - 2) - x]^2 -[z + pl(a - p) + t(2ap - p^2 - 1) - pm]^2) - 1) - | (k+2) (1 - [wz + h + j - q]^2 - [(gk + 2g + k + 1)(h + j) + h - z]^2 - [16(k + 1)^3(k + 2)(n + 1)^2 + 1 - f^2]^2 -[2n + p + q + z - e]^2 -[e^3(e + 2)(a + 1)^2 + 1 - o^2]^2 -[(a^2 - 1)y^2 + 1 - x^2]^2 -[16r^2y^4(a^2 - 1) + 1 - u^2]^2 -[n + l + v - y]^2 -[(a^2 - 1)l^2 + 1 - m^2]^2 -[ai + k + 1 - l - i]^2 -[((a + u^2(u^2 - a))^2 - 1)(n + 4dy)^2 + 1 - (x + cu)^2]^2 -[p + l(a - n - 1) + b(2an + 2a - n^2 - 2n - 2) - m]^2 -[q + y(a - p - 1) + s(2ap + 2a - p^2 - 2p - 2) - x]^2 -[z + pl(a - p) + t(2ap - p^2 - 1) - pm]^2) - 1| = 0

#

Real agebra sum btw

karmic widget
# grizzled sierra how do you do the camera feedback when you land

I use my own custom camera shaker and I just offset the the camera on the Y when it lands.
There's also a slight tilt animation on the camera.

Both the shake and the animation play at the same time, the shaker is a parent of the camera animation node, and the camera animation node is a parent of the camera node.

cunning agate
#

camera effects as separate nodes to the input rotation base 🤝

#

found that to be such a great and simple way to make them

grizzled sierra
#

the audio

#

is the audio homemade

#

or

#

you get it from a website

karmic widget
#

Some of them are modified (I use audacity and FL studio for this)
But most of them are from Zapsplat. (Some of them are CC0, some of them are attribution required)

karmic widget
quasi fable
karmic widget
karmic widget
#

Hi, it's been a long time.
This is a complete refactor of the whole controller with full body animations. Full official first release will most likely be before the end of May, I will first have to create spare animations of my own as I'm using Mixamo's animations here (just to show y'all that you can add your own animations if you want to)