cub Posted May 29, 2014 Share Posted May 29, 2014 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 : So is there a way to do something like this directly with Phaser ? Link to comment Share on other sites More sharing options...
brejep Posted May 30, 2014 Share Posted May 30, 2014 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 More sharing options...
cub Posted May 30, 2014 Author Share Posted May 30, 2014 Thank you for your feedback. I'm going to do a sprite (couple of tiles @atlas) and a concave polygon with P2.js for each islands. It reminds me Flash/Box2D Link to comment Share on other sites More sharing options...
luckylooke Posted May 30, 2015 Share Posted May 30, 2015 @cub have you been successful with your implementation? Could you share a fiddle? Thanks Link to comment Share on other sites More sharing options...
Recommended Posts