Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
 
  HOME    TRACKER    Visual Basic




Creating Trivia Game....need Some Help


I am teaching myself VB using a book from the library. I am currently creating a trivia game. But, I don't know how, or just haven't put together what to do about a few things: keeping track of the score and current turn.

I got the questions to come up, and when I select the correct answer, it says "correct" or "wrong" if the chosen answer was wrong. But after choosing the correct answer, how would I keep track of scores (for four players), and maybe more importantly, how to I keep track of the current turn, and how to change turns.

Any tips would be very helpful! Thanks!




View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
Trivia Game Help
I am very new at vb. I am taking a vb class in high school. The teacher assigned a trivia game project to the class, but a catch was that we weren't allowed to ask the teacher how to do it (don't ask me why...). We have to get all of our help from the internet sorces, or books. The project is supposed to include loops and arrays

We have a text book, and I've read it, but I can't connect what the textbook says with what I am trying to accomplish: the trivia game.

Basically, we are supposed to create a game with four categories of 20 questions each. The questions are to be stored in a data file. The array will have 20 rows, with 7columns (one for the question, 4 for the answers a through d, and one for the correct answer, and one for a "flag" that will tell the program not to ask the question if it's already been asked).

I guess I just don't understand how to put everything together, and I hope that you guys can help me. I'm not asking you to do the project for me, only to provide some simple examples or helpful suggestions or tips. Thanks in advance!

Trivia Game Help
Well 'm making a Trivia Game and i need to load the questions and answer FROM A FILE...
like the following:

Who produces Windows?>Microsoft:Borland:Linus:Micropose

so it loads the question(who produces windows) to a label that has the questions

and then the answers loads them to command buttons in a RANDOM order and the first answer(in this case Microsoft) will be the right answer....

Got the idea???

Thanks in advance for your help

Trivia Game HELP!
HELP!

i need help with my trivia game!

Im trying to make a game where it takes the questions off a file so i dont have to put the questions in the code.

I need the source to open a file, pick a question and its answer randomly and then using it. Then i also need the code to save to that file also

thanks

Trivia Game Sound Help
Hi, I'm making a trivia game. I have a sound file that plays, but it only lasts 2 or so minutes. Once it is down, how do I get it to start playing again by itself. Im using Microsoft Multimedia somethingn or other.

Thanks!

Trivia Game Problem
Hi, I'm a beginner at VB and I wanna make a really simple program, but i'm having problems.
I want to make an application where by clicking a button a question pops up on the screen in an inputbox, and the answer can be typed by the user. A message box will then pop to show whether the question is right or wrong. The form will have 2 labels which will show the number of correct answers and the total number of tries. Each time you click on the button, a different question pops up in the inputbox. There are 5 different questions.
I want to do this in as least variables as possible.
I know this is really easy, but I dont know how to make a different question pop up each time you click on the same button.

Trivia Game With Arrays
Hello,

I want to make a simple trivia game using arrays. I want to have five questions. The questions will be random. A question will be given along with three multiple choice option boxes. How can i do this? I am very new at VB and i would like a simple explaination. Thank you.

Can't Make Trivia Game Work !!!
Hi All,

Could someone please take a look at this code and tell me why I can't seem to make the "Answer" command button to work? I want to Answer caption to say "correct" if the right option button is depressed, and "incorrect" if the wrong option button is depressed. Any comments would be greatly appreciated !

Trivia Bot
I want to make a trivia bot. RIght now ive got my program to connect to the server i need so now i need to know the best way to have it check answers.

Peoples messages display like this in a richtextbox-

<their name>their message
<other name>their message

and theres also a few alerts but they diplay differently so i dont think that matters. I want it to not be Case sensitive. I also want it to only be correct if their answer is the only thing in the message so this would not be correct.

question:5+1
answer:1234567890

That wouldnt really be one of the questions, but you get the idea.
It would also need to be able to get the name of the person who got the correct answer.

It sounds like a lot to ask, and i could probably figure it out but i know i would do it very inefficiently. I just want to know the best way to go about doing these things.

-thanks for any help you can give....

IRC Trivia Bot Help
I need info on coding a IRC Trivia Bot...if anyone knows where I can find this info I would greatly appreciate it
Thank You

Creating A 2d RTS Game
Hi, First I would like to say Im not new to coding in genral just to VB (I used to game creation programs which I suppose are more like scripting langs then anything)

Anyways Im wanting to create an RTS... I havent really ever created an rts before so this will be a new task for me. I was planning on using VB and DX 8.1 (inless you guys know of something better) I think I can do most of it...up till the path finding parts of it (for instance you click a unit and tell him to move some where and he finds the shortest path and moves there with out pumping into a bunch of walls) )I havent really ever had to do this so do you guys have any ideas on that?

