#code-talk

2 messages Β· Page 6 of 1

pure sierra
#

you would combine them all and use one global coord system in full versnion

long raft
#

it was a high detail image - hard to work with so I had to set up a tile server, but which map you pick is important for the alignment and centering

#

and another big thing - this might come into play for you:
the default projection is wgs..blahblah84, the standard everyone uses for spherical earth

#

its fine when you place points, the projection doesnt matter much, but when you draw polygons and shapes (like a circle) they come out projected (they look elliptical)

#

you can turn projection off in the project properties

pure sierra
#

i did

long raft
#

ok

pure sierra
#

and running leaflet in pixel based simple crs

long raft
#

ok right

#

i find qgis not to be a good point editor, like i imagined i could transform the points globally, but i couldnt, i just had to move each one individually

pure sierra
#

i guess it doesnt matter what you make it in

long raft
#

qgis is really the only free game in town - i just worry it may be difficult to merge them together, i dunno

pure sierra
#

nah just add them as seperate layers

long raft
#

yea i guess all the images are the same size

#

ill try a map tomorrow, see how fast it really is

#

we will be missing the roads between maps...

pure sierra
#

make sure to turn on snapping

#

theres a few things i had to do to get it outputting correct format

long raft
#

snapping?

pure sierra
#

in qgis

long raft
#

ill look for it

pure sierra
#

ill look at pushing my demo to github

long raft
#

the json file is pretty helpful

#

i think i know how to achieve that

#

i can see how snap is important, yea...

pure sierra
#

i mean th elibrary does group vertex of closeness

pure sierra
#

mapping is not the hard thing though, its expanding on my current demo, currently i dont use the leaflet router plugin. so that could be looked into if its worth it, alse i dont have more than 2 waypoints, also it would be good to have snapping when dragging icons around like the demo, also search may want to be a thing ?

#

also there is a problem with the distance it calcs and returns, i have created an issue at the router git, as i think its hard coded for world lat lng, space, but im using pixel coords
https://foxholestats.com/router/

silk verge
#

you really need to put the marker directly onto the road

#

small beans compared to literally all the features that are yet to be implimented, but it woule be nice to have a little leeway

barren quarry
#

this looks amazing

#

its only a start but its a good start

silk verge
#

also, maybe fix/round the displayed distance to a hole number or to a few places

#

though, that might be related to the coord system...

long raft
#

@pure sierra that field you have in yours, the default id which is unused, maybe it would make sense to make a new field to replace it called name, string type, that has the name of the road

long raft
#

doh, there is no labels on the maps to even know which road they are haha

pure sierra
#

yeah, i had no need to add any fields so far, something that can be done though , is a modifier could be specified to specify if its offroad slow @long raft

#

@silk verge the distance is not calcing correctly afaik, im looking into it, then i will make it pretty, its dijkstra

#

@barren quarry yes, proof of concept

#

@silk verge that is i think where the routing plugin for loaflet would come in, but if not some kind of snapping feature

long raft
#

the routing plugin looks up the names and resolves them to waypoints, and its got graphics and control mechanism

pure sierra
#

hmmm

#

have you used node much ?

long raft
#

not me

pure sierra
#

i got the distance calculating correctly into km

barren quarry
#

node as in node js?

pure sierra
#

yes

barren quarry
#

yeah i have some experience

#

everything i did was on node

pure sierra
#

so the library uses all these 'requires' somithing only noed supported, so you cant just use the lib like 'normal' and just include sthe <script> you afaik and could work out have to 'compile' it with like browserify, which i have to do for the base level of code to get it into the dom, so i can use it 'normally' , but it has to be recompiled if any 'base' settings are changed or the map json

barren quarry
#

so you're talking about doing stuff with libraries on front end

pure sierra
#

well it does it

#

so for starters on the guide to use it in the readme it says:

var PathFinder = require('geojson-path-finder'),
    geojson = require('./network.json');

var pathFinder = new PathFinder(geojson);```
#

now this wont run in a browser

barren quarry
#

right

#

i use webpack to do this

#

im gonna be honest... it took me a lot of time to figure this out and i dont even think i remember how to do it

pure sierra
#

that seems to be the same as i did via browserify

barren quarry
#

maybe browserify works

pure sierra
#

well it does that what im using now

barren quarry
#

i think i tried it but didnt have any luck with it

pure sierra
#

on another note, is your previous comments about the map height being 1.89km still correct ?

barren quarry
#

1 = 1 cm

#

so we have 945m+945m

pure sierra
#

ok

barren quarry
#

i had this somewhere long above

pure sierra
#

i know

#

i searched it

barren quarry
#
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```
pure sierra
#

also , do you have a big image with all the maps joined together ?

barren quarry
#

13 mb

#

there's also contrast version seth did but idk where is it

pure sierra
#

np

#

also

#

what crs are you guys using in yoru leaflet maps ?

long raft
#

if youre going to work with the big map its unwieldy in qgis, youll need tiles

#

or just use a blurry 256x256 version i guess

long raft
#

mm look at that blue ocean

barren quarry
#

@pure sierra simple

pure sierra
#

thank god, me too

#

so pixel coords ?

barren quarry
#

What do you mean by that

#

pixel coords

#

oh right

#

yeah simple uses that

pure sierra
#

map bounds

barren quarry
#

maxBounds: [[-248,-20],[-8,276]],

#

wait no

#

ah nevermind

#

so as derp said you actually want to use tiles

#

no one's gonna load the full 13 mb background every time they load the website

#

i have a github repo pinned in this channel

long raft
#

qgis will not use local files for a tile server tho - so you can upload them to a server or you can use an existing server, or you can run php -S ./tiledirectory

barren quarry
#

it should have enough instructions

long raft
#

alternatively, we can map each map individually, and then using the offsets kastow made just shift them (I could write a program to modify the json contents) and join them together - but then the connecting roads need to be finished

pure sierra
#

the full map does load in qgis for me

long raft
#

i started working on weathered expanse, ive gotten like 25% done while i wait for linux servers to setup heh

pure sierra
#

it just flashes when zoom in and pan, but can live with that

long raft
#

yes, the full map will load, its just really slow

pure sierra
#

well like you said, we can setup a tile server

long raft
#

kastow already has one lol

pure sierra
#

use his

long raft
#

it might use a lot of his requests up, i dunno

pure sierra
#

its good if we all work on one set

long raft
#

its just static files, so it would be easy to set up anywhere, but like i said I just used php -S to make a local web server

pure sierra
#

i have webserver

long raft
#

kastow's tiles are the png quantized one for reduced size

barren quarry
#

it might use a lot of his requests up, i dunno the tiles are hosted on github

#

you can request them as many times as you want

long raft
#

your site hotlinks the tiles from github??

barren quarry
#

yeah

