My 3D adventure fighting game

@blenderaptor

Nice. Are you going to use IK for animation or are you already using that technique (?)

yes ofc, i use bones constraints on a different layer for picking objects and to rig animations when collisions or targeting.

1 Like

@blenderaptor

Was just wonder :slight_smile:

Anyway.
What confuses me is why you have 60-70 rasterizer but still 60fps.

The percentages of everything there like the rasterizer are all relative. If you take the percentages of all the other values and subtract them from 100, you get the percentage of the rasterizer which is whatever it was. It doesnt mean that the rasterizer is 80% of the scene. it just means that compared to everything else, the rasterizer is doing the most work. which is normal.

1 Like

@Nicholas_A

Thx for explaining.

This makes more since now :slightly_smiling_face: :+1:

it happens when using OBS recorder on standalone player. When playing game it remains around 12%.

I think i can still improve the Animation section as they are keyframed at each frame and have useless scale and location.

For those interested into that https://mogurijin.wordpress.com/2012/01/03/bge-profile-stats-and-what-they-mean/

1 Like

checkpoint empties for npc’s navigation placed at strategic points. Script computes the xy length between each neighbors at boot. by you have to define which checkpoints are connected (= don’t have to transit on another checkpoint ). But if there’s new danger on way, it’s possible to weight distances to make a part of the graph avoidable.

For simplicity, when the npc has to go to a new destination, it will just pick closest checkpoint as the start (could be problematic if the graph is like a croissant). If the npc is chasing you and you run faster, it will just take same path as you unless it can take a shortcut to save time

5 Likes

@blenderaptor

Love the environment elevation :slightly_smiling_face: :+1:

here, video. The npc has to go on top of building. But if you get close, it will follow you as long as you don’t put too much distance between you and the npc (or you go jump down another level)

If the npc chase you (and not just follow), it will computes a path in which the last checkpoint is the one you are the closest from (so once reached, the npc will start to go directly on you )

streamable.com/u0g2i

2 Likes

Remade the modes : 3 modes so far :

  • the npc is doing it’s routine walk
  • the npc tries to escape you (going to exit point by avoiding the checkpoint you are closest to)
  • the npc tries to catch you (here below)

So this is made with python only, I already tried to use the NavMesh but it seemed buggy. Does anyone has good experience with NavMesh ? Does the Navmesh could handles well a fighting stance ? I do ask because, i don’t see strong examples of developed AI’s in BGE. I want people to help us to improve modules

3 Likes

ive decided to go the long route TBW isnt using any navmeshes, i don’t wan’t to be limited to the bounds from which the nav meshes stem from!

TBW Path finding sys and tracking is completely hard coded and going to be different using other methods bot so far im not using NAVMESH’s and RAYCASTING !!!

Unfortunately you’ll have to find a way around that obstacle buddy u could try going all out Py if that’s the way for you u can create special lines of code for detection and bounds etc
its a long story…

Fred/K.S

1 Like

This is super exciting for sure! I’ll be following to see where this goes! Keep up the good work! The improvement is incredible! :slight_smile:

1 Like

thank you! nice to have feed-back.

Here, my new navigation system (not finalized) .

3 Likes

Hey @blenderaptor

In your latest video the BOT uses the stairs only so often.
Do you plan to fix that in the future or is that deliberate to add realism :thinking:

euh ? not sure i understand but yes, the npc can jump from a floor to a lower floor. It’s not a bug. It’s all about checkpoints and an algorithm to find smallest path -up to the player- among the checkpoints. The npc will leave the path to chase the player under some conditions (have to tune them right) and will go back on path under other conditions (like you jump on top) So you can see that it gives some smooth result . For a map with levels and no bumpy grounds it’s just :ok_hand: as you can see. I would even say that a Navmesh has some chances a simple plane with only some obstacles . I did give a try to Navmesh once again but it’s really bad with glitchy results and too often npc stucked at any little angle. That’s why i have some anger with bge sometimes. Given the fact that lot of games requires : ragdoll, navigation, basic animations and so on … why people have to do everything themselves with random results. Editing a navmesh by hand and testing 100 times it… is just :-1:

1 Like

@blenderaptor

I meant the the NPC falling from the platform like shown in the video at 0:30.

So agreed :grin: :+1:

However are you trying to make the NAVMESH be low-poly (?) Since NAVMESHES work by PER-POLYGON & not per object.

i tried to generate a navmesh from my floors, i even tried to create 1 by hand and set physic to navmesh. It’s shit in both cases. Navmeshes generated are bumpy, the ones made by hand have buggy path (stuck at angles) even when recalculating indexes. Anyway, even so, navmesh cannot allow your npc to jump from platforms and it uses more physics -> so more cpu --> so crappy fps. Also, with stairs, navmesh acts pure crap and u have to start to make invisible floors and other crappy hand made solutions.

streamable.com/x86k4

1 Like

keep working on the npc . Here below, the npc has to stand his ground and defend his position. He will hit you if you show your back and will step back if you go towards him. But the more you push him away his position, the more he will just slip to the right or the left to avoid to be too far from his initial position.

It moves a bit too much in all directions but will work on that.

edit : the logics over 35-40% it’s because i gone back on the good old screencapture system in BGE. When taking a picture every 2 frames, the result is better than OBS

4 Likes

combined the stances. (high logics is coz the screen capture each 2 frame)


Below, 1200x900 video with npc attacking . Ofc, i will introduce hitted animations later. This is just to test the code :slight_smile:

streamable.com/n0zx4

Later i will add many psycho variables to make the AI more human and improve the positional variables to make the combat more realistic. For the moment, the npc relies on a random number , position of the player and a standing point he tries tu guard

3 Likes

Cool. I wonder if it’s too difficult to “teach” bots not run around for stairs but directly jump on second floor chasing player? This could add some dramatism. :slight_smile: