haakon023 / VikingGame

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Viking Stop

A simple survival game where you defend yourself from angry vikings trying to steal all your gold. Created for desktop and android users with the libGDX game engine.

This game was developed by students at NTNU in Trondheim, while taking the course TDT4240 - Software Architecture. MainMenu

Table of Contents

  1. Game Description
  2. Engine, Frameworks and Technology
  3. How to Install and Run the Project
    1. Requirements
    2. Obtaining the Code
    3. Running the Game
  4. How To Use the Project
    1. The Main Menu
    2. Editing Profile
    3. Tutorial
    4. Practice Mode
    5. Multiplayer
    6. Leaderboard
  5. Developed by
  6. Licence
  7. Structure

1 Game Description

The game is a ”who can survive the longest” online multiplayer game. The game is based on the battle of Lindisfarne, the first ever Viking raid in 793. The goal of the game is to defend your monastery from the approaching Vikings who are trying to pillage your island and steal your gold. You and your friend competes in real-time on who can hold off the Viking onslaught longest, in a survival-style multiplayer duel. You and your friend will each play a fearsome monk who shoots arrows to sink the approaching Viking ships. If you are attentive enough, you can try to catch the moving power-ups and unlock short-term abilities for your monk. Once the Vikings ships reach the shore, they begin their attack and deal damage to your monastery. Both you and your opponent’s monastery’s health are indicated through a health bar. Each player will in addition to having its own health bar shown at the screen, also have its opponent health bar showing. The player whose health bar runs out first is looted by the Vikings. They steal your gold and you lose the game.

2 Engine, Frameworks and Technology

Engine: libGDX
ECS: Ashley
Physics Engine: Box2D
Development Environment: Android Studio
Server Environment: Firebase

3 How to Install and Run the Project

3.1 Requirements

In order to run the application you will need an IDE (like Android Studio or IntelliJ). The minimum API level required to run the game is 19. You may also run the game through an emulator, such as the one that Android Studio includes.

3.2 Obtaining the Code

Once you have your IDE downloaded, you may now download the code. Firstly, make your way into your chosen folder through a terminal window. You can then clone into the code by using:

git clone https://github.com/haakon023/VikingGame.git

Now open your IDE, select your chosen game folder in the IDE, and click open.

3.3 Running the Game

Now you may run the code through an emulator, or through your Android device with API level 19 or higher. It might take some seconds running it for the first time. See below for a step-by-step guide on both methods.

3.3.1 Using an Android device

  1. Use an USB-cable to connect your phone to the computer that will run the code.
  2. Allow permissions needed on your device for the computer to run code on it.
  3. On your computer, under Connected Devices select your chosen device.
  4. Select the OK button and run the game with the play button (to the right, or in the bottom left corner).

3.3.2 Using an Emulator

  1. Select AVD manager from the drop down menu at the top.
  2. Press + Create Virtual Device...

new emulator

  1. Pick a device (e.g. Pixel 2). Press the Next button.

select hardware

  1. Now select a x86 system image. R is a good choice, for example. Download it.

system image

  1. Press Next after the download has finished. The final screen should look something like this:

avd

  1. Press Finish.
  2. Now make sure that your new emulated device is set at the top of your IDE (next to the run button).
  3. Press the run button, wait for your emulator to start, and the game should launch.

4 How to Use the Project

4.1 The Main Menu

The main menu will be the first screen you reach when launching the application. From here you can choose between the tutorial, practice and multiplayer mode.
MainMenu

4.2 Editing profile

To edit your profile tap the avatar in the center of the main menu. Here you may change your avatar and name!
editProfile

4.3 Tutorial

The tutorial will guide you through the basics on how the game works. It is recommended to go through it once.
Tutorial

4.4 Practice mode

In practice mode you are able to fine tune your abilities. This also works as a single player mode.
PracticeMode

4.5 Multiplayer

In order to play multiplayer first select 'Host Game' on the main menu. You will then be put in to a lobby:
GameLobby

After creating a game lobby, have your opponent enter the game PIN displayed on the screen. Then start the game!
EnterPin

The first one to lose all their health loses the game!
MultiplayerIngame

4.6 Leaderboard

The leaderboard can be displayed by clicking the 'crown' button on the main menu screen.
Highscore

5 Developed by