long raft
#

well thats the answer then, damn

barren quarry
#

where do you think the github link leads to lmao

long raft
#

ive never thought to use github for hosting like that, lol

barren quarry
long raft
#

so I guess set the QGIS XYZ layer's server to https://github.com/Kastow/Foxhole-Map-Tiles/raw/master/Tiles/{z}/{z}_{x}_{y}.png

pure sierra
#

how many zoom levels kastow ?

long raft
#

0-5

pure sierra
#

it works

barren quarry
#

yeet

pure sierra
#

now we just need a online vector database !

long raft
#

as far as i know, shape files are binary and git wont merge them. would have to export to geojson to do push/pull requests

#

are you starting over on a global map, hayden?

pure sierra
#

not right away, i will still maintain the current test bed for feature development, but im looking into vector online database for collaboration on the global map

#

any suggestions ?

long raft
#

geojson file

pure sierra
#

but can that be saved to onilne fromqgis ?

long raft
#

well no i think youd have to export the layer and then merge it

#

like with git

pure sierra
#

i want it to work direct from web

barren quarry
#

im trying to make a json file on github but its not working for some reason

long raft
#

whats the problem?

barren quarry
#

when i press "raw" it just opens a blank page

#

am i retarded?

pure sierra
#

works for me

barren quarry
#

oh nvm now it opens fine

#

now im gonna test if i can pull this data via an xmlhttp request

long raft
#

ooooh cross-domain xml ... eek

#

that might be tricky

barren quarry
#

aaaand yes

#

this works

#

here's the plan

#

we finish this thing

#

i upload it to github, or someone else can upload it if they want

#

as json

#

and then people can just pull the data from the link

pure sierra
#

im looking to make a colab workspace

barren quarry
#

basically what derp said is correct

#

browsers dont allow CORS by default

#

but lets be honest the war api data is also third party

#

we just request it on server side and serve it as our data

#

same applies to the geojson data

#

the server can pull it from github on launch and then just serve it as its own

long raft
#

ya i think youre better off making a readme that shows how to set up qgis with the tiles, and import the geojson file, and then how to export it when finished

pure sierra
#

so i have a cloud db accounh working in qgis

#

but just looking for something a bit bitter

#

@barren quarry

#

in your maps is 00 in the center ? or a corner ?

#

as in the tileserver map we just got into qgis 0 0 is in the center

barren quarry
#

the leaflet coordinates?

pure sierra
#

i guess

barren quarry
#

in leaflet 0,0 is not even part of the map lmao

#

tiles in leaflet work in a very specific and retarded way

#

so X goes 0 to 256

#

and Y goes -256 to 0

pure sierra
#

but i thought you where running pixel cords ?

barren quarry
#

Yea

#

but when you load a tile map for some reason it always loads it in boundaries of [-256,0],[0,256]

pure sierra
#

ah ok

barren quarry
#

the center is then of course -128,128

pure sierra
#

u there @long raft

long raft
#

yea, just actually working hard today kappaflyinchicken

pure sierra
#

np

long raft
#

tiles are 256x256, so the top tile layer 0 is 256x256 and thats what leaflet uses as the size...

pure sierra
#

sure

#

just trying to work out the coords in qgis

#

when i was just using the single image it was essentially pixel coords

#

but with the tiles its some massive amount extents that im not sure where comes from or how to set

long raft
#

is it just a factor of 256?

pure sierra
#

-20037508.3427892439067364,-20037508.3427892550826073 : 20037508.3427892439067364,20037508.3427892439067364

long raft
#

yah I had the same thing when i did my devbranch map ... it did line up tho...

#

oh I guess i modified each point using the extents:
var modifiedPoint = [-128 + 128 * (coordinates[1]) / 20037508.3427892439067364, 128 + 128 * (coordinates[0]) / 20037508.3427892439067364];

#

i dont even remember doing it markfootdisapproves

pure sierra
#

oh

#

@barren quarry

#

is that big extents that i got there , seems to be same as if you added up all the extents for each map

#

how the heck is that lining up ?

#

os you dont have the extents set in your tile server that is loading in qgis ?

barren quarry
#

no

#

i just have 5 folders of images

#

and thats it

pure sierra
#

maybe its not the same

#

what is the world extents ?

