Posts Tagged ‘ C++ ’

  • Advanced Control Flow - Switch Statements
    3 responses - Posted 08.22.08

    A switch statement allows you to control the flow of your program similar to if and else statements, but can be easier for the user to understand.
    The Switch Statement
    The structure of a switch statement is the following:
    switch(expression) {
        case <constant_expression>  :
        statements
        break;
        case <constant_expression> :
        [...]

    continue
  • How to modify and run our source code for OpenGL/SDL projects
    no responses - Posted 08.21.08

    Wondering how to modify or run our source code for our OpenGL/SDL projects in order to start editing and learning how to make video games? No worry. Below, I’ll run you through the 3 steps in order to do so. (Yes, your heard it right, simply 3).

    Setting up your enviornment
    Step 1
    First things first, visit Codeblocks [...]

    continue
  • Classic Pong Source Code Released
    1 response - Posted 08.18.08

    I finally got around to finish my version of Pong. It isn’t true to the original game, but resembles it somewhat in game play. This isn’t supposed to be a deep game, simply a downloadable game that you can modify in order to learn how to make a simple video game.

    How to get started
    You simply [...]

    continue
  • Game Source Available
    no responses - Posted 08.14.08

    Just wanted to keep everyone up to date and let you all know that the source code for the Piranha Plant, Wario, and Coin Game has been posted to the forums.

    Go ahead and give it a try, it will be a great experience to see what was put into making that simple game. Make a [...]

    continue
  • Command Line Arguments
    no responses - Posted 08.02.08

    Command Line Arguments allow the user to run the program thruogh the terminal as well as pass in arguments into your program in one line. Most common use of command line arguments, are to pass in “strings” that represent file names from which you are going to read data from.
    Format of Command Line Arguments
    This is [...]

    continue
  • Advanced Control Flow - The Do While Loop
    no responses - Posted 08.02.08

    The Do While Loop is a loop that guarantees execution of the statements within the loop at least once.
    The structure of the Do While Loop
    Below is the structure:
    do {
    //statements
    } while ( condition(s) ) ;
    What is this useful for? In order to execute a set of commands at least once.

    continue
  • Introduction to Functions
    no responses - Posted 07.25.08

    Functions allow you to perform the same operation on many inputs with one simple call.
    Why a function anyways?
    First of all, let’s see how we’d perform a certain task without one. How would we print out the entire contents of a vector each time we modified it? Let’s show how we would do it once. [...]

    continue