Is multiplayer a possibility?

645 views
Skip to first unread message

Digimas

unread,
Aug 18, 2010, 6:48:10 PM8/18/10
to KML Developer Support - Google Earth Plug-in
Is it possible to create a multiplayer game within Google Earth?

I'd like to be able to do this but I have no idea where to start. I
would think it would be possible but I haven't seen any other examples
out there.

Thanks in advance,
Digimas

kyonn

unread,
Aug 19, 2010, 11:03:16 PM8/19/10
to KML Developer Support - Google Earth Plug-in
You will need a php mysql server to store the players data, and to
refresh with network link in ge.
You could also start with javascript and build the user interface
considering you have a example subset of this data loaded via a kml.

That's a huge work in fact but first interesting results would come
soon.

Try also to search google codes or the internet, not to reinvent the
wheel.

chris diamanti

unread,
Sep 8, 2010, 5:13:55 PM9/8/10
to google-earth-...@googlegroups.com
Hello Digimas and kyonn;

I made a multiplayer monster milktruck tester page, following the google instructions for using ge with php and a mysql database, here:
http://code.google.com/apis/earth/articles/phpsqlearth.html

You can try out my example, if one user clicks the first link below, and a second user clicks the second link below, and after both pages are finished loading, if you both press the 'f10' key on your keyboard, you will see each other's milktruck driving around. (I'm using firefox and have not tested on other browsers).

1) http://chrisdiamanti.com/milktruck/index.htm?model=milktruck&pid=1
2) http://chrisdiamanti.com/milktruck/index.htm?model=milktruck&pid=2

The problem is, it is slooooooooow, as if the queries to the database can't keep pace with the tick rate of the milktruck. The models are not moved smoothly, but in increments, so that they seem to jump like rabbits.
 
Is there any much faster alternative to the ajax php mysql solution?
 
-Chris

Cristian Olivenza

unread,
Sep 20, 2010, 9:53:02 AM9/20/10
to KML Developer Support - Google Earth Plug-in
Hi Chris!
I would like to make a multiplayer montermilktruck. I've searched many
websites and found nothing : '( I hope you could explain me step by
step how you did the multiplayer montermilktruck htm.
Thank you a lot! :D

Digimas

unread,
Nov 11, 2010, 8:02:01 PM11/11/10
to KML Developer Support - Google Earth Plug-in
Awesome game Chris, thanks for showing that multiplayer is possible.

I'm trying to create a GTA type game and could use anyone's help on
improving its functions. You can find the game here:
http://alterearth.net/grandtheftautoearthgame.html

I've hosted the game files on a Google Code page, so check it out if
you'd like to help improve it: http://code.google.com/p/grandtheftautoearth/downloads/list

chris diamanti

unread,
Dec 16, 2010, 3:04:03 PM12/16/10
to google-earth-...@googlegroups.com
Christian, I also periodically search for multiplayer google earth applications, in the style of unreal tournament, and am always frustrated. It seems obvious. One wonders why it isn't a reality already. Maybe there are technical reasons. Why can't ge become the foundation for all the game maps of a first person shooter type 3d game? Can it be integrated with a game engine? I'm probably naive.

To give a step by step on my multiplayer effort would be like a step by step on how to break your ankle. I posted the link in the hope that someone would be so disgusted, they would post a link to something better.

Can javascript even handle the processing load or would multiplayer ge have to be running in a lower level language?
 
Digimas, I went to your gta ge page several times, but I was never able to steal the car or the plane. Maybe because of some difference in setup. I did happen upon the video you made, and I really enjoyed that.
 
I'm working on allowing for walking a figure in the ge plugin, and also for race course creation, and for firing missiles, and some other things. You can see it here:
http://chrisdiamanti.com/milktrucker/index.htm
 
Here's a link to the key commands page:
http://chrisdiamanti.com/milktrucker/keys.php
 
I took all the controls off the ge plugin page, because they always seemed to fight with the ge plugin window, and in fact the browser itself, if it isn't in full screen mode, seems to fight with the ge plugin window.

