Skip to content

An open world, 2D game, where the player can move around freely and collect resources

License

Notifications You must be signed in to change notification settings

Aliijjn/2D_Game

Repository files navigation

2D Game

This is my take on a more complex 2D game, featuring different blocks and items, inventory management and even crafting and smelting mechanics. It's all written in C++, using a mix of Windows.h, OpenGL and my own library for window management and rendering sprites.

What I've learned from this project âś…

  • Managing large data structures
  • How to use OpenGL
  • How to load and display a custom font

Images đź“·

You spawn in an open world, filled with trees and rocks. With a bit of effort, you can use these to make some advanced tools

image

You can start by hitting a tree, but as you can see, that takes quite long...

image

Instead, you can gather some branches and pebbles

image

After picking up a couple of those, you can press 'E' to show your inventory

Here, you can also see your crafting recipes

image

Click on one of the items to the right of the '>>' to craft them

image

With this pickaxe, you can break stones much easier

You can select the pickaxe if it's in your hotbar, by pressing the corresponding number (1-6) or by using your mouse wheel

image image

An axe will let you do the same to a tree

image image

Eventually, you might stumble across some Iron Ore, which takes a bit longer to break

image

This will drop raw iron after breaking it, which you'll need to smelt into bars to use for crafting

image

You can do this by crafting a fireplace.

Select the campfire which you can place down by selecting it and then clicking on an open area with the right mouse button

image image

Then you can start a fire by adding logs to the campfire

image image image image

Once the fire has started, you can add the raw iron to smelt it

image image

Then you can use that iron to craft a better axe, letting you cut down trees even faster

image

Alijn Kuijer, October 2024

About

An open world, 2D game, where the player can move around freely and collect resources

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages