Hello, after long time
.
I want help because i've got problem with my game-server code structure (c++) VS2013.
#I'm getting quite pissed off when:
- i want to let ent/npc get some data from map,
- exchanging data between two maps
@ because the structure looks like this:
Main - calls funtion Server::run() to prepare an initialize enviroment.
|
Server - everything what this does is controling FPS and calls MapMgr::update()
|
MapMgr - there is std::map<enum, std::unique_ptr<Map>> to store maps & updates them.
|
Map - std::deque<std::unique_ptr<EntActor>> storing npcs & in update() calling ptr -> update();
|
EntActor - whole interface, move, goto, health, shield, speed .....
EntActor::update()
moves/rotates entity to specified location, or try attack any near player by data from Map.
and this whole system is one-way, should i make some sort of a global-message-bus ?
Please tell me if you have better idea
.
# Problem begins when i want to port/move EntActor from map1 to map2.