Making Side Scrolling games

Is it possible to make a side scrolling game without Lime if so how and is it easy or hard to do it without Lime?

Also with lime can you make a game thats like doodle jump?

If so how I it would be cool to know

:slight_smile: [import]uid: 17058 topic_id: 19640 reply_id: 319640[/import]

it is possible, and not so hard as you can think, look up parallax examples on code sharing [import]uid: 16142 topic_id: 19640 reply_id: 75890[/import]

@Darkconsoles so would this would on lets say spawning random objects when going sideways [import]uid: 17058 topic_id: 19640 reply_id: 75891[/import]

It’s really not hard to do without Lime (although it may be easier with Lime).

  1. Create tiles (32x32, 48x48 or whatever size tiles you want for your game.
  2. Create your level(s) using those tiles
  3. Put all of the tiles in a sprite sheet (TexturePacker is great for this).
  4. Load tile image data so you can do newSprite() as needed.
  5. Load level data (just (level width)*(level height) tiles)
  6. For each tile in the level create a sprite using your sprite sheet and position it at the appropriate x,y (see note below to optimize this)
  7. Create player sprite and position it in the level
  8. As player moves to left/right edge, start scrolling tiles by changing their X,Y (see note below to optimize this)

NOTE: If you add each tile to a group with the appropriate X,Y, then when it comes time to scroll the tiles left/right/up/down you can just change the group.x, group.y values to offset all of the tiles. Assuming your player can move independently in a “center” region without causing the level to scroll, then you want to make sure the sprite for the player is NOT part of the level group.

Obviously this is a very high level overview of how to do it, but it can be done along these lines. Also, if you want foreground/background tiles, you can create separate “planes” for each layer; just put the tile sprites in their own groups so you can move different layers at different rates which gives you parallax scrolling.

Hope that helps. [import]uid: 16734 topic_id: 19640 reply_id: 75910[/import]

@KenRogoway wait so what you described to me was how to use if I had Lime or this is how to do it without Lime [import]uid: 17058 topic_id: 19640 reply_id: 75918[/import]

@KenRogoway it is what I was asking for is just looked similar in my view like Lime. In the description looks complicated in someways to do. Um does this scrolling need images sprite or can I just create in rect like so. [import]uid: 17058 topic_id: 19640 reply_id: 75923[/import]

This is how you would do it without Lime, which is what I thought you had asked for.

From what I have read about Lime (and Tiled) they would help you deal with steps 1-6, maybe more.

Generally you’ll find that tools like Lime are well worth the price since they provide a lot of the grunt work for you.

However, I thought (perhaps incorrectly) that you wanted to understand how to do it on your own. [import]uid: 16734 topic_id: 19640 reply_id: 75922[/import]

It can be somewhat complicated, which is why you might want to consider using Lime so it does a lot of the work for you.

You can create rectangles and other shapes if you want using newRect() etc. I thought you wanted graphic tiles, which would require using newSprite().

Since I’ve written a number of side-scrollers in the past (non-mobile platforms) I thought I’d share the basic concepts. [import]uid: 16734 topic_id: 19640 reply_id: 75924[/import]

@KenRogoway since you written side scroller (non - mobile platforms) can you please check this forum that I made that is
call

I’m wondering what is the best way to have platforms move

that’s the name of the forum. It shows an example of a moving platform. If you don’t mind to check and see the plug and play code to see if that correct or any modification that can be made [import]uid: 17058 topic_id: 19640 reply_id: 75926[/import]