|
-
Oct 30th, 2003, 09:33 AM
#1
Thread Starter
New Member
Moving Randomly Shapes on the Screen, Left to Right
Hi,
I am about to start making a simple game in VB.NET, its like galaga style of game, i juz need a bit of help..
Can anyone show me a code of randomly moving a shape from left to right? for example a rectange...Should i use a for loop?
ANy help will be much appreciated
Thanks
-
Oct 31st, 2003, 09:19 AM
#2
I'm not much of a VB.net afficionado, but what I'd do is create a class that has properties to control its X and Y speeds, and anything else you need.
Make as many instances of this object as you need, assign speeds to each one. Then in the main game loop tell each object to move a single step by an amount dictated by the X & Y speeds.
It'd be easiest to create an array of the objects and loop through them.
If you need more specific graphical help then I'm not much cop, but no doubt someone else has an idea.
I don't live here any more.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|