I'm using firefox, and only briefly verified basic functionality on IE and Chrome.

What would be great is if there was a javascript function for linking two models at a joint, so that they could remain in the same relation to each other through any combination of changes in heading, tilt, and roll. Then diverse sorts of animation would be possible, it seems.
 
-Chris

Berwyn

unread,
Dec 16, 2010, 5:33:10 PM12/16/10
to google-earth-...@googlegroups.com
If you want to use chrome with the ge plugin, check out web sockets

Another HTML 5 solution Sever Sent Events

4thParty

unread,
Dec 16, 2010, 6:08:19 PM12/16/10
to KML Developer Support - Google Earth Plug-in
I have been able to put more than one milktruck on a page just by
adding an additional call to init the milktruck object.
as long as you teleport to the same area, the view will try to show
both trucks, it should be possible to get each truck to use different
keys.
HTH
John

M?ty?s Gede

unread,
Dec 17, 2010, 4:01:03 AM12/17/10
to google-earth-...@googlegroups.com
Hi all,
I've been thinking about multiplayer in google flightsim. My idea is that the players are sending their position and also the velocity and acceleration vectors periodically. Using that vectors the movement of the models can be smooth even if the connection is slow as the local script can calculate the position for any moment knowing a previous position and velocity.
My problem is that I don't want to implement all the aerodynamical stuff - the behavior of the plane -, I would like to use the built-in flightsim for that. Although the directory structure of the program suggests that the flightsim exists in the plug-in also (there is a res/flightsim folder in the plugin folder), I am not sure it is really working.
Does anybody know anything about it?

bye,
Matyas

chris diamanti

unread,
Dec 31, 2010, 1:58:17 AM12/31/10
to google-earth-...@googlegroups.com
Here I was complaining that it doesn't exist and it does. Xavier Tassin has made a fine ge multiplayer flight simulator:
http://www.ge-flightsimulator.com/

instructions:
http://gesim.keynoise.com/about.html

google group:
http://groups.google.com/group/ge-flight-simulator

blog:
http://ge-flightsim.blogspot.com/

That's good work. I hope it grows right along with processing power and bandwidth.

-Chris

Xavier Tassin

unread,
Jan 5, 2011, 9:59:58 AM1/5/11
to google-earth-...@googlegroups.com
Hi Chris,

Thanks for the compliment!

I still have to fix a few things about the multiplayer mode, but, indeed, it is doable.

Javascript is not the limitiation in term of performances, GE Flight Simulator runs a Javascript physics engine, flight dynamics, multiplayer and all the rest at 60FPS on a dual core (even IE6 manages to do all that 30 times per second). Communication protocol, back-end technology and the algorithms you chose and code will make a big difference though. I rely on HTTP to transfer the data as web-sockets are not yet widespread, and this is slow. Also, because GEFS is still a beta, my back-end is amateurish and I throttled the update period down to 1s in order for my server to cope with the load. I run a PHP back-end on a shared hosting and this is far from ideal. But with some interpolation, you can hide and smooth the gap between each update: that works particularly well in a flight simulation where the motion is continuous over great distances (except for my interpolation which is still buggy ;).

So it is not easy but you can do it. Keep working and good luck!

Xavier.

Randy Ziegler

unread,
Oct 15, 2012, 3:24:54 PM10/15/12
to google-earth-...@googlegroups.com

Hey, jusy a thought, i f you want to know how to do this multiplayer stuff, maybe you should study this game on this website it is a great flight simulator: http://www.gefs-online.com/gefs.php

Qantas 94 Heavy

unread,
Nov 17, 2012, 1:40:05 AM11/17/12
to google-earth-...@googlegroups.com
Have you noticed that this is over a year old?  ;)  Also that's the same flight simulator (albeit an updated version) that was mentioned earlier (by Xavier Tassin), however he had to move it to the new domain for legal reasons.
Reply all
Reply to author
Forward
0 new messages