Have you ever wondered what "White Hat Hacking" is all about? Try it yourself as the head of a white hat hacking company in What the Hack! Get started by hiring your first employee, buy your first computer and accept one of many generated missions. But it's not as easy as it sounds - each employee has it's strengths and weaknesses, so be sure to find the perfect mission for your team. While playing the game you'll learn a lot about IT security, hacking and prevention of cyber attacks.
What the Hack is a modular game. Creating extensions is easy with the free Unity Editor. Have a look at section Mod Development for more information.
- What the Hack is a platform
- Support for all kind of different extensions! (called Mods)
- Multiple difficulties: game content for everyone
- Interactive missions that test your knowledge
- Base Game
- The base game ships with a special employee and basic missions about IT-security
- Two game modes: Classic and Realtime!
- Classic: Just as every other game. Start it and enjoy! Automatic saving is included.
- Realtime: Even when you close the game, the game time passes. Without draining your battery. You’ll get notifications when your employees need your assistance!
Android: Download v1.0.4
Linux: Download v1.0.4
macOS: Download v1.0.4
Windows: Download v1.0.4
Desktop: Download v1.0
Android: Download v1.0
Source: GitHub Repository
Mod Creator: Download UnityPackage v1.0.4
Mod Assets: Download UnityPackage v1.0
Template for Addon-APK: GitHub Repository
On Android you can install special Addon-Apps, that contain extensions for What the Hack!
Mods are served as a zip file and contain a folder which needs to be copied to specific locations depending on your operating system.
- Android:
Android/data/com.github.geigi.wth/files/Mods/
(on external storage or SD card) - Linux & macOS & Windows:
Mods
directory side by side with the executable
Whether you want to contribute to the source code or you want to create a mod, the only thing you'll need is Unity v2018.3.7f1.
Important: You must use this exact version of Unity because What the Hack can only load Mods that are compiled with the same version as the base game.
There are three main components:
- The Main Game Unity project which is located in this directory.
- The Wth.ModApi and Wth.ModApi.Editor assemblies contain the addon API. They are located in the
Assets/Wth.ModApi
folder. - The AndroidPlugin Android Studio project which is located in the
AndroidPlugin
folder. It handles the installation and deinstallation of addon apps.
- Clone the repository
- Open Unity and the project folder
./
What the Hack allows all kinds of changes to the game. Each mod will be it's own game mode with unique names, employees, skills and missions. This allows you to create a mod with very specific learning content as well as new gameplay aspects. None of those modifications are mandatory. Here is a list of possible modifications:
- Create a specific set of skills (this is required for any of the following modifications)
- Create unique employees with custom sprites
- Create missions with custom actions for the player
- Create unique names that are used for employees and for placeholders in missions
- Implement multiple difficulty levels
- Before you create a mod, have a look at the development requirements.
- After installing Unity, create a new Unity Project and drag the
What_the_Hack Mod Tools.unitypackage
into the Editor. This package contains the API as well as the GUI tools to create new mods. - If you want to create interactive missions: Drag the
What the Hack Mod Assets.unitypackage
into the Editor. This contains prefabs for commonly used UI items like buttons, dropdowns, toggles, scroll views and all of the official sprites and fonts. - Create a
ModInfo
Scriptable Object:Assets > Create > What_The_Hack ModApi > Mod Info
. Each mod requires a unique ID and a banner image with the resolution 400*182. This scriptable object will be the gathering point for your content. If some content is missing when loading the mod, it probably isn't included in theModInfo
. - Get started by using the custom Employee, Skill, Mission and Name Creator GUIs which can be found under
Tools > What_The_Hack ModApi
. - All the content you generate from the Creators are stored in
Assets/Data
.
This chapter describes how to create custom missions. Creating Skills, Employees or Names is very similar to creating missions. Therefore there won’t be a section for each of the possible modifications.
- If you want to create custom missions, you first have to create a skill set in the Skill Creator. The missions you define use the skills from your custom skill set. If you want to use the default skill set, you can download it from this repository:
Assets/Data/Skills
. - Create a new mission list from the Mission Creator.
- Click on your
ModInfo
file and drag the freshly generatedMissionList
fromAssets/data
into the according field of theModInfo
. Otherwise your missions won’t load in What the Hack. - Add a new mission in the Mission Creator.
- Don’t forget to hit the Save button when you modified your missions.
Interactive missions have so called MissionHooks that define a interaction. Each mission can have multiple hooks. Each hook contains a GUI Prefab that will be displayed, as soon as the user opens the interaction window in the game. You can specify at which progress level a hook will be spawned.
Each interaction has only two outcomes: Success or Fail.
- Create a new
MissionHook
object:Assets > Create > What_The_Hack ModApi > Missions > MissionHook
- Define the spawn time in the inspector.
- Find the
HookTemplate
from theWhat the Hack Mod Assets
inAssets/Prefabs/
and duplicate it. - Open the prefab. You will see the UI in the Scene view of Unity. Remove the demo buttons from the scene graph.
- You can now create your own UI. Use the Elements you find in the
Assets/Prefabs/
folder. - The GUI is now created, but it doesn’t contain any logic. You have to report whether the interaction has finished successfully or not. If you use a simple dropdown or toggles to ask the user a question, you can use the included and generic
Verifier
Components from the Mod API:DropdownHookVerifier
andToggleHookVerifier
. Attach one of those components to the root object of your prefab. - If you want to create a more complex interaction, you can also write your own code. To do this, create a new Script. Instead of inheriting from
MonoBehaviour
, you must inherit fromModBehaviour
. You can use this class like anyMonoBehaviour
. If you forget to useMonoBehaviour
you won’t be able to export the mod.- Implement your desired logic. When the interaction is completed and you want to report the success/failure, you need the
MissionHook
object that contains this interaction. Just add it as a public variable and assign it in the inspector. To report success callHook.RaiseSuccess()
, for failure callHook.RaiseFailure()
. - Below you find a reference example:
- Implement your desired logic. When the interaction is completed and you want to report the success/failure, you need the
public class DropdownHookVerifier : ModBehaviour
{
public Button OkButton;
public Dropdown Dropdown;
public MissionHook Hook;
public List<int> ValidOptions;
private void Start()
{
OkButton.onClick.AddListener(Verify);
}
private void Verify()
{
if (ValidOptions.Contains(Dropdown.value))
Hook.RaiseSuccess();
else
Hook.RaiseFailed();
}
private void OnDestroy()
{
OkButton.onClick.RemoveListener(Verify);
}
}
- Now you have to assign your prefab to the
MissionHook
object you created at the beginning. Do this in the inspector. - Finally, you have to add your
MissionHook
to your mission. To do this, open the Mission Creator and add your hook.
- To export your mod, go to
Tools > ModTool
. - Define a mod name, author, description and version number. Also select, for which platforms you want to export the mod.
- Finally select the content you want to export. What the Hack doesn’t support custom Scenes. Therefore you can deselect them. Also deselect Code if you didn’t create any custom code. Otherwise the mod will not work properly.
- Set a output directory.
- Hit
Export
!
Each ScriptableObject you define (the files in the Assets/Data
folder) need to be referenced in a ScriptableObjectDictionary
. This file is created automatically and also managed automatically by the Creator windows. If something goes wrong have a look at this dictionary and whether every ScriptableObject from your mod is included here. Otherwise open the according Creator and click Save. This should fix the problem in most cases.
- Game does not open when tapping on a notification (Android). This is a bug in the Unity Mobile Notifications package.
- Hendrik Schulte (@hendrik-schulte)
- Florian Kaulfertsch
- Dominik Köhler
- Tobias Melzer (@tobias-melzer)
- Prof. Dr. Holger Schmidt
The following third party libraries are used by this game:
- 2d-extras - MIT
- Asset Bundle Browser (not included in build) - Unity Companion License
- Legacy Image Effects - No Licence
- Unity Enhanced - MIT
- ModTool - MIT
- KinoGlitch - No licence
- unityglitch - Creative Commons Attribution 3.0 Unported
- NSubstitute - BSD Licence
- Pathfinding - MIT
sf3-sfx-menu-select.wav by broumbroum freesound.org