Rogue is a dungeon crawling video game first developed by Michael Toy and Glenn Wichman around 1980. It is generally credited with being the first "graphical" adventure game, and was a favorite on college Unix systems in the early to mid-1980s, in part due to the procedural generation of game content.

-- http://en.wikipedia.org/wiki/Rogue_(computer_game)

Thursday, August 12, 2010

In Scottland they speak English

There is English and there is English.  I am from the US and have what is as close to what is the "Neutral US Accent."  This is the accent of the majority of news casters and for the most part the non-metropolitan east coast accent.  Being a geek I grew up with Monty Python and other British TV as well as spent some time in Australia.  And for the most part I never had an issue understanding most other non-US English speakers.  The vocabulary may change, but I could still understand what the words were said if I did not fully understand the context of the words.  Then there is Scotland.  In theory they speak English, but it is fairly difficult to tell at times. 

What does this have to do with programing?  Quite a bit.  There is C and C++ and for the most part it is all the same.  However everyone puts their own accent on it.  Since I am now learning DirectX, I am learning to understand the vocabulary used by Microsoft API base programs and able to translate in to my own understanding of the languages.

However, I am doing it in the most curious of ways.  I started with the DirectX 9 Tutorials from MSDN as I mentioned before.  But there was quite a bit of details missing.  Now I am going though Programming Role Playing Games with DirectX by Jim Adams.  The particular edition I have uses DirectX 8. Of course in reality I should be working with DirectX 10 or 11. So here I am flipping between that book, the MSDN site as well as the occasional Googling to see what other people have done.


I feel like I am having to translate English to English and back in to English again.  If Russian were in the middle, I could have gotten: "The Vodka is strong, but the meat is rotten."

Tuesday, August 10, 2010

Looks like a Duck

It has been a few days playing with DirectX and the tutorials from MSDN.  As tutorials go, the MSDN collection is fairly weak.  Lots of steps missing that you need to go research or already know.  Very little in the way of explanation.  On the upside it was nice to know that I could fill in the holes myself, and that I have learned quite a bit so far.

Like the Win32 API, DirectX (at least version 9) is much closer to C than C++.  Even glancing up at version 10 and 11, it is still very much the same. One of the scary parts I found was:

if(FAILED(g_pVB->Lock(0, 0, (void**)&pVertices, 0)))
        return E_FAIL;

Egads.  Casting void pointer to pointer of a reference.  Perfectly legitimate C code, and quite common to see.  But always a construction that makes me curious about the "power" of C when you need to go though some interesting hoops to pass the data you need around.  Ideally this would be a rare thing.  You take care of this level of detail once in your lower level engine code and not worry about it when you are designing your game at the upper level. 

So now to find some more in depth information.  Looks like I am finally signing up for Safari Books again.  Primarily because the one book that is recommended to me is out of print, but is available there for reading online.  This way I can take a look at other books as well and determine which ones I will want to purchase for my own library.

Thursday, August 5, 2010

Character Is What You Are In the Dark

The past few days have been adventures in to the Win32 API.  After all the elegance of playing with the STL and creating classes, I have gone back to fairly basic C style coding.  Not only that, C-style coding with Microsoft style tags and means.  I can see the various Visual Basic influences as well as some other old school language methods. 

Now to be fair, this API has been around for over 15 years.  So it does pre-date the formalization of C++ and it is based on the early DOS methods of doing things.  The API is easier to deal with than pure C.  I do get more useful functions like WriteFile() and CreateFile() instead of write() and creat().  So when I was looking around for good resource books on the topic, the one that everyone mentions is Programing Windows by Charles Petzold.  The book was last updated in 1998.  Normally I am very leery of technical books over 5 years old, but it seems that the API has not changed too much since then.  What little has been added is documented well enough on the MSDN website.

It is the Microsoft Foundation Classes (MFCs) that are the "object-oriented" programing tools for windows, and that is what brings you back up to C++.  (Or Visual Basic and C#)

At this point, I got what I needed from the tutorial, that is enough information to read the road maps and signs for playing with DirectX.  Now I am no longer befuddled by LPTSTR or HWND.  I can see what they are obfuscating.

Tuesday, August 3, 2010

A New Begining

After putting a stop on Maze Mover, I have decided to take a few steps back and learn some basic Windows Programming.  Well at least the Win32 API.  Mostly this is because I am going to work with DirectX so I should get familiar with the Windows based calls. 

The SDL API did some interesting changes on top of the standard Win32 API while using Visual C++.  Then again SDL is meant to be more platform independent, so it might have to step on some established toes.  Right now this is my suspected reason for the conflicts I had with Python. 

Now I did some of the basic "Hello World" apps from MSDN, but it was a little lacking on describing all the Window-isms.  Mainly what are all these typedefs they have running around like "LPSTR."  After a bit of googling I am now running though theForger's Win32 API Tutorial.  And it is doing what I want.  Telling me what all the little bits mean.  I was at the point where there were too many foreign items I had to figure out and no Rosetta Stone to start determining my translations.

This site looks to be as good of a start as any.