Jump to content

spermik

Members
  • Posts

    13
  • Joined

  • Last visited

    Never
  • Donations

    0.00 GBP 

spermik's Achievements

Member

Member (2/3)

0

Reputation

  1. Could you please add some hints about tweaking DB performance? I've been playing around a bit, but I have the feeling, that there is still some tweak possible ; ) thanks, Termitt
  2. Good to hear Higi, im realy looking forward to hear from you about progress. Wish you good luck, Termitt
  3. Im realy looking forward to deploy this mod on server with 1200+ players, but im waiting to get compatible with mangos rev. 8870 and to avoid random crashes... I haven'd found any recent news... Opterman, how are doing last days? ; ) ...any recent progress on crashes issue? Termitt
  4. Im realy looking forward to test this project. Is it possible to get it from some git repo? I've found only pastebin diff.. = / Second question: I havent found with which mangos revision is the lastest version compatible, are you guys maintaining the compatibility with every commit? Thanks, Termitt (Admin@Spermik)
  5. Hi, I will add my little opinion here. I generally agree with Alex`s idea. So the really quick description of multimangos architecture: 1) realmd remains unchanged 2) all clients connects to the supervisior server (which would be the hardest part), announced as realm in realmlist 3) "behind" the supervisior there are several game(or map) servers (simillar to curent worldd) 4) supervisior handles the easy and fast packets (like chat) 5) more complicated opcodes are routed to game servers, where they are executed 6) the game server manages most of the game logic (ie AIs, spells, colision calculations) 7) 1 game server can run more maps (ie all instances, battleground server,...) 1 map = 1 thread 8) access to the world database perform all game server on their own 9) access to the character database is made via the supervisior, which solves the race conditions in creating new items (mails, characters...) 10) communication between supervisior and the map servers is made by TCP/IP sockets, probably 1 connection per map. I hope this will help you deciding how to write it Cheers Tabak
  6. the unistd.h is included in Common.h so no need to include it again. 1. the CR is added automaticky, because stdout is text (not binary) stream. Btw the correct order is \\r\\n, not \\n\\r so even if you will keep that in source it will be in bad order. 2. the dup2 function does what we need. It closes the second parameter and copyes the first to that. But you are right, i should use directly open, not fopen and convert (I will correct it when I came home). 3. the daemon is not supported on all unix like systems (it is not standert possix function), but is supported on most newer BSDs and all Linux systems. I will read your source and maybe correct and/or make it more multiplatform.
  7. Hi I have added the --daemonize option for mangos (under unix) - someone has asked for that on the forums. I have also added the -h and --help options which will print usage and exit. And at the and I have added --quiet option (for unix) which will redirect stdout and stderr to /dev/null to suppress all output from mangos (which can be useful when debugging it under gdb - it will not spam your gdb console, which you are probably sending to some file to see backtraces and etc.). http://tabak.spermik.info/dev/mangos/daemon.patch Best regards Tabak
  8. Vladimir, you obviously dont belive me. So lets make a little proof. (Im still talking about mangos under linux, I dont understand win stuff). So lets open some SD2 cpp file (for example ScriptMgr.cpp) and add this: class Test { public: Test() { printf("TEST CREATED\\n"); } ~Test() { printf("TEST DESTROYED\\n"); } }; Test t; So when out library is initialized the Test t shoud be created and message should appead in stdout. So lets recompile and run mangos. 1st strange thing: the message "TEST CREATED" appear in output immidiatly after starting the binary and NOT when the dlopen is called later in boot process (thats right because it is HARD linked to mangos and that dlopen practicaly does nothing). 2nd stragne thing: use loadscripts to reload that library. Both messages should appear (DESTROYED and CREATED) but neither does. (again the same reason, the library is NOT freed and loaded again, dlclose practicaly does nothing in this case). 3rd strange thing: the DESTROYED message is printed when the server is shutting down when all linked libraries are freed.(the same reason) So if you will use loadscripts to load another library the first will remain loaded, because it was linked to the core just all other libraries (ZThread, ACE). And that is what Im trying to explain here Best regards Tabak
  9. I have already investigated scripts reloading in the past, so despawning all scripted objects in game is a solution for safe library unload. You are right that the SD2 patch does not modify the mangos sources, but it is linked to mangos binary by ld, so without modifying this build process the library will not be freed and reloaded - dlopen and dlclose will not work as it should (im still talning about *nix system, dunno how it works under win). So if you wanna reloadable scripts, you will have to : 1) change the linking so mangos will not be linked to any scripting lib 2) make the load and unload safe 3) and also excluding that lib from mangos build process whould be great Btw creating some mangos module/plugin interface whould be great to, because many ppl develop and distribute their modules as source patches, and thats not the right way. Tabak
  10. Btw we use a scripted NPC to teleport players out of closed areas, you can write a simple AI which will teleport anyone (except GMs for example) on sight. It has disadvantage in large areas (you will have to spawn many of those teleporters to cover it). But is has one big advantage - any GM with spawning rights can close/open any location, zone, instance, so no need to touch the sources, recompile and restart. Tabak
  11. We discussed it long long time ago, the scripting library is HARCODED and HARDLINKED (dynamically but is) to the core. The problem is that mangos does not have any plugin interface, so all "plugins" (like various chatlogs, bots, scripting libraries, etc,...) are hadroced to the core by patching the sources. So if you call UnloadScriptingModule() nothing will happen (im 100% sure on unix systems) because mangos-worldd is linked to that during linking process (g++ -l...). Try to delere that lib and ld will not allow mangos to start. Btw even if you will remove that link and open that library runtime you will have problems with all AIs spawned in game, those objects are allocated in the library and they will be freed during unloading, so all scripted creatures will have i_AI pointer to hell But everything is possible to rewrite Best regards Tabak
  12. Or if you wanna mangos as a real daemon really really fast you can add one simple line to mangos: daemon(0,0); See man 3 daemon for any other info
  13. Btw you can always run mangos as "daemon" using the screen. I start mangos with $ screen -dmS mangos /path/to/mangos/bin/mangos-worldd With this command mangos will start in named screen (wchich can be any time re-attached using screen -r mangos and deattached again) and it will behave as daemon. You can let mangos to create pid file and check it in restarter, or you can grep ps or use telnet to verify if its running.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use