RendererARBprogs
renderer. Using the proper command line in order to use the OpenGL 1.2 renderer instead worked immediately:CODE:
./build/linux2/g++/release/Ca3DE/Cafu -clRenderer Libs/build/linux2/g++/release/MaterialSystem/libRendererOpenGL12.so
Games/DeathMatch/Textures
directory with the proper files from the submodule:CODE:
$ git submodule init$ git submodule update
--recursive
to the clone
command in order to init and update the submodules automatically:CODE:
$ git clone --recursive https://bitbucket.org/cafu/cafu.git Cafu
Cafu may be used for any purpose, including commercial purposes, at absolutely no cost. No paperwork, no royalties, no GNU-like “copyleft” restrictions, either. Just download it and use it.
Cafu is Open Source software. Its license is simple and liberal and is compatible with the GPL. Cafu is not in the public domain and the authors and contributors keep their copyright. For exact contribution history, see the revision history.
ClientStateInGameT
, a client that has joined a game world has these crucial tasks to complete in each video frame:CODE:
Render() { // Draw the current state of the game world on screen. } MainLoop() { // Everything else that is important in each game loop: // - process any network packets that might have arrived from the server // (apply server updates and run reprediction as described below), // - collect and process player input. }
Render()
method (and any nested Draw()
methods) that are responsible for rendering the client world are "constant". As explained later, this is not exactly true in the strict sense of the C++ const
keyword, but it is true in the sense that when the drawing is done and the CaClientWorldT::Draw()
method returns, the client's world state is exactly the same as it was when the drawing began.ClientStateInGameT::MainLoop()
) to be considered.SC1_FrameInfo
message arrived from the server, all game entities (that are relevant for the client) are updated to the state of server frame "X". As the server also indicates the growing ID of our client's player command that it has accounted for up to server frame "X", the locally available player commands that have not yet been accounted for since frame "X" are re-applied ("reprediction").PlayerCommandT
struct. It then is:ClientStateInGameT::MainLoop()
we make sure to (only) take note of anything that might affect the effects. Most prominently, if a new SC1_FrameInfo
server update arrives, new target values for the interpolations are recorded – but the values themselves are updated as if interpolation didn't exist.CaClientWorldT::Draw()
, which is actually responsible for rendering the world:FrozenSpectator
, currently still implemented in ComponentHumanPlayerT
via sync'ed m_HeadSway
member),reintroduce-groups
branch is completely implemented and committed. master-vc2012
or entity-component-system
, the following recent changes are important:pre-entity-component-system
. This is the revision where our master
branch was at the time when the development of the entity component system was begun. The annotated tag message is this:CODE:
This is the last revision before the extensive work was begun to introduce acomponent system for game entities to Cafu.It is expected that the development will take a long time. Although it isintended to keep backwards-compatibility wherever possible, it is expectedthat compatibility to now existing binary files (especially `cw` world files)and to custom Lua map scripts (e.g. `TechDemo.lua`) must and will be given upin the process.Contrary to the already completed introduction of a component system for GUIwindows, it is expected that the upcoming work is of a long-running nature,comes with extensive changes to almost all parts of the Cafu Engine, and ispossibly "open-ended". It is therefore developed in the `master` branch ratherthan a feature branch that would run for months and years, and in the meantimeonly leave `master` back at this commit, which will sooner rather than laterbecome old and unsupported.Also see http://www.cafu.de/forum/viewtopic.php?p=6212#p6212 for additionalinformation.
master
to entity-component-system
(integrating entity-component-system
into master
), in which until now the entity component system was developed, then deleted the now no longer needed branch entity-component-system
(and master-vc2012
as well).entity-component-system
, and possibly based work on it, you can use these steps to update your working copy (the steps are shown for Windows, but are very similar under Linux):CODE:
# Fetch all the new branches, commits and tags:> git fetch --all --prune> git fetch --tags# Clean up the working copy, i.e. stash or commit local uncommitted changes# as necessary, and (on latest entity-component-system), delete possible# leftovers from previous revisions:> rd /s Games\DeathMatch\Code> rd /s Games\VSWM# Checkout the "old" master branch, and fast-forward to origin/master:> git checkout master # old master> git merge origin/master --ff-only# In my case, it was sufficient to delete the now obsolete local branch,# however if you have based own work on it, you'll rather want to rebase it# onto or merge into master first.> git branch -d entity-component-system
master
branch rather than keeping it further artificially separated in the now gone entity-component-system
, at this time master
is not in a state where a release could be made from it: In fact, if you compile and run it, you will quickly find a lot of problems.entity-component-system
into master
, are also responsible for the "broken" look and feel of today's (May 2014's) master
.master
, despite my promoting it as described above, currently has known bugs and generally not the quality that we normally strive to achieve and are used to.CODE:
local clTime = 0.0local Duration = 0.5function Light:ClientEffect(t) if not self:get("On") then clTime = 0.0 return false end clTime = clTime + t if clTime >= Duration then return true, 0, 0, 0, 0 end local Amount = 1.0 - clTime/Duration return true, Amount, Amount*Amount, Amount*Amount*Amount, 400.0end
EntSoundT
entity class from the BaseEntityT
class, and have it implement all the features that we wanted. However, it soon turned out that we not only wanted dedicated EntSoundT
entities to play sounds, but many other entities (of different entity classes) as well. For example, an item that is picked up by the player and respawns a few seconds later makes a sound at both occasions. So we re-implemented the sound functionality in the item's entity code as well. And soon in the code for monsters, for human players, and several others.EntityT
. No inheritance, no class hierarchy. Essentially, entities are now nothing but lists (or "containers") of components.EntityT
instance that represents the "whole thing", the entire car or the entire lift, possibly with a set of components that define features for the whole, and to have child entities that represent the parts, where each part is another EntityT
instance that can contain components of its own.float
, double
, or composites thereof).entity-component-system
branch (which will be merged back to master
once done).CODE:
copy Ca3DE\wireshark-cafu.lua c:\Users\Carsten\AppData\Roaming\Wireshark\plugins\
plugins
subdirectory beforehand, if necessary.RawCap.exe
program from http://www.netresec.com/?page=RawCap. When RawCap.exe
is started, it will capture all packets from the loopback device into a dump file. While RawCap is running, we also run the Cafu Engine in order to record the network traffic. When you're done with Cafu, also quit RawCap with Ctrl+C
, then start Wireshark to analyze the file that has been written by RawCap.CODE:
udp.port == 30000 or udp.port == 33000
gui-component-system
branch in our Git repository.zip
, tar.gz
and tar.bz2
formats.git svn ...
commands, I found plenty of occasions where manual tweaking of the process, or post-processing and clean-up work was necessary in order to achieve the desired result. This is especially true whenever the Subversion source repository deviates from the classic "trunk, branches, tags" layout, or subtleties of Subversion merges prevent proper automatic conversion to Git.branches/
branches/
, but more branches are elsewhere, or if standard layout was never used and the branches are arbitrarily scattered across the Subversion repository, it is not immediately clear if and how these extra branches can be accounted for so that they are properly imported into Git. The solution is to split the call to git svn clone
into this sequence:CODE:
> git svn init https://srv7.svn-repos.de/dev123/projects/cafu -s Cafu> cd Cafu> git config svn.authorsfile ../authors.txt> git config --add svn-remote.svn.fetch "vendor:refs/remotes/vendor"> git svn fetch
vendor/
as a Git branch, as if it was another branch in branches/
.CODE:
------B-----D---- master / ----A-----C------ pristine
forum/themes/firenzie
in pristine directly to the same directory in master..git/info/grafts
file, and to "fix" its results withCODE:
> git filter-branch --tag-name-filter cat -- --all
--tag-name-filter cat
part makes sure that attached tags are rewritten as well.grafts
file and the references to the original commits should be deleted:CODE:
> rm .git/info/grafts> rm -rf .git/refs/original/
git svn fetch
will automatically rebuild the rev_map
that is needed for continued bidirectional communication with the source Subversion repository.CODE:
> type convert_tags.sh#!/bin/sh# CF: from http://blogs.atlassian.com/2012/01/moving-confluence-from-subversion-to-git/ with small modifications.# Based on https://github.com/haarg/convert-git-dbicset -uset -egit for-each-ref --format='%(refname)' refs/remotes/tags/* | while read r; dotag=${r#refs/remotes/tags/}# CF: Note the ^ in the next line: We create the converted tag at the *parent* of the original tag.sha1=$(git rev-parse "$r^")commiterName="$(git show -s --pretty='format:%an' "$r")"commiterEmail="$(git show -s --pretty='format:%ae' "$r")"commitDate="$(git show -s --pretty='format:%ad' "$r")"# Print the raw commit body (commit message).git show -s --pretty='format:%B' "$r" | \env GIT_COMMITTER_EMAIL="$commiterEmail" GIT_COMMITTER_DATE="$commitDate" GIT_COMMITTER_NAME="$commiterName" \git tag -a -F - "$tag" "$sha1"echo "Tag: ${tag} sha1: ${sha1} using '${commiterName}', '${commiterEmail}' on '${commitDate}'"# Remove the svn/tags/* refgit update-ref -d "$r"done
CODE:
> git filter-branch --index-filter ' rm -f "$GIT_INDEX_FILE" git read-tree --prefix=ExtLibs/ "$GIT_COMMIT" ' refs/heads/vendor
--squash
).git-svn
a very good interface to Subversion for both parallel use or one-time conversion.