Skip to main content
GameDev.net gamedev.net
🔒 Locked

Driving Simulator Network Structure

Started by exhaustiveresearcher Jan 24, 2008 at 7:50 AM 4 replies 1k views
Original Post
exhaustiveresearcher
exhaustiveresearcher
We are about to develop a train driving simulator which has a 6 dof moving platform, a train control panel hardware(lots of buttons, brakes etc), a control statition for scenario control, 3D (vega) and Soun Rendering and realistic train dynamic model. In this application thre is no online part but to make this simulator there should be 3 to 6 computers to handle specific parts of simulator and we will use a network library for his local network communication. I looked up http://www.gamedev.net/community/forums/showfaq.asp?forum_id=15 topic but there were no advice for such kind of simulators. Which kind of network structure should i use? Which network library is convenient for this simulator? Thanks
Kylotan
Kylotan
Where are the servers located? If they're all located on a LAN, and are under your control, I'd just use TCP/IP to transmit data between them. There may be little point in using a network library, since most languages have perfectly adequate networking facilities in my opinion. but it depends on what you need to achieve. What language are you using? What sort of data are you expecting to send, and how often? Is communication unidirectional or bidirectional? Are you expecting to be able to just fire off messages from one machine and continue, or will you need something that has function call semantics? Is it a real-time simulator, and do you have constraints on the simulation latency?
Antheus
Antheus
Why 3-6 computers?

Due to computational complexity? Or for 3-6 operators?

Because unless you need to distribute the simulation itself, then some OO-like approach would likely be most straightforward such as CORBA or Ice.

The simulation itself then runs on a single computer, taking benefit of locality, whereas controllers manipulate it remotely. Depending on actual numbers, synchronization and latency might be an issue.
hplus0603
hplus0603
If the 3-6 systems are mostly for presentation (out the window displays), then Vega Prime already has a distributed mode where it will take care of that for you. I can't imagine that a simulation of a train on rails will take enough CPU to require running on more than one CPU (but then, my imagination may be limited).

If you truly need to communicate between all the machines for reasons other than scene graph presentation, then I suggest looking into MPI for use over a LAN. It is a library that has seen a lot of use in the scientific community, and is well tested, reliable, supported, etc.
enum Bool { True, False, FileNotFound };
exhaustiveresearcher
exhaustiveresearcher
Thanks for quick replies. Let me make clear my questions.

Why 3-6 computers?
actually we think 4 computers. (for performance 2 pcs can be added)
1 for embedded harware processor that control train control panel. I think linux kernel will be running on this pc.
1 for 6 dof moving platform. It has a microprocessor and real time OS. I dont know its spec.
1 for 3D graphics rendering on windows xp.
1 for train dynamic model update, controllers,operator programs, all other screen management, sound.(due to the complexity pcs can be incread )
There will be at least 3 computers. train panel hardware + 6 dof moving plat. + 3d and dynamic models.

Where are the servers located?
PCs are under our control and thre is only LAN.

What language are you using?
Mostly C++

What sort of data are you expecting to send, and how often? Is communication unidirectional or bidirectional?
Communication is bidirectional. for example train control panel sends the gear, brake etc events, recieves current velocity, air pressure etc for indicator at some rate(30 Hz). if 3d and dynamic model is separated there will be 60 Hz simulation thick including coordinate, hpr etc. 6 dof moving plat. recives coordinates at some rate. also other components communicate bidirectional

Are you expecting to be able to just fire off messages from one machine and continue, or will you need something that has function call semantics?
I didnt understan this question.

Is it a real-time simulator, and do you have constraints on the simulation latency?
real time simulator and there shold be full syncroniztion between moving platform, 3D graphics and sound not to feel nausea.

my works on network:
I thought ACE ( http://www.cs.wustl.edu/~schmidt/ACE.html ) but it conflicts with QT 4.2 reactors. We discarded ACE.
QT has a network library. Working on it.
SDL_net has poor documentation(tutorials lack)
others? hawknl, opentnl ... ?

Thaks for help

hplus0603
hplus0603
You should figure out what the embedded controller PC can deal with. Several embedded real-time OS-es only do basic BSD sockets, which means you can't really use too much of a library on top.

For your needs, I would actually stick with basic TCP sockets. If you have no other machines on the network, and use a full duplex switch, and turn on TCP_NODELAY, then there will be no perceptible latency attributable to the networking.

Fun fact: On a gigabit Ethernet network, the duration of a 1 kilobyte data segment is less than 10 microseconds.
enum Bool { True, False, FileNotFound };

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.