#code-talk

2 messages ยท Page 5 of 1

long raft
#

if i need a cheap server i just use linode

pure sierra
#

@barren quarry i can host it

#

hopefully it doesnt load up my server too much

barren quarry
#

@pure sierra thanks, i will contact you tomorrow or later today

pure sierra
#

im about to go to bed, im in +11utc

#

i dont have a problem with it as long as it doesnt kill my cpu/ram load, as they are my main limits on my vps, but im willing to trial it.

#
#

goodnight

versed notch
#

I adjusted my code to create the current Faction-occupation to be drawn for the whole Worldmap instead of seperate Maps

#

This is a snapshot of the current Map Coverage by Faction from last Night

barren quarry
#

looks very cool

#

what language are you using?

versed notch
#

btw big thanks to @barren quarry! I implemented your region_conversion script from javascript to my python code!

barren quarry
#

ah you're welcome

#

you've found a very good use for it

versed notch
#

ty ๐Ÿ˜ƒ

long raft
#

that looks good

#

lol i am working on a very similar thing

versed notch
#

in what language? ๐Ÿ˜ƒ

long raft
#

c#

versed notch
#

I can share my python script if you wanna take a look in my messed up code xD

long raft
#

well i think we have a slightly different approach

#

i was doing more like a heat map

#

but when i look at the maps i can't gather easily which factions control which regions

#

and it felt like it needed an overlay, really when you were doing the historical maps it gave me the idea

versed notch
#

what does the "heat" represent in your map?

long raft
#

its a geostatistical estimation method called kriging

#

so heat for wardens, heat for colonials, but its gradient because its an estimation

versed notch
#

got any working examples? ๐Ÿ˜ƒ

#

sounds also very interesting

long raft
#

honestly i think it will look similar

#

i think it'll look like yours with a gaussian blur on it

#

i remember hayden thought we should colectively request from the devs an API feature (it was a programming lull for them) and I thought we should request destroyed fob locations

#

not knowing where the fobs are makes it really hard to estimate the control areas

versed notch
#

yes without that information its only a rough interpolated guess

#

but it looks cool ๐Ÿ˜„

long raft
#

its straight-up extrapolated!!

#

but we dont have to be scientific, luckily

#

so ape youre not doing this for the historical data? youre going to use it for the modern maps now?

versed notch
#

by historical you mean before world-map update?

long raft
#

yea, the data from hayden?

versed notch
#

I already have working code for that, but every region is drawn for itself

#

so there is no merging into a large worldmap

#

im not planing on doing that

long raft
#

oh right...

#

yea they cant be merged probably

#

how long does it take you to generate that map?

versed notch
#

example map for deadlands

#

Im just running the code again to see the time

long raft
#

it looks good...

#

its sort of weird and unfortunate (now looking back) that the old maps didnt connect cohesively

versed notch
#

its 1 image per warday
1 image takes less then 1 sec (including saving)
overall it takes ~220 secs for Deadlands

#

and after my script i run a Shellscript to create *.gif and *.mp4s

#

takes also like 1 min

long raft
#

oh thats not too bad

barren quarry
#

ive done a couple of timelapses a while ago, idk if youve seen them, but i had to define all polygons myself there and it was extremely tedious

#

so its very cool to see this done dynamically

versed notch
#

I think there is potential to speed it up, but im not a professional programmer :D
Used to be a scientist, who now works as an engineer and use programming for data analysis and visualisation

#

since all I know is from learning it on my own, there is a good chance you can make it better ๐Ÿ˜‰

long raft
#

the only other timelapses i saw were literal map screen recordings over hours

barren quarry
#

this was done in .NET

long raft
#

jeez i should be using how long the town hall has been controlled as a covariance ...

barren quarry
#

i don't do these anymore because they killed war correspondent, my main source of data

long raft
#

then it could be animated...

#

they killed it? huh?

#

oh oh the devs killed it! i remember

barren quarry
#

maybe one day im gonna grab the logs from hayden and do something similar

#

Here's how i animated it

long raft
#

i believe i could make smooth animations, but i cant render as fast as you guys

#

its basically like a raytracer

barren quarry
#

i parse all of the messages into factions, town halls, and times

#

so i have giant array of messages

#

then i set turn on a stopwatch thats starts from march 14, the date the introduced world conquest or whatever

#

every 50 ms or something the stopwatch adds a set amount of time

#

say, a minute

#

and eventually it scrolls through the entire list of messages

#

this obviously is recorded by obs over the course of like what, 20-25 minutes

#

while i go take a nap or something

#

then i speed it up like 4-5x

#

in post production

long raft
#

lol

barren quarry
#

to match the length of the music

#

and that was it

long raft
#

you play LoL, kastow?

barren quarry
#

i used to

#

from like, 2010 to 2017?

long raft
#

wow long time

barren quarry
#

do you?

versed notch
#

Dota! ๐Ÿ˜›

long raft
#

yea i play LoL when wardens are losing hard and colonials are upgrading town halls lol

barren quarry
#

lol was extremely detrimental to my mental health

#

i broke several pieces of hardware playing it

#

every time i play it after a long break i instantly understand why i stopped

long raft
#

foxhole doesnt do this to you?

#

btw, you really are an expert at lining up maps

versed notch
#

well I know your feelings ๐Ÿ˜„
I have a very similar history with Dota/Dota2

#

without breaking my hardware ๐Ÿ˜›

barren quarry
#

@long raft when we did the very first version of the interactive map with sethfire and the boys, i didnt know javascript at all so all i did was line up the maps

long raft
#

its not easy work lol

#

especially the old map

barren quarry
#

that was a year ago

long raft
#

im very grateful youve done all this hex math for me

barren quarry
#

by the way, recently, during the development of foxhole global, mulon asked me to match the background to the map, its impossible to match all of the shorelines and rivers but i did my best

long raft
#

match the background to the map? eh?

barren quarry
#

then i go into the game and see that the background there is matched to the map in the same way as i did almost pixel by pixel

long raft
#

the faded out parts? and the ocean?

barren quarry
#

yeah that one

long raft
#

ooo

#

thats nice, i want to use that as the mask instead of the hex map...

barren quarry
#

this map matches horribly with the hex map

#

it doesnt even have oarbreaker

long raft
#

oh ... where did that map even come from?

barren quarry
#

this is an official map lol

long raft
pure sierra
#

im awake, lots of interesting posts ! this channel is a bastion of sanity compared with #foxhole-discussion

long raft
#

code man bad

pure sierra
#

thats so funny @long raft that me and @versed notch were working on the same thing parralel

#

@barren quarry your hitting your hosting limits, what about seth's site ? is he paying or not using as much resource as you ?

#

sad that wardens getting pushed back ๐Ÿ˜ฆ

long raft
#

as I don't have a map site mine was just a proof of concept or I could make it reality if somebody wanted it

barren quarry
#

i dont know how much his website is being used honestly

long raft
#

just trying to figure out the best way to fill in the blind spots on the map

pure sierra
#

@barren quarry but hes not paying ?

barren quarry
#

no

#

same host as me

#

on our host hosting is free, everyone gets a decent cpu and 512 mb of ram but the requests are limited to 4000 per hour

#

and in practical use that limit was only breached once during devstream

pure sierra
#

@long raft so my idea for the devs to add more frontline data to the api maps was to add radio tower detected items that are detected by both teams, so tower overlap, not secret

long raft
#

hmm

#

and white fobs?

#

