Is it possible to make a map that moves depending on player movement?

I want to make a map (or a huge image with physical objects) that is larger than the screen of an iPhone (or any other phones) , and the map scrolls itself depending on the player movement.

Kind of like Super Mario but the map is 2D.

Is it possible? I searched all over Google but cannot find a solution for that

Any hep will be really appreciated! [import]uid: 44110 topic_id: 30078 reply_id: 330078[/import]

Yes it is possible. I have an RPG map style template for this, though also possible with more mario style stuff - ChocoRun did this. [import]uid: 52491 topic_id: 30078 reply_id: 120434[/import]

Thanks for telling me that it is possible! :slight_smile:

Can you provide any sample code?

Thanks [import]uid: 44110 topic_id: 30078 reply_id: 120440[/import]

Sample code will be great :slight_smile:
I’m interested too :stuck_out_tongue:
Olivier
[import]uid: 160159 topic_id: 30078 reply_id: 120468[/import]

Remember that textures sizes cannot exceed 2048x2048.

General way to do it -
put objects ( tiles ) in display group with coordinates to make huge map
then all you need to do is change x,y of display group to move your map. [import]uid: 41153 topic_id: 30078 reply_id: 120469[/import]

Why not? If you target your app for iPhone 4/4S or iPad you can use 4096x4096 texture :slight_smile: [import]uid: 12704 topic_id: 30078 reply_id: 120477[/import]

2048x2048 is safe for all devices supported in current stable build.

And you can exclude iPhone 4 from your list, only 4S supports that size. iPad 1 also doesn’t support it. [import]uid: 41153 topic_id: 30078 reply_id: 120481[/import]

I don’t have sample code on hand, I’ve got template I’ve cleaned up and will post in the next day or two though - if you’re following me on Twitter (@peachpellen) you will see it there.

That said, I use tiles and would encourage anyone doing this to do the same. Yes, you can use fairly sizable textures now but *why* do it unless you have to? Be smart about texture memory and will save your ass in the long run.

Delwing is spot on RE basic logic.

Peach :slight_smile: [import]uid: 52491 topic_id: 30078 reply_id: 120554[/import]

This may sound like a stupid question, but what are tiles? [import]uid: 44110 topic_id: 30078 reply_id: 120608[/import]

Fragments, chunks. Preferably same size ( or even same width as length ).
Thinks of your map as an array of tiles or chess board. [import]uid: 41153 topic_id: 30078 reply_id: 120623[/import]

Yes it is possible. I have an RPG map style template for this, though also possible with more mario style stuff - ChocoRun did this. [import]uid: 52491 topic_id: 30078 reply_id: 120434[/import]

Thanks for telling me that it is possible! :slight_smile:

Can you provide any sample code?

Thanks [import]uid: 44110 topic_id: 30078 reply_id: 120440[/import]

Sample code will be great :slight_smile:
I’m interested too :stuck_out_tongue:
Olivier
[import]uid: 160159 topic_id: 30078 reply_id: 120468[/import]

Remember that textures sizes cannot exceed 2048x2048.

General way to do it -
put objects ( tiles ) in display group with coordinates to make huge map
then all you need to do is change x,y of display group to move your map. [import]uid: 41153 topic_id: 30078 reply_id: 120469[/import]

Why not? If you target your app for iPhone 4/4S or iPad you can use 4096x4096 texture :slight_smile: [import]uid: 12704 topic_id: 30078 reply_id: 120477[/import]

2048x2048 is safe for all devices supported in current stable build.

And you can exclude iPhone 4 from your list, only 4S supports that size. iPad 1 also doesn’t support it. [import]uid: 41153 topic_id: 30078 reply_id: 120481[/import]

I don’t have sample code on hand, I’ve got template I’ve cleaned up and will post in the next day or two though - if you’re following me on Twitter (@peachpellen) you will see it there.

That said, I use tiles and would encourage anyone doing this to do the same. Yes, you can use fairly sizable textures now but *why* do it unless you have to? Be smart about texture memory and will save your ass in the long run.

Delwing is spot on RE basic logic.

Peach :slight_smile: [import]uid: 52491 topic_id: 30078 reply_id: 120554[/import]

This may sound like a stupid question, but what are tiles? [import]uid: 44110 topic_id: 30078 reply_id: 120608[/import]

Fragments, chunks. Preferably same size ( or even same width as length ).
Thinks of your map as an array of tiles or chess board. [import]uid: 41153 topic_id: 30078 reply_id: 120623[/import]

@delwing Thanks! Now I think of those as minecraft in 2D :smiley: [import]uid: 44110 topic_id: 30078 reply_id: 121519[/import]