Currently, each object on a GameServer has an Id which is unique within the GameServer instance.
I think it would be beneficial to let the GameMap manage the Ids. That means, each object is unique within the same GameMap instance.
As there are no inter-map operations between the players where the id is involved, this should be no problem.
Of course, the game client will have a problem with a changing id of the own player. We could just send some fixed id (e.g. 0x2020) to it when sending data packets to it referencing the own player. For the packets sent to other players, it would send the "public" id for this player, managed by the GameMap.
There are several benefits:
- More free ids (not a real limitation, but still)
- This makes the life easier when implementing map instances which should be accessible from several servers, e.g. Loren Valley and Crywolf maps. When we don't want to implement the error-prone process of forcing the game client to connect to another game server (different ip+port), this will greatly enhance player experience. For example, partys will stay intact and the whole map change process is faster.
Currently, each object on a GameServer has an Id which is unique within the GameServer instance.
I think it would be beneficial to let the GameMap manage the Ids. That means, each object is unique within the same GameMap instance.
As there are no inter-map operations between the players where the id is involved, this should be no problem.
Of course, the game client will have a problem with a changing id of the own player. We could just send some fixed id (e.g. 0x2020) to it when sending data packets to it referencing the own player. For the packets sent to other players, it would send the "public" id for this player, managed by the GameMap.
There are several benefits: