Framework for Left to right style game (like Mario Bros)

Is there a template or starter application for a left to right style game (like a mario bros style).

If not then a good sample on how to move the camera and scroll the screen would get me started.

Thanks,
Phil. [import]uid: 63894 topic_id: 11209 reply_id: 311209[/import]

look at this it will help
[lua]local physics = require “physics”
physics.start()

local localGroup = display.newGroup()

local bottom = display.newRect(0,768,1024,5)
local bottom1 = display.newRect(0,768,1024,5)
bottom1.x = bottom.x + bottom1.width
localGroup:insert(bottom)
localGroup:insert(bottom1)
physics.addBody(bottom,“static”)
physics.addBody(bottom1,“static”)

local bg = display.newImage(“bg.png”)
localGroup:insert(bg)

local bg1 = display.newImage(“bg.png”)
bg1.x = bg.x + bg1.width
localGroup:insert(bg1)

local hero = display.newCircle(0,0,15)
hero.x = 50
hero.y = 450
localGroup:insert(hero)
physics.addBody(hero,{density =1})

local function manageScreen()
localGroup.x = 50 - hero.x --as 50 is initial pos of hero
end
Runtime:addEventListener(“enterFrame”,manageScreen)
hero:applyForce(150,0,hero.x,hero.y)[/lua]
Note :- plz chk it with config setting of 1024*768 in other it might not work
:slight_smile: [import]uid: 12482 topic_id: 11209 reply_id: 40650[/import]

I recommend Lime (http://www.justaddli.me/).

It was this 3rd party tool that got me developing quickly and confidently. There are even some great tutorials detailing exactly what your after.

http://www.justaddli.me/tutorial.php?t=0&id=12

Hope this helps you get going. [import]uid: 29676 topic_id: 11209 reply_id: 40651[/import]

Ya, Lime is great. I bought it and within 45 minutes I went through tutorials and made a simple platform game with joystick and character, he can jump on platforms and move side to side etc etc.

Basically, you can create a level really quick, I’m talking a few minutes here. You can add objects which will allow you to add “invisible” boundaries - for example on a platform, you don’t want your character to just go through it you want him to jump on it and not fall through. Same thing with the ground, etc.
That’s enough on that, go buy it - it’s worth it.

You’ll need TILED as well, it’s free. The author Graham, is really great and offers great support. He’s helped me with some silly issues I was having :slight_smile:

-Nick [import]uid: 61600 topic_id: 11209 reply_id: 40763[/import]

I am massively against Lime. It is the author’s decision to cash-in on the SDK inadequacies while they exist, that’s his choice. However, I think it’s terrible that people paying several hundred dollars for an SDK have to spend yet more money to gain access to such a fundamental mobile game design feature - particularly for side-scrolling use.

The fact that the SDK developers are seemingly supporting the author with his performance problems concerns me; it suggests they have no intention to provide such functionality within the SDK at a later date. The performance problems themself are also a major issue: how can someone develop a ‘missing’ feature implementation and sell it at such a high price only for it to not function in a usable way? It’s deplorable in my eyes.

I am currently looking for the best way to implement physics-supporting sidescrolling in games, and when I come up with a solution I will be posting in the forums so others can benefit and not have to spend yet more of their money. Hopefully the grouping method demo’d at the beginning of this thread is a suitable method - I’m about to experiment and find out! Thanks go to hgvyas123 for his contribution. :slight_smile: [import]uid: 80739 topic_id: 11209 reply_id: 48687[/import]

hubdave, I’m not sure you understand what Lime is, based on this statement:

“…I think it’s terrible that people paying several hundred dollars for an SDK have to spend yet more money to gain access to such a fundamental mobile game design feature…”

Tile-based scrolling isn’t something like displaying graphics or playing audio – it’s not something that’s typically built in to a programming language/framework. Lime is “just” a bunch of code that you can buy (or not) to shorten your development time.

Nobody has to buy Lime in order to do tile-based scrolling – you can write the code yourself using Corona. That’s what Graham did, after all.

Just because Lime isn’t suitable for every tile-based case doesn’t mean it sucks – it means it’s not suitable for every case. But for the cases where it *IS* suitable it’s well worth the money in order to save coding time.

Jay
[import]uid: 9440 topic_id: 11209 reply_id: 48735[/import]

I’m being a little harsh on the Lime author, really it’s you as developers I’m criticising - I say this objectively, not aggressively.

I stand by my point. As a game framework, I would hope and expect to see this feature built-in. I can reel off a list of other iOS/Android frameworks, all free, which provide tilemap support out of the box: sparrow-framework, cocos2d, andengine, the list goes on. To see a feature so commonly available in free game frameworks which isn’t provided by an SDK costing as much as yours is more than a little surprising for a seasoned developer like me.

Don’t get me wrong, what you guys have created is incredible in its time-saving and easy-to-use nature, and I absolutely applaud and thank you for your efforts. But flattery aside, I’ll be disappointed if you don’t add support for tilemaps in the near future. [import]uid: 80739 topic_id: 11209 reply_id: 48772[/import]

Just to make sure the record is straight, I don’t work for Ansca Mobile in any official or unofficial capacity. I’m an indie developer who paid cash money for my copy of Corona SDK.

As a “seasoned developer” myself (going on three decades) I don’t find the lack of a tile library to be surprising. Especially considering the age of Corona SDK.

For every specialized feature put in, more people will say, “I don’t care about that” than will hop up and down with joy. I believe that eventually Ansca Mobile will get around to adding everything important to Corona SDK (although your definition of important and my definition are probably different than everybody else’s).

With finite resources at hand I think Ansca has done a pretty good job at adding features that most people will be able to take advantage of right out of the box.

Jay
[import]uid: 9440 topic_id: 11209 reply_id: 48776[/import]

Ah, I’ve not been around the forums long and thought you were a Corona project manager as the auto-logo suggests! Whoops.

What you’ve said there is fair, and I agree. To clarify my own reasoning: it seems logical that the small screen of most mobile devices makes tiling a feature which should be prioritised. Given its use for isometric/top-down game views or side-scrollers it seems like a feature which would be widely used and appreciated, which makes it valuable. I feel it greatly enhances a developer’s creative freedom.

I’m not saying this simply to suit my own ends, my current project is a one-screen game. And undoubtedly you’re correct in saying the feature will be added at some point, it just concerns me how distant that point in time might be. [import]uid: 80739 topic_id: 11209 reply_id: 48779[/import]

No problem, I can see how that would be confusing – Corona Project Manager is a 3rd-party tool for Corona SDK developers.

Which means I provide something that others have said, “Ansca should be giving us that!” – so I was probably a bit quicker to jump to Lime’s defense than someone else might have been.

I realize it also makes my viewpoint appear biased – but when I created CPM it was under the assumption that at some point Ansca would produce an IDE and I’d have to come up with some other way to pay the bills.

I don’t have any doubts about Corona SDK becoming a *leader* in the mobile app development space. If something is missing in Corona SDK that’s needed, I believe Ansca Mobile will fix the problem sooner or later.

Jay

PS - As developers using the tool, we all want it to be sooner, of course! :slight_smile:

PPS -Yeah, I have drunk the koolaid and am a Corona fanboi.
[import]uid: 9440 topic_id: 11209 reply_id: 48890[/import]