move game map?

Hi

I’m new to corona and trying to make my first game.
So far I’ve managed to test my code and all seems to fall into place except one thing…

My game will have a huge map/play ground that will not be able fit on a
normal phone/ipad device. How can I allow the user to scroll through the
game map to see different parts of if and also zoom in and out.

Cheers
T.

One of the ways (that i know of) is to make a group where you insert the floor and according to the character movement/animation you make the floor group move on the X axis.
For the scale you should check up this doc:

http://docs.coronalabs.com/api/type/DisplayObject/scale.html

I created some scrolling examples to demonstrate some of the features in Level Director so you might want to check them out and adapt them to your needs;

http://forums.coronalabs.com/topic/44280-level-director-examples/

Thanks

@retrofitProductions

Looking at some of the demos and it looks likes what I need…

Q: With the “level director”, how does this scale? If I have a huge map will that cause problems for mobile devices (like memory/cpu) ?

I don’t want the game to be slow just because it’s a hugh map…

Cheers

T

Hi,

It depends on how huge your map will be and also how you design it.

Providing you use spritesheets then your texture memory will not increase regardless of map size.

If your images are small e.g. 16x16 then you could encounter system memory problems due to the number you need to add to populate a level and would probably be better to use a tile based system with culling.

Although LD does not currently support culling it does have other tricks like the ability to wrap/repeat layers and the layers can be different sizes.

So as you scroll the background and clouds for example they could wrap over 2 screens whereas the foreground layer could be over 20 screens.

Also with LD because it does not rely on uniform tiles, the background could be 1 object and the clouds 2 objects whereas in a tile based system they would be probably be made up from many display objects pieced together.

There are pros and cons to both so it does depend on the type of game.

One of the ways (that i know of) is to make a group where you insert the floor and according to the character movement/animation you make the floor group move on the X axis.
For the scale you should check up this doc:

http://docs.coronalabs.com/api/type/DisplayObject/scale.html

I created some scrolling examples to demonstrate some of the features in Level Director so you might want to check them out and adapt them to your needs;

http://forums.coronalabs.com/topic/44280-level-director-examples/

Thanks

@retrofitProductions

Looking at some of the demos and it looks likes what I need…

Q: With the “level director”, how does this scale? If I have a huge map will that cause problems for mobile devices (like memory/cpu) ?

I don’t want the game to be slow just because it’s a hugh map…

Cheers

T

Hi,

It depends on how huge your map will be and also how you design it.

Providing you use spritesheets then your texture memory will not increase regardless of map size.

If your images are small e.g. 16x16 then you could encounter system memory problems due to the number you need to add to populate a level and would probably be better to use a tile based system with culling.

Although LD does not currently support culling it does have other tricks like the ability to wrap/repeat layers and the layers can be different sizes.

So as you scroll the background and clouds for example they could wrap over 2 screens whereas the foreground layer could be over 20 screens.

Also with LD because it does not rely on uniform tiles, the background could be 1 object and the clouds 2 objects whereas in a tile based system they would be probably be made up from many display objects pieced together.

There are pros and cons to both so it does depend on the type of game.