Train Theory

Author Topic: Train Theory  (Read 9180 times)

Tri

Rky, I say "get back on topic" to stop the nubery among my offender(s)`s responses.

More help: Maybe you can use impulse instead, forcing the train to find the best way along a path which would create involuntary turning along curved rails.

Not really much help, impulse would be terribly ineffective, considering you'd probably have to run alot of schedules and various pathfinding procedures, where as with a bot you can just say
setaimlocation(%nextpoint); for any amount of turning, and setmovedestination(%nextpoint); for the movement. Much simpler in concept than figuring how to manage the impulses.(assuming you use a playertype train)

However we may not be thinking of the same thing, if not please explain a bit more about your idea.

RW lol, I can't really try this for a while, busy working on some other things :D
Would one of these "other things" consist of a certain special remake? :D
That and my Star Wars Mini Mod that I've been working on since... well before any other Star Wars mods for retail.

So how's the "Remake" coming along?

BFDR is on pause (1 year of slow dev gets annoying), ZW is moving fast and nicely.


Tri

Impulse Method
Fact:  Impulse can force the object to find the best path through its limitations. (Example: If you were to impulse a ball along a slanted object, it would follow the slant.)

Relation to Train theory:  If you were to create specific collision along the train's wheels, you could design railings to restrict the wheels along the rail, so the wheels won't pop out of the rail.  Using impulse, the train vehicle/object will be forced to follow the best path to the direction you want the impulse to push the train.  The only time you will have to change the impulse is if you want the train to stop/go, go faster/slow down, and when turning.

Untested Theoretical Issues:  It might cause an Invalid Packet.  It might crash the Torque Game Engine.  It might crash server.  (But remember, these aren't tested so it is worth a shot.)

I still dont see the point of impulse over simple face and move commands.
Also, how would it make it follow the "best" path if your just pushing it toward the point? Wouldnt that be the same as telling it to walk toward the point, except your going through the trouble of pushing it?

Tri

More like you don't have to correct it if it moves wrong.  Also, the impulse is just a theory.

Dont have to-- What?

How the hell is it going to move wrong, and how would it be corrected?
Also as far as I understand the movedestination and aimlocation are handled in C++, which would mean less lag.

Sounds like you guys are arguing over using a static or dynamic system for guiding the train.

I think you should stick with a non-physics based system (IE. not using collision or impulses) and instead use a waypoints, fixed height/rotation system instead.

As we know, vehicles are...temperamental at the best of times, trying to tell a train vehicle to stay within the tracks and pushing it with impulses is asking for trouble.

I've been suggesting this for a long time. People are just lazy.


I've been suggesting this for a long time. People are just lazy.
Theory is different from suggestion.

You people are always thinking with / commands, its quite annoying. Patrol bots, good idea but first need to make sure players can mount aiplayers like vehicles and then try to see if it works. As for train stopping it'd be a timer, I don't want to see/have to type a command every time I want a train to stop I'd like it to be on a timer like 3000 milsec's stop on path4.

You create a vehicle datablock of the train, then you can set a AI to that data block, example:
datablock = traindata;
or
    %train=new aiplayer()
    {
        dataBlock = Trainvehicle;
        aiPlayer = true;
    };
Whether or not that would allow mounting of the AI I do not know.
« Last Edit: April 04, 2008, 08:46:53 AM by Destiny/Zack0Wack0 »