Skip to content

Shooter Game for Arcade Cabinet

Notifications You must be signed in to change notification settings

rdappel/ArcadeShooter

Repository files navigation

Arcade Shooter

screenshot


Shooter Game for Arcade Cabinet

GitHub stars


About the Project

GitHub issues GitHub issues

The Arcade Shooter is currently split into the four projects described below:

Project Description Namespace API
Katana Engine Katana Engine is a library of classes, interfaces, and value types that provides a foundation for developing two-dimensional games in C++. Katana Engine API
Shooter Library Shooter Library is a library of classes, interfaces, and value types that provides a foundation for developing shoot 'em up style games. Shooter Library API
Guardian Final Zero Guardian FZ it the main game that will be playable at launch.
Note: Guardian FZ is not included in the documentation.
N/A
Sample Sample is a sample game to use as a template for creating your own games utilizing the Katana Engine and Shooter Library. Sample API

Getting Started

GitHub forks GitHub stars

To get started, fork this project to your Github account. Then setup your own project by following the steps below.

Setup Tutorial:

Create your Game Project (Click to Expand):
  • Open up the Arcade Shooter solution in Visual Studio.
  • In the Solution Explorer you will see two folders; Games and Libraries.

solution_explorer

  • Right-click on the Games folder, and select Add > New Project...
  • Select Visual C++ (on the left) and select the Empty Project type.
  • Next, enter the name of your game, and click OK.

add_new_project

You now have your own project! But, there's still some setup to do... Katana Engine is built upon a graphics library called Allegro. Luckily, there is a NuGet package for it, so installation is pretty simple:


Install and Setup Allegro (Click to Expand):
  • In the Solution Explorer, right-click on your project, and select Manage NuGet Packages.
  • Click Browse, and search for "allegro".

nuget_allegro

  • Select the latest Allegro 5 package.
  • Make sure that the Latest Stable version is selected, and click install. You may have a "Review Changes" box pop-up. Just click OK.
  • Right-click on your project again (in the Solution Explorer), and select properties.
  • Expand Allegro 5 (on the left) and select Add-ons, and then change all the Addon values to "Yes."

allegro_addons

  • Click OK.

Okay, Allegro is all ready to go! Now, let's write a little code:


Create an entry point, and link to Katana Engine and Shooter Library (Click to Expand):
  • Within your project, locate the Source Files folder.
  • Right-click on it, and select Add > New Item...
  • Name the file Main.cpp, and click Add.

add_main

  • Then type (or copy/paste) the following line:
int main() { return 0; }
  • Now, let's build the solution. There are a number of ways to do this. I find Ctrl + Shift + B to be the quickest.
  • After building, we will now have an additional section in the project settings (Right-click on your project and select properties).
  • Notice, the C/C++ area? Click on General, and next to Additional Include Directories add the following:
..\ShooterLibrary;..\KatanaEngine;

additional_include

  • Click OK.
  • Next, we need to add a couple of project references. Right-click on your project and select Add > Reference...
  • Check the checkboxes next to Katana Engine and Shooter Library.

add_references

  • Click OK.

Now you can incorporate all of the code from both of those projects! Last step in this tutorial:


Create and Run your Game class: (Click to Expand):
  • Add another item to your project (Right-click, Add > New Item...).
  • This time it needs to be a header file.

add_game_header

  • Click Add.
  • Copy and paste the following code:
#pragma once

#include "ShooterLibrary.h"				// Include the shooter library code!

class MyGame : public ShooterLibrary::Game		// "MyGame" inherits from the Shooter Game
{
public:

	virtual ~MyGame() { }

	virtual std::string GetName() const { return "My Game!!!"; }

};
  • Switch over to Main.cpp and change the code to:
#include "MyGame.h"

int main() { return (new MyGame())->Run(); }
  • To run your game, you'll need to set it as the "Startup Project." This can be found under the Project Menu (Project > Set as Startup Project).
  • Press F5 to Build and Run!

Okay, I admit it. It's not too exciting. However, your game is running, and (as proof) you can see the name in the title bar.

More tutorials to come! In the mean time, look at the Sample game code (found in the solution), and the documentation (found below).


Documentation

Arcade Shooter Documentation

Arcade Shooter Documentation

Documentation is generated using Doxygen.

About

Shooter Game for Arcade Cabinet

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published