mgarnett -> RE: What Computer Language is used Most? (12/15/2009 10:45:46 AM)
|
Hi Zemke_4 The maps used in the Tiller Panzer Campaign games are tile based. By that, I mean that each individual hex is a "tile" made up of one or more graphics images. There is no programming involved in creating these tiles or images, they are done with applications like Photoshop or PSP. If you have a PzC game, just look in the directory where you installed the game and you will see a folder called "Map" look inside there and you will see heaps of BMP file which you can open up in Paint and view. The units are also just little square tiles. Now, the engine that actually displays all these images and handles input and AI is written in a programming language. In the PzC games, I would gues it is written in Microsoft Visual C++ and MFC (just look inside the games directory and you will see DLL files in there with the letters MFC in the name. Now Visual C++ (or C++) is the programming language and MFC is an "add on" library of functions that the programmer can use to handle all those repetitive system tasks like displaying a save file dialog, open and close windows, minmise and maximise windows etc. If libraries such as MFC didn't exsist the programmer would have to write their own routines to handle these tasks. IMHO, turn based wargames can be written in almost any language. Other languages that I have used which, IMHO, are easier to grasp than C++, are Delphi and C#. Delphi has an MFC "equivalent" called the VCL and C# has the .Net libraries. The VCL and .Net basically provide that toolbox of functions to help progrmmer easily implement repetative core windows tasks so that he/she can concentrate of writing the code that actually makes the game "work". I mentioned the tiled hexes above, the programmer would write code that would actually "assemble" the maps depending on which scenario the user chose. In a very simple example, a game may store the scenario map configurations in a regular text file. In this example, a clear terrain hex may be numbered "1" and a forrest hex "2". So, if a map configuration file was "1,1,1,2,2,1,1" then programmer would create a function to read this text file and then drew the appropriate hexes on the screen. In this instance, the user would see three clear terrain hexes, followed by two forrest hexes and then two clear terrain hexes. You can see that you can create a two dimensional matrix for a map and then draw that onto the screen using the appropriate tile. It gets a little more complicated than this, because you would have secondary and tertiary map features such a clear terrain hex with a house on it. For these types of situations, and following the simplified example, you could have one text file describing the primary terrain and then one describing the secondary terrain and then just draw the appropriate tile into the screen. Don't get too caught up in what language you should use, a turn based wargame can be created in almost any language such as C++, C, Delphi, C#, BlitzMax, GLBasic, DarkBasic etc. Each would be suitable, however their syntax an learning differs markedly. Languages such as BlitzMax and GLBasic are also geared toward game making and come with ready made libraries of functions to handle graphics, mouse input, music etc. My personal favourite is Delphi and games such as Guns of August (I think), Empires in Arms and the AGEOD games (BiA, WiA, Napoleons Campaigns and ACW) I think are also written in Delphi.
|
|
|
|