Loading stats from an ini file would be nice. If you'd like I could create a fairly quick character editor for you in VB. Just let me know the structure of your objects and the file structure you want.
Cool game.
Loading stats from an ini file would be nice. If you'd like I could create a fairly quick character editor for you in VB. Just let me know the structure of your objects and the file structure you want.
Cool game.
Lol bubba thanks for the help but I really have no idea what you just said lol. You can help me with whatever you just said if you want but could you explain it abit?
Things I dont know -
1.Loading stats from an ini file would be nice (is this file I/O cause I havent learned that yet)
2.If you'd like I could create a fairly quick character editor for you in VB(Are you talkin graphics here? I am alittle confused)
3.Just let me know the structure of your objects and the file structure you want(This flew right over my head.)
And finally here is the fixed Tic-Tac-Toe and yes............The computer player does suck..Ill fix that later though, Ill put a HARD difficulty MUHAHHAHAHAHAH!!!.................*dies*
-------------------------------------edit------------------------------------------
If anyone would like to quickly explain file I/O to me I could probably incorparate it. My friend says its really easy but he doesnt feel like teachin me.............what a friend.! Or I could wait till next chapter in class but why not get ahead?
BTW thank you to anyone who has put up with my constant blabering/nagging
------------------------------------edit2-----------------------------------------
Sorry for all the edits, I just realized I didnt put in a gameending for a Tie so just ignore that for now.........pweez
------------------------------------edit3-----------------------------------------
K I swear this is the last edit I will do before I hop off of a cliff....not really im not suicidal.
I added the tie ability in tic tac toe. I think the program is finished now tell me what u think. The AI still is bad but tell me what u think pweez!
Thanks in advance.
Last edited by Siggy; 11-21-2004 at 03:32 PM.
>>Loading stats from an ini file would be nice (is this file I/O cause I havent learned that yet)
Yes, it's file I/O. It just means, having the ability to open a file and load the stats from it would be nice.
>>If you'd like I could create a fairly quick character editor for you in VB(Are you talkin graphics here? I am alittle confused)
Character editor.. not sure what it's supposed to do, but VB is Visual Basic, and yes he's saying that he can create a graphical program that will allow you to easily modify your characters (whatever that's means) using a point-and-click interface.
>>Just let me know the structure of your objects and the file structure you want
That means, how do you want the info for your game to be organized in the file?
An example would be:File I/O is fairly simple (for simple tasks, i.e. this one)-File is all text
The first line in the file is the character name
The second line is the character's strength
The third line is the character's vitality
etc.
Then the next line is the second character's name
next line is the second character's strength
etc.
until the end of the file
And there, in a nutshell, is very simple file i/o for saving info.Code:#include <fstream> //the header for standard file i/o (in main() or whatever: ) std::ofstream file("stats.txt"); //Open the file for output (overwrite previous contents) file << name << endl; //Write the character's name to the file file << str << endl; file << vitality << endl; etc. file.close(); std::ifstream infile("stats.txt"); //open the file for input infile.getline(name, numberOfBytesInName); //Read the character's name from the file infile >> str; infile >> vitality; etc. infile.close();
Just Google It. √
(\ /)
( . .)
c(")(") This is bunny. Copy and paste bunny into your signature to help him gain world domination.
VB is funny. I'm in a VB class and I learned C++ first so it's really a breeze. When we did the first "Hello World" in it I felt kind of insulted. VB doesn't deserve "Hello World"! Not good enough for it... xD
VB is pretty much just an extremely dumbed down version of C++ where all the interface is developed like an image and actual coding is fairly minimal compared to that of C++. It's like php, except it's simpler and you would use something like Dreamweaver's interface to make the html part of it.
Code:#include <iostream.h> int var; int test(); int main() { cout << "Please input your language:\n 1. C (C,C++,C#)\n 2. VB\n 3. Other\n"; cin >> var; return test(); } int test() { if(var == 1) { cout << "Y0u 4r3 t3h 1337\n"; system("PAUSE"); return main(); } else if(var == 2) { cout << "N00B3R!\n"; system("PAUSE"); return main(); } else if(var == 3) { cout << "You were not thought of.\n"; system("PAUSE"); return main(); } else { return 0; }}
ShadowMetis:
While this is offtopic, I challenge you to write a Windows application that has 3 separate modeless windows accepting and processing user input simultaneously, using c++ and Windows API, without using wrapper libraries like MFC or old code, and do it in 5 minutes.
While you're still working on it the day after tomorrow, I will have done the equivalent in Visual Basic within the time limit, and my code will be neater than yours.
**EDIT**
>>and actual coding is fairly minimal compared to that of C++.
Exactly.
My employer will also be happier than yours, because he/she has just paid me several cents and received a working program in return; your employer will have paid you a couple hundred dollars for an incomplete program.
Last edited by Hunter2; 11-21-2004 at 05:33 PM.
Just Google It. √
(\ /)
( . .)
c(")(") This is bunny. Copy and paste bunny into your signature to help him gain world domination.
Heh I know what Vb is guys but thanks. I got the file saving thing to work now I need to touch things up. I hope to send a nice copy here before the night is out. Later!
Thanks for the help hunter! Helped alot and cleared things up.
Always glad to help
Just Google It. √
(\ /)
( . .)
c(")(") This is bunny. Copy and paste bunny into your signature to help him gain world domination.
BTW is VB worth learning cause out of highschool I'll know c++ and java, is vb worth learning aswell? Im only a sophomore right now but If vb is worth it I would like to get started on learning it. I heard it was a pretty easily understandable language newayz.
Also any input on the tic tac toe would be great to cause I am goin to show it to my programming teacher tommorrow.
Last edited by Siggy; 11-21-2004 at 05:45 PM.
And here it is folks!!!!!
What youve been waiting for!!!!!!
Get ready to r-r-r-r-r-r-r-r-r-r-r-r-r--u---u-----n a--w-a-y because there isnt anything that special........
O well.
Anywas heres my updated Randora Program. You can save now YIPPY!
P.S.
Really sorry for double post!
Last edited by Siggy; 11-21-2004 at 05:58 PM.
Sure VB is worth learning (and VB.NET I suppose is the latest incarnation of it). If you want to whip together a GUI application really quick, VB will do you great. I'd say, overall the cost-benefit (time spent learning vs. usefulness) is quite favourable.
Just Google It. √
(\ /)
( . .)
c(")(") This is bunny. Copy and paste bunny into your signature to help him gain world domination.
Cool, save. But my character has no healing, and it says i get hit for 17 dmg and my hp goes to 99. Am I missing something? lol
Just Google It. √
(\ /)
( . .)
c(")(") This is bunny. Copy and paste bunny into your signature to help him gain world domination.
Ermmmmm ya maybe its not perfect......I dont see why it would do that could you explain the error alittle better?
I just tested it and I am not sure of what exactly you are talking about. The healing seems to be working ok...
Last edited by Siggy; 11-21-2004 at 06:07 PM.
Calm down man xD. I wasn't really trying to insult you. Yes, VB is simpler. You can do it quicker and neater. I'm not saying you can't. If you really want to go into it though, C++ is still the superior language. I challenge you to make a dos prompt say "Hello World" with Visual Basic. You can't. C++ has a much wider range. For many things VB is better because its simpler and quicker, but there are still many things that you HAVE to use C++ for.
By the way, I'm still in my first year of VB, is it usable for web applications? I've never really been clear on that.. Just asking.
Code:#include <iostream.h> int var; int test(); int main() { cout << "Please input your language:\n 1. C (C,C++,C#)\n 2. VB\n 3. Other\n"; cin >> var; return test(); } int test() { if(var == 1) { cout << "Y0u 4r3 t3h 1337\n"; system("PAUSE"); return main(); } else if(var == 2) { cout << "N00B3R!\n"; system("PAUSE"); return main(); } else if(var == 3) { cout << "You were not thought of.\n"; system("PAUSE"); return main(); } else { return 0; }}
Of course you can do more things with C++. But you overlook the fact that VB is useful for the very simplicity that you seem to look down on The phrase "I felt kind of insulted. VB doesn't deserve "Hello World"! Not good enough for it... " just doesn't seem to do it justice, considering that many governments prefer VB over C++. Of course, that may just say something about government in general But if you want a job, VB is still nothing to turn your nose up at.Calm down man xD. I wasn't really trying to insult you. Yes, VB is simpler. You can do it quicker and neater. I'm not saying you can't. If you really want to go into it though, C++ is still the superior language. I challenge you to make a dos prompt say "Hello World" with Visual Basic. You can't. C++ has a much wider range. For many things VB is better because its simpler and quicker, but there are still many things that you HAVE to use C++ for.
By the way, I'm still in my first year of VB, is it usable for web applications? I've never really been clear on that.. Just asking.
And by web applications, do you mean applications that do networking? If so, then yes; there's a Winsock control that you can use, and I'm sure there's other ways too.
Just Google It. √
(\ /)
( . .)
c(")(") This is bunny. Copy and paste bunny into your signature to help him gain world domination.
there is a reason VB isn't tought in Universities...
Hmm