Getting Started
From C4 Engine Wiki
Contents |
Standard Edition for Windows
Follow these instructions to get started with the Standard, Professional, and Academic Editions of the C4 Engine under Windows XP, Windows Vista, and Windows 7.
See also Building the C4 Engine.
Installation
The C4 Engine is distributed as two ZIP files named C4-2.7.1-Code.zip and C4-2.7.1-Data.zip. There is a third ZIP file named C4-2.7.1-Binaries.zip that contains the Windows binaries, but this file does not have to be downloaded if you're going to build the engine yourself.
To install, first create a directory somewhere on your hard drive in which you'll store all of the C4 files. Then copy the two or three ZIP files that you've downloaded to this new directory and extract them all. If you're using WinZip, choose “Extract to here” from the right click menu with each ZIP file selected. Once the files have been extracted, you no longer need the original ZIP files, and they may be deleted.
After extraction and removal of the original ZIP files, your C4 directory should look like the folder shown to the right. If you extracted C4-2.7.1-Binaries.zip, then you will see the files C4.exe, Game.dll, SimpleBall.dll, and SimpleChar.dll.
If you are not going to build the Mac version of the engine, then you may safely delete the file Xcode.zip. Otherwise, extract this file on a Mac to access the Xcode project files as described below.
Building
The project files for Visual Studio 2008 and Visual Studio 2010 are located at the following places.
VisualStudio2008/C4/C4.sln
VisualStudio2010/C4/C4.sln
Double-click on whichever one of these corresponds to the version of Visual Studio you have installed. After opening the project file in Visual Studio, select “Build Solution” from the Build menu to build the engine. This will cause several binaries to be built: C4.exe, Game.dll, SimpleBall.dll, SimpleChar.dll, and a bunch of DLLs that get stored in the Plugins directory.
Running
To run C4, double-click on the C4.exe application. You can also run from inside Visual Studio, but you will first need to set the working directory to ..\..\... This can be set by opening up the Properties window for the Engine project and going to the Debugging page. (If the working directory is not set, the debug build of the engine will alert you to this fact when you try to run from inside Visual Studio.)
Basic Edition for Windows
Follow these instructions to get started with the Basic Edition of the C4 Engine under Windows XP, Windows Vista, and Windows 7.
See also Building the C4 Engine.
Installation
The Basic Edition of the C4 Engine is distributed as a single ZIP file named C4-2.7.1-Basic.zip. To install, simply extract the ZIP file somewhere on your hard drive. A folder named C4-2.7.1-Basic will be created, and its contents should look like the folder shown to the right. After the ZIP file has been extracted, it is no longer needed and may be deleted.
If you are not going to build the Mac version of the engine, then you may safely delete the files C4.app.zip and Xcode.zip. Otherwise, extract these files on a Mac as described below.
Building
The project files for Visual Studio 2008 and Visual Studio 2010 are located at the following places.
VisualStudio2008/C4/C4.sln
VisualStudio2010/C4/C4.sln
Double-click on whichever one of these corresponds to the version of Visual Studio you have installed. After opening the project file in Visual Studio, select “Build Solution” from the Build menu to build the tutorial projects. This will cause the files SimpleBall.dll and SimpleChar.dll to be built from the source code.
Running
To run C4, double-click on the C4.exe application. By default, the SimpleChar game module will be running, and you will only see a gray screen when you start. Hit the tilde key to open the command console, and load a world by using the load command. A good first choice is the Data/Tutorial/world/Lasers.wld world, which can be loaded by entering load world/lasers in the command console.
Standard Edition for Mac OS X
Follow these instructions to get started with the Standard, Professional, and Academic Editions of the C4 Engine under Mac OS X.
Installation
The C4 Engine is distributed as two ZIP files named C4-2.7.1-Code.zip and C4-2.7.1-Data.zip. To install, first create a directory somewhere on your hard drive in which you'll store all of the C4 files. Then copy the two ZIP files that you've downloaded to this new directory and extract them both by double-clicking on them. The Finder will create folders named C4-2.7.1-Code and C4-2.7.1-Data to contain the extracted files, but we want all of the files to be placed in the enclosing directories. Open the folders named C4-2.7.1-Code and C4-2.7.1-Data, select all of the files, and drag them to the enclosing folder. Once this is done, you can delete the now empty C4-2.7.1-Code and C4-2.7.1-Data folders. After this is done, your C4 folder should look like the folder shown to the right.
The folders named VisualStudio2008 and VisualStudio2010 contains Windows projects and can be safely deleted on the Mac.
Double-click on the Xcode.zip file to extract the Xcode 3 project files. (The Finder will create the Xcode folder—do not copy its contents to the enclosing folder.) Note that Xcode 4 is not supported.
Building
To open the Xcode project for C4, open the Xcode folder and the C4 folder inside it. Double-click on the file C4.xcodeproj to open the project in Xcode.
Set the Active Target to "Build All" either by selecting it from the popup menu in the upper-left corner of the project window, or by selecting it from the Set Active Target submenu of the Project menu.
Select Build from the Build menu, and the compiler will build the engine, the game modules, and the tools.
Running
To run C4, double-click on the C4.app application that is created in the C4 folder when you build. You can also run from inside Xcode.
Basic Edition for Mac OS X
Follow these instructions to get started with the Basic Edition for Mac OS X.
Installation
The Basic Edition of the C4 Engine is distributed as a single ZIP file named C4-2.7.1-Basic.zip. To install, simply double-click on this ZIP file and let the Finder extract the archive. A folder named C4-2.7.1-Basic will be created, and its contents should look like the top folder shown to the right.
The files C4.exe, SimpleBall.dll, and SimpleChar.dll are Windows executables and can safely be deleted on the Mac. The folders named VisualStudio2008 and VisualStudio2010 can also be deleted on the Mac since they are specifically for Visual Studio on Windows.
Double-click on the file C4.app.zip to extract the pre-built C4.app application bundle. Double-click on the file Xcode.zip to extract the folder named Xcode containing the Xcode 3 project files. Once the C4.app.zip and Xcode.zip files have been extracted, the original ZIP files will no longer be needed and can be deleted.
After the ZIP files have been extracted and all unnecessary files have been deleted, the contents of the C4 folder should look like the bottom folder shown on the right.
Building
Before you can run the C4 Engine, you will need to build at least one tutorial project. Make sure that you have installed Xcode 3 before continuing. Note that Xcode 4 is not supported.
To open the Xcode project for C4, open the Xcode folder and the C4 folder inside it. Double-click on the file C4.xcodeproj to open the project in Xcode.
Set the Active Target to "Build All" either by selecting it from the popup menu in the upper-left corner of the project window, or by selecting it from the Set Active Target submenu of the Project menu.
Select Build from the Build menu, and the compiler will build both of the tutorial projects.
Running
To run C4, double-click on the C4.app application in the C4 folder. By default, the SimpleChar game module will be running, and you will only see a gray screen when you start. Hit the tilde key to open the command console, and load a world by using the load command. A good first choice is the Data/Tutorial/world/Lasers.wld world, which can be loaded by entering load world/lasers in the command console.





