BeebeGames Class - Download

*Requires Corona Build 243 at the very least.

Download it here: BeebeGamesClass.zip

This is my BeebeGames Class, which provides a lot of useful functions for games. It started out as my way of creating display objects as quickly as possible.

Simple, Pauseable Animation

For those who use movieclips, this should be a breathe of fresh air because animation can be easily started, stopped, paused/resumed, and you can set the interval between frames. If you just need an object with multiple images (or just one), this can also provide that.

Basic Transition Pausing/Resuming

Also, it provides a basic form of linear transitions (modify the x, y, xScale, yScale values) which can be PAUSED and RESUMED easily by simply setting the .isActive variable to true/false.

Useful Game-Related Functions

Each object you create with the BeebeGames class will provide you a few new methods you're not used to having access to, such as:

1
2
3
4
5
object:move( x, y )    --> move object relative to current location
object:moveTowards( x, y [, increment ])    --> move towards specific point; default increment is 1 (pixel)
object:getAngleTo( x, y )    --> Get angle from object to specified location
object:getDistanceTo( x, y )    --> returns distance (in pixels) from object to specified location
object:destroy()    --> removes event listener, calls removeSelf, and then garbage collects

Once again, many thanks!!! You are very gracious!

I have been converting my game to use your class and I have been running into an issue when it comes to adding physics bodies.

When using physics.setDrawMode( "hybrid" ), objects that have been created using your newObject method dont have a physics body around them. This relates to my issue in this topic: https://developer.anscamobile.com/forum/2010/12/26/collision-detection-issue

Any input on why it might be an issue?

Thanks for an awesome class!

-Kyle

Hi Kyle, I replied to that thread. Hopefully you get everything working soon :-)

P.S. Merry Christmas everyone! (still 3 and a half hours left until it's over where I'm at)

Hi. the download link doesn't seem to work anymore.

Is there a different link for this?

Cheers

Chris Long

Here's the page with updated download link, latest version info, tutorials, etc:

http://developer.anscamobile.com/code/beebegames-class

How would I go about creating an object with the newObject function that has just a color, not an image?

NayGames: Currently no support for vector shapes, newObject() is a semi-replacement for display.newImageRect() and movieclip.newAnim()

views:1338 update:2011/9/19 13:40:57
corona forums © 2003-2011