Benjagan91
10-06-2009, 11:16 PM
Hi,
I'm new to VB6 but i can do things here and there with it. Now i'd like to build a simulator kinda thing.
Concept drawing: Click here (http://www.xtremevbtalk.com/attachment.php?attachmentid=30130&stc=1&d=1254891990)
When you run the program, within the square in the form, 15 squares will appear at random locations inside this square. There are 3 different colored squares: red, blue, green. Each square is 8x8 pixels. The timer down the bottom of the form begins counting upon runtime also.
Now i'm like each square to generate a random number out of 5... corresponding to the following:
1: left
2: right
3: up
4: down
5: idle
Whichever number is generated, the square will move in that direction 1 pixel. So the squares can only move in one direction at once. Each time the square moves, it 'levels' up 1. So if the square has moved 4 times, it is level 4. If the square generates number 5, it stays in the same spot and doesn't level. So if the square has moved 4 times and idled once, it's only level 4. These random numbers are generated once per second.
Now if these squares collide, it should check the color of the opposing square. If it is the same color, it ignores it and keeps on moving (or idle depending on the number generated) but it moves in a direction that is valid (it obviously can't stand on top of another square).
If the opposing square is another color, the one with the highest level remains and the lesser level square dissapears. The remaining square gets one point for it's team as recorded at the bottom of the form.
The computer should always check that 15 squares are in play at all times, 5 per side. So when 1 dies, another is spawned at a random location (not on top of an existing square).
On mouseover for each square should be displayed the current level of the square, and how long it has been in play.
To make things fair for all the squares, a level cap of eg. 50 should be introduced. I guess the level cap should depend on the size of the form/area they have to move around.
Can anybody help me design/code this please? If you're interested... :)
Thanks.
Regards, Benjagan91
EDIT: Actually i guess this should of went in the games programming area, even though it won't use DirectX... sorry!
I'm new to VB6 but i can do things here and there with it. Now i'd like to build a simulator kinda thing.
Concept drawing: Click here (http://www.xtremevbtalk.com/attachment.php?attachmentid=30130&stc=1&d=1254891990)
When you run the program, within the square in the form, 15 squares will appear at random locations inside this square. There are 3 different colored squares: red, blue, green. Each square is 8x8 pixels. The timer down the bottom of the form begins counting upon runtime also.
Now i'm like each square to generate a random number out of 5... corresponding to the following:
1: left
2: right
3: up
4: down
5: idle
Whichever number is generated, the square will move in that direction 1 pixel. So the squares can only move in one direction at once. Each time the square moves, it 'levels' up 1. So if the square has moved 4 times, it is level 4. If the square generates number 5, it stays in the same spot and doesn't level. So if the square has moved 4 times and idled once, it's only level 4. These random numbers are generated once per second.
Now if these squares collide, it should check the color of the opposing square. If it is the same color, it ignores it and keeps on moving (or idle depending on the number generated) but it moves in a direction that is valid (it obviously can't stand on top of another square).
If the opposing square is another color, the one with the highest level remains and the lesser level square dissapears. The remaining square gets one point for it's team as recorded at the bottom of the form.
The computer should always check that 15 squares are in play at all times, 5 per side. So when 1 dies, another is spawned at a random location (not on top of an existing square).
On mouseover for each square should be displayed the current level of the square, and how long it has been in play.
To make things fair for all the squares, a level cap of eg. 50 should be introduced. I guess the level cap should depend on the size of the form/area they have to move around.
Can anybody help me design/code this please? If you're interested... :)
Thanks.
Regards, Benjagan91
EDIT: Actually i guess this should of went in the games programming area, even though it won't use DirectX... sorry!