Skip to content

Commit 69bd722

Browse files
committed
Initial commit
0 parents  commit 69bd722

File tree

9,832 files changed

+1531653
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

9,832 files changed

+1531653
-0
lines changed

.gitattributes

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Declare files that will always have LF line endings on checkout.
2+
*.ttlvl text eol=lf

.gitignore

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
/src/.vs
2+
/src/engine/windows/obj
3+
/src/engine/windows/lib
4+
/src/game/windows/obj
5+
/src/game/windows/bin
6+
/src/game/shared/obj
7+
/src/game/shared/lib
8+
/assets/conversion/intermediate
9+
/assets/output
10+
/tools/assetconverters/debug_cout.txt
11+
/tools/assetconverters/debug_cerr.txt
12+
/tools/assetconverters/debug_clog.txt
13+
/assets/debug_cout.txt
14+
/assets/debug_cerr.txt
15+
/assets/debug_clog.txt
16+
/assets/source/shared/levels_unsavedchanges

LICENSE

Lines changed: 339 additions & 0 deletions
Large diffs are not rendered by default.

README.md

Lines changed: 164 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,164 @@
1+
# Two Tribes Engine
2+
3+
We, [Two Tribes](https://twotribes.com), have used this engine for over a decade. The engine was initially conceived as a Nintendo DS game engine when creating games such as [Worms Open Warfare 2](https://en.wikipedia.org/wiki/Worms:_Open_Warfare_2). It has since been used on many games for Nintendo Wii, Playstation 4 and PC among others.
4+
5+
It offers basic 3D functionality, but the main focus for Two Tribes has always been 2D games, so this is where it really shines! Our games always strived to run at 60 frames per second while offering great layered 2D visuals.
6+
7+
We decided to release the PC version of the engine on Github (see license below) and can't wait to see what other developers are able to create with it!
8+
9+
For an example of what can be created, feel free to watch this video of our last game [RIVE](https://rivethegame.com) in action: https://youtu.be/0fVr3bBKJzY?t=33
10+
11+
## Test Level
12+
13+
Included in this repository is a fully working test level of RIVE. It demonstrates the capabilities of the engine. Feel free to experiment with it, change it or make something with it yourself.
14+
15+
While the test level works without any issues, please do note that there is no guarantee that everything will work under different circumstances. Only a small part of the RIVE assets are included in this distribution. So there is a high chance that features are missing, or are generating asserts when fiddling around with different settings. If that happens, feel free to open an Issue on github and we might be able to help out. But as this software is provided "as-is", it might take a while before we are able to help out.
16+
17+
# Licenses
18+
19+
## Engine License
20+
21+
The engine is licensed under the [GNU GPLv2 license](https://www.gnu.org/licenses/gpl-2.0-standalone.html). A copy of the license is included in the repository. Should you require a different license because of the nature of your project, feel free to contact us.
22+
23+
## Assets License
24+
25+
All assets contained in the `.\assets` folder are copyrighted. All rights are reserved. You are allowed to personally use them to experiment with the engine and discover its possibilities.
26+
27+
Without our written permission you are not allowed to use them (nor any derivate work) in a product (free or commercially). Nor are you allowed to redistribute them in any way.
28+
29+
# Directory Structure
30+
31+
```
32+
├── assets
33+
│ ├── conversion -> contains platform conversion scripts
34+
│ │ ├── config -> contains main conversion scripts
35+
│ │ ├── intermediate -> temp directory for asset conversion
36+
│ ├── output -> will contain converted assets
37+
│ ├── source
38+
│ │ ├── shared -> source assets shared across all platforms
39+
│ │ ├── win -> windows only source assets
40+
│ ├── LICENSE -> the more restrictive license that applies to the assets
41+
│ ├── scripts.code-workspace -> the script VS Code workspace file
42+
│ ├── windows.xml -> asset database for the windows version of the game
43+
├── build
44+
│ ├── win -> contains the windows executable build
45+
├── config -> contains various configuration files for asset conversion and gamelauncher
46+
├── src
47+
│ ├── engine -> contains the Two Tribes engine. The main engine upon which our games were built
48+
│ ├── game -> contains game specific code. This code was used in our latest projects: Toki Tori 2+ and RIVE.
49+
│ ├── ttgame.sln -> the Visual Studio 2017 solution
50+
├── tools -> contains various tools required for the asset conversion
51+
└── .gitattributes
52+
└── .gitignore
53+
└── LICENSE -> a copy of the GNU GPLv2 license, under which this engine, except for the assets, is licensed
54+
└── README.md -> this readme file
55+
```
56+
57+
## Spaces and dots
58+
59+
Ensure the entire path does not contain any spaces nor dots. Some asset converters don't work well with those. Especially take care of that when downloading a release zipfile from github, as those zip filenames can contain dots.
60+
61+
## Virus & Threat Protection
62+
63+
After downloading this repository Windows Defender might interfere with asset conversion, as it can flag asset conversion executables for a threat scan. When that happens the conversion might stall for a while, waiting for Windows Defender to scan the executable. Asset conversion might not resume after such a stall, resulting in a permanent stall.
64+
65+
In that case simply run the conversion multiple times, until it is finished. After a successful run, Windows Defender has flagged the asset conversion executables as safe and a conversion stall won't happen again.
66+
67+
# Designers Instructions
68+
69+
## Installing RIVE font
70+
71+
First ensure to install the `RIVE.ttf` font located in `.\assets\fonts`, otherwise the conversion step will fail.
72+
73+
## Converting assets
74+
75+
All converters run on Windows. To convert all assets, simply run `.\assets\conversion\convert_win.bat` or `.\assets\conversion\convert_win_rebuild.bat`
76+
77+
Alternatively you can convert assets by using the TTTray and/or TTAssetMonitor applications.
78+
79+
## TT Tray
80+
81+
Two Tribes developed a small tray app that you can use to easily convert assets or boot up the game.
82+
83+
To use it first register the project configuration by running: `.\config\register_tray.bat`. This registers the information contained in `.\config\ttgame.tttray` with the `TTTray` application.
84+
85+
The TTTray application itself is located in `.\tools\tttray`.
86+
87+
To exit the app or reload the configuration file(s), hold shift while clicking on the tray icon and then select the now visible options.
88+
89+
## TT Asset Monitor
90+
91+
In addition to the TTTray application, Two Tribes developed a file watcher that can quickly convert modified assets. The game can load some modified assets on the fly, or by pressing `F5` ingame. That way you never need to close and reopen the game to see your changes.
92+
93+
To use it first register the project configuration by running: `.\config\register_filewatcher.bat`. This registers the information contained in `.\config\ttgame.ttassmon` with the `TTAssetMonitor` application.
94+
95+
The TTAssetMonitor application itself is located in `.\tools\ttassetmonitor`.
96+
97+
To exit the app, hold shift while clicking on the tray icon and then select the now visible exit option.
98+
99+
## Scripting
100+
101+
Most of the high level features of the game are programmed in [Squirrel](http://www.squirrel-lang.org). Just open the Visual Studio Code project in `.\assets\source\` to see what's possible. There are `nut` file extensions in the VS Code Marketplace to help you with syntax highlighting.
102+
103+
### Prerequisites
104+
105+
Any text editor would do fine, but VS Code is highly recommended.
106+
107+
# Coders Instructions
108+
109+
# Prerequisites
110+
111+
## Visual Studio 2017
112+
113+
- Get and install VS 2017:
114+
115+
https://visualstudio.microsoft.com/vs/older-downloads/#visual-studio-2017-and-other-products
116+
117+
## DirectX June 2010 SDK
118+
119+
- Get the following DirectX SDK:
120+
121+
https://www.microsoft.com/en-us/download/details.aspx?id=6812
122+
123+
- Only "Install DirectX Runtime" and "DirectX Headers and Libs" are required for installation. Ensure to uninstall any previous 2010 runtime version of DirectX, otherwise the installation might end up in a `S1023` error
124+
125+
- Verify that the `DXSDK_DIR` environment variable is set. This should've been done by the installer.
126+
127+
### Modify property sheets
128+
129+
Now we need to let Visual Studio know the location of this DirectX version.
130+
131+
- Go to `C:\Users\<username>\AppData\Local\Microsoft\MSBuild\v4.0`
132+
133+
- Open `Microsoft.Cpp.x64.user.props`
134+
135+
- Append `$(DXSDK_DIR)Include;` to `IncludePath`. Be sure to append at the END of the string.
136+
137+
- Append `$(DXSDK_DIR)Lib\x64;` to `LibraryPath`. Be sure to append at the END of the string.
138+
139+
`Microsoft.Cpp.x64.user.props` now looks something like this:
140+
141+
```xml
142+
<?xml version="1.0" encoding="utf-8"?>
143+
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
144+
<ImportGroup Label="PropertySheets">
145+
</ImportGroup>
146+
<PropertyGroup Label="UserMacros" />
147+
<PropertyGroup>
148+
<IncludePath>$(VC_IncludePath);$(WindowsSDK_IncludePath);$(DXSDK_DIR)Include;</IncludePath>
149+
<LibraryPath>$(VC_LibraryPath_x64);$(WindowsSDK_LibraryPath_x64);$(DXSDK_DIR)Lib;</LibraryPath>
150+
</PropertyGroup>
151+
<ItemDefinitionGroup />
152+
<ItemGroup />
153+
</Project>
154+
```
155+
156+
### Win32
157+
158+
Win32 support in the engine has been deprecated.
159+
160+
## Windows SDK
161+
162+
- Go to https://developer.microsoft.com/en-us/windows/downloads/sdk-archive/
163+
164+
- Locate and install Windows 10 SDK, version 1809 (10.0.17763.0). Newer versions can be used too, but then you need to retarget the SDK version of all projects.

assets/LICENSE

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
Personal Use Only License
2+
3+
All assets contained in these folders are copyrighted. All rights are reserved.
4+
You are allowed to personally use them to experiment with the engine and discover its possibilities.
5+
6+
Without our written permission you are not allowed to use them (nor any derivate work)
7+
in a product (free or commercially). Nor are you allowed to redistribute them in any way.

0 commit comments

Comments
 (0)