SverreNystad / besieged

Besieged! is a cooperative, real-time multiplayer tower defense Android game, where players defend their village against waves of mythological creatures by strategically combining "tower-cards" to build unique towers, earning money from each kill to acquire more cards.
7 stars 2 forks source link

Add the ECS system framework #14

Closed mattiastofte closed 7 months ago

mattiastofte commented 8 months ago
SverreNystad commented 7 months ago

@mattiastofte Amazing work! So much goodness here.

There were many good comments, and a small improvement would be to make them into javadocs comments so they show when hovering like this: image

I want to create some tests for this module before merging it but again very good work @mattiastofte !

SverreNystad commented 7 months ago

Now as we have merged in the good work of @Artewald with the structure of the project. We can now start work on using our own interfaces towards LibGDX. I noticed that there was use of LibGDX Vector 2 and wondered how use our own systems to use it: image

SverreNystad commented 7 months ago

Btw is it also in this module we shall create the internal clock of the game @Artewald @mattiastofte ?

mattiastofte commented 7 months ago

@SverreNystad Thanks. There are still a lot of components and some rendering systems to be implemented, so don't merge this yet anyways:) I don't think the internal clock needs to be mounted here, you just need to pass in delta time when updating the ECS in the game-loop.

SverreNystad commented 7 months ago

Got it. I will make the pull request into a draft till it is ready 😄

Artewald commented 7 months ago

Btw is it also in this module we shall create the internal clock of the game @Artewald @mattiastofte ?

I think we should put the internal clock into game_server, as it's where the logic of the game is played out. We can also have a internal clock in game client, for for example animations?

Artewald commented 7 months ago

Btw is it also in this module we shall create the internal clock of the game @Artewald @mattiastofte ?

I think we should put the internal clock into game_server, as it's where the logic of the game is played out. We can also have a internal clock in game client, for for example animations?

We could also just create a seperate clock package, that both the client and server could use

SverreNystad commented 7 months ago

Btw is it also in this module we shall create the internal clock of the game @Artewald @mattiastofte ?

I think we should put the internal clock into game_server, as it's where the logic of the game is played out. We can also have a internal clock in game client, for for example animations?

We could also just create a seperate clock package, that both the client and server could use

Yes, very good idea @Artewald to keep the implementation in a package and instantiate the clocks on client and server.

Artewald commented 7 months ago

I tried to compile a list of components we need, here's what I found:

I do not think this is a full list, but they are the components I would like to use to make the GameState in the game server package. It might also not be the best list or solution to the problems we have, so feel free to change it or ask questions

Artewald commented 7 months ago

Could we make the Entity class be serializable so that we can sync UUIDs between game_server and game_client:) This makes our lives much easier when we want to synchronize between them.

SverreNystad commented 7 months ago

Could we make the Entity class be serializable so that we can sync UUIDs between game_server and game_client:) This makes our lives much easier when we want to synchronize between them.

This sounds like an smart idea

Artewald commented 7 months ago

Could we possible add these components as well?