Skip to content

Commit 0b37025

Browse files
nydragonmindoodootheCaptain136klemmse
authored
Develop (#151)
* 141 lobby system api implementation (#143) * [Feature] add dymanic lobby drawing * [Feature] d * [Fix] fix not getting lobby 0 * [Fix] button offset * [Feature] back button Co-authored-by: Léon Sautour <[email protected]> * [Feature] improve qualtity of life (#145) * 142 enemy variety (#146) * [Feature] add LegRobot as new enemy * [Feature] add LegRobot to enemies * [Assets] add citySunset background to assets * [Assets] change Background to StarBg * [Feature] change MakeLaser to makeSingleShot. now uses AnimID * [Assets] rescaled citySunnset Bg * [Assets] rescaled citySunnset * [Assets] rescaled citySunnset.png * [Assets] added citySunnset as background Co-authored-by: Pablo Herrmann <[email protected]> Co-authored-by: Léon Sautour <[email protected]> * [Doc] added the documentation for the ECS systems (#139) * [Doc] added the documentation for the ECS systems * GitBook: No commit message * GitBook: [#2] No subject * GitBook: [#6] No subject * GitBook: [#4] No subject * GitBook: [#5] No subject * GitBook: [#7] No subject * GitBook: [#8] No subject * GitBook: [#9] No subject * GitBook: [#10] No subject * GitBook: [#11] No subject * GitBook: [#12] No subject * GitBook: [#13] No subject * GitBook: [#14] No subject * GitBook: [#15] No subject * GitBook: [#16] No subject * [Doc] remove tutorail folder from root * [Doc] remove duplicate docs that werent merged by gitbook * GitBook: [#19] No subject * GitBook: [#21] No subject * GitBook: [#23] No subject * GitBook: [#25] No subject * GitBook: [#26] No subject * GitBook: [#27] No subject Co-authored-by: Sebastian Klemm <[email protected]> Co-authored-by: pablo-elias.herrmann <[email protected]> Co-authored-by: nLatt <[email protected]> * 140 binary protocol (#147) * [Doc] document new binary protocol * [Feature] add uuid to byte and constructor from byte * [Feature] WIP binary protocol * [Feature] WIP client binary HERE command * [Fix] push build issues * [Fix] fix wrong build issue * [Feature] fix buffer constructor * [Fix] fix build issues * [Fix] #progress * [Feature] Here seems to work * [Feature] WIP implement binary protocol in rest of protocol * [Feature] serialization is bianry * [Feature] WIP uuid debugging * [Fix] eventual fix * [Fix] fix * [Fix] fix ZIP * [Fix] fix handle here not working * [Feature] update seria * [Fix] fix move not working * [Feature] THERE BE LIGHT * [Feature] YES * [Merge] merge * [Feature] on death go to lobby selection Co-authored-by: Léon Sautour <[email protected]> * 148 removing old documentation (#152) * [Doc] removing old docs (summary, improvement, serialisation) * [Doc] add gitbook link * [Doc] added newline Co-authored-by: nLatt <[email protected]> * 93 pimp readme (#153) * [Doc] add CI status badges and logo image * [Doc] add more badges to the readme * [Feature] change badge colours * [Feature] fix * [Fix] leaving lobby Co-authored-by: Nydragon <[email protected]> * [Fix] reenable sound effects (#155) * 150 create new level (#154) * [Feature] new levels added * [Assets] new level files and removed bad srants Co-authored-by: Sebastian Klemm <[email protected]> Co-authored-by: Leon Sautour <[email protected]> * [Fix] return value Co-authored-by: Léon Sautour <[email protected]> Co-authored-by: Pablo Herrmann <[email protected]> Co-authored-by: Sebastian Klemm <[email protected]> Co-authored-by: theCaptain136 <[email protected]>
1 parent d8fada0 commit 0b37025

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

79 files changed

+2594
-1122
lines changed

Diff for: .gitbook/assets/Bild_2022-11-12_142731446.png

22.7 KB
Loading

Diff for: .gitbook/assets/Blank board.png

209 KB
Loading

Diff for: .gitbook/assets/Document systems.png

37.6 KB
Loading

Diff for: .gitbook/assets/ECS Systems overview.png

56.2 KB
Loading

Diff for: .gitbook/assets/client processflow.png

65.4 KB
Loading

Diff for: .gitbook/assets/server processflow.png

72.6 KB
Loading

Diff for: .github/workflows/exec_tests.yml

-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ jobs:
2828
run: >
2929
conan profile update conf.tools.system.package_manager:mode=install default;
3030
conan profile update conf.tools.system.package_manager:sudo=True default;
31-
mkdir build;
3231
make test;
3332
3433
- name: verify-files

Diff for: .gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,5 @@ bin/*
1212
**/*.html
1313
**/*.css
1414
report.html
15+
testmain.cpp
16+
a.out

Diff for: CMakeLists.txt

+10-3
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,11 @@ function(build_server)
6565
src/server/levels/level1
6666
src/server/levels/level2
6767
src/server/levels/level3
68+
src/server/levels/level4
69+
src/server/levels/level5
70+
src/server/levels/level6
71+
src/server/levels/level7
72+
src/server/levels/level8
6873
)
6974

7075
target_link_libraries(Server server::rc)
@@ -78,6 +83,7 @@ function(build_client)
7883
"${CMAKE_CURRENT_SOURCE_DIR}/src/client/ClientGame/ClientGame.cpp"
7984
"${CMAKE_CURRENT_SOURCE_DIR}/src/client/GUI/Components/TextBox.cpp"
8085
"${CMAKE_CURRENT_SOURCE_DIR}/src/client/GUI/Components/Button.cpp"
86+
"${CMAKE_CURRENT_SOURCE_DIR}/src/client/GUI/Menus/Menu.cpp"
8187
"${CMAKE_CURRENT_SOURCE_DIR}/src/client/GUI/Menus/ConnectionMenu.cpp"
8288
"${CMAKE_CURRENT_SOURCE_DIR}/src/client/GUI/Menus/LobbyMenu.cpp"
8389
"${CMAKE_CURRENT_SOURCE_DIR}/src/client/GUI/Menus/LobbySelectionMenu.cpp"
@@ -88,7 +94,8 @@ function(build_client)
8894
"${CMAKE_CURRENT_SOURCE_DIR}/src/client/Systems/HealthSystem.cpp"
8995
"${CMAKE_CURRENT_SOURCE_DIR}/src/client/Systems/MusicSystem.cpp"
9096
"${CMAKE_CURRENT_SOURCE_DIR}/src/client/Systems/PlayerMovementSystem.cpp"
91-
""
97+
"${CMAKE_CURRENT_SOURCE_DIR}/src/shared/ECS/Serialization.cpp"
98+
9299
"${CMAKE_CURRENT_SOURCE_DIR}/src/shared/ECS/CompPool.cpp"
93100
"${CMAKE_CURRENT_SOURCE_DIR}/src/shared/ECS/ECSManager.cpp"
94101
"${CMAKE_CURRENT_SOURCE_DIR}/src/shared/ECS/Components.cpp"
@@ -152,6 +159,8 @@ function(build_client)
152159
resources/r-typesheet44.png
153160
resources/lost.png
154161
resources/background.png
162+
resources/citySunnset.png
163+
resources/menu-background.png
155164
resources/song0.mp3
156165
resources/song1.mp3
157166
resources/song2.mp3
@@ -188,14 +197,12 @@ function(build_tests)
188197
"${CMAKE_CURRENT_SOURCE_DIR}/src/shared/ECS/CompPool.cpp"
189198
"${CMAKE_CURRENT_SOURCE_DIR}/src/shared/ECS/ECSManager.cpp"
190199
"${CMAKE_CURRENT_SOURCE_DIR}/src/shared/ECS/Components.cpp"
191-
"${CMAKE_CURRENT_SOURCE_DIR}/src/shared/ECS/Serialization.cpp"
192200
)
193201

194202
set(TEST_CODE
195203
"${CMAKE_CURRENT_SOURCE_DIR}/test/main.cpp"
196204
"${CMAKE_CURRENT_SOURCE_DIR}/test/ECS/EcsTests.cpp"
197205
"${CMAKE_CURRENT_SOURCE_DIR}/test/ECS/EcsFixture.cpp"
198-
"${CMAKE_CURRENT_SOURCE_DIR}/test/ECS/Serialization.cpp"
199206
)
200207

201208
add_executable(

Diff for: README.md

+27-71
Original file line numberDiff line numberDiff line change
@@ -1,79 +1,35 @@
1-
[Contributing Guide](CONTRIBUTING.md)
2-
3-
# R-Type
1+
<p align="center">
2+
<img src="https://cdn.dribbble.com/users/664697/screenshots/6458763/r-logo.png" alt="drawing" width="200">
3+
<p align="center">
4+
<img src="https://badgen.net/github/stars/Epitech-R-Type/R-Type?color=purple">
5+
<img src="https://badgen.net/github/contributors/Epitech-R-Type/R-Type?color=green">
6+
<img src="https://badgen.net/github/branches/Epitech-R-Type/R-Type?color=pink">
7+
<img src="https://badgen.net/github/commits/Epitech-R-Type/R-Type/main?color=orange">
8+
</p>
9+
<p align="center">
10+
<img src="https://github.com/Epitech-R-Type/R-Type/actions/workflows/build_linux.yml/badge.svg?branch=main">
11+
<img src="https://github.com/Epitech-R-Type/R-Type/actions/workflows/build_windows.yml/badge.svg?branch=main">
12+
<img src="https://github.com/Epitech-R-Type/R-Type/actions/workflows/linter.yml/badge.svg?branch=main">
13+
</p>
14+
</p>
15+
16+
### R-Type
417

518
This project aims to implement the classic game [R-Type](https://wikiless.sethforprivacy.com/wiki/R-Type?lang=en).\
619
It will include network based multiplayer.
720

8-
# Install dependencies
9-
10-
```
11-
yay -S pkg-config cmake make
12-
```
13-
14-
# Install Conan
15-
16-
```
17-
pip install conan
18-
conan profile new default --detect
19-
conan profile update conf.tools.system.package_manager:mode=install default;
20-
conan profile update conf.tools.system.package_manager:sudo=True default;
21-
```
22-
23-
# How to Build
24-
25-
## Automatic build for Linux and Windows
26-
27-
For this to work on Windows you need to have access to a Unix shell, such as Git Bash or WSL as well as access to the make command.
28-
29-
In order to build both the client and the server, you can make the "all" rule:
30-
31-
```
32-
make
33-
```
34-
35-
In order to build the tests, make the "test" rule:
36-
37-
```
38-
make test
39-
```
40-
41-
Binaries can be found at:
42-
```
43-
./bin/Server
44-
./bin/Client
45-
./bin/Tests
46-
```
47-
48-
## Manual Build
49-
### For Linux
50-
51-
Delete the build folder if present:
52-
53-
```
54-
rm -rf build
55-
```
56-
57-
Then build the binaries:
58-
59-
```
60-
conan install conanfile.txt -if build --build=missing
61-
cmake -S . -B build
62-
cmake --build build
63-
```
64-
65-
### For Windows
21+
[gitbook documentation](https://r-type-1.gitbook.io/r-type-documentation/)
6622

67-
Delete the build folder if present:
23+
* [User Documentation](user-documentation/)
6824

69-
```
70-
rmdir /s build
71-
```
25+
* [install and build guide](user-documentation/install-and-build-guide.md)
26+
* [tutorials](user-documentation/tutorials/)
27+
* [System overview](user-documentation/systems-overview.md)
28+
* [license](user-documentation/license.md)
7229

73-
Then build the binaries:
7430

75-
```
76-
conan install conanfile.txt -if build --build=missing
77-
cmake -S . -B build
78-
cmake --build build
79-
```
31+
* [Dev Documentation](dev-documentation/)
32+
* [Client Documentation](dev-documentation/client-documentation.md)
33+
* [communication protocol](dev-documentation/comunication-protocol.md)
34+
* [ECS documentation](dev-documentation/ecs-documentation.md)
35+
* [team/coding conventions](dev-documentation/team-coding-conventions.md)

Diff for: dev-documentation/README.md

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# dev-documentation
2+
3+
### Contents
4+
5+
* [Client Documentation](client-documentation.md)
6+
* [Communication protocol](comunication-protocol.md)
7+
* [ECS documentation](ecs-documentation.md)
8+
* [team/coding conventions](team-coding-conventions.md)

Diff for: Documentation/Client.md renamed to dev-documentation/client-documentation.md

+8-9
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
# Client Documentation
22

3-
## Introduction
3+
### Introduction
44

55
This documentation includes everything you need to know in order to implement your own client for the R-Type server.
66

77
With this client, you should be able to connect to a game being run on the server alongside players currently using the default client implementation that we provide.
88

9-
## Entity Component System
9+
### Entity Component System
1010

1111
At the core of the R-Type server architecture is the Entity Component System (or ECS). This entity component system will only be updated by the server which will then communicate the updates to the client though our UDP game protocol.
1212

13-
### Serialization
13+
#### Serialization
1414

1515
In order for the client to communicate the changes made to the ECS to the client, it is important that the client defines serialization and deserialization methods for each component.
1616

@@ -22,11 +22,11 @@ ComponentID is the unique component ID that has to be generated by the client in
2222

2323
After the ComponentID, each arg will be serialized separated by commas. These arguments are serialized in the same order as they appear in the component struct definition. It is **crucial** that the client deserialize the components attributes in the same order as they appear in the component definitions we provide further along in this document.
2424

25-
### Components
25+
#### Components
2626

2727
The following are the server side definitions of the components.
2828

29-
```c++
29+
```cpp
3030
struct Armor {
3131
int armor = 0;
3232
};
@@ -105,19 +105,18 @@ struct SoundDamage {
105105
//SFXID is an enum that the client can associate sound effects to
106106
```
107107
108-
### Systems
108+
#### Systems
109109
110110
In order for the client to display the information received by the server, only one system needs to be implemented. This system is the animation drawing system that should allow it to draw static and animated sprites.
111111
112112
All sprite sheets required by the game to run will be provided in a directory named 'ressources'.
113113
114-
### Player controls
114+
#### Player controls
115115
116116
To communicate the direction a player wants to move the following enum is used:
117117
118118
enum Move { UP = 1, DOWN = -1, LEFT = 3, RIGHT = -3 }
119119
120120
The integer coresponding to the desired direction can be calculated by adding the integers in the enum that have an influence on the final direction.
121121
122-
e.g.:
123-
Down right = DOWN + RIGHT = -1 - 3 = -4
122+
e.g.: Down right = DOWN + RIGHT = -1 - 3 = -4

0 commit comments

Comments
 (0)