Also is DirectDraw included in the 8.1 SDK? Because I cant find it so perhaps I should go down even lower then that?

Creating A Sim Game...?
Is it possible to create a football management sim using vb6, if so could someone give me a bit of advice please, on how to get started and then eventually set it up to play online.

Thanks in advance…

Need Help Creating My First Game
Hello

Ive got to create a visual basic game for college what the game involves is that the football (in the pic) has to go into the net but i need to random where the ball goes to though because sometimes they wont score.

I have done some code but its wrong because nothing happens when i run the game.


Code:
Dim pickfootball As Integer
Dim Pickgoalkeeper As Integer

Private Sub cmdExit_Click()
End
End Sub

Private Sub Form_Load()
score = 0
End Sub

Private Sub ImgMain2_Click()
ImgMain2.Picture = ImgFootball(pickfootball).Picture
Timer2.Enabled = False
Timer3.Enabled = True
End Sub

Private Sub Timer1_Timer()
Imgmain.Picture = ImgFootball(pickfootball).Picture
Imgmain.Move Imgmain.Left + 20
If Imgmain.Left > 5000 Then Imgmain.Left = 0
If Imgmain.Left > 5000 Then Imgmain.Top = 3000


End Sub

Private Sub Timer2_Timer()
ImgMain2.Picture = ImgGoalkeeper(Pickgoalkeeper).Picture
ImgMain2.Move ImgMain2.Left + 20, ImgMain2.Top + 5
If ImgMain2.Left > 5000 Then ImgMain2.Left = 0
If ImgMain2.Left > 5000 Then ImgMain2.Top = 3000
End Sub

Picture of game


thanks to all that can help

Creating A Game
I'm in 10th grade and almost finished with my first year of VB.NET. For the final 5 weeks of the course my teacher wants me to build a game, anything I want, and I know what I want to do, but we also have to include a title screen for the game.

So my question is how do I make a title screen that I see in many games, like it will say the name of the game, and then the screen splits in two and goes away horizontally revealing the game...Anybody know how to do this?

SQL Trivia Part II
I'm aware of how to use the "Replace" funciton to help with enterin gquotes into a database, but how do you handle apostrophies. I'm getting this error:


Quote:




Syntax error (missing operator) in query expression 'fldName='Mark's Test''






Thanks

HWOODKY

SQL Trivia!!! &lt;RESOLVED&gt;
What the heck is wrong with this SQL statement:

mySQL = "SELECT * FROM Series WHERE fldProviderID=" & lstProvider.SelectedItem.Value & " ORDER BY fldProviderID ASC"

I'm getting a "Missing Operator" error in reference to the "fldProviderID=" part.

Good luck!

HWOODKY

Creating My First Game. Any Suggestions?
Hi. I wanted to make a very simple VB6 game. My experience with VB6 is beginner-med. Is there something we start off, if someone wants to creat their first game? thanks alot.

Creating A Game Engine
How would i go about making a 2-d flat map game engine and map editor how do i do this is? what kind of software would i user to make these resources.

I Need Help Creating A Game Of Pong
I have been looking around for some kind of tutorial on how to start creating my own game of pong. I am interested in doing this. If you could please give me a link or upload a tutorial or something like that i would greatly appreciate it.

Thanks

Creating Pairs Game
Hi, everyone. I am working on a similar matching game and really can beneifit from your input. Thanks

Creating Pairs Game
hi again thx for helping me with my pong game everything is working arite now. can someone help me with another game its a Pairs game........ I have already started this game, Basically it doesnt work very well when I click on a card and i click on the second card nothing happens even if they match or they dont.

Iam new to vb so any suggestions would be much appereciated.
here is my code.


Code:
[b]Option Explicit[/b]

Public score As Integer
Public second As Integer

[b]Private Sub imgback_Click(Index As Integer)[/b]

Dim y As Image
Dim match As Integer
Dim card1 As Integer
Dim card2 As Integer



