GameTestServer

GameTestServer

Discuss game development here, from a distinct game project to an accessible third-party mutator, down to the interaction and design of individual units if you like.

Moderator: Moderators

Post Reply
User avatar
PicassoCT
Journeywar Developer & Mapper
Posts: 10450
Joined: 24 Jan 2006, 21:12

GameTestServer

Post by PicassoCT »

So i want to create a server locally (small machine) that basically does nothing, but pull the most resent mosaic version and play bot vs bot games, while saving the logs. Has anyone here tried a similar setup?

Ive looked at the AI-links
https://springrts.com/wiki/AI:Links
but didnt find something useful.

Anyone some suggstions? Thanks.
ChaosNX
Posts: 1
Joined: 01 Oct 2021, 19:26

Re: GameTestServer

Post by ChaosNX »

on your local server for testing you could put a git hook in to run your tests


Code: Select all

# on local server

# create a path for bare repo's
mkdir -p /home/<user>/gits/bare/

# Create a bare repo to push stuff into from local computer
git init --bare /home/<user>/gits/bare/MOSAIC

# make post-recieve file
touch /home/<user>/gits/bare/MOSAIC/hooks/post-recieve
chmod +x /home/<user>/gits/bare/MOSAIC/hooks/post-recieve

# add contents of post-recieve

git clone /home/<user>/gits/bare/MOSAIC /home/<user>/.spring/games/MOSAIC.sdd
inside post-recieve

Code: Select all

#!/bin/sh
GIT_WORK_TREE=/home/<user>/.spring/games/MOSAIC.sdd/ git checkout -f

spring-headless /home/<user>/.spring/games/MOSAIC.sdd/test/script1.txt &
spring-headless /home/<user>/.spring/games/MOSAIC.sdd/test/script2.txt &

#FIGHT
exit

Code: Select all

# on local programing computer
# setup your .ssh/config with keys
git push --mirror localServerName:/home/<user>/gits/bare/MOSAIC

#to kick off another run on local server
raaar
Metal Factions Developer
Posts: 1094
Joined: 20 Feb 2010, 12:17

Re: GameTestServer

Post by raaar »

You could try setting up spads, setting it to auto-add bots to fill in enough players for a 1v1.

I have done so on the MF servers and there i can set myself to spectator and use !start to watch bots 1v1.

Then you'd need to increase the default game speed (maybe the game itself can trigger that) and automatically trigger the "!start" somehow.

example of some of the relevant spads config settings:

nbTeams:2|3-5
minPlayers:2
autoAddBotNb:1|0-8
localBots:bot1 random MFAI : normal;bot2 random MFAI : normal
Post Reply

Return to “Game Development”