#How to render a screen of isometric tiles

14 messages · Page 1 of 1 (latest)

supple marsh
#

Can someone help me render a screen full of isometric tiles? No matter what formula I come up with, I can either make a screen full of tiles that are not clickable OR have clickable tiles that don't fill the screen. I'm also having trouble getting through all the crap filling google now.

#

I've tried clint Bellanger and javidx9's tutorials, and while they get me most the way there, is the full screen aspect that's breaking me

polar sleet
#

Maybe you can show us what you so far?

supple marsh
#

If i was smart I would have pushed to github. I'll check back in tomorrow morning

muted junco
#

I have some conversion code written out. Just make sure to do your calculations on 2d and display it on 3d(isometric).


Vector2f to3D(float x, float y) 
{
    float tileWidth = 120.0f;
    float tileHeight = 60.0f;
    return Vector2f((x - y) * (tileWidth / 2), (x + y) * (tileHeight / 2));
}




Vector2f to2DGrid(float isoX, float isoY)//restricted to grid 
{
    float tileWidth = 120.0f;
    float tileHeight = 60.0f;
    float x = (isoX / (tileWidth / 2) + isoY / (tileHeight / 2)) / 2;
    float y = (isoY / (tileHeight / 2) - isoX / (tileWidth / 2)) / 2;
    x = x-1;
    return Vector2f(static_cast<int>(round(x)), static_cast<int>(round(y)));
}


Vector2f to2D(float isoX, float isoY)//Not restricted to grid 
{
    float tileWidth = 120.0f;
    float tileHeight = 60.0f;
    float x = (isoX / (tileWidth / 2) + isoY / (tileHeight / 2)) / 2;
    float y = (isoY / (tileHeight / 2) - isoX / (tileWidth / 2)) / 2;
    return Vector2f(x, y);
}

supple marsh
#

I'll try again when I get time though

muted junco
supple marsh
supple marsh
#

PS: found staggered technique and this may be what I needed

fossil finchBOT
#

@supple marsh has reached level 5. GG!

lyric estuary
#

With matrix