Imgpairs(Index).Visible = True
score = score + 5
Me.Caption = " pairs: " & score






For Each y In Imgpairs
If y.Visible = True And card1 = 0 Then
card1 = y.Index
ElseIf y.Visible = True And card2 = 0 Then
card2 = y.Index
End If
Next y

If Imgpairs(card1).Tag = Imgpairs(card2).Tag Then
imgback(card2).Visible = False
imgback(card1).Visible = False

Imgpairs(card2).Visible = False
Imgpairs(card1).Visible = False

If Imgpairs(card1).Tag <> Imgpairs(card2).Tag Then
imgback(card2).Visible = True
imgback(card1).Visible = True

Imgpairs(card2).Visible = True
Imgpairs(card1).Visible = True


End If

End If




End Sub



[b]Private Sub Tmrgame_Timer()[/b]
Dim card1 As Integer
Dim card2 As Integer


For Each card In Imgpairs
If (card1) = Visible Then
Loop
















Dim pairsnumber As Integer

second = second - 1
lblsecond.Caption = second




If second = 0 Then Tmrgame .Enabled = False
Imgpairs(pairsnumber).Visible = True
Tmrgame.Enabled = False

MsgBox " Total score is " & score & "points"

End If







End Sub

Creating A Stand Alone Game
I have some experience programming in VB for Excel, Word and am now playing with PowerPointhttp. I want to create a stand alone program that can be used on any windows based computer based upon code that currently works in PowerPoint or Excel even if the computer doesn't have PowerPoint/Excel/Etc. How do I do this?

Creating A Shooting Game
I have a picture on my form and what i need to do is when you click it something happens. I've tried putting a picture on a command button but it doesn't show up, I've also tried putting the picture over the command button but it just goes behind it. What do I do?

Scaled Time Trivia
I have the following math problem for someone to help me figure out:

Within my SQL Server database, the time is stored as a long integer. Don't
ask me why--this is just the way it is done. The format is the sum of the
hour in 24-hour notation scaled by 10000, the minutes scaled by 100, and the
seconds. For example, 02:10:15 PM would be presented as 141015.

My problem is:

1) If using a DTPicker control, how do I convert the time of 02:10:15PM to
141015?

2) If reading 141015 from database, how do I set the DTPicker to the correct
time?

I basically need to determine the individual parts of the time 141015 and
assign to Hour, Mins, Secs variables...

Any help or ideas would be appreciated.

Scaled Time Trivia
I have the following math problem for someone to help me figure out:

Within my SQL Server database, the time is stored as a long integer. Don't
ask me why--this is just the way it is done. The format is the sum of the
hour in 24-hour notation scaled by 10000, the minutes scaled by 100, and the
seconds. For example, 02:10:15 PM would be presented as 141015.

My problem is:

1) If using a DTPicker control, how do I convert the time of 02:10:15PM to
141015?

2) If reading 141015 from database, how do I set the DTPicker to the correct
time?

I basically need to determine the individual parts of the time 141015 and
assign to Hour, Mins, Secs variables...

Any help or ideas would be appreciated.

Heres A Trivia Question!
why do arrays start with 0?

Help Creating A Danceing Game Engine.
I play this dancing game known as "DDR", DDR stands for Dance Dance Revolution, the point of the tame is to follow the arrows and move with the song amd making sure you get a perfect score, the score is measured by the way you time each step according to the bar and whatnot.

Anyway, what I am trying to do is create a engine, but unfortunately I forgotten most of my programming and I need a good kick start. First off, how would I be able to assign the arrow keys to act as a button in which I made out of graphics, how is this posible?


Also, im doing this in directx using visual basic 6.0

Everything else (like creating a interface or importing sound), I have down pat, can someone help me with this, thanks in advance.

Some Help With Text Based Game Creating
Alright, I know what I'm doing for the code and stuff, design document, etc. But now, what do I code with? What program do I use to write my code and then where do I load it? What do I do for a client for the game? Do I need to create in the game client after coding the text files? What? Can someone explain the process of actually putting the game together and do I just code in something like notepad?

Need Help Creating A Palette Modifier For A Game
the video should explain it all...

http://youtube.com/watch?v=Dsd0DIs3fFo

Please, if someone could help, i'd be most obliged. Thank you in advance.

