Adventures in Game Development -- Day 20

21 comments
Next week I have exams, so this week is boring, with very little game development going on. As I have to spend a lot of time studying, I have only a little bit of time to read about C++, but not implement anything.

Tomorrow though, I will discuss prototyping functions, which is something I just recently learned.

Thank you for continuing to follow and comment on this blog. Once the next two weeks are over, I'll be on summer vacation and in game development overdrive :)

Adventures in Game Development -- 19

11 comments
Hey guys, unfortunately I don't have a great update for today. Instead, I have a pretty boring update.

Today was spent learning more C++. I have pretty much mastered all of the C parts of C++. For most that probably sounds stupid, so I'll explain it.

C++ is a language that sort of has two sections. The first section -- the C part -- is the procedural aspect of the C++. This is pretty much all of the stuff I've covered so far in this blog. The second section of C++ is object oriented. I don't know much about object oriented programming -- yet -- so I'll just tell you that this portion of C++ allows for jumping around the program.

Considering C++ was originally called C with Classes, object oriented programming is a very important part of C++ and something that I need to start learning right away.

Adventures in Game Development -- Day 18

12 comments
Today I took me first steps in learning Python. I didn't know much about the language before stepping in, other than it was easier than C++. Now, after having learned some of the language, I can safely say that it is much easier.

Here are some examples of how Python is easier than C++:

To declare any variable in C++, you have to precede the variable name with a type, like

Int variablename;
Or
Char variablename;

But in Python, you don't need to give a type, the language figures that out itself. So for example, this is how you declare a variable in Python

Variablename = 10

As you can see from above, Python also doesn't need anything to represent ending a line. So while you type a semi-colon is C++ to end the line, you type nothing and just move onto the next line in Python.

Outputting to the console is also much easier in Python. Here's some basic output in C++

Int variablename = 10;

cout << "The variable name equals " << variablename << endl;

The same in Python is

variablename = 10

print "The variable name equals", variablename

Finally, if/elseif/else statements are also easier in Python. An if/else statement in C++ is written like this

if(variablename > typename)
       cout << "variablename is greater than typename << endl;
else
       cout << "variable name is not greater than typename << endl;

The same exact statement in Python is

if variablename > typename:
       print "variablename is greater than typename
else:
       print "variable name is not greater than typename

This is why I really like Python. While it may be slower than C++ and other programming languages in execution, its very English-like syntax makes it quite easy to write.

Follow My Other Blogs

16 comments
While I always enjoy blogging about my experiences learning to program, I also enjoy blogging about other things. Because of this, I have started two other blogs.

You can click the links below to follow my other blogs:


http://gamesonmyiphone.blogspot.com/


http://casuallyanime.blogspot.com/
Thank you in advance for supporting my other blogging endeavors.

Adventures in Game Development -- Day 17

13 comments



Today I embarked on learning some of the Python programming language. Python is a scripting language which makes it great for implementing into C++. Because of this, I feel that it is good to know while I'm finishing up learning C++

So far Python has been quite easy. Python aims to be more like English than C++, which makes learning it fast quite easy.

I hope to learn Python quickly and mabey pickup Pygame (an off-shoot of SDL for Python) before I beging writing a game with regular SDL and C++.

Adventures in Game Development -- Day 16

9 comments
After making my WEP cracking game more efficient, I decided to take a little break from it by working with SDL. For those who don't remember, SDL is the graphics API for C++ that will allow me to make graphical games. Unfortunately, there is quite a learning curve for SDL.

So far, I've had lots of trouble trying to learn SDL. My biggest problem is that there aren't many good tutorials that guide you through all of the SDL functions. I can learn the syntax of C++ and the syntax of SDL, but I'm having trouble gluing them together.

The tutorials I've used so far have been unsuccessful. However, I found a tutorial website that looks to be better than what I've found so far. For the next week or so, I'll be covering one tutorial from the SDL portion of the site  per day.

Here's a link to the site for anyone who wants to check it out: http://sol.gfxile.net/gp/ch01_devcpp.html

Adventures in Game Development -- Day 15

