Open Source Real Time Strategy game based on Warfare Incorporated

Overview

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 might also like...
CardGameEngine - Prototyping a game engine for the Bang card game
CardGameEngine - Prototyping a game engine for the Bang card game

CardGameEngine Prototyping a game engine for the Bang card game. Features Engine is open source Powerful scripting language using JSON Card design is

Open source release of Canabalt for iOS

Open source release of Canabalt for iOS

iOS association game chatbot. AI based on neural word embedding language model. Image recognition with convolutional neural net.
iOS association game chatbot. AI based on neural word embedding language model. Image recognition with convolutional neural net.

AssociationBot ##iOS association game chatbot. UI based on JSQMessagesDemo. Association database created with the help of Word2Vec neural word embeddi

A physics-based cocos2d iOS game

CastleHassle License Copyright (c) 2010-2014 Castle Hassle Permission is hereby granted, free of charge, to any person obtaining a copy of this softwa

PokéMon like game on iOS with Location Based Service.

iPokeMon (iOS Client: Master) Description About Project iPokeMon is a project that try to implement the PokéMon game on iOS with Location Based Servic

RTS game based on the famous warcraft serie
RTS game based on the famous warcraft serie

RTS RTS game based on the famous warcraft serie Copyright (C) 2021 Vinwcent Introduction This game is the alpha of a small RTS which works with Gamece

This is a word scramble game where you get points based on what words you can spell out of a root word.
This is a word scramble game where you get points based on what words you can spell out of a root word.

WordScramble This is a word scramble game where you get points based on what words you can spell out of a root word. This app was part of my SwiftUI c

XCode and Swift game based on the generation of random cards and some functions related to the comparison of the results.
XCode and Swift game based on the generation of random cards and some functions related to the comparison of the results.

war-card-game-V1 XCode and Swift game based on the generation of random cards and some functions related to the comparison of the results. Once a card

 Palico Engine: Metal-Based Game Engine in Swift 🐑
Palico Engine: Metal-Based Game Engine in Swift 🐑

Palico Engine: Metal-Based Game Engine in Swift 🐑 Implement a game engine on macOS using Metal API. Still in development. Currently I am working on a

Comments
  • How about the server?

    How about the server?

    I've downloaded the android version and tried the game, and it's fine:) But Multiplayer mode is not working for me. I don't know if it's a network problem(I'm in China, Chinese network has a firewall which blocks google,fb and something else xD) or ur server has down. So why not let players ourselves to create our own servers? This would actually make this okd game live longer.

    opened by KevinMX 2
  • Graphic output and touch input on wrong place

    Graphic output and touch input on wrong place

    Hey!

    I was happy to find the source code of this game here. But when I tried to run the game in the simulator, the game wasn't displayed at the right position. And even the "input field" isn't correct. I mean the coordinates of the touch event are interpreted wrong. In this image I marked the position where I have to touch to get the play- and option button ressed, so you can see what I mean: error (The white boxes aren't exact in size and position, but close enough)

    I'm using the newes Xcode 6.3 (6D570), but didn't change anything. Just downloaded and run.

    Did I do something wrong? Or is this a bug?

    opened by oobenland 2
  • Web/HTML version of Warefare Incorporated?

    Web/HTML version of Warefare Incorporated?

    What an excellent project. Is there open source codes for the Web/HTML version of Warefare Incorporated? Also, the https://play.warfareincorporated.com/ does not work at the moment.

    opened by knyipab 1
  • Game does not compile on Linux out of the box for several reasons

    Game does not compile on Linux out of the box for several reasons

    First of all, you hardcode "g++-5" in game/sdl/linux/makefile To continue compilation I had to remove -5 from several places on top of the make file so that executable is just "g++".

    Then build has stopped because of missing #include <stdio.h> in several files: game/httppackinfomanager.cpp with error: 'fopen' was not declared in this scope game/httppackmanager.cpp:54:51: error: 'fopen' was not declared in this scope mpshared/packinfomanager.cpp:43:54: error: 'fopen' was not declared in this scope mpshared/indexloader.cpp:12:38: error: 'fopen' was not declared in this scope

    Next problem was:

    ../../gameform.cpp:4:30: fatal error: game/Multiplayer.h: No such file or directory compilation terminated. ../../Multiplayer.cpp:2:30: fatal error: game/Multiplayer.h: No such file or directory compilation terminated. In fact this file does not exist, however file game/multiplayer.h does. So changing this two files to multiplayer.h did work.

    After those five files the game compile successfully.

    Another problem is with file game/sdl/linux/install.sh It uses if ! dpkg -l | grep libsdl2-dev > /dev/null ; then This line which would only work in distributions based on deb packages, such as Debian and Ubuntu but not in other distributions. I think it's better to say that SDL2 is required for building and recommend to install this two packages: libsdl2-dev libcurl4-openssl-dev in your readme file

    (though in my distribution -dev packages are not separated from main packages)

    opened by Arcanister 5
Owner
Spiffcode
Spiffcode
DropColour - Open-Source Arcade Game for iOS

DropColour - Open-Source Arcade Game for iOS iOS project written in Swift 3.1 during several hackathons at EL Passion. DropColour is an arcade game in

EL Passion 175 Jan 3, 2023
Open Source release of the code for the iOS retro 80s platform game Loot Raider

Loot Raider iOS v1.7 (c) 2018 Infusions of Grandeur - Written By: Eric Crichlow Background Loot Raider is the "spiritual successor" to a game named "G

Eric Crichlow 9 Feb 9, 2022
🦁 🃏 📱 An animal matching puzzle card game– built with turn-based game engine boardgame.io and React-Native + React-Native-Web

Matchimals.fun an animal matching puzzle card game ?? ?? ?? Download for iOS from the App Store ?? Download for Android from the Google Play Store ??

iGravity Studios 137 Nov 24, 2022
Kill The Snake - second life for all time classic game

KillTheSnake Kill The Snake - second life for all time classic game Snake is almost 40. It was cloned many times, but core rules remained about the sa

Valery Sigalov 0 Oct 25, 2021
Chess Timer - Time calculation application developed for chess game

Chess Timer Satranç oyunu için geliştirilmiş süre hesaplama uygulaması

Nurşah ARİ 0 Jan 8, 2022
A little arcade game that uses SwiftUI as a game engine.

SwiftUI Game A little arcade game that uses SwiftUI as a game engine :) Just copy the code into the Blank playgroundbook in Swift Playgrounds app on i

Roman Gaditskiy 10 Sep 30, 2022
Switshot is a game media manager helps you transfer your game media from Nintendo Switch to your phone, and manage your media just few taps.

Switshot is a game media manager helps you transfer your game media from Nintendo Switch to your phone, and manage your media just few taps.

Astrian Zheng 55 Jun 28, 2022
Gravity Switch - A dynamic game that integrates swiping and tapping to create a fun interactive game

GravitySwitch Gravity Switch is a dynamic game that integrates swiping and tappi

null 3 Nov 19, 2022
IOS Spin Game - A simple spin game using SwiftUI

IOS_Spin_Game A simple spin game using Swift UI.

Md. Masum Musfique 4 Mar 23, 2022
FlagGuess-Game - A game to collect points by guessing flags

Flag Guess Game A game to collect points by guessing flags! Wrong Choice

Ahmet Onur Sahin 3 Apr 18, 2022