#code-talk

2 messages · Page 4 of 1

tawny oriole
#

Int is not iterable object, but string is

long raft
#

i dunno, i tested your code with the 4 tests, they come out right for me, any idea which test is failing for you?

tawny oriole
#

None. All I know about this is that it must return 12933. Nothing else. It don't say what argument it transmits

#

I correctly called the transmit of the argument to the function? I have never read books about programming in English :)

long raft
#

well for the example tests your code works perfectly

#

you would have to determine exactly which input values are coming out wrong

#

test #31 i guess

#

before the return -1 you could do:

print("Error:")
print(n)
print(p)
return -1

#

or print it out on one line

#

i dunno, it would be the last error you see listed, i think

tawny oriole
#

It returns -1 with (10383, 11), and... I don't know too

long raft
#

is that the test that failed?

tawny oriole
#

I think so. I used this to calculate it

long raft
#

some are supposed to be -1

young pilot
#

🎉

iron scarab
#

Nice

languid harness
#

🦀 🦀 🦀 🦀 🦀

winged trout
#

?warden

kind glacier
#

git: 'gud' is not a git command. See 'git --help'.
```![HBjoy](https://cdn.discordapp.com/emojis/534528598770450432.webp?size=128 "HBjoy")
languid harness
#

oof

dawn tangle
#

"git" some help

red belfry
#

k0d t0lk

pure sierra
#

plug walk

barren quarry
#

cipher conversation

#

programming banter

harsh narwhal
#

Anyone got an idea how to make a simple timed bomb in an application supposedly like bomberman?(I'm using glut and opengl),I've got the effects down, i.e making the areas around the explosion turn to walkable space but it happens in an instant

summer bobcat
#

🤔 a bomb timer eh?

harsh narwhal
#

yup

languid harness
harsh narwhal
languid harness
#

what about just adding a wait x ticks function

long raft
#

a linked list to store the bomb data (where it was set, when it was set), then check to see if any bombs should be triggered on each cycle

#

can presort the list by activation time for better performance, can skip most of the list each time

barren quarry
#

is it real time or turn based?

quick shoal
#

Is the war api being updated for the new map by next update?

barren quarry
#

why do you of all people care, you also have some war api based stuff?

quick shoal
#

No just wanted to know if it would be updated wanted to get creative this summer

young pilot
#

Here's an idea - I will likely host war map on GitHub and open it up for contributions, you can fork a branch and make changes and then submit a merge request. Kastow and I will check it and add it into the war map if it is working.

summer bobcat
#

sounds like a good idea

pure sierra
#

no that everythings a bit more above board , re no steam api, ive thought of publishing some functions for common things one might want to do in php

quick shoal
#

@young pilot Sounds good sorry don’t have notifications for this channel on so didn’t see the response from yesterday, I’ll try to help with the git as much as I can

red belfry
little briar
#

ugh, should I just switch to BTRFS?

barren quarry
#

i need to map the last 20 elements in a js array

#

does anyone know how to do that?

long raft
#

var dict = {};
var start = Math.max(0, arr.length-20);
for(var i=start;i<arr.length;i++)
dict[(i-start)] = arr[i];

something like that?

barren quarry
#

ok nvm i figured it out

long raft
#

is that what you mean by map tho? like a dictionary?

barren quarry
#

like .map function

#

that applies a function to every element of array

tawny oriole
#

@barren quarry, а в чем проблема? Джаваскрипт не знаю, но алгоритм, что называется, на пальцах: пихаешь в целочисленную переменную длинну массива(пусть будет n), пробегаешь арифметическим циклом по каждому элементу от n-21 до n-1, применяя нужную функцию и пихая во второй массив. Собственно, все. Sorry, English-speaking people, I speak English a little bit

barren quarry
#

да я собственно так и сделал

pure sierra
#

😛

pure sierra
#

@barren quarry just do a foreach

pure sierra
languid harness
#

oeh nice

#

how did you end up doing it? @pure sierra

pure sierra
#

using defines and constants in php

#

se the event action is stored such as cosntant CONSTRUCTION

#

then i define variation on that constant such as define("ES_CONSTRUCTION", "En Construcción");

#

then get the language selected eg ES , concenate the 2 with a _ to get ES_CONSTRUCTION and then load it with contant() function in php

#

anyway im off to bed, if anyone want to do a translation dm me, and ill send you the deets

languid harness
#

hahahaha, nice

#

good night, sleep tight, dont let the computer bed bugs bite @pure sierra

barren quarry
#

@pure sierra i can help with russian

pure sierra
#

@barren quarry sent

barren quarry
#

so im expanding my website with Mulon, and he asked me to do a seemingly simple thing - make a nested context menu on the map that allows people to choose icons from a category. What could go wrong, i thought?

#

so this is how the context menu usually works

#

when a map is declared, you also declare a context menu with all its options and items

#

there are items in the context menu, and when you click on them, some function is called

#

so at first i thought maybe i could declare context menu in a context item like i declared it in the map

#

well this didnt work at all

#

then i went to the plugins github

#

ok, this was disappointing

#

i thought about it for a bit and then i noticed that it puts the context menu item text inside the context menu div on the map as straight html

#

so i thought, aha, i should declare dropdown with buttons inside this html and write the event names as string in there

#

well the dropdown part worked

#

the event part didnt

#

then i realized that i could declare a div with an id in the context menu, and then when the object mounts (this is react), i then add the buttons in the context menu via react into the id

#

this also worked

#

but when i tried to add events to these buttons, they didnt work

#

no matter what i did, when any part of the context menu item was clicked, it called the same callback function

#

because technically the dropdown button and the dropdown itself are the same object for the context menu, and when i click any of it i do the same thing

#

i looked around the plugin source code thinking how could i fix it

#

and i found this

#

basically, it is told to ignore any click, mouse press, double click and rightclick events happening inside the item

#

and give callback instead

#

so there are multiple buttons in a dropdown and i have to give a unique event to each one

#

but the plugin straight up says no

#

it took me a while to figure this out

#

so here is a riddle for you guys, there is a context menu with a button that should open the dropdown,
the task is to make the dropdown open and only open, and then if a button is clicked, call a function unique to that button

#

considering that the plugin ignores any click events when you declare them inside the buttons

#

(i figured this out already so no rush)

#

the context menu plugin counts this whole thing as one item

pure sierra
#

so the context menu plugin lets you do the filtering ? and you are trying to put a fly-out dropdown menu inside it ?

barren quarry
#

not filtering, another event but it doesnt matter

#

yes

#

im trying to put a dropdown menu inside it

pure sierra
#

and interacting with the dropdown is firing the parent 'filter' event before you have made your final selection ?

barren quarry
#

yes

long raft
#

is that visual studio 2019?

#

funky new colors, right?!

barren quarry
#

thats glitch

pure sierra
#

can you unbind or not bind to begin with the contect menu event ? or attach it to the children inside the dropdown intead ? what does the context men event do ?

barren quarry
#

the context menu event does whatever you tell it to do

#

it triggers whenever you click on the button that open the dropdown or anything inside the dropdown itself

#

so its all in the same html container

#

and when you click anywhere in that container, the same context menu event is triggered

pure sierra
#

well just have it do nothing ?

#

ie dont use it

#

(the centext menu event)

#

and bind differrent events to the dropdown children

barren quarry
#

the context menu event is used to create the icons on the map where the context menu was opened

#

so the event, when it is called carries in itself the coordinates of the point at which the context menu was opened

#

anyway

#

here is what i did

#

first of all, when the dropdown menu is closed and the event is called, open the dropdown and do nothing

#

thats simple

#

but then it gets interesting

#

binding the click events to the buttons doesnt work because the plugin blocks these events

#

so instead i introduce a variable that stores the button index

#

when your mouse hovers into the button, the variable is set to button's index

#

when it hovers out it sets to 0

#

when the context menu event is called and the hover index is not 0, send the event and coordinates to create an icon

#

this bullshit took like 5 days of my life

pure sierra
#

oh , ok i thought it was a toolbar, but your solution is not bad, you could instead use the context menu event to write the coords into each child button as data attribute and then read it back out by child button click event

pure sierra
barren quarry
#

Good job

pure sierra
little briar
#

I've been learning C

languid harness
#

congrats'

long raft
#

i always found C to be more like unlearning other languages

languid harness
#

ahahahahahaha

#

gonna tell my brother that, he has learned like all the C's

long raft
#

i learned c++ first so learning C was just stripping off everything convenient

#

its like taking a time machine back into 1970

ionic onyx
#

#include <stdio.h>

barren quarry
#

cout << 'hello world'

ionic onyx
#
int main() { 
printf("Hello world"); 
return 0;
} ```
barren quarry
#

