Author Topic: Dumb suggestion  (Read 7380 times)

0 Members and 1 Guest are viewing this topic.

Offline Nuke

  • Ka-Boom!
  • 212
  • Mutants Worship Me
would it be possible to write an interface script in lua, which could communicate with other applications/interfaces. perhaps so you can run standalone scripts on other machines that can talk to the ones running in freespace. could this, in theory, be done right now? with stuff like the physics stacks and whatnot could it be possible to run a full motion simulator with few lua scripts.

you have a host script which gathers the variables you need and passes them on ti scripts for network interface, or serial/paralel io, ect. the serial/paralel io can be sent to simple electronic guages directly running no software, just some simple dac driving an analog gauge. the network io would send streams of variable updates over the network running a lua interpreter. they would in turn run a client script to get the variables it needs, which interface with other scripts for output.

still id like to see at some point multi-display support. that would be the **** :D
« Last Edit: September 29, 2006, 09:12:20 pm by Nuke »
I can no longer sit back and allow communist infiltration, communist indoctrination, communist subversion, and the international communist conspiracy to sap and impurify all of our precious bodily fluids.

Nuke's Scripting SVN

 
Different forums have different etiquette on posting... should I have started a new thread rather than reviving this one? 




 

Offline Nuke

  • Ka-Boom!
  • 212
  • Mutants Worship Me
nah this works. its an intresting topic and why start a new thread. it seems to make more sence to have one old thread bumped than an old dead thread and a new dying thread. :D the concept of a freespace cocpit simulator intrests me.

oh **** where are my manors

gunnery control, fire at will
:welcome:

welcome to the hlp forum, there are no exits, those things that look like exits are only painted on and normal mapped due to budget cuts. please donate to help with that. in event of a water landing you will be used as a flotation device. flamethrowers are under your seats, but do to budget cuts theyre filled with holy water, which is collected from the hlp urinals and blessed by the priests of the v gods. shotguns and plasma rifles may be found in the weapons lockers, but only the admins [V], or a hyperintelegent shade of blue have the combo. a 10 pound sledge works just fine though, either as a wepon or to open the weapons lockers. if that dont work for you maybe i have an extra gatling gun you can use. never under any circumstances use the characters f s and 3 all squished together. if you hear a noise from the air ducts dont wory, thats only the resident shivan carl. give him your lunch and back away slowly. i find he usually likes ham and chease or a monte cristo, if you have tuna, youre a dead man.  enjoy your stay.
« Last Edit: September 30, 2006, 07:34:49 pm by Nuke »
I can no longer sit back and allow communist infiltration, communist indoctrination, communist subversion, and the international communist conspiracy to sap and impurify all of our precious bodily fluids.

Nuke's Scripting SVN

 

Offline Turey

  • Installer dude
  • 211
  • The diminutive form of Turambar.
    • FreeSpace Open Installer Homepage
Different forums have different etiquette on posting... should I have started a new thread rather than reviving this one? 

no, this is better.

It's just not very common for threads this old to be revived. that's all i was saying.
Creator of the FreeSpace Open Installer.
"Calm. The ****. Down." -Taristin
why would an SCP error be considered as news? :wtf: *smacks Cobra*It's a feature.

 
Nuke, thanks for the warm welcome.  What is Lua like?  I was thinking about setting up a shared memory segment but that may be a better option.  I was looking at some Falcon 4.0 forums and it seems to use the shared memory setup so I thought I'd mimic that.  The downside to that is you need to have a second app read the shared memory and export it so you can use that data.  I'm guessing from your description that lua would allow you to read the values without having to make some kind of intermediary process?

 

Offline Nuke

  • Ka-Boom!
  • 212
  • Mutants Worship Me
you can already read quite abit in lua. for examples of what kind of stuff can be done look up scripting.tbl in the wiki. it also has links to some other usefull lua resources. i find lua a fairly easy language to work with. if youve ever done visual basic youl find it somehwhat similar.

anyway my thought was your run a number of scripts. you first have your host script which runs in freespace, this gathers variables and would need to have support for network serial and paralell communication. im not sure if that can be programmed in right off the bat. there may need to be some source modification to allow lua access to i/o and network resources. the serial and paralell communication could drive simple electronics. while the network communication would drive stand alone client scripts on other machines. this would be used for more complex screens like radar and such.

that said alot of scripting would need to be done and it would probibly be a much greater undertaking that actually building the simulator itself.
« Last Edit: October 02, 2006, 02:18:56 am by Nuke »
I can no longer sit back and allow communist infiltration, communist indoctrination, communist subversion, and the international communist conspiracy to sap and impurify all of our precious bodily fluids.

Nuke's Scripting SVN

  

Offline WMCoolmon

  • Purveyor of space crack
  • 213
