lambdaclass / mirra_backend

Multiplayer 2D physics engine, matchmaking, market and leaderboard for 2D and 3D Games
Apache License 2.0
58 stars 1 forks source link

[REFACTOR] Create intermediate application for shared business logic #774

Open agustinesco opened 1 month ago

agustinesco commented 1 month ago

In the pr #733 we created the module bounties.ex in the Arena application, this is a copy paste from a section of the quest.ex module in the GameBackend application.

This is WRONG, think in a way that we don't spread the same logic in different places, one option could be:

  1. Create a shared application between GameBackend and Arena where they both can have access to business logic, and then use that application as a dependency.
AminArria commented 1 month ago

Please let's avoid creating apps if possible, specially if they are only for sharing modules. Pick one app to own it and make it a dependency of the other

Also, all though, we are not even close to it been a problem, the more apps we have the slower it compiles cause apps can't be compiled in parallel

agustinesco commented 1 month ago

We talked about this with @Nico-Sanchez and we came to the conclusion that defining a new library to share champions's business logic, due to implementation details i think this would be implemented by a new application that will never be deployed in the umbrella project but we could look for another approach