barren quarry
#
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```
#

these?

pure sierra
#

from the api

barren quarry
#

yeah its based on the api

pure sierra
#

appx 7 * 100,000

#

wide

pure sierra
#

Null Island is a name for the area around the point where the prime meridian and the equator cross, located in the Gulf of Guinea (Atlantic Ocean) off the west African coast. In the WGS84 datum, this is at zero degrees latitude and longitude (0Β°N 0Β°E), and is the location o...

pure sierra
#

i made a hex grid to help work on one map at a time

#

im thikning your idea @barren quarry of using github for jsons migh be best as you have commit history. i did even get a postgresql/postgis server running and connecting with qgis, and i could store and save vector layers there, and i could assign permissions per user to different tables for each map , but things could still get wrocked with no revert feature ,(apart from backups, which i do have) but i think just simplify it

pure sierra
#

so afaik it looks like you cant idet a geojson in qgis, you have to import it convert it to shape edit and then re-export

long raft
#

it can import and export geojson, but yea the vector layer is usually esri shapefile, natively

pure sierra
#

im writing up instructions now

#

i canrt seem to add a geojson to qgis from github

long raft
#

i imagine you will have to download it first

pure sierra
#

but it offers http option

pure sierra
#

itsa https problem

pure sierra
long raft
#

hayden i thought you said you turned projection off in the project settings?

pure sierra
#

i did, but then the xyz tile layer forces to come through as google crs,

#

it doesnt really matter though

#

you can likely have it off

#

so thats where the big coords systme comes from

#

its the number of meters around the world !

#

40,075,016

#

so i will have to change code to translate qgis coords to leaflet coords, as no longer using pixel cords in qgis (unless i can find some way too) plus leaflet will be in 0-256 now too if it tile mode, ideally it would be great if me could get qgis in 0-256 coord system !

long raft
#

yea the xyz layer is the wrong crs but its not used for anything otherwise

pure sierra
#

unfortunately it sets the range of cords the come out in the geojson we make

long raft
#

can just adjust it all after it's done, or post process the points

#

its much easier to deal with uniform scaling than projection

pure sierra
#

yea, coz also to save on json space as well as dropping all the decimal precision we can divide the main number down alot, to make coords not take up so much space as there like ~ 5 digits of significants we dont need

#

can i put your name down for a map @long raft

#

@barren quarry ?

long raft
#

i started working on weathered today

#

about half done but some stuff came up for me...

pure sierra
#

@silk verge

#

np, im just going to make a list in the readme

#

that can be your map

long raft
#

ok

#

uhh ill need to start over again if we are using the full map, huh?

pure sierra
#

yep

long raft
#

lol

pure sierra
#

i know

#

you could mayb process them

#

but likely just easier to start again

long raft
#

just easier to start over i think

pure sierra
#

happy to stay with that map ?

long raft
#

yea

#

i may have to go see it in person tho, some things i cant tell if theyre roads or building locations

pure sierra
#

i know

#

the map is shit now

#

may need to add suport for a off road tag too

long raft
#

i like it quite a bit but ... i dunno when i saw that one satellite view map πŸ† πŸ’¦

pure sierra
#

im going to start on marban some time, as its next to yours so we can get cross map demo first

#

where did @barren quarry move his server to ?

silk verge
#

Who the what now?

#

I just got off of work and I can't be bothered to read

pure sierra
#

np

#

tldr: will you try doing a map one day ?which one do you want ?

long raft
#

looks good

pure sierra
#

much nicer & easir when you apply a thicker line style

#

i added that tip to readme

#

ive also added the json and a preview

#

ive changed instructions to end road at border, not over it

#

so better chance of noxt map ending at same place

barren quarry
#

@pure sierra What plugin do you use for routing?

fallen dirge
#

@pure sierra is that for a Foxhole GPS?

summer bobcat
#

@fallen dirge yeah he's trying to make it like Google Maps so it can give you the fastest route to a destination

fallen dirge
#

thats fucking cool

hardy marten
#

Very cool. Where will this be when complete and ready?

pure sierra
#

he also make the leaflet routing plugin

barren quarry
#

@chilly burrow may want to help

pure sierra
#

so likely try to connect them up at some stage

#

@chilly burrow he dm me already

barren quarry
#

if you don't mind, a system like this would be very useful in our website

pure sierra
#

its for everyone

#

initially id like to deploy it on your/seth site

hardy marten
#

Very cool guys. Keep up the great work, the community appreciates it.

barren quarry
#

its probably safe to say that this channel is more supportive and friendly than most of the clans in this game lmao

marble spoke
#

question, is anyone working on / know of / is interested in, a tool to assist logistic requests and such

#

question, is anyone working on / know of / is interested in, a tool to assist logistic requests and such

pure sierra
#

@barren quarry has a website that may do what you want

marble spoke
#

is there a link for

#

is there a link for

#

is there a link for it?

#

is there a link for it?

#

is there a link for it?

pure sierra
barren quarry
#

that said, you need a group of people to work with if you want this tool to be useful

marble spoke
#

ah nice

barren quarry
#

that said, you need a group of people to work with if you want this tool to be useful

#

there is no functionality for cooperating with randoms, yet

marble spoke
#

yea, I was thinking of making a sort of request board

#

those in the war can kinda just help call out what resources are needed where

#

those in the war can kinda just help call out what resources are needed where

#

is there plans for?

#

??

#

just repeating the same thing

barren quarry
#

my discord is lagging

marble spoke
#

oh yea, I think thats happening a bit all around

pure sierra
#

mine too

marble spoke
#

tldr: was gonna make a job bored for open logi requests

#

or was thinking about it

pure sierra
#

i think the devs will be adding this sort of thing in the next update

pure sierra
barren quarry
#

fought there a couple days ago

pure sierra
#

thanks @barren quarry , there will be a bunch of these corrections that will need doing over time, i will pass this on to @LazP

exotic steppe
#

theres another spot like that near Solas Gorge

pure sierra
#

@barren quarry so where did you move your website ?

barren quarry
#

@pure sierra im still in the process of migrating

barren quarry
#

does anyone know the unix command for uploading directory with replacing files?

#

ah nevermind

#

i just had to stop the server first

royal glade
#

@pure sierra how can I help plot the roads? (If you still need it)

#

I can do a hex or two later tonight

long raft
quick shoal
#

Looks like he’s all done all the maps

#

Except for the issue with farranc at the the older terra and lux shallows

long raft
#

he has done all the maps already?!

#

he works too fast i cant keep up with hayden

royal glade
#

Welp. :\

long raft
#

i dont think hes finished them all tau, i think theres a lot left

#

i dont think it's even half done yet

#

im supposed to do one, probably gonna do that tomorrow

pure sierra
#

lazp has been doing them all (i did one) teh guy went crazy and has just about done them all himself

long raft
#

oh i see like half in there

pure sierra
#

i just updated git

#

theres 18 done

long raft
#

daaaamn

pure sierra
#

so i told lazp to stop

long raft
#

lol why?

pure sierra
#

so some other people can do some

long raft
#

there's other parts to do right? the geocoding regions?

pure sierra
#

theres no rush

long raft
#

yea ok totally fair

pure sierra
#

mainly coding

#

which ill also take any help i can get with

#

so there are 5 more sectors to be done

#

@royal glade so pick one if you want

long raft
#

wow thats great

pure sierra
#

@long raft did you still want to do a map ? i think you might have to switch

#

to one not done

long raft
#

yea i saw it was done, i dont mind not doing one

#

im rather busy at the moment

pure sierra
#

np

long raft
#

so its kind of a relief

pure sierra
#

save you for coding

long raft
#

javascript not totally my strength either

pure sierra
#

what is?

long raft
#

shotgun

#

this wouldn't be too hard i guess

pure sierra
#

πŸ˜ƒ

long raft
#

i think the geocoding part gets tricky because per liedman doesnt have a library for the geocoding, it's going to just be indexing POLYGON shapes into a database and querying on that for reverse geocode. geojson is a fine raw format but it's got to be indexed to be queryable

#

postgres, mysql, or spatialite? at least spatialite would keep it in a portable format

#

can even populate it on the client side for maximum speed that way

pure sierra
#

we'll see

#

if we need get geocoding

long raft
#

yea, it would be nice to have at least the forward lookup, to type in "salt flats" because you dont know where that is

pure sierra
#

but generally you will know where you need to go

#

unless maybe its an order from someone

long raft
#

i dont know half the map anymore

pure sierra
#

sure

long raft
#

i find node confusing

fallen dirge
#

@pure sierra how can I help

#

I aint no programer but I help in anyway I can

long raft
#

there are still missing maps on the github

#

there were 5 missing when h e posted the last image

#

any of you nodejs guys know how to import one of these javascript libraries all full of requirejs dependencies into a regular html page?

barren quarry
#

you need to use webpack

long raft
#

Ok, thanks will follow that

#

hmm thats pretty cool.

soft walrus
barren quarry
#

ΠΆΠΈΠ·Π°

pure sierra
#

@long raft browserify

barren quarry
#

or browserify, yes

long raft
#

that is also cool

pure sierra
long raft
#

how come we didnt use linestring instead of multilinestring?

pure sierra
#

qgis defaults to multi

#

couldnt change this

#

there is option to convert though

#

which must be done

long raft
#

you asked what my strength was - this is my thing hehe

#

cd Mapped; for f in `ls *.geojson`; do ogr2ogr -f "GeoJSON" -nlt LINESTRING "c-$f" "$f"; mv "c-$f" "$f"; done

#

@pure sierra I made a pull request after converting them to LINESTRING

pale mural
#

Madman

long raft
#

I'm going to merge them all together also, I'll make a different pull request with that also

#

ok there, new pull request with all LINESTRING but also a Unified.geojson file with them all merged

sharp breach
#

@pure sierra That's the craziest game of ticket to ride I've ever seen

pure sierra
#

@sharp breach ?

sharp breach
#

Just visually reminds me of that

pure sierra
#

@long raft not enough to just change word , structure is different

sharp breach
pure sierra
#

OK

long raft
#

i did not do a string replace

#

i ran them through ogr2ogr

pure sierra
#

What does that do

long raft
#

converts formats usually, but in this case LINESTRING

#

This is a better installed for GIS programs (including QGIS, Grass, gdal, etc...): http://trac.osgeo.org/osgeo4w/
You can also install the gdal packages available on Linux, etc, which includes ogr2ogr which is a conversion utility

#

it looks like the cygwin installer, i'm not sure exactly which installer that is, but it works the same

#

i also used ogrmerge.py from that package. Imagine having to manually do it 23 times markfootdisapproves

pure sierra
#

Not a big deal

#

How about scaling down the chords to 0-256 for leaflet

#

With only keeping about as much precision for half the width of a road

#

Please push any scripts you use too

long raft
#

i put the commands I used in the commit message, they were not entire scripts, just 1-liners

#

I'll see about scaling, I don't know that off the top of my head but it seems possible

#

yea I can do it

#

I was reluctant to put the scripts I used because people may not have the packages installed, and the scripts would just error

#

I can modify the readme file though

pure sierra
#

See of you can so densify every x length too

long raft
#

densify?

pure sierra
#

Vertex

long raft
#

eek nvm wrong one

pure sierra
#

Even of you don't scale, it would be enough to truncate the decimals and likely about 4 or 5 integers off the end

long raft
#

hmm might take a custom program

#

i dont see any programs in the gdal package that transforms coordinates, yea I think it would need to be something custom, I could write that in c# pretty easy

pure sierra
#

Python please

#

Nothing that needs compiling

long raft
#

lol

#

it's a task for someone else then

#

it's about 1/3 the file size of the original

#

oh doh! That's scaled to -1, 1. I did not scale it by 256

pure sierra
#

Will check it out when home again

long raft
long raft
long raft
#

god I really hate javascript. Hayden do you know how to implement this IRouter interface in the leaflet-router-plugin? I can't find his source code, I just get an empty this keyword killing everything. No idea htf people work in these untyped languages with no documentation

pure sierra
#

look at my demo ?

long raft
#

nah, I haven't seen it, but I didn't really run into any difficulty with the geojson-path-finder. Did you integrate it with the routing plugin? That's where I'm hung up

#

do you have it posted?

long raft
#

there's just not enough documentation to use this plugin, I'm afraid. or I just can't find it..

long raft
#

binding the callback seems to work. what a tricky language if you dont know all the caveats of stuff

pure sierra
#

sorry yeah i did use it in the demo

#

but there is demo on creators site

#

check the git pages branch

long raft
#

well Hayden if you know where there's an example where he implements IRouter and doesn't just use the OSM ones, I would love to see it - I can't find it and I can't get any further

long raft
#

got it working, but it just wont draw the lines, and then I was going to move on to the geocoding. I think the first thing is a JSON dictionary of town names, forts, maybe the resource nodes...

pure sierra
#

where is your demo ?

long raft
#

if I debug the javascript, it's definitely calculating all the coordinates right, I just don't know the last piece to actually draw them

pure sierra
#

so your using the router plugin, (as well as the path finder) what does it actually do for us ? @long raft

torpid storm
barren quarry
#

oh god oh fuck

#

not java

#

but at least its not asm

summer bobcat
#

me learning java: this ain't so bad
realizing that it was just the tip of the iceberg: hbeyes

long raft
#

ill take java over javascript any damned day

#

@pure sierra it was mostly about the unknown unknowns. im not sure how much work has gone into the routing plugin, but it integrates both the router and the geocoder. kind of didn't want to re-invent the wheel

#

but I have the router plugin and path finder mostly integrated, it just wont draw, I think it might have somethign to do with the Itinerary class, but I just don't know

#

maybe I need to manually draw the lines in my IRouter implementation, I just don't know because I can't find example code - and his documentation is terse

#

also, that repository/branch has the most correct unified geojson file, I had to translate all the coordinates to work with leaflet, because leaflet has no way to offset the tile layer

pure sierra
#

look at the source for his demo

#

you the the js other than bundle.js generally are the ones that get bundled into the bundle.js

barren quarry
#

i created an organization for us

#

and invited you

#

message me if you want in

#

@long raft @pure sierra and @young pilot have been invited

#

the invitations are sent via email so check those

pure sierra
#

your from australia too @young pilot had no idea ! im in NSW

#

@barren quarry i joined

young pilot
#

lol

quick shoal
#

Oh snap

barren quarry
#

the maps dont give out enlistments and day of war anymore

#

they dont give out casualties either

#

wait what

summer bobcat
#

😦

long raft
#

thanks hayden will take a look

barren quarry
#

@long raft it appears the war report data has been moved to another link

#

i informed hayden

#

i wrote a big post here but dyno removed it for "spam"

long raft
#

Eh spam?

exotic steppe
#

So thats why stats is showing lots of 0s right now

#

?

barren quarry
#

Yeah

#

He lives in eastern australia

#

so he should wake up in a few hours

pure sierra
#

im up wtf

#

lovely how we got like 0 notice

#

@keen dome

keen dome
#

@pure sierra i think some url was changed. the docs should be updated now i'll check. not sure why we forgot to give you guys notice. we'll make sure we don't do that. sorry.

pure sierra
#

particularly seems im never up for wc start/changeover due to timezone

keen dome
#

yeah... sorry that's our bad we should have given you guys notice on that.

#

docs should be udpated now let me know if you need any clarification etc

pure sierra
#

ok, i think i got it to point of working like it was before, but im in a rush and have to go to offsite work, so who knows, fingers crossed, home agaain in about 10 hours

pure sierra
#

OK , manualy rollover of WC data done, hopefully that will be the last time i have to do that and it can be automated with the latest additions in the api to differentiate between wars, conquest and resistance modes πŸ˜ƒ

swift ingot
#

@pure sierra I dont know if I'm the only one seeing this issue. I noticed that foxholestats still showing 25 civic centers needed for victory, while the actual number needed in game is shown as 20.

#

There are only 23 civic centers available, as far as I can tell

barren quarry
#

come on hayden wake up

pure sierra
#

im up

#

6:44am here

#

@barren quarry

#

@keen dome clarification plz: in the api new endpoint /war does the requiredVictoryTowns value change if a town gets nuked ? or do you take away from it value of scorched towns ? or ...

zealous sonnet
#

@pure sierra hey, requiredVictoryTowns shouldn't change in the WarAPI due to rocket blasts, but I'll double check the implementation and update the documentation accordingly

pure sierra
#

ok, also likely related i noticed, there is no etag support in this endpoint from what i can see, not that i care

zealous sonnet
#

yeah check the issue πŸ˜„

pure sierra
#

@swift ingot thanks, i had not had time to lok at now /war endpoint to get this new data, but doing it now

#

@zealous sonnet also there is war number reported by endpoint, but not in docs

zealous sonnet
#

you're right, ill add that as well

#

@pure sierra I'm going to update a few other things also. btw, the new endpoint (/war) will only ever update at most once per minute, in case you're wondering

pure sierra
#

np, i only update once per minute

pure sierra
#

@zealous sonnet you didnt add warNumber to the example return json in the readme

zealous sonnet
#

ah crap, one min

#

curse you documentation ! πŸ˜›

pure sierra
#

also no mention of it ruqired towns reduces with scorched or not,

#

assuming scorched reduces required total

zealous sonnet
#

it's there now @pure sierra

#

please let me know if anything is unclear

pure sierra
#

@zealous sonnet there is something

#

I was thinking about scorched and required.

#

And that scorched won't necessarily reduce required unless total available is reduced to required

#

As currently there are more available than required

#

So one getting scorched means there are still in this case 20 available to be required

#

So required does not need to be changed.

#

But it would be good to know if it had been coded for required to change if needed, eg if scorched is greater than surplus victory towns

zealous sonnet
#

a victory town becoming scorched reduces the required victory towns regardless of whether or not you could possibly win the war without that victory town

#

so if you need 10 towns, and there are 25, but one gets scorched, the requirement is dynamically lowered to 9

pure sierra
#

Got it

#

And the api will reduce this total required?

zealous sonnet
#

it doesn't currently. if it does in the future, we'd probably just add another field for it

#

right now you can infer all of the necessary info from that field + the map data

pure sierra
#

Yeah is fine like that

barren quarry
#

i need an advice

#

the function sends an xmlhttprequest

#

i want it to return the response

#

but here's the problem

#

but i need to return from the container function

#

oh kastow why dont you just put the return on the bottom of the outside function

#

well the xmlhttp requests are asynchronous

#

so the return in the outside function would be cast before we receive the response

#

in short, we have onload function nested inside sendRequest function, and i want to somehow cast the return in sendRequest when we have the data from onload

#

because casting return inside onload doesnt do anything for sendRequest

#

thanks stackoverflow you piece of shit

long raft
#

you can set a global variable

#

since everything in javascript is threadsafe

#

and you can just check to see if its null/undefined

#

the ugly ass singleton model >_<

#

or maybe do something fancy with async/await

barren quarry
#

yeah i just made a global variable

pure sierra
#

why you dont just use jquery ?

long raft
#

There appears to be some snapping/precision issues as some paths which are clearly shorter are avoided, also no path to tempest works for me

pure sierra
#

hey

#

i figuced there would be issues that we will hae to investigate and correct in the maps

#

cool you got it working

#

@long raft

long raft
#

yea when i zoom in i can see the breaks

pure sierra
#

cheap out sourcing ?

long raft
#

im not certain if it was no snapping enabled or if it was the post-processing that broke some of them, some work great

pure sierra
#

connectorrs ?

long raft
#

the ends of the line strings

pure sierra
#

you think just at border edges or everywhere ? di you try adjusting the grouping distance paramater ?

long raft
#

yea i think its the border edges

#

yea ive played with the precision, it might be able to be dialed in... but some of them are pretty far off

#

if the precision is too sloppy the router will cut corners across fields

pure sierra
#

well we just have to go and snap each border crossing to each other

long raft
#

im afraid so, but also it can be easy to find the errors or tricky

#

when its obvious the chosen route is way longer you can spot them quickly, then zoom in and see theyre not touching

#

ill probably move on to the geocoding tho, i want place names

barren quarry
#

so recently i noticed that the devbranch version of my website loads a bit slow

#

i was thinking for a bit until i remembered that i recently set up a bot that records all conquest events and also records war reports once a minute

#

and then the website gives the data to the user for different kinds of stats

#

so anyway

#

this is a typical event

#

there are 1636 of these

languid harness
#

what an unit

barren quarry
#

and this is a typical war report

#

recorded once a minute

#

there are 3044 of these

#

the total size of json was 7 mb

pure sierra
#

fuk

languid harness
#

ever considered condensing it to a flag bite?

pure sierra
#

just one row 7mb ?

barren quarry
#

no, all of these 3044 rows of war reports plus 1636 events is 7 mb

#

all this bullshit that this one request gives out

pure sierra
#

7mb meh

languid harness
#

just shorten all the names lol

pure sierra
#

or use ids

languid harness
#

Select "Wardens" -> Replace "W"

pure sierra
languid harness
#

idem for Colonial and Neutral, and you can cut half an MB

#

in fact, store them as 2 bits

pure sierra
barren quarry
#

@languid harness well there is a third team called None

pure sierra
#

but heres the thing that i found really slowed down my db interactions,

languid harness
#

Yeah, as I said neutral

#

hence 2 bits

#

00=none, 01=colly, 10=warden, 11=scorched

barren quarry
#

so anyway

pure sierra
#

scorched is a flag not a team

languid harness
#

Β―_(ツ)_/Β―

#

you get what I mean

barren quarry
#

i just replaced colonialcasualties, wardencasualties and totalenlistments with c,w and e

#

file size dropped from 7 mb to 3.83 mb

languid harness
barren quarry
#

the next step is replacing region names with region ids

languid harness
#

becarefull not to create too short of handles

barren quarry
#

the problem is that war report json doesnt give out region ids

pure sierra
languid harness
#

otherwise you wont remember what they were

barren quarry
#

thats what readme is for julianlol

pure sierra
#

it does give out ids

languid harness
#

or become hard to find in scripts to read

barren quarry
#

see? no region id here

pure sierra
#

its in the other endpoint

languid harness
#

I personally use the first few letters, e.g. ColCas, WarCas; keeps things compact but very readable

#

although python is generally all for readability

pure sierra
#

i had to make that after hex map update and id reassignment in api

barren quarry
#

lets ask casey to change the /maps/ endpoint

#

right now its just an array of possible endpoints

#

what it should be is a list of objects with 1) endpoints for war api 2) region ids 3) region names in the game

pure sierra
#

in an ideal world yes, but its workable the way it is so i doubt it will be a priority but ask if you want, that is what github is for

#

so is your site still slow

#

@barren quarry

barren quarry
#

oh im gonna have to wipe the database and start from scratch

pure sierra
#

is your site still slow ?

barren quarry
#

yeah it is because the changes that im making have not really applied yet

pure sierra
#

is it just doing inserts ? any selects or updates ?

barren quarry
#

ok so there are three things

#

there is a glitch project that records the events and war reports which im working on

#

then there is a copy of this project on a dedicated server provided by Nooba to me & seth

#

then there is a devbranch version of foxhole global that pulls the json data from nooba's server and feeds it to users

#

right now im making changes on the glitch project

#

and making sure it works correctly

pure sierra
#

which is the one running slow ?

barren quarry
#

the devbranch version of foxhole global is running slow

#

on the front end

#

because the user has to load all this massive data that is relayed from nooba's server

#

so it takes like 11 seconds to load the page

pure sierra
#

so your big db is on noobas, and then you have a 'global' devbranch pulling data from there

barren quarry
#

yes

pure sierra
#

the big thing for me to optimise my db selects for the user, was to make sure and selects WHERE clause utilized a primary id field if the table was a big one

#

so what i had to do was split of my records into two tables current war and all past wars, so the current war table which is always going to be relatively small can have selects not by primary id such as by time period ok, and then past wars have their start and end primary id saved ina seperate index table that i select from to then use in the query to select the selected war rows from the big daddy all past
wars table

barren quarry
#

how big is your past wars table

pure sierra
#

760,000 rows and 92mb

#

(there are 2 of these)

#

before and after warapi

barren quarry
#

thats not very much

pure sierra
#

i did optimse them recently down from around 160mb

#

and 1.6 mil rows

#

i dropped all my skirmish & devbranch data

#

and fields that where not needed anymore

barren quarry
#

i think that when you're storing data from past wars you dont really need the "none" -> under construction data

#

because nothing is really accomplished in this event

pure sierra
#

so my events table is not even that big, i didnt mention that

#

i could easily make ids for all those commonly used terms to further small my tables

#

all past war events is only 150,000 rows 13mb

#

the big thing like i said is number of rows and if you are using primary/unique ids for lookups, it can make several seconds difference in query time which really ads up when you have a lot of users

languid harness
#

Alright, I have been fighting with this issue for quite a while now, so I just better ask it here and see if one of y'all can fix it:

#

I have a Raspberry Pi Nano W, which runs on Rasbian in a lite installation. I want to connect to a Github. To do so, I followed all the steps in this tutorial: https://projects.raspberrypi.org/en/projects/getting-started-with-git/10 . However, I am unable to use git push -u origin master, which yields the error:

fatal: Could not read from remote repository

Please make sure you have the correct access rights and the repository exists.```
I find this very annoying. I have done everything I could think of to connect this fucker up, but I fail every time. The SSH-keys are never right and I have not found a way to actually log in via my RP into (one of) my account(s).
#

