Tuesday, June 19, 2007

Why not Wesnoth?

Would you like to learn how to program? How about make a game? Wouldn't it be cool if your game could have cool graphics, music, sound effects and network access? Well, we are going to do all of this and much more!

Our gateway into programming, The Battle for Wesnoth is an amazing fantasy themed game and community based on GNU code. Debian or Ubuntu users can simply apt-get install wesnoth-all or use Synaptic to auto-magically get it up and running.

I suggest you spend time just playing the game to get a feel for how it works and then go online to see the innovative directions people are taking it. Yes, I know that playing games is hard work. I feel a trouper, such as yourself, can handle it. :P

Our first steps into the Wesnoth programming world are going to be with WML (Wesnoth Markup Language). If you have any exposure to HTML, then WML is going to be a snap. Start with the Create and Building Scenarios sections. Under Ubuntu your data is in the ~/.wesnoth folder and maps are a made with the wesnoth_editor command. If you get stumped, or want some example code, the forum is just a click away (I especially like the rumble/survival maps, from the multiplayer development section, for quick and easy WML).

How far will, admittedly simple, WML take you? Very, very far! Consider that with WML you are leveraging the community's massive works of art, music, sound effects, networking, etc.. Your work can be placed on the forum for others to enjoy, give you feedback on, and even help with. Popular/polished works can even be added to the add-on server for Wesnoth proper. What's that? You've mastered WML and must have more? Okay, how about Python?

Python is often the answer when a beginner asks for a good programming language to start with/learn, for many good reasons. While leaning Python, you can try your new coding chops out with the Wesnoth Python A.I. interface. In a brilliant move, I think, the Wesnoth developers allowed for "drop in" artificial intelligence engines to be coded in user friendly Python. Most games today will require some form of A.I., and this may be one of the easiest ways to learn how. Check out the active thread in the Coder's Corner section of the forum about the Chesslike.py A.I., pretty cool.

The final, and ultimate, step in our Wesnoth programming journey is C++. The Wesnoth game engine is written in C++ using the SDL library. This is the same technology used in most major Linux games, and quite a few games on all other platforms. All of the Wesnoth code is easy to get at in their SVN repository. So, while you may not learn C++ from scratch with Wesnoth, having access to the code will be invaluable as you do grow in your C++ knowledge.

Well, what are you just sitting there reading this silly blog for?!? If you can understand what
<:title>BuildingMultiplayer - Wesnoth<:/title>
does without the : then get over to the building multiplayer section, drop this:
name= _ "2p - Blitz"
description= _ "A duel map for super fast play. Recommended setting of 2 gold per village."




into gedit and make some games!!

No comments: