Giter Club home page Giter Club logo

knights-adventure's Introduction

Knight's Adventure

Knight's Adventure is 2D side-scroller platformer game made with Unity for PC

This game is a project I made to learn a new technology and improve myself during my IT internship in 2021. In this first serious game I designed using the Unity game engine, Sprite Sheets are taken from open source sources from the internet, but there is no problem for personal use.

Table of Contents

(Click to Expand or Hide)
  1. Opening/Title Screen
    1. Language Screen
    2. Key Bindings Screen
  2. Main Character
    1. Anim Cycle
  3. Level - 1
    1. Enemy Objects at Level - 1
  4. Level - 2
    1. Enemy Objects at Level - 2
  5. HUD
    1. Paused Screen
    2. Health Bar
    3. Coin Canvas
  6. Collectibles
    1. Coin
    2. Health Potion
  7. Camera Follow System
  8. Contact

Opening/Title Screen


Language Screen


There are 2 language options in the game, one of them is Turkish and the other is English. The language is changed instantly when the buttons are clicked. The system I use for this localization process is Lean Localization.

Key Bindings


Main Character


Anim Cycle


Level - 1


Enemy Objects at Level - 1

Level - 2


Enemy Objects at Level - 2

HUD

There are 3 elements on the screen as the HUD Screen. These are Pause Button, Health Bar and Coin Canvas.

Paused Screen


Resume, Restart and Exit operations can be performed in this menu that opens when the Pause Button is clicked.

 public void RestartGame(){
      Scene scene = SceneManager.GetActiveScene();
      SceneManager.LoadScene(scene.name);
      Time.timeScale = 1.0f;
 }

public void PauseGame(){
    isGamePaused = !isGamePaused;

    if (isGamePaused == true){
        Time.timeScale = 0.0f;
        pauseGame.SetActive(true);
    }
    else{
        Time.timeScale = 1.0f;
        pauseGame.SetActive(false);
    }     
}

public void ExitGame(){
    SceneManager.LoadScene("Scenes/OpeningScene");
    Time.timeScale = 1.0f;
}

Health Bar


The area where the health status of our character is displayed on the screen.

  void UpdateUI(){
      healthBar.value = player.currentPlayerHealth;
      if (player.currentPlayerHealth <= 0)
          healthBar.minValue = 0;
  }

Coin Canvas


The area where the amount of coin collected by our character is displayed on the screen.

Collectibles

There are 2 collectible objects in the game. These are coin and health potions.

Coin


The coin found at different points in the game, instead of appearing on the screen in a fixed way, has a more pleasant appearance by making a rotation animation around itself.

Health Potion


This object, which helps to increase the health of our character, can be found in various parts of the game.

  void BoostHealth(){
      if (addHealth)
      {
          currentPlayerHealth += giveHealth.health;
          addHealth = false;
          audioSource.PlayOneShot(audioHealth);
      }
  }

Camera Follow System

I used a package called Cinemachine for our character to be followed by the camera.


Information

Batuhan Demiray

Pamukkale University - Computer Engineering

Contact Me on Linkedin | Facebook

knights-adventure's People

Contributors

batuhandemiray avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

sinqz

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.