Creating Logic In A TicTacToe Game
Can anyone help me with creating logic statements? I'm not sure how to do this, but I need to create a tictactoe game, that the computer actually tries to win when you play it. Can anyone help?

Creating A Game In Visual Basic?
Hello every1, i was just wondering if its a good idea to create a basic video game using Visual basic. As apart of my university project i must choose a language of my choice, i have had some experience using visual basic before and found it easy to use. I also have some in java but dont seem to like java, If possible any suggestions on what software would be idea for gamimg at the same time simple to use would be great.

Thank you.

Help Request: Creating Number Patterns Game
I have used Visual Basic 6 before to create little games, but somehow I always end up making things way more difficult than they have to be. Here is what I want to do, and I am looking for some input on the best way to do it:

-The "game" will output a number pattern with some blank spaces that have to be filled in. If these spaces are filled in correctly, the winning team gets a point. If it is filled in incorrectly, the winning team gets a point, but the the question is now worth two points for the next team if they get it.
-There are five teams in total. The team that gets to answer the question is randomly selected. Names of players for each team are typed in at the beginning of the game (simple text box is fine that erases upon exit), but after a team is chosen, the player who has to attempt to answer the question on that team is also randomly chosen.
-I basically want four types of number patterns that each have a 25% chance of being selected. A simple subtraction pattern (ie: between -2 and -299 for each step), A simple addition pattern, a division or multiplication type and a mixed addition/subtraction/multiplication/division type (ie: multiply by 3, add 2). Ideally, all of the patterns would be randomly generated.

Anyway, that is my main idea and I have the flashy GUI worked out in my head... the only thing I am trying to figure out is how to most efficiently and randomly create number patterns that players can either get right or wrong in attempting. I am making this for a lesson that I will be teaching to my students. I did this last year by making a game on prime numbers and factoring and it worked really well (the kids loved it), but my coding was extremelly inefficient and time consuming because I pretty much typed out all of the possible outcomes.

Any help would be greatly appreciated. I was thinking of posting this in the gaming forum, but did not believe it would be relevant based on the types of questions that were being asked there.

Help.....please.... {Creating Graphics For Side Scroller Game}
I want to program a game were you can move up down left and right.....I have no clue where to start or what to do.....im a beginner...

Urgent - Creating A Card Game With CARDS.DLL, I Dont Know Where To Start!?
hey,

im creating a card game known as * * * *head (or Palace), im considering using this cards.dll file, or cards32.dll for all the images etc. however I do not know how to incorporate it into my project, or exactly what it will do.

This project is really important as its a big chunk of my coursework this year.

Your help would be REALLY appreciated

Iain

Can Some1 Start Me Off Creating A Game Like GTA Vice City Style?
hi there i have just went in to the keen intrest of creating a game like GTA Vice City instead of a one like JimCamels. can someone please help me and even join me as staff.

Many Thanks
PCUser

Try To Bring My Game From Window Game To Internet Game
I am an VB newbie, picked up VB.net and redone an old fashion game with it, it works pretty well on my PC now. After done with Window forms and Web forms, I found myself lost in this new world of web jargons, such as ASP.NET, XML, SOAP or cookies. I wish to move my game from window level to web level, and could not figure out what's the right tool to use.

My game needs web server to provide "some" information, keep track scores, and being in the "background". The game itself mainly runs on client local PC, only needs to communicate with a server for help, record keeping and limited event handling, and I don't need to bring up a web page by IE.

This game is an old favorite of mine, it can be played just like any other online games. After reading three books (honestly not all 800 pages), I don't have a single clue where to go from here. Can anyone help to educate me what's the tool or which book should I study from here?

Game Loop Without Creating An Endless Loop?
im trying to setup a loop for my game to draw the scene as many times as it can each second, however, i end up simply creating a loop that stops basically everything. timers do not function, command buttion clicks are ignored, not what i wanted.

so, then i tried a timer, but even at a setting of 1 it was too slow for my purpose. (unless you want to play the game limited to 10 FPS ) so, is there any faster timer system, or a differnt loop system i didnt think of?
thanks

Would It Be Easy To Convert A Completely Top View 2d Game To An Isometric Style Game?
im making a top view 2D game but later on after completing it i want to convert it to isometic view, thirdperson

i couldnt be bothered learning how to right now, so i just want to create the game in 2d first

