Java-Gaming.org Hi !
Featured games (83)
games approved by the League of Dukes
Games in Showcase (523)
Games in Android Showcase (127)
games submitted by our members
Games in WIP (591)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  [LibGDX] Artefact visualizzation Tiled level  (Read 923 times)
0 Members and 1 Guest are viewing this topic.
Offline grevius
« Posted 2013-08-01 14:17:06 »

Hi, today I have another problem XD i have a tmx file with the level that i load in my game, i can load it and visualize it correctly, but when i move the player, sometimes compare a space between cell, and i see the background color! What can be the problem? I have noticed that using number as 00,00 with only 2 decimal i can see the space not so often. it can be possible that zooming in a tmx level there are some error in visualizzation of cell?
I have absolutely to resolve this problem or i can't continue the game because it's horrible to see tha lines Sad
this is the code that i use to load my level :
1  
2  
3  
// Imposto il livello
map = new TmxMapLoader().load("data/"+Headinator_class.info.zona+"/"+Headinator_class.info.zona+".tmx");
renderer = new OrthogonalTiledMapRenderer(map, 1/(game.unit_xy));

and this is the code i use to render :
1  
2  
3  
renderer.setView(camera);
drawCielo();
renderer.render();


where renderer is an OrthogonalTiledMapRenderer.
Offline sirkarpfen

Junior Devvie


Medals: 2
Exp: 2 years



« Reply #1 - Posted 2013-08-01 14:21:50 »

Maybe you could post the Code where you load your map? Also doublecheck your tilesize in tiled^^. this usually happens when you paint tiles that don't fit the tilegrid in tiled (omg so many tiles! Cheesy). Allways be sure that your tileset has no transparent edges and is equally split up Smiley.
Offline grevius
« Reply #2 - Posted 2013-08-01 16:01:45 »

yes my image are all equal and not have tranparent edges, i have checked it XD
this is the code that i use to load my level :
1  
2  
3  
// Imposto il livello
map = new TmxMapLoader().load("data/"+Headinator_class.info.zona+"/"+Headinator_class.info.zona+".tmx");
renderer = new OrthogonalTiledMapRenderer(map, 1/(game.unit_xy));

and this is the code i use to render :
1  
2  
3  
renderer.setView(camera);
drawCielo();
renderer.render();


where renderer is an OrthogonalTiledMapRenderer.
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline sirkarpfen

Junior Devvie


Medals: 2
Exp: 2 years



« Reply #3 - Posted 2013-08-01 16:44:08 »

Have you tried using another unitScale?

1  
renderer = new OrthogonalTiledMapRenderer(map, 1);


Maybe this does the trick Smiley.
Offline grevius
« Reply #4 - Posted 2013-08-06 14:38:57 »

Have you tried using another unitScale?

1  
renderer = new OrthogonalTiledMapRenderer(map, 1);


Maybe this does the trick Smiley.

i can't use your example because i have a camera with 7x6 viewport dimension, and 1 unit is calculated as 64 pixel, so i have to scale it to 1/64px, do you think my dimensions are too small and the render is artefacted by this?
Offline sirkarpfen

Junior Devvie


Medals: 2
Exp: 2 years



« Reply #5 - Posted 2013-08-07 05:51:35 »

Well after some testing i wasn't able to reprodruce your problem... Maybe you could post a screenshot on how it looks when this problem occurs. Other than that you could post a little bit more code (e.g. the rendering process and how you initialise your camera-viewport).
Offline Otreum

Junior Devvie


Medals: 6



« Reply #6 - Posted 2013-08-14 07:20:27 »

The issue he is referring to is the same as the very beginning of this video, and 7 seconds in:
<a href="http://www.youtube.com/v/XoAxThXeN8I?version=3&amp;hl=en_US&amp;start=" target="_blank">http://www.youtube.com/v/XoAxThXeN8I?version=3&amp;hl=en_US&amp;start=</a>

It's difficult to see in the video, but when running the game, it can often flicker up with the lines in between tiles.

From what I've read here and there, it is called texture bleeding, I haven't yet applied any fixes, but if, like me, you packed your textures with the texturePacker gui and didn't pad your textures, then bleeding can occur easily. For some people, this doesn't fix things up though, and this article seems to explain why:

http://jfix.by/category/gamedev/libgdx/
Pages: [1]
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

Gibbo3771 (3 views)
2014-11-24 19:59:16

trollwarrior1 (35 views)
2014-11-22 12:13:56

xFryIx (73 views)
2014-11-13 12:34:49

digdugdiggy (52 views)
2014-11-12 21:11:50

digdugdiggy (46 views)
2014-11-12 21:10:15

digdugdiggy (40 views)
2014-11-12 21:09:33

kovacsa (66 views)
2014-11-07 19:57:14

TehJavaDev (70 views)
2014-11-03 22:04:50

BurntPizza (68 views)
2014-11-03 18:54:52

moogie (83 views)
2014-11-03 06:22:04
Understanding relations between setOrigin, setScale and setPosition in libGdx
by mbabuskov
2014-10-09 22:35:00

Definite guide to supporting multiple device resolutions on Android (2014)
by mbabuskov
2014-10-02 22:36:02

List of Learning Resources
by Longor1996
2014-08-16 10:40:00

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27

Resources for WIP games
by CogWheelz
2014-08-01 16:20:17

Resources for WIP games
by CogWheelz
2014-08-01 16:19:50

List of Learning Resources
by SilverTiger
2014-07-31 16:29:50

List of Learning Resources
by SilverTiger
2014-07-31 16:26:06
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!