help

barren quarry
#

have you created a repository on your github account?

languid harness
#

yes

barren quarry
#

hm, i only have experience with github desktop

pure sierra
#

@languid harness you might need some keys installed or packages, just keep googling or stack

languid harness
#

but I am tiiiiiiireeeeeeed

pure sierra
#

go to bed, sometimes its amazing how quick you work something out after a break

languid harness
#

I have been taking breaks fro this past few weeks

#

it is not just a random problem that ocoured

#

I have been fighting with this for half a month now

pure sierra
#

have you tried pushing to repo from another pc

languid harness
#

its a windows 10, but worth a shot

pure sierra
#

@zealous sonnet !!!! Bug in api /war is reporting WC number as 34 already but 34 has not started yet !! REEEEE πŸ¦€

#

@barren quarry @keen dome

zealous sonnet
#

you don't need to ping everyone for that

pure sierra
#

thats not everyone

#

πŸ˜ƒ

zealous sonnet
#

lol

#

just open an issue on github and we'll fix it as soon as possible

pure sierra
#

my poor database 😿

zealous sonnet
#

is the war id the same as before or did that also change?

pure sierra
#

lmk

barren quarry
#

rip

pure sierra
#

its the same

zealous sonnet
#

ok i'm probably going to remove warNumber from the documentation until it's fixed

