The video quality is slightly poor.
The video quality is slightly poor.
Looks great and quite performant! What type of hardware is used ?
Is some specific approach with models/materials/animations used ? Bc I have some performance issues with animated pbr models, it would be interesting for me to try something that might help.
I see also some âparticlesâ system, is it self-made or something known used, like 3DPS from Kagamma?
Also interesting how much info is shown in this profiler panel, it is different from original castle profiler UI, is it self-made also ?
What I specifically liked is Jinga animation
from capoeira ! but I suppose popular animations like mixamo are used , or ? Fog effect with pressurized flow effect from smoke grenade also looks stunning.
What I didnât like: sounds are felt somewhat jagged and interfering each-other, maybe too intense for background noise, a gun crosshair is a lit tiny sphere, which looks strange
, materials on the character models look like Phong materials or some plastic, esp. on player hands holding gun, this is clearly seen when you change skins of player.
In general - it is feature-rich and feels close to complete state which is really great!
thanks for sharing !
Thanks a lot for the detailed feedback.
Hardware:
CPU: Intel i5-9600K
GPU: GTX 1650
So itâs not high-end hardware ![]()
Models / Materials / Animations approach
Each model uses only one material. I use combined textures.
All textures are compressed (KTX).
For characters:
I use one shared armature (skeleton) in Blender
I only change the mesh, not the skeleton
Animations are split by bones:
upper body
lower body
full body
fingers, etc.
I export keyframes from Blender and use them at any time in any current animation.
Particle system
I use Effekseer (Kagamma) for particles.
âJinga / Gingaâ animation & fog effect
Thanks ![]()
Yes, the smoke is cool. I only have the .efk file, not the .efkproj â I forgot how I downloaded it.
Sounds
Yes, walking / running sounds are currently bad.
âa gun crosshair is a lit tiny sphere, which looks strange
â
Yes, I can change the effect for any weapon (sniper, rifle, smoke, etc.).
Materials (plastic / Phong look)
Materials on the character models look like Phong or plastic, especially on the player hands.
Yes, especially the hands â I was going to fix them but got lazy
.
In the future, I will change the texture.
Profiler panel
Yes, it is self-made ![]()
I use a VCL form inside a DLL.
Each player owns one profiler instance.
In general, it is feature-rich and feels close to a complete state, but there is still one big adventure left:
Networking ![]()
I will try to make it an online shooter game.
Finally, I use physics in a separate thread. I tested it, and it looks good.
Maybe itâs not 100% safe, but for now it works great ![]()
When I have time, I will make a demo that summarizes all of this work.
This looks great. How do you make the rifle scope? Is it a TCastleViewport, if yes, how do you get it in a circle form?
Thanks
Itâs not a circular viewport. The scope is a real 3D model (scene) attached to the weaponâs transform, and I just zoom the camera. ![]()
I use a scene for the scope (not a TCastleTransform reference) because the scope has a bone, and I use its position for raycasting.
Note: one can make TCastleViewport in a circle form using TCastleMask, see Mask UI. Mask can âfilterâ a circular shape from a viewport.
Our example examples/3d_games/explore_impressive_castle (examples/fps_game in the past) shows this used, for a circular minimap in top-right.
( Iâm just making a note in case you need this feature. For the rifle âzoom inâ, the way @hal09 has done on the movie is cool. Alternative for me (but it depends on the rifle / zoom look) would be to switch rifle to âUI over the viewportâ and then zoom the camera (changing field of view). )
Hello everyone,
I made a demo to show the animation method from the video. I hope itâs clear and organized !
i m using delphi for this demo.
Basically: export bone data with a script (one bone / multiple bones / all bones), then load it and play it on any character with the same skeleton.
It has an error:
Fatal: Canât find unit System.TypInfo used by GameViewMain
just remove System. in such cases, leave only TypInfo in uses block
It didnât make any difference.
i m using delphi for this demo
try delphi 11, 12 , 13
I experimented, and I can compile the demo from @hal09 using FPC, and on Linux
It rocks.
Note: One needs FPC 3.3.1 (stable FPC 3.2.2 will not be enough) to have support for reference to... . You can install such FPC version using e.g. fpcupdeluxe.
Hereâs a list of changes:
Remove System. prefix from a few standard units in the uses clause. Itâs mostly search+replace System. â ââ (nothing).
Remove Threading from the uses clause. FPC doesnât have it (for now), itâs also not used in this code.
Add to all units (early, e.g. before interface keyword):
{$ifdef FPC}
{$mode delphi}
{$modeswitch functionreferences}
{$modeswitch anonymousfunctions}
{$endif}
Reason: This will allow:
TList<TAnimationRouteNodeEntry> without specialize keyword (see FPC ObjFpc vs Delphi differences for explanation)reference to ..., see Anonymous functions section in âModern PascalâŚâPlayerScene (duplicate member and parameter names, that are otherwise not allowed in FPC ObjFpc mode, see again FPC ObjFpc vs Delphi differences for explanationAdd
type
{$ifdef FPC}
TProc<T> = reference to procedure (Arg1: T);
{$endif}
at the top of unit uPlayerManager, since FPC misses TProc<T>.
To help FPC determine RandomFrom overload, change it to
const
Ints: array[0..2] of Integer = (0, 1, 2);
....
Player := CreatePlayer(TCharacterType(RandomFrom(Ints)));
Add to Local[TBoneCharacterType(BoneIndex)] using more manual way:
procedure AddArray(var Source: uPlayerConst.TSingleArray_; const Values: array of Single);
var
I: Integer;
begin
SetLength(Source, Length(Source) + Length(Values));
for I := 0 to Length(Values) - 1 do
Source[High(Source) - I] := Values[High(Values) - I];
end;
....
if (BoneIndex >= 0) and (BoneIndex <= Ord(High(TBoneCharacterType))) then
begin
AddArray(Local[TBoneCharacterType(BoneIndex)],
[Frame, LocX, LocY, LocZ, RotX, RotY, RotZ, RotW]);
end;
Remove {$ifdef FPC}@{$endif} from the {$ifdef FPC}@{$endif} Utility.Handler. (in this case, @ is wrong, as Handler is a variable already)
Add TypInfo to GameViewMain uses clause.
Thank you @michalis
I followed your notes and successfully compiled the demo using FPC 3.3.1.
I also noticed a big performance difference:
FPC 3.3.1 â around 300 FPS
Delphi â around 120 FPS
!!!
I think I should seriously consider moving to FPC 3.3.1 ![]()