19 comments
Today was all about the for loop. In my previous code examples I showed how I was simulating a download progress bar in the command prompt, but it wasn't very efficient. This has been solved with the use of the for loop. Here's the new code using the for loop:

     cout << "Beginning download" << endl;
     int begin = 1;
     
          for(begin; begin <=100; begin++)
          {
                    cout << begin << endl;
                    Sleep(200);
          }
Basically, this loop is given three commands. The first command tells it that the integer  "begin" is being used. The second command tells it to display what is inside the loop while it is less than or equal to 100. The final statement tells the program to increment each time the loop is passed. Inside the loop, the integer "begin" is displayed, and the compiler sleeps for two milliseconds in between each display.

Once compiled and run, this loop displays the numbers 1 through 100, with a two millisecond delay in between.

Adventures in Game Development -- Day 14

11 comments
So today I'm going to tell you how what the code from yesterday means. Opposed to going line by line, explaining everything, I'm instead just going to explain what the major parts of the program mean.

First, "cin" means console input. This is where people type into the console.

"if(selection == 1)"  means that if the user inputs one as their selection, the following code will execute.

"cout" means console output. This is all of the stuff that gets displayed in the console window.

"Sleep()" is a function I have explained before. Basically, it pauses the output in the console.

"endl;" ends the line. This pretty much simulates pressing the "enter" button in the console output.

Any text between quotation marks are strings.

"else" is what executes if the user types anything other than 1 (more options will be added soon).

"char" is a character.

"||" is an or operator.

Hopefully I've explained everything that may be foreign to someone who doesn't know C++. If you use the above as a guide, you should be able to piece together at least a basic understanding of what is happening. Trust me, none of this is advanced so anyone with at least a little bit of knowledge in C++ won't even need the above information. If you have any trouble understanding what is happening, I recommending reading a basic C++ tutorial online.

Adventures in Game Development -- Day 13