historic tower data would be like OMG

pure sierra
#

you could add white fobs, but you cant really determine much from them....

long raft
#

we put that through the GPU neutral network and we get an unbeatable battle plan

pure sierra
#

you can guess it might be near the front but you dont know who's it was

#

@barren quarry well maybe you will be alright there for now ?

long raft
#

oh i assumed it would be in the api data, but yea i guess you dont really know that now

barren quarry
#

@pure sierra here's a small problem

#

within about a week I saw a bear will make a video about this website

#

and the link to this video will be in the game menu

#

so there might be slight issues

long raft
#

it would definitely fit into the free tier of amazon

pure sierra
#

im not sure what the limits of aws free are

barren quarry
#

and there are 42 people currently using the website

pure sierra
#

ok so nothing really

long raft
#

wow thats not much

barren quarry
#

big surges could bring the website down

#

so basically right now there arent many issues

pure sierra
#

how many request it on now ?

barren quarry
#

but if there's more attention than i can handle then i'll ask for your help

long raft
#

amazon will give you 1cpu, 1g ram, 30gb storage free for a year...

pure sierra
#

that sucks

#

4000 is stuff all realy, its only 60 per minute or 1 per second, so with 40 users its prob getting up there already

long raft
#

yea thats a low number

pure sierra
#

60 users 1 request per minute each

#

i think they will intereact more than that

barren quarry
#

right but i don't really know what counts as a request

pure sierra
#

a click

long raft
#

anything lol

#

its going to also include all the images and ajax requests, too, right?

pure sierra
#

GET/POST

#

quite possible

#

you can do some free testing with that

long raft
#

as it uses up 50% of your capacity wardenlol

#

is this going to slam my server?

#

woo response time 54ms stays the same

pure sierra
#

you can set the workers

long raft
#

oh boy this is exciting! 100 requests a second!

#

this is defintely going to exhaust his site if he uses this haha

#

it just did 6300 requests on me

pure sierra
#

ram ranch

barren quarry
#

I ran a test on a copy of the project

#

didnt give the "too many requests" error

#

so actually i have no idea how that limit thing works

pure sierra
#

was it on a url that had the map full thing and not just a login screen ?

long raft
#

it probably allows for some burst by averaging a larger window than 1 hour

pure sierra
#

maybe there is delay on the counter and it will still shut you down

#

@long raft where is the free tier hosting package on aws ? can you link it ?

long raft
#

ive done a little amazon, so i'll try to explain all the basic fees heres

pure sierra
#

i was just on that page

#

i cant find the hosting package

#

ive used aws for smtp

long raft
#

