Co-op

Moderators: GSH, VSMIT, Red Devil, Commando

Want to play co-op campaign?

Yes
11
92%
No
1
8%
Maybe
0
No votes
 
Total votes: 12

User avatar
General BlackDragon
Flying Mauler
Posts: 2408
Joined: Sat Feb 19, 2011 6:37 am
Contact:

Re: Co-opPfft,

Post by General BlackDragon »

pfft, it'd be easy to do from the beginning, I even wrote the code for you already :D
Battlezone Classic Public Forums
*****General BlackDragon*****
User avatar
bigbadbogie
Bull Dog
Posts: 586
Joined: Mon Feb 21, 2011 8:12 am
Location: Ecuadorian Embassy

Re: Co-op

Post by bigbadbogie »

QF2 is story-driven. Co-op is not really possible within that, unless it is the basis of the entire game with multiple leading characters.

The best that could be done would be to have 1 main player doing all the SP mission 'stuff', and any subsequent players would be thugs - just like a big MPI.
"You think that you can wipe out an entire civilisation without consequences?" - Rachel

http://www.moddb.com/mods/qf2-essence-to-a-thief
https://www.indiedb.com/games/husky-ashcon-i/
User avatar
General BlackDragon
Flying Mauler
Posts: 2408
Joined: Sat Feb 19, 2011 6:37 am
Contact:

Re: Co-op

Post by General BlackDragon »

Well, you could make the "host" the "main" player, and the rest be just team mates, then you could even allow some objectives to be completed by the "main" player, while others could be done by any. I know BZ2 lacks any signifigant COOP other thne Dune Command, but it'd be interesting, fun, and would drive up online playing.
Battlezone Classic Public Forums
*****General BlackDragon*****
User avatar
bigbadbogie
Bull Dog
Posts: 586
Joined: Mon Feb 21, 2011 8:12 am
Location: Ecuadorian Embassy

Re: Co-op

Post by bigbadbogie »

I have my doubts that it would ever be more than a gimmick. A few people might play it at the beginning, and then never again.

It would also detract from the mod itself if it were ONLY co-op, as people would avoid it on that basis. People like being able to save and pause their games, and not be constricted by needing to find time to play with others, set up games etc...

I think that if co-op is to be done, it should be done after the SP campaign has already been finished and released. It should not be part of the main mod initially, but an addon for anyone who wants to play that way later on.

Anyway, we are getting way ahead of ourselves. The mod is barely in the alpha-stage.
"You think that you can wipe out an entire civilisation without consequences?" - Rachel

http://www.moddb.com/mods/qf2-essence-to-a-thief
https://www.indiedb.com/games/husky-ashcon-i/
User avatar
General BlackDragon
Flying Mauler
Posts: 2408
Joined: Sat Feb 19, 2011 6:37 am
Contact:

Re: Co-op

Post by General BlackDragon »

True, but this is something that should be decided at the beginning. The code does need to be "designed" for it, and the missions can use the exact same dll for both SP and coop. You just add the missions to the missions.odf file, and it'd be SP, both versions in the same maps.
Battlezone Classic Public Forums
*****General BlackDragon*****
User avatar
bigbadbogie
Bull Dog
Posts: 586
Joined: Mon Feb 21, 2011 8:12 am
Location: Ecuadorian Embassy

Re: Co-op

Post by bigbadbogie »

Is there more to it than the DLL simply recognising and 'handling' multiple players?
"You think that you can wipe out an entire civilisation without consequences?" - Rachel

http://www.moddb.com/mods/qf2-essence-to-a-thief
https://www.indiedb.com/games/husky-ashcon-i/
User avatar
General BlackDragon
Flying Mauler
Posts: 2408
Joined: Sat Feb 19, 2011 6:37 am
Contact:

Re: Co-op

Post by General BlackDragon »

Not really, MP DLLs work when you're by yourself. :P

The only other thing is that in MP, "isInfo" doesnt work, but the DLL can tell if it's SP or MP, so you can do inside that player loop this:

if(IsNetworkOn())
{
Handle Target = GetPlayerTarget(i);
if(Target == SpecialObject)
{
SomeTrigger = true;
}
}
else // Network is off, this is SP.
{
if(IsInfo("Filename"))
{
SomeTrigger = true;
}
}
Battlezone Classic Public Forums
*****General BlackDragon*****
User avatar
bigbadbogie
Bull Dog
Posts: 586
Joined: Mon Feb 21, 2011 8:12 am
Location: Ecuadorian Embassy

Re: Co-op

Post by bigbadbogie »

