Hey, Today I took some time to have coding fun and based on [1] I did the code for a simplistic clone of [2]. It has around 600 lines of C plus 615 of edje (just rectangles so far), and is an endless game play as it constructs the levels on the fly based on some constraints.
It handles touch screen or keyboard controls and shows a simple status (level, elapsed time and score). The game is super simple, with 2 actions: jump and slide. The goal is to avoid obstacles and get as many coins as possible. Be aware that you have regular coins, extra bonus coins and fake coins that will subtract you points. You die when you hit an obstacle or when you run out of points due fake coins. The coins and obstacles are dynamically created based on EDJ: tile/<type>/<name> (type = regular/jump/slide) and coin/<type>/<name> (type = regular/extra/fake). You can add as many different entries as you wish, it will help the game play be more interesting. At this lines-of-code count it do serve as a good tutorial, but it would be better to have some graphics to make it more interesting. I'll do it later tomorrow if nobody send me any fancy drawings before it. Later extension points could be: - sounds (libcanbera is a nice way to get them) - save highest scores - double jump with stuff that needs it (coins or bigger obstacles) - segment the type of coins and obstacles, adding a level prefix to them and thus allowing new stuff for new levels - send elapsed time + level to background so we can change time of the day (nigh/day) and even weather (winter,summer), making it more fun. Anyone interested in turning this into a tutorial, wiki or something like that? [1] http://trac.enlightenment.org/e/wiki/KISS-DemosAndGames [2] http://itunes.apple.com/br/app/dash-dash-pengy-ex/id375723113?mt=8 -- Gustavo Sverzut Barbieri http://profusion.mobi embedded systems -------------------------------------- MSN: barbi...@gmail.com Skype: gsbarbieri Mobile: +55 (19) 9225-2202 ------------------------------------------------------------------------------ Start uncovering the many advantages of virtual appliances and start using them to simplify application deployment and accelerate your shift to cloud computing. http://p.sf.net/sfu/novell-sfdev2dev _______________________________________________ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel