Work on the Lemmings Engine has been slow lately. However, I made a much better improvement in the file loading features. Not much of an update I'm afraid, so I'm not posting a demo...but the upgrade was an additional 100 lines of code. Once the source is release, you will notice the ease of creating the game :)
Ok ladies and Gentlemen, I somewhat finished my first CODERS' Section. It's alot to read, but I didn't have any good ideas. If you would like to see a tutorial or example tomarrow, please post a suggestion.
CODERíS SECTION - Reading From Databases
Ok, databaseís are so important to games, that I decided to have my first Coderís section be centered around it. I split up the tutorial into several categories for ease of navigationÖjust skip the parts you are already familiar with:
* Who Iím thanking
* What is a database
* When should I use one
* Where are databaseís found in a game
* Why should I use one
* How do I use one
Who Iím thanking
For this Coderís Section, Iím thanking Ghostkeeper at GMC for developing the base scripts, which I later adapted to create the powerful XML Search function.
What is a database
A database is simply a base of data J Databases serve as a powerful means to store, organize, and retrieve information in the most efficient way possible. In Game Makerís case, a database would be used to store variables, which the player can modify. Some different file formatís good for storing databaseís are XML and INI.
When should I use one
You should use a database anytime you want to save games, create engines or other programs userís will modify, store game properties such as screen resolution, difficulty, and user controls/input.
Where are databaseís found in a game
The main database, or the one most used, is the config.ini file found in most games. Other databaseís are found in Saved Game files, media, and other places which make use of listís of files.
Why should I use one
Databaseís provide MANY advantages to both the coder and the user. On the coderís side, a database can be used to store a single instance of a variable. This is beneficial because once the coder decides that he/she wants to change, say, the players walking speed, he simply goes into the database and updates the variable, without having to go look for the code, or change each and every single time the userís speed is used (and possibly miss one or two).
The advantages to the player is that they can simply open up, for example, the config.ini file and change the resolution quickly. In the case of an engine, the user can change the playerís speed or other properties without ever looking at your code!
How do I use one
Reading from an INI file is very simple. Use the Game Maker help files, they explain it perfectly.
For XML files, youíll need to download Ghostkeeperís scripts http://www.64digits.com/download.php?name=SimplXML.zip&id=14686,
in which I helped creaet the XML search function (Press 1 to test the XML). The file contains information on how to use itÖI will update this section a little later. Simply look at the time stamp in my title. Happy Coding!