FAQ

From C4 Engine Wiki

Jump to: navigation, search

There is also a less technical FAQ page.

Contents

General Questions

What language does C4 use?

The C4 Engine itself is written entirely in C++. For level design, there is a graphical scripting language built into the engine that can be used to script sequences of actions.

How complicated is C4?

If you have a fairly good grasp of C++, then using the C4 Engine should be pretty straightforward for you. The engine has a very clean programming interface, and several examples for using various features ship with the engine. The math knowledge needed to use the engine isn't really that high—if you understand how points are transformed from one coordinate system to another using a 4×4 matrix, then you're in good shape.

What documentation exists for C4?

We have a documentation library that contains per-function descriptions of the C4 Engine programming interface, and this wiki contains overviews and tutorials about various programming and art-related tasks. There is now a new book about C4 entitled The Beginner's Guide to the C4 Engine.

Is the C4 Engine suitable for my game?

The C4 Engine is designed to be very generic in nature, so you're definitely not restricted to just one type of game (such as FPS, RPG, or RTS). The current C4 demo is an example of a first-person shooter (FPS), but that is simply because we like those kinds of games, not because of any limitations in the engine.

The demo contains code for both a first person camera and third person camera (bind an appropriate key in the Control Settings to use it).

Does C4 have a suitable physics engine for my game?

Currently, C4 supports standard collision detection and various forces for characters and projectiles. Version 2.0 of the engine, to be the next release, contains a full-featured built-in physics system that supports rigid body dynamics.

There are some unofficial builds which have implemented physics from licensees, but none of these options are officially supported:

  • PhysX: Licensed developers have access to an Ageia PhysX integration, which is being developed by JamesH. Using the PhysX Integration.
  • TrueAxis: Demo on website.
  • Newton: A partial (working) implementation has been developed by Flashjackson. A tutorial is available.
  • Bullet: Continuous Physics, the developers of Bullet, have created a demonstration which shows how the Bullet physics library can be added into C4. An early version is available on the forums. Thanks to Flashjackson and Jonathan for helping out.

Is there a list of planned features?

Yes. See the Official Roadmap.

How often are updates released?

Updates to the C4 Engine occur on an irregular schedule. There can be as little as a few days between updates or as much as a couple months. We typically release 10–15 updates per year.

What version of EAX is currently being used?

The engine no longer contains any support for vendor-specific libraries like EAX and instead uses a custom multithreaded software audio renderer. This gets rid of all the headaches associated with supporting different hardware, buggy drivers, and poorly designed APIs. Furthermore, it means that the audio experience is identical on all machines, so testing across a wide spectrum of sound hardware is not necessary.

Will C4 support the Ogg audio compression format?

There are no plans to support Ogg because of the CPU expense. However, the engine supports application-defined streaming and decompression classes, so it would be easy to add by anyone who wants to use a 3rd party library.

Graphics Questions

Is it possible to disable features so that C4 runs on graphics cards older than the minimum requirements?

To an extent, yes. C4 can be made to run on any graphics card that supports fully programmable pixel shaders, but the requirements are a little higher for terrain and shadow mapping. For all engine features to be available, the minimum requirement for Nvidia hardware is a GeForce 6600, and for ATI hardware is a Radeon X1500. Without terrain and shadow mapping, the minimum requirement for Nvidia hardware is a GeForce FX 5600, and for ATI hardware is a Radeon 9500.

See the C4 Engine Graphics Hardware Compatibility.

Why does the engine seem to be running slower than expected for me?

There are several things that could be causing the engine to run slower than it should be. First, always make sure that you have the latest drivers for your graphics card. The latest drivers for Nvidia and ATI graphics chips can be downloaded at the following locations.

Get latest Nvidia drivers

Get latest ATI drivers

You should also make sure that other drivers, such as those for your monitor and motherboard chipset, are up to date.

