[Req] more control over team, allieances and players

[Req] more control over team, allieances and players

Discuss the source code and development of Spring Engine in general from a technical point of view. Patches go here too.

Moderator: Moderators

Post Reply
User avatar
Licho
Zero-K Developer
Posts: 3803
Joined: 19 May 2006, 19:13

[Req] more control over team, allieances and players

Post by Licho »

I would like to support those scenarios:

* new player can join running game and join one ally (other players will give him units)

* before game starts, there is list of alliances and people can rebalance while in game (taking into account players who are idle/failed to load). This would also allow simplified lobby without team and ready management.

* two players can decide to start sharing control (mergine team) midgame


For that I would like:
- control over player->team assignment (ability to move player from team to team like with cheats). This control could be given to gadgets.

- adding players midgame while also setting their alliance (to not reveal them all the map while they replay game)

- ability to setup alliances/teams before game starts

- *optional* - ability to create new team


Is it feasible or not?
User avatar
hoijui
Former Engine Dev
Posts: 4344
Joined: 22 Sep 2007, 09:51

Re: [Req] more control over team, allieances and players

Post by hoijui »

it is a lot of work, and it will create a lot of new bugs, initially, which would be fixed slowly, over time. we already have enough big refactors in planning/going on for now, so i would say this will have to wait. i would not stop anyone from trying it, as long as he does not cause problems for other stuff already going on (which i think will not be possible). it sure would be nice to have.
User avatar
Licho
Zero-K Developer
Posts: 3803
Joined: 19 May 2006, 19:13

Re: [Req] more control over team, allieances and players

Post by Licho »

Its very simple change hoi .. for example changing teams:

Code: Select all

if (cmd == "team") {
		if (gs->cheatEnabled) {
			const int teamId = atoi(action.extra.c_str());
			if (teamHandler->IsValidTeam(teamId)) {
				net->Send(CBaseNetProtocol::Get().SendJoinTeam(gu->myPlayerNum, teamId));
			}
		}
Just stick this to luarules -cheat check = done..
User avatar
Licho
Zero-K Developer
Posts: 3803
Joined: 19 May 2006, 19:13

Re: [Req] more control over team, allieances and players

Post by Licho »

Changing alliance should be:

Code: Select all

const int teamId = atoi(action.extra.c_str());
		if (teamHandler->IsValidTeam(teamId)) {
			gu->myTeam = teamId;
			gu->myAllyTeam = teamHandler->AllyTeam(teamId);
		}
		CLuaUI::UpdateTeams();
User avatar
hoijui
Former Engine Dev
Posts: 4344
Joined: 22 Sep 2007, 09:51

Re: [Req] more control over team, allieances and players

Post by hoijui »

.. as said, i won't stop you from doing it. make a branch, code it.
i think there is code that assumes stuff is fixed for the entire game. this code is spread over the engine, Lua widgets and gadgets in all games, AI interfaces and AIs, lobby clients and servers (maybe i forgot some).
but i guess one could just grep for "team" and manually check all these places, and fix it everywhere ... very fast.
User avatar
Licho
Zero-K Developer
Posts: 3803
Joined: 19 May 2006, 19:13

Re: [Req] more control over team, allieances and players

Post by Licho »

Just give us lua control and we will figure out possible issues ..

But I believe those 2 things are all thats needed..


I cant code it..

I can't easilly compile it on windows.
I can't easilly test linux compiled version on windows.
I cannot figure out the overcomplex git and I don't have rights to commit or push or whatever it is.

I already have millions spring related coding things in todo its just not cost effective for me (or anyone on windows)
User avatar
FLOZi
MC: Legacy & Spring 1944 Developer
Posts: 6242
Joined: 29 Apr 2005, 01:14

Re: [Req] more control over team, allieances and players

Post by FLOZi »

I can't easilly compile it on windows.
This again, really?
User avatar
Licho
Zero-K Developer
Posts: 3803
Joined: 19 May 2006, 19:13

Re: [Req] more control over team, allieances and players

Post by Licho »

Yes ..

Let's consider any other sensible project or website I work at:
- download source,
- open the project
- hit F5 to compile, run and debug it in nice IDE with visual watches

Now what should I do again to achieve same level of friendliness with spring?

When it becomes as simple I will gladly help with engine development. If the instructions are compile with mingw or "download this, download that, do a few hand tweaks" - no thanks..

You only have 2 commits Flozi.. that does not really count as engine dev .. I made more commits to spring blindly while it was in svn..
User avatar
FLOZi
MC: Legacy & Spring 1944 Developer
Posts: 6242
Joined: 29 Apr 2005, 01:14

Re: [Req] more control over team, allieances and players

Post by FLOZi »

2 commits in git, I had several more under SVN. I've never claimed to be an engine dev.

I'm far from being an active contributor. Which makes my seemingly amazing ability to compile Spring on windows all the more remarkable.
User avatar
Licho
Zero-K Developer
Posts: 3803
Joined: 19 May 2006, 19:13

Re: [Req] more control over team, allieances and players

Post by Licho »

Yeah it is .. CarRepairer was unable to compile it even on linux just recently and Spliff tried to help him for 1.5h ..

I'm still scared..
User avatar
Aether_0001
Posts: 228
Joined: 25 Feb 2008, 03:41

Re: [Req] more control over team, allieances and players

Post by Aether_0001 »

I'd like it too but I dunno how I can help.
SirMaverick
Posts: 834
Joined: 19 May 2009, 21:10

Re: [Req] more control over team, allieances and players

Post by SirMaverick »

Licho wrote: * new player can join running game and join one ally (other players will give him units)
Hard to balance. Or players join minutes before the end, do almost nothing and still get/lose elo.
Licho wrote:Its very simple change hoi .. for example changing teams:
[some code]
Added a callout: https://github.com/1231e7b84a5de93a/spr ... changeteam

There is even a mod using it: Random Team. Base on ZK, your team changes randomly (among all alliances) every 15 seconds. Should be fun with many players on duck map. Should work with other mods, just change dependencies and ModOptions.lua.

Only issue I saw so far:
Got message 51 from 0 claiming to be from 1
I assume this is due to the small network delay, where the host already saw the change and clients didn't receive it yet.
Licho wrote:Changing alliance should be:
Looks like this doesn't change the game state, just local unsynced state. Also, if you change team you already changed the alliance.
Licho wrote:I cant code it..
Lie.
Licho wrote:I don't have rights to commit or push or whatever it is.
Nor do I, but some of my patches got applied. Must have been magic. </sarcasim>
Last edited by SirMaverick on 03 Apr 2011, 18:08, edited 1 time in total.
User avatar
Licho
Zero-K Developer
Posts: 3803
Joined: 19 May 2006, 19:13

Re: [Req] more control over team, allieances and players

Post by Licho »

Ok tahnks :-) Team control should be enough, we could create fake "teams" and then assign peple to them before game starts, it will work i hope :-)

Midgame join will be hard to elo solve yeah .. we will have to think about that..
User avatar
Neddie
Community Lead
Posts: 9406
Joined: 10 Apr 2006, 05:05

Re: [Req] more control over team, allieances and players

Post by Neddie »

Well, for the initial implementation, you could simply not count the player who joined in the ELO calculation, though there would still be an impact on the other players participating. That, or you could discard the whole match. A more complicated solution can be added later after the sync issues are handled.
Post Reply

Return to “Engine”