The online racing simulator
Console Dedicated Host TEST
1
(26 posts, closed, started )
Console Dedicated Host TEST
Hello Hosters,

After merging the 0.6E changes into the development version, I thought I'd have a quick go at this long requested console based dedicated host.

But I don't really know why it is helpful, what it needs to do, what it must not do, and so on...

I've attached a first test so you can give some feedback and suggestions.

Save DCon.exe into a DEDI folder then you can run it as usual with a command line or a setup.cfg file.

It doesn't accept any text input at all yet, and that's one of the questions.

- Is this of any use in its current form?
- Should it show the message log as it does now?
- How should it work when text is typed in?
- Should it prevent new messages being added while you type in a command?
- Do you need a status output command?
Attached files
DCon_TEST1.zip - 359 KB - 607 views
Hi Scawen:

As I was probably the most recent person to request.. A few notes after shortly trying it out.

1: Wine complains still about it wanting to draw a window.. However, this is less important now as the server (unlike before) will still actually execute. The WINE issue is possibly related to my config, so I will do some trials.

2: I imagine that most people (myself included) will be using this for headless servers, either on a Windows or Linux box (more likely Linux), so the actual output is less important. If you do want to offer an interactive mode, I think the best thing would be to just act as the Host's text area. Maybe offer additional commands (getters, as the UI is no longer there like in the nogfx dedi) to allow an admin to view the current state.

I'll do some more testing when I'm not at work, but for now it's a marked improvement over the current nogfx/invisible dedicated servers

Thank you very much Scawen!
Thinking myself, if we can't have colours in console, is it neccesary to display colour codes? (honestly I know only one - ^5 is pink)

Working good here, running Airio... and it seems till now like much less CPU time
You could always have colours in console. The Windows CMD does allow you to do this. PRISM implements it AFAIK too.
OK...

I like to take some risks so the S2 server is now running this version.

First thing I noticed is the difference in the log;

normal (took S1 log as example);
Quote :
Dec 03 14:05:09 LFS DEDICATED HOST : 0.6E
Dec 03 14:05:09 ?
Dec 03 14:05:09 ?
Dec 03 14:05:09 ?
Dec 03 14:05:09 ?
Dec 03 14:05:09 ?
Dec 03 14:05:09 ?
Dec 03 14:05:09 ?
Dec 03 14:05:09 ?
Dec 03 14:05:09 ?
Dec 03 14:05:09 ?
Dec 03 14:05:09 ?
Dec 03 14:05:09 ?
Dec 03 14:05:09 load bans
Dec 03 14:05:09 load font
Dec 03 14:05:10 no fonts available : SHIFTJIS
Dec 03 14:05:10 no fonts available : CHINESEBIG5
Dec 03 14:05:10 no fonts available : GB2312
Dec 03 14:05:10 no fonts available : HANGUL
Dec 03 14:05:10 -----
Dec 03 14:05:10 create english file
Dec 03 14:05:10 initialisations
Dec 03 14:05:10 tables
Dec 03 14:05:10 load objects
Dec 03 14:05:10 start intro
Dec 03 14:05:10 Fern Bay
Dec 03 14:05:10 end of initialisation
Dec 03 14:05:10 Emergency send
Dec 03 14:05:11 Handicaps :
Dec 03 14:05:11 Handicaps :
Dec 03 14:05:12 Track loaded
Dec 03 14:05:24 Guest wants to join

This test version;
Quote :Dec 07 04:16:59 LFS DEDICATED HOST : 0.6E
Dec 07 04:16:59 load bans
Dec 07 04:16:59 load font
Dec 07 04:16:59 create english file
Dec 07 04:16:59 initialisations
Dec 07 04:16:59 tables
Dec 07 04:16:59 load objects
Dec 07 04:16:59 start intro
Dec 07 04:16:59 South City
Dec 07 04:16:59 end of initialisation
Dec 07 04:17:00 Track loaded
Dec 07 04:17:01 Handicaps :
Dec 07 04:17:07 Guest wants to join

No question marks anymore and no errors about fonts (because they are not being used anyway now I guess).

