These are chat archives for pixijs/pixi.js

28th
Jan 2016
Ivan Popelyshev
@ivanpopelyshev
Jan 28 2016 11:52
every ile can be rendered as tthree triangles, right?
tile = 4 triangles
height of center of tile is needed too
Micheal Winger
@mordof
Jan 28 2016 13:22
i didn't do it that way
well, kind of i guess?
Ivan Popelyshev
@ivanpopelyshev
Jan 28 2016 13:22
you didnt apply textures yet
Micheal Winger
@mordof
Jan 28 2016 13:22
each tile stores their base height - and then each point has an offset of that
yeah, those are generated textures
Ivan Popelyshev
@ivanpopelyshev
Jan 28 2016 13:23
you cant apply texture to a quad
that is not a parallelogramm
Micheal Winger
@mordof
Jan 28 2016 13:23
those are textures*
Ivan Popelyshev
@ivanpopelyshev
Jan 28 2016 13:24
but you can split that quad into 4 triangles, adding a vertex in the center of tile (surprise! that's our odd vertices : (i+j)%2==1 )
Micheal Winger
@mordof
Jan 28 2016 13:24
it's just a texture, it's not rendering points
Ivan Popelyshev
@ivanpopelyshev
Jan 28 2016 13:24
or even
right, its even vertices (i+j)%2==0 :)
Micheal Winger
@mordof
Jan 28 2016 13:24
ah. i just ignored the zeros
Ivan Popelyshev
@ivanpopelyshev
Jan 28 2016 13:24
centers of tiles
Micheal Winger
@mordof
Jan 28 2016 13:24
lol
they aren't even worked with at all
Ivan Popelyshev
@ivanpopelyshev
Jan 28 2016 13:24
yeah, you had heights in odd and now you have to store them in evens too
its kind of diamond-square system
Micheal Winger
@mordof
Jan 28 2016 13:25
i don't have the heights in both
Ivan Popelyshev
@ivanpopelyshev
Jan 28 2016 13:25
there are randomize algorithms for these kinds of grids, they are even better than Perlin noice
Micheal Winger
@mordof
Jan 28 2016 13:28
yeah.. mine definitely wouldn't work with that, lol
Micheal Winger
@mordof
Jan 28 2016 13:34
@ivanpopelyshev not only do i not have any worth while 3d programming experience - this is my first time getting this far in actual map creation and working with it. i'm not surprised there's better ways to do it :)
i am curious to see how this goes though with making a game on what i have. i'm not doing per-tile movement so i think that'll make things easier on me at least
anyway gotta run.
Ivan Popelyshev
@ivanpopelyshev
Jan 28 2016 14:00
your movement must be (x,y,z) , where real screen position is : x' = x, y' = y - z;
its the easiest way. Z is the height and its subtracted from Y
and its only isometry, not 3d :)
Ivan Popelyshev
@ivanpopelyshev
Jan 28 2016 14:17
Ivan Popelyshev
@ivanpopelyshev
Jan 28 2016 19:55
Dave Moore
@themoonrat
Jan 28 2016 21:29
I will soon too :)
Animations should play nicely flipped too?
Ivan Popelyshev
@ivanpopelyshev
Jan 28 2016 21:39
I suppose
its hack in the textures
hm, i dont know, i tested only sprites
may be movvieclips wotn work on canvas, im going to check it
movieClip will work just fine! :)))
Ivan Popelyshev
@ivanpopelyshev
Jan 28 2016 21:48
the only problem is with rotation: you have to swap frame.width<->frame.height . But in v4 its solved :)