[DONE] Spring.LoadMap

[DONE] Spring.LoadMap

A place for offers of Bounties and discussion of funded proposals.
Post Reply
User avatar
Silentwings
Posts: 3720
Joined: 25 Oct 2008, 00:23

[DONE] Spring.LoadMap

Post by Silentwings »

Original Proposal:
The idea is to add a Spring.LoadMap("mapName") which would reload the currently active game, without changing map+modoptions/alliances/teams/players, on a new map, without going via the desktop and without exiting Spring. Kloot suggested $500 as a suitable bounty, which was met (see below).

Final Proposal:
Added Spring.Restart("startScript") that reloads Spring, without exiting Spring, from the new startScript.

Current status: It's done, thanks Kloot! It's been merged into develop and should appear in Spring 99.0.

Pledges: (total $500)
smoth - $250.
Tim Blokdijk - $166.67
silentwings - $83.33.

Possible extensions & related ideas for new projects:
1) Ability to load a "blank" map, which would mean not really loading a map at all, just a blank background which could be used as a platform for lua based menus/lobbies.
2) Persistence of Lua Socket connections through the reload.

I would ask that this thread is kept only people for who are engine developers, people named above, or people who have enough experience of making singleplayer modes for Spring to make a technical contribution to the discussion. I'll keep this post updated.

Probably since amounts of money are involved I should add a disclaimer: None of this discussion, at all, is legally binding in any way.

Last updated 29/01/2015.
abma
Spring Developer
Posts: 3798
Joined: 01 Jun 2009, 00:08

Re: Spring.LoadMap

Post by abma »

isn't the wiki a better place for this?

http://springrts.com/wiki/Project_proposals
Silentwings wrote:1) Extra arguments, such as Spring.LoadMap("mapName", "gameName")
why not modify Spring.Restart, so it doesn't re-initialize audio/video/start a new process at all?

i'm just unsure what happens to the current lua environment (synced/unsynced). kill it? keep it? or make that configureable?

just some thoughts, the goal is still the same :)
User avatar
Silentwings
Posts: 3720
Joined: 25 Oct 2008, 00:23

Re: Spring.LoadMap

Post by Silentwings »

isn't the wiki a better place for this?
For the moment, we'll use this thread, since its easier to discuss things here.
wouldn't it make more sense to modify Spring.Restart, so it doesn't re-initialize audio/video/start a new process at all? etc
That's exactly the kind of thing that this thread should be used to discuss, my initial feeling is yes, if its possible - but maybe its more complicated than whats proposed above. I'll happily update the proposal if needed; I wrote Spring.LoadMap since thats what Kloot had written.
hokomoko
Spring Developer
Posts: 593
Joined: 02 Jun 2014, 00:46

Re: Spring.LoadMap

Post by hokomoko »

[deleted]
Last edited by hokomoko on 10 Jan 2015, 18:43, edited 1 time in total.
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Re: Spring.LoadMap

Post by smoth »

So are we going to allow the plethora of idea guys to alter the request or is this going to be decided among those paying for the feature? How do I get kloot his money? I have paypal, what is the paypal share so I can adjust my donation to ensure he gets all 250?
Kloot
Spring Developer
Posts: 1867
Joined: 08 Oct 2006, 16:58

Re: Spring.LoadMap

Post by Kloot »

Silentwings wrote:That's exactly the kind of thing that this thread should be used to discuss, my initial feeling is yes, if its possible - but maybe its more complicated than whats proposed above.
(more to abma) Unfortunately it's not a question of just "modifying" Spring.Restart. Because Restart already takes a caveman approach to the problem, those modifications would be as much work as doing the cleanup to support Spring.LoadMap in the first place.

smoth wrote:So are we going to allow the plethora of idea guys to alter the request or is this going to be decided among those paying for the feature?
AFAIAC only donators get a voice.

As I understood your LoadMap request (which I based my estimate and planning on), this is to be used *only* for single-player purposes which means script parameters, number of players, team assignments, etc remain constant. Correct?

