Help Needed For WW2 Fps Game (UPBGE)

Hello all,

I recently got a new computer and I got UPBGE on it, and I wanted to see if I can make a WW2 First Person shooter game.

I already have some of it done…I got a rifle with some animations a toggle-able ragdoll(buggy) and that’s about it.

Controls:

W+s move
Mouse = look
Right click = fire
Scroll wheel = aim
R = reload gun and toggle ragdoll
G = Reset ragdoll
Any suggestions, tips, and .blends will be greatly appreciated.

You may want to change the timescale in the game (i have it set at 0.75)

Sorry I don’t have any screenshots or videos (my computer does not have the codecs as of right now)

1 Like

Okay, new update:

Additions:
Sniper Scope (toggle-able)
Sniper Scope Refraction (very little) *like this:


*note: ^ this is not an in game pic just an example
Ability To:
Disable ragdoll (fps booster)
Disable shell casings (fps booster)(buggy)

download link:

controls:
W+s move
Mouse = look
left click = fire
right click = toggle aim
R = reload gun
G = Reset ragdoll(if allowed)
Shift = toggle scope and iron sight

Hey, the forum tends to be a bit silent nowadays, but its cool you are getting into making games, its fun and a lot, a lot of work. We all love fps games, and there are some really cool ones in up/bge, but if I were to start with something, ww2 games are not really an easy option, mostly because of the features we associate with them, lots of architecture work, recreating real world scenarios and clothes and anatomy and weapons, complex ai and navigation systems, a lot of scripted scenes, etc. Maybe you already watched this, but its a pretty good introduction to the theme using the engine: https://www.youtube.com/playlist?list=PLUtzB6QMUvpH4yw8uo7qVFigQQTQWtUFZ

1 Like

There are also a few fps templates around, although when I was starting, they all seemed pretty complex and I had to start from scratch to get my bearings. I would suggest first making your own ‘fps template’, which is what Im working on right now. Just as a way to understand all the mechanics involved, really get to know your way around the engine and blender.

1 Like

Ah yes the project fps…I have already checked that out and I think I forgot to mention that I am trying to make this game completely from scratch with some assets that I already have. The project as of now is my template so I can get the mechanics right and the overall game play correct. I am also already familiar with the game engine and blender. This is like the third major game I’ve worked on in the game engine. My first was my BattleShip3d game, it was pretty fun learning how to use BGE and UPBGE with that one, my second…I actually collaborated with @ahmad_hassan with the Tiger 1 Ausf game, which now that I think about it, might be discontinued :cry:

And I do agree, the forums are getting quiet :thinking: I wonder why

Ah thats great, Im kinda new around here so I didnt know you already had some good experience with the engine. Will be nice to see what you come up with.

Theres a discord channel for upbge, in case youre interested.

1 Like

Yup I am very aware of the HUUGE UPBGE community. But it’s hard for me to find stuff for the O.G Bge because google apparently thinks that I am searching for tuts about a Big Green Egg(Barbecue)

Update:

Remove Iron_Sights (buggy and very annoying)
Changed Scope
Changed Scope Shader

To Fix:

Ragdoll activation
Scope Camera Rendering terrain errors

The Scope Cam rendering Error



Bullet Collision Detection

To add:

Ai
Better Terrain & maps
HUD
Tracer Rounds
*Volumetrics

*

May Not Come until later release (possibly UPBGE EEVEE)

Link:

Video:
https://streamable.com/j8pbhu
*https://streamable.com/j8pbhu

So, now that I added some stuff, I want to make an option for physical bullets(slower) and ray cast bullets(faster) for different computers i.e older computers. And I want to have the ray-casted bullet have the same drop effect as the physical bullet.

Also, I want to see if it is possible to make tracer rounds such as this:


*credit Fury Movie

…with the ray-cast bullet and also the physical bullet.

Anybody know how to do this?

yup stay with raycast bullet, even on older systems. Physical bullets will miss, it will be even worse on older computers. And slower and faster? just add bullet speed.

#######################################
#       Bullet script by Cotaks       #
# bullet drop, speed, damage and hole #
#######################################

# put this on the bullet, always(true) -> python-module -> scriptname.bullet_action
# put a property health on any object.
# Done!

from bge import logic

def bullet_action(cont):

    own = cont.owner

    speed = 340
    damage = 2
    bullet_drop = 0.0015 # higher means faster drop
    hole = 'plasma_hole' #name of the bullethole plane

    distance = speed/logic.getLogicTicRate()

    own.applyMovement([0,distance,-bullet_drop], 1)

    y_vec = own.worldOrientation.copy().col[1] 
    y_vec.magnitude = distance

    end_vec = own.worldPosition.copy() + y_vec
    ray = own.rayCast(end_vec, own.worldPosition.copy(), 0)

    if ray[0]:
        
        if 'health' in ray[0]:
            ray[0]['health'] -= damage
            
            if ray[0]['health'] <= 0:
                ray[0].endObject()
            
        bullet_hole(cont,ray,hole)
        
        
def bullet_hole(cont,ray,bullet_hole):
    
    own = cont.owner
    own.endObject()
    
    #300 is the duration timer (second * 60 so 5 seconds) 
    bullet_hole = own.scene.addObject(bullet_hole, ray[0], 300)
    
    offset = ray[2]
    offset.magnitude = 0.001
    
    bullet_hole.alignAxisToVect(ray[2], 2, 1)
    bullet_hole.worldPosition = ray[1] + offset
    bullet_hole.setParent(ray[0])
1 Like

So by putting the script on the bullet, do you mean the physical bullet or the emitter?

the bullet itself, this script will control the bullet. you can add properties and use that to read the damage, speed, etc, so you can adjust it to your needs.

1 Like

Okay, so I applied the script. Do I have to change the physics settings in the bullet?

Actually forget about that…how can I get the script to activate the ragdoll instead of ending it.

change it to activate or add the ragdol

1 Like

I’m stumped, the ragdoll activation is in a separate script.

And is there also a way you can make it when the bullet hits a loose object it pushes it or something like that?

I figured out the ragdoll activation. So, is there anyway I can make a tracer bullet?

use ApplyForce() or impulse to the ray[0] when the bullet hits

use a random or set function to change the mesh of the bullet to a ligher one/one with bloom active, you can also spawn a plane to the bullet making a smal trail effect. Lots of ways to do it.

1 Like

So which bloom filter should I use? I am using 0.2.5 and the Thatimster post-processing addon’s bloom makes everything glowing. Is there a way to add bloom to a specific object/material?

use the search function

for example: UPBGE Bloom Shader - #66 by BluePrintRandom

1 Like