Autohosting

Autohosting

Various things about Spring that do not fit in any of the other forums listed below, including forum rules.

Moderator: Moderators

Post Reply
User avatar
Caydr
Omnidouche
Posts: 7179
Joined: 16 Oct 2004, 19:40

Autohosting

Post by Caydr »

What software/hardware is necessary to set this up?
User avatar
Neddie
Community Lead
Posts: 9406
Joined: 10 Apr 2006, 05:05

Post by Neddie »

1. A computer capable of playing Spring at a good framerate, without heat issues.
2. Stable internet, ADSL or better
3. Stable power supply
4. Spring.
5. Licho's Autohost Application - http://taspring.clan-sy.com/phpbb/viewtopic.php?t=7921
6. Mod.
7. Maps.

You can do it, Caydr.
User avatar
LOrDo
Posts: 1154
Joined: 27 Feb 2006, 00:21

Post by LOrDo »

Though its especially nice if your computer is on all the time.
User avatar
caldera
Posts: 388
Joined: 18 Oct 2005, 20:56

Post by caldera »

what do i have to do if i want to run a autohost and also play on it (with same ip?) i never got that to work.
imbaczek
Posts: 3629
Joined: 22 Aug 2006, 16:19

Post by imbaczek »

not sure, but you might try to use different directories for the autohost and your usual game, and just make them share data with SpringData reg key/config var.

Only Licho knows 100%, though.
User avatar
Licho
Zero-K Developer
Posts: 3803
Joined: 19 May 2006, 19:13

Post by Licho »

Yeah for some reason, since last spring update you have to copy spring to another directory (have two copies) and let autohost run on one of them while running tasclient from another.

Then it works.
User avatar
caldera
Posts: 388
Joined: 18 Oct 2005, 20:56

Post by caldera »

thanks, didnt know that
User avatar
KDR_11k
Game Developer
Posts: 8293
Joined: 25 Jun 2006, 08:44

Post by KDR_11k »

caldera wrote:what do i have to do if i want to run a autohost and also play on it (with same ip?) i never got that to work.
Just do it? I'm doing that just fine, though it does sometimes make Spring start in a tiny non-resizable window.
User avatar
Licho
Zero-K Developer
Posts: 3803
Joined: 19 May 2006, 19:13

Post by Licho »

Yeah this is because sequence of event is such:

1.) springie decides game should start and notifies lobby server
2.) springie waits 1 second and then changes Spring registry settings (small window, lower details, no lua)
3) springie starts hosting spring
4) springie waits till hosting spring starts to respond and then restores registry to original settings


Between steps 1 and 2 this has to happen:
- lobby server must recieve data about game start
- lobby server must notify your tas client that game should start
- your tas client must start game spring
- your spring must read registry settings

If it doesnt happen under 1 second, your own game spring reads registry settings intended for hosting spring and small window appears instead of regular one.


When it was other way (first starting hosting spring and then notifying lobby server about game start) it used to desync, because people managed to change settings (color, team) during that 1 second ..
User avatar
Caydr
Omnidouche
Posts: 7179
Joined: 16 Oct 2004, 19:40

Post by Caydr »

I wonder, could virtual PCs be Spring hosts? With a heavy duty quad core processor you could probably get 8 hosts running at good speed.

Also I wonder if the autohosting could be done on a server somehow? I mean, is it technically possible somehow? I know it probably can't be done currently. I'm just thinking, it'd be cheaper to pay $50 a month for a high end server with a good CPU quota than it would be to have a dedicated computer and another internet connection.
User avatar
Peet
Malcontent
Posts: 4384
Joined: 27 Feb 2006, 22:04

Post by Peet »

Caydr wrote:I wonder, could virtual PCs be Spring hosts? With a heavy duty quad core processor you could probably get 8 hosts running at good speed.
If you can find a VM that has decent graphics card emulation yes. (In other words, no.)
User avatar
Caydr
Omnidouche
Posts: 7179
Joined: 16 Oct 2004, 19:40

Post by Caydr »

