#code-talk
2 messages ยท Page 5 of 1
@pure sierra thanks, i will contact you tomorrow or later today
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.
this is my current plan
At BudgetVM we understand that Service quality, network reliability, & 24/7 support makes BudgetVM the best value. We specialize in keeping IT budgets in check while not cutting corners. Our customers trust BudgetVM to always provide quality service at reliably low prices.
goodnight
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
btw big thanks to @barren quarry! I implemented your region_conversion script from javascript to my python code!
ty ๐
in what language? ๐
c#
I can share my python script if you wanna take a look in my messed up code xD
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
what does the "heat" represent in your map?
its a geostatistical estimation method called kriging
so heat for wardens, heat for colonials, but its gradient because its an estimation
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
yes without that information its only a rough interpolated guess
but it looks cool ๐
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?
by historical you mean before world-map update?
yea, the data from hayden?
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
oh right...
yea they cant be merged probably
how long does it take you to generate that map?
it looks good...
its sort of weird and unfortunate (now looking back) that the old maps didnt connect cohesively
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
oh thats not too bad
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
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 ๐
the only other timelapses i saw were literal map screen recordings over hours
@long raft https://www.youtube.com/watch?v=gJhHJVk2U30
Soundtrack: League of Legends Team Builder which can be found here: https://www.youtube.com/watch?v=Al2ydpoB80o You can support me through Patreon: https://w...
this was done in .NET
and here's part 1 https://www.youtube.com/watch?v=6fsS7ogJBaI
Soundtrack: League of Legends Team Builder
jeez i should be using how long the town hall has been controlled as a covariance ...
i don't do these anymore because they killed war correspondent, my main source of data
then it could be animated...
they killed it? huh?
oh oh the devs killed it! i remember
maybe one day im gonna grab the logs from hayden and do something similar
Here's how i animated it
i believe i could make smooth animations, but i cant render as fast as you guys
its basically like a raytracer
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
lol
you play LoL, kastow?
wow long time
do you?
Dota! ๐
yea i play LoL when wardens are losing hard and colonials are upgrading town halls lol
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
well I know your feelings ๐
I have a very similar history with Dota/Dota2
without breaking my hardware ๐
@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
that was a year ago
im very grateful youve done all this hex math for me
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
match the background to the map? eh?
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
the faded out parts? and the ocean?
oh ... where did that map even come from?
this is an official map lol
for map overlay
im awake, lots of interesting posts ! this channel is a bastion of sanity compared with #foxhole-discussion
code man bad
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 ๐ฆ
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
i dont know how much his website is being used honestly
just trying to figure out the best way to fill in the blind spots on the map
@barren quarry but hes not paying ?
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
@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
you could add white fobs, but you cant really determine much from them....
we put that through the GPU neutral network and we get an unbeatable battle plan
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 ?
oh i assumed it would be in the api data, but yea i guess you dont really know that now
@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
it would definitely fit into the free tier of amazon
im not sure what the limits of aws free are
this is what it looks like right now
and there are 42 people currently using the website
ok so nothing really
wow thats not much
big surges could bring the website down
so basically right now there arent many issues
how many request it on now ?
but if there's more attention than i can handle then i'll ask for your help
amazon will give you 1cpu, 1g ram, 30gb storage free for a year...
I don't get to see that number unfortunately
and you can never predict that
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
yea thats a low number
right but i don't really know what counts as a request
a click
as it uses up 50% of your capacity 
is this going to slam my server?
woo response time 54ms stays the same
you can set the workers
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
ram ranch
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
was it on a url that had the map full thing and not just a login screen ?
it probably allows for some burst by averaging a larger window than 1 hour
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 ?
ive done a little amazon, so i'll try to explain all the basic fees heres
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)
and backup
750 hours of what?
CPU time
cloud service is done by the hour or by the GB
all the cloud providers bill this way...
so if, say, there is a bot that uses little cpu but all the time, the by the hour deal is shit?
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
but there are ~750hrs in a month
like what's your ideal scenario, kastow?
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
im gathering you guys prefer like a hosting package, rather than a raw server that you have to configure?
not quite sure what you mean by hosting package, i dont have a lot of knowledge in that
not necessrily, i have thought about cloud as an option for my hosting just not there yet to weigh up the differnce
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...
1gb ram is not much to run debian on though
he only uses like 100mb
then it would be hosting package yes
that is not including os
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
and this is how much the copy of the website uses in idle (no active users)
do they limit what you can run on free tier or something?
AWS has a crapton of linux distros
"you are also empowered to use our bundling tools to upload your own operating systems. "
hundreds, there are hundreds of thousands of images
figured
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?
yeah its node js
with webpack
back is node js and front is react
and they communicate via socket
so i guess if many thing go through ,socket that would be like on request/conneciton
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
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...
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..
@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...
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?
You'd be okay with heroku, free tier AWS/Google, or something like that.
Vultr, etc
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
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
did you make your own git hooks or is it part of the featureset?
Built in
I kind of suspect thats what theyre looking for
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
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?
would you want automatic routes anyway?
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
we map the roads , georeferece @royal glade using something like this https://qgis.org/en/site/
@long raft re cloud pricing, vps $7/mo do what you want , no limits
yes. it was definitely a good price what you listed hayden
I've been with then for a few years now
A couple of other clients of mine on the higher plans
Affiliate program too
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
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
First results on google:
https://github.com/MFatihMAR/Awesome-Game-Networking
@silk verge . Unless you meant your friend refuses to read.
Oh cool
Ya, it isn't that he refused, it's that he won't do his research before asking us
Yea
I- what?
TIL that discord actually understands escape characters...
of example \* will make \*test* display as *test*
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?
duration of ownership
thats the animated time domain part
if you dont include it the animations seem choppy and poppy
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?
yes
So +- 5 minutes?
Oh, so they accept 5 second queries? with the Etag thing implemented?
I thought suggested was every 5 minutes or something.
i do it every 1 min but yeah
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.
i believe the update frequency from the api is 5 minutes? so your precision is whatever your sample rate is +-5m
no they changed it
1m now?
it varies depending on need, but as little as 3 sec
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
you wont run into any limitations like that with sqlite...
sure sounds like a sizeable database though
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.
yep, totally know that feeling of not wanting to host/maintain the database
dont love relying on google though either
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.
Proof of concept
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
neat
@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?
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.
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
@royal glade google sheets is an awful analytics engine btw
but it can be exported to CSV, and that can easily be imported into sqlite or w/e
I recommend something like matplotlib
hgrnnnnnnnnrrrr matplotlib
i want to turn my heat maps into a live wallpaper ... wallpaper engine i guess? sigh
@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.
will probably need to do analysis to find out how long a point has been owned
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.
user location for last month:
when ? run ads you mean ? the thought has crossed my mind but ive never really been tempted.. you think i should
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.
agreed, it doesnt cost me $$, as id still be paying for the hosting regardless, biggest cost is time i put in
Damn, need to have more Dutchies
my assumption would be the best ad sites are those that have lots of new visitors (not repeat visitors)
i actually had a funnier ideo like this to make fake ads that are satirical
haha
From warden or colonial sides?
any
Charge resource contributions to clans. Lol
lots of ads for carpel tunnel surgeons, stuff like that?
russian brides...
Must pay 200 Rmats to the Hayden Foundation and the side it supports in the upcoming war.
aim bots
ah man thatd be funny
๐ง
ads for foxhole dating site, scrapfarmersonly.com
SalvageHearts
Love for a Lifetime
seriously the external foxhole community becoming bigger than the in game community
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
They would probably tell the interviewer to stop disturbing them from netflix and looking at other stuff.
๐
or stop distracting them from scrapping
Lol
maybe presscorps would do it.
yes i thought it could be done with or by them
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.
soon
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
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
make it that shirts have to come from a farm aka food/fabric, not a scrap field
^
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.

