Jump to content

Infinite runner with tilemap island


cub
 Share

Recommended Posts

Hi,

 

I'm trying to do an infinite runner with random islands. Island should be a tilemap generated dynamically. The character have to jump over and over island to survive. All exemples I saw with tilemap is a static map limited world. I want to use tilemap to skin it easily and access to which tile character collide (for special event). I tryed to put some velocity to tilemap/tilelayer or change to x/scrollx, like a kinectic body, but it fails.

 

Sorry if my explanation isn't very good.. I made a draw to be more cleary :

 

concept.png

 

 

So is there a way to do something like this directly with Phaser ?

Link to comment
Share on other sites

I did try this a few months ago, while prototyping a game that ended up using static level maps (http://game.ray-ban.com/).

 

We initially wanted an endless runner style game too.

 

I tried a couple of ideas, using several tilemaps and adding them on as the last one reached the screen edge, but that didn't work as scrollX values applied to both.

 

I kind of got something working by having one tilemap that I never directly rendered. It had 20 variants that I intended to paste together in a tilemap that I did render. Each variant was as many tiles as filled two screens in length.

 

I would copy a section on to the rendered tilemap wait for the game to have scrolled a screen in distance and then copy again and reset the scrolling of the rendered tilemap. 

 

I found that there was some noticeable stuttering when I did the copy task. This was still in Phaser 1 so may have improved since or may have been some issues with the code as it was a prototype.

 

I think for endless runners sprites and some pooling would probably be easier to work with.

Link to comment
Share on other sites

  • 11 months later...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...