Game Development Community

Multiplayer

by Nemo · in Torque Game Engine · 08/18/2005 (6:08 am) · 4 replies

Hi

i was just wondering if anyone knew a good tutorial on how to add LAN multiplayer to an fps in torque.
I know all the code is there for it I just need help in adding it to my game without it affecting the single player mode.

thanks

About the author

Recent Threads

  • Animations

  • #1
    08/18/2005 (10:58 am)
    By default TGE already is fully lan functional. Just run the demo (or your newly compiled executable if you've changed some source code), and select "host multi-player" instead of just starting a single player game.

    Once you've started the mission, anyone else on your lan can join in the game.
    #2
    08/19/2005 (4:10 am)
    Sound, if i want be use the same levels for single and multiplayer but don't want bots to spawn in the multiplayer is it just a matter of adding code for this to the game.cs file so that if a multiplayer server if created or joined no bots are spawned?
    #3
    08/19/2005 (12:58 pm)
    Yes, that pretty much describes a technique for checking it one way or the other. You'll basically want to either track the state of what type of server is created (might need to make this state saved in a global variable when they make their choice), or actually keep track of how many players are in the game, and use that information to determine if you should spawn bots or not.
    #4
    08/19/2005 (1:28 pm)
    I have two folders in my missions group and then I turned:

    %search = $Server::MissionFileSpec;

    Which tells you where the missions will be loaded.

    Into:

    %search = $Server::MultiMissionFileSpec;
    %search = $Server::SingleMissionFileSpec;

    Then depending on whether I'm hosting multiplayer or not I load different missions and A.I. or other single player game elements.