This might be something to experiment with. I don't know if I'm comfortable with scripts being able to actually run processes on the host computer though, so I may remove that function.
-C

 

Offline Nuke

  • Ka-Boom!
  • 212
  • Mutants Worship Me
sounds intesting. i just want a clean way to pass vars from script running in freespace to scripts runing in another interpreter, which would allow people wishing to build a cockpit simulator, or even a full motion simulator. to write scripts for i/o output and networking (to run client scripts on other machines). such a feature would fly well to the sim people. i always wanted to build a fms, and it would be cool that if i ever did, i could run freespace on it :D
I can no longer sit back and allow communist infiltration, communist indoctrination, communist subversion, and the international communist conspiracy to sap and impurify all of our precious bodily fluids.

Nuke's Scripting SVN

 
I looked into how Falcon-A  works for Falcon 4.0.  Looking at the source code it looks like it is using a shared memory file.  This looks pretty straightforward...

Here's where you can get Falcon-A http://www.viperpit.org/forum/viewtopic.php?t=530
MSDN article on shared memory files http://windowssdk.msdn.microsoft.com/en-us/library/ms685026.aspx

Now that I've started playing Freespace again, I think I can see why this hasn't been done already.  Unlike an F-16, there aren't any indicators you would need in Freespace that aren't already on the HUD.  This really makes building a cockpit superflous...

 

Offline Nuke

  • Ka-Boom!
  • 212
  • Mutants Worship Me
why do a panel when you could to a full motion simulator. :D once physics vars are accessible it would be pretty cool. using a paralel cable you could do motor speed out and rotation sensors in, and drive the whole thing off of the freespace engine :D
I can no longer sit back and allow communist infiltration, communist indoctrination, communist subversion, and the international communist conspiracy to sap and impurify all of our precious bodily fluids.

