Co-op
Moderators: GSH, VSMIT, Red Devil, Commando
- General BlackDragon
- Flying Mauler
- Posts: 2408
- Joined: Sat Feb 19, 2011 6:37 am
- Contact:
Re: Co-opPfft,
pfft, it'd be easy to do from the beginning, I even wrote the code for you already
Battlezone Classic Public Forums
*****General BlackDragon*****
*****General BlackDragon*****
- bigbadbogie
- Bull Dog
- Posts: 586
- Joined: Mon Feb 21, 2011 8:12 am
- Location: Ecuadorian Embassy
Re: Co-op
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.
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/
http://www.moddb.com/mods/qf2-essence-to-a-thief
https://www.indiedb.com/games/husky-ashcon-i/
- General BlackDragon
- Flying Mauler
- Posts: 2408
- Joined: Sat Feb 19, 2011 6:37 am
- Contact:
Re: Co-op
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*****
*****General BlackDragon*****
- bigbadbogie
- Bull Dog
- Posts: 586
- Joined: Mon Feb 21, 2011 8:12 am
- Location: Ecuadorian Embassy
Re: Co-op
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.
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/
http://www.moddb.com/mods/qf2-essence-to-a-thief
https://www.indiedb.com/games/husky-ashcon-i/
- General BlackDragon
- Flying Mauler
- Posts: 2408
- Joined: Sat Feb 19, 2011 6:37 am
- Contact:
Re: Co-op
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*****
*****General BlackDragon*****
- bigbadbogie
- Bull Dog
- Posts: 586
- Joined: Mon Feb 21, 2011 8:12 am
- Location: Ecuadorian Embassy
Re: Co-op
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/
http://www.moddb.com/mods/qf2-essence-to-a-thief
https://www.indiedb.com/games/husky-ashcon-i/
- General BlackDragon
- Flying Mauler
- Posts: 2408
- Joined: Sat Feb 19, 2011 6:37 am
- Contact:
Re: Co-op
Not really, MP DLLs work when you're by yourself.
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;
}
}
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*****
*****General BlackDragon*****
- bigbadbogie
- Bull Dog
- Posts: 586
- Joined: Mon Feb 21, 2011 8:12 am
- Location: Ecuadorian Embassy
Re: Co-op
So GetPlayerTarget(i); will 'get' the targets of every player.
How would you determine the target of a particular player in that list?
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/
http://www.moddb.com/mods/qf2-essence-to-a-thief
https://www.indiedb.com/games/husky-ashcon-i/
- General BlackDragon
- Flying Mauler
- Posts: 2408
- Joined: Sat Feb 19, 2011 6:37 am
- Contact:
Re: Co-op
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.
}
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*****
*****General BlackDragon*****
- bigbadbogie
- Bull Dog
- Posts: 586
- Joined: Mon Feb 21, 2011 8:12 am
- Location: Ecuadorian Embassy
Re: Co-op
Anyway... Back on topic.
Would it take much to edit the original BZ2 SP DLLs to get the campaign working as co-op?
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/
http://www.moddb.com/mods/qf2-essence-to-a-thief
https://www.indiedb.com/games/husky-ashcon-i/
- General BlackDragon
- Flying Mauler
- Posts: 2408
- Joined: Sat Feb 19, 2011 6:37 am
- Contact:
Re: Co-op
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.
Also, I've tried camera sequences, in MP they work but are jittery.
Battlezone Classic Public Forums
*****General BlackDragon*****
*****General BlackDragon*****
Re: Co-op
Go ahead and try making simple plugins for games like X3, and still remain original and give people something to do and compeat with.General BlackDragon wrote:I find simpler is better.
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.
- Red Devil
- Recycler
- Posts: 4398
- Joined: Fri Feb 18, 2011 5:10 pm
- Location: High in the Rocky Mountains
Re: Co-op
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
Abraham Lincoln
Battlestrat, FE, G66, In The Shadows, Starfleet, Uler, & ZTV
Lifetime member of JBS and NRA
- Zero Angel
- Attila
- Posts: 1536
- Joined: Mon Feb 21, 2011 12:54 am
- Contact:
Re: Co-op
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
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
Re: Co-op
Modularity =/= simplicity.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.
Also, even modularity pales in comparison to the utility of proper commenting.
battlezone.wikia.com needs your help!