Peet wrote:
Caydr wrote:I wonder, could virtual PCs be Spring hosts? With a heavy duty quad core processor you could probably get 8 hosts running at good speed.
If you can find a VM that has decent graphics card emulation yes. (In other words, no.)
Then we need better developer-side support for CPU-only dedicated hosting. There's no reason at all why we should need to even have the GPU involved.

If I was feeling adventurous I might actually try that quad-core thing in 6 months or something when they're cheaper and I'm richer. Would be a good way to get some relatively unplayed mods in the public eye. Ideally we could have 2 Gundam, 2 Nanoblobs, 2 Kernel Panic, 1 FF, 1 TAWD or something.

I'd be willing to buy the computer and set up a second high speed line if it could be workable. Maybe set up a donation thing (someone else like JC could have control over it if it's a trust issue) and every 6 months I could set up a new 8-host computer.

Has anyone here done testing on how much bandwidth Spring consumes in an average game? How many simultaneous hosting sessions could be running on a low-latency 8mbps line?

Figure...
$100 for PSU
$100 for motherboard with basic onboard video
$200 for CPU
$100 for RAM

I could afford that once every 6 months probably. I wonder what type of hard drive would be best?

In a year's time, I could probably set up 24 autohosts, that'd be awesome for Spring.
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

You do know theres a command line parameter that makes spring startup minimized with no rendering at all?
Tobi
Spring Developer
Posts: 4598
Joined: 01 Jun 2005, 11:36

Post by Tobi »

You still need graphics card drivers with proper OpenGL support to get it initialized. The commandline option is really ment to be only a automated way to press the minimize button just after game start.
User avatar
Caydr
Omnidouche
Posts: 7179
Joined: 16 Oct 2004, 19:40

Post by Caydr »

How much does Spring access the hard drive? Would it make a difference if I had one hard drive for every Spring install?
Tobi
Spring Developer
Posts: 4598
Joined: 01 Jun 2005, 11:36

Post by Tobi »

No. It only loads the mod and the map and writes demo/infolog, if you are talking in dedicated hard drives already, just get some extra RAM instead so entire mod and some maps can sit in OS cache continuously.
User avatar
Caydr
Omnidouche
Posts: 7179
Joined: 16 Oct 2004, 19:40

Post by Caydr »

Does that have to be specially configured or does spring just load as much into the RAM as it can?
Tobi
Spring Developer
Posts: 4598
Joined: 01 Jun 2005, 11:36

Post by Tobi »

Actually it lazy loads (loads whenever needed, then keeps it in memory).

But if the OS already has the file in cache then you're just reading ultra fast RAM... (through decompressing 7z does take some CPU)

Spring can not be configured to load everything on game start.
User avatar
Licho
Zero-K Developer
Posts: 3803
Joined: 19 May 2006, 19:13

Post by Licho »

AF, springie is using that command as well, but it still creates fullsize window (even with /minimise - highly annoying if you are trying to do stuff on that pc) + LUA can cause slowdowns and crashes, that's why it's tweaking registry. However I think you can disable it in springie settings.

Caydr - autohosted spring puts highest load on your RAM and then on CPU. Regular games eat bout 200MB and some 5-15% CPU on my Athlon XP 2500+.

Bandwidth is neglible, it's about 5-8k/s both up and down for 16 ppl autohost.

As Tobi said you need to have OpenGL suppot even if the rendering is not visible at all. And windows remote desktop/locking your pc actually permanently breaks spring and prevents it from starting.


Afaik, in theory, there is no need for spring hosting to use CPU/GPU so intensively, since it's synced game host doesn't have to "be there" and simulate whole game, it only needs to forward packets to clients.
vraa
Posts: 79
Joined: 21 Jun 2007, 03:47

Post by vraa »

If someone could get the theory part working (ie, no rendering or anything) so I could host multiple games, that'd be fantastic!

It could even be so that no one ever even sees a hosting window. It will just be like playing someone can have random games like Halo does in Xbox Live or we can start best matched opponents games -- things like that.
Post Reply

Return to “General Discussion”