FPS Game Shooting Weapon Interface

Definitely before Valve! :rofl:

2 Likes

Test level: https://playground.babylonjs.com/#4U5T2X#29
Minimap precision is, well, not good…

3 Likes

looks good to me.

btw this collection has 10+ weapon type animations

1 Like

you may find GitHub - squeek502/bunnyhop-webgl: Quake/Half-Life style bunnyhopping in WebGL/BabylonJS useful. It also has state for falling as boolean and velocity. For ex to play the JUMP_FALL animation of the tomahawk. Except, i really dont like the tweening of the player movement in this setup, maybe its just there to show how.

@PirateJC
What is best practice for applying these first person art assets to a full character rig?
For example the tomahawk falling animation. If viewing the player falling from a 3rd person perspective or through the view of another player in the game, would the animations in the tomahawk glb typically be used, or would it require another asset made for the 3rd person perspective? Kind of hard to articulate , but I could see how this could get very nuanced for complex animations like reloading.

I also was hoping to use your NME video example on procedural meshes to show an area of effect indicator on the ground for melee attacks and shotgun spread. The purpose being like a range indicator kind of, as feedback to the human player for exactly what to expect, not necessarily for a skill animation. Is the youtube video’s playground a good place to start there? Or , do you suggest somewhere else to start

2 Likes

Interesting question!

I’ll give the cop out answer and say that there’s probably multiple different ways to tackle the 3rd person view.

From my experience though, I think for first person, you usually end up with some pretty high quality assets for hands and weapons and things.

Then when going to 3rd person there’s probably an LOD swap to something that’s a little lower res as the camera pulls back from the rig.

I don’t know if that answers your question at all?

As for applying NME to multiple meshes. That’s a really fun problem to think through.

Definitely check out some of our youtube videos on the node material editor.

One idea you can keep in the back of your head is piping original asset textures through a node material. So the Node material is basically just a passthrough, until an affect happens. When a shotgun blasts, that updates a variable in the Node Material that triggers a shader effect on the original textures.

Might be complicated, but that’s where I’d explore.

Hope that helps!

3 Likes

When making multiplayer games, I always use the same models for first person and third person. It simplifies things quite a lot, and has the added bonus of allowing you to see your own feet, ragdoll etc.
Sometimes you’ll want a higher LOD for your own character, but as this is based on the very same mesh, you’ll still have the same skeleton, bone hierarchy and animations

It may not be way it’s usually done, but it does wonders for me

2 Likes

Would the 3rd person view’s animations be in the same glb typically? I know there’s many ways to do it, but, what is the best way in your opinion? You dont have to answer now :slight_smile: . I watched a GDC talk that said they used two cameras for FPS games, one for the first person player animations, and another for the world view. I cant remember what they were talking about, but it was like they offset something by 80% to make something look better (i realize that is lacking basically any information, lol)

your crowbar animations <3

1 Like

That’s kind what I was hoping to hear. I actually am inclined to prioritize the third person first and polish any first person stuff later. I am relatively new to cg, been studying for a few months, and its still really mentally hard to know how to structure an app.

Yeah I agree with the above, I would put your FPS camera in the appropriate spot of the players avatar mesh, then set the near field to a small value that keeps the camera unobstructed but still renders the arm(s) and (if looking down) legs

1 Like

The way I’d go about it is to have one single .glb file that contains the same animations for the rig. But then I’d have 2 sets of geometry in that file. One hi-res set for first person and one lower-res set for third person.

Both sets of geometry can be skinned using the same rig, so any animations done to the rig would apply to both sets of geometry.

Then when you switch from first person camera view to third person, you simply handle changing the camera you look from AND the visibility of which LoD set you’re using…lo-res or hi-res.

Hope that makes some sense. :slight_smile:

3 Likes

perfect, thank you. <3 concise and straight forward

1 Like

#DetailsVerySoon

Golden Paths for Babylon.js! - Announcements - Babylon.js (babylonjs.com)

1 Like

I found very interesting library - Yuka.
https://mugen87.github.io/yuka/
Examples are in three.js but there are no problems to use it with Babylon.js.
FPS Shooter - Yuka | First-Person Shooter
AI bots shooting themselves - DIVE

3 Likes

Yea i tried that out a while ago, he has a soccer game too that is very similar to the one mentioned in this stadia talk on autoscaling ai around 23 mins. Stadia seems really cool, too bad the managers are scumlords. Hosting an extravagant promotion event lying and falsely promoting the future of your business to your own employees…Unforgivable imo.

Anyway, this is a cool and well done tech presentation on stadia

There is also this , youve maybe seen.
https://kripken.github.io/misc-js-benchmarks/banana/index.html

GitHub - LorenzoCorbella74/babylon-steering: Steering behaviors library for Babylon.js Is similar to yuka

Also related.

1 Like

check this out

type this into powershell to install the scoop cli (if you don’t have it installed already)
.https://scoop.sh/

Invoke-Expression (New-Object System.Net.WebClient).DownloadString('https://get.scoop.sh')

then in powershell run
scoop bucket add extras
scoop bucket add games

then
scoop install trenchbroom

trenchbroom will now be in your start menu

levels for days

https://lvlworld.com/mostdownloads/1

(default ide)

Did you try already (as written in the manual) “Worst case scenario – export to .OBJ” ?

I havnt, but the editor’s .map format creates brush entities / bsp files . I downloaded a bunch of different maps from different sources , some work, some dont . I think the workflow is to usually compile the .map files into game specific files, and reversing that process seems to be of varying difficulty. Its nice though that the map files are designed to be compiled into an engine, so there is support for triggers and interactions.

These worked well

.GitHub - fzwoch/quake_map_source: Quake map source with free texture replacements

Here we are: - THE FIRST YUKA GAME AI EXAMPLE WITH BABYLON.JS :slight_smile:
https://mugen87.github.io/yuka/examples/steering/seek/
(Big thanks to Michael Herzog, YUKA’s author).
More examples will follow.

4 Likes

I love that Yuka is usable in both three and babylonjs without a dependency on either as opposed to
.GitHub - LorenzoCorbella74/babylon-steering: Steering behaviors library for Babylon.js
and
.GitHub - erosmarcon/three-steer: Basic steering behaviors library based on THREE.js

@labris just got back from travel btw. time to ship our fps?