Turn off graphics and speed up gameplay?

Turn off graphics and speed up gameplay?

Here is where ideas can be collected for the skirmish AI in development

Moderators: hoijui, Moderators

Post Reply
hajoch
Posts: 2
Joined: 12 Nov 2015, 13:25

Turn off graphics and speed up gameplay?

Post by hajoch » 12 Nov 2015, 13:42

Hi,
I'm currently working on a project where I'll use Genetic Programming in combination with Behaviour Trees to evolve AI bots for RTS games. To be able to evolve a big population over a high number of generations I'll need to be able to turn off graphics and speed up the game-time SIGNIFICANTLY, since I can't afford to have the evolution run for literally years.

So my question is if it would be possible to programatically start a speed up game simulation running without graphics?
0 x

gajop
Moderator
Posts: 3023
Joined: 05 Aug 2009, 20:42

Re: Turn of graphics and speed up gameplay?

Post by gajop » 12 Nov 2015, 13:48

Yes, spring-headless for no graphics and minspeed/maxspeed in modoptions of a script.txt to control speed.
Also see https://github.com/gajop/botrunner and https://github.com/gajop/springgrid for automating it (although the two projects are unmaintained atm).
0 x

User avatar
Beherith
Moderator
Posts: 4934
Joined: 26 Oct 2007, 16:21

Re: Turn of graphics and speed up gameplay?

Post by Beherith » 12 Nov 2015, 13:53

Absolutely. That is what spring-headless is for. It runs the simulation, without the GUI. You can even just set minimum sim speed from a widget if you desire.

spring-headless.exe --config headless.cfg

Here is a link to an older engine headless (most recent you will have to build from source)http://springrts.com/dl/buildbot/defaul ... 8.0/win32/

Headless.cfg:

Code: Select all

#
# This is a config template for running the headless version of spring.
# It will prevent some crashes and reduce the CPU load.
#
# To use it, you should copy it to one of these locations:
#
# Linux & Mac:
# ~/.springrc
# ~/.springrc-<version>
#
# Windows:
# %APPDATA%\springsettings.cfg
# %APPDATA%\springsettings-<version>.cfg
#
# While "<version>" would be something like "0.81.2.1",
# and "%APPDATA%" something like
# "C:\Dokumente und Einstellungen\MyUser\Anwendungsdaten".
#
# Note: These comments will be gone after the first launch of spring.
#
# This will be set by the engine itself at runtime:
# Headless=1
#

3DTrees = 0
AdvUnitShading = 0
AtiHacks = 0
BumpWaterReflection = 0
BumpWaterRefraction = 0
BumpWaterShoreWaves = 0
BumpWaterTexSizeReflection = 0
BumpWaterUseDepthTexture = 0
Fullscreen = 0
GrassDetail = 0
GroundDecals = 0
GroundDetail = 0
GroundLODScaleReflection = 0
GroundLODScaleRefraction = 0
GroundLODScaleUnitReflection = 0
InputTextGeo = 0.26 0.73 0.02 0.028
JoystickEnabled = 0
LodScale = 1.00
LodScaleReflection = 1.00
LodScaleRefraction = 1.00
LodScaleShadow = 1.00
LuaAutoEnableUserWidgets = 1
LuaModUICtrl = 0
LuaShaders = 0
LuaUI = 0
MaxNanoParticles = 0
MaxParticles = 0
MaxSounds = 0
MiniMapDrawCommands = 0
MiniMapDrawProjectiles = 0
MiniMapIcons = 0
MiniMapMarker = 0
OrbitControllerEnabled = 0
OverheadEnabled = 0
ROAM = 2
ReflectiveWater = 0
RotOverheadEnabled = 0
SMFTexAniso = 0.0
Shadows = -1
ShowClock = 0
ShowHealthBars = 0
ShowPlayerInfo = 0
ShowRezBars = 0
SmoothEnabled = 0
SmoothLines = 0
SmoothPoints = 0
SmoothTiltSpeed = 0
TWEnabled = 0
TeamNanoSpray = 0
TooltipOutlineFont = 0
TreeRadius = 0
UnitIconDist = 0
UnitLodDist = 0
UsePBO = 0
VSync = 0
XResolution = 113
YResolution = 1
0 x

hajoch
Posts: 2
Joined: 12 Nov 2015, 13:25

Re: Turn off graphics and speed up gameplay?

Post by hajoch » 12 Nov 2015, 14:10

Perfect. Thank you for the fast replies.
Will try it out
0 x

abma
Spring Developer
Posts: 3556
Joined: 01 Jun 2009, 00:08

Re: Turn off graphics and speed up gameplay?

Post by abma » 16 Nov 2015, 11:16

Beherith wrote:Here is a link to an older engine headless (most recent you will have to build from source)http://springrts.com/dl/buildbot/defaul ... 8.0/win32/
wrong, since spring 99.0 spring-headless is included in all downloadable archives and the windows installer, i.e. https://springrts.com/dl/buildbot/defau ... ortable.7z

also there is no extra config file required, spring-headless contains the special config. see the output of

Code: Select all

spring-headless.exe --list-config-vars |more
i can only advice to read the changelog next time ;-)

https://github.com/spring/spring/blob/d ... g.txt#L221
https://github.com/spring/spring/blob/d ... og.txt#L86
0 x

User avatar
PauloMorfeo
Posts: 2004
Joined: 15 Dec 2004, 20:53

Re: Turn off graphics and speed up gameplay?

Post by PauloMorfeo » 04 Jan 2016, 00:43

hajoch wrote:Hi,
I'm currently working on a project where I'll use Genetic Programming in combination with Behaviour Trees to evolve AI bots for RTS games. ...
I am deeply interested in everything related to evolutionary programming (I did Genetic Algorithms with Neural Networks for games in my Computer Science course's final project). Please keep us posted on what/how you're doing it.

I reckon you have some kind of professor orienting you. But even if you do, maybe I can even give you some advice from my past experience with my previous work (a bit similar).
0 x

Post Reply

Return to “AI”

cron