Problems about some mechanisms in a shooter game

Im thinking about making a shooter game with Urho3D (as a hobbyist), by so far I have encountered several problems, like:

  1. how to do scopes zooming effect
  2. how to do voice chat with this engine (i want voice to be played as 3D sounds)
  3. how to simulate the bullets, including the dropping and piercing stuffs

weeks gone by and i still have no idea about them, help me!
thanks in advanced.

how to do scopes zooming effect

  • what do you mean?

how to do voice chat with this engine (i want voice to be played as 3D sounds)

  • I don’t know

how to simulate the bullets, including the dropping and piercing stuffs

  • using this:

https://discourse.urho3d.io/t/spark-particle-engine-renderer/3670

by 1. i meant the display of scaled scene, dont know how to call it, so, “zooming” <3

and 3. hows a particle engine gonna do with bullet simulation…

Just camera zoom. If you want part-screen scopes like Escape from Tarkov, it’d requre more complicated solutions.

Custom bullet tracing isn’t so hard.

IDK. I’m not an expert in sound networking. Urho support custom network messages.

okay, im so stupid and careless, didnt even find the zooming attribute in Camera class.
im checking out your bullet system later, thx <3

  1. You can manipulate Field of View (FOV) to achieve zooming effect.
    EDIT: camera zoom is should be better.

  2. You’ll need to capture and stream the player’s mic input to others, and play it as a 3D sound source.
    AFAIK Opus is the highest quality codec available and it’s FOSS:
    http://opus-codec.org/
    I know Discord uses it.

Maybe you can find open source library for voice chat. RakNet lists voice communication in its features, tho it uses an outdated codec.

  1. You’ll need implement it yourself.
    Using the physics engine would probably be expensive and won’t solve penetration.
    You can come up with penetration calculations using raycasts, so you might as well implement the bullets as raycast steps, which it quite simple (just velocity, gravity, and maybe air resistance).

okay, seems i got tons of stuffs to study here
i wonder if there is any example of recording with opus from mic input, i cant find one

If you’ve never created a shooter game before, this might be a good reference - Codename: Outbreak remake (+sources)
I learned a lot from that resource.

Why would you want to reinvent VOIP when you have open-source and battle-tested like https://github.com/mumble-voip/mumble ?

I want to play them as 3d sounds :slight_smile:

You mean positional audio? You can do that with Mumble: https://wiki.mumble.info/wiki/Link

1 Like

okay okay, honestly i just dont want mumble, as i remember, mumble runs as a background program, this sucks.

Triangle mesh colliders are hollow, so for those you can just advance the origin of the ray to the backside of the hit point and repeat the trace (+epsilon). The 2nd hit will be a backface where you can check if you want to continue through (ie. surface too deep) or not - a 3rd ray cast is the exiting ray.

Other rigid bodies lack that (unless an AABB is good enough) and bullet doesn’t expose the underlying shapes well enough - though you could use MathGeoLib to mirror the shape and use its’ ExtremePoint functions to find the opposite side of an object (or just port them over), doing the same thing in 2 ray casts instead of 3.

There’s the GNU Ballistics library … which is probably far beyond what you’re after.

okay, checked out the example, but just cant understand :frowning: too much math, i cant do that

3D game development is pure math. I know, it’s hard, but you definitely want to read something like this:

If you want to achieve something. Otherwise you’ll just be banging rocks together.

You may be better suited with something like this:

15

this has the logic in pseudo code form and the base math without getting too much complicated. Relevant to your question:

00

The everything-base math:

39

that’s for, you know, jumping, so it’s really the base…

Thank you guys, i think i got the ideas (except the VoIP one though), gotta go study the basics.