Official Soldat Forums
Soldat Fans => Developers Corner => Topic started by: urraka on March 06, 2015, 04:47:40 pm
-
I was really bored so I did a webgl map renderer:
http://urraka.github.io/soldat-map/#ctf_Ash
http://urraka.github.io/soldat-map/#Airpirates
http://urraka.github.io/soldat-map/#Cambodia
All the default maps are uploaded there for testing, just change the name in the URL.
Source code is here: https://github.com/urraka/soldat-map
-
Cool, cool, cool.
-
You forgot making scroll wheel zoom in and out. Good otherwise.
-
You forgot making scroll wheel zoom in and out. Good otherwise.
You can still zoom in and out with +/- keys. My mouse wheel is always broken so I don't bother to think about it anymore...
Edit: ok, I added mouse wheel for zooming now (hopefully it's not backwards)
-
Awesome!
-
Awesome!
-
This is quite, well, awesome, as others have said! This reminds me of when I wanted to make a heatmap of where people die or kill, among other things. I still find the idea fascinating.
I see zooming convention be different between programs. I personally like the way zooming is, but I think that is the less common convention of the two conventions (may be I am wrong here?).
-
More than a map preview. Brilliant!
I'd love a switch to polygon view and spawns/flags but this is good enough :D. PW can do the rest.
BTW: Zooming with scroll wheel works just fine.
-
This reminds me of when I wanted to make a heatmap of where people die or kill, among other things.
That's a very interesting idea indeed
I'd love a switch to polygon view and spawns/flags
With "switch to polygon view" do you mean to show only polygons? or some kind of wireframe mode?
-
This awesome thing can be used for map databases to make them more comfortable to use! No more test-downloading maps due to shitty preview screenshot! :D
-
this is truly sexy
-
This reminds me of when I wanted to make a heatmap of where people die or kill, among other things.
That's a very interesting idea indeed
Someone did that for one of the gather communities a long time ago. Something makes me feel Toumaz was involved.
Edit: ok, I added mouse wheel for zooming now (hopefully it's not backwards)
Perfection. Now it's as good as browsing with Polyworks.
With "switch to polygon view" do you mean to show only polygons? or some kind of wireframe mode?
Open Polyworks and look at the little window with the checkboxes that determine how to render the map. You can choose between full polygons rendered with texture (how your web app currently is), polys without texture but with shading, polys without shading or texture which is just wireframe which is probably what Moroes is asking.
Also, Could you add some sort of progress bar for loading the map elements? Staring at a black screen for a few seconds while the map loads is less than ideal.
Additionally, put the PMS filename in the <title> tag so it's easy to discern a bunch of tabs open at once.
Another edit: now that I've played with it for a bit, can you make it so zooming in uses the position of the mouse cursor?
-
wtf? empty links..
-
wtf? empty links..
If you're talking about the black screen, you have to wait a few seconds for the map to load, fuckstick.
-
Also, Could you add some sort of progress bar for loading the map elements? Staring at a black screen for a few seconds while the map loads is less than ideal.
Additionally, put the PMS filename in the <title> tag so it's easy to discern a bunch of tabs open at once.
There's a loading indicator now, and the map name shows in the title.
I'll play with the zoom stuff tomorrow and maybe I'll work on adding some switches to show/hide stuff like PolyWorks does.
wtf? empty links..
Also note that this stuff won't work on shitty old browsers. I only tried it on Chrome and Firefox. Internet Explorer has a long history of being shitty so I wouldn't be surprised if it doesn't work there. I don't have the newer one so I can't really tell though.
Edit: did the zoom to cursor position stuff already
-
Yes, jrgp is right. I'd love a wireframe showing the map structure in a well arranged way. Polygons should be coloured according to their types (normal, deadly etc.)
Something like this: https://db.tt/MKA5mYtd
Zooming is even better now and map loading is sexy. It loads even the biggest "maps". :D
http://morko.cz/#rce_freetime
Got just one problem. Fancy climb maps are always black. Doesn't it load textures of size of hundreds of kBs, or is it a server/filename problem?
http://morko.cz/#SS_Juice
http://morko.cz/#ctf_vir_coop10
I am attaching the map files in case you wanna test that.
Thanks much for the renderer ;)
-
If you're talking about the black screen, you have to wait a few seconds for the map to load, fuckstick.
I have white screen xDDD
Also note that this stuff won't work on shitty old browsers. I only tried it on Chrome and Firefox. Internet Explorer has a long history of being shitty so I wouldn't be surprised if it doesn't work there. I don't have the newer one so I can't really tell though.
I'm using Firefox :p
-
Got just one problem. Fancy climb maps are always black. Doesn't it load textures of size of hundreds of kBs, or is it a server/filename problem?
Yesterday I noticed some maps would fail to load because the file name casing in the PMS was different from the real file. So I renamed all images to lowercase and made it always load as lowercase. A bit hacky but just wanted to make it to work. Blame windows file system for not being case sensible.. Anyway, I thought that could be the problem there but I just noticed it's something else. Looks like WebGL requires power of two sizes for textures that have a repeat wrapping. Still, if you try custom maps make sure all the image files are lowercase until I figure out a better way to fix that.
Btw, if you have access to a bash console in your server you can use commands like this to rename images to lowercase:
cd soldat-map/data
find scenery-gfx/ -name '*[A-Z]*' | while read f; do lc=$(echo "${f}" | tr A-Z a-z); mv "$f" "$lc"; done
find textures/ -name '*[A-Z]*' | while read f; do lc=$(echo "${f}" | tr A-Z a-z); mv "$f" "$lc"; done
I'm using Firefox :p
Well, first I would make sure that WebGL actually works on your end. You can test that here https://get.webgl.org/.
If that works fine you can try checking for errors in the map renderer. Just open the console (ctrl+shift+k) and see if there is some message in there. If there's nothing refresh (with the console open), and check again just to make sure.
Edit: fixed the power of two problem
-
http://web.soldat.pl - Now you can play Soldat using your browser, like Quake Live.
Oh, no. It's a dream :(
-
http://soldat.thd.vg/en/gather << this "still exists". :P
-
awesome!!! :D!! more of this:)
-
http://soldat.thd.vg/en/gather << this "still exists". :P
Except that "web app" I made with MM in ~2010 no longer has the soldat servers or the backend daemons running.
-
http://soldat.thd.vg/en/gather << this "still exists". :P
Except that "web app" I made with MM in ~2010 no longer has the soldat servers or the backend daemons running.
Hence quotes around "still exists". I wasn't sure if it's even playable. And btw, you have been working on it with me. I was your alpha/beta tester. :P
-
The map viewer now has some options to switch scenery, polygons, wireframe, etc
http://urraka.github.io/soldat-map/
I also have in mind adding options to highlight specific polygon types (deadly, etc) and to show objects (spawn points, flags, etc).
By the way, anyone knows what the "active" field means in the PMS format? (check here http://wiki.soldat.pl/index.php/Map). Some structs like PMS_PROP have this field. Should I not render stuff that is not "active"?
-
The map viewer now has some options to switch scenery, polygons, wireframe, etc
http://urraka.github.io/soldat-map/
I also have in mind adding options to highlight specific polygon types (deadly, etc) and to show objects (spawn points, flags, etc).
By the way, anyone knows what the "active" field means in the PMS format? (check here http://wiki.soldat.pl/index.php/Map). Some structs like PMS_PROP have this field. Should I not render stuff that is not "active"?
How hard is to put a player with the same Soldat movement, 3 weapons (auto, m79, barret) +secondary and the network things?
-
How hard is to put a player with the same Soldat movement, 3 weapons (auto, m79, barret) +secondary and the network things?
VERY hard :)
-
How hard is to put a player with the same Soldat movement, 3 weapons (auto, m79, barret) +secondary and the network things?
VERY hard Challenge accepted. :)
Fixed that for you :P
-
Haha very funny. I think it would be easier to find a way to compile soldat source to javascript. It's a trend to compile things to javascript these days.
On a different note, mr. %%%%%% noted me that the wireframe mode is barely visible when polygon texture is disabled, so I made it render darker when texture is unchecked.
Edit: added options to highlight specific polygon types
-
Added options to switch colliders and object spawns http://urraka.github.io/soldat-map/
Only thing missing is the bot waypoints, but it doesn't sound like a very useful thing.
-
spawn a car http://phaser.io/examples/v2/box2d/car-on-terrain
-
Bit of a bump. Hi.
I did the heatmap stuff a looong while back for #soldat.realistic (http://toumaz.users.avalanchehosting.com/index.php?p=heatmaps). Since that site won't be online for much longer, here's a generated image (http://i.imgur.com/JFt09Vg.jpg) for posterity's sake.
If anybody wants to play around with some data for heatmaps or the like, I've attached a CSV with about five million game events. Columns are map, event, team, x, y, weapon. Feel free to do whatever you like with it.
-
That's pretty cool, I might try something with that stuff later. Thanks for the data!
-
Bit of a bump. Hi.
I did the heatmap stuff a looong while back for #soldat.realistic (http://toumaz.users.avalanchehosting.com/index.php?p=heatmaps). Since that site won't be online for much longer, here's a generated image (http://i.imgur.com/JFt09Vg.jpg) for posterity's sake.
If anybody wants to play around with some data for heatmaps or the like, I've attached a CSV with about five million game events. Columns are map, event, team, x, y, weapon. Feel free to do whatever you like with it.
Knew it was you! Thanks for those links.
Also, welcome back. xD
Also also, I'll give you free web hosting to keep that online. That's cool as hell.
-
If anybody wants to play around with some data for heatmaps or the like, I've attached a CSV with about five million game events. Columns are map, event, team, x, y, weapon. Feel free to do whatever you like with it.
In addition to this, here is an attachment with same data in a format of SQLite database.
-
That's a lot of hard work, great. So what is next, web based Soldat game? :P
-
That's a lot of hard work, great. So what is next, web based Soldat game? :P
I'm almost there! http://urraka.github.io/estampida/
(not really)