|
-
Aug 13th, 2006, 04:44 PM
#1
Thread Starter
Junior Member
Game
Hi All,
Please will anyone be able to help me get this game working in VB?
Game
A red wildebeest is controlled by the player - it can move up, down, left, right, and the aim is to eat all the green grass, leaving red soil behind. The game ends when all the grass is successfully eaten. Unfortunately, the ground is unsafe, and holes - black squares - pop up every 4 moves, at a random position. The game also ends when the wildebeest falls into a hole.
• the game is played on a 10 by 10 area
• it should display a count of the number of moves, and of the number of holes created.
• I need to use a 2-dimensional array to hold details of the current state of the game, using characters to represent each square, as in
dim board(9,9) as string ' 0 to 9 - global
for row = 0 to 9
for col = 0 to 9
board(row,col) = "g" 'use g for grass
next
next
Thanks
-
Aug 13th, 2006, 04:48 PM
#2
Re: Game
This...
VB Code:
for row = 0 to 9
for col = 0 to 9
board(row,col) = "g" 'use g for grass
next
next
...can be done withouth the double for next loop. index is always the same.
VB Code:
for row = 0 to 9
board(row,row) = "g" 'use g for grass
next
What is actually the problem?
-
Aug 13th, 2006, 04:49 PM
#3
Junior Member
Re: Game
Can i just make a suggestion man -- and i'm sure it wont have anything to do with what you want 
Make the game in flash -- that way people will get to play it online, without downloading a suspisious ".exe" file.
Actionscript isnt too hard to learn, and its perfect for game makers, as your work can be played by anyone, no downloading.
-
Aug 13th, 2006, 04:51 PM
#4
Re: Game
That's true. VB6 is for all but for games
-
Aug 14th, 2006, 06:16 AM
#5
Re: Game
Moved to Games Programming
-
Aug 15th, 2006, 10:21 AM
#6
Addicted Member
Re: Game
 Originally Posted by gavio
This...
VB Code:
for row = 0 to 9
for col = 0 to 9
board(row,col) = "g" 'use g for grass
next
next
...can be done withouth the double for next loop. index is always the same.
VB Code:
for row = 0 to 9
board(row,row) = "g" 'use g for grass
next
What is actually the problem?
The second will only fill the diagonal with "g"'s. You still need the nested loops.
as for my advice http://www.codeguru.com/forum/showpo...96&postcount=3
Rich
A)bort, R)etry, I)nfluence with large hammer.
Please take a moment to rate useful posts.

-
Aug 15th, 2006, 11:31 AM
#7
Re: Game
I do have a decent tile engine within the Massive DX8 2D Tutorial in my sig in case you wanna take a peek.
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
|