How it started
As I mentioned in My programming story I made a game. Bad one of course, but from scratch, by myself. And it was a HUGE milestone to me. It was the time when I stopped copying the code from videos/articles and built something mine. It’s worth to notice that I was 13 years old while building this game.
What was it about?
It is a labyrinth game called Potato Labyrinth, where you move a guy that is a potato (literally) to find a way to the exit. But it isn’t all. There are “fancy” mechanics in it, like portals, gates and I even made a dark level, where you only can see a few meters away.
Building
I made this game using Unity game engine and C# programming language, It’s a really powerful piece of software. Here is a short snippet of the game code that is responsible for the pause menu:
public class PauseMenu : MonoBehaviour {
public GameObject pauseMenu;
public static bool pauseMenuActive = false;
// Use this for initialization
void Start()
{
pauseMenu.SetActive(false);
}
// Update is called once per frame
void Update()
{
if (Input.GetKeyUp(KeyCode.Escape)&&pauseMenuActive == false)
{
pauseMenu.SetActive(true);
pauseMenuActive = true;
}
else if (Input.GetKeyUp(KeyCode.Escape)&&pauseMenuActive==true)
{
pauseMenu.SetActive(false);
pauseMenuActive = false;
}
}
public void BackToMenu()
{
SceneManager.LoadScene("Menu");
Points.points = 0;
LevelPointsRequired.activelvl = 1;
pauseMenuActive = false;
}
}
The code is terrible, as you can see, but it was my first true creation.
Summary
My first game was a bad one, but that’s okay! Everybody has to start somewhere, even a bad game like that is the next step for something better, bigger and more ambitious. I’ve decided to share this game if you want to check it out here.