What I would like to see is if there really is a difference in CPU performance. Not that it was of any concern but less is always better. Need to wait until it gets busy to make conclusions
Quote from Scawen :
- How should it work when text is typed in?
- Should it prevent new messages being added while you type in a command?

Well yes... You cant see if you typed in a command correctly now before executing because the message output flows between what I type.

But no command is working atm? If I do this;

Quote :
^1CG^7^4»^3nl2dav^8 left the pits (RB4)
/spec cargame.nl

I'm still in my pit garage box with my RB4

Or do I not understand correctly what 'commands' are?
Scawen was asking what we would want. Currently (from what I understand) there is no interactive console.. so right now we cannot do any input.

He does however want US to tell him how exactly it should function, cause he doesn't really understand why we want it (other than acknowledging that it's not 1 odd person, but a decent collective that want it.
Quote from dawesdust_12 :Currently (from what I understand) there is no interactive console..

Quote from Scawen :
It doesn't accept any text input at all yet,

Right.. Made a mistake by not reading fully.

Nobody seen this OK?
Your secret is safe with me. :P I won't tell anyone you're illiterate

I'm definitely happy about the potential of this. I wanna debug why Wine is trying to create a Window. If it's Wines fault, or if it's LFS.
Well...

I think.. I have no problems with that. I just run this in a screen;

./start_s2 ;
Quote :
#nohup wine LFS_06E.exe /cfg=setup_s2.cfg >/dev/null
wine LFS_06S.exe /cfg=setup_s2.cfg

Don't see any problems reported. (06S stands for special btw in case you wonder )
I get weird issues about wine not being able to create a screen. Before it wouldn't even work, now however with the console version it will start even with the errors.

I'm gonna see about recompiling my wine without x11 support. Force it to use ttydrv.

Note: My server is headless. I can get it to start without errors if I start it with X forwarding enabled, but my intent is to get a proper server running, that will start with init.d and everything as part of boot.

EDIT: Scawen: Does LFS try to do anything weird with the system tray (or any window calls.. icon.. anything)? I don't reckon it does, but I'm just trying to go through everything, and the error message I get is "Could
not create tray window." (From WINE, not LFS.. so don't be too alarmed).. I'll do some more testing and investigating.. but I figured I'd ask anyway.

EDIT2: I can get it to load in Linux now flawlessly if I forcibly start a cmd prompt. So if I go

wineconsole --backend=curses cmd
cd ~/lfs/
DCon.exe /cfg=setup.cfg

That loads it now up for me without Wine complaining about trying to create a window... which is correct. Which makes me think that DCon is close to actually being a true console application, just that when it's executed directly (not through a existing cmd shell) that it does something that a console app shouldn't. It could be sometihng as simple even as changing window name.

Nevertheless: It's progress Scawen, Thank you very much for this first release. It definitely shows a lot of promise towards having a really good console Dedi-server, which has the benefit of being even more compatible in Linux in Wine (which is great for servers!)
Quote from dawesdust_12 :
Note: My server is headless. I can get it to start without errors if

To be clear, I'm used to headless servers for years now.. In fact... If LFS wouldn't have had a dedi option capable of running on a headless Linux server I wouldn't even be here in the first place because it was the first thing where I was looking for considering race games/sims.

And I'm using a pretty old version of wine for LFS/Airio, nothing special;

Quote :
rpm -qa wine
wine-1.2.3-1.el5.rf

And no X11... So I don't get it why you experience problems with LFS, Wine and that its trying to create a window. I almost think you have some sort of configuration problem. Are you 100% sure you use the /invisible option in LFS dedi config?

What you can do is a X11VNC trick to actually get a graphical environment on remote to check what window you get but thats a different story.

.
I'm using a new version of Wine (1.5). I'm positive I use the Invisible option. You didn't compile your wine from scratch either... There is 2 types of GraphicsDriver options in Wine (which I can't find in newer versions..) There's x11display and ttydrv. ttydrv is totally headless, but x11display of course relys on X. You used to be able to, in ~/.wine/config set the Graphics Driver.. but since they went and took their CFG and used their Registry structure.. I think the option has been omitted.

I can try compiling a fresh version of wine and intenionally omit x11 support... which I may do.
#14 - PoVo
Very nice! This is something I've always wanted. It works great in Wine!

