#code-talk
2 messages ยท Page 16 of 1
seems like it should not
i think you must have an await happening outside of this
so the task is yielded back, then awaited, then it parses it
so its basically not async
pretty much
its all still happening in 1 thread
A coroutine is like a function that has the ability to pause execution and return control to Unity but then to continue where it left off on the following frame.
Now I gotta get that api string out of the coroutine
what does your loop outside of that look like? where the await happens?
i woudl think you could just check the return type, if (x is Task<JSONNode>) ...
var results = ((Task<JSONNode>)StartCoroutine(Getstatic(BaseURL, Mapname)).Where(x=> x is Task<JSONNode>).First()).Result;
So the StartCoroutine is actually a function returning the same list of tasks
one of those tasks that gets sent back is a Task<JSONNode>
so you find the first one that matches that, then you cast it as a Task<JSONNode> and you query it's result
Not sure your familiarity with LINQ in that way (the .Where().First() stuff)
you could do it with a for loop, too...
coroutine doesn't do Where
ah it should if you include System.Linq;
I have
yah ...
so do a for loop then on it
.GetIterator()
then loop through the iterator until you find a Task<JSONNode> and get it's value
I need to get StaticInfo out of the coroutine so that I may use it in Thramoun's example
once you have the JSONNode you can convert it into your StaticInfo class, right?
or did it have to be a string?
the StaticInfo is the JSONNode
JSONNode result = null;
var e = StartCoroutine(...);
while(e.MoveNext())
if(e.Current is Task<JSONNode>)
result = ((Task<JSONNode>)e.Current).Result;
I'll give that a try
can't do a foreach
ok I changed my example - will it work with an enumerator loop?
doesn't have a MoveNext or Current
Coroutine doesn't
but it's an ienumerator. they have to. thats the interface
maybe it doesnt return that
Yeah, I saw that and promptly kept searching
I think he's basically doing the same thing, filtering the results and saving one
I think I might just have to do all of it inside the IEnumerator
Considering I'll have to do each and every static hex and dynamic hex seperately that's going to be difficult
So Thramoun's example returns null
fixed it
Now I gotta get it to read mapTextItems
all 41 of them
But I'll leave that for tomorrow
lol if he ends up making a better game than foxhole itself..... 
s
seems like it doesn't want to get mapTextItems
hm, ArrayList works
"Hey, this is an ArrayList"
Yes I know, now return to me what is in the ArrayList thanks
๐ค
ehh
I can't seem to figure out how to single out any of the indexes
like "text" and the xy coordinates
Do you guys know where the origin is for these coordinates?
we have a winner
Now go send them shirts
lol
tfw it suddenly throws up 45 errors about wrong brackets and cutting and pasting back in fixes it
this took a while
as you can see I've played so little on Deadlands in recent memory I didn't realize I had it flipped around
@stone void You were right about dictionaries
it worked
Congrats
Congrats, I thought I was a detriment
Aight, so I gotta find a way to either rename all the icons or add a list where it can look up the name
probably better to just rename them
lol
map icon is called "Civic Center" but no civic centers in the list
guess I'll skip that one
still got a few that don't quite fit
I suppose the hammer is refinery instead of manufacturing plant
still missing safe house, scorched town, seaport, and townhall
townhall I assume isn't used anymore, and neither is seaport
Oh, it'll probably come back to bite me in the ass, sure
with those indexes i can just use the icon name the way they are
if you need a batch format changer, i use a plugin for gimp that works well
I can probably write a list for it to look through
right now though I'm trying to get images to work
grr
TGA
do you know that tga works ? that might be the problem
try as jpg first, its more compatible then step up to a format with transparency
you will have to do some offset work
ye
as the point of origin that the coords use might be different to your engine
Nah, looks like they're in the right places
Lots of trial and error to get them there
you said the labels are off
Like I said, I haven't played Deadlands in a long time
I just double checked the wiki
they're in the right places
...again
better?
all I did was move them down on top of the map image and make them smaller
but the point is that they should be readable from a distance
arent they fixed te the same level as the map
I'll probably figure out how to make them scale in size depending on distance from the camera
arent they fixed te the same level as the map
not really
if they at the same height as the map there should not be a parrallax? effect depending on angle
put them at same level as map
I can't seem to figure out why they like to disappear at certain camera angles
even though the labels are well above the map
the map still makes them disappear
"I changed something and that fixed it"
- Software Development
but yes it no longer disappears
@pure sierra this sprite issue took me 3-4 hours to fix but I'm going to bed finally
cool
"trial and error" shouldnt be applicable here
your icons should pop up, obv, but that looks incredibly cool
i feel like im on the final fantasy 3 world map
god please matt find it in your heart to give us the height maps!
"trial and error" shouldnt be applicable here
Well, no one told me how a certain function worked. I was trying to access the images from a folder, but then I finally found out it has to be in a folder called "Resources" and only about half an hour after that did I find out that the path to the images folder starts in Resources
As for the trial the and error with the label placements, that's mostly because no one would tell me what the origin of the api coordinates are
By now I'm thinking the origin of the original coordinates is actually one of the corners
its something like that
not the center like you might think
thats why i mentioned the origin issue earier
@kind glacier here's my dictionary of map offsets based on which region: https://gist.github.com/NoUDerp/e4e823fece000d3b07270f3abc123674
to make a global point from a region-local one
slightly confusing if you arent familiar with like c# 7 but ... you can kind of figure it out
that's the offset for the hexes?
ah, thanks
o.Item1 = x
o.Item2 = y
Ah I'd recognize that code anywhere
Because for some reason I named region height "k"
Haven't managed the icon sprites yet
Apparently I'm lacking a few icons
suppose I'll just have to color them instead
color doesn't seem to match
much too dark
fixed it
@long raft What's "template"?
100 errors nice ๐
template i think is a single region map size
3 times in like 6 seconds?
I get the list of maps and then use those map names to access the list of static items and the list of dynamic items
I think kastow was doing every 3 seconds, i only do once a minute, but im not sure if theres a limit
I think I can throw in a wait of 3 seconds see if that works
so 3 different url in 6 sec or the same url
1 time the map list
then the static and dynamic list for each map
sooo
a lot?
well that should be fine, i think we all just rapid fire all the different map name requests one after the other with no delay
have u successfully done those map names before ? are you just getting them from the maplist url?
I get them from there
I think I gotta do it more linearly
ooh boy, he does not like that
I froze it ๐
need to toss in some async
oof for a sec there I thought I lost my work
you need version control, set up git
I think the problem is that the get request is supposed to be async, but the code keeps on going while it waits for the request to catch up
but it needs the return from the request in order to do the rest
the way I'm trying to get it to work is
get list of maps -> make map 1 -> get static for map 1 -> make static -> get dynamic for map 2 -> make dynamic -> make map 2 -> repeat
instead it makes all the maps and only then tries to get static
trying to trim the double quotes off a string, but it just refuses to remove the one at the start of the string
hmm
doing string.remove(0) removes the entire string
fixed it
I've now got all maps on top of each other
now I need the names and icons
i know youre rubber ducking your way through this code but nobody can help if they cant see the source causing problems
nobody gets mad at us here
this is safe place for programmers
but non-programmers better watch their backs 
its our little sanctuary away from the madness of fod
i can afford to request the data every 3 seconds because i dont pull all of the data every time
i compare etags
which means most of the requests get aborted because i check that its the same data
Any collies want to test out a Foxhole Management System soon?
Privately message me if you would like access.
Any Wardens interrested in the same shit message me.
So sad that globalHQ is now split in the camps... @sacred rivet
Indeed. Tbh this should be a based game instead of the stupid social score.
so why do you do it?
We need a software to run.
I thought you guys have one running for weeks?
globalHQ is no longer worked on i have no idea why so we developed our own verison excel sheet now doing a progrmam
because it was shut down
F
@pure sierra any idea why bannerwatch is all the way out there?
what map is that
Weathered Expanse
yeah same for me, it must be a mistake their end , ill make a ticket for it
Westgate has it too
is bannerwatch back?!
funny i dont see any error on logiwaze
๐ค not sure why its been so durable
here's my town's list
I seem to be having this unique issue where I've got one of the images showing the map behind another map image yet still being rendered on top
just have to scale them by 1/256
all the coords are already globalized i guess
but bannerwatch shouldnt even be a town anymore 
isnt that old AF?
endless shore on the right is higher than drowned vale on the left
by all accounts endless shore should be obscuring drowned vale
but it's the other way around
i think ....your math ... might be the culprit
?
the maps dont overlay
this is the wrong layout
I know, I haven't gotten to that part yet
it should be to the top right
i am legit curious how bannerwatch got back in there
anyone want the road definitions?
aaah, so that's how it works
yeah thats definitely out of bounds
maybe i just ignored minor marker types
if I put endless at the bottom it renders on top of everyone else, but if I put it at the top everyone else renders over endless
it shouldnt matter the rendering order - because none of them will be overlapping
TIL
Derp is right, they shouldn't overlay
as long as you correctly cut the regions into hexagons
frankly i'm surprised youre using the individual region maps
and put them next to each other
No, you're right but this does explain why the icons keep obscuring the map labels
@long raft if you put them all together its like 32 MB or something
because I do the icons last and they thus render over the labels when they shouldn't
shut up baby i know it 
Quite a consideration really... load a huge texture and hope the user doesnt run out of vram?
32mb aint that much
need to figure out how to rearrange the hierarchy so that the labels are last
32 MB is CBT for a website user
use webp, its like 8mb
i mean rescaling that image in a browser is CBT
thats why everybody uses leaflet
8.5mb tho for no loss
What exactly is webp?
is an image format (supported by all major browsers) that uses the video codec vp8 to encode the image
it supports an alpha channel and a lossless encoding format
how much space does it save compared to png
so all the benefit of png but about 1/3 the size - downsides might be rendering support
or rendering speed, i dont think its as fast as png
but its what i used on logiwaze for the leaflet map
its definitely less than half the size of a 32 bit png
i mean youre seeing it. that map went from 14.8mb to 8.5 (i realize thats not less than half)
anyway i would think you could save yourself a lot of effort by loading the whole world map as a single image, timberwolf
@long raft on first load of logiwaze all types of tiles render on top of each other
the satellite map is 2x the size. oof
weird - no idea how thats possible. i use the full image
oh i see the different layers
yah i feel like the downside to webp is that the browsers open it - sure, but like regular image editors dont, you have to convert to png to work with it and then back
but it has good browser support
interesting
it also supports animated images, like a gif basically, but thats not great support
probably better to use webm in that case
i see no use of animated images for us map nerds
agreed, but i would opt for a webp animated image instead of gif on a web page - its smaller, and you wont have to sacrifice colors or alpha bit depth
What i really want is for the game to have a local api from which we can get the players location
damn, it took me a while to get the icons to draw only once per map
went from 5800 icons to 790
imagine the chaos
can you stand them up like billboards?
@long raft like this?
I can, but it ain't pretty. One sec.
It should look awesome
yep! except they have aspect ratio issues
also billboards should always face the camera perpendicularly
it might help to draw a line from them to the map to show where they place, but i personally think it looks good
im imagining it with only town halls, and i think its great
right now though the next step is moving each map to its respective location
to my knowledge the coordinate system and icon list is per hex
yah you will have to move the icons, sure. but not the map
also I've got no combined version of all the hexes
i am just imagining loading all those images separately, its a lot of wasted memory space (eveywhere their squares would overlap)
i just pasted it, scroll up
well i pasted skaj's map and the satellite map
only see the satellite map
boy that doesnt seem like the right size
its not
here's the clapfoot version of the map, all combined
That's from August 3rd
then I'd have to figure out how to convert each hex's local coordinates to mapwide coordinates
yea i shared offsets with you already
that dictionary has the offset coordinates for each region
just adjust the x/y by the matching value in that little table
kastow figured out all those offsets
๐
and now i use them to stitch the map together ๐
Its the holy grail of war api
did they make changes since they uploaded the hex images?
my eyes roll back into my head when i start googling hex geometry
i think the images they upload to the war api are only half the resolution i provided
1024x888
hmm maybe not
Sat maps are twice as big
so, the satellite images are raw images stored in the assets. they are 4x the resolution as the API ones
and skaj processed them and made his version of the map which is also 4x the detail
i just call it the skajmap
hm
he read up on their map processing technique and duplicated it with his own color variations to make it easier to see
and the satellite map has weird orange roads all over it now
the real holy grail would be the height maps, kastow ๐ฆ
Yes
right now it does each Hex seperately. I could probably get it all to draw on the same map image
its going to take longer to download and load for users in separate maps
it will be 23x as many triangles to render
and you may see seams between them
floating point rounding errors...
your big map has jagged edges
eh?
its large... image apps dont handle it well, imagine the 4x larger one
but games often use large textures like that, so i think it should work
what's the hot texture image format people use now? is it still dds? 
you are going to want to at least use mipmapping on this, if not anisotrophic
which means you need to generate the mip-map texture
i feel like unity can do that automatically
now you've lost me
oh really? this is like 1990s rendering tech
if you sample a very large image in certain circumstances, like youre zoomed out, or at a nearly 90 degree angle it will ruin a texture
I've heard of it, don't remember what it does and certainly don't know how to use it
so you generate that same texture as a lower resolution using high quality resampling
all the way until you have n layers and its down to 1x1 pixel
this is what leaflet is doing for the web-based version for us
In computer graphics, mipmaps (also MIP maps) or pyramids are pre-calculated, optimized sequences of images, each of which is a progressively lower resolution representation of the previous. The height and width of each image, or level, in the mipmap is a power of two smaller ...
so unity can do this for you, and then it will be using so called tri-linear filtering, and it will look good
if you plan to look at the map very near to the table, almost a parallel angle, you would need to use anisotropic texture filtering to have it look good
mip mapping will do what you need tho - and its very easy, but it will use more texture memory
this, I presume
yes!
But also you would need to pick a max size equal or greater to the image i think
or maybe settle on like 4096 or something
i mean it's large, and its rectangular...
and of course dxt5 compression will be very helpful
seems like it would be worth matching a power of 4 to get that
so the texture, and it's resampled layers all get stored in a texture file together, and compressed
set it to 4096 and the warning is gone
oh jeez its 11264x9756 holy crap
i find the map looks blurry when zoomed WAY in even at that resolution - i doubled it with an AI image enhancer at some point
I think this might be that version, im not sure
it's freakin huge

