6.6 KiB
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
About The Project
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.
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
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.
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
.slnand.vcxprojfiles are still present and can still be used in Visual Studio. - The CMake build creates the same two logical targets as the solution:
EngineandMotherload. - On non-Windows platforms, SDL dependencies are expected to come from the system package manager.
How to play
Controls
- W A S D
- Mouse For menues
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.
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)
Contact
Bram Verhulst - bram.verhulst@student.howest.be
Project Link: Here
Alternative Project Link (Gitea): Here
Acknowledgments
Use this space to list resources you find helpful and would like to give credit to.
