1. What kind of cellphone, pocketPC?
If pocketPC use your active-sync to explore your pocetpc device and put it, The compiled version(exe) of your game, in whatever folder you want. If other cell phone type, don't know on those.
2.Enemy attack at will. The most basic form would be like a proximity check for distance of enemy from player, if falls within certain distance, have enemy moveto player at directional_velocity. You could use a formula calculating distance into a speed factor. Start slow and move faster closer enemy got would be something like:
- Code: Select all
attackspeed = seednumber/(distance(opponent.x, opponent.y, player.x, player.y))*multiplier;
Both seednumber and multiplier would be variables you would need to declare along with attackspeed. So lets say enemy starts at 50 units away, you could make seednumber=100 and multiplier say .5. Then at 50 units away, he would start with a speed of 1. With half distance closed(25 units away) his speed would be 2. You would need to stop him 1 unit prior to reaching the player so that a divide by zero would be avoided, but you should have a collision before you would reach that anyways. I will try to work up some more substantial coding for you to look at, maybe even a little demo to show how.