itch.io is community of indie game creators and players

Devlogs

[Leapy] Lilypad object and first movement

Leapy
A browser game made in HTML5

I made a fast diagram to ilustrate how the lilypad movements will works:

The lilypad has a movement attribute and based on which one is added to the object is the movement behavior that takes place.

Lilypad class:

On update it just calls movementLogic and that script takes cares of the movement.

The base Movement script does nothing (serves as "no movement") but is the base to extend other behaviours.

Base:

Horizontal movement (it's a hardcoded script to test):

So, having this, to change the movement of a lilypad i just have to drop a diferent movement script to the object.

This is how it works

Download Leapy
Leave a comment