Moai is the mobile platform for pro game developers, with an open source SDK and cloud-based game services for rapid development of iOS and Android titles, all built in the industry standard Lua scripting language.

Latest Media

No images, videos or audio files have been added to this gallery. Join now to share media with the community.

Blog RSS Feed Report abuse Latest News: Nectar - From Simple Concept to Complex Creation

About Don't Be Patchman with 1 comment by NaturallyIntelligent on Jan 19th, 2015

Here is another plant you can find and grow in the game. We call it the "Nectar" plant, because when Patchman eats it he gets to spit out the nectar.

To have this plant work, we need these art assets:
- An animated, sprouting brown seed
- An animated, growing green stem
- An animated, budding yellow flower
- Five individual petals
- One stamens (flower center)
- A full flower icon (for inventory)
Finally, from these assets we need four sprite sheets:
- Animated stem sheet
- Animated flower sheet
- Animated seed sheet
- Various petal parts sheet

That's just for the plant!

It covers the use case of growing, holding, eating, and throwing the flower. We still need the spit for Patchman to shoot out, a dripping equip effect to show the user Patchman is ready with the nectar, and the resulting impact globs for when they hit a surface, one for the floor and three for the walls. All of which are animated. So we have even MORE sprite sheets:
- Drip sheet
- Spit sheet
- Puddle sheet
- Glob sheets

Finally we had to make more art assets for Patchman:
- Animated body poses
- Animated facial expressions

Of course this doesn't include all the prior work put into making apples and oranges, we built on that, reused and modified that code and assets - such as the inventory system, holding and throwing UI, watering+hoeing, etc.

lua code:
----- NECTAR ----------------------------------------------------
function nectar:new()
function nectar:init(x, y, pot)
function nectar:step()
function nectar:wipe()
function nectar:harm(amount)
function nectar:degrade(picked)
function nectar:set_priority(priority)
function Nectar_ColorAnimation(prop, rgb_override)
----- FLOWER ----------------------------------------------------
function flower:new()
function flower:init(x, y, rgb_override)
function flower:build_physics(x, y)
function flower:step()
function flower:rotate(increase)
function flower:wipe()
function flower:hide()
function flower:show()
function flower:scale(sx,sy)
function flower:set_priority(priority)
----- PETAL -----------------------------------------------------
function petal:new()
function petal:init(x, y, do_xoff, do_shadow)
function petal:step()
function petal:wipe()
----- SPIT ------------------------------------------------------
function spit:new()
function spit:init(x, y, orientation, height)
function spit:build_physics(x, y, z)
function spit:remove_physics(offx, offy)
function spit:drip(priority, height)
function spit:splat(ground)
function spit:glob()
function spit:step()
function spit:wipe()
function spit:rotate(angle)
function spit:scale(sx,sy)
function Spit_Collision(phase, fix_a, fix_b, arbiter)

Of course this code leaves out all of the inherited abstract Plant logic. All of the spit,glob,and puddle cases were consolidated into the "spit" class and put into states, to cut down on the number of classes. Every new class has to be managed by the engine so it can be a hassle to have more.

Development Video: Crashy Bugs!

It took over two weeks to develop this. It's not just the development time taken to create this. Now it's the time to write this article, dig up and sort materials such as screenshots and code and clips, edit a video together, publish it, etc.

We still aren't done because Ihor Motuz has new replacement art to fix the fuzzy petals. You'd think it would be as easy as drag-and-drop, but it isn't... every pixel has to match up. It might not be as hard to update the art as it was to initially build the plant, but it still takes up half a day. A bunch of the art here is programmer art, and the plant was a chopped up drawing by Karly MacDonald, who never knew a crazy coder would do this to it. So... it's not finished, but it's functional!

Again, this sunflower-looking plant is fairly realistic - until you get to the spitting part. But from here on out the plants start to get more bizarre and fantastic...

Don't Be Patchman

Don't Be Patchman Don't Be Patchman

Updated 3 days ago TBD Single Player Stealth

Don't Be Patchman is a sneak-and-grow adventure featuring realtime isometric action! But... who is Patchman and why shouldn't you be him?

Stunt Zone

Stunt Zone Stunt Zone

Updated 6 days ago Released Jan 22, 2015 Single Player Racing

Stunt Zone is addictive and challenging physics based trial motorbike racing game like no other with 20 free levels to play. Features: • 20 unlocked levels...

Lost in paradise

Lost in paradise Lost in paradise

Updated 3 months ago Released Nov 22, 2013 Single Player Point and Click

Immerse yourself in a lost paradise, with a deep mystery hiding beyond it's pristine shores. As a crew member of a suddenly and mysteriously capsized...

Mutant Gangland

Mutant Gangland Mutant Gangland

Updated 3 months ago Released Jan 27, 2014 Single & Multiplayer Turn Based Strategy

Mutant Gangland is a fast, neat and simple turn-based-strategy game where mutants fight robots . Build units, Conquer buildings and use them to Fund your...


Onwords Onwords

Updated 4 months ago Released Nov 1, 2013 Single Player Family

Play this fast paced word game on your mobile device. Combining the play style of Boggle and Bejeweled the player is provided with a challenging game...

Post comment Comments
BacioiuC Apr 2 2014, 5:30am says:

I wholeheartedly recommend MOAI for development, especially for smaller studios. The cost of using it is extremely small (0$), the community support is incredible and as a engine it's extremely flexible and easy to understand.

+2 votes     reply to comment
lancer611 Oct 31 2012, 10:51am says:

Definitely an engine worth considering if you want to develop mobile games. If you don't know lua, dont let that discourage you - it is fairly easy to pick up and has lots of documentation.

+3 votes     reply to comment
Post a Comment
click to sign in

You are not logged in, your comment will be anonymous unless you join the community today (totally free - or sign in with your social account on the right) which we encourage all contributors to do.

2000 characters limit; HTML formatting and smileys are not supported - text only

Windows, Mac, Linux, iPhone, iPad, Android
Zipline Games
Send Message
Official Page
Release Date
Released Jul 1, 2011
Engine Watch
Track this engine
Community Rating



4 votes submitted.

You Say


Ratings closed.

Embed Buttons

Promote Moai on your homepage or blog by selecting a button and using the embed code provided (more).

Moai Moai
82 of 690
Last Update
6 days ago
4 members