Outerra forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

Download Outerra Tech Demo. Unofficial Outerra Discord server, MicroProse Discord server for OWS.

Pages: 1 ... 10 11 [12] 13 14 15

Author Topic: Integrating with another sim  (Read 154922 times)

langdon

  • Full Member
  • ***
  • Posts: 110
Re: Integrating with another sim
« Reply #165 on: May 21, 2016, 08:42:56 am »

Quick video showing the jerky movement of the externally driven object.

Multiplayer server is hosted in Australia.
Ping between me and server is approx. 19ms.
Plugin is sending position and rotation data every 100ms. (set by me..could potentially be faster).

I think I'll need to get the velocities and calculate interim positioning.





Logged

cameni

  • Brano Kemen
  • Outerra Administrator
  • Hero Member
  • *****
  • Posts: 6721
  • No sense of urgency.
    • outerra.com
Re: Integrating with another sim
« Reply #166 on: May 21, 2016, 09:51:41 am »

Yea you definitely need to interpolate positions for given frame render time.

The demo version doesn't run plugins, and when you log in with another instance, it will kick out the previous one. Just create another account for testing and PM me the name.
Logged

langdon

  • Full Member
  • ***
  • Posts: 110
Re: Integrating with another sim
« Reply #167 on: May 21, 2016, 11:30:54 pm »

Heaps better.

Technically the receiver_client is 100ms behind the sender_client because I'm interpolating between the last 2 received positions.

I suppose I could get predictive and extrapolate based on a known velocity vector but from what I've read that has drawbacks if you change heading quickly and isn't worth the effort.

At the speed of sound your talking about 30cm over 100ms. I guess you have to be going for a 'head shot' in a Mig to worry about that kind of accuracy :)


Logged

langdon

  • Full Member
  • ***
  • Posts: 110
Re: Integrating with another sim
« Reply #168 on: May 22, 2016, 12:52:11 am »

My 2 pc's are at opposite ends of the house, so there's a long gap between me starting the recording and actually starting the t817 :)

You'll notice 1 or 2 position/rotation glitches in the movement. At some point they'll need to be filtered out.

So..... anyone in the GMT+10 time zone?

Logged

langdon

  • Full Member
  • ***
  • Posts: 110
Re: Integrating with another sim
« Reply #169 on: May 24, 2016, 05:16:22 am »

Quick question...

I understand there's no way (yet) to programmatically spawn a vehicle, but is it possible to have 'pre-spawned' vehicles in a .ota package ?

Something makes me think that when I first discovered Outerra there was a scene where there was a Cessna a Mig and a truck all parked at an airport? Or am I mis-remembering?

L
Logged

KW71

  • Outerra Developer
  • Hero Member
  • *****
  • Posts: 762
  • Love OT!
Re: Integrating with another sim
« Reply #170 on: May 24, 2016, 09:34:45 am »

Quick question...

I understand there's no way (yet) to programmatically spawn a vehicle, but is it possible to have 'pre-spawned' vehicles in a .ota package ?

Something makes me think that when I first discovered Outerra there was a scene where there was a Cessna a Mig and a truck all parked at an airport? Or am I mis-remembering?

L
Hi! Do you mean an .otx ?

You just need to place the vehicle using the editor (F7) and include the cache containing that cell.
« Last Edit: May 24, 2016, 09:37:31 am by KW71 »
Logged
"A man who is contented with what he has done, will never become famous for what he will do".

langdon

  • Full Member
  • ***
  • Posts: 110
Re: Integrating with another sim
« Reply #171 on: May 24, 2016, 10:33:22 am »

If I do that, will the vehicles be functional or just static?
Logged

KW71

  • Outerra Developer
  • Hero Member
  • *****
  • Posts: 762
  • Love OT!
Re: Integrating with another sim
« Reply #172 on: May 24, 2016, 11:07:18 am »

You can use them hitting enter.
Logged
"A man who is contented with what he has done, will never become famous for what he will do".

langdon

  • Full Member
  • ***
  • Posts: 110
Re: Integrating with another sim
« Reply #173 on: May 25, 2016, 04:36:44 am »

I must be missing something really basic because hitting ENTER does nothing for me unless I do it on a vehicle that I spawn.


