First entry
958
5
Advertisement
Well, this is my first journal entry. I have been fooling around with programming for a while, and I took a few C and C++ classes in college. I use MATLAB at work so I have some programming background (not much).
I currently work as a mechanical engineer designing homeland security barriers (big cables and chunks of concrete to stop vehicle bombs). I am also preparing to take the Patent Bar Exam to expand my career options (and my wallet). I have always made games for my own enjoyment (and my friends), so far these have been of the board, card, and PnP RPG variety. I have always been interested in video games.
This marks the start of my serious attempt at learning how to program. Everything I have done up till this point has been in a console box (or high level interpreted stuff like MATLAB). One of my first larger goals is to learn how to interact with Windows. This will give me some immediate gratification (useful to keep me going) and some understanding of how Windows works (chances are there is not much career future in DOS games).
Since I have a basic knowledge of C and C++ I will be using these languages to learn with. I will be using the Dev-C++ compiler because I am somewhat (but not very) comforatable with it. I downloaded Visual Studio Express the other day
but could not get some things I already knew how to do working on it. Also I could not seem to make it find . This is a hassle I don't need while I am starting.
I have purchased a whole bunch of game programming books over the years. I would start on one, then school would get in the way, and I would be put it aside. I have a good enough library from this (and picking things up when they didn't sell at the major retailers and hit the $10 rack) to start with. I spent last night looking through them for one that seems to have a good overview of starting out in Windows programming (getting a window to open would be nice). I selected OPENGL Game Programming by Hawkins and Astle, I liked the look of its Windows section the best. I will base (but not limit) the first part of my study on this book. I also have at my disposal a print out of the NeHe tutorials, and a book OpenGL Programming Guide 5th ed. that is available at work.
After reading through the first few sections my first attempt will be to make the Hello World pop-up box.
As I read through the function description for WinMain I notice that lpCmdLine is a string that holds any command line parameters. Time for an experiment:
Good, by running my executable from the command line I can dicatate the message box contents via command line parameters. It is always nice when stuff works like you expect it to.
I currently work as a mechanical engineer designing homeland security barriers (big cables and chunks of concrete to stop vehicle bombs). I am also preparing to take the Patent Bar Exam to expand my career options (and my wallet). I have always made games for my own enjoyment (and my friends), so far these have been of the board, card, and PnP RPG variety. I have always been interested in video games.
This marks the start of my serious attempt at learning how to program. Everything I have done up till this point has been in a console box (or high level interpreted stuff like MATLAB). One of my first larger goals is to learn how to interact with Windows. This will give me some immediate gratification (useful to keep me going) and some understanding of how Windows works (chances are there is not much career future in DOS games).
Since I have a basic knowledge of C and C++ I will be using these languages to learn with. I will be using the Dev-C++ compiler because I am somewhat (but not very) comforatable with it. I downloaded Visual Studio Express the other day
but could not get some things I already knew how to do working on it. Also I could not seem to make it find . This is a hassle I don't need while I am starting.
I have purchased a whole bunch of game programming books over the years. I would start on one, then school would get in the way, and I would be put it aside. I have a good enough library from this (and picking things up when they didn't sell at the major retailers and hit the $10 rack) to start with. I spent last night looking through them for one that seems to have a good overview of starting out in Windows programming (getting a window to open would be nice). I selected OPENGL Game Programming by Hawkins and Astle, I liked the look of its Windows section the best. I will base (but not limit) the first part of my study on this book. I also have at my disposal a print out of the NeHe tutorials, and a book OpenGL Programming Guide 5th ed. that is available at work.
After reading through the first few sections my first attempt will be to make the Hello World pop-up box.
//Hello World in Windows#define WIN32_LEAN_AND_MEAN //trim down the libraries#include //main windows headersint WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nShowCmd){ //message box with Hello World MessageBox(NULL,"Hello World", "First",NULL); return 0;}As I read through the function description for WinMain I notice that lpCmdLine is a string that holds any command line parameters. Time for an experiment:
//Hello World in Windows#define WIN32_LEAN_AND_MEAN //trim down the libraries#include //main windows headersint WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nShowCmd){ //message box with command line string MessageBox(NULL,lpCmdLine, "First",NULL); return 0;}Good, by running my executable from the command line I can dicatate the message box contents via command line parameters. It is always nice when stuff works like you expect it to.
Advertisement
Advertisement
Advertisement
Discussion