This setup uses OOSocks, Node.js, websockets and canvas to display a simple 2d map of the server.
It sends a list of players and props via udp every few seconds to a node.js server.
Because websockets are so new, not all browsers support them so this should also fallback onto flash in that case.
This is set up to view flatgrass.
[URL=http://img220.imageshack.us/i/screenshot20101216at222.png/][IMG]http://img220.imageshack.us/img220/2962/screenshot20101216at222.th.png[/IMG][/URL]
I haven't tested it with the new html loading pages, plus I don't have a dedicated server to show you all,
but node.js and socket.io are both easy to set up on mac and linux.
Download and installation info:
[url]https://github.com/perky/Live-Gmod-Map[/url]
I hate to burst your bubble, and I'm sure this will improve, but right now it's just a bunch of boxes that make no sense to me whatsoever.
Well yeah, it is WIP.
The semi-circle is the player, with orientation, and the boxes are prop_physics.
Reminds me of one of the plug-ins for counter strike source. Looks good. Maybe you could add heat opinion to show common places?
Wow, very neat. I think this has potential.
This looks really nice, but you should make it more "clear".
If only you could copy the pixels of a rendered scene to an image.
You may think I'm dumb for saying that, but to be brutally honest, no one will understand what this guy is trying to pull off unless they understand the correlation between the player's names and the boxes.
Even then it's not visual enough at all to give any sense at all as to where the objects actually are, or what they are.
You're probably thinking about this concept so technically (because it may seem impressive to you that he's using sockets and some canvas work in tandem) that you're obscuring the practicality of it all.
Send the physbox of the object and draw using vectors.
Likely the bounding box of the props.
[QUOTE=amcwatters;26753931]You're probably thinking about this concept so technically (because it may seem impressive to you that he's using sockets and some canvas work in tandem) that you're obscuring the practicality of it all.[/QUOTE]
Since when has anything in GMod been remotely practical?
[editline]17th December 2010[/editline]
Loosen up and enjoy the ride.
My butthole is too tight to. :frown:
[editline]17th December 2010[/editline]
I lol'd.
[QUOTE=Grea$eMonkey;26753619]If only you could copy the pixels of a rendered scene to an image.[/QUOTE]
Well there is one way to do that.
1. run "jpeg networkshit 50" on a client (you can set there pos/aimangle if you want) (base the quality off the screenshot on the resolution of the game to get a stable screenshot size)
2. Copy screenshot to server using sourcenet
3. Copy screenshot to webserver using a simple IO module
(PS This is also a hell of a good method for finding out if players are using hacks)
[QUOTE=ColdFusion;26759494]Well there is one way to do that.
1. run "jpeg networkshit 50" on a client (you can set there pos/aimangle if you want) (base the quality off the screenshot on the resolution of the game to get a stable screenshot size)
2. Copy screenshot to server using sourcenet
3. Copy screenshot to webserver using a simple IO module
(PS This is also a hell of a good method for finding out if players are using hacks)[/QUOTE]
Have fun waiting an hour for a result! :smile:
[QUOTE=iRzilla;26760388]So a 600kb image will take an hour to upload to server? Nice logic.[/QUOTE]
Technically it would take around 30 seconds given how slow the upload is.
[QUOTE=amcwatters;26760510]Technically it would take around 30 seconds given how slow the upload is.[/QUOTE]
2.14megabit upload connection witch is the avg upload connection in Europe. (Source: Speedtest.net)
2140kbit/s /8 -> 267.5kbyte/s
Then we lose about 30% because of other data transmission.
that would still leave a 187.25kbyte/s connection.
600 / 187.25 = 3.2 seconds.
So you are only a factor 10 off.
Plus you don't need (nor want) live streaming on that many images. You only need one image, one time every few seconds for each object(you should allow this to be tweaked in some config somewhere). I don't know too much about networking in this way but i think it would be a great new addition to Gmod, especially now that it supports HTML web pages stock.
[QUOTE=iRzilla;26760653]Why did you say an hour then? :\[/QUOTE]
Exaggeration.
[editline]17th December 2010[/editline]
[QUOTE=ColdFusion;26760901]2.14megabit upload connection witch is the avg upload connection in Europe. (Source: Speedtest.net)
2140kbit/s /8 -> 267.5kbyte/s
Then we lose about 30% because of other data transmission.
that would still leave a 187.25kbyte/s connection.
600 / 187.25 = 3.2 seconds.
So you are only a factor 10 off.[/QUOTE]
You've unacknowledged entirely that your upload isn't going to be nearly that.
What i've done here is laid down the technical foundation first.
Now you can stream any information available in gmod to a web page.
Using your imagination, you could imagine that map with images of people representing players,
boxes representing props and cars representing vehicles.
It's not really about practicality, it's meant to be a interesting little to thing to look at while the server loads.
It's also easy to add a html chat box so you can chat with the server, not sure if the gmod loading pages accept key input though.
It doesn't accept any input, afaik. You can output though.
[QUOTE=ColdFusion;26759494]
2. Copy screenshot to server using sourcenet
[/QUOTE]
what function allows you to do that?
I could be way off base here, but couldn't you write a shell script to do the file management after the screenshot is taken? I'm not much of a web guy, but I've written shell/perl scripts to do that kind of stuff before.
[QUOTE=amcwatters;26762123]You've unacknowledged entirely that your upload isn't going to be nearly that.[/QUOTE]
Please do an actual file send test and give us the upload/download rates, you'll come to realize that Source doesn't suddenly and magically allow you to use all of your bandwidth. This isn't like downloading something off the Internet from a web server.
Instead of using sourcenet, can't you just use curl to POST it to a web server? Seems easier to me...
[QUOTE=iRzilla;26798744]Of course, you could also use marvellous symlinks <3[/QUOTE]
Yeah that would work well with another script in place to either delete the old screenie or select the highest numerical one.
Since it's a top down view why don't you just take the screenshot using cl_leveloverview beforehand and then check which map the person is on, and use that image as the background? That's what I did except I used the google maps API and stuck the positions into a database every couple of seconds.
I don't suppose this can be used as a loading screen in GMod?
[quote]I used the google maps API[/quote]
Any chance I can take a look out how you did that? Especially how to convert gmod co-ordinates into co-ordinates for the map.
[QUOTE=ljdp;26867648]Any chance I can take a look out how you did that? Especially how to convert gmod co-ordinates into co-ordinates for the map.[/QUOTE]
Unfortunately I lost the code in a format, but basically you just need to find the offsets by trial and error, Ignore Z and make sure 'north' is the same way across all the maps. You could treat the positions as vectors from an origin, and just mess around with the magnitude and origin until it fits.
I just followed tutorials to make the thing anyway. These may help:
[url]http://code.google.com/apis/maps/documentation/javascript/overlays.html[/url]
[url]http://mapwow.com/[/url]
[url]http://int2e.com/blog/how-to-make-a-site-like-mapwowcom/[/url]
Sorry, you need to Log In to post a reply to this thread.