Page 1 of 1

Renderbus

PostPosted: Thu Jul 05, 2018 7:44 pm
by Atlanta-Ned
Renderbus is Statbus' younger sibling, a one-stop shop for renders of the tg station maps.

This project is still HEAVILY WIP, so proceed with caution. The end goal is to automatically generate renders of the full station maps at least once a day, but this may shift to generating renders every time a map file is edited on github. Maps will be presented similarly to Goon's online map viewer and Affected's map viewer.

For now, here are the full size map renders. This page will update as new renders are created and updated:

https://atlantaned.space/renderbus/renders/index.php

Right now the renders are being executed and uploaded manually

Re: Renderbus

PostPosted: Sat Jul 07, 2018 2:33 am
by Atlanta-Ned
There’s a map viewer at https://atlantaned.space/renderbus/ now. Still working on adding more functionality.

Re: Renderbus

PostPosted: Sat Jul 07, 2018 8:49 am
by Jalleo
Sticked to make this easier for people to notice since when this is closer to fully functional I presume others will take more interest in it.

Re: Renderbus

PostPosted: Sat Jul 07, 2018 4:21 pm
by Atlanta-Ned
Ok, another update.

The last 18 months have been dominated by an issue where I am apparently incapable of converting from byond's coordinate system to the map viewer coordinate system. Luckily though, I finally cracked it.
Behold: MetaStation with the solar array trackers highlighted: https://atlantaned.space/renderbus/

Now I can do super cool shit, like linking to maps of deaths on individual death pages:
https://atlantaned.space/statbus/death.php?id=2831056

And in the future:
- A map of every death/explosion/anything else that saves coordinates on a round page(!)
- Death heatmaps(!!)
- An interactive log-viewer(!!!)

This issue with coordinates was the last hurdle. Everything after this will be easy to implement and work with :D

Re: Renderbus

PostPosted: Sun Jul 08, 2018 6:10 pm
by Atlanta-Ned
The explosions section of the round view now shows a map of where the explosions for a given round occurred!
https://atlantaned.space/statbus/round. ... explosions

The radius at the moment is determined by the `heavy` range of the explosion. I'll be updating this to include `light`, `flash`, and `flame` radii :D
Here's what the nuke going off looks like: https://atlantaned.space/statbus/round.php?round=90710

EDIT: WHEW https://atlantaned.space/statbus/round. ... explosions

Re: Renderbus

PostPosted: Mon Jul 09, 2018 6:31 pm
by Atlanta-Ned
The map views now include deaths, wires, atmos, and PDA messages, mostly as a proof of concept.
https://atlantaned.space/statbus/round. ... =90780&map

Re: Renderbus

PostPosted: Tue Jul 10, 2018 2:34 pm
by PKPenguin321
Brilliant, can't wait for a new and more functional death heatmap. Will it use all the old death stats as well or only recent ones, because I had like thousands of deaths on the old one

Re: Renderbus

PostPosted: Tue Jul 10, 2018 4:03 pm
by Atlanta-Ned
I've started work on the timeline function, which will let you scroll through events as they happened on the map. Right now, this only covers deaths and is very buggy.

The issues here are complex to say the least. There are plugins to do timelines in leaflet (the map viewer we're using), but they're poorly maintained and don't work reliably with data that's loading asynchronously.

Oh did I mention that wires, atmos, and PDA messages are loaded asynchronously? Because they totally are and it's pretty badass if I do say so myself.

Re: Renderbus

PostPosted: Wed Jul 11, 2018 2:39 am
by oranges
the map stuff is really neat

Re: Renderbus

PostPosted: Wed Jul 11, 2018 4:28 pm
by Atlanta-Ned
An update on where things stand:

I've got a new slider mechanism in place, and am very close to making it 'work'. JavaScript is funnymaddeningly stupid when it comes to comparing different variable types. Compounding this is the fact that I'm juggling several different date/time formats and converting all of them to something else several times.

So after I manage to do this without hiring a hitman to take myself out, I'll be able to focus on the Big Thing™: Game and attack logs.

This will be complicated for several reasons:
1. These logs are only available to me in Giant Text File format. We're talking several bytes' worth of data. In the grand scheme of things, these aren't difficult to handle at all. It's a fairly straightforward RegEx and some massaging.
2. Except that attack.log is stored separately from game.log, hah hah hah. So I have to parse both files, then smush them together.
3. Which brings us back to the fact that these files are several bytes and frequently 10k+ lines.
4. So storage and recalling of these files is challenging. Previously, I've tried:
- Parsing and smushing all at once, then displaying the resulting Blob of Text all at once. This was painfully slow.
- Parsing, smushing, and caching to a locally saved json file, then displaying everything at once. Faster, if you were using the cached file, but still painfully slow.
- Parse, smush, and cached to a database, then displaying the resulting blob. Surprise surprise, this was also slow as fuck. And also slowed down my database
- Parse. Smush. Cache to DB. Display only 1000 lines at a time. Slow, on the first parsing, but much more performant when it came time to actually look at the logs! But I also bungled this because I am a bad programmer
- Parse. Smush. Cache to DB. Except with Python instead of PHP. Super fast, not at all terrible, but means we've invoked python from PHP. What sort of lunatic does that?

5. Which brings us to now. There are a couple of different avenues I can take here:
- Parse and smush the log files with PHP, serve them as json that can be fetched by the map viewer. This can be done asynchronously, but it might be bandwidth/processor intensive. And also crash your browers because lol 10k+ long objects
- Parse and smush the log files in javascript, because it's 2018 and of course JS can fetch a remote gzipped file, decompress it, and run bunch of regex. This has the benefit of offloading all the processing onto the client's browser, but also at the risk of making everything catch on fire.
- Actually, since we're using the map viewer with a timeline scroller, we dont need to smush anything together. I mean, we should, but not for this. Wew.

Re: Renderbus

PostPosted: Thu Nov 29, 2018 9:42 pm
by Atlanta-Ned
Donut Station is up now, along with the most recent versions of the rest of the maps https://atlantaned.space/renderbus/
I also streamlined my rendering process, so maybe renders will be up sooner now,

Re: Renderbus

PostPosted: Sat Apr 13, 2019 6:59 pm
by Atlanta-Ned
Just pushed another update: https://atlantaned.space/renderbus/
The render process has been further streamlined and condensed into one line command*.

*It's a very long line

Re: Renderbus

PostPosted: Mon Oct 21, 2019 2:46 pm
by Atlanta-Ned
https://atlantaned.space/renderbus/

Yay more updates!
I'm currently rendering and syncing the most recent version of Kilo Station, it should be live in an hour or so
After MANY MANY months of not knowing wtf I was doing, pipe and powernets are now working
Unfortunately, wires render LikeAss™ thanks to the easy wiring update or whatever the fuck it is. It sounds like adding them to the renderer is going to be more work than it's worth, so don't hold your breath on that