Kristian Zunder Edvardsen
Håkon Finstad
Linnea Fossum Gustavsen
Sascha Pascal Meyer
Cornelius Emil Rebmann
Signe B. Thrane-Nielsen
Caio Wiebers

6 Licence

MIT Licence

7 Structure

 |-- android
    |   |-- AndroidManifest.xml
    |   |-- build.gradle
    |   |-- google-services.json
    |   |-- ic_launcher-web.png
    |   |-- proguard-rules.pro
    |   |-- project.properties
    |   |-- src
    |       |-- group22
    |           |-- viking
    |               |-- game
    |                   |-- AndroidInterfaceClass.java
    |                   |-- AndroidLauncher.java
    |-- assets
    |   |-- fonts
    |   |   |-- Roboto.ttf
    |   |-- i18n
    |   |   |-- app.properties
    |   |   |-- app_de.properties
    |   |   |-- app_en.properties
    |   |   |-- app_no.properties
    |   |-- img
    |   |   |-- arrow-dummy.png
    |   |   |-- arrow.png
    |   |   |-- badlogic.jpg
    |   |   |-- bow.png
    |   |   |-- castle.png
    |   |   |-- energy_potion.png
    |   |   |-- GoatIcon.png
    |   |   |-- HealthBarFilling.png
    |   |   |-- healthBarFrame.png
    |   |   |-- health_potion.png
    |   |   |-- Island.png
    |   |   |-- KnightSprite.png
    |   |   |-- KnightSpriteHead.png
    |   |   |-- leaderboardButton.png
    |   |   |-- legolas.png
    |   |   |-- LegolasHead.png
    |   |   |-- medal.png
    |   |   |-- Monastery.png
    |   |   |-- mutedButton.png
    |   |   |-- OceanBack.png
    |   |   |-- OceanTop.png
    |   |   |-- Questionmark.png
    |   |   |-- RobinHoodSprite.png
    |   |   |-- RobinHoodSpriteHead.png
    |   |   |-- rubberDuck.png
    |   |   |-- stopHeader.png
    |   |   |-- unmutedButton.png
    |   |   |-- vikingHeader.png
    |   |   |-- vikingShip.png
    |   |   |-- VikingShipFull.png
    |   |   |-- VikingShipHull.png
    |   |   |-- VikingShipRuder.png
    |   |   |-- VikingShipSail.png
    |   |   |-- vikingShipSpecial.png
    |   |   |-- WarriorWomanSprite.png
    |   |   |-- WarriorWomanSpriteHead.png
    |   |   |-- WaveBottom.png
    |   |   |-- waveDark.png
    |   |   |-- waveLight.png
    |   |   |-- waveMedium.png
    |   |   |-- WaveTop.png
    |   |   |-- waveVeryLight.png
    |   |   |-- WizardSprite.png
    |   |   |-- WizardSpriteHead.png
    |   |   |-- WizardSpriteSurprised.png
    |   |-- sound
    |   |   |-- gameMusic.mp3
    |   |   |-- lobbyMusic.mp3
    |   |   |-- menuMusic.mp3
    |   |   |-- mumble.wav
    |   |   |-- soundBowFire.mp3
    |   |   |-- soundButton.mp3
    |   |   |-- soundError.mp3
    |   |   |-- soundGoat.mp3
    |   |   |-- soundSwish.wav
    |   |-- ui
    |       |-- uiskin.atlas
    |       |-- uiskin.json
    |       |-- uiskin.png
    |-- core
    |   |-- build.gradle
    |   |-- src
    |   |   |-- group22
    |   |       |-- viking
    |   |           |-- game
    |   |               |-- controller
    |   |               |   |-- GameStateManager.java
    |   |               |   |-- VikingGame.java
    |   |               |   |-- controllers
    |   |               |   |-- ECS
    |   |               |   |   |-- factory
    |   |               |   |   |   |-- AbstractFactory.java
    |   |               |   |   |   |-- PlayerFactory.java
    |   |               |   |   |   |-- PowerUpFactory.java
    |   |               |   |   |   |-- ProjectileFactory.java
    |   |               |   |   |   |-- TextureFactory.java
    |   |               |   |   |   |-- VikingFactory.java
    |   |               |   |   |-- input
    |   |               |   |   |   |-- InputController.java
    |   |               |   |   |-- systems
    |   |               |   |   |   |-- AnimationSystem.java
    |   |               |   |   |   |-- CollisionSystem.java
    |   |               |   |   |   |-- HomingProjectileSystem.java
    |   |               |   |   |   |-- LinearProjectileSystem.java
    |   |               |   |   |   |-- PhysicsDebugSystem.java
    |   |               |   |   |   |-- PhysicsSystem.java
    |   |               |   |   |   |-- PlayerControlSystem.java
    |   |               |   |   |   |-- RenderingSystem.java
    |   |               |   |   |   |-- TutorialVikingSystem.java
    |   |               |   |   |   |-- VikingSystem.java
    |   |               |   |   |-- utils
    |   |               |   |       |-- BodyFactory.java
    |   |               |   |       |-- ColliderListener.java
    |   |               |   |       |-- ZComparator.java
    |   |               |   |-- states
    |   |               |       |-- AbstractInformationOverlayState.java
    |   |               |       |-- AbstractPlayState.java
    |   |               |       |-- GameOverState.java
    |   |               |       |-- LeaderboardState.java
    |   |               |       |-- LoadingState.java
    |   |               |       |-- LobbyState.java
    |   |               |       |-- MenuState.java
    |   |               |       |-- OfflinePlayState.java
    |   |               |       |-- OnlinePlayState.java
    |   |               |       |-- ProfileSettingsState.java
    |   |               |       |-- SplashState.java
    |   |               |       |-- State.java
    |   |               |       |-- TutorialInterruptState.java
    |   |               |       |-- TutorialPlayState.java
    |   |               |-- firebase
    |   |               |   |-- FirebaseInterface.java
    |   |               |   |-- collections
    |   |               |   |   |-- FirebaseCollection.java
    |   |               |   |   |-- LobbyCollection.java
    |   |               |   |   |-- PlayerStatusCollection.java
    |   |               |   |   |-- ProfileCollection.java
    |   |               |   |-- exceptions
    |   |               |   |   |-- FieldKeyUnknownException.java
    |   |               |   |-- listeners
    |   |               |       |-- OnCollectionUpdatedListener.java
    |   |               |       |-- OnGetDataListener.java
    |   |               |       |-- OnPostDataListener.java
    |   |               |-- models
    |   |               |   |-- Assets.java
    |   |               |   |-- ECS
    |   |               |   |   |-- components
    |   |               |   |       |-- AnimationComponent.java
    |   |               |   |       |-- B2dBodyComponent.java
    |   |               |   |       |-- CollisionComponent.java
    |   |               |   |       |-- HomingProjectileComponent.java
    |   |               |   |       |-- LinearProjectileComponent.java
    |   |               |   |       |-- PlayerComponent.java
    |   |               |   |       |-- PowerUpComponent.java
    |   |               |   |       |-- StateComponent.java
    |   |               |   |       |-- TextureComponent.java
    |   |               |   |       |-- TransformComponent.java
    |   |               |   |       |-- TypeComponent.java
    |   |               |   |       |-- VikingComponent.java
    |   |               |   |-- firebase
    |   |               |   |   |-- FirebaseDocument.java
    |   |               |   |   |-- documents
    |   |               |   |       |-- Lobby.java
    |   |               |   |       |-- PlayerStatus.java
    |   |               |   |       |-- Profile.java
    |   |               |   |-- powerups
    |   |               |       |-- HealthPowerUp.java
    |   |               |       |-- IPowerUp.java
    |   |               |-- view
    |   |                   |-- ErrorDialog.java
    |   |                   |-- InformationOverlayView.java
    |   |                   |-- LeaderboardView.java
    |   |                   |-- LoadingView.java
    |   |                   |-- LobbyView.java
    |   |                   |-- MenuView.java
    |   |                   |-- PlayView.java
    |   |                   |-- ProfileSettingsView.java
    |   |                   |-- SoundManager.java
    |   |                   |-- SplashView.java
    |   |                   |-- View.java
    |   |                   |-- ViewComponentFactory.java
    |   |-- test
    |       |-- group22
    |           |-- viking
    |               |-- game
    |                   |-- ECS
    |                   |   |-- components
    |                   |       |-- PlayerComponentTest.java
    |                   |-- states
    |-- gradle
    |   |-- wrapper
    |       |-- gradle-wrapper.jar
    |       |-- gradle-wrapper.properties

About

License:MIT License


Languages

Language:Java 100.0%