@versed notch
ah nice
cheers, in an ideal world it would be drawn with html5 canvas and then support nice animations etc, but for now just png
what do you mean ?
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
oh i see waht you mean
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
i guess we'll see though it wouldnt be hard to simulate it, just empty one maps mapitems
but woud you display a locked northern region as blue? or gray it out?
what ever looks best
@pure sierra this looks amazing, good job
@languid harness thanks, it worked out well
whats that
pulsations
certain circumstances that i cannot control require me to remain awake
my sleeping schedule is now fucked up
thats a bit sad
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
players per faction was removed, and i don't know about other stats, but somebody else may know more
@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
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.
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
@pure sierra awesome implementation! ๐
Actually, he just responded at the same time as you! We'll see what's possible, and what's reasonable
Aight, good luck
@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)
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
what does the 8 mean?
8 is currenty upgraded civic victory towns
9 is total victory town held (but not secessarily upgraded)
25 is win total
i am confused about the 2 and 7 then now lol
they add up to 9
why isnt it 0 1 8
because victory towns can be held but not upgraded to win condition civic
or could do 8/9 (25)
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
internally i call them t4, but they dont have to go through t1/2/3 to get there though
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
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
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
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
stone cradle
it looks great but it makes me sad
Looks neat, is there some warden town on the top left corner that big triangle at the top looks funny to me
yes i see that, i will bring it up with the guy that helpd me with it
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...
watchtower i think
no, i think its just a bug in our code
it because still hold some things in oarbreaker
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
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...
hmm yeah mirror some seed points sounds not to bad
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
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
duct tap and cable ties ?
Uhh the other trick I did is just mask out the rivers and water bodies
From the final image I mean
but they will be areas of inflluence in coming updates
What??
freedom is coming
in the warapi?
oh you mean there will be new areas on the outer borders?
oil rigs but any naval vehicles to help out with that?
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
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
here's the water mask i use
did you do that manually or did you use something?
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...
i see
@barren quarry is it possible for mouse events to go through your text labels ? how you do that ?
what are you trying to achieve?
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?
just passing the mouse coordinates to a function or selecting another icon that is behind the text label?
say hover over icon for tooltip but there is overlapping text box
well i see two ways to combat this
- add more zoom levels so the distance between the text and the icon increases
- putting the text labels behind the icons
i know of no other way
good question actually
i'll go check the leaflet docs
i believe the overflow trick might work, with no width and height
but we need the width to set the anchor position
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
but i remember researching this for the stupid checkboxes on foxholedraft.com
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
i think there is a clickable option
interactive: false
hopefully it works, it might not be clickable but still intercept mouse events
what does the CSS look like when its on?
i think it uses pointer-events: none;
Oh cool
new feature is live
leaflet based map view now, mainly to get around icon clutter
@long raft @barren quarry
youre doing leftlet too huh?
no higher detailed tiles, hayden?
oh maybe im just zoomed in further than i think
im using the highest rez the git provides 1200x800~
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
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)
kastow told me that
maybe we can request @zealous sonnet to release higher rez maps in the github
yea also ive noticed an error in one of the seams pretty bad
what ?
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
@pure sierra i would recommend going my way and coloring the circle around the town when it has a civic center
maybe , ive also considered offsetting the civic overlay, and adjusting its size if needed
big looks good
it was easier earlier
in the previous patches
but now we have to display:
- town hall level
- is town hall a home base
- is town hall a victory point
- does it have a civic center
also , is nuked ? is build state ?
oh jeez, that too
well i kind of borrowed your smart idea to display the build sites with a different opacity
i think i just took that from the ingame map
the ingame map doesnt have that i think
it used to
its too hard to display all that stuff in one icon
crossed the 1 million casualty mark about 1 hour ago
noice
Aww @pure sierra thank you for your support.
Lol, havent done this in so long.
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.
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
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
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
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
hm
the icons need to be grouped so they have a combined shared anchor point (if posssible)
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
If you mask out the water it appears gray btw, optical illusion. It might need a color shift on the base map
Problem with making it more detailed, aka showing waterways is file size
@long raft
Unless you can do some kind of client side mask
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?
IsDetectionAreaHidden (0x08)
^ Anyone know what that stands for?
@pure sierra / @long raft
And you guys might like this : http://frogcat.github.io/leaflet-tilelayer-mask/
Masks anyone?
๐
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?
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.
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
oh wow thats useful, thats really useful
Okay, that sounds great. But I think we should agree not to publish this
you think ? i did not...
to me it is
Definitely, for partisan stuff
Right now I can see which sides possibly has no radio coverage there
strange that they made it public
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 
is it just 1 part !
I think they're exposing some flags that they're using to give the client info
yea its just 2 parts to fully upgrade a fort
jeez
oh its the safe house, i think thats 5
so i asked and apparently the api is not used by teh game at all
Lets just say you'd be surprised how many are currently without the upgrade
If what hayden says is true
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
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
Alright I'm going to dm you guys a screenshot. I'm assuming you guys are trustable even though you're blueberries. ๐
no nudes
Lol
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
Yea, I think we should hold off on it till we get an explicit "go ahead" from em
its public already
Whats public
but its odd because its something you cant see it in game, right? the knowledge is only from the API?
well only by accident really
Only from API, and the majority won't come across it if we don't share
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"
lol
lol
If either of you can check in game and verify it is true, that'd be good
If you're free ofcourse.
secretly rustard has been tapped into it for months! ๐
??
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
i could sign in
Tell us if it really lacks the radio upgrade , then we know for sure ๐ฎ
tau, you dont even have to walk to it, just join the great march region and check it via the map
sure
I'm on my laptop. It takes... a while to load lol.
ok i guess hayden is going to
for me it just stutters around borders, same loading time tho
For me it's most noticeable when I boot up the game
takes a while. Especially on the old laptop