With the Monterrey scenery.....the AH-64's that are included.. Do they function for y'all when you hit ENTER?

For me they are just static objects that I can't enter.


L
Logged

langdon

  • Full Member
  • ***
  • Posts: 110
Re: Integrating with another sim
« Reply #174 on: May 26, 2016, 04:44:08 am »

Damn...

I just realized something. With one-on-one multiplayer you just bounce one set of coords back and forth between the two players but with 3 or more, that's one set out going and 'n' sets incoming.

Which means the igc.dlll that updates one time every frame needs to receiving data between frames..

Which means THREADS !!!

Arrrrgh.

Which means
Logged

cameni

  • Brano Kemen
  • Outerra Administrator
  • Hero Member
  • *****
  • Posts: 6721
  • No sense of urgency.
    • outerra.com
Re: Integrating with another sim
« Reply #175 on: May 26, 2016, 10:43:02 am »

Probably not worth the hacking effort on the igc level.

But you actually do not need threads for this, just need polling for received datagrams at the frame start, updating object positions, and sending your own positional datagrams to other peers.

With the Monterrey scenery.....the AH-64's that are included.. Do they function for y'all when you hit ENTER?

For me they are just static objects that I can't enter.

I don't have the scenery installed here now, but I know there was a bug that you had to be outside of the bounding box of the vehicle/aircraft, but not too far, otherwise enter wouldn't work.
Logged

Acetone

  • Hero Member
  • *****
  • Posts: 963
    • Youtube channel
Re: Integrating with another sim
« Reply #176 on: May 26, 2016, 11:06:59 am »

With the Monterrey scenery.....the AH-64's that are included.. Do they function for y'all when you hit ENTER?

For me they are just static objects that I can't enter.

Enter vehicles can be a little bit tricky sometimes, but it works for these AH-64, you just need to be close enough (around 10m away, check with the "TAB" key HUD), but not inside the bounding box, as Brano said.
Logged

langdon

  • Full Member
  • ***
  • Posts: 110
Re: Integrating with another sim
« Reply #177 on: May 27, 2016, 03:09:18 am »

Thanks,
Yep..not inside the bounding box works.
Unless you actually spawn a vehicle from the menu..then inside the bounding box seems ok too.

RE: Threads..yeh.. I had an issue with a lot of 'flickering' vehicles which I'd assumed was me spending too long inside the dll receiving data. I also think it was compounded by using a 'blocking' receive as well. I made sure its non-blocking now.

I think I also got the cart-before-the-horse setting variables in the vehicle js and expecting to pick them up 'after' in the dll but the dll is called before the vehicle js update..

L
Logged

langdon

  • Full Member
  • ***
  • Posts: 110
Re: Integrating with another sim
« Reply #178 on: May 28, 2016, 06:10:13 am »

Quick question..

I get gx,gy,gz from the dll and pass them to this

var geom = me.get_geomob(0);
geom.set_pos({ x: gx, y: gy, z: gz });

  in the vehicle js.. Vehicle moves as you would expect....but as soon as I stop sending it set_pos() commands..it seems to return to where it would have been prior to me not sending the commands.

OR if you prefer... I take off, drop bomb...bomb should follow a parabola from where I 'launch' it.. instead..it's back in the hangar where I took off from?

Wierd...I continue to check my code but it seems all ok ... so far.
Logged

SteelRat

  • Sr. Member
  • ****
  • Posts: 380
  • newbie
Re: Integrating with another sim
« Reply #179 on: May 28, 2016, 11:00:42 am »

Quick question..

I get gx,gy,gz from the dll and pass them to this

var geom = me.get_geomob(0);
geom.set_pos({ x: gx, y: gy, z: gz });

  in the vehicle js.. Vehicle moves as you would expect....but as soon as I stop sending it set_pos() commands..it seems to return to where it would have been prior to me not sending the commands.

OR if you prefer... I take off, drop bomb...bomb should follow a parabola from where I 'launch' it.. instead..it's back in the hangar where I took off from?

Wierd...I continue to check my code but it seems all ok ... so far.

Code: [Select]
geom.move({ x: gx, y: gy, z: gz });
?

will need to be taken into account
https://en.wikipedia.org/wiki/Quaternion
Logged
Pages: 1 ... 10 11 [12] 13 14 15