Skip to content

Commit

Permalink
Make server rooms
Browse files Browse the repository at this point in the history
* rewrite server program
* split game and networking
* add fortress texture
* add background dim
* fix mouse drag lock
* fix win check
* fix undrag on mouse leave
* fix tile highlighting
* use single character command line arguments
  • Loading branch information
karwler committed Oct 14, 2019
1 parent 5bb7482 commit c598632
Show file tree
Hide file tree
Showing 42 changed files with 5,046 additions and 3,217 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ endif()
# set main target
add_executable(${PROJECT_NAME} ${SRC_FILES})
target_compile_features(${PROJECT_NAME} PUBLIC cxx_std_17)
add_dependencies(${PROJECT_NAME} ${DATA_NAME})
add_dependencies(${PROJECT_NAME} ${DATA_NAME} ${SERVER_NAME})

# include directories and link libraries
include_directories("${CMAKE_SOURCE_DIR}/src")
Expand Down
29 changes: 12 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Thrones
Is a game designed to cultivate cunning and strategic maneuvering on a battlefield created by you, your opponent, and the battle between you. The struggle for supremacy will take many forms as your infantry melee, cavalry charge, and artillery fire. You may strike with your Throne’s royal guard or unleash a Dragon on any challenger to your claim. Not even fate itself is out of your influence and reach.
Designed by Chad Anthony.

Thrones is a game designed to cultivate cunning and strategic maneuvering on a battlefield created by you, your opponent, and the battle between you. The struggle for supremacy will take many forms as your infantry melee, cavalry charge, and artillery fire. You may strike with your Throne’s royal guard or unleash a Dragon on any challenger to your claim. Not even fate itself is out of your influence and reach.
Your enemies, however, are diverse, and their lands will be treacherous to a conqueror. Destruction of their armies is just one path to victory; if you succeed in claiming their Fortress as your own, a pretender’s family will surely plea for peace, which you can consider as their army disbands in defeat.

See [RULES](RULES.md) for detail on gameplay.
Expand All @@ -14,22 +16,21 @@ Run either two instances or a second instance of the "Thrones" executable, which
Different game configurations are stored with unique names in the "game.ini" file in the game's root directory. Tile/piece setups are stored in "setup.ini" and other client settings are stored in the "settings.ini" file in the game client's root directory.

Game client command line options:
- -s [address]
- set server address (leave empty to reset)
- -p [port]
- set port number (leave empty to reset)
- -c
- connect to server immediately
- -d
- place objects beforehand (only for debug build)

Game server command line options:
- -p [port]
- port to use (default is 39741)
- -c [name]
- game config to load (default is "default")
- -f [file]
- game config file to load (default is "game.ini")
- v
- write output to console
- l
- write output to log file

Game server keys:
- L: list rooms
- P: list players
- Q: close program

## Gameplay
The game starts with the setup, which consists of the following phases:
Expand All @@ -44,9 +45,3 @@ After the setup the server program determines the first player, the middle row t
You can move pieces by dragging them using the left mouse button and fire by dragging a piece using the right mouse button. Because by default the warhorse switches with any piece, drag it with the right mouse button to explicitly attack.
To use a move/attack/fire fate's favor, hold down the left alt key while dragging the piece.
The camera can be rotated by holding down the middle mouse button and reset by pressing C.

## TODO
- test survival checks
- test if throne can breach and kill in one go
- test warhorse swap
- make server rooms
9 changes: 0 additions & 9 deletions rsc/materials/regular.mtl
Original file line number Diff line number Diff line change
Expand Up @@ -21,23 +21,14 @@ Ns 400
newmtl tile
Kd 0.8 0.8 0.8
Ks 0.5 0.5 0.5
Ke 1 1 1
Ns 600

newmtl fortress
Kd 0.4 0.4 0.3
Ks 0.5 0.5 0.5
Ke 1 1 1
Ns 600

newmtl ally
Kd 0.5 0.1 0
Ks 0.8 0.8 0.8
Ke 1 1 1
Ns 800

newmtl enemy
Kd 0 0.1 0.5
Ks 0.8 0.8 0.8
Ke 1 1 1
Ns 800
Loading

0 comments on commit c598632

Please sign in to comment.