borderAndreaVB free resources for Visual Basic developersborder

borderAndreaVB Visual Basic and VB.NET source code resources - Copyright © 1999-2010 Andrea Tincaniborder

AndreaVB | Forum | News | Downloads | Register | Help | Member List | Statistics | Search | PM | Profile

Print This Topic
Previous Topic (Time wise control)Next Topic (3D illumination) New Topic New Poll Post Reply
AndreaVB Forum : VB General : How can I make a hide and seek game
Poster Message
-luxury-
Level: Trainee


Registered: 01-10-2009
Posts: 3

Ads by Lake Quincy Media
icon How can I make a hide and seek game

Hi. I hope someone could help me. I'm a newbie when it comes to visual basic so I'm seeking for your help guys.

Our programming prof gave us a project in which we should create a program, a hide and seek game, it uses rows and columns. The player and the computer will find one another, the player will try to guess where the computer is hiding [ what column and what row ] and when the player didn't get its location the computer will show itself and the location where its hiding before will be marked "X" and then it will hide in another column again. Meaning, as long as the player got the wrong guess of its location the lesser the space because of the "X" mark. And when the player got the right location of the computer then they will move to another level.  

My problem is our prof did not give us any codes. I try to search over the net but the codes was to complicated for a beginner like me. I think we should use RANDOMIZED but I don't know the right code.  


Please I'm begging for your help guys. I know someone can help me. It is an easy program for VB Professionals.  



Thank You!
I will be waiting. . . .

____________________________
" u can run u can hide but u can't escape my love.."

03-10-2009 at 11:19 AM
View Profile Send Email to User Show All Posts | Quote Reply
bytelogik
Level: Trainee


Registered: 06-10-2009
Posts: 3
icon Re: How can I make a hide and seek game

1) First you have to use 2D arrays
2) Second you have to display the grid (rows and columns)

I suggest you use the flexgrid control for display. This will get rid of the game display.

Yes you can use the Rnd() function. example,

RowValue = Int((6 * Rnd) + 1) ' Generate random value between 1 and 6.

ColValue = Int((6 * Rnd) + 1) ' Generate random value between 1 and 6.

Then check for the available row,col location in the grid for the computer by cheking the cells where there is no "X". Then you can get the new location for hiding in the grid.

Hope this helps.

08-10-2009 at 08:53 AM
View Profile Send Email to User Show All Posts Visit Homepage | Quote Reply
AndreaVB Forum : VB General : How can I make a hide and seek game
Previous Topic (Time wise control)Next Topic (3D illumination) New Topic New Poll Post Reply
Surf To:


Not Logged In? Username: Password: Lost your password?
Partners: Download Actual Software | Free Software Download
borderAndreaVB free resources for Visual Basic developersborder

borderAndreaVB Visual Basic and VB.NET source code resources - Copyright © 1999-2010 Andrea Tincaniborder