Spring without rendering

Spring without rendering

Discuss the source code and development of Spring Engine in general from a technical point of view. Patches go here too.

Moderator: Moderators

Post Reply
User avatar
Licho
Zero-K Developer
Posts: 3803
Joined: 19 May 2006, 19:13

Spring without rendering

Post by Licho »

- Is it possible to disable rendering completely? I would like to get dedicated host functionality, and I don't really need rendering.

- And are there any plans to implement some sort of interprocess communication (spring relaying chat to other process on demand, causing spring to force start, kick someone or to exit game and such). I'm currently using "hacks" to get that functionality for springie autohost (sending WM keypresses to spring window to cause it to force or type chat).
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

Spring doesnt render if you minimize it, which can be done via command line parameters.
User avatar
Licho
Zero-K Developer
Posts: 3803
Joined: 19 May 2006, 19:13

Post by Licho »

Can you please tell me what parameter it is?

Why it still eats 100% cpu if I minimize it manually?
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Post by Argh »

Because Spring is using a lot of CPU, whether or not your GPU is getting used. Minimizing it just removes the load from the GPU.
User avatar
Licho
Zero-K Developer
Posts: 3803
Joined: 19 May 2006, 19:13

Post by Licho »

I thought that max CPU usage is because it's processing frames - as quickly as possible, for rendering. I cannot think of any other reason why should it always take 100%
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Post by Argh »

Most of the CPU use of Spring is pathfinding and Simulation time, not graphics processing. That said, it may be hogging processor time more than most dedicated servers would, because it needs to maintain sync. I'm sure that Tobi could give a far better explanation than I can, however.
User avatar
Licho
Zero-K Developer
Posts: 3803
Joined: 19 May 2006, 19:13

Post by Licho »

Ahh .. sems I confused it with previous versions. Now minimised spring eats ~ 0 CPU :)

What is the commandline param to start minimised?
User avatar
yuritch
Spring 1944 Developer
Posts: 1018
Joined: 11 Oct 2005, 07:18

Post by yuritch »

In Windows:

Code: Select all

start /MIN spring.exe
Typing start /? in command line will give you a list of other start options. There are some interesting commands, including setting process priority at start.
I'm not sure, maybe Spring itself has an option to start minimized, but start command can be used with everything.
Tobi
Spring Developer
Posts: 4598
Joined: 01 Jun 2005, 11:36

Post by Tobi »

Code: Select all

spring.exe /minimise
Ought to work. It will minimise itself just after the window is created.

While minimised, the drawing routine is replaced by a short sleep, so it's almost impossible for spring to reach 100% CPU while minimised.

EDIT:

Ideally someone (me?) would split up server (which is basically a simple multicast deamon with some validity checks) and client code, so the dedicated server wouldn't need to be spec (and run the entire simulation).

Once this is implemented a dedicated server will take very few system resources.

(Not sure about windows, but on linux I can see two spring processes while running spring, one taking over 60% CPU usually, and one taking only 1% every now and then. The last one is the server thread, which is technically the only thing needed for a dedicated server. Unfortunately spring always assumes player 0 is server and the server is player 0, so this needs to be decoupled first...)
User avatar
Licho
Zero-K Developer
Posts: 3803
Joined: 19 May 2006, 19:13

Post by Licho »

Could you also add parameter to hide window completely? I don't mean not creating, but creating invisible ...
Window is a nice thing (I can send commands to it) but I'm going to hide spring window anyway for autohost.
User avatar
Licho
Zero-K Developer
Posts: 3803
Joined: 19 May 2006, 19:13

Post by Licho »

Regarding /minimise switch ..

It starts minimised, but still takes 100% cpu .. I have to maximize it and then minimize manually and then it's ok and eats 0%
Tobi
Spring Developer
Posts: 4598
Joined: 01 Jun 2005, 11:36

Post by Tobi »

Ah, that was a bug in 0.73b1, it's fixed in SVN already.
User avatar
Licho
Zero-K Developer
Posts: 3803
Joined: 19 May 2006, 19:13

Post by Licho »

There is indeed some sort of bug if you minimize spring too soon after starting it, countdown continues to negative numbers and game never starts :)
To fix it you only need to restart and minimize window again.
User avatar
Brabby
Posts: 7
Joined: 04 Jan 2007, 10:43

Post by Brabby »

Hello, I follow the development of Springie already for a while, great project Licho, at the moment i try to let run a dedicated server in a VMware (Debian ROOT-Server).
However, I fail in missing direct3d support of the VMware.
Error Message: Update Drivers
'Needed extension GL_ARB_texture_env_combine not found!'

Is it possible to disable rendering completely and checking for this Extension?
Would be it to be inserted possibly a start option like /minimise rendering completely switches off and also does not check the direct3d support?

Greeting
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

there is a command line parameter that starts spring minized, whats exactly I've forgotten but tobi told me ages ago on msn.
Tobi
Spring Developer
Posts: 4598
Joined: 01 Jun 2005, 11:36

Post by Tobi »

AF, please read threads before you post. 4 posts above yours is the switch you mention........
User avatar
grumpy_Bastard
Posts: 105
Joined: 18 Oct 2006, 22:31

Post by grumpy_Bastard »

Brabby wrote:Hello, I follow the development of Springie already for a while, great project Licho, at the moment i try to let run a dedicated server in a VMware (Debian ROOT-Server).
However, I fail in missing direct3d support of the VMware.
Error Message: Update Drivers
'Needed extension GL_ARB_texture_env_combine not found!'

Is it possible to disable rendering completely and checking for this Extension?
Would be it to be inserted possibly a start option like /minimise rendering completely switches off and also does not check the direct3d support?

Greeting
Ive been having this problem as well. I was looking forward to running spring under Vmware, its not an option to run it on the main operating system (if one thing crashes, everything goes down, in vmware if one VM crashes... no big deal).
User avatar
Licho
Zero-K Developer
Posts: 3803
Joined: 19 May 2006, 19:13

Post by Licho »

In decent OS if one thing crashes, system stays .. unless you have DOS or Windows 95/98 server ;-)
User avatar
Peet
Malcontent
Posts: 4384
Joined: 27 Feb 2006, 22:04

Post by Peet »

It is not terribly uncommon that spring causes total system instability.
User avatar
Licho
Zero-K Developer
Posts: 3803
Joined: 19 May 2006, 19:13

Post by Licho »

How would it do? Only harm it can do is to monopolize CPU if you run it at high priority...

But otherwise unless you have faulty drivers or HW you are safe..
Post Reply

Return to “Engine”