ok so now i need a real advice

#

we store a datetime

#

many users can have access to this same datetime while working on the same page

#

if the datetime is bigger than the current date, there is a timer that updates every second and displays how much time is left

#

if, on the other hand, the current date is bigger, it displays the timer is completed

#

the task in question is to generate one and only one event regardless of users' presence on the server when the timer has expired

#

i.e. the current time crosses the time in the variable

long raft
#

where is your int main(char ** args)?

barren quarry
#

🙄

ionic onyx
#

skipped.

barren quarry
#

i forgot, do c programs have to always return something?

long raft
#

you need an atomic function, kastow

#

or a semaphor, which is tricky in a database

#

you can also just use transactions if its stored in a database, begin and end

ionic onyx
#

function of time

long raft
#

so like:

begin transaction;
select time from `table` where blah blah...;
<code here>
update `table` set time="newtime" where blah blah...;
end transaction;
#

no other table writes/reads can interrupt that transaction

#

also, yes, C programs are supposed to return an int, thats standard

#

compilers may complain about that

#

void main( is not really acceptable

pure sierra
#

@barren quarry or more simply just put a function server side that checks the timer gap b4 anything else that relies on it happens. and then set client side functions that periodically sync the client map timer with the server one.

#

@barren quarry hey also, have you thought much about the big update coming out ? bit of work ahead of us ...

barren quarry
#

@pure sierra yes i have

#

every day i think about it

#

So basically I have been making an update for my website since late March and now I have to wait until we know what new features are in so i can adapt the website to the new update

pure sierra
#

ouch

#

btw is your map open layers ? @barren quarry

barren quarry
#

Whats open layers

#

@pure sierra

#

also no its on leaflet

pure sierra
#

just a map api/framework

sharp breach
#

OpenLayers is basically leaflet on steroids

pure sierra
#

@barren quarry how come none of your towns have names ?

barren quarry
#

The code behind the map is ancient

#

sethfire is too lazy to update it

#

Technically i can update it because i have this technology in my website

#

but im lazy too because, again, im busy updating my website

pure sierra
#

which one is your s?

#

i thought that was yours

#

@barren quarry

barren quarry
#

foxhole interactive map is sethfire's project

#

foxhole global is my project

pure sierra
#

where is that website ?

#

@barren quarry

barren quarry
pure sierra
#

it would be nice to see some screenshots of the site b4 having to auth

pure sierra
#

I asked mark about 0.26 and the api map image assets:

#

"Currently its individual, but some things might change there in our process. So unsure yet where things will fall

#

we are keeping warapi in mind though"

young pilot
#

Ever since I moved the map to the new map , it has broke every single naming system because the coordinates are outdated ....

#

Either I manually find the coordinates of every single town or work on that naming algorithim

#

Both require a significant amount of effort

long raft
#

naming algorithm?

barren quarry
#

@long raft the towns are marked like any other icons on the map and the only thing that makes them different is icontype 5 (t1), 6 (t2) or 7 (t3)

#

and these icons dont store town names in themselves

long raft
#

so like a table of icon types matches the town name?

barren quarry
#

instead, you have to pull the array of map labels and find the one closest to this icon

long raft
#

oh

barren quarry
#

the map labels are stored separately

long raft
#

assuming theyre the same town names, right?

barren quarry
#

for example

#

this is static data, and part of it is text labels

#

you can put them on the map wherever you want

#

they are not necessarily all town locations

#

and then you have dynamic data that changes over the course of the conquest

#

so what we do first is scan for every town with id's 4-7

#

where 4 is port base, and 5-7 are town halls

#

add them into a separate array

#

then for every town we scan through the labels and calculate the distances between each town and all of the labels

#

then we sort the labels by distance to the town icon

#

and take the first one

#

and now we matched a town name to the town icon

#

the game itself essentially does the same

#

@long raft

long raft
#

a town-id would make a big difference lol

royal glade
#

Yea I would hold off on any sort map related efforts till they get the new map changes done.

#

I setup the name matching code on the foxhole map. It basically compared coordinates of icons/towns to those in the list of labels that people had compiled. The label closest to an icon was assigned to it.

To add/modify labels we could plot the unnamed icons first. Then click on the map to find the coordinates, then write/modify a label entry. This is time consuming, but a sure fire way to get everything working.

barren quarry
#

thank you devs

red belfry
#

e

molten kettle
#

I would use an array instead of a switch

languid harness
#

It doesnt matter, it is gone now 🦀

foggy verge
#

This my first time using leaflet library, is anybody know why is the image is repeating?

languid harness
#

I have no experience with leaflet, but did you use for determining the size use a length or a scaling? @foggy verge

#

Because if you gave a size, it is quite common it will just repeat the instance (usefull for creating larger picture while using minimal storage)

#

If this is a scaling ussie, this can give some trouble with oversizing too much, so scaling it to (length you want)/(length of picture) should do the trick

barren quarry
#

@foggy verge share your leaflet code

kind glacier
#

Hm

#

We had to use leaflet with our last project

#

Though I didn't touch the leaflet part myself

foggy verge
barren quarry
#

ok so your mistake is tileLayer

#

tileLayer is used for google maps where the map is cut into many pieces that appear at different zoom levels

foggy verge
#

Yeah

barren quarry
#

so what you need to do is to get dimensions of your image

foggy verge
#

then?

barren quarry
#
  crs: L.CRS.Simple,
  
  minZoom: -0.75,
  maxZoom: 4,
  zoomDelta: 0.25,
  zoomSnap: 0.25,
  
  maxBounds: [
   [0,0],
   [1547,2750]
  ], 
  maxBoundsViscosity: 1.0}```
foggy verge
#

ok thanks

barren quarry
#
var bounds = [[0,0], [1547,2750]];

//Map Image
var image = L.imageOverlay('https://cdn.glitch.com/8b104918-ef75-43df-93fd-45bdd966f7e8%2Fmap5.jpg?1552474465343', bounds).addTo(map);
map.fitBounds(bounds);```
#