If you have more than one monitor connected to your computer, disabling the secondary monitor can often give you a huge speed boost.

If the engine is still running slow for you (possibly because you have one of the lower-end cards supported), then try disabling rendering features in the Graphics Options dialog. Disabling motion blur and glow effects will give you the best speed-up. On lower-end cards, make sure high quality bump mapping and parallax mapping are turned off.

Is C4 ever going to support conventional light maps?

No. The limitations of static light maps make them unsuitable for a next-generation engine. The C4 Engine has newer, more dynamic lighting features. Additionally, new algorithms and techniques are continually being explored for future versions of the C4 Engine.

Does C4 have a HDR render path? What about post processing?

C4 contains a post-processing system that enables several particular effects, including full-scene motion blur, glow and bloom, and distortion effects. High-dynamic range (HDR) support will be added in the near future.

I'm seeing shadow artifacts on a model I imported. What's wrong with it, and is this a bug in C4?

This is not a bug. C4 uses a stencil shadow algorithm as the primary method for casting shadows. All meshes must be completely closed for stencil shadows to work correctly, meaning that every edge in a mesh must be shared by two faces.

What version of OpenGL does C4 use?

C4 doesn't require a particular version of OpenGL above 1.1, but it requires the following extensions in addition to OpenGL 1.1. (Some of these became core features in OpenGL 1.2, 1.3, etc.)

GL_ARB_fragment_program
GL_ARB_multitexture
GL_ARB_texture_cube_map
GL_ARB_texture_rectangle
GL_ARB_vertex_program
GL_EXT_blend_color
GL_EXT_blend_func_separate
GL_EXT_draw_range_elements
GL_EXT_framebuffer_object
GL_EXT_stencil_wrap
GL_EXT_texture3D
GL_EXT_texture_edge_clamp

To support terrain rendering, the OpenGL implementation needs to support either GL_NV_fragment_program_option or GL_EXT_shader_texture_lod.

For Nvidia hardware, all of these requirements are satisfied by the GeForce 6 series and higher. For ATI hardware, these requirements are satisfied by the Radeon X1500 and higher.

Information about different generations of Nvidia and ATI graphics processors can be found here: Nvidia ATI

Tools Questions

How do I get the World Editor and other tools to work?

When the main game menu appears, hit Escape to get rid of it, then hit the tilde key (or, on some non-English keyboards, whichever key is directly below the Escape key) to bring up the command console. A menu bar will appear at the same time, and there's a Tools menu that has everything in it.

Alternatively, you can just hit Ctrl-N (to open a blank world) or Ctrl-O (to open an existing world) from the main menu or most open GUI windows.

All the tools can also be accessed from the command console.

How do I import models into C4?

C4 can read the Collada format. See Collada Plugins. You can import a Collada file (with the .DAE extension) by placing it inside a subfolder of the Import directory and selecting Import Scene from the World menu in the World Editor.

Are there plans to support more 3D file formats?

No other formats are officially supported at this time. You must be able to export directly to the Collada format, or convert to it somehow, in order to bring externally created models into C4. However, the World Editor supports import plugins, so it's possible to write your own plugin to read any format you want. (The official Collada importer is written as a World Editor plugin.)

Building/Compiling Questions

When I run in debug mode with Visual Studio, the engine exits immediately

If you're running the engine in debug mode for the first time in Visual Studio, and the engine just exits or crashes immediately, then you probably need to set your working directory.

To do this, right-click on the Engine folder in the C4 solution, select Properties, and go to the Debugging pane. Make sure the configuration is set to "Debug", and enter "..\..\.." for the Working Directory (without quotes). This sets the default directory to the location containing the C4.exe file.

Image:WorkingDirectory.png

Does C4 build as a Universal Binary for Mac?

Yes, C4 can be built as a universal binary that runs on both PowerPC-based and Intel-based Macs. However, the project files that ship with the engine only build for Intel chips by default.

Personal tools