To answer your questions from the other thread:
smoth wrote: What does the spring restart control? Can it add players? How does it specify mod/map options? does it carry data from the last map? if so what? what is the scope of that data?
The plan, for now, is that
  • It can not change the number of players.
  • Mod options can be reused, map options would have to be cleared.
  • No data is carried over.
How do I get kloot his money? I have paypal, what is the paypal share so I can adjust my donation to ensure he gets all 250?
This is best handled via PM.
gajop
Moderator
Posts: 3051
Joined: 05 Aug 2009, 20:42

Re: Spring.LoadMap

Post by gajop »

Kloot wrote: No data is carried over.
I'm not sure I understand this right, so I'll ask this just to be sure:
What are your plans on persisting some sort of data and connectivity, e.g. parts of LuaUI and Lua sockets?
If you really don't plan to "save" any data/state from the previous game, what's the point of doing this if we already have Spring.Restart?
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Re: Spring.LoadMap

Post by smoth »

Kloot wrote: As I understood your LoadMap request (which I based my estimate and planning on), this is to be used *only* for single-player purposes which means script parameters, number of players, team assignments, etc remain constant. Correct?
correct! What script params? like start script? That is fine for me.
Kloot wrote:
  • It can not change the number of players.
  • Mod options can be reused, map options would have to be cleared.
  • No data is carried over.
when you say cleared what do you mean? Number of players is not really a problem, I can always start spring with 2-4 gaia players extra to dink around with. is there any possibility to have a table that we can just throw junk into for mission/story purposes?
Kloot wrote:This is best handled via PM.
No problem, just let me know.
User avatar
Silentwings
Posts: 3720
Joined: 25 Oct 2008, 00:23

Re: Spring.LoadMap

Post by Silentwings »

smoth wrote:So are we going to allow the plethora of idea guys to alter the request
No. Only those mentioned as wanting contribution from in the OP. Sounds ok?
Kloot wrote:this is to be used *only* for single-player purposes which means script parameters, number of players, team assignments, etc remain constant. Correct?
As far as I can see it would only be useful for singleplayer (and maybe also multiplayer missions) and thats what I'd intend to use it for. I think it would be useful to be able to add extra teams, because different missions naturally want different numbers/alliances of AI teams. Smoth's suggestion of over-provisioning seems not ideal to me, because it would mean modifying/complicating stuff that reports info on the game/map/etc to ignore the existence of some arbitrary set of teams. Hmm, not sure how to handle that.
Kloot wrote: Mod options can be reused, map options would have to be cleared.
No data is carried over.
I assume data can be stored by widgets & sent/recieved via LuaSocket in the usual way, and I would plan to implement missions as a map in the normal sense with a dependency on an sdz that actually ran the mission. I think this is compatible with the existing formats.
Kloot wrote: How will we test? Will we test the map load in order to try and help kloot as he is working or after he is "done?" because him waiting on our feedback can slow the process down.
We'll have to sort this out based on our collective time constraints. I would hope that at some point we have the specification clear enough that we could each write a cute example mission to use as a unit test.
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Re: Spring.LoadMap

Post by smoth »

Silentwings wrote:Smoth's suggestion of over-provisioning seems not ideal to me, because it would mean modifying/complicating stuff that reports info on the game/map/etc to ignore the existence of some arbitrary set of teams. Hmm, not sure how to handle that.
the whole spring.addteam thing could be another separate request.
Kloot
Spring Developer
Posts: 1867
Joined: 08 Oct 2006, 16:58

Re: Spring.LoadMap

Post by Kloot »

gajop wrote: What are your plans on persisting some sort of data and connectivity, e.g. parts of LuaUI and Lua sockets?
Maintaining connectivity in singleplayer (the only use-case probably) isn't an issue.

