Im so lost. I need help with making a project/game....

bignerdmatt

Newcomer
Joined
Dec 2, 2003
Messages
11
Location
GA
Im currently making an assignment for a class. We could make any program using VB.NET, so I chose a game. My theme is similar to "Whack-A-Mole" but Im calling it "Slap the Dell Guy".


So far I have my form Set up as a single window. The top is a picture box with a simple custom graphic title I made. Below it is a start button and a rules button. The rules button simply displays a messagebox giving a quick rundown of the game. The start button begins it.

Below the two buttons I have 6 picturebox'es arranged in a 2x3 column.


What Id like to do with the game is have the 6 boxes randomly appear one at a time for 2 seconds over a period of thirty seconds. If the user clicks on one before its 2 seconds is up, they recieve a point. If not, the picture simply re-generates randomly.


My problem is Im not so sure where To start. After reading some, it seems I should set all the picturebox'es to invisisble, and have them randomly become visible and then track if the user clicks them.



Im not asking for my project to be done for me, I just need some guidance. This is an "Intro to VB.Net" class, and to be honest Im not the best at it. Im horrible with terminology. Thank you in advance :D
 
Well it sounds like you'll need a label control for the score, and 6 buttons that you'll make visible/invisible as you go.

You probably want to add a timer control, which allows you to specify events to occur in a set interval.

When ever someone clicks a button, you'll want to add some code beneath the button click event to increase the score (displayed in the label)

You'll also want to become familiar with the randomize function (Hint: Use the datetime as the random number 'seed')

And you'll probably want to add a menu so that players can start a new game or quit their current one.

This is a pretty good start.
 
To be honest, Im still lost.

Really what I need to know is where exactly to start ? Do I define the timer first ? Do I assign controls to the pics first ? Perhaps a small outline would help... or whatever you see fit.

Thanks.
 
Knowing where to start is quite often half the problem.

You'll probably want to add the buttons first, and make them add up the score when you click them. Don't be afriad to add temp controls to your forms to test things. I quite often add a button that would for example act as a timer, to randomly enable one of the buttons.

experiment, its the only way to get anywhere.
 
So should I set each button to add +1 to the score ? and then set a separate function to do the whole randomize them thing ?

As you can tell I know close to nothing about commands and whatnot. But I have the next 5 hours to sit here and mess around. I can get something done by then :P
 
yep thats right. Make a variable called Score or something (put it close to the top)
Code:
private score as integer

then add code to each of your buttons
Code:
score = score + 1
label1.text = score.tostring
 
Thanks.

However i hope not to irk you when I ask... where ?
IS it after the code that appears after I double click the button on the form design




PS-

Im working with your code, do I need to declare the score ? Do the whole "Dim X as score" thing ?
 
Last edited:
inbetween, like this:
Code:
    Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
score = score + 1
label1.text = score.tostring

    End Sub

This runs that code when the button is clicked on.

I think you need to go out and buy a learning to program vb.net in 21 days or something.
 
Thanks, Ill quit bothering you now :)

I can see youre getting a bit annoyed. Im a little on the un-prepared side here.
 
I just finished my vb.net class and was lost as well. i found that by looking at some of the forums, getting a good learning book, and making up projects, you can learn pretty fast.

Just don't get discouraged or anything, just start small and work your way up.

I think everything here should get you on your way to making the project.

ask as many questions as you like and I will try and help as much as I can from the stuff I know.

Rick
 
Back
Top