Coder Social home page Coder Social logo

Comments (7)

tomreyn avatar tomreyn commented on May 13, 2024

I would appreciate it, too (and had previously suggested it on the forums). Currently the player name option is taken into account when setting the server title. I think it would be much nicer to allow for setting a server title, which, if set, would overrule the current mechanism. Or which would replace it entirely, defaulting to something like "Untitled server".

In my opinion this should also be configurable in glest(user).ini, overridden by the command line option. Availability of he command line option should not be limited to headless servers, but also work when you host a game using the GUI client and take part in it. So in my opinion a better option title would be

--server-title

In addition to changes to the game code, this change would also require modification of the masterserver code, the DB schema and the 'protocol' the game uses to communicate with the masterserver. We would need to add a "serverTitle" value. I would think 25 single byte characters should be sufficient.

It would be nice to add "serverAdminName" and "serverAdminEmail" fields of the same size.

To tell apart headless and non-headless servers, a separate single byte field "serverType" should be added, which can take the values of 0 (default, non headless) and 1 (headless). This would allow to display servers differently on the games' server list as well as on the masterserver's web UI.

from megaglest-source.

filux avatar filux commented on May 13, 2024

In my opinion this should also be configurable in glest(user).ini

just as note, ^ This does not help in case multiple headlesses based on same data with unique names so even if in the .ini (for single headless) then we still need command line too.

but also work when you host a game using the GUI client and take part in it. So in my opinion a better option title would be --server-title

so you are a host/admin player and you are visible as a player, where do you want to see server title in this case, just somewhere on/in site/database?

from megaglest-source.

tomreyn avatar tomreyn commented on May 13, 2024

Hope you did not mind me removing the "minor bug" association, this very much seems to be an enhancement to me, not a bug.

Ad (1):
I agree, and I suggested adding both INI setting and command line option.
With multiple headless servers, you can already have different settings per process (using the same binaries) by using --ini-path (but of course this is not nearly as convenient as having a separate command line option for these settings).

Ad (2):
On the masterserver website and on the server list displayed by the game. However, printing it on the (per) game lobby screen would be good (and probably easily done), too.

from megaglest-source.

filux avatar filux commented on May 13, 2024

:)

Ad (1):
Isn't so easy. As you can see recently we have MG-Team-1, MG-Team-2, ...
I did that and it is so dirty/hacky way that for sure it is not a good idea to document "how to do this", and for sure if you will have to explain some details for someone with low linux experience and/or with some language barrier between you then you will fail :D.

Ad (2):
Hehe but now in the lobby we see something like Titi's game which seems to be very good description for me besides the fact game doesn't know the rule s' and by this we have e.g. Mantas's game, so you should probably expand this idea, some examples etc. :)

from megaglest-source.

titiger avatar titiger commented on May 13, 2024

I added --server-title which is used instead of playernames generic game name now. I kept the "titi controls" servername once there is an active controller.

Please test, so we can close this issue.

from megaglest-source.

filux avatar filux commented on May 13, 2024

Test on the same files as headless dev works we get this error:

megatest@initiate:~/megaglest/game$ ./start_megaglest --headless-server-mode=vps,exit --use-ports=63012,63012,63011 --server-title=MegaTest2 2> test.log
Disabled reading from console [vps]
Forcing quit after game has completed [exit]
Forcing serverTitle[MegaTest2]
megaglest v3.12-dev
Compiled using: GNUC: 40804 [64bit] platform: Linux-X64 endianness: little
GIT: [Rev: 5357.44f851c] - using STREFLOP [SSE] - [no-denormals]
Forcing internal port# 63012, external port# 63012
Forcing status port# 63011
Language file NOT FOUND, can't open file: [/data/lang/english.lng] switching to default language: english
Error saved to logfile [/home/megatest/.megaglest/error.log]
*ERROR* [2016-01-04 08:46:32] In [/home/jenkins/build/workspace/megaglest-source_l64/source/glest_game/main/main.cpp::handleRuntimeError Line: 641] [File NOT FOUND, can't open file: [/data/lang/english.lng]
Stack Trace:
/home/megatest/megaglest/game/megaglest:Shared::Platform::megaglest_runtime_error::megaglest_runtime_error(std::string const&, bool)address [0xb2552d] line: 346
/home/megatest/megaglest/game/megaglest:Shared::Util::Properties::load(std::string const&, bool)address [0xaf6716] line: 77
/home/megatest/megaglest/game/megaglest:Glest::Game::Lang::loadGameStringProperties(std::string, Shared::Util::Properties&, bool, bool)address [0x619296] line: 200
/home/megatest/megaglest/game/megaglest:Glest::Game::Lang::loadGameStrings(std::string, bool, bool)address [0x61ccf4] line: 66
/home/megatest/megaglest/game/megaglest:Glest::Game::glestMain(int, char**)address [0x6e0b9c] line: 4957
/home/megatest/megaglest/game/megaglest:Glest::Game::glestMainSEHWrapper(int, char**)address [0x6e7546] line: 5860
/lib/x86_64-linux-gnu/libc.so.6:__libc_start_main()address [0x7f7c5976cec5] line: 0
/home/megatest/megaglest/game/megaglest() [0x4f018a]address [0x4f018a]
] gameInitialized = 0, program = (nil)

-------------------------------------------------------------------------------------------------------------------------------
megatest@initiate:~/megaglest/game$ cat test.log 

******************************************************
    #2 An error occurred and MegaGlest will close.
Error msg = [File NOT FOUND, can't open file: [/data/lang/english.lng]
Stack Trace:
/home/megatest/megaglest/game/megaglest:Shared::Platform::megaglest_runtime_error::megaglest_runtime_error(std::string const&, bool)address [0xb2552d] line: 346
/home/megatest/megaglest/game/megaglest:Shared::Util::Properties::load(std::string const&, bool)address [0xaf6716] line: 77
/home/megatest/megaglest/game/megaglest:Glest::Game::Lang::loadGameStringProperties(std::string, Shared::Util::Properties&, bool, bool)address [0x619296] line: 200
/home/megatest/megaglest/game/megaglest:Glest::Game::Lang::loadGameStrings(std::string, bool, bool)address [0x61ccf4] line: 66
/home/megatest/megaglest/game/megaglest:Glest::Game::glestMain(int, char**)address [0x6e0b9c] line: 4957
/home/megatest/megaglest/game/megaglest:Glest::Game::glestMainSEHWrapper(int, char**)address [0x6e7546] line: 5860
/lib/x86_64-linux-gnu/libc.so.6:__libc_start_main()address [0x7f7c5976cec5] line: 0
/home/megatest/megaglest/game/megaglest() [0x4f018a]address [0x4f018a]
]

Please report this bug to  http://bugs.megaglest.org
******************************************************

Aborted (core dumped)

without --server-title= for comparison

megatest@initiate:~/megaglest/game$ ./start_megaglest --headless-server-mode=vps,exit --use-ports=63012,63012,63011 2> test.log
Disabled reading from console [vps]
Forcing quit after game has completed [exit]
megaglest v3.12-dev
Compiled using: GNUC: 40804 [64bit] platform: Linux-X64 endianness: little
GIT: [Rev: 5357.44f851c] - using STREFLOP [SSE] - [no-denormals]
Forcing internal port# 63012, external port# 63012
Forcing status port# 63011
Waiting for players to join and start a game...
Headless server is now running...
To shutdown type: quit
All commands require you to press ENTER
** #2 Socket peek error for sock = -1 err = -1 lastSocketError = 104 mustGetData = 0
...
-------------------------------------------------------------------------------------------------------------------------------
megatest@initiate:~/megaglest/game$ cat test.log 

from megaglest-source.

filux avatar filux commented on May 13, 2024

on 5369 1767838 error fixed and --server-title seems to be successfully implemented,
more extended implementations in the .ini etc left for the future

from megaglest-source.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.