LuaUI has its own persistence mechanism (widget:{Get,Set}ConfigData) already, so no widget should mind being reloaded.
gajop wrote: If you really don't plan to "save" any data/state from the previous game, what's the point of doing this if we already have Spring.Restart?
You would have to ask smoth why he prefers LoadMap to Restart, but from where I sit the primary point would be internal cleanup. Restarting the whole engine to load a new map isn't exactly elegant.

smoth wrote: when you say cleared what do you mean? Number of players is not really a problem, I can always start spring with 2-4 gaia players extra to dink around with. is there any possibility to have a table that we can just throw junk into for mission/story purposes?
By cleared I mean as if you had started Spring without specifying any map options at all. Extending LoadMap to take a table of new ones would certainly be feasible though. On the other hand a table with custom data has to be presented to Lua again through some standard callin (or reinserted into _G), so that needs a bit more thought.


Silentwings wrote:As far as I can see it would only be useful for singleplayer (and maybe also multiplayer missions) and thats what I'd intend to use it for.
Ok, great.
Silentwings wrote:I think it would be useful to be able to add extra teams, because different missions naturally want different numbers/alliances of AI teams. Smoth's suggestion of over-provisioning seems not ideal to me, because it would mean modifying/complicating stuff that reports info on the game/map/etc to ignore the existence of some arbitrary set of teams. Hmm, not sure how to handle that.
True, but changing teams or alliances between them means touching a lot more engine code that assumes those are constant during the simulation's lifetime. Let's keep it simple for this first experiment.
Silentwings wrote: I assume data can be stored by widgets & sent/recieved via LuaSocket in the usual way
Yup.
User avatar
Silentwings
Posts: 3720
Joined: 25 Oct 2008, 00:23

Re: Spring.LoadMap

Post by Silentwings »

spring.addteam thing could be another separate request.... changing teams or alliances between them means touching a lot more engine code that assumes those are constant during the simulation's lifetime. Let's keep it simple for this first experiment.
Ok.

Fwiw, there is already Spring.AssignPlayerToTeam and alliances can change dynamically (and through lua iirc), so maybe Spring.Add(Remove)Team and Spring.Add(Remove)AllyTeam would make a good separate project one day.
Extending LoadMap to take a table of new ones would certainly be feasible though.
I would think this is not a priority, although of course I wouldn't object to it, because I would expect each mission to have a custom made (or at least, custom slightly renamed) map.
User avatar
Tim Blokdijk
Posts: 1242
Joined: 29 May 2005, 11:18

Re: [Funded] Spring.LoadMap

Post by Tim Blokdijk »

My main concern is fleshing out the bounty donation system. Making sure that this is a good example on how to do this more in the future. Everything else is optional fun for me.

But as for the implementation these are the optional things I'm interested in:
- Don't show the desktop
My friends expect to launch the game and stay in the game. It's stupid but true. For them showing the desktop means the game crashed.

- Multiplayer missions!
I had a lot of fun with those. Yuri's Revenge had three multiplayer missions and we played them far more then the regular multiplayer games.

- What needs to be done to run multiple maps in parallel?
I have a little sister (ok, she has grown up now) and we used to play Age of Empires together. We would each have our own computer and play the same player in a multiplayer game against one or two computer opponents.
She would build the town, manage the villagers and keep the economy running just fine. And I did the scouting, build walls and do the fighting. We had a great big brother, little sister dynamic - still have and in part thanks to the AoE games we played.

The point here is that we had a big age difference (8 years) with different play styles and the game (AoE) did accommodate this to some extend. But I think it would have worked better if she had her own map to build the base on (free of the actual enemy) and that a galactic gate to another map would allow us to go fight missions. Allowing her to decided for herself how much she would spend with me fighting the aliens, observing me fighting the aliens or just keeping the base on earth running smooth while pushing loaded laser weapons trough the galactic gate.

Now I do wish that at some point other people can have a great bonding experience while playing Spring. So my question is if we van figure out during this bounty what would need to be done to load multiple maps/simulations in parallel? Like browser tabs in Firefox.
gajop
Moderator
Posts: 3051
Joined: 05 Aug 2009, 20:42

