-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #26 from MasterLaplace/58-implement-a-complete-pay…
…load-for-flakkari-protocol 58 implement a complete payload for flakkari protocol
- Loading branch information
Showing
67 changed files
with
3,016 additions
and
782 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,7 +9,7 @@ on: | |
- '*' | ||
|
||
jobs: | ||
verify-commit-name: | ||
build_checker_ubuntu: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
name: Build Checker Windows | ||
|
||
on: | ||
push: | ||
branches: | ||
- '*' | ||
pull_request: | ||
branches: | ||
- '*' | ||
|
||
jobs: | ||
build: | ||
runs-on: windows-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Install CMake | ||
run: | | ||
choco install cmake -y | ||
- name: Configure and Build | ||
run: | | ||
mkdir build && cd build | ||
cmake .. && cmake --build . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
name: Create Release on Tag | ||
|
||
on: | ||
push: | ||
tags: | ||
- 'v*.*.0' | ||
|
||
jobs: | ||
build: | ||
name: Create Release | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
- name: Create Release | ||
id: create_release | ||
uses: actions/create-release@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
tag_name: ${{ github.ref }} | ||
release_name: Flakkari ${{ github.ref }} | ||
draft: false | ||
prerelease: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -574,3 +574,4 @@ docs/Flakkari/ | |
build/ | ||
.Test/ | ||
poc/ | ||
Experimental/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
41 changes: 41 additions & 0 deletions
41
Flakkari/Engine/EntityComponentSystem/Components/2D/Collider.hpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
/* | ||
** EPITECH PROJECT, 2024 | ||
** Title: Flakkari | ||
** Author: MasterLaplace | ||
** Created: 2023-01-14 | ||
** File description: | ||
** Collider | ||
*/ | ||
|
||
#ifndef COLLIDER_HPP_ | ||
#define COLLIDER_HPP_ | ||
|
||
#include <string> | ||
#include "../../../Math/Vector.hpp" | ||
|
||
#include "Network/Packed.hpp" | ||
|
||
namespace Flakkari::Engine::ECS::Components::_2D { | ||
PACKED_START | ||
|
||
/** | ||
* @brief Collider component for ECS entities that have a script attached to them | ||
* | ||
* @details This component is used to store the path to the script that will be executed | ||
*/ | ||
struct Collider { | ||
Math::Vector2f _size; | ||
|
||
Collider() : _size() {} | ||
Collider(Math::Vector2f nsize) : _size(nsize) {} | ||
Collider(const Collider &other) : _size(other._size) {} | ||
|
||
std::size_t size() const { | ||
return sizeof(_size); | ||
} | ||
}; | ||
|
||
PACKED_END | ||
} // namespace Flakkari::Engine::ECS::Components::_2D | ||
|
||
#endif /* !COLLIDER_HPP_ */ |
49 changes: 49 additions & 0 deletions
49
Flakkari/Engine/EntityComponentSystem/Components/2D/Control.hpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
/* | ||
** EPITECH PROJECT, 2024 | ||
** Title: Flakkari | ||
** Author: MasterLaplace | ||
** Created: 2023-01-11 | ||
** File description: | ||
** Control | ||
*/ | ||
|
||
#ifndef FLAKKARI_CONTROL_HPP_ | ||
#define FLAKKARI_CONTROL_HPP_ | ||
|
||
#include "../../../Math/Vector.hpp" | ||
|
||
namespace Flakkari::Engine::ECS::Components::_2D { | ||
PACKED_START | ||
|
||
/** | ||
* @brief Control component for 2D entities (player, enemies, etc...) | ||
* | ||
* @details | ||
* up: move up (give access to the move up) | ||
* down: move down (give access to the move down) | ||
* left: move left (give access to the move left) | ||
* right: move right (give access to the move right) | ||
* shoot: shoot (give access to the shoot) | ||
*/ | ||
struct Control { | ||
bool up; | ||
bool down; | ||
bool left; | ||
bool right; | ||
bool shoot; | ||
|
||
Control() : up(false), down(false), left(false), right(false), shoot(false) {}; | ||
Control(bool up, bool down, bool left, bool right, bool shoot) | ||
: up(up), down(down), left(left), right(right), shoot(shoot) {}; | ||
Control(const Control &other) | ||
: up(other.up), down(other.down), left(other.left), right(other.right), shoot(other.shoot) {}; | ||
|
||
std::size_t size() const { | ||
return sizeof(*this); | ||
} | ||
}; | ||
|
||
PACKED_END | ||
} // namespace Flakkari::Engine::ECS::Components::_2D | ||
|
||
#endif /* !FLAKKARI_CONTROL_HPP_ */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
44 changes: 44 additions & 0 deletions
44
Flakkari/Engine/EntityComponentSystem/Components/2D/RigidBody.hpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
/* | ||
** EPITECH PROJECT, 2024 | ||
** Title: Flakkari | ||
** Author: MasterLaplace | ||
** Created: 2023-01-14 | ||
** File description: | ||
** RigidBody | ||
*/ | ||
|
||
#ifndef RIGIDBODY_HPP_ | ||
#define RIGIDBODY_HPP_ | ||
|
||
#include "../../../Math/Vector.hpp" | ||
|
||
#include "Network/Packed.hpp" | ||
|
||
namespace Flakkari::Engine::ECS::Components::_2D { | ||
PACKED_START | ||
|
||
/** | ||
* @brief RigidBody represent the physical properties of a rigid body in a game engine | ||
* | ||
*/ | ||
struct RigidBody { | ||
float mass; | ||
float restitution; | ||
float friction; | ||
float gravityScale; | ||
bool isGravityAffected = true; | ||
bool isKinematic = false; | ||
|
||
RigidBody() : mass(0), restitution(0), friction(0), gravityScale(0), isGravityAffected(false), isKinematic(false) {}; | ||
RigidBody(const RigidBody &other) : mass(other.mass), restitution(other.restitution), friction(other.friction), gravityScale(other.gravityScale), isGravityAffected(other.isGravityAffected), isKinematic(other.isKinematic) {}; | ||
RigidBody(float mass, float restitution, float friction, float gravityScale) : mass(mass), restitution(restitution), friction(friction), gravityScale(gravityScale), isGravityAffected(true), isKinematic(false) {}; | ||
|
||
std::size_t size() const { | ||
return sizeof(*this); | ||
} | ||
}; | ||
|
||
PACKED_END | ||
} // namespace Flakkari::Engine::ECS::Components::_2D | ||
|
||
#endif /* !RIGIDBODY_HPP_ */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.