Heloo. I managed to generate a square on the monitor, but I want it to move alone on the monitor. do you have any idea how I should write the process?
- Make the coordinates for your square change over time. - Bonus: Detect when your square collides with the screen boundaries and invert the moving direction of x or y accordingly. Regards, gustl
break down you problem into smaller pieces. don't try to move a square, instead try to move a single pixel...
Cristina E. wrote: > do you have any idea how I should write the process? Its not the problem of how to write "the process". Maybe you don't need an additional process at all. Or maybe you need 4 more processes. That depends on how the code looks now... > I managed to generate a square on the monitor, but I want it to > move alone on the monitor. It goes more to the deep: how do you generate a picture on the screen? and how do you generate a square in that picture? And what parameters determine the position of the square? And how can you make those parameters variable?
: Edited by Moderator