So GetPlayerTarget(i); will 'get' the targets of every player.

How would you determine the target of a particular player in that list?
"You think that you can wipe out an entire civilisation without consequences?" - Rachel

http://www.moddb.com/mods/qf2-essence-to-a-thief
https://www.indiedb.com/games/husky-ashcon-i/
User avatar
General BlackDragon
Flying Mauler
Posts: 2408
Joined: Sat Feb 19, 2011 6:37 am
Contact:

Re: Co-op

Post by General BlackDragon »

i is the team number of the player, when done within the code snippet on page 1.

Oh, right, I havn't explained for() loops to you yet...well, lets see.

#Define MAX_TEAMS 16; // This is already set in the source code, 16 is the number of BZ2 teams, 0 - 15.

for(int i = 0; i < MAX_TEAMS; i++)
{

Stuff in here is ran in a repeated loop, until the condition is matched. In this case, i starts at 0, and the condition is that it runs until i is >= 16 (or more literally, it runs as long as i is < 16). i++ adds 1 to i each time i loops. So, you're looping over all 16 teams in one game tick, i.e. all at the same time (atleast as far as in game is concerned)
GetPlayerTarget(int Team) takes in the team number of the player in question, so the for loop looks at ALL the player's targets, and looks for any one of them to match the required object.
}
Battlezone Classic Public Forums
*****General BlackDragon*****
User avatar
bigbadbogie
Bull Dog
Posts: 586
Joined: Mon Feb 21, 2011 8:12 am
Location: Ecuadorian Embassy

Re: Co-op

Post by bigbadbogie »

Anyway... Back on topic.

Would it take much to edit the original BZ2 SP DLLs to get the campaign working as co-op?
"You think that you can wipe out an entire civilisation without consequences?" - Rachel

http://www.moddb.com/mods/qf2-essence-to-a-thief
https://www.indiedb.com/games/husky-ashcon-i/
User avatar
General BlackDragon
Flying Mauler
Posts: 2408
Joined: Sat Feb 19, 2011 6:37 am
Contact:

Re: Co-op

Post by General BlackDragon »

A fair amount of work. Like I said, it's something you want to do from the beginning.

Also, I've tried camera sequences, in MP they work but are jittery.
Battlezone Classic Public Forums
*****General BlackDragon*****
User avatar
Red Spot
Attila
Posts: 1629
Joined: Mon Feb 21, 2011 6:14 pm
Location: The Netherlands

Re: Co-op

Post by Red Spot »

General BlackDragon wrote:I find simpler is better.
Go ahead and try making simple plugins for games like X3, and still remain original and give people something to do and compeat with.

Doing things in code as a human would will already make things complex as humans tend to find alternate methods and you have to be aware of those before humans get a chance to try it.

Simple is nice if what you're trying to do allows it, no need for complexity if it doesnt serve any purpose, but that surelly doesnt make simple better.
User avatar
Red Devil
Recycler
Posts: 4398
Joined: Fri Feb 18, 2011 5:10 pm
Location: High in the Rocky Mountains

Re: Co-op

Post by Red Devil »

cramming steps into one statement just makes things harder to debug. it's best to break things down into individual statements to make it readable/easily followed/easily debugged.
If given the truth, the people can be depended upon to meet any national crisis. The great point is to bring them the real facts - and beer.
Abraham Lincoln

Battlestrat, FE, G66, In The Shadows, Starfleet, Uler, & ZTV

Lifetime member of JBS and NRA
User avatar
Zero Angel
Attila
Posts: 1536
Joined: Mon Feb 21, 2011 12:54 am
Contact:

Re: Co-op

Post by Zero Angel »

To the OP: I would recommend ZTV Death Ray. It has been converted for use with the latest 1.3 patches. ZTV The Long Journey is also an excellent objective/event based cooperative multiplayer map, but I think that only works in the 1.2 version of BZ2.
Regulators
Regulate any stealin' of this biometal pool, we're damn good, too
But you can't be any geek off the street
Gotta be handy with the chains if you know what I mean
Earn your keep
User avatar
Ded10c
Recycler
Posts: 3815
Joined: Sun Feb 20, 2011 11:05 am
Location: Stoke-on-Trent
Contact:

Re: Co-op

Post by Ded10c »

Red Devil wrote:cramming steps into one statement just makes things harder to debug. it's best to break things down into individual statements to make it readable/easily followed/easily debugged.
Modularity =/= simplicity.

Also, even modularity pales in comparison to the utility of proper commenting.
battlezone.wikia.com needs your help!
Post Reply