Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
kevingpo

[HELP] Doom Doom Doom

Recommended Posts

Does anyone know which source ports (ZDoom, etc) has client/server multiplayer in them?

I am trying to play around with SDL Doom 1.10. If there is a l33t Doom programmer reading this, can you tell me:

1) I faked a deathmatch environment by assigning deathmatch=1 and playersingame[0]=true. Then I call G_InitNew(...) to call P_SetupLevel() and G_LoadGame(). I've learnt that I can get my player map object via players[0]->mo. Where's the code for moving the players, interacting with the environment in multiplayer mode?

Assuming this is correct, I get all map objects from EVERY sectors structure? Right? I display them, but am getting items/monsters like if it was single player. How do I get multiplayer?

Share this post


Link to post
kevingpo said:

Does anyone know which source ports (ZDoom, etc) has client/server multiplayer in them?

http://www.zdaemon.com/


I am trying to play around with SDL Doom 1.10.

You'd probably be better off using something like PrBoom which has already fixed most of the bugs in the Doom engine and cleaned up the code substantially.

If there is a l33t Doom programmer reading this, can you tell me:

1) I faked a deathmatch environment by assigning deathmatch=1 and playersingame[0]=true. Then I call G_InitNew(...) to call P_SetupLevel() and G_LoadGame(). I've learnt that I can get my player map object via players[0]->mo. Where's the code for moving the players, interacting with the environment in multiplayer mode?

Look at P_PlayerThink and P_MovePlayer in p_user.c. These adjust the momentum of the players based on the player inputs (move forward, strafe, etc). Note that these only adjust the momentum; they dont set the positions of the players. The player objects themselves move with everything else as part of the physics engine. The actual object movement occurs in P_XYMovement in p_mobj.c. This is called as part of the "thinkers" list.

Assuming this is correct, I get all map objects from EVERY sectors structure? Right? I display them, but am getting items/monsters like if it was single player. How do I get multiplayer?

If you want to trick the engine into think its playing multiplayer, you should probably also set "netgame = true"

Share this post


Link to post

Legacy "has" client-server networking, but it is more of a hack. It doesnt work the same way as networking works in Quake or ZDaemon.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×