then something like this

#

the critical part here is L.CRS.Simple that allows you to use normal images as background

foggy verge
#

Ok I'll will try it

#

It works. many thanks salute

raven igloo
#

hi
What API does Foxhole use?
DirectX or OpenGL
Anyone know that ?

barren quarry
#

i think directx

raven igloo
#

anyone here doing advanced c++ ? 😄

barren quarry
#

i used to do c++ a looong time ago

#

about 6 years ago

tawny oriole
#

Advanced? Do you want a senior C++ developer?

long raft
#

used to be a c++ wiz before c++ 11 came out...

languid harness
#

I used to be a programmer just like you, but then I took an update to the knee

long raft
#

lol

kind glacier
fervent spear
#

I am learning with c++11

raven igloo
#

I need someone to help me in the FoxholeArtillery in the future.

#

need someone know Directx, Directx Hooking etc

#

something like this

#

I can use this code right now. but If there is someone who can help update it, it will be very good

kind glacier
#

Working with unity, and github won't recognize script associations :/

molten kettle
#

What's that overlay for?

raven igloo
#

overlay foxholeArtillery on game

#

something like discord overlay

river zodiac
#

It looks good.

raven igloo
#

For the first version of this app we will support only bordless fullscreen windows

#

I have to work on overlay coloniallol

long raft
#

have you done much DX programming?

#

it sure is ... fun ... ahem

#

really theres nothing thats ever been more fun than COM interfaces, good job microsoft

languid harness
#

@pure sierra uhm, I think foxholestats now defaults to Icelandic?

molten kettle
#

If you just want to implement an overlay, some minor change to the existing code is enough. I don't think modifing existing code requires much effort or experience.

#

The underlying hooking and code injection jobs are all done.

raven igloo
#

i aleardy did that

#

only for bordless window mod

long raft
#

it wont work on fullscreen?

raven igloo
#

no

#

i'll fix that but i need time

long raft
#

just getting a c++ project to compile is like 75% of the work

barren quarry
#

so basically i need to make this work somehow

#

and this is really weird

#

the other ones work as intended but not 16&10

molten kettle
#

16 is 10000 and 10 is 01010, & is bit-wise and , so 0 is the right answer

opal narwhal
#

@barren quarry hayden Today at 11:40 AM
i would answer but im muted
the mistake hes making is that the 16 is decimal not hex
and the mask is hex
it should be 0x10 & 0x10

barren quarry
#

i see

#

thanks

long raft
#

haha drunkle the programmer medium

raven igloo
kind glacier
#

gib double FA range

long raft
#

why no activated windows?

barren quarry
#

@raven igloo °

raven igloo
#

@long raft i can't

#

i have to change windows

#

lol

#

@barren quarry thanks

long raft
#

huh?

raven igloo
#

i cant activated the window

#

windows

long raft
#

why not?

raven igloo
#

idk windows errors

long raft
#

ive got a trick for ya then

raven igloo
#

what

long raft
#

unplug ethernet, try to activate - there will be an option to activate by phone

#

phone activation works

#

also lets you enter a new activation code if maybe you didnt set it

raven igloo
#

let me check

long raft
#

i have to activate my windows by phone most of the time

#

it takes about 5 minutes to read off all the numbers and crap but ... yea it works

raven igloo
long raft
#

did you unplug the network?

raven igloo
#

yes

long raft
#

it wont give you the phone option while it has an internet connection

#

hmm

#

activation server ... like its setup to connect to windows server to get activated

#

does it give you the option if you type "slui.exe 4" into the command line?

#

that runs the activation program (i think setup for phone)

#

i did have to reset the activation code once with
slmgr.vbs -ipk <code here>

#

but that was on server, not desktop windows...

barren quarry
raven igloo
#

@long raft it did work

#

thank you

long raft
#

sweet

#

overlay looks nice btw

raven igloo
#

thank you
Wait to see it in the Action 😛

barren quarry
#

looks nice

#

but you should add a toggle that makes it minimalistic

#

so not as much screen space is used

#

it would take like a quarter of the space it takes right now

raven igloo
#

toggle ?

barren quarry
#

something inbetween those two

#

where you can still enter all the data

#

but it takes minimum amount of space

raven igloo
#

hmm

green jacinth
#

hello

#

what this channel about ?

#

i ve never been here before

raven igloo
#

coding

green jacinth
#

this place seem inactive i go now BYE i hope i wan't anoying

#

oh

#

sorry

#

HI

#

what that toggle thing?

raven igloo
#

what ? 😄

green jacinth
raven igloo
#

this is a toggle btn from Artillery calcultor

green jacinth
#

wait there now an arty calculttor ingame now?

#

is devbanh open?

barren quarry
#

will be tomorrow

#

supposedly.

green jacinth
#

yay!

#

so in update 26 where have in-game calculator now?

barren quarry
#

the calculator is community-made

green jacinth
#

oh

barren quarry
#

@raven igloo made it

#

its just you can open it from in-game like discord overlay

green jacinth
#

how i do that?

i never got into spotting for arty due to bino not have far range then have to do math to get good fireing parttens

raven igloo
#

This software is not hard

#

you can put enemy and friendly coords in app and get enemy coords

#

like bino but with more range

#

And you do not have to stand next to artillery.

green jacinth
#

okay THX @raven igloo

exotic steppe
#

where does one obtain this application

fervent spear
#

I just realized you didn't make the page version @raven igloo the actual function sounds fun, have you made that yet?

raven igloo
#

@fervent spear what is page version ?

fervent spear
#

the link I just posted

raven igloo
#

my plan is
first windows and android
then ios and web

#

@exotic steppe still working on it

long raft
#

android? ios? nobody plays foxhole on those

#

also how will you do directx on platforms that dont have directx?

raven igloo
#

no i mean

long raft
#

ive ripped the equation out of the spreadsheet version if you need that, you probably already have the equation tho

raven igloo
#

we have app for those platform too

#

maybe someone dont like have a overlay on

#

game

long raft
#

