Page 1 of 1

Pixel Resolution

Posted: Fri Apr 05, 2013 5:22 pm
by TwoDMayhem
For you 2d gamers, what pixel resolution are you using? I'm considering two different ones (tiles @ 16x16, collisions @ 8x8):
  • • 320 x 240 (20x15)
    • 320 x 200 (20x12.5)
Interesting poll on the topic (forgive the link to another forum): https://love2d.org/forums/viewtopic.php?t=8873&p=54821

Re: Pixel Resolution

Posted: Sat Apr 06, 2013 5:21 am
by Jackolantern
What platform are you referring to? PC gaming or something more mobile? :)

Re: Pixel Resolution

Posted: Sat Apr 06, 2013 1:45 pm
by hallsofvallhalla
it depends on the canvas size. 8x8 is large array for a 400 x 400. 2500 indexes.

If you are doing a top down RPG then your view size might be 400 x 400 but your map size is going to be something like 2000x2000 which is an array of 62,000.

Not saying it cant be done just be careful about memory.

Re: Pixel Resolution

Posted: Mon Apr 08, 2013 2:41 pm
by TwoDMayhem
Jackolantern wrote:What platform are you referring to? PC gaming or something more mobile? :)
It should be available through tablet and small for mobile using Impact (I'm assuming).

Re: Pixel Resolution

Posted: Mon Apr 08, 2013 2:43 pm
by TwoDMayhem
hallsofvallhalla wrote:it depends on the canvas size. 8x8 is large array for a 400 x 400. 2500 indexes.

If you are doing a top down RPG then your view size might be 400 x 400 but your map size is going to be something like 2000x2000 which is an array of 62,000.

Not saying it cant be done just be careful about memory.
Would there be a design pattern that could help curtail the memory issue? For example, creating a plethora of smaller maps that link together via transitions to create a larger map area.

Re: Pixel Resolution

Posted: Mon Apr 08, 2013 7:13 pm
by hallsofvallhalla
Using ajax would definitely shrink it or using Nodejs. Currently I have not run into too many problems with maps of that size. I think I have seen 20,0000x20,0000

Re: Pixel Resolution

Posted: Tue Apr 09, 2013 12:06 am
by Jackolantern
Yeah, AJAX (or WebSockets if you need them super fast) is the way that "infinite loading" is handled. It is how Google Maps and similar sites are handled, where you can zoom right in on the street view and then keep scrolling across the entire country if you were so patient. A map of that size obviously cannot be represented on any client machine in the country, but they use some clever loading logic on the client to always try to keep fresh images up. Of course, you are able to scroll very fast on Google Maps, much faster than a character should be able to walk in an RPG, so you definitely can see the "seams" of the Google Maps whereas in a game, if done right you would not be able to.

Re: Pixel Resolution

Posted: Tue Apr 09, 2013 1:33 am
by TwoDMayhem
Jackolantern wrote:Yeah, AJAX (or WebSockets if you need them super fast) is the way that "infinite loading" is handled. It is how Google Maps and similar sites are handled, where you can zoom right in on the street view and then keep scrolling across the entire country if you were so patient. A map of that size obviously cannot be represented on any client machine in the country, but they use some clever loading logic on the client to always try to keep fresh images up. Of course, you are able to scroll very fast on Google Maps, much faster than a character should be able to walk in an RPG, so you definitely can see the "seams" of the Google Maps whereas in a game, if done right you would not be able to.
Sounds like exactly what I would want to have. Is this something anyone has implemented before?

Re: Pixel Resolution

Posted: Tue Apr 09, 2013 1:57 am
by Jackolantern
Not that I am aware of. Of course, due to the complexity of getting it just right (and "just right" is going to vary a lot game-to-game), you will likely want to try just pre-loading the whole map first, and see how it goes. You really have to have a huge map before you would start to slow down people's computers or have huge load times (refer to Hall's post above), and if you are hand-crafting each and every map, it would take a long, long time to create enough maps to require AJAX map loading. So there is a good chance you won't need incremental AJAX map loading, but if you did, it is an option. It will just take a lot of tinkering to ensure you aren't loading way more than you need (which would put unneeded stress on the server) or way too little (which would begin to show "seams", or tiles with a placeholder that have not downloaded yet).

Re: Pixel Resolution

Posted: Tue Apr 09, 2013 2:13 am
by hallsofvallhalla
I think one of my tutorials covers this. If not I guess I can throw something together soon.