By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,798 Members | 1,349 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,798 IT Pros & Developers. It's quick & easy.

2D Movement

P: n/a
Hi, I'm trying to write a simple A-Life game in Java where objects move
around on the screen. I have never done moving objects. I have so far gotten
the creatures to find the x & y of food and the angle at which it must
travel, my only problem is how, in the loop of the simulation, do I get the
creatures to move a few pixels in the direction of the food? For each
iteration of the loop, the creatures find the x & y and angle of the closest
piece of food. How then do I re-calculate the creatures new x & y a few
pixels closer to that piece of food? Thanks.
Jul 17 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.