we already have web page, android app, alexa app, google now app

#

we were always missing an actual overlay

raven igloo
#

The main focus is on this.

#

yeah

long raft
#

the closest thing was using the web page in the steam overlay, but its clunky

midnight crag
#

aye, @raven igloo good job on that overlay, it's very aesthetically pleasing. What language did you do it in?

raven igloo
#

@midnight crag Javascript - electron

#

thank you btw

long raft
#

ugh pixel perfect CSS is hell and i hate it

raven igloo
#

i used to program in c# c++ python javascript

#

for graphic and gui css is the best 😄

#

css programming language coloniallol

long raft
#

ridiculous lol

#

xaml is best for graphics

#

css is a disaster! god knows what support youll even find for it

#

and css + text = who knows whats happening internally, nobody

raven igloo
#

xaml is ded bro

#

you talking about wpf and uwp ?

#

but yeah they are good

#

there is no option for dpi awareness in wpf

#

This will make your software blury in other monitors

#

but yeah for example microsoft Groove microsoft store all are with uwp

#

and they are awesome

long raft
#

xaml isnt dead!

#

but its by far the best markup for graphic design

#

also i dont see why that would make anything blurry - there should be good antialiasing on the rendering engines

#

its not like CSS does a good job on blurriness at all

#

ive been working on a project lately that involves some pixel perfect alignment and its a damned nightmare in css

#

and im using a ton of css 3 stuff so like compatibility be damned

#

@raven igloo so electron is able to access directx huh?

raven igloo
#

yeah xaml > css

long raft
#

hows that work?

raven igloo
#

@long raft you can use c++ classes as node.js native modules

long raft
#

do you import the source? or are they compiled as libraries first?

raven igloo
#

we have to compile them

#

I do not currently use this technique(directx hooking) for the project

long raft
#

so youre doing like half in c++ and then the GUI in electron?

raven igloo
#

because of technical issues

#

@long raft yes kind

#

For example, to get system processes i need to use c++

long raft
#

ok makes sense

#

i wonder if it will work in proton, it should huh

raven igloo
#

what is proton

long raft
#

ah its like wine

#

for linux

raven igloo
#

hmm

#

ok

golden marten
#

Try to tell me this isn't relevant to this channel OwO

long raft
#

Wind talkers not code talkers

smoky mesa
#

Hi everyone, this is my first time in code talk.
I never realized we created a channel for this (its buried within the depths of the discord).

I built my first C# console application without using a tutorial.
Its a clock that uses a 12 hour format and has various messages based on the time of day.
The time displayed is based on the user's system time.

#

I started learning at 10:00pm last night, watched 8 hours of lectures then experimented for 2 hours via guided exercises. Eventually, I went off on my own and made a clock.

languid harness
#

Hahahahaha, it always seems to take like forever to get something to work for the first time, but when it dooooo 😆

raven igloo
#

noice

kind glacier
#

tfw you made something and then when you add something else you break it

raven igloo
#

1 hour coding , 1000 hour debuging

summer bobcat
#

never before have there been truer words said....

kind glacier
tender night
#

stop no

#

this hurts me too much

#

the accuracy aaaa

versed notch
#

hi guys

#

anybody here has access to all dynamic map data JSON files from the last World Conquest?

#

and by "all" i mean continuous grabbing on a regular timebasis

#

I'm currently playing arround with some data I grabbed by myself. I wanna use the data to produce animations like this

#

my script is working so far, all I need is lots of data to parse it! 😉

smoky mesa
#

Awesome map, I love when people do things like that 😄

versed notch
#

unfortunately in this time period not too much was going on 😄

barren quarry
#

@versed notch you can message @pure sierra for that, i'm sure he keeps the logs

#

but he's muted on this server at this time

#

i wanted to do something similar but never got around to it

#

so i wish you best of luck

versed notch
#

@barren quarry ty ill ask him!

royal glade
#

@versed notch Cool stuff ape. What are you using to make it? We should create map recording association to gather data haha.

#

I hope the devs release some sort of location data through their api. Right now there is no active data for player movement ...

#

It would be great if they could release player location data after each war is over.

barren quarry
#

lets make a discord for community devs

long raft
#

isnt this the room here?

versed notch
#

@royal glade thanks! 😃 I use python with the following packages for data input, processing, interpolation, and plotting of *.svg images:
"""
import json
import numpy as np
import matplotlib.pylab as plt
from scipy.interpolate import griddata
import os
from scipy.misc import imread
"""
after image creation I use imagemagick to create compressed *.gifs

barren quarry
#

so i was searching for a steam api request to pull the number of players in foxhole

#

i thought it doesnt exist because i couldnt find it

#

but then i did, on a totally different website

#

so on the official valve website this command is not listed

#

but somewhere else it is

#

what the fuck?

summer bobcat
#

Valve probably doesn't want people using that command?

#

Maybe deprecated?

barren quarry
#

the command works perfectly

#

here it is btw

long raft
#

do you map guys already have a plan for how to display the new map?

barren quarry
#

Good question

#

No

#

Seth is experimenting with tiles

long raft
#

im building the 7th layer of tiles now from baslow's map (yea it needed 7 layers)

#

ill go ahead and post it in case anyone wants it when im finished

#

if hes OK with it

#

i must admit the file size is ugly; i can't imagine thats inexpensive for hosting

long raft
versed notch
#

Hey guys,

#

so I was talking with @pure sierra and he kindly gave me his DB-log.
I could use the infos to create these gifs for every map.

#

What Iam missing atm is the Starting Information: whicht towns/forts/safehouses are under Collie/Warden control right from the beginning of every WC

#

Also: Discord is ruining Image quality quite a bit. *gifs look much better in reality

#

Does anybody of you know which Locations are controlled from the start?

long raft
#

gifs hbquestions

#

are these rounded voronois?

timid talon
#

Farranac Coast: Wardens - Iuxta Homestead, Colonials - Victa
Deadlands: Wardens - Callahan's Gate, Colonials - Sun's Hollow
Endless Shore: Wardens - Brackish Point, Colonials - Enduring Post
@versed notch

long raft
#

have given thought to this before - thought what it really needed was a kriging function - with the knowledge of the town hall ranges

#

because theres so much missing data in between points, all the hidden fobs

versed notch
#

@long raft from the scipy.interpolate Docs:
"The interpolant is constructed by triangulating the input data with Qhull [1], and constructing a piecewise cubic interpolating Bezier polynomial on each triangle, using a Clough-Tocher scheme [CT]. The interpolant is guaranteed to be continuously differentiable."

#

@timid talon ty 😄

long raft
#

oh i dont know about this, will check it out

timid talon
#

@versed notch my pleasure. 😃

long raft
#

have you seen voronoi polygons?

versed notch
#

not that Im aware of 😄

#

@timid talon And the other Regions?

long raft
#

