Not logged inGosu Forums
Forum back to libgosu.org Help Search Register Login
Up Forum
Search
Topic Isometric tile map rendering problem By siondream Date 2011-11-21 00:56
It worked, thanks!
Topic Isometric tile map rendering problem By siondream Date 2011-11-21 00:09
Sorry, that was stupid of me. About the black pixels problem, it's not fixed yet...

http://i1194.photobucket.com/albums/aa368/siondream/isometric-3.png
Topic Isometric tile map rendering problem By siondream Date 2011-11-20 23:47
I have added:

Gosu::enableUndocumentedRetrofication();

Apparently the function doesn't exists, it's weird because I have #include <Gosu/Gosu.hpp> but it's not in the docs either.
Topic Isometric tile map rendering problem By siondream Date 2011-11-20 23:03
Hello everyone.

I'm creating a little isometric arcade game and I'm having problem zooming my map in/out because some weird lines appear bordering each tile. You can look at the attached pictures for details on the problem [1] [2].

Here you have my code:

Level construction:

// Load tileset
Gosu::imagesFromTiledBitmap(graphics(),  Gosu::sharedResourcePrefix() + L"data/" + Gosu::utf8ToWstring(tilesetName),  _tileWidth,  _tileHeight, true, _tiles);


Level drawing:


// Drap map
int x, y;
int offsetX = (_screenWidth - _tileWidth * _mapWidth) / 2.0f;
int offsetY = _screenHeight / 2.0f;

for (int i = 0; i < _mapHeight; ++i) {
  for(int j = _mapWidth - 1; j >= 0; --j) {
    x = offsetX + ((j * _tileWidth / 2.0f) + (i * _tileWidth / 2.0f)) * _zoom;
    y = offsetY + ((i * _tileHeight / 2.0f) - (j * _tileHeight / 2.0f)) * _zoom;
    _tiles[_map[i * _mapHeight + j]]->draw(x, y, 0, _zoom, _zoom);
  }
}


Do you know what's wrong with the rendering? I have already tried playing with the blending mode.

Thanks!

[1] http://i1194.photobucket.com/albums/aa368/siondream/isometric-1.png
[2] http://i1194.photobucket.com/albums/aa368/siondream/isometric-2.png
Topic Nyan Cat (not really a game) By siondream Date 2011-11-20 22:55
Hehehehe, a really interesting exercise!
Topic Problema con la documentacion de gosu! By siondream Date 2011-10-03 13:18
First of all, I think this is an only-English forum so maybe Spanish posts are not appropiate (I don't know for sure). Furthermore, I don't think there are that many Spanish people around so your chances of solving you problem are quite low.

Powered by mwForum 2.29.7 © 1999-2015 Markus Wichitill