Nuke's Scripting SVN

 
I'm sure it would be cool but it would be WAAAAAAAY over my abilities.  I mean I work as a programmer (lately mostly SQL but I've worked a few years each with VB and Java) so I can grasp the coding (says the guy who still hasn't figured out how to get his MS Visual C 7 environment setup to a point to build Freespace).  I took a couple of electronics type classes in college so I could figure out how to setup buttons, switches, and indicator lights.  But I don't know anything about engineering... 

Building a motion simulator would totally rock, but I'm not the man to do it...


 

Offline Goober5000

  • HLP Loremaster
  • Moderator
  • 214
    • Goober5000 Productions
(says the guy who still hasn't figured out how to get his MS Visual C 7 environment setup to a point to build Freespace)

Some people have had problems with the MSVC7 project.  Try importing the MSVC6 one.

 

Offline Nuke

  • Ka-Boom!
  • 212
  • Mutants Worship Me
ive got a couple ideas floating around upstairs. the cheaper of the two is a 3 axis sim with 360 degree yaw radias and id say 90 degrees for pitch and roll. the yaw axis frame rotates on rails which are elevated above the floor and is driven by wheels by means of a gear motor, a simple digitaal compass provides the sensor here. the frame is a hexagonal ring about 6 feet in diameter and made from steel tubing. single wheel assembalys mounded on all 8 sides, 2 of which are driven by motors. the inside is left free for the pitch frame to rotate

your pitch  axis frame which fits inside the yaw frame. it is mounted on bearings. the bearing rods are fixed to the yaw frame while the bearings are in the pitch frame. a gearwheel is fixed to the inside of the braring rod, gear motors with worm drive is mounded in such a way as to rotate the frame. the sensor emplyed here is a simple ball baring in a wire ring sensor (which can be made fairly easiy). this frame would also house the bearings motors and worm gears that articulate the roll frame.

the roll frame is a rectangular frame about 5 feet in length. the plot seat is positioned slightly behind the center of gravity. the computer, panel, controls, and screen(s) will  be mounted in front to balence it out. fixed bearing rods and gears mount in the pitch frame for articulation. a rotation sensor like the one used in the pitch frame would also be used.

the computer would use a solid state ram based hard drive, which should survice being tossed around. a semi-decent video and sound card. id make it powerfull enough to run the game im building the simulator for. in the case of freespace 2 that means a gig of ram and a good 2ghz processor. it would need to have enough io ports to control the 3 sets of motors and read the 3 sensors. for screens a fairly large flat panel would do. however if the game supported multi monitors id use a pair of sli cards to drive 4 displays, which would be aranged in a hood with screens positioned to simulate front side and up windows for a virtual canopee. id use ch stick, rudder, and throttle. or sence saitek is finally coming out with rudder pedals that match my x-52 id use those.

depending on the torque of the motors being used, it might be nessicary to make the machine ultra balenced, meaning an adjustable pilot seat which could slide forward or back. this simulator could potentially hafe a full 360 degrees of rotation on all axes if you could solve the problems of running power/signal data through rotational couplings. you could just couple the power and piggyback the signal data onto the current (the same technology is used to set the clocks in many an office building).

--or--

this is a more exotic idea i just came up with. get a big sphere and hover it using either an air cushion or magnets. and at the 6 corners of the sphere have a "thruster quad" essentially 4 nozzels pointing on each direction along the plane prependicular to each axis. this gives you essentially 6 sets of 4 thrusters to controll all 3 axes of rotation. you drive theese using tanks of compressed air inside the sphere. this simulator is self contained, it requires several tanks of compressed air (which are "charged" by an external air compressor pump). your computer would also need to be on batteries (an alienware laptop :D) as theres no way to connect power and keep the sphere freely rotatable. also balence is critical, the pilot seat would need to be fore/back and up/down adjustable so that balence may be tweaked to perfection. to hover the thing magnets would be the cooler solution, as they dont make any noise and would interfere less with the rcs thrusters. an ir cushion would be the easy way, you just put your sphere in a ring with a seald base, and use about 6 carpet blowers to provide the thrust.
I can no longer sit back and allow communist infiltration, communist indoctrination, communist subversion, and the international communist conspiracy to sap and impurify all of our precious bodily fluids.

Nuke's Scripting SVN

 
Nuke, have you seen this? http://www.acesim.com/main.html

Since there is no gravity in space (I know that's not technically true, but you know what I mean), you wouldn't really need to have features like going upside down.  You would just need enough motion to account for inertia...  I think the JoyRider (use the link above, googling for it is rather dangerous   :eek2: ) would be sufficient for that... 

 

Offline Flipside

  • əp!sd!l£
  • 212
Wow! LOL

It's spooky how much of what you suggested back then has actually been partly or fully implemented.

 

Offline Nuke

  • Ka-Boom!
  • 212
  • Mutants Worship Me
Nuke, have you seen this? http://www.acesim.com/main.html

Since there is no gravity in space (I know that's not technically true, but you know what I mean), you wouldn't really need to have features like going upside down.  You would just need enough motion to account for inertia...  I think the JoyRider (use the link above, googling for it is rather dangerous   :eek2: ) would be sufficient for that... 

ive seen it, i just dont like it. sure its nice if you want something cheap. but if i anted to do a simulator id rather go all the way.that said i dont think anyone has a 3 axis arbitrary motion simulator. nasa is happy with its 6 dof vertical motion simulator, which doesnt have a full range of rotational motion. it has enough vertical and lateral ranve to make it seem like real flight though. the 3 axis thruster driven hoversphere would totally rock though.

if i ever built a sim id probubly go with the first idea. it would be cheaper and have fewer engineering problems. as youre using hi torque gear motors, balence is less critical and you wouldnt have to stop and recharge every 10 minture. i think i just like the enclosed cocpit idea, better imersion :D
I can no longer sit back and allow communist infiltration, communist indoctrination, communist subversion, and the international communist conspiracy to sap and impurify all of our precious bodily fluids.

Nuke's Scripting SVN

 

Offline WMCoolmon

  • Purveyor of space crack
  • 213
I looked into how Falcon-A  works for Falcon 4.0.  Looking at the source code it looks like it is using a shared memory file.  This looks pretty straightforward...

Here's where you can get Falcon-A http://www.viperpit.org/forum/viewtopic.php?t=530
MSDN article on shared memory files http://windowssdk.msdn.microsoft.com/en-us/library/ms685026.aspx

Now that I've started playing Freespace again, I think I can see why this hasn't been done already.  Unlike an F-16, there aren't any indicators you would need in Freespace that aren't already on the HUD.  This really makes building a cockpit superflous...

It's making it crossplatform compatible that really gets ya. Theoretically, you could stuff whatever data into a standard Win32 message and fire it off to another program, but it'd be totally incompatible with Linux or OS X. I don't know if either one has a shared memory space similar to the MSDN article one; I'd guess no, but I haven't worked with anything closer than memory mapped files.
-C

 

Offline Nuke

  • Ka-Boom!
  • 212
  • Mutants Worship Me
if you did it strictly in lua it would already be cross platform. im sure you could get a stand alone lua interpreter for any os. once you pass the vars from freespace's lua interpreter to the stand alone interpreter the code becomes strictly the buisness of the simulator builder and can be carried as far as their scripting knoledge would allow.
I can no longer sit back and allow communist infiltration, communist indoctrination, communist subversion, and the international communist conspiracy to sap and impurify all of our precious bodily fluids.

Nuke's Scripting SVN

 

Offline WMCoolmon

  • Purveyor of space crack
  • 213
Which puts you right back at square one, because if you can pass the vars to a standalone interpreter, you have to be able to pass the vars to another program. :p
-C