.:: Bots United ::.  
filebase forums discord server github wiki web
cubebot epodbot fritzbot gravebot grogbot hpbbot ivpbot jkbotti joebot
meanmod podbotmm racc rcbot realbot sandbot shrikebot soulfathermaps yapb

Go Back   .:: Bots United ::. > Developer's Farm > SDK Programming discussions > Half-Life 1 SDK
Half-Life 1 SDK For developments focused around Half-Life (and its mods) Half-Life

Reply
 
Thread Tools
single/multiplayer source?
Old
  (#1)
sPlOrYgOn
<-- He did it.
 
sPlOrYgOn's Avatar
 
Status: Offline
Posts: 1,558
Join Date: Jan 2004
Location: Los Angeles, California, USA, North America, Earth, Solar System, Milky Way.
Default single/multiplayer source? - 14-01-2004

does anyone know whats the difference between ./Multiplayer Source/ and ./Single-Player Source/ directories?(beside their names)
They look exactly the same to me.
  
Reply With Quote
Re: single/multiplayer source?
Old
  (#2)
Pierre-Marie Baty
Roi de France
 
Pierre-Marie Baty's Avatar
 
Status: Offline
Posts: 5,049
Join Date: Nov 2003
Location: 46°43'60N 0°43'0W 0.187A
Default Re: single/multiplayer source? - 14-01-2004

There is additional code in the single-player source that is used to build a game and a client DLLs that support single player missions (which multiplayer source does not). Single player DLLs differ a bit from multiplayer DLLs because they need to implement rather complicated things that are specific to single-player gaming, such as save/restore features and seamless transition between maps.

In short, only use the single-player source if you want to code something that will make use of single-player features ; use the multiplayer source for all the rest.



RACC home - Bots-United: beer, babies & bots (especially the latter)
"Learn to think by yourself, else others will do it for you."
  
Reply With Quote
Re: single/multiplayer source?
Old
  (#3)
sPlOrYgOn
<-- He did it.
 
sPlOrYgOn's Avatar
 
Status: Offline
Posts: 1,558
Join Date: Jan 2004
Location: Los Angeles, California, USA, North America, Earth, Solar System, Milky Way.
Default Re: single/multiplayer source? - 14-01-2004

so do bots use multiplayer or single player?
I saw in HPBBot's DSP that botman used single player.
  
Reply With Quote
Re: single/multiplayer source?
Old
  (#4)
Pierre-Marie Baty
Roi de France
 
Pierre-Marie Baty's Avatar
 
Status: Offline
Posts: 5,049
Join Date: Nov 2003
Location: 46°43'60N 0°43'0W 0.187A
Default Re: single/multiplayer source? - 14-01-2004

bots use the multiplayer SDK.

It's not botman who changed the .dsp file of the HPB bot plugin, but myself - since I am one of the weirdos who use the single player stuff for everything. Anything that can compile with the multiplayer SDK will compile with the single-player one - the contrary is not true, that's why.



RACC home - Bots-United: beer, babies & bots (especially the latter)
"Learn to think by yourself, else others will do it for you."
  
Reply With Quote
Re: single/multiplayer source?
Old
  (#5)
sPlOrYgOn
<-- He did it.
 
sPlOrYgOn's Avatar
 
Status: Offline
Posts: 1,558
Join Date: Jan 2004
Location: Los Angeles, California, USA, North America, Earth, Solar System, Milky Way.
Default Re: single/multiplayer source? - 14-01-2004

oh okay
  
Reply With Quote
Re: single/multiplayer source?
Old
  (#6)
botman
Super Moderator
 
Status: Offline
Posts: 280
Join Date: Jan 2004
Location: Plano, TX
Default Re: single/multiplayer source? - 14-01-2004

The other big difference between the single player source and the multiplayer source is that the single player souce code has all of the Monster AI code. The multiplayer source code just has stubs (empty functions) for the Monster AI code (see mpstub.cpp in the multiplayer source as an example).

The code in the Single Player directory will allow you to build a DLL that will support both single player and multiplayer (exactly like the valve\dlls\hl.dll file does). If you want a MOD that has single player levels and multiplayer maps, use the Single Player source). If you want a MOD that's just multiplayer only, use the Multiplayer source.

The problem with the HPB bot hooking the game DLL caused problems with the Save/Restore code and you couldn't transition between maps (since this game feature automatically used the save/restore code). I had to modify the HPB bot hook code so that people could still play Half-Life single player whenever they had the HPB bot installed in the 'valve' directory.

botman
  
Reply With Quote
Re: single/multiplayer source?
Old
  (#7)
Pierre-Marie Baty
Roi de France
 
Pierre-Marie Baty's Avatar
 
Status: Offline
Posts: 5,049
Join Date: Nov 2003
Location: 46°43'60N 0°43'0W 0.187A
Default Re: single/multiplayer source? - 14-01-2004

...yes, by building your own exports array and hooking on FunctionFromName() and NameForFunction(), but AFAIK you didn't make use of anything really specific to single-player in the SDK, am I right ?



RACC home - Bots-United: beer, babies & bots (especially the latter)
"Learn to think by yourself, else others will do it for you."
  
Reply With Quote
Re: single/multiplayer source?
Old
  (#8)
botman
Super Moderator
 
Status: Offline
Posts: 280
Join Date: Jan 2004
Location: Plano, TX
Default Re: single/multiplayer source? - 15-01-2004

Right, nothing in the single player game code was changed.

The only change was faking out the NameForFunction() and FunctionFromName() to get the save game code to work properly.

botman
  
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
vBulletin Skin developed by: vBStyles.com