top of page

Final Project - Necessities?

Summary:

Necessities? is a 2D unity platform game questioning the thought of what is a necessity in life. In life, we're geared towards being a good person, getting an education, getting straight A's. I never questioned this much when I was younger, I just listened to my parents and went to school and followed rules. Like why did we have to say the pledge of allegiance to the American flag in school? Why do we need to go to college to be successful? Is any of that really necessary? Do we ever need to really do anything? Necessities? is a game that stimulates the thought of "What is necessary?" in simpler terms. It is interesting because everyone has a different take on what is necessary in life.

 

What is a necessity to you? 

 

 

Inspiration:

Growing up, I have always been playing or watching others play video games. I remember the first game I played was first MapleStory, then DS console games like Bomberman Land Touch! In addition, a game that influenced the style of my game is a popular game, The Binding of Isaac: Rebirth. I always preferred games that had a story or a hidden moral, to action or fighting games. 

 

Thus, a thought that had stuck with me throughout college is "What is necessary and what isn't?" People around me always say that I need to get a good grade in college order to be successful. I need a high paying job to be happy. I need an internship. Something that I realized is that in a year's time, what I thought I needed today is completely irrelevant. If that's the case, then why do I have to get so stressed about it so much?  I wanted to trigger that thought process in the players when they play this game. 

MapleStory

The Binding of Isaac: Rebirth

Bomberman Land Touch!

Research:

Necessity? is a game that I built mainly out of the skills I gained from the unity tutorial Roll-A-Ball, and 2D UFO Tutorial. I wanted to create a game similar to the UFO game, where you had to go around and pickup objects. But instead of just picking up objects, I wanted to use the objects to open other objects, like doors. Thus, using the unity scripting manuals and forums, I have figured out how to add properties to certain objects that allow them to act as a "key" for others objects. In addition, I learned from YouTube tutorials to create OnCollision events, manage the animation states, and displaying the UI elements. I wanted the character motion of this game to look like Ragnarok, yet with a pixelated look like Maplestory. 

 

Important things in Unity that I relearned after Roll-A-Ball, was the importance of layers and tags. I could not display my player on the top-most layer and I thought I had tried everything, I shifted the axis locations a lot. Turns out I just had to define it to another layer. The step-by-step tutorials really helped me learn more about the functions that Unity had and the purpose for each of them.

 

YouT​ube Tutorials

MapleStory

Ragnarok Online

Roll-A-Ball Tutorial

Process:

Before creating a 2D platform game, I originally wanted to make a 3D platform game, using the coding I learned from "Roll-A-Ball", with a dialogue puzzle aspect to it. However, it turned out to be quite difficult in such a short period of time that I decided to switch to making a 2D platform game. The dialogue portion deemed to be very challenging for me, thus I stuck to something simpler but with a deeper meaning. 

 

One thing that was really tedious and annoying was creating the map for this project. I had to divide the sprite sheet I used into multiple small one-unit sprites so that I could create different map shapes; however, since the units are brick-patterned, I had to make sure that the bricks aligned well together and did not look awkward.

 

Steps that I want to take to further my project are fixing the animations so that the frame rate is faster. I would also like to add an intro, outro, as well as an escape option (attached to the "ESC" key) when the player wants to take a break from the game. A level element added to the game would also be one of the next steps in making it more interesting. I also haven't figured out how to properly code the instance where when the player steps close to and away from the gameObject, to have the UI text element toggle on and off.

Code for Player Movement:

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class MovementScript : MonoBehaviour
{
    public Animator anim;
    public float speed;

    void Start()
    {
        anim = GetComponent<Animator>();
    }

    void Update()
    {
        float horizontal = Input.GetAxis("Horizontal");
        float vertical = Input.GetAxis("Vertical");
        movementAnimation();
        transform.Translate(horizontal * speed * Time.deltaTime, vertical * speed * Time.deltaTime, 0f, Space.World);
    }
    void movementAnimation()
    {
        if (Input.GetKey(KeyCode.DownArrow))
        {
            anim.SetTrigger("playerDown");
        }
        else if (Input.GetKey(KeyCode.UpArrow))
        {
            anim.SetTrigger("playerUp");
        }
        else if (Input.GetKey(KeyCode.LeftArrow))
        {
            anim.SetTrigger("playerLeft");
        }
        else if (Input.GetKey(KeyCode.RightArrow))
        {
            anim.SetTrigger("playerRight");
        }
        else
        {
            anim.SetTrigger("playerIdle");
        }
    }
}
 

Visual Documentation:

bottom of page