06.23.05
Campaign Developer
I have been trying to learn new things recently. Starfighter didn’t go too far with that after the looping and what not. That project is now on the backburner and will be for some time. So, anyways……
During LAE I learned how to create a basic window’s application, as that is all I needed to do. The rest was just drawing to the screen and all of that. I never made menu bars, dialogue boxes, tab menus, push buttons and other things. So, that is my quest now.
Added to my ever growing list of projects is Campaign Developer. It is officially my first Win32 “program”. Campaign Developer (referred to as cdev) will do several things. It is geared mainly at providing an adaquete environment to write a Dungeons and Dragons (D&D) campaign without switching programs. It will provide a dice roller, randow town generator (thank you for copy any paste), random treasure generator, note sheet and a few other features (hopefully). As with most programs, they advance quickly at times and slowly at other times.
Currently cdev sports a nice dice roller, which is capable of rolling 1000d1000 (that is, rolling one thousand one thousand sided dice) and displaying quite a bit of information. It will display the total (all rolls combined), average (total/number of rolls), and then display -each- individual roll. It defaults to 1d20 (one twenty-sided die).
It also features an about box, which was essentially my test dialogue box but will contain the current version number and any credits/comments I feel like putting in there.
The last few features are the newest. The program can open, close, save, save as, or create new campaigns. Currently, a “campaign” is just the name, world, author, filename and projected level range of the full adventure. Later it will include much much more.
This program still has a long ways to go. Don’t expect this to be the last post!
Current export of code (and future updates):
http://www.nick-cash.com/download/c-dev
Nicholas E. May said,
June 29, 2005 at 12:04 am
By coding for Windows, you lock your users in and run the risk of having your code not be compadible with any future versions of Microsoft Windows.
There is, of course, the arguement for doing this as a purely intellectual excercise, to learn the quirks of coding something that will be used in a GUI. However, why bother teaching yourself all of this if you then code for X under GNU/Linux?
This, in turn, raises the question of why code for GNU/Linux? It’s a matter of Freedom, sharing and longevity. Or, you could, in the best of all worlds, code in a platform-independent manner.
My usual 2 cents.
Odis said,
June 29, 2005 at 7:25 pm
Campaign Developer isn’t really a program for people to use and modify. I provide the code just because it may sport some feature that people might be interested in. Not to mention I always like scanning other people’s code, so I doubt I’m the only one.
Campaign Developer also is no testement to usefulness. It is just one of those programs I wanted to make so I could learn something I didn’t already know. I knew how to create a window and draw to it since that was involved in my LAE project, but I had no idea how to use the MDI, menu’s, dialogue boxes (not popups, dialoges
) and the like. It is one more thing I can say I have accomplished. I know how it works, in case I want to do it in the future.
I’ve been programming on linux since I started my MUD back in 8th grade (which means I’ve used it a bit longer then windows
). I agree, programming in a platform independant manner is fantastic, but it is quite impractical at times. If there is a program you know you will never use anywhere else, why bother? Of course, this is a perfect reason to use some of the nice GUI development tools out there, like FLTK, Allegro or SDL. However, before I use them I like to know what they are doing. If I have done it myself first, I can do it again later, and I can further more appreciate the service they provide.
In short, you can expect to see some SDL program’s soon, as that is where I’m heading. But I like to build a foundation first.