so would it be easy to convert from 2d to isometric?

also if someone could explain or post a link to a tutorial on how to do isometric games .......

this is a tile based game...

Speed-limit A Game, Game Running To Fast On P4 2.0
I´m making a SuperMario-like game,
I develop it on my 1,1ghz, Geforce 256 32mb, 512mb ram, computer, it runs at a perfect speed.

When I tried it on my brothers 2.0ghz P4, Geforce4 Ti4600 128mb, 512mb ram, it ran so fast it was impossible to play it..

The thing I want to do is:
*Get as high FPS as possible (thoose drawing rutines should run as fast as possible)
*Get the GetInputs, MoveCharacter and CalculateEnemyAI functions to run each X ms (millisecond)

I tried to use a timer at 1ms but the game becomes very slow, I guess it cannot run as fast as 1000 times a second,

Any suggestions, ideas to fix this problems?

Help With Music In Pong Game And Restat Of Game
Hey, I was wondering if anyone could help me with my game in making it when you click the restart button on the menu that it will restart the game and set the scores back to zero, and see if anyone can help me get my midid to play as soon as the form load and when the song plays that the paddle for player are still able to move.
Thanks,
Rampage<PS>

My Second Game! In VB! :D A Talking Weird Type Game.
I learned Alot about Integers and choose to give it a try in a weird talking game.

I could of used booleans too by seting differnt ones for each person.

But I used Integers which was much faster.

Well tell me what you think of the small game thingy. I'm very new to VB.

How Do I Program Save Game And Load Game?
Hi guys, (Once again)

Is there a decent tutorial that can explain how to program how to save/load a game in VBasic? Notice I'm creating an RPG and this is sort of crucial. Thank you guys!

Capture Game Screen (Game Uses DirectX)
I need to capture the screen when a game is running.
The problem is that when I make my app use keybd_event API to simulate the PrintScreen button, or when I use BitBlt to capture the screen, the window that the game is in is just black.

I need to capture the screen because I want to look for certain pixels within the game window, but atm the whole thing is just black.

Any way to capture the pixels in the window or somehow compare the pixels to a picture I have (sort of like an OCR but I want to find shapes, not text)

Different Game Loops In One Game
Is it common for games to have a seperate game loop for say...the title/options screen? Because the effects of the input and the graphical output will be totally different to in the actual game..

Game Programming Gems Or Windows Game Programming
ok..I have limitied it down to 2 books I can get....Game Programming Gems or Windows Game Programming Gurus..

Which one is the best for its money,and is for beginners?

Creating Forms In Code VS. Creating At Design Time
Mostly. I have created forms and there controls at design time because it is much easer to move them around the form, and add code to each control or control array.

I am curtly working on a project that I would like to create the one form and all controls on the fly to create 5 different forms using code, But the process of defining each control and all of it attributes looks tedious.

Is there some way to design a form and all of it’s controls and then convert them to
the necessary code that can be pasted into the form definition?

Creating A Frame After Creating Control Array?
Hi everyone,

Here's a "VB For Dummies" question...

If you have already created your controls on a form, is there a way to add a frame around the controls at design time? Or am I doomed to deleting all the controls, creating the frame, and then recreating the controls?

Thanks for your help!

-- Miles



Edited by - Miles Tones on 5/20/2005 10:33:11 AM

RPG Game (Need Help)
For a school assignment, we have to design this game. The game is designed for grade 8 history classes (but that not important). The important thing is that each student has to have their own profile. The profile will have their name, stats, etc.

The problem that im have is creating the profiles. I sort of have an idea but i do need a little help.

I am going to create the profiles using a *.txt file.

I can create a *.txt file but i dont know how to make the file their name.
Eg. If their name is "Joe Bloggs" then the file name is "Joe Bloggs.txt"
Any help would be greatly appreciated.

Thanks

Game Box Help
I would like to know howi can make boxes appear moving on my forum without me having to make 40 picture boxes. please use the easiest way to explain and elaborate on how it works and use full prefexed variables.

New Game... TIC TAC TOE
I had nothing to do yesterday (Sunday), so I wrote a little Tic Tac Toe game.
Actually, it's for my nephew.


Each match is 20 games, see if you can score 80% or better.
As the player you have the advantage of first move.

Code is included....

Copyright © 2005-08 www.BigResource.com, All rights reserved