you need EC2 (this is the server), 750 hours free per month (thats free all month for 1 year)
you need EBS (elastic block storage is where you write data for the VM), 30GB free
you also pay for bandwidth per gb (there's a free tier limit there too)

pure sierra
#

and backup

barren quarry
#

750 hours of what?

long raft
#

CPU time

#

cloud service is done by the hour or by the GB

#

all the cloud providers bill this way...

barren quarry
#

so if, say, there is a bot that uses little cpu but all the time, the by the hour deal is shit?

long raft
#

yea, but if you use little CPU you would just pay for a smaller VM at a cheaper rate

#

but yes youre billed for the hours the VM is running, but like i said, 750 hours free a month covers the entire month

#

it's the t2.micro virtual machine

pure sierra
#

but there are ~750hrs in a month

long raft
#

like what's your ideal scenario, kastow?

barren quarry
#

well since even this amount of people doesnt use a lot of resources, the ideal scenario would be similar to what it is now, free hosting with a few resources, but unlimited amount of requests

long raft
#

im gathering you guys prefer like a hosting package, rather than a raw server that you have to configure?

barren quarry
#

not quite sure what you mean by hosting package, i dont have a lot of knowledge in that

pure sierra
#

not necessrily, i have thought about cloud as an option for my hosting just not there yet to weigh up the differnce

long raft
#

well when i use amazon, i set up the whole VM, i install the web server and configure it and the firewall, etc

#

but i think a lot of web developers want a web interface with something like cpanel running

#

i dunno whats hot these days...

pure sierra
#

1gb ram is not much to run debian on though

long raft
#

he only uses like 100mb

barren quarry
#

then it would be hosting package yes

pure sierra
#

that is not including os

long raft
#

and yea debian is ... bulky. could always be run on alpine instead or w/e

#

OS is probably 2GB

#

an amazon server can also be set up pre-configured with hosting interfaces

barren quarry
pure sierra
long raft
#

do they limit what you can run on free tier or something?

#

AWS has a crapton of linux distros

pure sierra
#

"you are also empowered to use our bundling tools to upload your own operating systems. "

long raft
#

hundreds, there are hundreds of thousands of images

pure sierra
#

figured

long raft
#

ah ok, so amazon provides those, but other people have made their own and shared it

#

you can find any distro ready for amazon

#

same for azure and ... who else is the other one?

#

rackspace? google? probably different, hmm

#

@barren quarry your site is all node.js?

barren quarry
#

yeah its node js

#

with webpack

#

back is node js and front is react

#

and they communicate via socket

pure sierra
#

so i guess if many thing go through ,socket that would be like on request/conneciton

long raft
#

hmm the google free tier might be free ... forever

#

i cant tell. it sure seems like its free for 1 year, and then beyond (unless they change it)

#

k im going to think about it and see if i can make a better suggestion then

long raft
#

it's like an optical illusion the way the water looks gray in this - but i haven't changed it's color

#

i thought i saw a color-corrected ocean map floating around somewhere...

young pilot
#

I looked around for quite a bit for a leaflet plugin capable of doing directional routing while creating roads but it is going to require quite a bit of effort. I drew a small theoretical illustration/proof of concept as a bit of idea of what we need to accomplish

#

@pure sierra Glitch places a limit on the requests but the interactive map only has 2 requests per site visit, which means about ~2000 per hour is the limit, which I have not hit yet (I think). The issue I have though is not for the Foxhole Interactive Map but the Foxhole War Map bot. It is currently running on Glitch which limits the number of total users significantly. I had to take it off of Salt Industries in order to preserve any semblance of RAM i have left, but if I put it on FOD the ram issues will probably return.

#

Also as a condition Sir has required me to find a proper server host if I intend to host the war map on FOD..

pure sierra
#

@young pilot did you see my discussion in your discord about the google maps style suggestions ? (i found you a library to do it in leaflet, and a app to do the road mapping)
why does it use sooo much ram ?? maybe some memory leak ?
i will be interested in asking @sharp breach about it too if they make an exception of their no-bot policy for you...

long raft
#

glitch doesnt have some premium version where you can ... keep everything the same but unlock limits?

#

like what is the closest host compared to glitch.me?

sharp breach
#

You'd be okay with heroku, free tier AWS/Google, or something like that.

#

Vultr, etc

long raft
#

Anything in terms of ease-of-use like glitch regarding web interface for host management?

#

I've got a tiny server I'm not using but I don't know anything about the control panel software, I just configure everything by hand

sharp breach
#

I love heroku for ease of deployment. I autodeploy from a git branch. It's my go-to for shit I don't necessarily care about but want decent uptime (with their cheapest plan)

#

It has a tiny setup learning curve but there's enough guides out there to get through it

#

@halcyon peak is on Heroku as are like 5 other projects

long raft
#

did you make your own git hooks or is it part of the featureset?

sharp breach
#

Built in

long raft
#

I kind of suspect thats what theyre looking for

sharp breach
long raft
#

oof cloud pricing

#

i figure outside of the free tiers, its cheaper to just lease entire dedicated servers rather than pay for cloud time, now

#

for high end stuff, specifically

royal glade
#

How does google maps know which parts are traversable or routable through?

#

Ie to implement what Seth posted further up, how do we take map image data and lat/lng and assign certain parts as something you can route through and others as non-routable?

long raft
#

would you want automatic routes anyway?

royal glade
#

I'm just curious how it knows what parts of the terrain are roads and what parts are not before it decides on how to route from A to B

pure sierra
pure sierra
#

@long raft re cloud pricing, vps $7/mo do what you want , no limits

long raft
#

yes. it was definitely a good price what you listed hayden

pure sierra
#

I've been with then for a few years now

#

A couple of other clients of mine on the higher plans

#

Affiliate program too

long raft
#

i didn't even realize that there is no indication of how long something has been controlled/owned in the API, that's just hayden being clever with data

silk verge
#

I have a buddie that is trying to make a multiplayer game and he has not read a single thing about how game networking works

#

it's somewhat infuriating because there has to be some guide or book that he could read but he just doesn't

royal glade
silk verge
#

Oh cool

#

Ya, it isn't that he refused, it's that he won't do his research before asking us

lean finch
#

Yea

silk verge
#

I- what?

#

TIL that discord actually understands escape characters...
of example \* will make \*test* display as *test*

royal glade
#

Guys, for making an animated map, what flags in the api are most useful? I'd assume just faction ownership?

#

Anyone have ideas on what else could be fun to represent/see?

long raft
#

duration of ownership

#

thats the animated time domain part

#

if you dont include it the animations seem choppy and poppy

royal glade
#

Yes, that is something to keep in mind, thanks!

#

@pure sierra How are you finding time of capture? Just the time of the warapi call when something changes hands?

pure sierra
#

yes

royal glade
#

So +- 5 minutes?

pure sierra
#

it updates every few serods now

#

seconds

royal glade
#

Oh, so they accept 5 second queries? with the Etag thing implemented?

#

I thought suggested was every 5 minutes or something.

pure sierra
#

i do it every 1 min but yeah

royal glade
#

Roger. Just playing around with creating a common dataset we could all use. I've gotten the api outputting and saving to googlesheets atm.

#

Was thinking of setting it to every 5minutes or something. This is good to know. Thanks man.

long raft
#

i believe the update frequency from the api is 5 minutes? so your precision is whatever your sample rate is +-5m

pure sierra
#

no they changed it

long raft
#

1m now?

pure sierra
#

it varies depending on need, but as little as 3 sec

long raft
#

wow.

#

at some point theyre going to institute API keys wardenlol

royal glade
#

Thats 20160 minutes in 2 weeks * number of maps * avg number of dynamic items per map.

#

For a 2 week period

#

at a 1minute update rate.

#

damn

#

I might have to worry about google sheets capacities or at least what google sets as the maximum rate for querying such a sheet.

#

23,184,000 entries every two weeks.

#

Alright, apparently maximum is 5 million cells used per google sheet. Max 256 columns. Unlimited Rows

long raft
#

you wont run into any limitations like that with sqlite...

#

sure sounds like a sizeable database though

royal glade
#

I just read something saying 5million cell thing was removed. I initially though this would be easier to do since I'm not too familiar with Sql, and this gets around having to host the database somewhere.

#

I'm going to look around to see if I can get a definitive answer. But for now, sticking to a 5minute resolution is probably good enough though

#

That'd bring it down to about 4.7 million entries every two weeks.

#

You know, at one time I wished the devs would give us data sets for all these things for entire wars. Now I realize that it was a pipe dream.

#

Or at least very hard to put into practice.

long raft
#

yep, totally know that feeling of not wanting to host/maintain the database

#

dont love relying on google though either

royal glade
#

If this works, could always download the stuff locally and archive for posterity. Cell entries would be plain text anyway. I've no clue what file size would be if I exported as an excel file or saved as csv though.

I ran across a post from a guy who made an excel sheet with 50 million entries. File size was 1 gb.

#

or there abouts.

#

Anyhow. I'll trial and collect a small set over the next ~24 hours over four maps, and report back.

royal glade
#

124 time points at 5 minute intervals* 4 maps * 50 items average. = 24800 entries.

#

Downloading above as an excel file provides a file about 63 KB in size.

Similarly for 23 maps, we should average about 124 * 23 * 50 = 141450 ; Assuming file size scales linearly, Approximately 350 KB every 620 minutes.
Lets call that every 10 hours.

336 hours in 2 weeks. File size after two weeks should be 33.6*350 KB = 11.55 MB

pale mural
#

neat

royal glade
#

@long raft ^ If my assumption and calculation is right, File sizes shouldn't be a limiting factor for data in the above format.

#

Do you know what file sizes are typically like for SQL tables?

royal glade
#

We probably don't need that much information though, seeing locations and icon types don't change that often.

#

But it's good to know it is doable.

long raft
#

uhh i would guess similar size in SQL, but it could be optimized more, e.g. double only takes 4 bytes rather than the string encoding might take 8-10

quasi swift
#

@royal glade google sheets is an awful analytics engine btw

long raft
#

but it can be exported to CSV, and that can easily be imported into sqlite or w/e

quasi swift
#

I recommend something like matplotlib

languid harness
#

hgrnnnnnnnnrrrr matplotlib

long raft
#

i want to turn my heat maps into a live wallpaper ... wallpaper engine i guess? sigh

royal glade
#

@quasi swift Thanks, not planning to do any sort of analytics there. Primary use is to query and save war api info and serve it when ever asked.

#

Basically a quickly thrown together database, that I don't have to worry about hosting or maintaining too much.

#

I've access to a machine with matlab, would likely do analytics there. I've not gotten around to using Python and matplotlib extensively yet, I've heard good things about them though !

#

Closest I got was using a couple of numpy arrays many months ago lol.

long raft
#

will probably need to do analysis to find out how long a point has been owned

royal glade
#

I'm at around 194 time points now. Going to let it run to 256 to see if that's actually a column limit on Google Sheets or not. Then will do analysis. Can already see stretches where it changed from Col->War->Col.

pure sierra
royal glade
#

He's actually good at promotion. Who knew? I kid.

#

GJ Krazy.

pure sierra
long raft
#

at least 3 of those american ones are me

#

when do you put adsense on it, hayden?

pure sierra
#

when ? run ads you mean ? the thought has crossed my mind but ive never really been tempted.. you think i should

royal glade
#

Unless you need/want the money, I'd prefer not to have ads. Gives a better experience IMO, I liked that about both of the map and stats sites atm.

long raft
#

lol i dunno

#

probably not i guess, but it seemed like a funny idea to me

pure sierra
#

agreed, it doesnt cost me $$, as id still be paying for the hosting regardless, biggest cost is time i put in

languid harness
#

Damn, need to have more Dutchies

long raft
#

my assumption would be the best ad sites are those that have lots of new visitors (not repeat visitors)

pure sierra
#

i actually had a funnier ideo like this to make fake ads that are satirical

long raft
#

haha

royal glade
#

From warden or colonial sides?

pure sierra
#

any

royal glade
#

Charge resource contributions to clans. Lol

long raft
#

lots of ads for carpel tunnel surgeons, stuff like that?

pure sierra
#

yes

#

militaria surplus

long raft
#

russian brides...

royal glade
#

Must pay 200 Rmats to the Hayden Foundation and the side it supports in the upcoming war.

pure sierra
#

aim bots

long raft
#

ah man thatd be funny

royal glade
#

๐Ÿ˜ง

long raft
pure sierra
#

scrap farmer needs a wife

#

kind alike GTA radio

royal glade
#

SalvageHearts
Love for a Lifetime

long raft
#

seriously the external foxhole community becoming bigger than the in game community

pure sierra
#

i had this other funny idea last night, to make a radio show/broadcast series where you go into the game and interview scrappers

#

in the field

#

get inside their mind

royal glade
#

They would probably tell the interviewer to stop disturbing them from netflix and looking at other stuff.

#

๐Ÿ˜

pure sierra
#

or stop distracting them from scrapping

royal glade
#

Lol

long raft
#

maybe presscorps would do it.

pure sierra
#

yes i thought it could be done with or by them

royal glade
#

Scrapper's Hour

#

I wonder why they don't make use of the farms and rural areas and actually make them produce stuff.

#

Make it a game to drive a tractor around and make it produce stuff.

long raft
#

soon

royal glade
#

Convert to Shirts

#

๐Ÿ˜ฎ

pure sierra
#

well similarly id thought if there was a civilian side to it

#

rpg like

#

and you could run shops etc

#

wouldnt help the player pop limits though

royal glade
#

That would be nice, but don't even need to make it too different, just think of it as using the farm land and having an activity there just as you do for salvage nodes

#

Put some of the burden of shirts onto the people on the front

pure sierra
#

make it that shirts have to come from a farm aka food/fabric, not a scrap field

royal glade
#

^

#

That's cool too

#

More objectives and interesting places.

#

Could get rid of infinite spawns at Star Bases and make partisans rove the surroundings if they want to keep their shirts supplied.

pure sierra
pale mural
#

cool

barren quarry
#

daaaaaamn

#

thats a big improvement, well done

long raft
#

looks nice

#

whats your methodology

pure sierra
#

@versed notch

long raft
#

ah nice

pure sierra
#

cheers, in an ideal world it would be drawn with html5 canvas and then support nice animations etc, but for now just png

long raft
#

sounds hard lol

#

im wondering how the API is going to look when they shut off maps

pure sierra
#

what do you mean ?

long raft
#

well im doing something similar, and im wondering when theres a whole bunch of missing towns (or they are marked neutral) how thats going to mess with my rendering

#

I'll need to shut off the output for the disabled hexes

pure sierra
#

oh i see waht you mean

long raft
#

i just realize that this morning, when im making a map or whatever, im treating this like its going to be all regions every time

#

i started to think about next war

pure sierra
#

i guess we'll see though it wouldnt be hard to simulate it, just empty one maps mapitems

long raft
#

but woud you display a locked northern region as blue? or gray it out?

pure sierra
#

what ever looks best

languid harness
#

@pure sierra this looks amazing, good job

pure sierra
#

@languid harness thanks, it worked out well

pure sierra
barren quarry
#

whats that

pure sierra
#

pulsations

pure sierra
#

@barren quarry

#

how are you still up, i thought you were dead hours ago

barren quarry
#

certain circumstances that i cannot control require me to remain awake

#

my sleeping schedule is now fucked up

#

thats a bit sad

swift ingot
#

I apologize if this has been answered before, but I couldn't find the answer. Have the devs commented on adding player data to the api? Primarily, I'm interested in wardens/collie membership, but other states would be interesting as well

fervent spear
#

players per faction was removed, and i don't know about other stats, but somebody else may know more

languid harness
#

@swift ingot Most faction related stats were removed because it resulted in meta gaming and such

#

Like, people would try to force tech bonusses or use it to find weak spots in the enemy lines

swift ingot
#

Ya, I can see how most info could be abused if it was too widely available. I'd mainly like a way to verify faction affiliation. If that's all we get I'd be happy

#

The api model I had in mind was Eve, a player generated key that the player could share, or not.

#

But I know that's probably not a priority for the devs, and I have no idea how difficult it would be to implement.

languid harness
#

Ya, I can see how most info could be abused if it was too widely available And it wouldnt if it was only available for certain people? lol

#

@swift ingot Well, not sure either on difficulty, but the devs would rather prefer to focus on other things atm I think. That being said, you may be able to ask KFC if they have data from previous wars or maybe just a few days ago if you want to do some research? only one way to find out

versed notch
#

@pure sierra awesome implementation! ๐Ÿ˜ƒ

swift ingot
#

Actually, he just responded at the same time as you! We'll see what's possible, and what's reasonable

languid harness
#

Aight, good luck

pure sierra
#

@swift ingot sounds cool, re data removed, it was specifically the per map player data that was removed with th eside effect of that removing global tally that i use to compile, it wasnt that the global was such a problem, it just neven was created or published by them. And hopefullf they can make this public again some day, but maybe they fear the salt of unbalanced teams being known about. that being said while the data was available suprisingly it wasnt that bad... (the imbalance)

languid harness
#

that was back in the day

#

I can confirm as a @/regular that the total factions alliances are pretty even, although throughout the day they fluctuate a little

pure sierra
#

or

long raft
#

what does the 8 mean?

pure sierra
#

8 is currenty upgraded civic victory towns

#

9 is total victory town held (but not secessarily upgraded)

#

25 is win total

long raft
#

i am confused about the 2 and 7 then now lol

pure sierra
#

they add up to 9

long raft
#

why isnt it 0 1 8

pure sierra
#

because victory towns can be held but not upgraded to win condition civic

#

or could do 8/9 (25)

long raft
#

could you do 8 <gray>/9</gray> (25)?

#

lol i still dont understand how that math works, i would expect to see 0 1 8 8 (9)/25

pure sierra
#

8/9/(25)

#

a TH doesnt have te be t3 te be upgraded to civic

#

@long raft

long raft
#

oh ok

#

would be easier to just consider them t4

#

ill just do that in my head i guess

pure sierra
#

internally i call them t4, but they dont have to go through t1/2/3 to get there though

long raft
#

ah jeez i just dont understand the mechanics of this game

#

anyway i like it better in parenthesis than with the slash

#

just my personal opinion

pure sierra
#

ok

languid harness
#

I'd just remove the sum, it confuses a bit

#

so 8/25 would suffice imo

#

like people can see forthemselves there are 9 THs available

pure sierra
#

thats what it was, but i found you had to add them up to work out how much are held and just neede upgrading, which i wanted to do for user

languid harness
#

if you'd really want that, I think 8(9)/25 works best

#

or just remove the 25 and state that somewhere else as both factions need 25 VPs

pure sierra
pure sierra
pure sierra
long raft
#

it looks great but it makes me sad

royal glade
#

Looks neat, is there some warden town on the top left corner that big triangle at the top looks funny to me

pure sierra
#

yes i see that, i will bring it up with the guy that helpd me with it

royal glade
#

Its because of the water

#

You dont have points up there for the voronai or whatever youre using I guess

#

it becomes less nice to see as you increase edge distance from points available.

#

I think...

long raft
#

watchtower i think

pure sierra
#

no, i think its just a bug in our code

#

it because still hold some things in oarbreaker

versed notch
#

I think @royal glade is correct on this. To fill the gaps on the edges of the outer Hexgrids I need to do interpolation with very few to no actual values

#

@long raft any tips on how to deal with that?

#

I was thinking about filling the empty values at the outer edges by looking for the closest controlled location

long raft
#

yea i had that issue, hmm ... how to deal with it without custom code...hmm

#

i thought the most obvious thing would be put points on the outside of the map that are hidden, seed points to fill in who should control the back regions

#

but then i thought that would be a huge problem when they turn certain maps off, or if the front rotates horizontally

#

heres what I do for geospatial points in the real world, because it's a sphere...

#

if you take your points, and you mirror them along the map borders, it should give you seed values that aren't illogical, does that make sense?

#

also probably a good idea along the corners too, so you end up with 9x the number of seed points mirrored along the borders, and you get reasonable borders...

#

its very similar to finding the nearest point. i ended up using the nearest point for my map, but it has problems...

versed notch
#

hmm yeah mirror some seed points sounds not to bad

pure sierra
#

the problem was/is that it calcs the inffluence between 2 points across the indent gap in the edges of the hex

#

it really needs to not calc or draw inffluence across the map edge gaps

#

@versed notch

#

@long raft

long raft
#

i had mixed feelings about that ... but the back lines are hard to access and thus usually controlled by the closest

#

but the map ends up looking a bit odd with the white blank spots in the back (and on the white forts/town halls)

#

the algorithms just get too complicated if you have to account for the outer border shape in calculations

pure sierra
#

duct tap and cable ties ?

long raft
#

Uhh the other trick I did is just mask out the rivers and water bodies

#

From the final image I mean

pure sierra
#

but they will be areas of inflluence in coming updates

long raft
#

What??

pure sierra
#

freedom is coming

long raft
#

in the warapi?

pure sierra
#

in the game

#

oil rigs

long raft
#

oh you mean there will be new areas on the outer borders?

barren quarry
#

did you watch the most recent devstream?

#

they announced literal oil rigs

long raft
#

yea i saw that

#

but what will that change?

#

for the map control renderings

pale mural
#

oil rigs but any naval vehicles to help out with that?

barren quarry
#

Hm, if they are capturable then maybe they will

#

if not then nothing will change

#

i assume it has the same functionality as a mine and thus cant be captured

long raft
#

in my mind, the map control rendering is about where you can build, not about whats defended

#

because troops can go anywhere, so its kind of hard to map that, but if you cant build somewhere (and with AI) then you dont really control it

barren quarry
#

did you do that manually or did you use something?

long raft
#

its easy to just select the blue, delete it, then gaussian blur the mask to smooth out the borders

#

so that the alpha blend around the rivers isnt noticeable and abrupt...

barren quarry
#

i see

pure sierra
#

@barren quarry is it possible for mouse events to go through your text labels ? how you do that ?

barren quarry
#

what are you trying to achieve?

long raft
#

ugh had to do one of those before, some ugly css, its like absolute positioning with no width and height but overflow visible, etc, somethin like that?

barren quarry
#

just passing the mouse coordinates to a function or selecting another icon that is behind the text label?

pure sierra
#

say hover over icon for tooltip but there is overlapping text box

barren quarry
#

well i see two ways to combat this

#
  1. add more zoom levels so the distance between the text and the icon increases
#
  1. putting the text labels behind the icons
#

i know of no other way

#

good question actually

#

i'll go check the leaflet docs

long raft
#

i believe the overflow trick might work, with no width and height

pure sierra
#

but we need the width to set the anchor position

long raft
#

so like it doesnt register a hit box in the browser for the mouse events to even interact with

#

well nested ... div then, where the outer one ... im not just not sure

#

i had a label on top of a radio button, the radio button is invisible but i obviously needed it to get mouse events so it could be selected

pure sierra
#

i think there is a clickable option

#

interactive: false

long raft
#

hopefully it works, it might not be clickable but still intercept mouse events

pure sierra
#

blocking

#

found it

#

it does just ignore it its not blocking

long raft
#

what does the CSS look like when its on?

pure sierra
#

i think it uses pointer-events: none;

long raft
#

Oh cool

pure sierra
#

new feature is live

#

leaflet based map view now, mainly to get around icon clutter

#

@long raft @barren quarry

long raft
#

youre doing leftlet too huh?

#

no higher detailed tiles, hayden?

#

oh maybe im just zoomed in further than i think

pure sierra
#

im using the highest rez the git provides 1200x800~

long raft
#

yea, i think what happens is i zoomed in very far because there wasnt a limit on max zoom

#

and the browser scales images up poorly

pure sierra
#

there isnt no

#

i could set one

#

but might impact mobile

long raft
#

when we did the first devbranch map it was taken from more zoomed in levels, which were scaled in the game and looked better (but of course were wrong because devbranch)

pure sierra
#

kastow told me that

#

maybe we can request @zealous sonnet to release higher rez maps in the github

long raft
#

yea also ive noticed an error in one of the seams pretty bad

pure sierra
#

what ?

barren quarry
#

the mountains in the middle one?

#

yeah i remember that one

long raft
#

i think its the north border of drowned vale

#

and of course the colors are terrible

#

ice flows are like ... red, the ocean is practically gray

barren quarry
#

@pure sierra i would recommend going my way and coloring the circle around the town when it has a civic center

pure sierra
#

maybe , ive also considered offsetting the civic overlay, and adjusting its size if needed

barren quarry
pure sierra
#

big looks good

barren quarry
#

it was easier earlier

#

in the previous patches

#

but now we have to display:

  1. town hall level
  2. is town hall a home base
  3. is town hall a victory point
  4. does it have a civic center
pure sierra
#

also , is nuked ? is build state ?

barren quarry
#

oh jeez, that too

#

well i kind of borrowed your smart idea to display the build sites with a different opacity

pure sierra
#

i think i just took that from the ingame map

barren quarry
#

the ingame map doesnt have that i think

pure sierra
#

it used to

barren quarry
#

hm

#

anyway you get the point

pure sierra
#

yeah, it used to show build satte

#

then they added it to the api

barren quarry
#

its too hard to display all that stuff in one icon

pure sierra
#

then a bit later they took it out of the game map

#

but its still in api

pure sierra
barren quarry
#

noice

royal glade
#

But more seriously, I like the map now, looks like you fixed stone cradle. Also what are the blinking squares and circles you have?
@barren quarry What about offsetting the Flag and just adding it to the top of whatever tier the icon is at.

#

Would that look better?

#

The icons can take arbitrary offsets if I remember right. Could also just make a new icon with both combined. Just 3 versions per faction. Would be pretty neat.

pure sierra
#

i did just do an offset

#

@royal glade

#

i thought of making the combined icon too, as the problem with offset is it increases and decreases the percieved gap depending on zoom

#

but making all the different variants... maye it could be done dynamically

#

also i didnt fix stone cradle , its just the control points have changed with time
the blinking circles are indicators of the death rate

long raft
#

the problem with those corners is the distance measurement, isnt it

#

its like a huge algorithm slow-down for a very rare edge case

#

if we just assume the missing regions on the map are water, then it makes perfect sense

barren quarry
#

i know a solution

#

so basically all you have to do is carefully set the icon size and the anchor position of the civic center icon so it appears in one of the corners of the town hall icon

pure sierra
#

thats what i did but it changes depending on zoom

#

you had my hopes up thinking yo had a fix for the inffluence map bug

barren quarry
#

hm

pure sierra
#

the icons need to be grouped so they have a combined shared anchor point (if posssible)

royal glade
#

For a quick fix, overlay a mask over your completed image (like the one derp has).

#

It'll look neat

#

Water areas should be the raw map pixel values. And all land areas take the influence values depending on your voronai polygons

#

Unless you really want it shown on water too. Then the dirty way is to just add dummy json entries into stone cradle over water and set it equal to the faction controlling the place on shore.

#

@pure sierra

#

Regarding the mask, leaflet had some stuff you can do with layers I think. Been a while though

long raft
#

If you mask out the water it appears gray btw, optical illusion. It might need a color shift on the base map

pure sierra
#

Problem with making it more detailed, aka showing waterways is file size

#

@long raft

#

Unless you can do some kind of client side mask

long raft
#

yea i think you can treat it as another base layer

#

well i mean, it needs to be done on the output of the rendering

#

you are not using an overlay now for the controlled territories?

royal glade
#

IsDetectionAreaHidden (0x08)

#

^ Anyone know what that stands for?

#

@pure sierra / @long raft

#

Masks anyone?

#

๐Ÿ˜„

long raft
#

interesting, something like that woudl be amazing with the satellite view

#

i hope thats still going to be a thing lol

#

sorry im not a leaflet expert, tau, i assume thats what IsDetectionAreaHidden is in reference to?

royal glade
#

It's not leaflet @long raft Just one of the flags returned by the API the foxhole devs provide.

#

I'm just wondering what it means. Or is supposed to indicate.

pure sierra
#

Ah, i had no idea that had added the docs for that recently ,after it started mysteriously showing up in api results since last update.... i asked @zealous sonnet and after some time he finally confirmed that it meant if a tower or safe house had the radio watch tower upgrade and so if it should have the circle drawn on the map to show this @royal glade @long raft

long raft
#

oh wow thats useful, thats really useful

royal glade
#

Okay, that sounds great. But I think we should agree not to publish this

pure sierra
#

you think ? i did not...

long raft
#

to me it is

royal glade
#

Definitely, for partisan stuff

pure sierra
#

ah i see

#

sneaky

royal glade
#

Right now I can see which sides possibly has no radio coverage there

pure sierra
#

strange that they made it public

long raft
#

it definitely indicates which towers are not upgraded

#

you arent going to spend 1 part on spawns and not spend 1 more on radio

#

its probably 50/50 actually wardenlol

pure sierra
#

is it just 1 part !

royal glade
#

I think they're exposing some flags that they're using to give the client info

long raft
#

yea its just 2 parts to fully upgrade a fort

pure sierra
#

jeez

long raft
#

oh its the safe house, i think thats 5

pure sierra
#

so i asked and apparently the api is not used by teh game at all

royal glade
#

Lets just say you'd be surprised how many are currently without the upgrade

#

If what hayden says is true

long raft
#

yea i assumed the API was all for us

#

i mean they release all the media under MIT license and stuff, i think theyre burning calories to encourage outside dev community

pure sierra
#

i dont see it that way

#

not complaining though

#

it is a little tricky though to find things to add to it that either A dont leak intel, or B incourage personal progress ..

#

I think it was Phil that was like to me, "imagine steam api authenticated api , so full map intel data could be released, like in game, depending on what team you playing" and i was like that would be terribly hard to police....and likely not be fair

royal glade
#

Alright I'm going to dm you guys a screenshot. I'm assuming you guys are trustable even though you're blueberries. ๐Ÿ˜›

pure sierra
#

no nudes

royal glade
#

Lol

long raft
#

im more reliable than father lemons' services

#

coders are the 3rd faction

pure sierra
#

this is the only sane channel here

#

i cant go into fod general any more

#

it effects me

#

like chernobyl

#

yeah so that map

#

ive even seen town halls with it (the flag) for some crazy reason...

#

maybe we should check with teh devs if they had thought of the implications of making it public and if that is really their intention, as if so i will add it to my maps

royal glade
#

Yea, I think we should hold off on it till we get an explicit "go ahead" from em

long raft
#

its public already

royal glade
#

Whats public

long raft
#

but its odd because its something you cant see it in game, right? the knowledge is only from the API?

pure sierra
#

well only by accident really

royal glade
#

Only from API, and the majority won't come across it if we don't share

pure sierra
#

it was an accident for it to end up in the api, and it might have also been added to the readme later by accident too

#

originally b4 i new what it was, phil was like, "just ignore it"

royal glade
#

lol

long raft
#

lol

royal glade
#

If either of you can check in game and verify it is true, that'd be good

#

If you're free ofcourse.

long raft
#

secretly rustard has been tapped into it for months! ๐Ÿ˜‰

royal glade
#

??

long raft
#

he hits the warden back lines, used to at least

#

oh man i ... really dont want to sign in lol

#

theres the one in great march i see you can test

pure sierra
#

i could sign in

royal glade
#

Tell us if it really lacks the radio upgrade , then we know for sure ๐Ÿ˜ฎ

long raft
#

tau, you dont even have to walk to it, just join the great march region and check it via the map

pure sierra
#

sure

royal glade
#

I'm on my laptop. It takes... a while to load lol.

long raft
#

ok i guess hayden is going to

pure sierra
#

im in

#

the game is getting slower to load though for sure

long raft
#

for me it just stutters around borders, same loading time tho

royal glade
#

For me it's most noticeable when I boot up the game

#

takes a while. Especially on the old laptop

pure sierra
#

thats when i meant

#

ok confirmed

#

no upgrade on thos red

long raft
#

i dont want to give them work, where we get no benefit from it

#

but im not sure if i can ignore this forever

pure sierra
#

blame @native kernel

long raft
#

err on second thought i might find a different domain name

royal glade
#

welp

#

thats that then

long raft
#

we should find somebody who knows about deep learning and pump all the past war data in and make a war predictor

royal glade
#

New conditions, maybe after 15 more wars with no big changes. Not enough data lol

#

But would be a cool exercise

#

I wish they'd let you track your players displacement over time ๐Ÿ˜ฆ

#

Could gather that from many people and then plot it over the war map

#

Would be a fantastic exercise

long raft
#

i dunno theres ... quite a bit of data, I think

long raft
#

i just sped up my map overlay renderer 3x by replacing Pow() with this freakin black magic

public static double PowerSubstitute(double a, double b)
        {
            long tmp = BitConverter.DoubleToInt64Bits(a);
            long tmp2 = (long)(b * (tmp - 4606921280493453312L)) + 4606921280493453312L;
            return BitConverter.Int64BitsToDouble(((long)tmp2));
        }
barren quarry
#

we should find somebody who knows about deep learning and pump all the past war data in and make a war predictor i actually thought about that a couple of days ago

#

but there are just so many side factors

#

there's new patches, clan switches

snow escarp
#

Just get an octopus to do the job

pure sierra
pure sierra
barren quarry
#

i prefer the former

pure sierra
#

@long raft @royal glade @barren quarry so phil says the 0x08 is a mistake and not to display it and it will be removed

long raft
#

๐Ÿ˜ฆ kind of figured

barren quarry
#

remind me whats 0x08?

long raft
#

i feel bad now they have to do work to remove stuff

pure sierra
#

secret flag

barren quarry
#

oooh that one

pure sierra
#

you dont remember the time they added the landing ship to the game AND the api ... ?

long raft
#

wasnt paying attention to it back then

#

what happened?

pure sierra
#

well it would show on map where they where deployed like a fob, which should be secret

long raft
#

oh ok

#

because it was probably being treated like a town hall or w/e

#

API intel leak so good

pure sierra
#

but it more similar to a fob which is hidden

#

official intel leak ๐Ÿ˜ƒ

barren quarry
long raft
#

honestly, knowing how long something has been captured is incredibly valuable

pure sierra
#

well yes you would wonder about that

long raft
#

i kind of wish it were included in the API so i didnt have to maintain my own database or w/e

barren quarry
#

the /dynamic/public part of the json link implies that there is a secret link

#

hm.

pure sierra
#

ive thought that too

#

likely they have their own internal display for the api to keep track of war without runinng game

royal glade
#

I want to do a /private call jist to see haha

#

Tbh, from my little experiment, the amount of information isnt that big. For 2-3 weeks wed end up with 30mb tops

#

I think Devs should release war information in bulk at the end of each war

#

with the secret flags

pure sierra
#

agreed

barren quarry
#

i dont think devs record that information

#

as it would take massive amounts of space

pure sierra
#

not really if interval not too short

pure sierra
restive prairie
#

cool man

#

i was part of the launch team in sickle hill

royal glade
#

@barren quarry

I recorded dynamic data for 10 hours at 5 minute intervals for 4 maps. File size was 63KB. Assuming everything is linear, for 23 maps recording for 2 weeks at 5min intervals is ~11 MB

#

I wrote out the math for that in older posts in this channel

fathom anvil
#

If that's from the war that just happened, I remember fighting at I think the place was named Vulkin? Vulkin something.

#

The right side's middle hex.

pure sierra
#

๐Ÿ˜ƒ

pure sierra
#

switched to nearest interpolation to get around problems with stonecradle

midnight pendant
barren quarry
#

sorry what are you talking about?

midnight pendant
#

err, i had more in the beginning but deleted it lol

#

traced it to TweenMax (js script) render function

barren quarry
#

it really does take a while to load

midnight pendant
#

this is after loading

#

the site fully loads then this shit starts

barren quarry
#

this takes like what, 11 seconds?

midnight pendant
#

yeah just around

barren quarry
#

thats not a lot of time, thats an enormous amount of time for this content

midnight pendant
#

yes, it is. especially using react LOL

#

but that's just the load time. this script is using 100% gpu after load. like wtf

summer bobcat
#

I don't like WIX

lusty axle
#

hey sorry to bother you lot but is anyone able to give me a hand setting up the WarAPI? wanting to have the map updates feed into my server for logistics

long raft
#

holy crap that math.pow estimate yielded absurd looking results for an east to west layout - never expected that, it looked like zebra stripes

#

Paddy what language? Someone may have already done it and can just share the code

lusty axle
#

I'm not sure mate I'll be 100% coding is not my forte

barren quarry
#

@lusty axle basically we the bois have developed three kinds of bots

#

behold

#

choose any and contact the person

lusty axle
#

ok thanks a ton mate!

pure sierra
#

connected him up

languid harness
#

give him ALL the bots

chilly burrow
#

Not sure if to ask here: Anybody ever tried plug in the ps controller to play foxhole? what would be required to map the controller keys?

winter wind
#

since you can't pan the camera & aim at the same time, you'd have a dead stick half of the time

chilly burrow
#

nah its for logi ofc

neat fossil
#

You can pan the camera and aim at the same time @winter wind. Rebind the "turn camera left" and right keys to something easier than comma and period

chilly burrow
#

well i made it work. Works amazingly for running logi. So relaxing ๐Ÿ˜„

#

and actually fun to drive around. Feels like playing another game

long raft
#

have played with steam controller

long raft
#

theres no way to play this game without a sort of track pad or gyro for aiming; i found the driving was slick for trucks but under or oversensitive for everything else - something about a pad doesn't allow for quick transitions between left and right, or sometimes it overcorrects
and then finally just the game inputs are buggy, like when it holds down right click, or you can't use a certain combination of clicks and buttons

chilly burrow
#

yeah its only for logi driving. Cant be used for fighting. Still better driving with a controller with the sticks intead of pressing w all the time ^^

long raft
#

totally agreed

versed notch
#

@long raft
holy crap that math.pow estimate yielded absurd looking results for an east to west layout - never expected that, it looked like zebra stripes
do you use flattened arrays for interpolation?

summer bobcat
#

Has anybody been keeping old api data around

#

I'm putting together a war history table for the wiki

summer bobcat
#

foxholestats's got it

long raft
#

Flattened arrays? What do you mean Ape?

pure sierra
#

flatbed arrays ?

pure sierra
#

so @coders we have a little research project with @barren quarry etc, to investigate the feasability of a google maps style directions system/feature for foxhole online maps, so you can put in 2 locations and get the distance and maybe even time for various routes.

#

so that handles the search interface and drawing side of things, but from my initial research it seems you still need a backened server that handles the actual 'roads database' and route calculation.

#

and i figure there would be stop where we would catalog the road networks in foxhole off the api maps into a compatible database format, likely with a softawer like this https://qgis.org/en/site/

long raft
#

ugh qgis...

#

wish i could afford arcgis

pure sierra
#

so you have some experience in this field @long raft ?

long raft
#

kind of

#

i know some GIS, if you had all the x-roads defined by a point, this is just a dijkstra's algorithm to find shortest path, I think it's O(n^2) algorithm

#

but i find myself wondering who would use this?

#

i think people just want to place big general arrows, rather than defined paths that force people on the roads

#

i dont think logistics gets lost particularly

#

im projecting my own experience perhaps, i do a lot of off-road logistics, so ...

#

but yea, its just a graph, where the nodes are the cross roads, the paths between are the edges, and the weights are the euclidean distances

pure sierra
#

often there are different ways you can go, and hard to tell which is shortest

#

as me and kastow are pretty busy, I thought we could try and do this feature as a collaborative

#

with any players who want to help

pure sierra
#

@long raft

long raft
#

so its just a matter or mapping the nodes and edges?

#

because the algorithm is going to be the same for everyone

#

heres another problem with the maps tho - a lot of roads are unmarked

pure sierra
#

we wont worry about that

#

for now

long raft
#

well i guess we will need to make a prototype, maybe with just 1 map ... Honestly I'd hate to do it with qgis because it's kind of clunky, if there were some way to do it directly in leaflet, ... i dunno

#

best method ive come up with for working in qgis is to set an XYZ tile layer using local php server (with -S flag) as the background layer

pure sierra
#

but qgis is just for make the roads into a json or whatever

long raft
#

seems doable to make it a vector layer, then export is as CSV and transform it so it's compatible with that leaflet plugin, i guess its going to be javascript, or maybe just direct export to geojson

pure sierra
#

so you dont think need to use that leaflet plugin i linked above ?

long raft
#

might as well - it has features that would be a pain to implement i think

#

like waypoints...

#

i think that plugin would be good

#

i only threw shade on it because i didnt understand the purpose, but i see now its to find shortest paths for logi efficiency, i really just didnt even think that was an issue

#

which routing engine do you think it would use?

#

its like all the supported routing engines are made for real world maps

pure sierra
#

this is the main bit to work out

long raft
#

i think theres 2 parts, the routing engine (this one should be simple for 2d map), and the geocoder it uses to reverse lookup an address for a location

versed notch
#

@long raft if you have an 2D array shape (3x3) you can transform (flatten) it into a 1D array (1x9). its done sometimes to speed calculations up, i.e. in interpolating data.
the zebra shaped data from your interpolation just reminded me of some errors I encountered, and if I remember correctly it was due to flattening the data

#

but I could be wrong ๐Ÿ˜„

long raft
#

oh yea i could use a table to precalculate. but that particular mechanism was making use of the IEEE definition of floating point numbers to do it, was pretty amazing until it didnt work; and I'm not sure why the horizontal layout looked so bad in comparison

#

i must have an x or y swapped somewhere lol

#

i think youre right tho, ill spend the ram for the speed, i really need it in this case

kind glacier
#

Is this just code, or does design and art and such count too?

long raft
#

๐Ÿคท it says code and development (development design included), but we don't seem to need much enforcement here

barren quarry
royal glade
#

^

daring berry
#

C r y p t o g r a p h y

long raft
#

most of the docs about this routing plugin are about the geocoder; which is kind of small fries, because everything is based on pre-existing routers that use known road databases
i think to use this plugin one would need to implement a custom IRouter object; and inside it would be code that loads some existing database of paths and does the routing calculation
like i said before, it just djikstra's shortest path, very easy algorithm but I don't know off the top of my head how to work waypoints into that - I assume you just find the path it's closest to ...
maybe OSM is a good template of what's needed for pathing, I know it has nodes and paths, so a list of nodes (double x, double y) and then a list of paths (int node1, int node2, double weight)
i know how to lay the nodes in qgis but i have no idea how to do paths @pure sierra

pure sierra
#

Thanks for the input @long raft like i said , im hoping we can have a few people do a bit to make soemthintg colaboratively.

#

lol, this last one which looks the easiest so far is acutally made by the same guy that made the leaflet router we found already !

#

and the 2 libs actually work together !

long raft
#

that is ideal. i think the missing piece is how to actually draw the paths - it's easy to do by hand in a JSON object, but it will become unmanageable very fast

pure sierra
#

@long raft

languid harness
#

oh god

long raft
#

mhm, i was imagining an array of points, and then an array of edges (integer indices that references the points array)

#

because what i think we really need is a graph (edges and nodes) instead of polylines

#

is this how he does it in the geojson-path-finder?

#

I haven't read through that yet

pure sierra
#

just looking at how he does it

#

a bit different

#

i was just mucking around to see the output and it is close

#

"Given a network of GeoJSON LineStrings, GeoJSON Path Finder will find the shortest path"

long raft
#

it looks like he is doing it like open street maps

pure sierra
#

"The GeoJSON object should be a FeatureCollection of LineString features. The network will be built into a topology, so that lines that start and end, or cross, at the same coordinate are joined such that you can find a path from one feature to the other."

long raft
#

but if youre close it can be transformed like his, i think OSM has nodes and ways

pure sierra
#

i guess you will need destinations for the router to search for

long raft
#

yea that will be the geocoding part, I think

#

the places get defined with a center, a bounds, a name, and then a geohash is calculated from the bounds/center and used to match up stuff nearby

#

@pure sierra how did you end up drawing the paths you have in that example?

pure sierra
#

qgis

long raft
#

oh cool

pure sierra
#

ive opened his json in qgis too

#

so yeah, there are poygons for the locations and lines for roads

long raft
#

polygons for locations hm. are they square? i thought geohashed stuff had to be

pure sierra
#

no

long raft
#

lol this is totally OSM data

pure sierra
long raft
#

ok well damn that doesnt look too ridiculous at all, hayden!

pure sierra
long raft
#

oh its all points, i guess it's in a polygon just so it can be loaded into qgis and others

pure sierra
#

just realised how old my qgis is... v1 and they up to v3

#

just updating to support geojson of mixed types

long raft
#

yea v3 not a lot better than v2 haha

pure sierra
long raft
#

does the router run on the server side or client side?

pure sierra
#

i think client side

barren quarry
#

client side

pure sierra
#

moving the marker around doesnt seem to do any XHR

#

i noticed in the demo there is no search by town/location name,

pure sierra
#

i got it to calc a path through deadlands from roads i mapped with qgis

#

@long raft

long raft
#

wow you work fast

pure sierra
#

bit new for me having to use node in front end with browserify

#

im use to just adding a .js file

long raft
#

any sense of how fast the routing system is?

pure sierra
#

instant

long raft
#

does the client have to download the entire path set in the json?

pure sierra
#

i think so

long raft
#

shouldnt be too bad with gzip

pure sierra
#

as in their demo its a 15mb json

#

and you can see it in the dev toolbar

#

but i dont think it will be anywhere near that

pure sierra
long raft
#

do you think there is a way you could filter the nodes based on the points that fall in controlled territory?

#

so you dont end up with short routes that go right through enemy territory

#

i thought about waypoints, but i think it makes more sense to just take out any points that arent controlled

#

like, safe route me

pure sierra
#

maybe, otherwise just add waypoints to avoid

#

i guess you could iterate over the json and remove points

long raft
#

is your control data in vector format before you save it to png? its points.where( warden_shape.contains(this) )

#

if it is in WKT format, mysql can index that easily and do that query fast

pure sierra
#

it can be output as vector

long raft
#

that is convenient!

royal glade
#

Cool stuff Hayden

#

Time to bug the devs to give us roads as vector points in the api

#

๐Ÿ˜‚

pure sierra
#

nah, it wont take long to make them by hand

royal glade
#

Doesnt matter short term, but if they alter roads now and then, it might be worth it

pure sierra
#

i doubt they will ever go to te trouble

long raft
#

when i use qgis i want to just ... try to dig up my trackball

pure sierra
#

i did all of deadlasds roads

#

only 22kb json

long raft
#

yea thats pretty small

pure sierra
silk verge
#

why have intelligent pathfinding when you can just brute force a path with a recursive function?

pure sierra
#

if you want to help plz do

silk verge
#

I have no idea how pathfinding works and I'm kinda convinced that 50% of all AI devs dont either

#

otherwise, I would help out

#

it seems like an excellent challenge to work with instead of sleeping

long raft
#

how to help? is there a git for the project? can it even merge changes like this?

#

pathfinding algorithm is simple:
keep removing the longest path as long as it doesn't disconnect all paths from A to B

pure sierra
#

well it depends what you want to do ?

long raft
#

yea the weights change, but the algorithm is the same

#

uh i could do qgis i guess

silk verge
#

sometimes the entire method does too

long raft
#

dunno if it would help if i drew paths for a map or something? dunno if thats taking a lot of time or not

#

have you already figured out how to name locations, hayden? the geocoding stuff?

pure sierra
#

havent got that for

long raft
#

im a bit clumsy in java-script

silk verge
#

I could probably write something in python that could pathfind based on nodes

#

I dont really do JS

long raft
#

i think he already has the routing figured out

#

but theres a naming part - where someone will probably have to draw regions and name them in qgis...

silk verge
#

oh

#

heck

long raft
#

and hes also drawing all the roads, which is hard work in my opinion, but i dont know if it can be shared or not

pure sierra
#

the roads is like very quick

silk verge
#

just a bunch of nodes strung togeather to form a road?

pure sierra
silk verge
#

uhhhhhh

long raft
#

what did you use as the background to align it to, @pure sierra?

pure sierra
#

what do you mean ?

long raft
#

youre drawing on top of something?

#

background image? xyz tile server?

pure sierra
#

the map

#

just open the map in qgis

long raft
#

which map lol - is there an official one?

pure sierra
#

they are in the github repo

long raft
#

oooooh

#

youre doing it 1 map at a time

pure sierra
#

for now

long raft
#

yea ive used qgis to put too all the town hall locations back on the devbranch map