19506jk / Nirvana

Written from Louis & Danny's code
Apache License 2.0
2 stars 1 forks source link

Character Moving Animation #41

Open rainybreeze777 opened 9 years ago

rainybreeze777 commented 9 years ago

Currently player image display is completely static. We need to animate the character movement to be able to see walking animation.

See tutorial: http://blog.csdn.net/cping1982/article/details/1747703

rainybreeze777 commented 9 years ago

Basic character animation is done. However, due to the threading implementation being too basic, press and hold input key will cause the game to essentially crash because too many inputs are being accepted, but only 1 input is processed every 300 ms. This needs to be fixed by using a timer, firing one event action for a certain amount of time.

Map Scrolling with character movement is also not smooth, due to the fact that the algorithm of determining the pixels of map to paint is too simple, updating 16 pixels at a time, where as a smooth action will probably require a pixel by pixel update.

Optimization of code may also be needed, for the map, player & enemy are always updating at the same time. This is not always required. Consider fix this.

samsnowy commented 9 years ago

I'll be looking into the code to implement key binding.