PDA

View Full Version : Scalable Maps/Levels



savage
07-02-2006, 12:45 PM
I was chatting to FNX last night about MIDlet development and it became clear that in order to accomodate the different screen sizes that one might encounter, what is required a is a scalable map/level format and algorithm.

Call me lazy, but I really don't fancy compiling different versions of the same application to accomodate different screen resolutions. I want a one size scales to all. Come on we are programmer for crying out loud, how hard can it be ( famous last words ).

My current test project, Blitz Bomber, should scale width wise to a maxium of 32x8 columns and the height is fixed at 29x8, also all levels are randomly generated. This works fine for a simple game like BB, but for something more complex or story driven, you really want to be able to have fixed levels, which scale to the mobile gamer's phone. An SVG for maps and levels if you will. Of course this is fairly meaningless if you allow the map to be scrollable, but sometimes you want all the information for a particular level on one screen.

Anyone written one already? My initial thought is to create my level with the smallest 2D array I can live with, then based on the that, scale the location of enemies and objects/objstacles accordingly dependent on the gamer's resolution.

Anyone? Anyone? Bueller, Bueller?

cairnswm
07-02-2006, 01:24 PM
I am working on an update of my magic potions game where two different tile sets are included. Based on the phone size we will select the required tiles for the game. This way it will look as though the game adjusts to the players screen size properly.

Currently my games are planned to support 128x128 or 176x176 screens.

FNX
07-02-2006, 01:34 PM
I am working on an update of my magic potions game where two different tile sets are included. Based on the phone size we will select the required tiles for the game. This way it will look as though the game adjusts to the players screen size properly.

Currently my games are planned to support 128x128 or 176x176 screens.

Actually it's the solution i was thinking about too, adding all the gfx to
one package and load it depending on the GetWidth-GetHeight functions..

But, this solution is limited because you have to use very small gfx
images to keep the jar size small enough to work on every phone.

About the scalable level editor i think it depends on games, it is surely
great for tiled games, where you can build a screen by tiles keeping
the right proportions on levels..

I'm not going to lose time on it anyway, i'll code every game
platform oriented (eg: Nokia 40 serie) ;) As you can see i'm lazyer than
savage :P

cairnswm
07-02-2006, 02:00 PM
If you let your world resize based on the screen size how do the players compare their scores against one another?

I'd suggest just modifying the spacing between the tiles or changeing the edges of the screen to ensure that all phones have an equivilent scoring system.

LP
07-02-2006, 06:27 PM
Call me lazy, but I really don't fancy compiling different versions of the same application to accomodate different screen resolutions. I want a one size scales to all. Come on we are programmer for crying out loud, how hard can it be ( famous last words ).

By using some scaling scheme you can ease the development but it can also make the gameplay more difficult. I would use the same example of Warlords II, which was ported from PC (640x480) to PocketPC (320x240). Since the game relied heavily on user interface, by making very small buttons (so they can fit the small screen) the game became much more difficult and less comfortable to play.