In mathematics, a Voronoi diagram is a partitioning of a plane into regions based on distance to points in a specific subset of the plane. That set of points (called seeds, sites, or generators) is specified beforehand, and for each seed there is a corresponding region consis...

versed notch
#

all Towns belong to the homefraction?

timid talon
#

the other regions? Yes, the towns in the Home regions are owned. The starting point in those regions was the portbase itself.

versed notch
#

so all towns in Mooring COunty belong to Wardens at WC Start?

timid talon
#

yes

versed notch
#

@long raft Yes they are Voronoi Diagramms!
I dugg a little deeper into the documentation

timid talon
#

Mooring, Reaching, Callahan, Weathered and Westgate, Heartlands, Great March, Umbral towns are owned by the respective faction at the beginning of the war, including the garrison houses and the safe house.

versed notch
#

@timid talon Perfect!

#

The Forts are neutral at start?

stoic minnow
#

Yep

timid talon
#

the spawn point for both sides are the portbases, except Callahan's Passage and Heartlands that have the spawn points in: CP - Solas and HL - Blemish

#

and forts are neutral. ALL of them.

#

you need to unlock tech to build them

long raft
#

oh ok

#

but they are bezier curves instead of sharp lines

summer bobcat
#

@versed notch That looks great man

long raft
#

I updated the leaflet devbranch map in my post from yesterday. @vale citrus cleaned up the map further and it really looks pretty good

barren quarry
#

im a bit short on time so if someone makes one of these with an empty map (no icons or text) i will be eternally grateful

short fern
#

@versed notch That's good stuff man.

summer bobcat
#

@barren quarry ...

barren quarry
#

@summer bobcat yeah i know but thats not the final version

#

they're probably going to update it

summer bobcat
#

I'm waiting for final Dev Branch

#

And then the final update...

barren quarry
#

everyone is

night jacinth
#

Would it be possible with something like this in the game, the lantern?

barren quarry
#

alright so the developers updated the war api

#

the region extents are now same for each map

#

which means we can calculate the world size

#

1 ingame coordinate is 1 centimeter

#

so we have these dimensions

#

calculating the world length is easy in this case

#

just r x 2 x 5

#

and we get 9.45 km

#

the width, however, is a bit different because of how hexagon grid is aligned

#

the geometry tells us that a side of the hexagon is equal to R

#

for that we need to find which part of the hexagon the height cuts off

#

its a half

#

so this is what we get

#

which means the width of the world is 11*1.092 = 12.012 km

#

surface area of one hexagon is 3.09811 km

#

total playable surface area is 3.09811 km *23 = 71.257 km

#

so results

#

length of a region is 1.89 km
width of a region is 2.184 km
surface area of a region is 3.09811 km

playable map length is 9.45 km
playable map width is 12.012 km
playable map surface area is 71.257 km

barren quarry
#

Devs uploaded the official maps

#

i downloaded them and converted to jpg (because tga is fucking huge)

barren quarry
#

cut into hexagons

#

considering that each region image is 1024x888, the total image size is 5632*4440

#

and there is no need to make it any bigger

languid harness
#

@barren quarry Imma just mention surface is measured in km^2 (or km2 if you are one of those people)

barren quarry
#

yes

#

forgot about that

languid harness
#

No I wont

#

I am an mechanical engineer, this is the only thing I have

long raft
#

if anyone joins that all together id like a copy

barren quarry
#

the geometry of this is as perfect as it gets but the images themselves arent

#

for example the source image of great march has a black line on top

long raft
#

thanks thats high quality

#

whered they post the original tgas? im curious how big they were

barren quarry
long raft
#

oh ty didnt know their was a github

#

lol they committed the binary files, i do that too ^5 repackin till the end

raven igloo
barren quarry
#

Looks sweet

raven igloo
#

I'm doing the final tests
After that, we can use the app

barren quarry
#

i still recommend that you add a button to make it smaller so it doesnt block the view

raven igloo
#

you can

raven igloo
#

anyone wants test the app ?

raven igloo
summer bobcat
royal glade
#

@raven igloo How hard would it be to add a common map feature, where someone can upload a map and draw/erase on it?

#

That looks really awesome.

#

I get the feeling that since electron has npm support, we can possibly have a common leaflet map shared through the app

#

@barren quarry what do you think? I've not much time to actually do it, but exciting possibilities.

#

Also can electron browser load webpages?

barren quarry
#

what you mean custom maps?

#

or specifically drawing?

royal glade
#

Load a common map. Then provide a layer for people to draw on top. If anyone enters the right code on the overlay, they can see the same map

#

People could then have live, "in game" map to draw on.

barren quarry
#

Oh yeah i have that in my new project

#

will be released june 21-24

royal glade
#

You're making an overlay too?

barren quarry
#

i have like polygons, paths and circles

#

and many different markers

royal glade
#

Oh with leaflet?

barren quarry
#

that get sent in real time to other people in the room

#

Yeah

royal glade
#

I remember your website, my question is if it can be integrated with the overlay that warcrimes uses

#

so people can load and use it without switching windows.

barren quarry
#

good question

#

we may cooperate in the future

#

if there is a future

royal glade
#

I'm thinking if electron has a browser feature or plugin, it might be sweet. Kind of like how the steam gui works on desktop

#

is tantalizing 😛

barren quarry
#

wait whats electron?

royal glade
barren quarry
#

okay

royal glade
#

My first impression is that it must be fairly easy to have your website load from inside the app

#

If we pull this off, we will have enabled true armchair generals.

#

Just sit at base, watch map. And provide suggestions.

#

😮

#

How I wish they would actually make it a part of operations. Geez.

long raft
#

wow

barren quarry
#

does anyone know how to run python files?

long raft
#

i do

barren quarry
#

how do i fix this

long raft
#

probably missing python in that folder

#

which python
will tell you where its located

#

and you change the first line in that script to fix it

barren quarry
#

i hate command line

long raft
#

symbolic link is another way to solve it (across all scripts)
when you find the location of where python really is, like maybe its /usr/local/bin/python you make a symbolic link
sudo ln -s /usr/local/bin/python /usr/bin/python

#

are you making leaflet tiles?

barren quarry
#

does sudo work in windows?

#

yes im trying to cut the fucking map

long raft
#

oh, it does not. but they have a symbolic link, i dont recommend it

barren quarry
#

and i dont want to have any business with python after that

long raft
#

well i wrote a script, and i use imagemagick

#

its a bash shell script tho...

barren quarry
#

theres this thing

#

and i have no idea how to use it

long raft
#

i just use it with ubuntu on windows, bash on windows, whatever, cygwin too would work

#

i couldnt get anybody else's scripts to work worth a damn

#

have you used ubuntu on windows, kastow? its a much better command line experience on top of windows

barren quarry
#

never used

long raft
#

bash on windows maybe they call it - the windows linux subsystem

#

its basically an ubuntu environment running on windows, its not a VM

#

anyway, let me see if i can modify this script and ill share it with you

#

ill modify it for windows maybe

#

or ill happily cut the map for you

barren quarry
#

please cut the map

long raft
#

which one?

barren quarry
#

the one blade made

long raft
#

ok

#

how many zoom levels? what tile size/ what background color? jpg or png? @barren quarry

barren quarry
#

png

#

does there have to be a background color?

#

its transparent

#

lets say 5 zoom levels for a start

#

@long raft

long raft
#

oh ok let me try transparent lol

#

never done that before

#

so ill assume png

#

heres another assumption i make - the map is scaled and centered (add background to the top and bottom to make it square)

#

hope thats ok, shouldnt notice it with transparent background

#

cool it works

#

i can do 6 layers easily, 7 layers takes a little while, so ill run 6 layers

#

jeez if i just put this through xargs i could multithread that script

#

delete all the 6_ files if you dont want that layer, @barren quarry

barren quarry
#

thanks

long raft
#

theres some weird looking tiles in there, i should probably make sure this works lol

#

no hang on its cropping the last column, i think

#

really have no idea why either, it didnt do that to mine

#

sorry, @barren quarry I think it's mangled, let me have some dinner and I'll work on it and have it to you in a couple hours

long raft
#

@barren quarry here's 5 layers, 0-4. I've got some trouble when the layers scale larger than the original image I have to fix, I'll send those when I have them working

raven igloo
#

@royal glade everything is possible

#

@royal glade also you can load webpage in electron

window.LoadURL("web adress");

#

@barren quarry if you need a UI design for your project i can help you with that , code , UI/UX

barren quarry
#

im having trouble adapting leaflet to my map

raven igloo
#

why you dont using a single svg for map instead of 20-30 png ?

long raft
#

that last layer threw me, had to just write a c# program to do it, way faster, will use this from now on

barren quarry
#

okay thanks

long raft
#

yea its sizeable, its like half that size if you pick a background color and go jpg

#

the original one i did was 7 layers and more zoomed in. it took a while and is overall antiquated now

barren quarry
#

these files are taking ages to upload lmao

#

i have to divide the layer 5 into 13 batches because github only accepts 100 files at a time

#

if maps change after this im gonna be really pissed off

#

in the future we probably wont use layer 5 when the new patches come

#

cause uploading 1024 files every time is not a fun experience

long raft
#

yea its like 50m compressed

#

jpeg version is like 12

barren quarry
#

its done

#

ok so what now

#

now i need to link this somehow to leaflet

#

the format is https://raw.githubusercontent.com/Kastow/Foxhole-Map-Tiles/master/Tiles/{z}/{z}_{x}_{y}.png if anyone wants to try

#

yeet

#

the bounds are really weird

barren quarry
#

ok im more or less figuring this out

#

hehe

#
IN COORDINATES Y GOES FIRST CAUSE ITS LEAFLET
k= deadlands height in pixels,
w= region width = k/1.89*2.184=k*1.156
O= center of deadlands

boundary formula, c - center
[[c-k/2,c-w/2],[c+k/2,c+w/2]]

Umbral Wildwood=[O-k,O]
Great March=[O-2k,O]
Callahan's Passage=[O+k,O]
Reaching Trail=[O+2k,O]

Loch Mor=[O-0.5k,O-0.75w]
The Heartlands=[O-1.5k,O-0.75w]
The Linn of Mercy=[O+0.5k,O-0.75w]
The Moors=[O+1.5k,O-0.75w]

The Drowned Vale=[O-0.5k,O+0.75w]
Shackled Chasm=[O-1.5k,O+0.75w]
Marban Hollow=[O+0.5k,O+0.75w]
Viper Pit=[O+1.5k,O+0.75w]

Farranac Coast=[O,O-1.5w]
Westgate=[O-k,O-1.5w]
Stonecradle=[O+k,O-1.5w]

Endless Shore=[O,O+1.5w]
Allod's Bight=[O-k,O+1.5w]
Weathered Expanse=[O+k,1.5w]

The Oarbreaker Isles=[O+0.5k,O-2.25w]
Fisherman's Row=[O-0.5k,O-2.25w]

Godcrofts=[O+0.5k,O+2.25w]
Tempest Island=[O-0.5k,O+2.25w]```
#

i wrote this text and then just put in the variables

#

im gonna make it a single message

edgy harness
rocky spade
barren quarry
#
1    "TempestIslandHex"
2    "MarbanHollow"
3    "ViperPitHex"
4    "HomeRegionC"
5    "DeadLandsHex"
6    "HeartlandsHex"
7    "EndlessShoreHex"
8    "WestgateHex"
9    "OarbreakerHex"
10    "MooringCountyHex"
11    "WeatheredExpanseHex"
12    "LochMorHex"
13    "StonecradleHex"
14    "AllodsBightHex"
15    "ShackledChasmHex"
16    "LinnMercyHex"
17    "GodcroftsHex"
18    "FishermansRowHex"
19    "UmbralWildwoodHex"
20    "ReachingTrailHex"
21    "CallahansPassageHex"
22    "DrownedValeHex"
23    "FarranacCoastHex"
24    "HomeRegionW"```
#

Thanks, will take a look

long raft
#

link it to leaflet? i already made a leaflet like 5 days ago

#

oooh excited for new war api!

#

@barren quarry the bounds are like -128,-128 to 128,128, it seems to pick up the first image as the size

#

and if you dont properly set the bounds itll scream about 404 missing tiles

barren quarry
#

the bounds are -256,0|0,256

long raft
#

oh i was using CRS.Simple

#

im excited to grab the town coords with code rather than by hand, though ...

#

i have wasted a tremendous amount of time on maps in the last week. first doing the tiling - i wrote a script that took me 6-8 hours to run; yesterday I rewrote the tiler in c# and now it can process all tiles for 7 layers in about 15 seconds
and then picking out each individual town hall in QGIS, then the api gets released 2 days later

barren quarry
#

by the way

#

Seth compressed your tiles to 20 mb

long raft
#

in png or jpeg?

barren quarry
#

png

#

wouldnt work in jpg lmao

long raft
#

erm ... lol how

barren quarry
#

he has some script

#

i have no idea

long raft
#

i didnt do any work to improve the saving, i just used the default system.drawing.bitmap.save method

#

but i didnt really think png offered compression levels, maybe so

barren quarry
#

but it looks fine to me

long raft
#

the real savings is jpeg tho at 95% quality

#

youd have to choose a background color, but thats going to be the smallest size

#

are those text labels SVG or html?

barren quarry
#

svg

#

i think

#

Shit i dont really know

young pilot
#

got a slight issue with my coordinates

long raft
#

i do this with my svg labels:
stroke: black;
paint-order: stroke;
stroke-linecap: butt;
stroke-linejoin: miter;
stroke-width: 1px;
fill: white;

young pilot
long raft
#

its white text with a black border, its very legible, reversing the colors works too, but particularly contrasting stroke and fill colors, with the stroke drawn under the fill