pure sierra
#

upsert

#

just fix it instead

#

see how fast you can do it, ill time you....

long raft
#

@languid harness, are you intent on using ssh to connect to git? you can just use the https address instead and get around the whole ssh key thing. I haven't done ssh for git in a while, do they want you to generate a private/public key and upload them the public key?

languid harness
#

well, they want me to do all kinds of things? The only thing I want is being able to download a .git and run that shit

#

I felt like the SSH was the right thing to do, as it actually grands access to an account to a certain extend contrary to just having a name and email adress

long raft
#

ssh is the hard way, just use the https:// link for the git repository instead, it will just prompt you for username and password, its waaaaay easier

#

and roughly as secure

#

otherwise, i would guess the piece your missing with ssh is setting git to use the private key you generate for the remote (on your side)

languid harness
#

well, I made the key on the Pi and then typed it over to the site on ym laptop. It gave errors that it was the wrong type of SSH, which I clearly made sure it wasnt several times

long raft
#

github said it was the wrong ssh type?

#

hmm i get the same thing

#

ah, so make sure you're generating an OpenSSH key, not ssh.com. It should start with ssh-rsa

young pilot
#

i had issues connecting to my github through my university servers a few months back. had to turn off 2FA

languid harness
#

@long raft it does start with ssh-rsa

