2D Game

This was a personal project that I first started developing in unity but was challenged to do in my own engine.

OpenGL Build

Key-Systems/Mechanics:

  • Custom Algorithms

  • Perlin Noise

  • Quad Batching

  • Sprite Atlasing

  • GLFW

  • GLEW

This project was more of a test as I could have made the entire game using unity and was making it in unity as seen below but he then asked why I don't just use my own engine, so I did.

This project is using a custom engine using the OpenGL graphics API with the GLFW wrapper.

My 2 biggest challenges in this project so far were FPS wise as rendering 100s of quads can be very costly every frame as you would have to draw each one at a time per frame so to fix this I used batching to if not all, most of the quads in one call.

The next biggest challenge was the collision as you have to check if the player is colliding with all tiles and this can be costly as you can be checking 100s of objects per frame, so to fix this I chose to only check the tiles closest to the player, in turn tripling FPS.

For the island generation, I didn't want to use just layered Perlin noise as it can sometimes be difficult to get abstract looking islands, and because the main mechanic of the game is fishing I wanted plenty of fishing spots, So to fix this issue I created my own algorithm that uses a combination of technics used in previous projects.


Unity Build

Key-Systems/Mechanics:

  • Dungeon generation

  • Inventory system

  • Item system

  • Fishing

  • Rope Physics

This project was inspired by a video I watched of a procedural dungeon generator crossed with a game from a previous student called fsh.zone.

This game uses a texture look-up to generate its islands as you can see from the image below, with different colours spawning different objects from trees to enemies or even health potions on the ground that can be used by the player.

I first start generating the world by creating a grid and within the grid, each cell can contain an island I then pick a random cell and assigning it the starting island which is the top left island on the below image then after this is done I save all empty neighboring cells to a list then assign a random cell from that list a random island this is then repeated a given amount of times and in turn can generate a simple yet effective dungeon that can closely resemble the way games such as the binding of Isaac generate their dungeons.

To get the fishing line to work like an actual fishing line I had to add my own attempt at a custom rope physics, I choose to use verlet integration as it would be efficient and gave a decent result for how simple the algorithm is.