Hi, I am new to VB (and to programming in general). Anyway, I would like to create a simple game where the user is presented with a question (taken from a datafile, .dat) and given to choices, TRUE or FALSE, or/and YES or NO. I read somewhere that it would be "easier" to invoke such datafile with a function...but how do I do that?
Would greatly appreciate any help with this little project!!!
Thank you very much!
Roldan
5 1079
I am sorry to have posted the message again...but I needed to edit and I went beyound the 5 minute limitation period to do so!!!
Here's the edited message:
Hi, I am new to VB (and to programming in general). Anyway, I would like to create a simple game where the user is presented with a question (taken from a datafile, .dat or .txt) and given two choices, TRUE or FALSE, or/and YES or NO or if applicable he/she can enter the answer in a textbox, I read somewhere that it would be "easier" to invoke and read such datafile with a function...but how do I do that?
In the .dat or .txt file, how is the data typed?
as:
What is the Capital of France?
Paris
or
"What is the Capital of France?"
"Paris"
etcetera...
The questions (and the answers) -there would be many questions with their respective answers in the datafile-, need to be read from the file either in sequence or in a random fashion (I would love to know how to do it both ways though!). If feasible (as I think it is!), it would also be nice to add a sound clip for the right or wrong answer is given.
Would greatly appreciate any help with this little project!!!
Thank you very much!
Roldan
Ooops! I did it again! (A la Britney Spears!)
...sorry...
I forgot to mention that I have both vb6 or vs2005...also, I know that I could work out a solution using a zillion IF loops or CASE SELECTs but I don't think that, programmatically, this is an elegant solution!!!
Thank You !
Roldan
Is this data file of your own creation?
Hi!
Yes, I am planning on compiling a list of answers&questions, then use this file in that little game....of course, I am open to suggestions to ideas and solutions!
Thanks for replying!
Roldan
Hi!
Yes, I am planning on compiling a list of answers&questions, then use this file in that little game....of course, I am open to suggestions to ideas and solutions!
Thanks for replying!
Roldan
Well you can create a data structure to store questions and answers. then you create an array of that structure. Then you save and open your array in binary format. That should be enough info for you to be googling for a couple of weeks. Good luck
Sign in to post your reply or Sign up for a free account.
Similar topics
by: Jacob H |
last post by:
Hello all,
Today I began writing a utility script that takes given binary files
and puts them all into one datafile. My idea is to be able to access
any binary data I want by indexing the...
|
by: Jocknerd |
last post by:
I'm a Python newbie and I'm having trouble with Regular Expressions when
reading in a text file. Here is a sample layout of the input file:
09/04/2004 Virginia 44 Temple ...
|
by: DarkPhoenix739 |
last post by:
I have 3 classes: a Windows Form, a Game, and a Piece. The Game has a Piece, and the Windows Form has a Game. The Windows Form needs to be able to "get" the game's Piece, and view its data, but not...
|
by: CSharp-Jay |
last post by:
So I have been programming in C# on a personal level as of lately, and
am curious about something. Lately I have been experimenting around
with file create/write, etc. I can open and read the...
|
by: shinerankin |
last post by:
Hi Guys & Gals:
I have a project with using flash that is updated with an xml file. The developer went belly up and is no longer assisting with anything. I need to write a simple html or php form...
|
by: iam_clint |
last post by:
Hello everyone I'm still learning vb.net and I'm stuck on something.
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
Dim...
|
by: dschu012 |
last post by:
I was wondering how someone would read the data from a flash game. For instance in a game like Text Twist on Yahoo! Games (Text Twist) It would be cool if you could get a program that could read in...
|
by: Van Dugall |
last post by:
Hello I have been writing a game in javascript which works fine but I wanted to step it up and request the data of the game from the server. I haven't really used php...all I know is from the...
|
by: taylorcarr |
last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
| |