Sign in to follow this  

Infinite runner with tilemap island

Recommended Posts



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 :





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

Share this post

Link to post
Share on other sites

I did try this a few months ago, while prototyping a game that ended up using static level maps (


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.

Share this post

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.