MichaelSinsbeck / platformer

A ninja platformer written in LÖVE
7 stars 0 forks source link

Enable special moves in editor #196

Closed michalove closed 10 years ago

michalove commented 10 years ago

Can we add an option to select special moves in the level editor?

By that I mean a window with checkboxes for the moves, such as "wall jump", "parachute" etc. In the main game, the available moves will be determined by the game progress, but in user-made levels, authors should be able to select which moves are available in their level.

I made some images for icons for the special moves, see folder raw/rawimages/editor/specialmoves.svg

Germanunkol commented 10 years ago

The UI is already pretty bloated. So I'd say we could put it either in the player's properties panel or instead allow the user to place bandanas on the same tile as the player - that way the player instantly picks them up when the level starts. The latter would require the least code changes.

Either way, I think we should still allow the users to place bandanas in their custom levels, for players to pick up... so placing bandanas onto the same tile as the player image might be the most intuitive...?

michalove commented 10 years ago

Good idea to still allow bandana-times in the level. I didn't think of this.

I'd personally prefer the option to add properties to the player instead of putting the bandana item on the player tile. (We have to restructure some part of the code then, because currently the player is not spawned with the same code as all the other objects. But that will not be complicated to adapt, I guess). I will check it.

Germanunkol commented 10 years ago

I don't really understand why something needs to be refractured - can't the player have properties the way it's coded now?

When you've checked/fixed that, I'll implement it in the player's properties panel.

michalove commented 10 years ago

Fixed. The reason why I had to change some lines is that originally the player object was recycled between each level. Instead of generating a new player object, the old one was reset to the default values and then added to the spriteEngine again. I removed this part. Now the player is added like all the other objects.

I also shortly tested if properties work now. They do. Just uncomment the three lines in the top declaration of the player object to test (allows to change the jumping height).

Germanunkol commented 10 years ago

I think this is done? Seems to work fine.

michalove commented 10 years ago

Yes, it works. I will need to implement the mechanism to control the abilities in the campaign, but this is a different issue.