barren quarry
#

@young pilot there are no forts on the bottom of great march

#

oh lmao

#

your latitude is reverse

young pilot
#

i have no idea

#

what the fuck

#

is happening

barren quarry
#

reverse latitudes for regions

long raft
#

...

#

it might be the war api reporting it wrong

barren quarry
#

No

#

my map is fine

#

here's the thing:

young pilot
#

my algorithm should not be an issue, it cannot move the map more than 1 space

#
  var xcoord = mapArray[regionId].center[1] - (w * 0.5) + (w * x);
  var ycoord = mapArray[regionId].center[0] - (k * 0.5) + (k * y);
barren quarry
#

the way leaflet counts coordinates and the way war api counts coordinates DONT MATCH

young pilot
#

^^

long raft
#

leaflet is default wgs84 nonsense

young pilot
#

kastow, did you change the region params or anything

#

i dont know why its reversed

#

or whatever

barren quarry
#

no i didnt

young pilot
long raft
#

i bet if you check the war api its wrong

young pilot
#

which is a direct copy

#

(my params i mean)

long raft
#

the towns look right, its just the forts, right?

young pilot
#

IDK

barren quarry
#

var ycoord = mapArray[regionId].center[0] - (k * 0.5) + (k * y)
here you need to write var ycoord = mapArray[regionId].center[0] + (k * 0.5) - (k * y)

#

if you do this you will fix everything

young pilot
#

lol.

long raft
#

war api was perfect huh? hm

young pilot
#

i just realize what is going on

#

and kastow was right

#

actually war api is not perfect because im missing a region for some reason

#

might be because of me though

#

hmm

#

i think i know why

long raft
#

anyway, yah, label border, stroke first, fill second

young pilot
barren quarry
#

rip

#

you know what

#

make your counter a const

#

and put it on top

young pilot
#

errr

#

give me a second, it was correct, 22 is the number of regions

#

unless

#

i forgot to put a region

#

fuck

#
const regionNames = [
  "GreatMarchHex", 
  "TempestIslandHex", 
  "MarbanHollow", 
  "ViperPitHex", 
  //"HomeRegionC", 
  "DeadLandsHex", 
  "HeartlandsHex", 
  "EndlessShoreHex",
  "WestgateHex",
  "MooringCountyHex",
  "WeatheredExpanseHex",
  "LochMorHex",
  "StonecradleHex",
  "AllodsBightHex",
  "ShackledChasmHex",
  "LinnMercyHex",
  "GodcroftsHex",
  "FishermansRowHex",
  "UmbralWildwoodHex",
  "ReachingTrailHex",
  "CallahansPassageHex",
  "DrownedValeHex",
  "FarranacCoastHex",
  //"HomeRegionW"
]
#

mustve forgotten one

#

lend me your list

barren quarry
#
                     "CallahansPassageHex",//4
                      "MarbanHollow",//5
                     "UmbralWildwoodHex",//6
                     "MooringCountyHex",//7
                     "HeartlandsHex", //8
                     "LochMorHex",//9
                     "LinnMercyHex",//10
                     "ReachingTrailHex",//11
                     "StonecradleHex",//12
                     "FarranacCoastHex",//13
                     "WestgateHex",//14
                     "FishermansRowHex",//15
                     "OarbreakerHex",//16                 
                     "GreatMarchHex", //17
                     "TempestIslandHex", //18
                     "GodcroftsHex",//19
                     "EndlessShoreHex",//20
                     "AllodsBightHex",//21
                     "WeatheredExpanseHex",//22
                     "DrownedValeHex",//23
                      "ShackledChasmHex",//24
                      "ViperPitHex"] //25```
long raft
#

its oarbreaker, right?

young pilot
#

well

#

it works

#

now what

long raft
#

Layers

long raft
#

so @young pilot howd you compress the pngs?

young pilot
#

uh...

#

secret

long raft
#

really?

barren quarry
#

there's a 0.65-0.7 difference between hex coordinates and the actual map borders

#

Oh i know why

#

wait no

#

i dont

#

fuck

#

ok yes i know

#

yes

#

the way i calculated height was wrong

#

now its fixed

long raft
#

Am still curious about the png compression

long raft
#

@young pilot 8 bits? 16 bit png?

barren quarry
#

i think he is gone now

#

he's an aussie

long raft
#

that must be what it is, im not gonna add that to my program because it assumes low color depth to the source image

long raft
long raft
#

aaaah git force rebase + git force push; making it look like you did everything right the second time

barren quarry
#

yeah

#

it was like a billion times faster than doing it manually

summer bobcat
#

rip when your graphics driver updates in the middle of FoxholeLowLevelFatalError [File:Unknown] [Line: 200] Unreal Engine is exiting due to D3D device being lost. (Error: 0x887A0005 - 'REMOVED')

barren quarry
#

wow thats some kind of bullshit i wouldnt see even in rimworld

barren quarry
#

matched the background to the map

#

more or less

#

[[-349.538,-265.846],[93.538,521.846]]

#

these are bounds to make the background match the map

royal glade
#

@barren quarry What is that green flag icon that is a victory point. (In the south west hex)

kind glacier
#

Imagine that world map but with twice the number of hexes

summer bobcat
#

@royal glade It's the Civic Center icon. VPs must have this facility upgraded in order for it to count towards to win condition.

royal glade
#

@summer bobcat thanks.

opal narwhal
#

has anyone got the icons for Construction Yard and Oil Well? and could you send them to hayen. thanks

opal narwhal
#

hayden Today
so, update 0.26 rolls tonight for me at 3am so ill be a sleep and ive been busy getting ready the best i can, focussing mainly and making my data collection and stats work and not get corrupted by changes while collecting all the new data as it happens,
thus i ran out of time to do much on teh map overlay segment but the basics, hopefully when the update rolls you will see this screen instead of the current one and ill continue improve things over the days to come
and hopefully it will show the new maps not this dummy data

#

dont get muted guys every post through drunkle mute avoidance is 1 commend HBjoy

long raft
#

ineteresting, i was wondering how he would keep the design with the new map...

barren quarry
#

it actually looks alright

languid harness
#

This works

barren quarry
#

@long raft

barren quarry
#

the galaxy requires your assistance once again

long raft
#

On what

barren quarry
#

cutting the tiles

long raft
#

oh ok, on which image

#

i published that tile program, can literally just drop image on .exe file and poof its done

barren quarry
#

i will contact you soon when i have the image

long raft
barren quarry
#

thanks

young pilot
barren quarry
#

hnng

long raft
#

oh uhh ...

#

yea his bit depth thing..

#

full assembly line, here

barren quarry
#

lmao need more steps

young pilot
#

i have a tile cutter but it only works with squares anyway

long raft
#

i think they all do that

#

i just scale it up to square and center it

barren quarry
#

alright

long raft
#

im fairly certain this is the easiest tiling program that exists