i dont want to give them work, where we get no benefit from it
but im not sure if i can ignore this forever
going to see if derpsbackdoor.com is available
blame @native kernel
err on second thought i might find a different domain name
we should find somebody who knows about deep learning and pump all the past war data in and make a war predictor
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
i dunno theres ... quite a bit of data, I think
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));
}
https://martin.ankerl.com/2007/10/04/optimized-pow-approximation-for-java-and-c-c/ unbelieveable estimation tricks
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
Just get an octopus to do the job
i prefer the former
@long raft @royal glade @barren quarry so phil says the 0x08 is a mistake and not to display it and it will be removed
๐ฆ kind of figured
remind me whats 0x08?
i feel bad now they have to do work to remove stuff
secret flag
oooh that one
you dont remember the time they added the landing ship to the game AND the api ... ?
well it would show on map where they where deployed like a fob, which should be secret
oh ok
because it was probably being treated like a town hall or w/e
API intel leak so good
honestly, knowing how long something has been captured is incredibly valuable
well yes you would wonder about that
i kind of wish it were included in the API so i didnt have to maintain my own database or w/e
ive thought that too
likely they have their own internal display for the api to keep track of war without runinng game
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
agreed
i dont think devs record that information
as it would take massive amounts of space
not really if interval not too short
i made a little video
@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
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.
๐
switched to nearest interpolation to get around problems with stonecradle
http://www.foxholegame.com/post/devblog-69 when viewing the latest (and possibly all) posts, one of the js scripts uses all of my gpu and doesn't stop
sorry what are you talking about?
err, i had more in the beginning but deleted it lol
traced it to TweenMax (js script) render function
this takes like what, 11 seconds?
yeah just around
thats not a lot of time, thats an enormous amount of time for this content
yes, it is. especially using react LOL
but that's just the load time. this script is using 100% gpu after load. like wtf
I don't like WIX
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
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
I'm not sure mate I'll be 100% coding is not my forte
@lusty axle basically we the bois have developed three kinds of bots
behold
Foxhole War Map bot, made by @young pilot , posts map images
FoxholeStats bot, made by @pure sierra , posts events
Foxhole Global bot, made by me, posts events on the towns that you select
choose any and contact the person
ok thanks a ton mate!
connected him up
give him ALL the bots
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?
since you can't pan the camera & aim at the same time, you'd have a dead stick half of the time
nah its for logi ofc
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
well i made it work. Works amazingly for running logi. So relaxing ๐
and actually fun to drive around. Feels like playing another game
have played with steam controller
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
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 ^^
totally agreed
@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?
Has anybody been keeping old api data around
I'm putting together a war history table for the wiki
foxholestats's got it
Flattened arrays? What do you mean Ape?
flatbed arrays ?
so im like, about to post WTF happned to the player pop ! but then first step check #updates ... oh, already !!! oh well...
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 just off some initial googling, to work out how we would do this, http://www.liedman.net/leaflet-routing-machine/ i found this library for leaflet
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.
something like this: http://project-osrm.org/
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/
so you have some experience in this field @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
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
@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
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
but qgis is just for make the roads into a json or whatever
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
so you dont think need to use that leaflet plugin i linked above ?
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
this is the main bit to work out
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
@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 ๐
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
Is this just code, or does design and art and such count too?
๐คท it says code and development (development design included), but we don't seem to need much enforcement here
design and art go to #art-discussion
^
C r y p t o g r a p h y
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
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 !
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
oh god
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
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"
it looks like he is doing it like open street maps
"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."
but if youre close it can be transformed like his, i think OSM has nodes and ways
i guess you will need destinations for the router to search for
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?
qgis
oh cool
ive opened his json in qgis too
i also opened it here but it took ages
so yeah, there are poygons for the locations and lines for roads
polygons for locations hm. are they square? i thought geohashed stuff had to be
no
lol this is totally OSM data
road
ok well damn that doesnt look too ridiculous at all, hayden!
location
oh its all points, i guess it's in a polygon just so it can be loaded into qgis and others
just realised how old my qgis is... v1 and they up to v3
just updating to support geojson of mixed types
yea v3 not a lot better than v2 haha
does the router run on the server side or client side?
client side
moving the marker around doesnt seem to do any XHR
i noticed in the demo there is no search by town/location name,
reeeeeeeeeeeeeee
i got it to calc a path through deadlands from roads i mapped with qgis
@long raft
wow you work fast
bit new for me having to use node in front end with browserify
im use to just adding a .js file
any sense of how fast the routing system is?
instant
does the client have to download the entire path set in the json?
i think so
shouldnt be too bad with gzip
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
nearly
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
maybe, otherwise just add waypoints to avoid
i guess you could iterate over the json and remove points
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
it can be output as vector
that is convenient!
Cool stuff Hayden
Time to bug the devs to give us roads as vector points in the api
๐
nah, it wont take long to make them by hand
Doesnt matter short term, but if they alter roads now and then, it might be worth it
i doubt they will ever go to te trouble
when i use qgis i want to just ... try to dig up my trackball
yea thats pretty small
i have a little demo here https://foxholestats.com/router/
why have intelligent pathfinding when you can just brute force a path with a recursive function?
if you want to help plz do
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
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
well it depends what you want to do ?
sometimes the entire method does too
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?
havent got that for
im a bit clumsy in java-script
I could probably write something in python that could pathfind based on nodes
I dont really do JS
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...
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
the roads is like very quick
just a bunch of nodes strung togeather to form a road?
uhhhhhh
what did you use as the background to align it to, @pure sierra?
what do you mean ?
which map lol - is there an official one?
they are in the github repo
for now
yea ive used qgis to put too all the town hall locations back on the devbranch map