5 comments
As promised, here is how the content of yesterday's blog will be implemented into WEP Cracking: The Game.


 cin >> iSelection;
                 
                 if (iSelection == 1)
                 {
                    cout << "BackTrack Linux is starting." << endl;
                    cout << "Starting up__" << endl;
                    Sleep(500);
                    cout << endl;
                    cout << "sd 2:0:0:0: [sda] Assuming drive cache: write through." << endl;
                    cout << "sd 2:0:0:0: [sda] Assuming drive cache: write through." << endl;
                    Sleep(600);
                    cout << "Loading, please wait..." << endl;
                    Sleep(800);
                    cout << "Setting preliminary keymap...";
                    Sleep(50);
                    cout << "done" << endl;
                    cout << "Setting the system clock." << endl;
                    cout << "Starting basic networking...done." << endl;
                    cout << "Starting kernel event manager...done." << endl;
                    cout << "Loading hardware drivers...done." << endl;
                    Sleep(400);
                    cout << endl;
                    cout << endl;
                    cout << ". " << endl;
                    cout << "Setting the system clock." << endl;
                    cout << "Loading kernel modules...Loading manual drivers...done." << endl;
                    Sleep(400);
                    cout << "Setting kernel variables (/etc/sysct1.conf)...done" << endl;
                    cout << "Setting kernel variables(/etc/sysct1.d/10-console-messages.conf)...done." << endl;
                    cout << "Setting kernel variables(/etc/sysct1.d/10-network-security.conf)...done." << endl;
                    cout << "Setting kernel variables(/etc/sysct1.d/10-process-security.conf)...done." << endl;
                    cout << "Setting kernel variables(/etc/sysct1.d/wine.sysct1.conf)...done." << endl;
                    cout << "Starting early crypto disks...done." << endl;
                    cout << "Starting remaining crypto disks..." << endl;
                    Sleep(50);
                    cout << "done." << endl;
                    cout << "Checking file systems..." << endl;
                    Sleep(50);
                    cout << "fsck 1.41.3 done." << endl;
                    cout << "Mounting local filesystems...done." << endl;
                    cout << "Activating swapfile swap...done." << endl;
                    cout << "Skipping firewall: wfw(not enabled)...done." << endl;
                    cout << "Setting up console font and keymap..." << endl;
                    Sleep(50);
                    cout << "done." << endl;
                    cout << "Loading cpufreq kernel modules..." << endl;
                    Sleep(50);
                    cout << "done." << endl;
                    cout << "Loading ACPI modules..." << endl;
                    cout << "Starting ACPI services..." << endl;
                    cout << "Starting system log daemon..." << endl;
                    cout << "Doing Wacon setup..." << endl;
                    cout << "Starting kernel log daemon..." << endl;
                    Sleep(100);
                    cout << "done." << endl;
                    cout << "Starting system message bus: dbus." << endl;
                    cout << "CPUFreq Utilities: Setting ondemand CPUFreq governor...disabled, governor not available...done." << endl;
                    Sleep(200);
                    cout << "xserver-xorg postinst warning: overwriting possibly-customized configuration" << endl;
                    cout << "             file: backup in /etc/X11/xorg.conf.200911261994438" << endl;    
                    Sleep(50);
                    cout << "Starting Hardware abstraction layer: held" << endl;
                    cout << "Starting System Tools Backends: system-tools-backends." << endl;
                    Sleep(50);
                    cout << "Starting periodic command scheduler: crond." << endl;
                    Sleep(50);
                    cout << endl;
                    cout << "Backtrack 4 Penetration Testing and Auditing Distribution" << endl;
                    cout << endl;
                    cout << "Type 'startx' (without quotations)" << endl;
                                        
                    long istartx;
                    cin >> istartx;
                    if(istartx == 'STARTX' || istartx == 'startx')
                               cout << "root9bt:~# " << istartx << endl;
                               cout << endl;
                               cout << "X: warning: process set to priority -1 instead of requested priority 0" << endl;
                               Sleep(25);
                               cout << "X.Org X Server 1.5.2" << endl;
                               cout << "Release Date:10 October 2008" << endl;
                               cout << "X Protocol Version 11, Revision 0" << endl;
                               cout << "Build Operating System: Linux 2.6.24-19-server i686 Ubuntu" << endl;
                               cout << "Current Operating System: Linux bt 2.6.29.4 #3 SMP Mon May 25 18:50:05 EDT 2009 i686" << endl;
                               cout << "Build Date: 09 March 2009  10:48:54AM" << endl;
                               cout << "xorg-server Z:1.5.Z-Zubuntu3.1 (builddProthera.buildd)" << endl;
                               cout << "            Build reporting problems, check http://wiki.x.org" << endl;
                               cout << "            to make sure that you have the latest version" << endl;
                               Sleep(50);
                               cout << "Module loader present" << endl;
                               cout << "Markers: (--) probed, (**) from config file, (xx) default setting," << endl;
                               cout << "         (++) from command line, (!!) notice, (II) informational," << endl;
                               cout << "         (ww) warning, (EE) error, (N1) not implemented, (??) unkown." << endl;
                               cout << "(==) Log file: '/var/log/Xorg.0.log', Time: Thu Mov 26 19:44:47 2009" << endl;
                               cout << "(==) Using config file: '/etc/X11/xorg.conf'" << endl;
                               cout << endl;
                               cout << endl;
 
 else
                 {
                     cout << "GAME OVER: You made the wrong selection" << endl;
                     cout << "Press X to exit" << endl;
          
                     char letter = 'X';
                     cin >> letter;
                     cout << "Type 'X' (without quotations) to exit" << endl;
          
                     if (letter == 'X' || letter == 'x')
                        cout << "Exit" << endl;
                        Sleep(500);
             }

For those who aren't C++ programmers, I'll explain what this all means tomorrow.

Adventures in Game Development -- Day 12

11 comments
Today I made some more progress in WEP Cracking: The Game. The progress made today was in recording what happens when booting into BackTrack Linux. For those who have never used BackTrack Linux, there is a command prompt at the beginning and it is full of computer jargon. Unfortunately, I had to copy it all down... and it took a while.

Here's what I wrote down:

sd 2:0:0:0: [sda] Assuming drive cache: write through.
sd 2:0:0:0: [sda] Assuming drive cache: write through.
Sleep(600)
Loading, please wait...
Sleep(800)
Setting preliminary keymap...done.
Sleep(50-done-)
Setting the system clock.
Starting basic networking...done.
Starting kernel event manager...done.
Loading hardware drivers...done.
Sleep(400)

.
Setting the system clock.
Loading kernel modules...Loading manual drivers...done.
Sleep(400)
Setting kernel variables (/etc/sysct1.conf)...done.
Setting kernel variables(/etc/sysct1.d/10-console-messages.conf)...done.
Setting kernel variables(/etc/sysct1.d/10-network-security.conf)...done.
Setting kernel variables(/etc/sysct1.d/10-process-security.conf)...done.
Setting kernel variables(/etc/sysct1.d/wine.sysct1.conf)...done.
Starting early crypto disks...done.
Starting remaining crypto disks...done.
Sleep(50-done-)
Checking file systems...fsck 1.41.3 done.
Sleep(50-fsck-)
Mounting local filesystems...done.
Activating swapfile swap...done.
Skipping firewall: wfw(not enabled)...done.
Setting up console font and keymap...done.
Sleep(50-done-)
Loading cpufreq kernel modules...done.
Sleep(50-done-)
Loading ACPI modules...
Starting ACPI services...
Starting system log daemon...
Doing Wacon setup...
Starting kernel log daemon...done
Sleep(100-done-)
Starting system message bus: dbus.
CPUFreq Utilities: Setting ondemand CPUFreq governor...disabled, governor not available...done.
Sleep(200)
xserver-xorg postinst warning: overwriting possibly-customized configuration
file: backup in /etc/X11/xorg.conf.200911261994438
Sleep(50)
Starting Hardware abstraction layer: hald
Starting System Tools Backends: system-tools-backends.
Sleep(50)
Starting periodic command scheduler: crond.
Sleep(50)
Endl;
Backtrack 4 Penetration Testing and Auditing Distribution
Endl;
root9bt:~#

Cin startx

X: warning: process set to priority -1 instead of requested priority 0
Sleep(25)
X.Org X Server 1.5.2
Release Date:10 October 2008
X Protocol Version 11, Revision 0
Build Operating System: Linux 2.6.24-19-server i686 Ubuntu
Current Operating System: Linux bt 2.6.29.4 #3 SMP Mon May 25 18:50:05 EDT 2009 i686
Build Date: 09 March 2009 10:48:54AM
xorg-server Z:1.5.Z-Zubuntu3.1 (builddProthera.buildd)
Build reporting problems, check http://wiki.x.org
to make sure that you have the latest version
Sleep(50)
Module loader present
Markers: (--) probed, (**) from config file, (xx) default setting,
(++) from command line, (!!) notice, (II) informational,
(ww) warning, (EE) error, (N1) not implemented, (??) unkown.
(==) Log file: "/var/log/Xorg.0.log", Time: Thu Mov 26 19:44:47 2009
(==) Using config file: "/etc/X11/xorg.conf"
The few "Sleep()" functions and such are added in by me for future reference to help me simulate the experience in the game. However, the rest of it is exactly how it appears when booting BackTrack Linux.

Tomorrow I'll blog about how the above is implemented into the code.

Adventures in Game Development -- Day 11

14 comments



Today I'm going to update my progress on WEP Cracking: The Game. Unfortunately, life and learning C++ has gotten in the way, so I haven't made much progress on the game. Despite this, there has been at least a little progress.

First, I'll explain the progress I've made. Then, I'll post my source code so far.

So far I have the beginning output that explains what the game is and gives the player its first instructions. After receiving that instruction, the player is asked to "download" a copy of Backtrack Linux. If they type "download" correctly, a download is simulated. After that, the player is tasked with burning the copy of Backtrack Linux and inserting the burned CD. The simulation for the first task runs at the same speed as the download, but the disc insertion simulation is faster.

After that, the last command of booting the Live CD is outputted. Unfortunately, that's only as far as I have gone. I also only have commands for successful execution of the instructions, not for unsuccessful executions.

It's still a work in progress, but I plan on working on the game this week and updating on the progress here each day this week.


Source Code:


#include <iostream>
#include <ctime>
#include <string>
#include <windows.h>

using namespace std;

int main()
{
    string cInstall;
    
    cout << "Welcome to WEP Cracking: The Game. The goal of WEP Cracking: The Game is to teach computer users how to test the strength of their network security. Playing this game from start to finish will give you all of the information you need to attempt to crack the password on your own router." << endl;
    cout << "Let's begin" << endl;
    cout << "First, download a copy of BackTrack Linux by typing DOWNLOAD" <<endl;
    
    getline (cin, cInstall);
    cin >> cInstall;
    
    if((cInstall == "download") || (cInstall == "DOWNLOAD") || (cInstall == "Download"))
    {
          cout << "Beginning download" << endl;
          cout << "1 2 3 4 5" << endl;
          Sleep(150);
          cout << "6 7 8 9 10" << endl;
          Sleep(150);
          cout << "11 12 13 14 15" << endl;
          Sleep(150);
          cout << "16 17 18 19 20" << endl;
          Sleep(150);
          cout << "21 22 23 24 25" << endl;
          Sleep(150);
          cout << "26 27 28 29 30" << endl;
          Sleep(150);
          cout << "31 32 33 34 35" << endl;
          Sleep(150);
          cout << "36 37 38 39 40" << endl;
          Sleep(150);
          cout << "41 42 43 44 45" << endl;
          Sleep(150);
          cout << "46 47 48 49 50" << endl;
          Sleep(150);
          cout << "51 52 53 54 55" << endl;
          Sleep(150);
          cout << "56 57 58 59 60" << endl;
          Sleep(150);
          cout << "61 62 63 64 65" << endl;
          Sleep(150);
          cout << "66 67 68 69 70" << endl;
          Sleep(150);
          cout << "71 72 73 74 75" << endl;
          Sleep(150);
          cout << "76 77 78 79 80" << endl;
          Sleep(150);
          cout << "81 82 83 84 85" << endl;
          Sleep(150);
          cout << "86 87 88 89 90" << endl;
          Sleep(150);
          cout << "91 92 93 94 95" << endl;
          Sleep(150);
          cout << "96 97 98 99" << endl;
          Sleep(150);
          cout << "100%" << endl;
          Sleep(150);
          cout << "Download complete." << endl;
          
          cout << "Next, we have to burn our BackTrack Linux ISO to a disc." << endl;
          Sleep(100);
          cout << "Type BURN to burn a disc" << endl;
          
          string sBurn;
          
          cin >> sBurn; 
          
          if((sBurn == "burn") || (sBurn == "BURN") || (sBurn == "Burn"))
          {
                 cout << "Beginning disc burn" << endl;  
                 cout << "1 2 3 4 5" << endl;
                 Sleep(150);
                 cout << "6 7 8 9 10" << endl;
                 Sleep(150);
                 cout << "11 12 13 14 15" << endl;
                 Sleep(150);
                 cout << "16 17 18 19 20" << endl;
                 Sleep(150);
                 cout << "21 22 23 24 25" << endl;
                 Sleep(150);
                 cout << "26 27 28 29 30" << endl;
                 Sleep(150);
                 cout << "31 32 33 34 35" << endl;
                 Sleep(150);
                 cout << "36 37 38 39 40" << endl;
                 Sleep(150);
                 cout << "41 42 43 44 45" << endl;
                 Sleep(150);
                 cout << "46 47 48 49 50" << endl;
                 Sleep(150);
                 cout << "51 52 53 54 55" << endl;
                 Sleep(150);
                 cout << "56 57 58 59 60" << endl;
                 Sleep(150);
                 cout << "61 62 63 64 65" << endl;
                 Sleep(150);
                 cout << "66 67 68 69 70" << endl;
                 Sleep(150);
                 cout << "71 72 73 74 75" << endl;
                 Sleep(150);
                 cout << "76 77 78 79 80" << endl;
                 Sleep(150);
                 cout << "81 82 83 84 85" << endl;
                 Sleep(150);
                 cout << "86 87 88 89 90" << endl;
                 Sleep(150);
                 cout << "91 92 93 94 95" << endl;
                 Sleep(150);
                 cout << "96 97 98 99" << endl;
                 Sleep(150);
                 cout << "100%" << endl;
                 Sleep(150);
                 cout << "Burn complete." << endl;
                 Sleep(350);
          
                 cout << "Disc being inserted" << endl; 
                 cout << "1 2 3 4 5" << endl;
                 Sleep(50);
                 cout << "6 7 8 9 10" << endl;
                 Sleep(50);
                 cout << "11 12 13 14 15" << endl;
                 Sleep(50);
                 cout << "16 17 18 19 20" << endl;
                 Sleep(50);
                 cout << "21 22 23 24 25" << endl;
                 Sleep(50);
                 cout << "26 27 28 29 30" << endl;
                 Sleep(50);
                 cout << "31 32 33 34 35" << endl;
                 Sleep(50);
                 cout << "36 37 38 39 40" << endl;
                 Sleep(50);
                 cout << "41 42 43 44 45" << endl;
                 Sleep(50);
                 cout << "46 47 48 49 50" << endl;
                 Sleep(50);
                 cout << "51 52 53 54 55" << endl;
                 Sleep(50);
                 cout << "56 57 58 59 60" << endl;
                 Sleep(50);
                 cout << "61 62 63 64 65" << endl;
                 Sleep(50);
                 cout << "66 67 68 69 70" << endl;
                 Sleep(50);
                 cout << "71 72 73 74 75" << endl;
                 Sleep(50);
                 cout << "76 77 78 79 80" << endl;
                 Sleep(50);
                 cout << "81 82 83 84 85" << endl;
                 Sleep(50);
                 cout << "86 87 88 89 90" << endl;
                 Sleep(50);
                 cout << "91 92 93 94 95" << endl;
                 Sleep(50);
                 cout << "96 97 98 99" << endl;
                 Sleep(50);
                 cout << "100%" << endl;
                 Sleep(50);
                 cout << "Download complete." << endl;
                 Sleep(150);               
 }
          
          else
          {
                 cout << "Please type BURN" << endl;
          }
          
          system("pause");
          return 0;
    }
    
    else 
    {
         cout << "Please type DOWNLOAD" << endl;
    }
}

Adventures in Game Development -- Day 10

8 comments
While working through C++ Demystified, I found a cool little code example called "The Change Machine". Here is the code:

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

int main()
{
    int total, dollars, quarters, dimes, nickels, leftover;
    cout << "Enter number of pennies to make change for: ";
    cin >> total;
    
    dollars = total / 100;
    leftover = total % 100;
    quarters = leftover  / 25;
    leftover %= 25;
    dimes = leftover / 10;
    leftover %= 10;
    nickels = leftover / 10;
    leftover %= 5;
    
    cout << "Dollars: " << dollars << endl;
    cout << "Quarters: " << quarters << endl;
    cout << "Dimes: " << dimes << endl;
    cout << "Nickels: " << nickels << endl;
    cout << "Pennies: " << leftover << endl;
    
    system("pause");
    return 0;
}
As the name implies, this program works by having the user input a number, then the change that could be made out for that number (in dollars) is outputted. Compile in an IDE to test it out for yourself!

Adventures in Game Development -- Day 9

14 comments


Lately I've been having trouble following through with the books I'm reading to learn C++. My problem isn't with growing bored of the books, but instead I just find myself confused and disoriented with the examples about halfway through. 

For example, I tried reading -- the highly recommended -- "Without Fear C++". I was doing great with the book, until I got to around page 150. All of a sudden, the examples began using stuff that I wasn't familiar with. A few pages later, I had to drop the book because I was confused about what was happening. It felt as though I had skipped a chapter or something because nothing was making any sense to me. 

Without Fear C++ was about the third book I'd tried to read and had to end up dropping for the reason mentioned above. I probably haven't been reading the best C++ books available, but if this keeps continuing, my problem is going to get very frustrating. 

Today, I went to my local library and picked up two C++ books they had there: C++ Demystified, and C++: A Beginner's Guide. So far, I am 83 pages through C++ Demystified, and I'm following along pretty well. Nothing has jumped out and scarred me in the code, so I am optimistic  that this is the right C++ book for me. 

However, the book doesn't look to cover the advanced parts of C++ and only dabbles into object-oriented programming -- one of the biggest, if not the biggest part of C++. This is where C++: A Beginners Guide looks to jump in as it covers everything from object-oriented programming to polymorphism. 

Now a question for you readers. Is there any great C++ books you would recommend. I'm looking into getting C++ Primer 5th Edition, as I've heard good things about it. If there are any C++ books you want to recommend, please leave them in the comments and I'll look into them. 

Adventures in Game Development -- Day 8

15 comments



Today I learned a pretty cool function in C++. Unfortunately, this cool function isn't as awesome as it could be as it isn't cross-platform.

The function is the the "sleep function". To use it, you simply type "Sleep()" (capitalization is important) along with a number in between the paranthesis. The number between the parenthsis determines how long the code "sleeps" before it begins again.

I used this function in WEP Cracking: The Game to better simulate downloading a copy of BackTrack Linux. Here's some example code:




    getline (cin, cInstall);
 
    if((cInstall == "download") || (cInstall == "DOWNLOAD") || (cInstall == "Download"))
    {
          cout << "Beginning download" << endl;
          cout << "1 2 3 4 5" << endl;
          Sleep(150);
          cout << "6 7 8 9 10" << endl;
          Sleep(150);
          cout << "11 12 13 14 15" << endl;
          Sleep(150);
          cout << "16 17 18 19 20" << endl;
          Sleep(150);
          cout << "21 22 23 24 25" << endl;
          Sleep(150);
          cout << "26 27 28 29 30" << endl;
          Sleep(150);
          cout << "31 32 33 34 35" << endl;
          Sleep(150);
          cout << "36 37 38 39 40" << endl;
          Sleep(150);
          cout << "41 42 43 44 45" << endl;
          Sleep(150);
          cout << "46 47 48 49 50" << endl;
          Sleep(150);
          cout << "51 52 53 54 55" << endl;
          Sleep(150);
          cout << "56 57 58 59 60" << endl;
          Sleep(150);
          cout << "61 62 63 64 65" << endl;
          Sleep(150);
          cout << "66 67 68 69 70" << endl;
          Sleep(150);
          cout << "71 72 73 74 75" << endl;
          Sleep(150);
          cout << "76 77 78 79 80" << endl;
          Sleep(150);
          cout << "81 82 83 84 85" << endl;
          Sleep(150);
          cout << "86 87 88 89 90" << endl;
          Sleep(150);
          cout << "91 92 93 94 95" << endl;
          Sleep(150);
          cout << "96 97 98 99" << endl;
          Sleep(150);
          cout << "100%" << endl;
          Sleep(150);
          cout << "Download complete." << endl;


Now for the bad...

This function requires the windows header file, which means it is not cross-platform. This is enough for me to NOT use it in the final product. I have it in there now because I was learning about it, but before I'm finished, I'll be swapping it with a cross-platform alternative.

It really sucks because "Sleep()" is quick, easy, and fills a specific need. Hopefully the alternative I find is just as easy.

Adventures in Game Development -- Day 7

14 comments
The beginning of WEP Cracking: The Game

Today I decided to take a break from C++ and apply my current programming knowledge to start making a small console application game.

The game, tentatively titled "WEP Cracking: The Game" (I know, it's so original), is meant to teach people how to test the security of their home networks by attempting to crack the WEP code on their wireless router. The game is unfortunately quite simple and will only really be able to be played once per player. However, that is fine for my very first game.

My goal is from now on is to continue learning C++ and continue developing "WEP Cracking: The Game". From there, I plan to either move onto -- the pesky -- Allegro 5 and build some graphical games or stay with console applications for one more game and create a simple text adventure.

Either way, games are being made and I am happy :)

Adventures in Game Development -- Day 6

10 comments


Another day, another C++ lesson.

Today was a bit of a miss for learning C++. I'm still very motivated to learn, but other, more important things got in the way. Despite that, I did learn two new things.

The first was functions. In my previous programming experience with RobotC, we called these sub-routines. Basically, functions allow you to constuct some code and call on it easily throughout your program with a simple declaration statement. This makes pieces of code that need to be repeated throughout a program much easier to write and manage.

The second thing I learned, which is tied to functions, is recursion. Recursion isn't very easy to explain, so I won't bother trying. The concept is fairly easy to pick up, but it's one of those things that I'm not really confident in my knowledge of it. Tomorrow I'm going to go over recursion once again and make sure it sticks in my head.

The amount of stuff that I'm eager to learn is a bit overwhelming, but I just have to keep reminding myself: "slow and steady wins the race".

Adventures in Game Development -- Day 5

23 comments


Today was another C++ day.

I've pretty much mastered the basics of C++. From memory, I can structure a C++ document, input and output information from the console, declare and give value to variables, create while, do, and for loops, and if/else statements.

While I have mastered that much, it's only a small amount of the language. There is still LOTS I have to learn.

 The newest thing I learned today was how to create random numbers. I only learned how to use the simplified rand() function, but it will serve me well for now. There is a much more complex way of producing random numbers, which also produces a better result, but that is past my current skill level.

Adventures in Game Development -- Day 4

5 comments


Today started with me spending some more time with Allegro. After a few hours of messing with Allegro, I've decided to go back and learn some more C++

That's pretty much it for day 4. Sorry for the small blogpost, but there isn't any more to say. Hopefully tomorrow I will learn some cool things in C++ that I can discuss tomorrow.

Adventures in Game Development -- Day 3

8 comments


After my terrible failures yesterday in regards to installing SDL and Allegro, today turned out to be 100% better.

My main focus of the day was to get Allegro up and running. I started early this morning and was determined to not stop until Allegro was fully functioning. About three hours later, Allegro 5 was fully installed with Visual Studio 2010 and I was happy.

But not everything is sunshine and rainbows.

While being able to work with the latest and greatest Allegro 5 is great, it is so new that there are barely any tutorials for it. Books, such as the popular "Game Programming All in One" only support Allegro 4. I'm now stuck trying to decifer how to use Allegro 5 with barely any guidance.

It is becoming quite clear that this is going to be a difficult journey, but I'm ready for it.

Adventures in Game Development -- Day 2

9 comments



To start day 2, I read up on some more of the basic C++ topics. I didn't get too far into reviewing the topics though before getting bored. I decided to take a break from basic C++ and move over to using SDL.

I attempted to install SDL with Dev-C++ using this guide at LazyMonkey. Unfortunately, it didn't work out as planned and I kept getting an error. Thinking it was just Dev-C++, I moved over to Visual Studio 2010 and attempted to install SDL there. Once again though, I failed. Finally I went out on a limb and tried using SDL with Eclipse. The guide at LazyMonkey shows how to install SDL with Eclipse, but the guide is outdated and the location of some settings have changed.

So to summarize the above paragraph, I'm a colossal failure.

Frustrated, I decided to go back to learning C++. I spent the rest of my day switching between learning C++, and trying to install the Allegro API. Much like SDL, I failed multiple times trying to get Allegro working.
Hopefully tomorrow I can get SDL or Allegro working so that I can begin working on games. But for now, I'm going to continue learning C++.

Adventures in Game Development -- Day 1

11 comments


Day 1 consisted of me learning C++. As I said in my introduction, I have a programming background, so going through the basics of C++ was review for the most part.

Some of the topics I went over were:

  • Compiling and executing code
  • Comments
  • Whitespace
  • Main function
  • Input/Output
  • Namespaces
  • Including header files
  • Variables
  • Variable conversions
  • Constant variables
  • Macros
  • Scope
  • Arithmetic operations
  • Operators
  • If/ Else statements
  • Switch statements
  • While loops
  • Arrays

It's so far, so good concentration-wise. When I tried to learn Visual Basic, I found it so boring that my mind was wandering and I couldn't focus. I made my way halfway through VB 2010 and just gave up. But with C++, I feel so much more motivated and interested. Plus, my productivity is so much better with C++  Hopefully my love of C++ grows and I don't end up getting bored.

That's all for today. Tomorrow I plan on learning more C++ and experimenting with some 2D game engines in between learning sessions.

Cha Cha Cha Cha Changes

3 comments



So, only a little over two weeks in and I've decided that tutorial making isn't for me. I sort of enjoyed making them, but planning, recording, editing, etc. takes a long time. Plus, I wasn't completely happy with the product I was putting out.

Now that I've covered why I'm changing, we need to discuss what I am changing to.

Starting the other day, I decided to take up learning C++ and video game development. I've previously learned HTML and CSS, and I've dabbled in the incredibly boring and monotonous Visual Basic, so I'm going into C++ with previous programming experience.

From here on out, I'll be writing a daily blog about my adventures with video game design. As part of this shakeup, I'll be deleting my old posts (whenever I get around to it) and more importantly, changing my blog name. I'm not sure what to change my blog name to, so I'm letting the commenters on this blog to pick. 

So there you have it. A new blog style, a new blog name, a new blogger (as in person who blogs, not the name of this service). I hope the fans of my tutorial videos stick around and follow me through my game development adventures.

Thanks for reading.