I have followed https://springrts.com/wiki/Building_Spring_on_Linux to compile the engine (the develop branch as master is 2 years old), but now I would need a running game.
I got a map placed it in .config/spring/maps and zero-k git (https://github.com/ZeroK-RTS/Zero-K - mostly because this is what I play, no specific preference), placed it in .config/spring/games/zk.sdd. Started spring with no arguments (default menu), I can select both zk and the map but do not see the lua interface (log at https://pastebin.com/2pcpUqK5).
Ok, maybe need fancier start script. Tried to get chobby git (https://github.com/ZeroK-RTS/Chobby), placed it in .config/spring/games/chobby.sdd. Started with "spring --menu 'Chobby $VERSION'", do not see anything (log at https://pastebin.com/SL22cujd)
Questions:
- is there a simple way to get a game going? (like the commanders script from way back)
- am I doing something wrong with the above steps?
- are the wiki pages considered the main source of information for a newcomer? (I know you should look at the code, but help is still good). If yes, will add some comments here and there to prevent anybody to do same mistakes as me (ex: compile from master and wonder why it fails)
Best way to have a functional game on develop
Moderator: Moderators
- Silentwings
- Posts: 3720
- Joined: 25 Oct 2008, 00:23
Re: Best way to have a functional game on develop
This forum is maybe not the best place for info about running zk-dev but there it looks like you need the engine from the maintainence branch (instead of develop).
Yes, although there are also many people able to answer questions, or subprojects you can get involved in.are the wiki pages considered the main source of information for a newcomer?
Re: Best way to have a functional game on develop
Maybe should I have been more explicit: I do not want to work with zero-k in particular, any game would do (something that have units).
FYI I want to play with the water level in the engine (so, a game with some water units would help, but can probably make water units if the thing starts).
What game is used to test the develop branch?
FYI I want to play with the water level in the engine (so, a game with some water units would help, but can probably make water units if the thing starts).
What game is used to test the develop branch?
- Silentwings
- Posts: 3720
- Joined: 25 Oct 2008, 00:23
Re: Best way to have a functional game on develop
Currently I think none, the develop branch is part way through a long & complex migration to a newer gl version. While that happens the newest engines used by live games are those on the maintainance branch.
Re: Best way to have a functional game on develop
Ok, so assume most lua will be affected by migration hence no gui and/or fancy unit control.
What I am doing now: start BA with simple script (ZK ships refused to fire, probably some lua thing), do "/cheat", do "/give armpship" (any simple way or pointer on how to automate these last 2 steps programmatically ?)
What I am doing now: start BA with simple script (ZK ships refused to fire, probably some lua thing), do "/cheat", do "/give armpship" (any simple way or pointer on how to automate these last 2 steps programmatically ?)
- Silentwings
- Posts: 3720
- Joined: 25 Oct 2008, 00:23
Re: Best way to have a functional game on develop
No, that's the usual way. You can press uparrow to "re-type" previous commands. A widget can bind them to a key (addon.KeyPress, Spring.SendCommands), but it doesn't save much.any simple way or pointer on how to automate these last 2 steps programmatically
Re: Best way to have a functional game on develop
For reference, for the game to start with one unit spawned at a position a widget with the following will do
Did not work with Cheat and Give in the same frame.
Code: Select all
function widget:GameFrame(frame)
if frame == 1 then
Spring.SendCommands("Cheat")
end
if frame == 2 then
Spring.SendCommands("Give armpship @600,100,3300")
end
end
-
- Moderator
- Posts: 2464
- Joined: 12 Oct 2007, 09:24
Re: Best way to have a functional game on develop
You can't run most games on develop because of the graphics rewrite. Most non-engine things won't draw correctly, and there may be other related bugs.
If maintenance is fine, I run ZK on maintenance engines with a standalone ZK.
If you are building spring then you don't need to worry about downloading the engine. Simply pick one engine version and override it with your build. It can be found on windows in 'engine/win32/104.0.1-1156-gb72a9cc'. Make sure to not delete done.txt, as it tells the wrapper that the engine download was completed.
If you really want to run develop, then you're probably better off making a skeleton game with what you want.
The repository links and other information can be found here: http://zero-k.info/mediawiki/index.php? ... Developing
If maintenance is fine, I run ZK on maintenance engines with a standalone ZK.
- Put Zero-K.exe (the chobby wrapper) in an empty folder.
- Run the wrapper to download and install the base game.
- Clone chobby and zk to Games.
- Run Zero-K.exe with 'dev 104.0.1-1156-gb72a9cc' to run dev chobby on the engine called '104.0.1-1156-gb72a9cc'.
If you are building spring then you don't need to worry about downloading the engine. Simply pick one engine version and override it with your build. It can be found on windows in 'engine/win32/104.0.1-1156-gb72a9cc'. Make sure to not delete done.txt, as it tells the wrapper that the engine download was completed.
If you really want to run develop, then you're probably better off making a skeleton game with what you want.
The repository links and other information can be found here: http://zero-k.info/mediawiki/index.php? ... Developing
Re: Best way to have a functional game on develop
Thanks for the detailed answer. It clarifies some things.
Some additions to your observations (of course, when talking about heads branches things might be different when you read this):
Some additions to your observations (of course, when talking about heads branches things might be different when you read this):
- most games will have problems on develop because the initialization of Lua will fail and hence interface and game actions (LuaRules) will exit abruptly. This will also prevent custom widgets execution.
- another way to run zk on the springrts maintenance branch (instructions for Linux):
- cloned both springrts maintenance branch and zk master
- linked zk git to INSTALL_DIR/.config/spring/games
- start spring once, got a script in INSTALL_DIR/.config/spring/_script.txt copied somewhere else (and added GameStartDelay=0 to Game section)
- just run "spring script_copied.txt"
- the skeleton game mentioned can be made from https://github.com/FLOZi/SpringABC - if you just need one/two units you can copy them from other games.
- (looked out of curiosity, please correct me if I am wrong, anyhow I am on Linux and like building and running things) chobby.exe is built from https://github.com/ZeroK-RTS/Zero-K-Inf ... byLauncher