Barebones scripting tutorial

This section contains tutorials for how to set up a completely skeletal template. The scripts and templates in this section also go by the name t3d-bones. This page is based on the tutorials originally found in this repository.

Note that these tutorials are so far incomplete and are about to undergo a large refactor.


t3d-bones provides an almost completely minimal example of how to start the T3D engine, load a level and create a camera to view it through. Oh, and the console is still there, but removing it is as simple as removing one line of code. The template has been structured as little as possible, but I found that moving it towards a modular format helped make the code understandable. Therefore:

  • main.cs handles engine initialisation, loads up the console, and finally the base game.
  • lib/ contains script libraries. At this moment, all it contains is the console GUI, and the stock post-effects.
  • All game-related info (i.e. object creation) is defined in game/ , which is also where the art lives.
  • System initialisation (i.e. graphics and sound) lives in sys/ . Don't go in there. It's terrifying.
  • Each folder in tutorials/ is like a custom game/ folder specific to some learning goal.

Setting up

Want to start your own project based off t3d-bones ? Awesome! To get started, you can download a zip of this repository with binaries from the releases page (7MB). If you're a git user, you can also just clone this repository somewhere:

git clone myAwesomeGame

And if you don't want the tutorials, you can just delete the folder:

rm -rf myAwesomeGame/tutorials

In the interests of keeping the repository small and focused on the scripts, there are no binary files included. You can either copy them from your main T3D installation, or download one of the releases. And you're ready to go!


Basic level
Flying camera
FPS Player
Simple weapon
AI player intro

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License