I will be posting each of my project on here one after another. After starting project one I will not post project 2 until project 1 is done and completed.
Now, I am still not sure what I want to do here with project 1. I will either make this a gaming network all in its own or make it my code network to put up my projects. So here is the project code play with it check it out if you are new. My question is I would like this to be an online network is there anyway I can get like free hosting somewhere just to test it out? Also would I have to make special coding since it would be going online. I want it were you can login to a network with this console.
Code:// Game Menu 1.0 // Created by Donovan Simon #include <iostream> #include <string> using namespace std; int main() { string username; string password; string exit; string networkStatus; int playersinNetwork; playersinNetwork = 0; networkStatus = "Network Status: Online\n"; do { cout << " Game Network 1.0\n\n\n"; cout << "Welcome to 'The Game Network!'. This network was created\n"; cout << "so the user could choose from a selected list of games,\n"; cout << "then play the game after logging into the network. You\n"; cout << "must be logged into the network before playing the game.\n\n\n\n"; cout << "Please login to the Game Network.\n\n"; cout << "Username: "; cin >> username; cout << "\n"; cout << "Password: "; cin >> password; cout << "\n"; if (username == "DarkAges" && password == "123") { cout << "Succesful Login. You may now choose from the list of games to play.\n\n"; cout << "People in the network: " << ++ playersinNetwork << endl; cout << networkStatus << endl; system("PAUSE"); system("CLS"); break; } if (username != "DarkAges" && password != "123") { cout << "The username and password you entered is incorrect!\n\n"; system("PAUSE"); system("CLS"); break; } if (username != "DarkAges") { cout << "The username you have entered is incorrect!\n"; system("PAUSE"); system("CLS"); break; } if (password != "123") { cout << "The password you have entered is incorrect!\n"; system("PAUSE"); system("CLS"); break; } }while (true); return 0; }
Quick observation: you are give a "hacker" information in your error messages. I would do something like:
If you wanted to connect to a website or some-such, you are looking at learning how to do network programming. In particular, communicating via TCP/IP. You would also need to write code in a server-side setting to do the validation.Code:if (username != "DarkAges" || password != "123") { cout << "Your login credentials are incorrect!\n\n"; system("PAUSE"); system("CLS"); break; }
Last edited by WingedPanther; 12-15-2008 at 10:58 AM. Reason: answer the question asked
Also, I don't get this? Are you going to have a bunch of text based games? A virtual network loopback like VPN(Ie, Hamachi)?
Nice try, Donovan. I am sure you'll achieve it one day.
I'll give my 2 cents when I have more time to dispose of. Bye for new.
I hope this works out.. I think I am getting a bit ahead of myself with this network projectBut hey doesn't hurt to try new things
![]()
Yeah, it's indeed a long journey. Now you are taking on GUI too. Game programming is more than GUI only, you will also need to use GL or DirectX stuff. Net work is actual a much much smaller challenge. I was under the impression that C++0X is going to incorporate the Boost Asio network libary, so it will become even easier. GUI, however, will remain complex for many years to go. C++ stardard committee simply doesn't have the resource to create a standardized GUI or even a GUI standard. I myself is in constant search of a good crossplatform C++ GUI.
Do you have any idea what kind of a game you're going to build?
Game programming doesn't necessarily require DirectX/OpenGL. There are a lot of games with 2D graphics that require very little from a graphics standpoint.
Thanks for the correction, WingedPanther.
I actually suggest that he go with text terminal for now. GUI can be a big distract to his learning C++. Catching 2 fishes at the same time probably is not a good idea. He has mostly learned some C subset stuff of C++. It's more helpful to move to some good textbook that teaches the OO part of C++, probably a little bit of GP, limited to the using of STL. And then get back to the topic he is interested, game programming, and relevant GUI stuff.
But since what he is interested is game programming, it could turn out to be the best way sticking with it.
He is only 14 so he has plenty of time trying different things and ways. The boy who wrote DivX decoder definitely did not learn C as advocated by experts. Who knows![]()
Hehe, I tend to jump out of my seat when I learn new things hah! Don't worry about this topic though I got carried away with the greatness of c++I really need a good OO book though. So far I have the basics down I just need to start getting into more OO stuff. If I can get to the point where I know how to start coding Mushes that would be awesome. I think I have an idea on it but I would constantly be stopping to think on what to do haha.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks