WHAT NEXT!?!

Started by
4 comments, last by programwizard 17 years, 12 months ago
Hello, Im programming in C++, and I wanted to know, what to do next and when. I've been programming in C++ for a little over a week, and have made several programs. Please give me some ingight on what I should do next, and when. -- Thanx :D To comment of what rip-off said, heres an example of 2 of my programs:
/**$*%$*%$*%$*%$*%$*%$*%$*%$*%$*%$*%$*%$*$
$*%    PROGRAMMER NAME: BRANDON WALL   *$%
%*$    DATE:   4-19-06                 %*$
*%$*%$*%$*%$*%$*%$*%$*%$*%$*%$*%$*%$*%$**/ 

// Shimmer Inc. DataBase

#include <string>
#include <iostream>
#include <windows.h>
using namespace std;


void menu( int& output )
{
        cout << "\t\t\t+ Welcome to Shimmers Inc. +\n\n"
         << "***************************************************\n"
         << "**                                               **\n"
         << "**   Navigation:                                 **\n"
         << "**   1) Create New Shimmer Account               **\n"
         << "**   2) Log In With Existing Shimmer Account     **\n"
         << "**   3) Exit                                     **\n"
         << "**                                               **\n"
         << "***************************************************\n\n"
         << "Please Make Your Selection: ";
    cin >> output;
}

void poop()
{
    int menuSelection;
        //Declaire Variables
    string userName;
    string password;
    string name;
    string email;
    string logName;
    string logPass;
    
    //Declaires the menu function
    menu(menuSelection);
    
    if(menuSelection == 1)
    {
                    //Clears screen for users info
                    system("cls");
                    
                    //username
                    //Gets users new account info
                    cout << "*Setp 1*\n\n";
                    cout << "1) Please enter Your New Username (One Word): ";
                    cin >> userName;
                    
                    
                    //password
                    cout << "2) Please enter Your Account Pssword: ";
                    cin >> password;
                    
                    
                    //name
                    cout << "\n\n*Step 2*\n\n"
                         << "1) First Name: ";
                    cin >> name;
                    
                    //email
                    cout << "2) Email Address: ";
                    cin >> email;
                    
                    //Thank you ending
                    cout << "\nThank You.";
                    Sleep(2000);
                    
                    //clear screen for loading message
                    system("cls");
                    
                    //Loading message
                    cout << "\t\t\t\tL";
                         Sleep(1000);
                    cout << "O";
                         Sleep(1000);
                    cout << "A";
                         Sleep(1000);
                    cout << "D";
                         Sleep(1000);
                    cout << "I";
                         Sleep(1000);
                    cout << "N";
                         Sleep(1000);
                    cout << "G\n\n";
                         Sleep(2000);
                    //Waits for user to cont.
                    system("cls");
                    
                    //Gives final Summary
                    cout << "Thank Your for Choosing Shimmer!\n"
                         << "Heres Your Account Info: \n\n"
                         << "Account Name: "
                         << userName
                         << "\nPassword: "
                         << password
                         << "\n\nPlease Write your Account Information Down Incase you Forget.\n"
                         << "Please Log In when you are Transfered to the Menu Screen.\n\n\n";
                    system("pause");
                    system("cls");
                    menu(menuSelection);
    }
    
    
    if(menuSelection == 2)
    {
                     //Tells user to enter their account name
                     system("cls");
                     
                     cout << "********************************\n"
                          << "**                            **\n"
                          << "**   Shimmer Sccount Log In   **\n"
                          << "**                            **\n"
                          << "********************************\n\n"
                          << "Account Name: ";
                     cin >> logName;
                     
                     //Tells user to enter their account password
                     cout << "Password: ";
                     cin >> logPass;
                     
                     if(logName != userName && logPass != password)
                     {
                                cout << "\n\nAccess Denied.\n\n";
                                //Delays for another try
                                Sleep(2000);
                                system("cls");
                                poop();
                     }
                     if(logName == userName && logPass == password)
                     {
                          cout << "\nWelcome, "
                               << name
                               << "\n\n";
                          
                          //waits for user to exit
                          system("pause");
                     }
    }
    
    
    else if(menuSelection == 3)
    {
                     cout << "\n\nOk, Bye.\n\n";
                     Sleep(1000);
    }
    
    else
    {
         cout << "\n\nThats not an Option. Bye\n\n";
         Sleep(1000); 
         
    }
                    
}

int main()
{
    poop();
    return 0;   
}

Heres my 2nd example:

/**$*%$*%$*%$*%$*%$*%$*%$*%$*%$*%$*%$*%$*$
$*%    PROGRAMMER NAME: BRANDON WALL   *$%
%*$    DATE:  4-15-06                  %*$
*%$*%$*%$*%$*%$*%$*%$*%$*%$*%$*%$*%$*%$**/ 

// Practicing Functions4
// Paper, Scissor, Rock : Evolution

#include <string>
#include <iostream>
#include <ctime>
#include <cstdlib>
using namespace std;

      //Declairing Variables 
      int weapon, comp, compWeapon;
      char playAgain;
      
//First Function
void choice()
{
     
     cout << "Welcome! Are you ready to Play PSR-Evolution? \n"
          << "Who cares? Your playing anyway!"
          << "\n\n"
          << "Here are the rules: \n\n"
          << "***************************************\n"
          << "**                                   **\n"
          << "** 1) Flamthrower beats Gea Pet      **\n"
          << "** 2) Gea Pet Beats Water Hoes       **\n"
          << "** 3) Water Hoes Beats Flamethrower  **\n"
          << "**                                   **\n"
          << "***************************************\n\n"
          << "Have Fun!\n\n";
          
     //Waits for user to continue
     system("pause");
     
}
     
