Tag Info

New answers tagged

2

You could just store a second image (or use the alpha channel of your image) to store a heat map (this also depends a bit on how you're drawing this, e.g. through a canvas). You just create some mapping and tint areas in their specific color (example): Left arm becomes red. Right arm becomes orange. Left leg becomes cyan. Right leg becomes blue. As an ...


0

In my game I currently have this system in place. Unfortunately it is in c# and you might not be able to get what you are looking for. What I do is store the location of the player, and the location of the mouse click. When the first click to move happens, I have a boolean that is false until the character reaches the clicked location, or he happens to get ...


0

There are often lots of items in a game that can be used in varying ways. One generic way to do this is to implement an interface such as the following: class IUsable { public: virtual void Use() { /* does nothing */ } } For items which are usable on the current player such as potions, their Use method send an event to the current player with the ...



Top 50 recent answers are included