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, May 27, 2010

Off the Path

Today I did a small detour in to the Microsoft Windows API. Just did the old faithful Hello World, and a simple screen form. I have never been a fan of the whole "Design the interface then do the code" style that most form builders use. And Visual Studio is no different.

Though part of the problem in the past is that I was trying to learn the language as well as the Form Design. The design tool hid too many things going on in the background. Now, I am not struggling with the back end language. I can look at the code and see that is C++ structures in the MS style. Since I know what is really going on in the background, I don't mind missing the main() function.

Also I was poking around to see what the various smart phones were using for development. I might take some time to rewrite the Connect Four app to work on the Palm and/or iPhone. Unfortunately they use different base codes. Pre (and the Droid) uses a Java based language and Apple products use Objective-C. On top of that, each one has a different preferred IDE. And there is Flash as well which works on some phones. Still maybe when I want to take a long detour I will play with those.

So I think I will wait till I am much more comfortable with C++ and when I am not thinking about fundamental gaming concepts.

Today's new trick was overloading operators. I decided to make my position type be able to handle addition, assignment, and scalar multiplication. This will allow me to more succinctly do camera offsets. As such, the Display Surface now has a camera setting as well so it can scroll around larger images. Next up is doing a Board class. I plan on spliting it to both a tile based board as well as a static image board.

With the recent 30th birthday of Pac-Man, I plan on doing my own version of that after I get these parts in order. Hence both a Tile and Static image board. Pac-man is a good AI exercise as well.

Sort of "reading ahead" I know that I will start to learn more sophisticated algorithms soon. Collision Detection can get pretty hairy as you add more entities. The number of possible collisions goes up by n!. Also I will have to take a look at procedural map creation. Fortunately all of these are "solved" problems. I am not the first one to be doing this so many of the algorithms are defined. I just will need to translate them in to my code.

0 comments:

Post a Comment