Re: [Funded] Spring.LoadMap

Post by gajop »

Tim Blokdijk wrote:My main concern is fleshing out the bounty donation system. Making sure that this is a good example on how to do this more in the future.
I don't think it's the best example really. I really don't expect most bounties of this size (500$) to be funded by just three people. I doubt the average donation would be larger than 20$. They thus need to be made more visible and last longer. They need to be properly defined in separate threads and donations should be done easier (not through private PMs but rather common systems like paypal/bitcoin/credit card).

PS: I partially agree with the proposals you sent me, maybe you should publicize in a different thread and then we can as a community decide if and how it should be modified?
Tim Blokdijk wrote: - Multiplayer missions!
I had a lot of fun with those. Yuri's Revenge had three multiplayer missions and we played them far more then the regular multiplayer games.
I'm one of the people making a mission (scenario) tool, and there are other alternatives such as ZK ME. I'm not available for bounties at this time, but there are certain engine improvements that could be done by someone else that would help with getting multiplayer missions.
This issue is a large one, and additional would be:
1) http://springrts.com/phpbb/viewtopic.ph ... 77#p561377 (medium: creating maps for missions, dynamic texture maps)
2) http://springrts.com/phpbb/viewtopic.php?f=21&t=32225 (really major: standardize the mission format for lobby/engine)
3) http://springrts.com/phpbb/viewtopic.php?f=21&t=28469 (minor: play videos in spring)
4) http://springrts.com/phpbb/viewtopic.ph ... 55#p513555 (dynamically add AIs/players/teams, important for creating missions)
User avatar
Silentwings
Posts: 3720
Joined: 25 Oct 2008, 00:23

Re: [Funded] Spring.LoadMap

Post by Silentwings »

I'm sure you are right that this is not a vanilla example of what future crowd sourcing might look like. But it's hopefully a useful experiment in it, and maybe also a useful credential for a future effort.

I haven't read Tim's proposals in detail yet, but my only initial thought is that we should preserve the distinction between "everyday" development and the sort of large project that might be able to attract crowd funding.

Meanwhile, we have lift off: https://github.com/spring/spring/tree/LoadMap
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Re: [Funded] Spring.LoadMap

Post by smoth »

Well, right now we are still going through the first step, getting ways of transferring funds.
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Re: [Funded] Spring.LoadMap

Post by smoth »

ok, last bit is on it's way, once that clears he can start.

So are we going to hammer out the requirement via pm or in a new thread? this one has a bunch of clutter about how we are going to do future requests
User avatar
Silentwings
Posts: 3720
Joined: 25 Oct 2008, 00:23

Re: [Funded] Spring.LoadMap

Post by Silentwings »

Let's hammer it out here and I'll update the original post with it. I actually thought the description in the OP was quite precise now - so let me know what you're thinking of.

Discussion of bounty system in general could be carried on in a separate thread.
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Re: [Funded] Spring.LoadMap

Post by smoth »

I still want to know if we can have a table to carry data between maploads or would GG/WG be already persistent? What would be reloaded at map load? What would be kept? 2 important questions IMO
Kloot
Spring Developer
Posts: 1867
Joined: 08 Oct 2006, 16:58

Re: [Funded] Spring.LoadMap

Post by Kloot »

smoth wrote:I still want to know if we can have a table to carry data between maploads or would GG/WG be already persistent? What would be reloaded at map load? What would be kept? 2 important questions IMO
As things stand now, it will actually be the same amount of work to implement a general Spring.Reload(setupScript) (functionally similar to but less crude than Spring.Restart, and covers the first extension in Silentwing's OP) as it will be to add Spring.LoadMap(mapName), which means that you could use the setup-script to carry data forward.
Last edited by Kloot on 13 Jan 2015, 20:27, edited 1 time in total.
Post Reply

Return to “Bounty Offers”