Game Development Community

Server-less mission rendering

by Luke Philpot · in Torque Game Engine · 02/01/2005 (12:03 am) · 5 replies

Hi there.

Is it possible to render a mission without connecting to a server? I want the client to be seperate to the server, and need to be able to display a 3d mission/terrain BEFORE the client connects to a server.

So... is this possible?

#1
02/01/2005 (12:19 am)
Luke,

I'm going to say that the answer to this question is yes and no.

Yes, you can render the terrain to a HUD or other GUI prior to loading the mission and starting the game and having the client connect, but...

No, you can't render the terrain and use it a playable fashion without a server. The server-client connection isn't that easy to break. Also, the server has lots of responsibilities that you can certainly bypass, but we're talking some relatively serious coding (IMO, but I've never really tried to work out a client ONLY scenario).

If you're looking to render your terrain as part of the 'mission selection' GUI, see this. If I'm totally off base on the answer, please wait for more replies, or perhaps restate your question. Specifically what are trying to do (if I've misunderstood your question)?

[HOW]EdM|EGTGE
#2
02/01/2005 (1:43 am)
Here's what I want to do:

have a mission displayed as part of the main menu. The client is just a barebones client with no server code whatsoever.

That resource sort of does it but I really need something that can handle a complete .mis with particles, skies, shapes, interiors, etc. I'm not looking to play a game without a server. Just render a mission.
#3
02/01/2005 (2:20 am)
You could have a "menu" mission auto load as a single player game, then based on whatever you do in that menu mission you trigger another multiplayer game or the start of your single player game.

so instead of the main menu gui and the startup screens, just go right into loading a mission, with some sort of nice purty status screen.

of course you are going to take the hit of the loading time which can be a bit painful as your game gets more complex.

here's some raw code for loading a mission from the scripts
%serverType = "SinglePlayer";
	   createServer(%serverType, "LukesApp/data/missions/menu.mis" );
	   %conn = new GameConnection(ServerConnection);
	   RootGroup.add(ServerConnection);
	   %conn.setConnectArgs($pref::Player::Name);
	   %conn.setJoinPassword($Client::Password);
	   %conn.connectLocal();

you could put that in client\init.cs at the end of function loadMainMenu()
just to test it out and see how that would work. I'm sure you could stream line the loading a lot nicer gui wise.
#4
02/01/2005 (11:14 am)
Clint's suggestion is almost certainly the "best" (defined as easiest, least amount of code changes, etc.) solution for what you are looking for. This assumes of course that you mean you want a mission to load and render prior to connecting to a dedicated server, because AFAIK, trying to rip out all of the code to handle rendering a mission and accomplishing what you want would take months and months, while his solution with a few modifications to tweak for the exact gameplay you want at that stage shouldn't take more than a week or so!
#5
02/01/2005 (12:19 pm)
I've already got what you suggested working in the Torque example app. I guess I'll have to go with that then.