Java-Gaming.org    
Featured games (81)
games approved by the League of Dukes
Games in Showcase (480)
Games in Android Showcase (110)
games submitted by our members
Games in WIP (546)
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  
  About Resolution x Android x Desktop x Not show Black Empty spaces ( Tiles)  (Read 422 times)
0 Members and 1 Guest are viewing this topic.
Offline Andre Lopes
« Posted 2013-09-02 15:24:28 »

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 Tongue YAY!!!

Thanks Dermet Fan Tongue aka Robin
Offline namrog84

JGO Ninja


Medals: 46
Projects: 4


Keep programming!


« Reply #1 - Posted 2013-09-02 18:16:14 »

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)


"Experience is what you get when you did not get what you wanted"
Offline Andre Lopes
« Reply #2 - Posted 2013-09-02 18:23:59 »

  @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?
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline Gjallar

JGO Coder


Medals: 13
Projects: 1


Follower of Nurgle


« Reply #3 - Posted 2013-09-02 18:36:41 »

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!
Offline Andre Lopes
« Reply #4 - Posted 2013-09-02 18:48:13 »

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 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: Tongue
[15:46:03] André Lopes: lol
[15:46:05] André Lopes: get it ?
[15:46:07] André Lopes: Cheesy
[15:47:06] Robin : well 1 billion x 1 billion is probably too much for android Cheesy 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: Tongue
[15:49:12] Robin S: 504000 pixels Cheesy
[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 Cheesy


Anything i should be aware of when developing for android as well?
Offline namrog84

JGO Ninja


Medals: 46
Projects: 4


Keep programming!


« Reply #5 - Posted 2013-09-02 18:53:21 »

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.



"Experience is what you get when you did not get what you wanted"
Offline Andre Lopes
« Reply #6 - Posted 2013-09-02 18:57:24 »

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 Huh // 16 is tile Width and tile Height
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.

atombrot (23 views)
2014-08-19 09:29:53

Tekkerue (22 views)
2014-08-16 06:45:27

Tekkerue (21 views)
2014-08-16 06:22:17

Tekkerue (12 views)
2014-08-16 06:20:21

Tekkerue (19 views)
2014-08-16 06:12:11

Rayexar (57 views)
2014-08-11 02:49:23

BurntPizza (37 views)
2014-08-09 21:09:32

BurntPizza (29 views)
2014-08-08 02:01:56

Norakomi (36 views)
2014-08-06 19:49:38

BurntPizza (66 views)
2014-08-03 02:57:17
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

List of Learning Resources
by SilverTiger
2014-07-31 11:54:12

HotSpot Options
by dleskov
2014-07-08 01:59:08
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!