Help Patchman rescue the Sheeple from enslavement by the Drone army!

Post news Report RSS Nectar - From Simple Concept to Complex Creation

Another plant in our game. Grow it, water it, harvest it, throw it, eat it, and spit it out!

Posted by on

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.

-----------------------------------------------------------------
----- 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...

Comments
danidre14
danidre14

Wow, cool animations and update!

Reply Good karma Bad karma+2 votes
Post a comment
Sign in or join with:

Only registered members can share their thoughts. So come on! Join the community today (totally free - or sign in with your social account on the right) and join in the conversation.

Follow Report Profile
Icon
Don't Be Patchman
Platforms
Windows, Mac, Linux, Mobile, iOS, Android
Engine
Moai
Contact
Send Message
Release date
Game watch
Follow
Purchase
News
Browse
News
New
Post news
Report
Report
Share
Related Games
Related Engines
Moai
Moai MIT