itch.io is community of indie game creators and players

Devlogs

Rotating Sword... Wone Grong :S

The Alchemist
A downloadable game for Windows, macOS, and Linux

Warning: a bit of PyGame knowledge is desirable to read this post, but not mandatory.

Ok, I'm adding a new feature where you can kill the mobs when collecting the potions using a sword.

To do so I'm using a pygame's built-in function called "rotate" to create the illusion of brandishing the alchemist's sword.

The code for this is real simple, the sprites listen to the space bar being hit and set a flag "brandishing" to true... on the other hand.. into the update method if "brandishing" is True, I rotate the sword 1 degree clockwise. And that should be enough to get things running... right??

Look at this clip while I'm fixing it.


Download The Alchemist
Leave a comment