User Tools

Site Tools


This is an old revision of the document!


Developer FAQ

Is Cafu right for our game of genre "..."?

Variants of this question include:

  • Can we use Cafu to make a MMORPG?
  • Is Cafu fit for our 3D strategy game?
  • Will we able to implement our car racing game with Cafu?

While we would love to provide you with a clear and authoritative “yes” or “no” answer to these questions, that is easier said than done:

When you ask one of these questions, you usually have a clear mental image already on how your game should look like – an image that we don't have, because often we know way too little about your project: your plans, your team, your skills (modelling, mapping, scripting, programming, …), your deadlines, etc. Not knowing what you really want and if you're ready to – for example – writing material shaders or making changes to the C++ source code is what makes this question difficult to answer.

However, there is an alternative that is much better than any statement we could make: Familiarize yourself with Cafu, try it yourself, and evaluate if it is right for your needs.

For example, download and run the latest demo. Explore the TechDemo map. Then try making a small map of your own, or edit one of the included maps in the editor. Browse the scripts and source code. If there are problems or questions, ask.

Not only will you become familiar with the Cafu details, you will also be able to form a very competent opinion about Cafu's suitability for your project.

What is the maximum number of network players?

There is no hard limit built into Cafu, but the general rule is that in the worst case, updates of everyone must be distributed over the network to everyone else. That means that the overall network load (on the server) roughly climbs with the number of players squared.

Fortunately, the Cafu network code is able to cut the network load significantly in many cases:

  • Each network message is very small from the beginning, and additionally compressed.
  • The Cafu server knows “who can (potentially) see who”, and optimizes all cases where updates would be sent that cannot be observed by the receiving client.

With these features, Cafu can handle a large number of players in a single level all at the same time. We have demonstrated that connecting 8 clients over the internet is possible without problems (and with some bandwidth left) – and that was several years ago over a slow ISDN (64 kbit/s) Internet connection.

How do I locally clone the Cafu source code repository?

When you start working with Cafu, picking up the source code from a compressed archive or from the Subversion repository is sometimes not enough:

Many developers prefer to manage their project in their own, local version-control system, but also wish to integrate the latest changes (e.g. bug-fixes or new features) from the official Cafu repository into theirs from time to time. This synchronization of the projects code with the original Cafu source code should be as convenient and automatic as possible.

One way to achieve this is to use Git:

(TODO: Provide Cafu-specific instructions.)

Where can I learn more about 3D programming or game engines?

There are many available resources regarding 3D engines and related their subjects, both online and offline in the form of traditional books and papers. The following list is neither complete nor up-to-date, but we hope that it serves as a starting point for your own investigations into the matter:

  • http://www.opengl.org
    The official OpenGL website, and the first place to search for information about OpenGL.
  • BSP-FAQs
    Introductory information about BSP trees.
  • “Computer Graphics, Principles and Practice” by Foley, vanDam, Feiner & Hughes.
    Some say this is the bible of computer graphics – and it's true. It covers nearly everything there is to know. An excellent reference, but have a look into the table of contents before buying it.
  • “Radiosity and Realistic Image Synthesis”, Michael F. Cohen and John R. Wallace. Morgan Kaufmann Publishers, Inc., San Francisco, California.
  • “Radiosity. A programmers perspective.”, Ian Ashdown. John Wiley & Sons, Inc., New York, N.Y.
  • “Zen of Graphics Programming, 2nd edition” by Michael Abrash.
    Most of this book is about low level DOS graphics programming (outdated now, but good nonetheless). The final chapters are a collection of Abrash's articles that appeared in the “Dr. Dobbs SourceBooks” series. They contain information about BSP trees, span sorting, etc.
  • “Programming in Lua, Second Edition” by Roberto Ierusalimschy. The first edition of this book is also available online.
general/developer_faq.1290768010.txt.gz · Last modified: 2013-01-07 12:07 (external edit)