#

idk anymore

#

and doing this via windows is a pain in the ass; when I download github, it doesnt give me the shell, so I cannot follow the dang tutorial reeeee

long raft
#

can you just use the https link? still not clear if you have to use it

languid harness
#

I havent, but I wouldnt know how

#

still figuring that out

long raft
#

that one is easy, just git clone https://github.com/NoUDerp/Tiler and it's done

languid harness
#

really?

#

hmmm

#

I will try later today

long raft
#

yes and when you go to push it will need your github user and password

#

and then it will remember it...

languid harness
#

lit

languid harness
#

darn

#

@long raft aaaaah! you did it!

#

now adding a script to get all the modules lol

long raft
#

yea you can even encode the username and password (not that it's a good idea...) into the https url

languid harness
#

hehehehe

#

sounds likes a lot to fuck up

#

although I must state that I have to log in every time I do a clone

#

that being said, I have it almost working

#

like really close

#

it jsut doesnt want to instal certain packages

long raft
#

What isn't installing packages?

languid harness
#

pip

#

he can isntal some

#

but not all

#

prolly a me issue tho

#

anyhow, I am free all of tomorrow because I was a too effective worker so I will be fixing it tomorrow

#

because this doesnt seem like a real issue, something I can fix either via cmd or by rewriting my script as I dont remember what half of it is used for

#

(((or used at all)))

#

thanks anyway Derp, helped me a lot

long raft
#

ah, so some of pip libraries dont include the binary for your architecture, the arm v6 i guess it is

#

some of them cant be installed, and others probably need to be compiled from source - so you will likely need to apt install build-essential, maybe any other libraries you need for compiling those packages, sometimes you just have to keep trying to push it through and solving the next missing dependency

languid harness
#

exactly

#

((on the last part))

#

dont know yet about the former

peak raven
#

Is there any way to get the "time until" next war from the API? I.e. the value you see in Home Region -> Travel Tent right now

#

or should I just hit war data endpoint every 60 secs until war id changes?

chilly burrow
#

we are getting data from maps that supposed to be offline. @zealous sonnet

#

that in theory is not an issue, but there should be an input that says they are 'offline' too. Otherwise we would have to set those regions offline manually

zealous sonnet
#

hey, please open a github issue and we'll fix it when possible

sharp breach
#

@young pilot @barren quarry @pure sierra did any of you create an issue?

#

If not I will in a few hours

barren quarry
#

i did an hour ago

sharp breach
#

nice

#

cool

pure sierra
#

im awake

languid harness
#

good day

pure sierra
#

old bug still not fixed already reported by me...

pure sierra
#

this can bee confirmed by seeing that in game lobby it still reports day 192

languid harness
#

hm, my RP has issues installing Pandas it appears; it can find and download it, but then it just stops...

#

Like, it had been running for at least 30 mins, every time to no avail

#

Gonna let it run longer this time because I have to do other stuff, but its very weird that it would give no feedback on it status unlike the other packages do

pure sierra
#

any one notice the required victory towns for this war change ? wasnt it 16 b4 ? now its 15 ...

#

or am i wrong ?

peak raven
#

it was 25 when the war started.. now it's changed ti 15 :S

languid harness
#

omg, it has been nearly 2 hours, and it has made progress lol

torpid storm
#

"Pandas relies on numpy which can take an extremely long time to build, even on a very fast desktop machine."

languid harness
#

oh god

#

I thought it may have been the heat, its like 30 degrees inside and the thing is boiling hot

#

and it is nano as well coloniallol

pure sierra
#

hi im working on a video playback of the control map to view history, it would be a link ner the current map saying like "replay map history", do you think it would be better or make more sense to have the video order play in reverse from the current situation backto the start of the war ? or say from some time in the past such as the start of war or 5 days ago forward to now ?

#

(i will be making the playback speed a bit quicker too)

torpid storm
#

How I'd view it is 'okay what has happend last 5 days and how did we end up here' then I'd see each day progress and come to the current map so I could go forward from there.

#

If it's reverse order it's like.. 'okay this is the map now, lets see..' you'd see what has happend and at end be like 'oh yeah this is how I left the map.. wait what to do now' :D

#

Woul be also nice if you could decide if you want to see 1d / 7d / 30d some hacky timestamp jump or such always have the videos at same lenght and timings so you can do it, or just make bunch of viedos :D

#

I guess we first need foxhole wars that last that long too.. one can always hope.

#

Like someone could be off on weekend and unable to play so it's nice to view during that how the map evolved

dark fiber
#

yo

pure sierra
#

yo

summer bobcat
#

yo

languid harness
#

yo

barren quarry
#

yo

long raft
#

yo

fallen dirge
#

yo

iron scarab
#

yo

mighty herald
#

yo

royal glade
#

Iterations exceeded. The recursive function has been terminated.

languid harness
#

c-c-c-combo breaker

barren quarry
storm spindle
pure sierra
#

oh stonecradle today.... 😿

cold gazelle
#

What happened

barren quarry
#

@pure sierra i met you on the bridge yesterday

pure sierra
#

really, ? you should have said hello, or ify ou didnt i didnt recognise you

barren quarry
#

i waved to you

#

i was colonial

#

and you were dying

long raft
#

typical warden dying on a bridge

barren quarry
#

i still died due to bleeding

long raft
#

but not on the bridge

pure sierra
#

you guys are like a plague

#

come join the wardens and taste the good life

royal glade
#

hayden kills warden flatbeds for fun 😦 I saw him use one on the front line.

#

The poor easily disabled yellow vehicles 😦

pure sierra
barren quarry
#

looks cool

pure sierra
#

moved the text up top to not be obstructed by the player track bar (active on new images from now)

summer bobcat
#

hey i got this thing i want y'all to check out

pure sierra
#

?

#

Abandoned ward fell 😦

long raft
pure sierra
#

nice work

#

wasnt sure if you had kept working on it or not

long raft
#

mmm javascript not a pleasant experience but im through most of the tough parts

pure sierra
#

yeah, it lacks

deft quartz
#

So er, can we have trains now?

harsh summit
#

hey guys

#

I'm working on a text videogame thing and I keep running into "I should do it this way, but oh gosh what if I need to do it some other way later"

#

in the end nothing or barely anything gets done

#

I was wondering if anyone has had encounters with such things and could offer some advice

barren quarry
#

redoing stuff you already did is called refactoring

#

its absolutely normal and is part of development process

harsh summit
#

I see

barren quarry
#

before you do it the right way you have to do it in some way first

harsh summit
#

That's true, but these thoughts still kind of, you know

#

interfere with the work process

#

That's my issue to deal with at that point though, I appreciate the insight a lot

#

Sometimes you can spend so much time on thinking "is this the right way" that you don't do it any way

#

that's what seems to be happening now

#

there's this issue I'm facing right now

#

the game needs to load from json files

#

and it does, there's a piece of code that loads json files and processes them into in-language objects

#

but what then

#

do I just hardcode lists of objects to paths where their respective JSONs reside

#

And a third thing that I find frustrating

#

"if you code a little every day, you'll develop a habit and be productive"

#

I believe the habit thing, but I don't believe the productive thing

barren quarry
#

why

harsh summit
#

why what?

summer bobcat
#

refactoring is completely normal πŸ˜„

barren quarry
#

why dont you believe the productive thing

summer bobcat
#

Happened a LOT when I did my text based story game on Java in high school

harsh summit
#

maybe I'm just lazy, but it's very difficult for me to believe hyperproductivity

#

I think to all the times where several days of productivity end up absolutely murdering anything that can be done for the next few days, for me

#

And then at day 4 or 5 I start being very critical of myself for not "keeping up the good work", and then that spirals out of control

#

just feels like an impossible thing to attain

#

constant productivity by habit

#

honestly, maybe it's a personal thing

#

maybe I just work in short bursts

summer bobcat
#

why do I feel this is going to be my life when college starts

barren quarry
#

hyperproductivity is not a thing

harsh summit
#

alright

#

though, I still want to figure out

#

how to organize loading data from config files and properly organizing it for inter-program access

barren quarry
#

put the json files into a folder

harsh summit
#

got that done, yeah

barren quarry
#

make it so it checks and parses all files in the folder

harsh summit
#

it does that

barren quarry
#

then what else do you want

harsh summit
#

but where does it put the objects created during parsing

#

how do other parts of program access it

#

do I make a big

#

array

#

associative array of them

barren quarry
#

what programming language

harsh summit
#

python

barren quarry
#

ok this is not my area of expertise

harsh summit
#

understandable, I appreciate it the help a lot anyway though

barren quarry
#

@long raft could help i think

harsh summit
#

even just by, you know

#

rubber duck programming

#

if I explain my woes here, I might accidentally get a big understanding of them

barren quarry
#

im going to explain the stuff i did with my project foxhole global, idk if you heard about it

harsh summit
#

I wouldn't mind

barren quarry
#

there is a plugin in javascript called React Redux

#

basically its a fancy way of managing global variables

harsh summit
#

alright, makes sense so far

barren quarry
#

you have a store which is a root object

#

and the properties of the store are other different objects, like user data, or map data, or events

#

then you subscribe the website elements to keep track of when these properties changes and update when they do

harsh summit
#

does anything in store or its children get new objects created or removed dynamically, at runtime

#

like, if store has an object for map data

#

and that map data object keeps track of things like, I dunno

#

cities, forts, salvage fields, mines

#

does it only track changes of these four things - cities forts salvage fields and mines

#

or is there functionality for new things to be added while the program is running

#

because this is an issue I'm having

#

do I hardcode things to be tracked

#

or do I allow for them to be changed without changing code, and if so, how

#

honestly though, after this discussion I'm starting to think that I should just make it work how it is now, and build on top of that, and redo it later if I need to

barren quarry
#

this is how i implemented this:
a user initially loads a map with towns, forts and stuff
the server sends requests to foxhole api to check if the data has been changed, every 3 seconds
suppose the data has changed, like a town has been captured
the server sees the new data and downloads it, saves it to the database and then emits an event to all online users with new map data
a store event happens which puts in the new map data
by default, the React components update when there is a new state (internal variables) or props (variables passed down to component from its parent)
but we dont want to always update the icons whenever there are changes in data because there are ~580 capturable locations and also mines and resource nodes, so we write a function that checks whether the data we pass for this icon is actually new (realistically when an event happens, only 1 icon out of 580 is changed, right?)
nobody wants to write the code for comparing all properties of an object especially when are several hundred of them, so we just turn both objects into a string and compare them as strings, if there are differences then we update

harsh summit
#

I may be wrong, but wouldn't it also make sense to bundle the thing that changed with the "recheck everything"

#

Honestly it probably would, but an implementation detail stopped it or something

barren quarry
#

but actually what i wanted to talk about more is productivity in general because this thing took me 3 months

#

if you try to commit all of your time into making this thing you will quickly burn out

#

you can afford it if your project is small enough that you can finish it in under 2 weeks

harsh summit
#

this is why I wanted to bring up this "code a little every day"

#

it just feels like such a "crush your soul at home diy project!"

#

but yeah

#

thanks a lot for this conversation

#

the insights of the fact that others do struggle with things that I struggle with are calming

long raft
#
  1. keep everything as simple as you can until you need it
  2. create a punch list of outstanding tasks
  3. drugs. illicit or caffeine
harsh summit
#

derp

barren quarry
#

yes, task lists are absolutely important

harsh summit
#

I've been told you do python

#

can you help me do python better

long raft
#

nah python probably my weakest language

barren quarry
#

well fuck

harsh summit
#

understandable

long raft
#

i basically just read it

barren quarry
#

i thought you knew python

#

someone in here does

harsh summit
#

python isn't really difficult to know though

#

that's by design

long raft
#

if i were applying for a job that needed a python programmer - sure, i know it. but between you guys and I, im like a 1-2/10

harsh summit
#

can I try to ask anyway

long raft
#

i hate interpreted languages as much as i hate anti patterns

harsh summit
#

understandable

#

here's the thing though

#

so I have config files, json

#

that define various in-game objects

#

the objects are pieces of furniture, items, rooms, and finally "buildings" which are just multiple rooms

#

I don't know of, well

#

how I'd like to access these things in code

#

and to make sure everything is extensible is neat

#

do I want dot notation with stuff like

#

data.buildings

#

do I create objects at runtime for each entry in the list so I can do stuff like

#

data.furniture.table

#

but what if I have multiple tables, they'll conflict then

#

honestly should probably settle on SOMETHING that WORKS at least in theory

#

and then write a bit of code to be able to understand such a request

#

and fetch the appropriate thing

long raft
#

{buildings:[ {type: "table", x:..., y:...}, {}, {}... ]}

#

dont be afraid to use arrays in your json i guess...

harsh summit
#

I'm a bit afraid of hardcoding object "types"

#

but I probably shouldn't be

long raft
#

well you cant avoid hardcoding everything, or else youre just building some insanely complicated json parser

harsh summit
#

if I have buildings one moment some other day program doesn't know what 'buildings' are

barren quarry
#

this may sound very retarded but i suggest using folder trees and putting each object in its own json file

long raft
#

at some point the rubber meets the road

harsh summit
#

that's very far from retarded

#

and it's quite far from what I'm doing

#

my problem is

#

having the rest of the program fetch objects

#

if it internally knows of folder structure

#

and I change it

long raft
#

i spent my teenage years making game engines for games id never finish

harsh summit
#

and I end up having to change it in hundreds of places after that

#

I'm very

#

very

#

fucked

long raft
#

dont get too tied down in the scope of an engine, having interactive program is more important than the data design

harsh summit
#

absolutely

#

though, you know

#

easier said that done

#

maybe I'm just perfectionist to the point of my own harm

long raft
#

if it were me id just hard code whatever i have in my, and then put on the punch list remove hard coding

#

its like ... spending days farming the mats for a tank only to run over a friendly mine instantly

harsh summit
#

yeah, that's true

#

it's a good point

#

to make something THAT WORKS

#

instead of something that looks great but doesn't work

long raft
#

youre more likely to stay motivated that way, in my opinion

#

if you can constantly show people demos and stuff...

harsh summit
#

I'm currently dealing with a complex system that won't work until at least 4 sub-systems are functional

#

and it's absolutely

#

killing me

long raft
#

you can fill in a lot of place holders for stuff

harsh summit
#

can I brag a bit

#

I made a program that makes layouts for furniture

#

I think it's cool

#

check it out, it's a

#

procedurally generated

#

furniture