final palm
#

hi mates, as far as i can see in the war api description data about resource fields and mines should be available, since they are now more important and their distribution changes every war it would be nice to have them also visualized on your map tools, moreover factories, refineries and depots are now faction bound which could be also shown, TIA

summer bobcat
#

@barren quarry ^

pure sierra
#

as far as i know all available data im showing in my website ? @final palm

young pilot
tender night
#

good god

pure sierra
#

bad idea trying to use define as a variable name....

#

a new record for kills for hour , im going to have to adjust the coloring scale

#

on another notei get 29 victory towns in the api but in game reports 25, i have mentioned this to phil

pure sierra
#

So Phil has phill'd me in 😂 there are 29 available victory towns of which only 25 are needed to win

languid harness
#

alright, going for a second round with that Rapsberry I bought quite a while ago

#

What I managed to do this time: make it work with Python 3, have it handle my keyboard propperly, make it run from a cmd window at all times very smoothly (so only keyboard needed), have a longer charging cable so I dont have that fucker stretch across my lap at all times

#

I am working on: getting github linked so I can run my damned script

#

what I am currently gonna do: go to bed, first work day tomorrow at 10 o'clock

long raft
#

i just set mine up too, turtle! this week lol

#

figured out how to connect it to wifi and run SSH on boot, so i dont need a keyboard or video

pure sierra
#

you can also use real vnc on it

long raft
#

yea i like to use xrdp, because then i can just remote desktop client, and can even weave sound into it

#

in this case i was going to run it headless tho, i just needed a console. was excited to see i can run docker on it

pure sierra
pure sierra
#

also if you set the fade=0 it wont fade them out

barren quarry
#

rewrote my logi website almost from scratch with my buddy @chilly burrow doing the design

languid harness
#

amazing

#

@long raft I am using Raspbian Stretch Lite, that downloads only a cmd window and some basic drivers; lacks even stuff like libraries, so it keeps shit clean

long raft
#

I'm still crippled on this pi zero, because it's arm v61 architecture 🤔

#

I need version 7 to run any of my code

languid harness
#

hahahahahaha, I am not going that hardcore lol

long raft
#

It's less hardcore than you'd think...

languid harness
#

just need me a Python 3 and establish a conection with github, and I will be fine I think

#

I think

long raft
#

Yeah I guess that'll work

languid harness
#

and I fixed the python 3! I have an internet connection! Halfway done!

noble sage
#

@barren quarry the site is impressive. Great work!

barren quarry
#

thanks

summer bobcat
royal glade
#

For others, ^ note how vision circle dips near the shallow transition

#

@ drowned vale

barren quarry
#

explain me this

#

it keeps telling me that 33 is bigger than 203

#

fucking javascript

#

it fucking compares text

#

and 3 is bigger than 2

harsh summit
#

yep, that's a classic javascript thing

#

things like these, you just need to keep on stepping on the rake

#

until you stop stepping on the rake

silk verge
#

there is no explanation that is adequate

#

all things are at the mercy of the JS engine

long raft
#

slightly less annoying than languages that interpret = as assign and not compare

#

oh javascript one of those too, right

silk verge
#

u wot?

#

== being a comparison and = being an assignment is standard in all C likes

#

its literally the least annoying part of JS

#

well, not taking into account that [] == "0"

harsh summit
#

assign is absolutely =

#

compare is ==

long raft
#

i grew up in BASIC, where stuff works like you expect it to.

#

assign is := or <-

#

ya know, pascal or mathematical notation. dont pretend like youve never been thrown by a mistaken = instead of == (or even worse with some languages ===)

barren quarry
#

my first programming language in school was delphi lmao

languid harness
#

Python is just neat

#

but I have never seen = being compare

pure sierra
#

i love php, no type or variable declaration / consideration necessary, python is even simpler, but not used that as much

silk verge
#

I've made the occasional == vs = mistake

#

but then again, ;

#

or even, heaven forbid, mixed spaceing

#

oooh boy, spaceing just gets on my nerves

#

one of my friends who I occasionally collaberate with uses spaces and I use tabs and we just hate whenever the other one commits

#

we both agree on \n line endings

#

like that's an issue anymore

long raft
#

cant even imagine where people learn spaces

#

some popular IDE or language that insists on spaces?

pure sierra
#

it is a bit silly forcing structure through spacing like that, but i guess its to do with the logic, php just lets you create brids nests to your hearts content,

#

yeah when you do if(variable = true)do this; and cant for ages work out what the heck is going on...

low apex
#

@languid harness = as compare is in XSLT and a few other functional languages

languid harness
#

doesnt sound like that would function well

#

badum tssss

low apex
#

considering you assign things inside an xml tag, better than expected. I chuckled

long raft
#

and BASIC ... and pascal, some of the most important HLLs

daring berry
#

When this said code talk I thought it meant like cryptography

silk verge
#

I immediatly thought navajo, then I actually looked at the channel

chilly marlin
#

this isnt morse code?

harsh summit
#

this is binary

silk verge
#

this is ASM

harsh summit
#

real men write their code by manually flipping bits on a hard drive with a magnetized needle

#

manually

barren quarry
long raft
#

hey @barren quarry I saw when you posted the bounds of the map to fit the points - i dont quite get how the normalized coords are turned into absolute coords, any guidance on this?

#

assuming the normalized values are multiplied by the extent, but how do you know where the region lies?

#

also curious to know units <-> meters conversion, this sure seems like a lot of manual work

barren quarry
#

@long raft what do you mean by normalized coords and absolute coords

long raft
#

the x/y coordinates are between 0-1, right?

barren quarry
#

i can tell you about the units to meters conversion but i have no idea what you mean by normalized and absolute coords

#

they are 0 to 1 in the api requests for regions yes

long raft
#

doesnt it need to be offset so that it fits on the full map correctly?

barren quarry
#

im just going to tell you how i do everything

#

what is the only thing we are absolutely sure about in this image?

#

that the image width is equal exactly to 5.5 region widths

#

because of how the regions interlace each other

#

and from that go the rest of the calculations

#

should i continue?

long raft
#

that might be enough

#

i dont have to define a custom offset for each region, but ... kind of

#

yea i guess theres no way around that then, just have to look at the map and define the tile order

#

ok thanks, it helps to know the width

barren quarry
#

i described it here about 2 weeks ago

long raft
#

oh i saw you shared the bounds, ill take a look back through then and re-read it

barren quarry
long raft
#

oh yes i saw that!

#

oh that's great, thanks

barren quarry
#

so i have a bit of an issue

#

glitch is a good website but it has an hourly request limit

#

if the limit is broken the website goes down for some time

#

and this limit was broken during devstream

#

so does anyone know where i can host my website, preferably for free?

long raft
#

what does it need?

barren quarry
#

the requirements are not that big, i just dont want to have request limit

long raft
#

well theres the cloud providers, google, amazon, microsoft, they offer like a free tier for a year