2026-04-12 23:26:29 +02:00
2024-06-09 23:32:29 +02:00
2024-06-09 22:03:29 +02:00
2024-04-22 22:34:39 +02:00
2024-03-08 12:27:45 +01:00
2024-06-09 23:23:55 +02:00
2024-02-27 09:57:47 +00:00
2024-04-30 12:04:58 +02:00
2024-03-18 23:47:13 +01:00
2024-03-28 18:53:36 +01:00
2024-06-04 14:38:46 +02:00


Motherload

Gather resources and buy upgrades to dig as far as you can. You have to dig ores and sell them to earn cash which you use to buy fuel, digger upgrades, explosives, and other supplies. You can only sell ore and buy items at the surface. If you run out of fuel, your digger explodes and you die (game over). There are more valuable (and heavier) ores as you go deeper into the mine. There are several types of alien artifacts which are of considerable value and appear randomly throughout the mine (below 950 feet).
Original game : General info » · Youtube video »

Table of Contents
  1. About The Project
  2. My version
  3. Getting Started
  4. How To Play
  5. Class structure
  6. Checklist
  7. Contact
  8. Acknowledgments

About The Project

screenshot.jpg

Here's why:

  • It's a classic game that I played when I was younger.
  • It's a game that I can make in a reasonable amount of time.

(back to top)

My version

This section gives a clear and detailed overview of which parts of the original game I planned to make.

The minimum I will most certainly develop:

  • Player movement
  • Resource Collection
  • Random Generated world
  • The fuel and sell building

What I will probably make as well:

  • Dying
  • Working Lava

What I plan to create if I have enough time left:

  • Main Menu, Options Screen
  • Boss fight

(back to top)

Getting Started

This project now includes a CMake build in addition to the original Visual Studio solution files. For the longer version, troubleshooting, and platform notes, see BUILDING.md.

Prerequisites

Windows

  • Visual Studio 2022 with the Desktop development with C++ workload
  • CMake 3.21 or newer

The repository already contains prebuilt SDL2 / SDL2_image / SDL2_mixer / SDL2_ttf Windows packages in Libraries/, and the CMake build will use those by default for MSVC / Visual Studio builds.

If you use CLion with MinGW, do not use the bundled SDL package. It is the Visual C++ SDL build and is not a proper MinGW dependency set.

Linux

Install the development packages first.

Ubuntu / Debian example:

sudo apt install build-essential cmake libsdl2-dev libsdl2-image-dev libsdl2-mixer-dev libsdl2-ttf-dev libgl1-mesa-dev

Build with CMake

Windows, Visual Studio 2022

cmake -S . -B build -G "Visual Studio 17 2022" -A x64
cmake --build build --config Debug

The executable will be generated in build/bin/ or the selected Visual Studio configuration output folder. Resource files are copied automatically after the build.

Linux

cmake -S . -B build
cmake --build build

The executable will be generated in build/bin/. Resource files are copied automatically after the build.

Run the game

After building, run the generated executable from the build output directory so that the copied resource files are next to it.

Notes

  • The original .sln and .vcxproj files are still present and can still be used in Visual Studio.
  • The CMake build creates the same two logical targets as the solution: Engine and Motherload.
  • On non-Windows platforms, SDL dependencies are expected to come from the system package manager.
  • On Windows, the bundled SDL dependencies are intended for MSVC, not MinGW.

(back to top)

How to play

Controls

  • W A S D
  • Mouse For menues

(back to top)

Class structure

Object composition

Player

The player has a bunch of objects in the Player class, These are

  • Animations
  • Particles
  • SoundEffects

WorldLevel

The world level contains all the objects for the "Main" Game. These are

  • Player
  • GridManager
  • Background Music
  • MainScreen (Game UI)
  • The Sun and Moon

Inheritance

Here are a couple examples on how i used Inheritance throughout the project.

Screens

The Screen class is the base class for all the screens in the game.

This Class manages all the GuiElements inside of it.

Also all the subscreens, eg. FuelScreen, SellScreen, even the Main Game ui is a subclass of the Screen type.

GuiElement

The whole Screen system is based on the GuiElement. This class has a Draw and Update Function.

This is because the Screen class calls these for each of the subclasses of a GuiElement.

For Example, the Button class is a subclass of GuiElement.

The Button class has a Draw and Update function that the Screen class calls. The screen does not know what type of

update it's calling, it just knows that it's calling the update function of a GuiElement.

(back to top)

Checklist

  • Accept / set up github project
  • week 01 topics applied
  • week 02 topics applied
  • week 03 topics applied
  • week 04 topics applied
  • week 05 topics applied
  • week 06 topics applied
  • week 07 topics applied
  • week 08 topics applied
  • week 09 topics applied (optional)
  • week 10 topics applied (optional)

(back to top)

Contact

Bram Verhulst - bram.verhulst@student.howest.be

Project Link: Here
Alternative Project Link (Gitea): Here

(back to top)

Acknowledgments

Use this space to list resources you find helpful and would like to give credit to.

(back to top)

Description
No description provided
Readme 16 MiB
Languages
C 90%
C++ 8%
CMake 1.5%
Objective-C 0.4%