Prepare Project

This is a simple example how you can download and install the Force Game Engine and Force Core API.

Installing Core

Since the engine currently only supports Windows, this is a Windows installation. Other platforms will appear a little later.

Requirements

Installing Process

Cloning repository and Setup

First of all to work on Force you need to have access to private Force Development Branch on Github. To get access to it you need to be a engine developer or ask the access, for that request send me on email.

Next you need to install Git and clone the github.com/KennyProgrammer/ForceDev into to ForceDev directory on your machine.

You should clone ForceDev repository ONLY inC:/ForceDev because its how i define this. If you clone in another folder most of engine scripts and behaviour will not work and you need change it manually. (it not affect on engine runtime, only on build side)

git clone -recursive https:\github.com\KennyProgrammer\ForceDev.git C:\ForceDev

After that go to Scripts\Windows and run Setup.bat script to update repository with all submodules, install: Git, Python, VcPkg and VS20XX projects for working with Force Engine. Basically it just bunch of Python programs that will be download and install Git, Python itself, and update all submodules recursively.

When you inside Setup.bat please choose install vcpkg. Because for some libraries we need it to build it properly. Also after installation vckpg DO NOT integrate it with Visual Studio, because all premake scripts for each submodule already contains all relevant data: include dirs, defines, links, and library files and post build commands for each submodule project.

Visual Studio

Basically to write code you don't need any IDE at all. But as always each IDE contains a lot of tool that can simplified this project. Force was developed on Microsoft Visual Studio, so that what it support. Force supports VS 2019 and latest 2022. Just go in official download site and install it with allowing to create a C++ application.

Generate Project Files

Go to Scripts\Windows and run one of Generate_VS20XX.bat scripts to generate Force Engine solution, Force, ForceEditor, ForceNave, ForceRuntime, and Examples projects.

Project Setup

Overview of ForceDev

The ForceDev folder contains repository files, solutions, and projects folders to work with ForceEngine. The most important is Force and ForceEditor folders where Force - Core, and ForceEditor - The Editor Tool are stored.

Also it has Examples folder with ExampleApplication and ConsoleApplication folders that contains examples how to write simple applications using Force Core API. In any time you can go to Create Application Tutorial to see step-by-step application creation.

The Premake folder contains binary file for latest premake5.beta1. Force using it for generating project files and solution.

Another folder that created after building one or more projects its Bin. It contains all binaries and library files of each of library and project that builds with Force. You should not commit this folder (see .gitignore), and you can safly remove all content from there, but then you need to rebuild projects again.

The VcPkg folder appears if you run Setup.bat or SetupVsPkg.bat from Scripts/Windows and choose install vcpkg. In that folders stored packages to rest of the libraries requre for Force to build. This list of libraries will be grow. Also this folder you should not also commit. (see .gitignore)

The last important folder is Scripts. It contains platform-specific scripts to generate solution with all referenced project sub-modules and build projects itself. It not recommended build solution or specific projects using this scripts because errors can occur or something you need setup by yourself.

Project Setup

After build on Visual Studio, you will have the some Application project, which is what you need. If you want to change the project name, you need to go to the engine directory C:\ForceDev, open the ForceEngine.lua file, and there find the project Application line. You can change the project and location parameters to your own name.

It is not recommended to change the order of folders or projects that are written in Force, since they already have a certain order, as well as the style of the code.

Everything is ready! Now you can safely run the ForceEngine.sln file and start writing your application. You can find a tutorial on how to write your own application using the Force in the next section.

Last updated