The only thing that could me improved is adding text colours or just removing the colour codes from the text
Am I the only one having issues with Wine? I don't have X installed anymore.. I'm recompiling wine from source as well.

EDIT: I just compiled from source with -no-xsupport as a flag. It hasn't changed much behaviour other than the error message saying no graphics driver (which makes sense as I took X11 out.
#16 - PoVo
I use Wine 1.4.1 from EEPL with Centos 6 x64 and it worked fine on the first try :-)
Maybe I have bad luck or something.. I haven't done anything weird. I installed wine from Repo and had issues.

It's better now though I think since I compiled my own.
I always wanned to have log file that contain all log data from beginning. Maybe like option to choose all/last session.
fopen(name,"a");

Briefly tested on a headless Debian stable box with wine 1.0.1, and an Ubuntu 12.10 desktop with wine 1.4.1. Works flawlessly thus far.

With regards to what I'd personally want (I'm probably atypical) - currently when running LFS I have it setup to auto-run using a sysvinit script, so I'm not that bothered about an interface to type commands into. I'm more bothered about using InSim as an RCON-style interface, and the dedi using less resources
Nah I don't really see the point to spend enormous amounts of time on this to fine-tune the output with colored fonts or removing/altering output.

Who is going to stare at this the whole day anyway?

The only functionality I see is that it might be handy in mobile phone situations that when you are on the move and need to execute an admin command without being capable to login with LFS itself or LFS remote (which is Flash and thats not so good cause mobile phones dont like that).

If there is focus on dedi server functionality then its better to spend the available time to design a readout port so you can check the server status with a single request so we are able to add our servers to the major internet lists on the net like www.game-monitor.com and www.gametracker.com for example. Good and pretty simple promotion opportunity for LFS.

.
Well.. Colour shouldn't be hard. There are some pretty simple methods for doing colour in the Win32 Console API.

There should be basics. Be able to get current state. So current drivers, current track, current permissiable cars, that fun stuff.
From a quick look, I can't see how to do colour. How to do it seems to depend on where the output is going. I can only see how to do colour on Linux consoles, not Windows.

Anyway that is of low priority. I think there should be an option to show the text with or without ^X colour codes. If you want to take that output text from stdout and show it on another system, you might like to use the colour codes. I'm thinking one more option is needed, to avoid "high ascii" characters. When displayed on a linux console, e.g. using "screen" some of those higher Latin characters can start moving the cursor around and various funny things. So if you aren't piping the output to your own program, you might want to just have question marks instead of ambiguous or troublesome characters.

About input, I'm thinking maybe it should be invisible, so we have a complete separation between input and output. So you could still type /exit or /restart or /ban dawesdust_12 999 but you will not see that text while you type it. This means (according to my limited understanding about console applications) you could send text in either from the keyboard or stdin some other way and it doesn't directly affect the output.

It's worth carrying on with this today. By removing libs, I'm also able to cut out some calls to Windows functions. I don't know if that might help with Wine, but anyway it's part of the appropriate cleaning up and simplification of this program.
it will be confusing if input is invisible. How about to frezze output when command is started typing (show input) and after pressing ENTER to do all output from some buffer?
Well, Irssi/PuTTY for Windows has both colours and a static input line that isn't written over. I don't know what that means, but maybe it's possible since apart from the PuTTY configuration window, it runs in a console window.
http://www.daniweb.com/softwar ... lor-to-your-console-text#

Scawen: I don't know how useful that link is to you.. Setting colours on text in Windows is a little bit stupid (Every character in a console is 4 bytes, 2 bytes of data, 2 bytes of attribute), but it is possible (and will work in Wine if ran through wineconsole as it re-implements all that functionality).

An invisible cmd prompt would be acceptable, and probably the only option without going to doing stuff like ncurses (or there are methods for writing to a specific screen area in WinAPI as well).

Also: Scawen.. you already did the /ban dawesdust_12 999 once.. you don't need to do it again :P
1
This thread is closed

Console Dedicated Host TEST
(26 posts, closed, started )
FGED GREDG RDFGDR GSFDG