About Resolution x Android x Desktop x Not show Black Empty spaces ( Tiles)

Heya Guys!

I have some questions concerning resolutions.
Im using libgdx.
Im using Tiled.

Anyway, i have several questions about developing for android/desktop.

Right now, im using a resolution of 800x600.

First,
If i maximize the screen, black parts of the screen will show up, because theres no tiles there.So i was wondering… How can i maximize the screen and only make the tiles bigger instead of showing more ? Get it?

Two, whats the default/correct resolution to atend to those two ? Desktop/android

Three, Whats the max Heap memory of JVM should i be using? I did some profile in Netbeans and it showed the max of 40mb i think.Can i post the profile here so someone can give me some tips?

I think thats it! I will thank so much for whoever can help me with this! its my first big project and well, the framework is all ready, all i need now is some tips :stuck_out_tongue: YAY!!!

Thanks Dermet Fan :stuck_out_tongue: aka Robin

I think you are doing something that is stopping this from happening.
When I maximize my 800x600 libgdx tiled game. Everything gets ‘bigger’ . Exactly how it seems you want it too.

Did you maybe add some stuff to your resize() methods? That could be resizing based upon resolution?(or modifying the camera)

@Override
public void resize(int width, int height) {
camera.position.set(player.getX(), player.getY(), 0f);
camera.viewportWidth = width;
camera.viewportHeight = height;
camera.update();

    bottomLeftTable.invalidate();
    bottomLeftTable.validate();
    bottomLeftTable.layout();
}

Is that Right?

You are setting your viewport to the width and height of the window, which is not what you want. You want the resolution to stay as it is. Just remove those 2 lines and you should be good!

Roger Roger!!!

Will do that!

Also, let me ask you dear lord, i was discussing this with Robin and hm, just confirming,
Im kinda lazy so i will just paste this, since robin allowed me to :stuck_out_tongue:

[quote][15:44:05] Robin S: what do you mean?
[15:45:45] André Lopes: i mean
[15:45:54] André Lopes: if i make a map 1 billion pixels x 1 billion pixels
[15:45:58] André Lopes: my desktop may run it
[15:46:02] André Lopes: but would an android run
[15:46:03] André Lopes: :stuck_out_tongue:
[15:46:03] André Lopes: lol
[15:46:05] André Lopes: get it ?
[15:46:07] André Lopes: :smiley:
[15:47:06] Robin : well 1 billion x 1 billion is probably too much for android :smiley: how big do you want to make the map?
[15:47:33] André Lopes: unsure
[15:47:36] André Lopes: the level one now is
[15:47:38] André Lopes: let me check
[15:48:13] André Lopes: (450 x 70) * 16
[15:48:21] André Lopes: :stuck_out_tongue:
[15:49:12] Robin S: 504000 pixels :smiley:
[15:50:09] Robin S: I’m not sure, but maybe the the size of the map doesn’t matter because it only matters how much you show on the screen at a given time
so you could make your map 575473545*73732535 tiles :smiley:
[/quote]
Anything i should be aware of when developing for android as well?

If you want to have that large of a map, you’d likely need to do it in chunks and load only the parts that you’d want/need

nothing too much you need to be aware of. Post Processing stuff can sometimes be a big performance hit on android. And at some point you might need to use object pools, instead of relying on android’s garbage collection.

But most of those are bridges to cross when you run into an issue.

Just have fun and have at it.

What about (450 x 70) * 16 ??? // 16 is tile Width and tile Height