I want to write a code to make a fairy fly all around screen in java/scala, like when tinker bell moves, only my game is 2D so no need for z attribute.
I sound very lazy to ask this but can anyone refer/write me some code to start with? I suck at math 🙁 I really need some basic code or tutorial to begin with.
You might want to work out a path you want her to take first (on paper)… Drawing out a motion line first will help you to start programming it.
Then you could be clever a work out some equations e.g. y = ax2 + bx + c for her to follow, or you could just hardcode the key points in her path and then create a function to make her travel through an array of key points (x and y co-ordinates).