XG-Proyect-v3.x.x icon indicating copy to clipboard operation
XG-Proyect-v3.x.x copied to clipboard

Multi Universe - Ideas

Open LucasKovacs opened this issue 7 years ago • 3 comments

Please share your ideas about how the multi universe feature should work! Any idea or suggestion would be much appreciated since a feature that sounds so simple can get tricky and become really complex without enough planning time.

LucasKovacs avatar Jun 09 '18 20:06 LucasKovacs

Perdón que escriba en español.. Con Gonzalo encontramos la manera de hace universitario como tiene ogame..

  • Solamente se necesita un core.-
  • El login esta aparte del núcleo.-
  • Base de datos maestra, que maneja tanto como las conexiones al servidor y las base de datos de los universos.
  • Uso de wildcard en el hosting La contra de esto es que tenes que tener conocimientos de dominios por ejemplo crear un dominio principal (server.miproyecto.com). y después un Wildcart (.server.miproyect.com), si es multilenguaje seria (es.server.miproyecto.com) y (.es.server.miproyect.com) . esto lo creo gonzalo para el rediseño q estamos haciendo.

la otra manera es integrando una variable universe a todas las tablas y crear una tabla XGP_Universe y de hay con inner join a la mysql para llamar desde el login a que universo conectar... esto lo único que tiene q vas a utilizar un solo núcleo y una sola base de datos.

para mi la mejor opción es la de arriba como ogame por que el re diseño funciona con muchas urls y subdominios. es mas complejo de lo que pensabamos

jonamix-ar avatar Jun 09 '18 21:06 jonamix-ar

is it with this ? https://github.com/XGProyect/XG-Proyect-v3.x.x/blob/master/src/upload/public/js/home/xgproyect.js#L30

I propose a thing like this (in home controller): https://gist.github.com/agentcobra/5bf4d805a50c621990aa0521081d93e6

agentcobra avatar Jun 12 '18 03:06 agentcobra

There are several ways to achieve this, for example having a centralized user database (1 auth, +2 universes), or each universe having their unique users. Original Ogame works as last method, as you need to register for each universe you want to join, so that means each universe has its own config - different database host, name and/or prefix.

If so, then it's just a matter of creating several web virtual hosts with same web content but different config, and having a unique, common login page that allows to set the domain (universe) to perform login.

On each universe, only allow logins from "main page" - implementing CORS, or have a centralized DB to share auth validation/token.

duhow avatar Oct 03 '20 19:10 duhow