Sample Games
We've included some sample games to get you started:
- IntroGame - a set of modular demos that show off specific bits of Angel functionality. Each demo displays the relevant code or config files so if you see something you like, you know right where to find it. We recommend you start here.
- ClientGame - A good point for you to start your own game -- it already has all its paths and includes set up properly, and initiates the engine with nothing in the world but a simple grid to help you place objects. Use the build.ini file to change the name of your published executable rather than changing the solution properties. That will make it easier to merge changes later.
Setup
We've taken pains to make it pretty quick to get up and working with Angel. There are some prerequisites, however.
Note that on both platforms it's probably best to put the code on some path that doesn't have spaces, just to avoid weirdness.
Windows
- You'll get the best results from Visual Studio 2008 -- that's what we use to build and test. We've heard anecdotal evidence that people have gotten it to work with the 2010 version, but you're on your own there. It builds splendidly with Visual Studio Express.
- You'll also need to install the DirectX SDK, or resign yourself to not being able to use the 360 controller. (The whole project also won't compile out of the box, but you can disable the offending portions.) You can get the DirectX SDK from Microsoft.
- When building your game in Release mode, a "Published" directory is created. This contains all libraries, resources, documentation, etc. and is appropriate for zipping up for distribution.
- Angel has only been tested on Windows XP and Windows 7. It could and should work with Vista, but why would you bother?
Mac
- Install the OS X Development tools, available from the Extra Installs disc that came with your computer (prior to Lion), or from the Mac App Store. You'll need both Xcode and the command line tools (which can be installed from the Downloads section of the Xcode preferences).
- Install MacPorts from its website. We'll use this to install a working version of SWIG.
- Two choices now. Do one of:
- Do some manual installations:
- You'll need to install the kernel extension that exposes the Xbox 360 controller as a HID Input device. You can download it from its website, but it's also included in the Tools directory if, for whatever reason, that site ever goes under. Also, anyone who wants to play your game will need that installed as well.
- Install SWIG using MacPorts. Open the terminal and run: sudo port install swig-lua
- Run a prepared script that will do those installations for you. Open your terminal, navigate to the Code/Angel directory, and run: sudo ./nix-prereqs.sh
- Angel is set to build on Mac OS X Lion (10.7). It could and should work with earlier versions, but would probably require some tweaking of the build process.
Linux
- Check the README.Linux file in the Code directory. We've set up some pretty basic Makefiles that should get you started compiling the basic games.
- If you run nix-prereqs.sh in the Code/Angel directory, it will install the prerequisite development packages using your distribution's package management system.
- Angel is tested on the latest versions of Ubuntu and Fedora, as they're released. Any other distributions, you're on your own. (If anyone feels strongly about another distribution and wants to help us maintain it there, feel free to get in touch.)
iOS
- Follow the same setup directions as you did for the Mac build. There's a separate Xcode project file for the iOS build.
- There are some differences in how to build a project for iOS from the desktop projects:
- We only support loading PNG files as textures on iOS, so make sure all your resources have been converted.
- Because of the way iOS apps are structured, the main() function is taken over by the base engine. So take any setup that you used to do in main() and move it to the iPhoneMain.cpp file.
- You can't set the resolution of the game -- it will always be the native resolution of your device (480x320 on pre-retina iPhones and iPod touches, 960x480 on retina displays, and 1024x768 on the iPad).
- There's no console available in the iOS build.
- It should go without saying, but just so we're clear, there's no support for the 360 controller on iOS.
- Otherwise, you should be able to just add the same source files you used for the desktop build to the iOS project and be good to go.
- There's more detailed information on iOS support in the documentation.
For the Mac, if you don't want to install MacPorts?, you can download, compile, and install SWIG yourself using the standard configure/make/make install. If you leave the default install location when you configure it [/usr/local/bin/swig], you'll have to change SWIG_PATH in Angel-2.0/Code/Tools/BuildScripts?/swig_wrap.py line 52.