https://github.com/frank-wong-cn/abstractstrategygame-raylib
Personal learning project of game development using Raylib, SLikeNet and STL.
https://github.com/frank-wong-cn/abstractstrategygame-raylib
cpp game-development raylib
Last synced: about 1 month ago
JSON representation
Personal learning project of game development using Raylib, SLikeNet and STL.
- Host: GitHub
- URL: https://github.com/frank-wong-cn/abstractstrategygame-raylib
- Owner: Frank-Wong-CN
- License: gpl-3.0
- Created: 2021-05-22T19:08:13.000Z (about 5 years ago)
- Default Branch: main
- Last Pushed: 2021-05-22T19:11:29.000Z (about 5 years ago)
- Last Synced: 2025-03-18T01:54:41.184Z (over 1 year ago)
- Topics: cpp, game-development, raylib
- Language: C++
- Homepage:
- Size: 56.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Abstract Strategy Game
## Introduction
A learning project of [Raylib](https://github.com/raysan5/raylib), STL and [SLikeNet](https://github.com/SLikeSoft/SLikeNet). The structure of the codes were never planned or organized. You may find only spaghetti codes here.
This is my first attempt of writing games in plain C++, and my first attempt of writing networked games. The structure of this code was directly refactored from a Hello World Raylib project, and boy did it grew into something (ugly, mostly :P). I've been making small games in GameMaker as hobby projects before, and I must say this experience, programming with C++, STL, Raylib and SLikeNet is by far the most satisfying one. There are many helps I have gotten from many people and places, and there are many things I have learned from them.
## Build Details
The CMakeLists.txt I've written is pretty much useless on other machines. This Github page is only for archival purposes.
This project uses MinGW and CMake to build. MinGW with GCC 10.3 can be acquired from [WinLibs](https://winlibs.com/#download-release). The source code of Raylib can be acquired from [Github](https://github.com/raysan5/raylib), [Official Website](https://www.raylib.com/), [Itch.io](https://raysan5.itch.io/raylib) and many other sites. It's a easy to use, OpenGL-based game rendering engine.
SLikeNet's [official page is here](https://www.slikesoft.com/?page_id=1224&lang=en), and its [Github page is here](https://github.com/SLikeSoft/SLikeNet). However, the official version of SLikeNet doesn't really support MinGW well. I've looked up other's fixes and workarounds, and finally found Urho3D's modification of SLikeNet, which fully supports MinGW with a few fixes. The github page of [Urho3D is here](https://github.com/urho3d/Urho3D), and their version of [SLikeNet is here](https://github.com/urho3d/Urho3D/blob/master/Source/ThirdParty/SLikeNet).
## Basic Control
The objective is reduce the opponent's health to 0 or below 0. The bars on the left are player's **HP** bar and **Matter** (shield) bar. The bars on the right are opponents.
The big number in the center is the **Credit** the player is currently holding. Every **Decision** requires certain cost.
The text below the bars are player's attributes: **Perception (Knowledge), Deception, Energy, Attack, Defense, Psyche**.
- Perception increases the precision of the estimation of opponent's health and matter.
- Deception increases the difficulty for the opponent to estimate player's health and matter.
- Energy is player's currently holding energy.
- Attack is player's damage modifier.
- Defense is player's matter effectiveness.
- Psyche is player's HP toughness.
Every 100 Max HP is one **Level**. Attack increases per level.
Q, W, E, R switches the displaying tree.
- Q is the perception tree (white) where player can increase Perception and Deception, and reduce credit timer.
- W is the regeneration tree (green) where player can regenerate HP, level up and decrease Psyche.
- E is the destruction tree (red) where player can accumulate energy and increase Attack.
- R is the protection tree (blue) where player can refill matter, increase max matter and increase Defense.
The nodes in the trees are **Decisions**. The number on the top means how much this decision costs. The number in the middle means the probability of its success (Decision can FAIL). The text on the bottom means what this decision does. (P)erception, (D)eception, (C)redit (T)imer, (M)at(T)er, (E)nergy, (L)e(V)el, etc.
Use Mouse Left Button to select a decision. Use Mouse Right Button to pan the interface. Use Mouse Wheel to zoom in/out.
Use Spacebar to unleash your current holding energy upon your opponent. Your energy will be emptied after unleashing.
Use F10 to restart game, in both single-player mode and multi-player mode.
Use F8 to forcifully disconnect your game from remote system.
## TODO
- Potion Queue
- AI
- Better Deception and Estimation
- Complete GUI
- Refactor Trees
- Config Files
- Resource Check
- Main Menu
- Game Balance
## Screenshot
