#74: Firing the shotgun causes significant delay

0 views
Skip to first unread message

Cafu Trac

unread,
Jul 12, 2011, 11:30:19 AM7/12/11
to cafu...@googlegroups.com
#74: Firing the shotgun causes significant delay
--------------------------+-------------------------------------------------
Reporter: Carsten | Owner:
Type: optimization | Status: new
Priority: normal | Milestone:
Component: Libs | Version: svn-head
Keywords: | Platform:
--------------------------+-------------------------------------------------
Original report and discussion is at
http://www.cafu.de/forum/viewtopic.php?f=6&t=873

Isolating the source of the delay is required as a first step.
Is tracing rays through terrains slow??

--
Ticket URL: <http://trac.cafu.de/ticket/74>
Cafu 3D Game and Graphics Engine <http://www.cafu.de>
The open-source game engine and graphics engine for multiplayer, cross-platform, real-time 3D action.

Cafu Trac

unread,
Apr 11, 2015, 2:21:29 PM4/11/15
to cafu...@googlegroups.com
#74: Firing the shotgun causes significant delay
---------------------------+---------------------------------------------
Reporter: Carsten | Owner: Carsten Fuchs <carsten.fuchs@…>
Type: optimization | Status: closed
Priority: normal | Milestone:
Component: Libs | Version: svn-head
Resolution: fixed | Keywords:
Platform: |
---------------------------+---------------------------------------------
Changes (by Carsten Fuchs <carsten.fuchs@…>):

* owner: => Carsten Fuchs <carsten.fuchs@…>
* status: new => closed
* resolution: => fixed


Comment:

In [changeset:"2f83e6df776df2a6f2abb31e74665c22b4238c2b/git"]:
{{{
#!CommitTicketReference repository="git"
revision="2f83e6df776df2a6f2abb31e74665c22b4238c2b"
GameSys: Update `ComponentHumanPlayerT::TraceCameraRay()` to operate in
the clip world, not the physics world.

The physics world instance on the client is problematic: Whereas physics
objects
on the server are instantiated as "dynamic" physics objects, on the client
they
actually had to be instantiated as "kinematic", but at this time aren't.
See `ComponentPhysicsT::UpdateDependencies()` for details.

As a result, physics objects on the client are, at this time, never
properly
updated, so that the previous implementation of `TraceCameraRay()` could
not
properly work. For example, firing with the AR rifle at the crate in map
Kidney
found particles at the wrong positions once the crate had moved from its
original position.

(In fact, we should probably not instantiate a physics world instance on
the
client in the first place! Except possibly for eye-candy effects, it's
quite
useless there. TODO!)

The new implementation works with the clip world, which is properly
updated on
the client and thus yields the expected results.

Also, performance turns out to be *much* better with the new
implementation,
so that this change in fact fixes #74.
}}}

--
Ticket URL: <http://trac.cafu.de/ticket/74#comment:1>
Reply all
Reply to author
Forward
0 new messages