Page 1 of 1

List of stuff we will need for single player.

Posted: 17 Feb 2015, 18:35
by smoth
Super mario, please don't reply. If you don't like chili, you may still reply but any derails and I WILL report you for offtopic.


We are going towards the point where we finally can have a user experience inside of spring.exe.

So far we can change maps, have a rudimentary lualobby and a wip mission system along with rapid support(also wip?) from Gajop.

So let's start A loose list of things we are still missing. I can update the first post here as stuff is completed or needs to be added to the list.

Of the top of my head, we still cannot add or remove players/ais. IIRC we can change teams etc?

So:
  • teams
    • add, remove
  • ais.
    • add, remove
    • Dynamic list of currently available/allowed AIs
  • maps
    • Lua access to images packed within map archive's .smf files

Re: List of stuff we will need for single player.

Posted: 17 Feb 2015, 19:18
by Funkencool
smoth wrote: Of the top of my head, we still cannot add or remove players/ais. IIRC we can change teams etc?

So:
add, remove: teams, ais.
I'm assuming you mean beyond the start script and for something like a midgame addition of an AI for a mission?

On a similar note does spring supply a list of currently available AI's to lua?
If not that should be on list. A static array would probably do the trick just as well since new AIs are rare, but a dynamic solution would be the smarter one.

With that in mind, my two additions would be:
1. Dynamic list of currently available/allowed AIs
2. Lua access to images packed within map archive's .smf files

Re: List of stuff we will need for single player.

Posted: 17 Feb 2015, 19:29
by smoth
We can get if the team is an AI by doing the following:

Code: Select all

local _,_,_,isAI,side = Spring.GetTeamInfo(t)
*edit* appologies, I thought you meant if the new team is an AI or not.

Probably not, I am unsure, I didn't see it in the wiki but I am not very good at that sort of thing.

Re: List of stuff we will need for single player.

Posted: 17 Feb 2015, 19:49
by Funkencool
I mean a list of AI's that can be used ( CAI, KAIK, etc..)

edit: Nm, seems you must have got that right when I was replying

Re: List of stuff we will need for single player.

Posted: 17 Feb 2015, 20:32
by gajop
Short post, might think of other things tomorrow:
- Alliance change (supported via Spring.Reload() maybe..?)
- Mission format support for missions/scenarios
- available AI list that funk mentioned (can confirm it's not present)
- save/load per game, but maybe we can add engine support/create libs for that?

Re: List of stuff we will need for single player.

Posted: 18 Feb 2015, 00:21
by Super Mario
smoth wrote:Super mario, please don't reply.
?????? I don't like being single out like I'm some trouble maker here.

I was going to talk about the save feature and how we might set up for a bounty for it, but if you insist I won't say any further this post.

Re: List of stuff we will need for single player.

Posted: 20 Feb 2015, 05:34
by gajop
I'll expand on my previous post:
gajop wrote:- Alliance change (supported via Spring.Reload() maybe..?)
Spring has a concept of players/AIs, teams, allyTeam and alliances between allyTeam. The last one to allow an alliance: allyTeam1->allyTeam2 (asymmetric), without any vision sharing (not possible to change this dynamically).
It's not possible to change a team's allyTeam dynamically (add/remove allyTeams is also lacking).
We could add support for that (disclaimer: I'm not sure if it's needed or not for singleplayer, maybe Spring.Reload() supports it already), OR we could be brave and ask for a total cleanup: removal of team/allyTeam/alliance and instead have a graph of alliance/vision share instead. The second option would be a lot of work, which might be best to avoid for now (it's certainly not needed for singleplayer support).
gajop wrote: - Mission format support for missions/scenarios
This is also not strictly needed for singleplayer, but it would be important to have if we want better support for missions. Maybe we should consider this a second step once we can properly setup skirmish games?
gajop wrote: - save/load per game, but maybe we can add engine support/create libs for that?
We should consider what needs to be done so games can implement this easily, and we certainly should extend this to a (few) Lua functions instead of just /save /load.
Also it would be important to allow some sort of compatibility of save games between versions, which I'm not sure if it has been considered at all. In any case more work is needed here, but this too, like missions, might not be the first thing we do.

Re: List of stuff we will need for single player.

Posted: 22 Feb 2015, 01:07
by abma
I'm assuming you mean beyond the start script and for something like a midgame addition of an AI for a mission?
this question is unanswered and very important for the response.
Of the top of my head, we still cannot add or remove players/ais. IIRC we can change teams etc?
in which stage do you mean? before a game starts? you setup players / alliances / whatever in script.txt which can be used with spring.Reload(). an ai can be started/stopped in game with

Code: Select all

/aikill
/aicontrol
https://springrts.com/wiki/AI:Developme ... ting_infos


afaik you have to create the teams before the game starts, but that shouldn't be a problem for a mission which should have "static" teams. changing teams ingame imo isn't needed / the current functionality should be enough to make missions / good singleplayer content.

see https://github.com/spring/spring/blob/d ... Format.txt for ideas what could/should be currently possible with script.txt.

so yes, we can change teams. when you want to do that when a game is running its restricted to what gajop said.

Re: List of stuff we will need for single player.

Posted: 25 Feb 2015, 06:49
by Funkencool
Side data from game archives/dirs
-> so player can choose game, then select side in said game before launching (also for AI's).

It would be nice if these were returned with VFS.GetGames()
If not it could at least return the filename or dir (for .sdd) so something like this could work

Code: Select all

if archive then
  sides = VFS.UseArchive(filename, function() return include("gamedata/sidedata.lua") end)
else
  sides = include("games/" .. dirname .. "/gamedata/sidedata.lua")
end

Re: List of stuff we will need for single player.

Posted: 03 Mar 2015, 04:24
by Google_Frog
I think proper save/load game is required. I am trying to improve the lua save/load found in ZK but lua is not powerful enough to do it (without massive hax). I am making some feature requests.

Re: List of stuff we will need for single player.

Posted: 03 Mar 2015, 07:21
by 8611
a start button

Re: List of stuff we will need for single player.

Posted: 03 Mar 2015, 18:59
by smoth
as in a game shortcut or starmenu?

Re: List of stuff we will need for single player.

Posted: 04 Mar 2015, 10:07
by PicassoCT
A audience for blindfold panel testing.

Meaning, your relatives who where never into gaming, set in front of a running pc and a camera running.
A strict exclusion of "Hur, durr you have the terminal stoopids cause not learning in leisure-time"-atttitude from the testing and gui-profiling.
And yes, if they have to ask you or get lost, or take longer then three minutes, or have to look into the manual.
The gui is not good, not good as in not selfexplaining, not selfguiding, not well enough in complexity hiding.