void weaponSelection()
{
     //Clears screen to pick Weapon
     system("cls");
     
     //Weapon Selection
     cout << "\n\n"
          << "****************************" << endl
          << "**                        **" << endl
          << "** +Select Your Weapon+   **" << endl
          << "**                        **" << endl
          << "** 1) FLAMETHROWER        **" << endl
          << "** 2) GEA PET             **" << endl
          << "** 3) WATER HOES          **" << endl
          << "**                        **" << endl
          << "****************************\n\n"
          << "\nWeapon Of Choice: ";
     cin >> weapon;
     system("cls");

}

void gameLoop(int weapon, int comp, int compWeapon)
{
     
     //Generates The comps Random choice
     srand(time(0));
     comp = rand();
     compWeapon = comp % 3 + 1;
     
     //Game Loop Begins
     if(weapon == 1 && compWeapon == 3)
     {
                  cout << "You picked a FlameThrower and The Computer picked a "
                       << "Water Hoes"
                       << "\n\nSorry, Game Over!\n\n";
                  system("pause");
     }
     else if(weapon == 2 && compWeapon == 3)
     {
               cout << "You picked Gea Pet and the Computer picked "
                    << "Water Hoes"
                    << "\n\nYAY! You Won!\n\n";
               system("pause");
     }
     else if(weapon == 3 && compWeapon == 3)
     {
          cout << "You picked Water Hoes and the Computer picked "
               << "Water Hoes"
               << "\n\noOOoOo! It's a Draw!\n\n";
          system("pause");
     }
     
     //Second Loop Summary
     if(weapon == 1 && compWeapon == 2)
     {
                  cout << "You picked Flamethrower and the Computer picked "
                       << "Gea Pet"
                       << "\n\nGood Job! You Won!\n\n";
                  system("pause");
     }
     if(weapon == 2 && compWeapon == 2)
     {
               cout << "You picked Gea Pet and the Computer picked "
                    << "Gea Pet"
                    << "\n\nIts a Draw!\n\n";
               system("pause");
     }
     else if(weapon == 3 && compWeapon == 2)
     {
          cout << "You picked Water Hoes and the Computer picked "
               << "Gea Pet"
               << "\n\nToo bad...You Lost!\n\n";
          system("pause");
     }
     
     //Last Game Loop
     if(weapon == 1 && compWeapon == 1)
     {
                  cout << "You picked Flamethrower and the Computer picked "
                       << "Flamethrower"
                       << "\n\nIts a Draw!\n\n";
                  system("pause");
     }
     if(weapon == 2 && compWeapon == 1)
     {
               cout << "You picked Gea Pet and the Computer picked "
                    << "Flamethrower"
                    << "\n\nYou Lost! Game Over!\n\n";
               system("pause");
     }
     else if(weapon == 3 && compWeapon == 1)
     {
          cout << "You picked Water Hoes and the Computer picked "
               << "Flamethrower"
               << "\n\nGood Job! You Are Successful!\n\n";
          system("pause");
     }
     
}

int main()
{
    choice();
    weaponSelection();
    gameLoop(weapon, comp, compWeapon);
    
    //Clears Screen for loop option
    system("cls");
    
    cout << "Play Again? (y or n): ";
    cin >> playAgain;
    
    while(playAgain == 'y')
    {
                    //Clear Screen for New Game
                    system("cls");
                    
                    weaponSelection();
                    gameLoop(weapon, comp, compWeapon);
                    
                    //clears screen for Loop Option
                    system("cls");
                    
                    cout << "Play Again? (y or n): ";
                    cin >> playAgain;
    }
    if(playAgain == 'n')
    {
                 //Clears Screen for Last Greeting
                 system("cls");
                 
                 cout << "*********************************\n"
                      << "**                             **\n"
                      << "**   Thank You For Playing!    **\n"
                      << "**          Buh-Bye!           **\n"
                      << "**                             **\n"
                      << "*********************************\n\n";
                 system("pause");
    }
    
    return 0;
}

Hope that gives you an example of what im capable of. [Edited by - NUCLEAR RABBIT on April 21, 2006 6:46:40 PM]
Advertisement
Keep at it.


EDIT: To expand on that a little. I think I realize what you're asking: You've been programming in C++ for over a week now, learning about variables and functions and whatnot... when do you start making things that actually DO things? And the answer is, simply, "not yet". If you've never programmed before, you WILL have to bust your hump on this introductory stuff for awhile before you really start getting some serious skills as a programmer. It just takes time, and determination.
What is the most complex program you've made?

Hey,

I started learning C++ a few days ago (I'd already learnt the main concepts of programming when I dabbled in Java so I only had to learn syntax) and tonight I've made a text-based tic-tac-toe (excluding any form of artifial intelligence, which I have no idea how to do) which took about 1 to 2 hours.

I would recommend having a go at programming that.

Tom

PS. Next, I'm going to try pong (after I have a good attempt at this AI of course :)).
SDL

http://lazyfooproductions.com/SDL_tutorials/index.php
After learning C++ for about 4 or 5 months, I jumped right into DirectX, but that was a mistake. I didn't yet have the knowledge to understand what was going on, so I just copied a framework out of a book (a crappy one at that) and didn't really learn anything. I'm now having to go back and learn things the right way, so I would recommened starting with a simple 2D API like Allegro or SDL.
------------------------------Support the Blue Skies in Games Campaign!A blog... of sorts.As a general rule, if you don't have a general rule in your signature, you aren't as awesome as someone who does. General rules roxor teh big one one ones.

This topic is closed to new replies.

Advertisement