Skip to content
Open Source Real Time Strategy game based on Warfare Incorporated
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
AniMax initial commit Jul 7, 2014
BmpProof initial commit Jul 7, 2014
MarkVersion initial commit Jul 7, 2014
Schemer initial commit Jul 7, 2014
SpiffLib
StringTable initial commit Jul 7, 2014
TemplateExtractor initial commit Jul 7, 2014
acrunch initial commit Jul 7, 2014
aed initial commit Jul 7, 2014
amx2zamx initial commit Jul 7, 2014
ani2amx initial commit Jul 7, 2014
archive initial commit Jul 7, 2014
assets initial commit Jul 7, 2014
base Use delete[] for arrays allocated with new[]. Sep 1, 2016
bcr2 initial commit Jul 7, 2014
bcrunch
bin Make data assets buildable on Linux Jan 22, 2016
bscale initial commit Jul 7, 2014
data Add Nathan to help credits Sep 1, 2016
drmutil initial commit Jul 7, 2014
game Support maps that are smaller than the device screen Sep 1, 2016
inc Initial SDL-Android port Sep 1, 2016
inicrunch Make data assets buildable on Linux Jan 22, 2016
legacy initial commit Jul 7, 2014
m initial commit Jul 7, 2014
mpshared Use delete[] for arrays allocated with new[]. Sep 1, 2016
packpdb2 initial commit Jul 7, 2014
pal2act initial commit Jul 7, 2014
palbin initial commit Jul 7, 2014
paltool initial commit Jul 7, 2014
server Add null checks to fix server crashing Sep 1, 2016
shadowmap initial commit Jul 7, 2014
stats Track client platform version Sep 1, 2016
syncerror initial commit Jul 7, 2014
texpack initial commit Jul 7, 2014
utilities initial commit Jul 7, 2014
wavcrunch initial commit Jul 7, 2014
yajl Use scanf and printf compile time format string type checking; fix 64… Jan 10, 2016
.gitignore Update gitignore Sep 1, 2016
LICENSE.txt initial commit Jul 7, 2014
README.md Update readme Sep 1, 2016

README.md

About

Hostile Takeover is the open source release of the wildly popular mobile Real Time Strategy game Warfare Incorporated. Warfare Incorporated's developers, grateful for all the contributions of the open source community, are delighted to give something back.

Legal Stuff

Hostile Takeover and Warfare Incorporated are registered trademarks of Spiffcode, Inc the developers of Warfare Incorporated. Hostile Takeover is copyrighted 2004-2014 by Spiffcode, Inc. The Hostile Takeover source code is made available under the BSD open source license.

Building

Prerequisites

macOS and iOS Ports:

  • Mac OS X
  • Xcode 5 (or later) with Command Line Tools installed
    • Install Command Line Tools from Xcode Preferences... Downloads.

Android Port:

Building the Hostile Takeover Executable

iPhone Port:

  1. Within Xcode, open game/wi.xcodeproj.
  • Select a Build Configuration via Edit Scheme...Info
    • Debug (default). Has extra runtime checks and is typically used during development. Displays "DEV BUILD" and date on Hostile Takeover startup screen. The Debug version requires a local server to be running for multiplayer testing.
    • Release. W/o extra runtime checks. Displays date on Hostile Takeover startup screen.
    • Distribution. Same as Release but displays game database version number on Hostile Takeover startup screen.
    • Distribution-Store. Same as Distribution but is signed with a necessary key for redistribution in the iTunes App Store. NOTE: You'll have to get your own key if you want to distribute through the App Store.
    • Adhoc. ???
  • Build and run!
    • On your device or in the iOS Simulator.

SDL macOS and iOS Ports:

  • Within Xcode, open game/sdl/htsdl.xcodeproj.
  • Select a Build Configuration via Edit Scheme...Info
    • Debug (default) for development, has extra runtime cheacks and displays "DEV BUILD" and date on the game startup screen.
    • Release W/o extra runtime checks and displays game database version number on the game startup screen.
  • Select a Build Target:
    • HT - Desktop for building for macOS.
    • HT Mobile for building for iOS device or iOS simulator.
  • Build, and run on your target device!

Android Port:

  • Set desired app ABI in game/sdl/android/jni/Application.mk (default ABI is: all).
  • Add your NDK path to your environment variables export PATH=$PATH:[YOUR NDK PATH].
  • cd game/sdl/android.
  • For debug build: ndk-build. For release build: ndk-build REL=1.
  • Import the project into Eclipse if you have not already done so.
    • File > New > Other... > Android Project from Existing Code
    • Browse to the HT project at game/sdl/android and click finish.
  • Build and run!
    • To run on connected device in Eclipse: Hostile Takeover > Run As > Android Application
    • To build an .apk in Eclipse: File > Export... > Export Android Application > Hostile Takeover > Developer Keystore > Finish

Linux Port (WIP)

  • Run game/sdl/linux/install.sh to create the necessary directories and install the necessary packages.
  • cd game/sdl/linux/ and make or make REL=1.

Building the Hostile Takeover Data File

The Hostile Takeover iOS executable incorporates a data file, htdata832.pdb, which includes all the art, audio, and levels for the game. A prebuilt version of this data file is already in the source tree so you don't need to build it unless you are modifying assets it contains.

Originally all of Hostile Takeover was developed on Windows using Windows tools like Visual Studio and C#. To build the data file on the Mac, the cross platform Mono framework is used.

  1. Install the Mono runtime environment.
  • cd data
  • make IPHONE=1 MULTIPLAYER=1 clean all
    • some harmless warnings will be displayed
  • Mark the data file with a version number.
    • cd ../game
    • ../bin/markversion.exe 1 htdata832.pdb "+++VERSION+++" 1.6

Building and running the Hostile Takeover Multiplayer Server

Hostile Takeover supports single player and multiplayer play. Multiplayer is supported by two server components: a TCP based game server located in the server directory, and an HTTP based server located in the stats directory used for accounts, leaderboard, game history and game stats.

  1. The game server is a command line server which builds can be built and run on OSX or Linux. The game server is does not (currently) build and run on Windows. The production server environment is expected to be Linux based.
  • cd server
  • make REL=1 clean all (for a release build)
  • make clean all (for a debug build)

Please refer to the README.txt in the server directory for more detailed information on how to run the server environment in development and production.

Tools

The bin directory contains many command line tools used to build the htdata file. There are also GUI tools for editing maps (M) and animations (AniMax).

The GUI tools have primarily been used on Windows and are best described as 'flaky' on the Mac. If you want to give level editing a try on a Mac:

  1. mono bin/m.exe

See Building the Hostile Takeover Data File for instructions on how to rebuild the data file after making changes to any level, image, sound files or other game assets.

You can’t perform that action at this time.