These are chat archives for arenanet/api-cdi

28th
Sep 2017
woot, no crash emails
hopefully that puts the new pet skills in too
the uhh, soulbind(??) bits aren't going to be in for awhile -- haven't had any time to start adding new features yet
fuck
somethings-wrong.png
looks like tiles are back off the table boys
Archomeda
@Archomeda
Sep 28 2017 00:39
wow :(
might be an issue in the coordinate data, not sure
probably not
as you zoom in, queensdale moves north
I'm ... pretty perplexed
probably has to do with the boundaries not being divisible by 256 or something
and the old iteration did bottom-up and I'm doing bottom-down
Eearslya Sleiarion
@Eearslya
Sep 28 2017 00:45
bottom-down?
like the origin is in the bottom-left of the rect rather than top-left
I've actually confused myself
        if (view.x1 == mapSize) {
            // done with this line
            if (view.y0 == 0) {
view.x1 increases during iteration, view.y0 decreases during iteration
that's how it was done before
        m_tileX += 1;
        if (m_tileX >= bounds) {
            m_tileX = 0;
            m_tileY += 1;
        }
        if (m_tileY >= bounds) {
            m_tileY = 0;
            m_zoom += 1;
            tileSize = TileSize();
        }
that's how it's done now
the big change between the old version and the new version is the syntax highlighting
Eearslya Sleiarion
@Eearslya
Sep 28 2017 00:48
well that's important
Archomeda
@Archomeda
Sep 28 2017 01:11
port the ingame map rendering to a js library and call it a day :>
Eearslya Sleiarion
@Eearslya
Sep 28 2017 01:49
and tell the sound department to upload the mistlock sanctuary music to soundcloud
I need it
ChieftainAlex
@ChieftainAlex
Sep 28 2017 06:40
@lye - :point_up: September 28, 2017 1:10 AM a while back i had a similar tiles-in-the-wrong order issue when I fed the wrong up-down sign into gdal. At least the coordinate data looks right on the zoomed out map.
was that like a 3x3 set of tiles behind that?
image.png
ChieftainAlex
@ChieftainAlex
Sep 28 2017 06:46
presumably if you can get it working for low zoom levels (0 to 4), it won't take too long to test your tile code
yeah it was a 3x3 set of tiles
there's an off-by-one somewhere in my code
also I suspect the continent size doesn't fit cleanly in 256px tiles or something
and the remainder is being accumulated as error in a different fashion or something
or something
darthmaim
@darthmaim
Sep 28 2017 17:23
get your paint skills out and extend the map to be a power of 2 again
edit map ... select canvas size ... "65536" ... click ok
windwarrior
@windwarrior
Sep 28 2017 17:33
just put a frame around it
or you know, an image of a sea monster
I suggest Steve
smiley
@codemasher
Sep 28 2017 17:35
"THERE BE DRAGONS"
oh, spoiler xD
what's the dragon in the new expac
i haven't played the story
it makes more sense to put that one there
smiley
@codemasher
Sep 28 2017 17:47
heh
Eearslya Sleiarion
@Eearslya
Sep 28 2017 17:47
is there a dragon? I didn't even think there was one
smiley
@codemasher
Sep 28 2017 17:48
wasn't gw2 all about dragons?
the logo has a purple dragon
i'm assuming it's kralkatorric but i don't want to presume
darthmaim
@darthmaim
Sep 28 2017 17:49
there are a few dragons actually
smiley
@codemasher
Sep 28 2017 17:49
ah right kralwhatever :D
Eearslya Sleiarion
@Eearslya
Sep 28 2017 17:49
I haven't touched anything but the raptor instance
because I'm starting the story from HoT
I forgot a lot
lol
like for the first time or
Eearslya Sleiarion
@Eearslya
Sep 28 2017 17:50
well
I have finished HoT once
darthmaim
@darthmaim
Sep 28 2017 17:50
I just beat the eater of souls...
such a stupid fight
Eearslya Sleiarion
@Eearslya
Sep 28 2017 17:50
but I never finished LS3 chapters 3,4,5,6.
darthmaim
@darthmaim
Sep 28 2017 17:50
all the other story missions are super easy
smiley
@codemasher
Sep 28 2017 17:50
btw. has anyone ever managed to spell "Kralkatorrik" right? :D
darthmaim
@darthmaim
Sep 28 2017 17:51
"purple elder dragon"
ez
Eearslya Sleiarion
@Eearslya
Sep 28 2017 17:51
kralky
smiley
@codemasher
Sep 28 2017 17:51
#gww spawned so many variations
Eearslya Sleiarion
@Eearslya
Sep 28 2017 17:51
the glint-killer
I mean it's spelled like it sounds, so
smiley
@codemasher
Sep 28 2017 17:52
like how americans write the date? day first?
Eearslya Sleiarion
@Eearslya
Sep 28 2017 17:52
americans don't write the date day first
that's exactly what we don't do
smiley
@codemasher
Sep 28 2017 17:52
you know it was irony :D
haha
Archomeda
@Archomeda
Sep 28 2017 17:55
i don't think writing kralkatorrik is hard, i agree with lye here
I write year/month/day and the rest of the country can go stuff themselves
Archomeda
@Archomeda
Sep 28 2017 17:56
but, that might be because for me it's also written exactly as it sounds
/shrug
Quaggan BooOOoot
@QuagganBooOOoot
Sep 28 2017 17:56
¯\_(ツ)_/¯
day/month/year is just as bad as month/day/year
neither collates well
smiley
@codemasher
Sep 28 2017 17:56
(i should've been more clear: like how you say a date)
savage
coffee hasn't kicked in yet
smiley
@codemasher
Sep 28 2017 17:56
dang there was that brilliant tweet about it and i won't ever find it again
Archomeda
@Archomeda
Sep 28 2017 17:57
btw i just noticed that there's a new achievement for the new ecto gambling
the same as tarrktun
-_-
Edgar Doiron
@Coffee4cr
Sep 28 2017 17:57
do you think it's only programmers that use yyyy/mm/dd
?
also do you use / or -
smiley
@codemasher
Sep 28 2017 17:58
it's more about things like "9/11" which is actually 11/9 :P
darthmaim
@darthmaim
Sep 28 2017 17:58
always -, never /
smiley
@codemasher
Sep 28 2017 17:59
heh
darthmaim
@darthmaim
Sep 28 2017 17:59
can't really use / in file names
Edgar Doiron
@Coffee4cr
Sep 28 2017 17:59
right
I use - too
Archomeda
@Archomeda
Sep 28 2017 17:59
haha
always - for dutch dates whenever i'm typing it
but, i'm using both - and / when writing on paper, it depends what my mood is
writing / on paper is actually easier than -, because of the way you move your hand and fingers
for me at least
smiley
@codemasher
Sep 28 2017 18:04
image.png
easy way to confuse americans :D
windwarrior
@windwarrior
Sep 28 2017 18:05
I write Y/D/Y/D/M/YY/M, sue me
and yes, its kralk
smiley
@codemasher
Sep 28 2017 18:08
Kralk*
2/2/0/8/0/17/9 I dig it
windwarrior
@windwarrior
Sep 28 2017 18:12
I mean, we can debate whether DD/MM/YYYY, or MM/DD/YYYY or YYYY/MM/DD is the right way, we can also just all use a date format that we all agree is completely dumb and wrong
Eearslya Sleiarion
@Eearslya
Sep 28 2017 18:19
strftime('%C%y-%m-%d-%H:%M:%S.%3N%z')
"2017-09-28-11:22:14.375-0700"
Edgar Doiron
@Coffee4cr
Sep 28 2017 18:22
no
:door: :point_left:
Eearslya Sleiarion
@Eearslya
Sep 28 2017 18:23
fight me
I spent like 5 minutes looking up the format for that XD
Edgar Doiron
@Coffee4cr
Sep 28 2017 18:23
lol
when you have to do that, it just proves you don't use it
:P
Eearslya Sleiarion
@Eearslya
Sep 28 2017 18:23
I've never had to format dates in ruby
I just compare them
shawngmc
@shawngmc
Sep 28 2017 20:12
Ah, delicious YYYY-MM-DD... the only problem is that once you switch to it, you have this irrational hatred for everyone that doesn't use it.
ChieftainAlex
@ChieftainAlex
Sep 28 2017 20:14
my current employer made me get new references signed when their dates were like that >.>
smiley
@codemasher
Sep 28 2017 20:14
i like how i can spawn a debate about date formats just my making a dumb ironic comment :D
ChieftainAlex
@ChieftainAlex
Sep 28 2017 20:24
Untitled.jpg
@lye - still thinking about your tile code; is it separate code to choose where to save the file versus which bit to cut?
Eearslya Sleiarion
@Eearslya
Sep 28 2017 20:27
@ChieftainAlex But..Isn't the whole map's dimensions 49152x49152?
darthmaim
@darthmaim
Sep 28 2017 20:27
yes, thats the old map he posted
Eearslya Sleiarion
@Eearslya
Sep 28 2017 20:27
Oh, derp
Should've known by the brand
darthmaim
@darthmaim
Sep 28 2017 20:28
took me a minute too
ChieftainAlex
@ChieftainAlex
Sep 28 2017 20:28
lazy me
Eearslya Sleiarion
@Eearslya
Sep 28 2017 20:28
didn't realize it's divisible by 16384 though
hmm
ChieftainAlex
@ChieftainAlex
Sep 28 2017 20:28
isn't it?
Eearslya Sleiarion
@Eearslya
Sep 28 2017 20:29
it is, I just didn't recognize 49152 as a valid multiple
ChieftainAlex
@ChieftainAlex
Sep 28 2017 20:29
easy solution.. get anet to add another expansion to the right and below
Eearslya Sleiarion
@Eearslya
Sep 28 2017 20:29
makes me feel better about the new dimensions
darthmaim
@darthmaim
Sep 28 2017 20:33
there is not much to the south east, just ocean
maybe cantha to the south
but that would probably only double the height and not the width
ChieftainAlex
@ChieftainAlex
Sep 28 2017 20:36
given the Y index seems to have been perfectly inverted i'm thinking there's another counter/setting lye needs to invert
it seems to be coping with the 3 tiles instead of power of 2 at least
Eearslya Sleiarion
@Eearslya
Sep 28 2017 20:37
@darthmaim underwater expansion, duh
we need to go see Steve
@ChieftainAlex the y-axis inversion was easy enough to fix
now each zoom level is offset by some fixed amount from the previous/next zoom level
and I can't figure out why
zooming.png
zooming2.png
second image is just a bigger picture from the first's right
to better demonstrate how zooming in changes the y-offset by some magical factor for reasons I don't understand
Archomeda
@Archomeda
Sep 28 2017 21:05
to even better demonstrate: make a gif :)
meh cbf'd
the most zoomed in matches the thing
so that's a start I guess
Archomeda
@Archomeda
Sep 28 2017 21:06
so it's just the y-axis?
oh
                    m_tileSize /= 2;
                    m_zoom += 1;
                    view.x0 = 0;
                    view.x1 = m_tileSize;
                    view.y0 = mapSize - m_tileSize;
                    view.y1 = mapSize;
                    m_tileX = 0;
                    m_tileY = 0;
well found it I guess
Archomeda
@Archomeda
Sep 28 2017 21:06
forgot to invert it there?
nope that's the old code
this is the new code for changing between zoom levels
    view.x0 = static_cast<float>(m_tileX * tileSize);
    view.x1 = view.x0 + tileSize;
    view.y0 = static_cast<float>(mapSize - (m_tileY + 1) * tileSize);
    view.y1 = view.y0 + tileSize;
(less "changing between zoom levels" and more "computing the current viewport")
i guess that doesn't illustrate the bug
Archomeda
@Archomeda
Sep 28 2017 21:08
i'm indeed confused :D
actually crap so am I
the view.y0 = mapSize - m_tileSize is almost certainly the issue
but I changed that in my version
Archomeda
@Archomeda
Sep 28 2017 21:09
(0,0) is bottom left right?
like that should be the same between them
view.y0 = static_cast<float>(mapSize - (m_tileY + 1) * tileSize);
@Archomeda at this point I literally have no idea
Archomeda
@Archomeda
Sep 28 2017 21:10
i'm not really a good helper :/

old:

// init
m_tileSize = mapSize;
// step
m_tileSize /= 2;

new:

unsigned CMapMaker::TileSize () const {
    return static_cast<unsigned>(pow(2, MAX_ZOOM - m_zoom)) * BASE_TILE_SIZE;
}
that's got to be the difference
the new code counts up from BASE_TILE_SIZE, the old code counts down from mapSize to BASE_TILE_SIZE
(which is why it broke -- mapSize isn't a power-of-two anymore so it keeps going down less than BASE_TILE_SIZE)
I don't know why this causes the renderer to ... offset tiles weirdly
Archomeda
@Archomeda
Sep 28 2017 21:19
eh.... yeah, that's odd
I'm just going to change the old code to check m_tileSize <= BASE_TILE_SIZE rather than m_tileSize == BASE_TILE_SIZE
I'm not gonna figure this out
it's probably something stupid
smiley
@codemasher
Sep 28 2017 21:28
i wish i could help
I wish they had kept with powers of two for the maps
I really hope this does the trick
since the highest zoom with my new stuff had correct data ... I'm pretty sure this won't work
smiley
@codemasher
Sep 28 2017 21:29
so what exactly is your problem? (or how is the code supposed to work?)
i have a meeting
smiley
@codemasher
Sep 28 2017 21:29
heh
meetings, really, for like the rest of the day
otherwise I'd explain it
smiley
@codemasher
Sep 28 2017 21:29
gimme a hint so i can think a bit about it
got a good three hours of work in today phew
smiley
@codemasher
Sep 28 2017 21:36
image.png
oh
seems someone likes qr codes
old code adjusted doesn't have the zoom y-offset problem
but it also doesn't match continent data
smiley
@codemasher
Sep 28 2017 22:18
i'm trying to figure out how the code is supposed to work to see why there's a problem with the not-power-of-2
does it work like a tile getter in gmaps or leaflet?
like
function project($point, $zoom, $max_zoom){
    $div = 1 << ($max_zoom-$zoom);
    return [$point[0]/$div, $point[1]/$div];
}
smiley
@codemasher
Sep 28 2017 22:24
    for($y = 0; $y < (1 << $zoom); $y++){
        for($x = 0; $x < (1 << $zoom); $x++){
            if($x >= floor($nw[0]/256) && $x < ceil($se[0]/256) && $y >= floor($nw[1]/256) && $y < ceil($se[1]/256)){ // adjust limits
                // -> valid tile
            }
        }
    }
you're stepping up from 256...512...1024
the old code steps down from 1024...512...256
smiley
@codemasher
Sep 28 2017 22:29
from any point on the map
yea
this breaks down when the final value isn't a power of two
since in the first you're still stepping up from 256...512...1024 but the old bit is doing 1000...500...250
smiley
@codemasher
Sep 28 2017 22:30
i don't see a reason for stepping down?
was there a specific one?
it was written before i worked here by people i've never met
so no idea
smiley
@codemasher
Sep 28 2017 22:31
heh, ok