Game Development Community

Mission transfers... (And an API?)

by Steve · in Technical Issues · 04/30/2008 (11:31 pm) · 3 replies

It would seem that most of what is done in Torque is based around missions... But the torque FPS demo does not seem to feature "dynamically loaded" missions. So one question I have is this;

If a client does not have a certain mission, can the torque server be set up to send them the files necessary for that mission? How difficult would such a modification be?

(I think a lot of my questions are bound to stem from the fact that I haven't yet seen a TorqueScript "API documentation"... Is there such a beast? Or do I have to make it myself?)

Thanks!
-Steve

#1
04/30/2008 (11:43 pm)
Files are transferred automagically, and then stored on the client. The transfer is slow as (correct me if I'm wrong) its transferred via the standard packet system which means its capped at a fairly low speed. If scripted badly lack of files can kick a player from the game on cycle from a mission they do have (I think stock torque scripts do this). What I really want to know is how Tribes 2 did it, as I'm fairly sure that its different from the way torque uses it now. I would, personally, rewrite the system if you plan to have extensive mod support or frequent server/client file mismatches for whatever reason.
#2
04/30/2008 (11:54 pm)
I actually have an idea involving NPCs that move between zones (ie: Move to different cities, or what-have-you)... So if the NPCs are stored in the mission files, I'll need to update at least two mission files whenever an NPC decides to leave town.

Regardless, FPS servers seem to handle this sort of thing all the time; Whenever the client doesn't have a map, CS Source or TF2 just send them the mission files, without skipping a beat.

I wonder if it wouldn't be more prudent to just generate all my NPCs dynamically, straight out of the database, after the mission files are loaded... I wonder if that's even possible!
#3
05/01/2008 (6:59 am)
Quote:I wonder if it wouldn't be more prudent to just generate all my NPCs dynamically, straight out of the database, after the mission files are loaded... I wonder if that's even possible!

It's been done before. All you need to do is call a spawning function that in turn pulls info from the DB for what you need. I've done it myself. I haven't made an NPC zone yet, but I doubt it's as hard as it sounds ;)