i would probably consider resizing to uhh ... 12288x8192, god thats huge
even here it has the jagged edges
ah it cuts off part, so it would have to be scaled at least a little bit
oh man thats just like ... what their map looks like
i suspect the reason for that is because their height map only has 255 intervals
and the difference between above water and under water is 1/255
oh.
well damn. maybe its the AI enhanced version
lemme see if i can dig up... or re-stitch it
i dunno, skaj's map kind of jagged too
i mean if you upscale something with bilinear filtering youre gonna get blurry and smooth, seems plausible
I guess it was that first one i posted that i deleted doh
i should have learned my lessons about ai enhance on grom8k
@kind glacier
not webp
do you want it in webp?
No
the colors are far less rich in webp
its like it lost even more color
or am i going insane
guess ill have to open the both in paint.net and difference them
i see ... differences on the seams, i wonder if those are alpha channels
paint.net shows no differences ๐ค
i suspect its just discord rendering webp differently than png but im not sure
I just noticed that the upscaled map is noticably different from this one
holy c rap
you are right thats way different i should make sure i have the newest github ones
i think the upscaled one was old
ok just stitched this fresh from the github @kind glacier
its slightly larger...
aight, thanks
That's actually pretty nice looking, I wonder what changed, it's like they rendered stuff more clearly
๐
now I gotta get them to their respective places
they're currently still placed as though the image they're on is their respective Hex
yah i mean you have to divide them by the individual region size, which i think its 1/5.5 of the total map width
and then you have to offset them by the size in that lookup table
it would be great if the api were more unified, but i have seen the evolution of it so i understand why it is how it is
happy to at least have an api
It'll likely all be in unity's measurements
i remember it being a time consuming process
in the meantime I tackled the icons no disappearing problem
i wonder how much it would cost to get those icons 3d modeled
and it would be like monopoly pieces
Didn't the devs make an art piece similar to that?
where is it...
it's out there somewhere
i got to show you this spam fake hack email logic
"Hey, today I got some bad news for you.
Check the sender of this email, it's your email, that means I sent it from your email account."
...
"Showing this mail to someone else wont help you, my RAT is no longer on you computer and this email was sent from some random generated account."
@umbral mulch I just found it
grrr
But yes
it would be cool if it could look like that
had one of those several months back
@pure sierra I spent like an hour trying to find the real location it was sent from
I don't remember where, might have been south east asia
its like when you see a call coming from your own phone number, hayden ๐ฆ
@umbral mulch apparently you missed the higher res version: https://static.wixstatic.com/media/dbafb3_d24023039cdd451a8258969bafb7a86e~mv2_d_3000_1800_s_2.jpg/v1/fill/w_2560,h_1536,al_c,q_90/dbafb3_d24023039cdd451a8258969bafb7a86e~mv2_d_3000_1800_s_2.webp
hmm
Now we gotta ask Julian for the one without the logo
Derp, could you tell me what the item1 and item2 mean?
o.Item2 is a mystery to me
I think I got it
so far the dictionary is not working
I'll see what I can do. right now I'm going to bed
I've been at it for 6 straight hours now
The devs might be interested in giving you 3d assets for the markers/icons. Would be hella cool.
item2 is ... either X or Y im not sure which
its possible X and Y are reversed, but what you are seeing is an anonymous struct, and if I dont name the properties they just default to Item1 and Item2
it should have been (x: k + ...., y: k + ...) and then it would be obvious they are .x and .y properties
all you need is a map that says map name -> (x, y)
i dunno if those new tuples exist in c# 6
see? it's ugly for all of us
The only variable you need to set here is the map width
And the coordinates of the center
Anyone know how many icons there are in total?
I'm getting a few errors drawing them and want to check if I dropped those or whether it fixed itself
my total is 784
across all currently accessible maps in the api
got the dictionary to work... mostly
Convert it to a globe
But muh flat earth
It would be hard to navigate if it was in globe shape, and the maps would be distorded
Less if yoh place it on the equator and make it fairly big
Most of the globe would be empty then
As is, because that's all we know about the world of foxhole
Why a globe tho
You can't put map pieces on a globe
Oh wait, timberwolf could slap the extended map behind if he wants
I suppose that's the idea, to make it look bigger
Unless its life sized with gravity n all
if you scroll up you can see the Foxhole version of that picture
There's ways around that, you could just have small magnetic piece or pins that you stick into the globe.
The only requirement is that the size of the pieces is small conpared to the curvature of the globe.
You could get away with larger but wont look nice.
Not that you're looking to make a globe, but just replying to the above points.
the hatchet on sketchfab ๐
but you dont really want a model with thousands of polygons
also those are old models, the vehicles in game have all changed
You couldn't take a picture, stretch it over a sphere, and distort it over the gaps?
the opposite actually
true
You could also do a rimworld
Hexagon a planet with one wierdagon somewhere in it
Or cut it off somewhere
you really want a globe huh
No i am just throwing out ideas
@long raft so derp if you can think of good way to integrate world map like your logiwaze i might do it, i want to keep the current front end, but when you click the map for zoom in leaflet it has say your whole world logiwayz instead.
huh?
well currently you click on my overview map, and get a one server leaflet. but id be happy for that to be whole world
so like ... normal leaflet, but you cant zoom on it until you click
so clicking it enables/disables zoom
it would be the same thing, then, right?
you're already using leaflet for the main display, right? so just make it so if you click the map anywhere it enables zoom
and you could uhh alpha channel the overlay maybe a little lighter
leaflet in a lightbox
well the hex overlay and the control colors overlay can both just be leaflet layers
might be worth adding the labels and icons in leaflet
oh and something im really happy about with logiwaze - the icons scale with zoom, but logarithmically
so when you zoom out the town halls dont cover everything
theres no ... disadvantage to loading the leaflet map
anyway its not needed, the current way i have it is good and works
i just want world on click rather that one map
I dunno use the full world map then
this way im not changing the whole site, it can be loaded say from your server where you maintain it
Do you need the tiles?
well one would. but im saying youve made it already and have it working, i just need to put it in a iframe lightbox
hmm there would definitely have to be some redesign for that
and make it so it focus on the sector they click on, i can pass you the click area
mainly the API is called from the javascript, and your website wouldnt need those extra queries on the client side
you already have the map status
and the route calculation can take a couple seconds on loading, too
actually im not sure the timing, i know on my phone it does. lol
but the route calc would only kick in if someone used it, otherwise its just a sethfire map
i mean if you want the sethfire map its just the leaflet with base image and icons, right?
yes
so the only difference you need is the global map instead of a single region, right?
yes, but im happy for it to have the logiwaze function as well
oh man, its ... so integrated
most of the code is here: https://github.com/NoUDerp/foxhole-router/blob/master/src/IRouter.js
but i had to sloppily put a bunch of javascript into the index.html
i just havent refactored it all out, i suppose if it was then it could just be a nodejs thing thats compiled to a simple js file, but its a lot of work
and i really hate javascript. my work in js is so slow
๐ค im putting WASM leaflet on my list of things to program if i get bored
remake it in web assembly... itd be nice
oh someone already did it
yah but the roads ... the roads are like 80% of this
yeah i know, you can toggle them off
i suppose i could actually
and all of the leaflet code would be in the index.html
perhaps i could just extract the minimal code to load a leaflet map for foxhole, i dunno
just make the js so it is functions that are not run at load, but on request. you can add stuff to the map after load
if needed
hmm the routing can be somewhat complicated, running in javascript, can feel like it lags
it's O(nยฒ) and theres a few thousand points
dunno how easy it would be to turn on and off on the fly, not sure
isnt everything js?
yah
so thats fine
Yah, just don't know how easy any of it is, I don't have a lot of free time for code lately and I got pretty sloppy on that project
its fine, lets sit on it
i have to go outside for a bit
(just turn off xss protection) ๐
and cors
you likely dont have any as its all client side
im just using github pages to host it
ill try something , 2 sec
i bet xss is enabled, just a guess
all you code belong to me
also hmmmm https://github.com/clapfoot/warapi/issues/77
also
I found a typo
in Stonecradle
At least, I think it's a typo
it's even on the wiki
why cant i write my text..
the "Dyno" Bot is blocking my text... <@&374193809174822912>
it is a bit of text... but no spam.
DM me the text
It does remind me of the Aegean Sea
@void marlin posted this:
I try to reimplement the globalHQ Server... Some more strange things:
Iteam "26" from the DeadLandsHex api has this data:
[ "teamId" => "COLONIALS" "iconType" => 7 "x" => 0.42195216 "y" => 0.4821111 "flags" => 41 ]
the flags of 41 are : 00101001
how do they map:
IsVictoryBase (0x01) IsHomeBase (0x02) // Removed in v0.29 IsBuildSite (0x04) IsScorched (0x10) v0.22 IsTownClaimed (0x20) v0.26
whats with 0x08 ?
this would be a VictoryTown,????,ClaimedTown
Other thing:
The number of digits for the MapItems and MapTextItems seems to be differing between the objects. is there some know limit of digits?
@fluid trench thank you!
@pure sierra this should have been my resonse of you linking my github ticket.
@fluid trench 0x08 is secret flag, we dont speak of that flag
to get out the flag you want you use the id as a mask
so 00101001 & 0x10 = if scorched or not
0x10 = 10000 (binary) so 5th digit is the one of significance
00101001 = is victory, secret, and claimed
@void marlin ^
when i say secret, its not really now but was kinda, back when we had forts and they had an optional watch tower upgrade, this indicated that, it was never meant to be in api due to intel leak, but like most new features they wind up in their inadvertantly regardless
such it was never documented
thats if i recall correctly
Is there a complete map other than the one included in the api files?
there is what the guys have made by tiling
No, I mean bigger
no
it's a huge pain to line up. i feel like it cannot be lined up perfectly
it was never meant to
it can be i think
not without skewing/stretching it
Yeah a lot of stretching
logiwaze has my best attempt
china be like, stuff it, we'll make our own power wall...
Once saw a big power bank getting assembled and I swear it was entirely made out of AA batteries
the magic of tesla
Can't have major battery failure if it doesn't contain any major batteries
The only thing missing is gates of oblivion
thats exactly the feeling i got
@languid harness Recuit
@pure sierra first of all, what do people mean by summer in Australia
dec, january
Ok I see
Act IV: Pandemonium
This one goes out to the devs
https://youtu.be/WI5hvDXapZg
I recorded it in free aspect mode, so the resolution is a bit scuffed
this is cool
what would be good if you had whole world overview, olways visible on the wall and zoomable map on desk
ran into a spot of bother as I can't add a shader to the map
I did add one on the map on the far wall, but that was by making the image a material and putting it on a 3d panel object
i like the old map there, thats cool
it is
not trying to get my derp stink all over your hard work, but i have this sense that a big static world map, and rather a camera that moves and zooms in might be cooler than a magic map that pans
Itโs a touch screen map, tells you where your uber is and automatically rates them four stars
this is awesome
its been a looooong while since i've seen something really new in community development
its really a breath of fresh air
@long raft tbh that might just be easier with any multiplayer in mind
all i want for christmas is the foxhole height maps
It is my job... haw may i help? ๐
I totally forgot I typed anything in here
(random web site) how can I make something like that?
I have something like that
and I'd like to extend "Ships" tab
to put every ship description separately
or 3 tabs for small, medium, and large ships that would extend and show ships of specific size
so it won't take whole lenght of site
btw I'm rookie, it's my first time doing html and css
(random web site)
yAnimeList.
suuuure
That does not help your case
what is your starting point? it's just a css menu bar, isnt it? i'm sure there are examples on w3c
o no
no not evel bootstrap
kastow 
aight, thanks Derp
@long raft Here's your stink.
https://youtu.be/GWcjXVTX9EU
I tried getting the ceiling lights to cast light and dark on it, but that just screws over a lot more than it adds so I abandoned that attempt.
It's decent, it depends on what you want. I can image several players interacting with the map simultaneously that way
ceiling lights ... maybe too broad, like ambient lighting
what about little spotlights around the rim?
like people do with those small lights on their back yards
or a bankers lamp
the panning looks good tho
tbh lighting and props would be last on the list
the map perspective seems odd... is it square?
?
might just be FOV
it's about 70 in the video, tho I might've scrolled out further
It's not square on, if that's what you mean
no i mean the map looks ... stretched
hm ok, so its the FOV tricking me then
would need to find a balance between fov, angle, and altitude
I slapped it together in about an hour, so I'm afraid not
well i think it came out well
I tried head-on, but that would defeat the appeal of any 3d elements I might want on the map
@long raft 
oooh
I remembered I had those from a free asset pack
i bet you can get the icons for these things modeled on fiver
the icons are pretty simple
i look at them and think meh i could model that
I've seen a little 3d modelling talent in the community so they could probably slap together a primitive if they tried
something that vaguely looks like a hatchet and all that
apparently they were still floating a little, so now they should be flush with the map
Now I'm off ta bed
@kind glacier I can see a RTS game coming out of this lol and you could see the opponent wearing uniform across the room
Itโs beautiful whatโs your have done and itโs amazing
@long raft https://youtu.be/wT3w6RIm6LA
oh wow you are ambitious with this project
I should probably take a step back and see about periodically updating the info on the map
but I know nothing of these Etags
I did say I wanted radio general 
Oeh, that looks very fancy
i see that the map shows even the names of locations
i like the lighting, it feels like a movie theatre, the darkness cuts off the map tho, easy fix im sure
cool to be able to walk around the room, in my opinion
I wonder, does the spawn of the building lower when you zoom in?
Or will you have to grasp the top of the screen?
It doesn't show (purposefully), but it's kinda scuffed atm. It should spawn at the mouse position and immediately be draggable, but it isn't. So yes, instead it spawns at a fixed height rn.
Its great to see the progress you're making Timberwolf! Keep it up man!
damn this is cool
godspeed timber
a 3d war map? looks great ๐
grid or no grid?
i think you want grid and coords system that matches the game
I need to figure out what that looks like
and I can't have it be different for each hex either
why would it be different ?
ah i see now
i checked in game, there isnt really a world grid system
they never worked that out
just kept it per region
Arent they identical per region?
they are identical, but it starts left edge, and by right edge its about half a grid
so you cant align them
and I bet the map on the right side doesn't start with half a grid
I can make mine smaller tho to roughly coincide
you could generate a grid per map
gotta check ingame, but preallocating the update takes forever
Not really, it's one big map
and just crop it to each
you'd have mismatched grids all over
you could generate it it as a layer with the region boundaries and grid like
again, mismatched grids
no, the grid can be per map
?
Mismatched grids ist terrible
You could makenit look like several individual maps "tied together "
in queue for deadlands ๐
No i mean, individual maps laying on the table. Roughly connecting together
With a military aesthetic
that would mean going back to the individual hexes and I wouldn't have a background map to make it look like a square
You could have a zoom out global overly
Or a war room with a big map on the wall.
And instead of pieces on the table. Its pins on a wall
Get dyno'd son
for nuttin
Or zoom into the individual Maps ;)
That was the original plan, but then that got shelved for what I've got now
I can't have it all
Sure, I could do that and have the grid per hex, but it would still look ugly as sin
not if its cropped to each hex
then put the legend along the center lines
but for now its not really a priority
I'll admit I'm getting a little burnt out now that the cool features are mostly working to some degree
have to take it slower
Yeah... That's the hard part of coding, staying motivated
And keeping the project clean...
Pleb here, long time reader, first time caller. How hard would it be to make a 3x3 row x column slot machine
Let's say 5 symbols, do collie logi truck, collie luv, collie lt, collie bt, and a train emoji as the free spin, 5% chance to get 5 free spins.
I'm calling it "off the rails" as a tribute to Leks obsession with foxhole trains to feed his ego even more than they are doing in anvil chat
Instead of tokens or coins, you bet with bmats
on what platform? waybe just web ?@potent panther
Yeah web
I'm programming tarded but I'm asking if it's a ton of work. A foxhole slot machine would be funny tho
some project there
Get an HTML5 and jQuery Slot Machine for your site. Engage your visitors and improve your customers loyalty.
not that hard. its a simple project in C if you ask me.
but then you need to know how to write C ๐
anyway. you could have double array[3][3] and seed it randomly.
if the array lines up horizontally in the middle you win
ding ding ding
webasm or something ๐
major overkill lol
cant you compile C for web anyway?
I mean it would be a cool thing to make a foxhole slot machine. Gives logi something to do while they hold LMB lol
I think itโd be simple if you used something like Bootstrap and JavaScript
Should make the Tech UI have the slot machine.
Not too far from the truth of prototypes.
so whos going to make the foxhole slot machine
why does this topic exist in the foxhole discord?
just general code talk or is there a foxhole API?
(im new to game)
Clapfoot has an API called War-API, accessible here: https://github.com/clapfoot/warapi#map-icons
This channel is just in general for code discussion, as there's a fair amount of programmers in the community.
was just looking at that, the endpoint links there seem to be down? ๐ค
They should be working, you'd have to ask Derp or some of the others exactly how to call them though.
Oh I think I got it ๐
Are there any specific foxhole-related projects been worked on or collaborated on here?
looks like @kind glacier is working on something
Ye, though I've been taking a break for a bit now
What are you working towards making with that 3D map?
have you seen my most recent video?
that's a long message, firehole89
I can't type today 
We have several web updated maps, work of Hayden and sethfire.
https://foxholestats.com haydens
There was a massive project with a tool for coordinating, planning, and several other utilities, organized by kastow wich he stoped mantaining recently (foxhole gobal)
Derp has a router
http://www.logiwaze.com
Someone made a artillery calucator overlay, it's in #community-resources somewhere
and other projects, tough not necessarily on this chat
@frigid rock it varies
How can I match dynamic icon data to static location names? Right now im matching off whatever X/Y is closest, that isn't perfect though as the icon and the name are at different X/Y values.
Just wondering if there is a better way then "if they are close together thats probably a match."
@floral spruce Yeah thats pretty much how everything operates
no other way exists
Well, you can also filter out minor labels at the start because if its a base its a major label
but with these array sizes it doesnt make much of a difference to a modern cpu
Ya thats what i do, just.. one name that a little too far left and it can mess everything up -_-
As long as you're using only major labels you should be fine
because the game applies exactly the same algorithm
Ya its not a computing concern its a margin of error concern. Especially if i want to add in minor icons.
Well, it will work i guess.
I am working on a Backend wrapper to bind names and Icons to a "object Model" and add History about a war to it.
If it is live, I will post a link here. Maybe somebody wants to use it :)
backend wrapper gud
๐
doesnt matter if major or minol
"if they are close together thats probably a match." - yup
They should just give the icons on the map additional X,Y vars that describe their label's location...
Would be so much easier.
Then the non-icon labels could have their own separate list.
Don't see how not doing that saves them any data/time since its the same amount of info either way...
I think that is actually worth raising as an issue.
It's been a long time since I looked at the data format for this stuff, can anyone post a snippet here?
that the api returns ?
woops, its right above I see it. Yea
dont think about it all too logically, thats not how it was done
Fair enough, but it is a worth while change to nest the label x,y with the icon itself.
but how do you link the icon to the label ?
by seeing which label has the same coords as referenced in the icon ?
see i think the reason it is the way it is is that in the game the icons and labels are 2 different data/object types and they arent even connected in anyway in the game itself either.....
{
"teamID": None
"iconType":23,
"x": 0.3123
"y": 231123
"flags": 0
"xlabel": 0.3123
"ylabel": 0.451
"labeltext": "TownA"
}
And it's all linked.
and straight forward. Now if there was a reason to not do that, I'd be happy to learn
No guess work and no need to approx/match x,y in the first place.
or just merge them both, there is no reason to not just have one big list of labels and icons,
I'm guessing only reason they're separate is because the icon type / faction flag updates but names never change
so they're saving on that.
Yea, I get that, but splitting them like this makes it so weird ๐ฆ
Didn't know it made that big a difference for networking. Then again I'm no network engineer/dev
well it does make sense to minimise data transferred especially if it doesnt change
could just request only the IDs that have changed and update only those ids maybe
You still have to check if the ID has changed
So the separations means they're checking less things
Then the static list with the labels should just have a ID entries that correspond to the IDs on the dynamic icons.
That way # ids checked never changes on their end. And since the IDs are in static they won't add to update overhead
Then that'd be doing the same thing as checking a separate list
don't follow. Isn't it an improvement in that there is no longer any ambiguity with X,Y when labels are close to each other?
{
if (bit_is_clear(PINC, s1))
{
number++;
}
if (bit_is_clear(PINC, s2))
{
number++;
}
}
void init_timer0()
{
TCCR0A = 0; //timer value to zero, overflows at 255?
TCCR0B |= ~(1<<CS02) | ~(1<<CS01) | (1<<CS00); //prescaler
TIMSK0 |= (1<<TOIE0); //enable interrupt
}
void init_interrupt()
{
PCICR |= (1<<PCIE1);
PCMSK1 |= (1<<PCINT9);
PCMSK1 |= (1<<PCINT10);
}
void init (void)
{
//knopjus
DDRC |= ~(1<<s1);
DDRC |= ~(1<<s2);
}```
this code should work right? I see no indication why it wouldnt
then again, interrupt entirely stops existing when I enable S2
sei(); is enabled
I dont see why the interrupt routine would not be called by simply enabling a second input on the same register
DDRC |= ~(1<<s1);
DDRC |= ~(1<<s2);
fuck me. should be AND not OR
@coral sundial """""knopjus"""""
๐
<p>
<p /> 
Yeah, that got posted days after I graduated, but I'm nowhere near qualified nor do I live anywhere near Canada
perfect, you've got the job
@zealous sonnet git update coming ?
ya i'll do one for this update

I'm too dumb to understand what map layers are
Even though there have been several explanations
Think of them as presets
They're a bunch of different layouts for the maps (where production facilities are mostly), that the devs can just click down
so no git update @zealous sonnet
@pure sierra It's up now
@steep surge 
thanks
@kind glacier ?
The Grid or no Grid Question?
@kind glacier
I would say both if possible.
No, just the picture with chess pieces
@kind glacier
I like it.
Yea kastow adding to what icanari says: think of it as photoshop layers which you can toggle on/off at any time. Except they're doing this with their structure placement for each map.
Maybe not Photoshop layers.
I think of it as Presets. For a given Location X you have several arrangements. An arrangement consists of Building's and potentially Roads/Trees/Rocks/(Bridges?) That can be activated with a single klick.
Think of the map as a WoW Character. Every Town/Base/(general part of the map) is a Slot in the loadout.
Changing the Layers is like equiping something different in the equipment slots.
To have something to equip, they still have to build the Layers. But now they have a inventory, and don't have to throw away the equipment they had.
Am i assuming right that the boarder bases are regarded not public buildings? cant get them from the API as it seems.
The api only shows what both teams can see
which makes using the API for any kind of strategy rather limited
Only useful thing it shows is blueprint state
currently, there is no mapItem with bitmask 20, but several clamied towns. is 20 not used anymore?
@void marlin i believe i went over this recently
huh?
i was just trying to find it in history
ahh okay. basicly it is not needed... i will skip the implementation then. thanks
de you mean 0x20 or ? is town claimed ?
yes
so i dont believe it currently has any relevance, i think it was if a town had been upgraded to victory condition, but i dont think that is a thing currently
I see 4,8,41(32+8+1)
I had a strange bug. when updating the dynamic API one Item was always created... instead of updated... there was one scrapField with 11 digits after the dot instead of 10...
my DB only saved 10 digits ๐
lol
the new war map completely fucked my labels
Will have to figure that out later
Ye, the maps previously not in use aren't mentioned in the code, so it just defaults to 0,0
what do you mean "the maps prev not in use" ? @kind glacier
You can probably set the object default in the definition of the class, though at best thatโll let you hide the ones not in use.
@pure sierra the 4 most south maps aren't in yet
added them, and now the labels are in roughly the right spots and all the icons are back
game so broken right now, cant be played for lack of balance
Can't play foxhole if you can't run it anymore 
Make your own Foxhole, with blackjack and hookers
vehicle models courtesy of @glad whale ๐
haha
perhaps something for the future, a little flag you can add to denote unit strength https://c8.alamy.com/comp/D36RRA/ww2-plotting-map-D36RRA.jpg
Wouldn't want to stack 10 little tanks on top of each other
I always wanted ruse
