Welcome to DarkBASIC
There are many aspects to game development, which all have to be learned before you will be able to produce good games. Writing a game takes time and effort, you will not produce GTA3 in a matter of minutes. The reward and enjoyment you will get out of writing your own games is great but be patient.
The aspects of game development include:
- The DarkBASIC Programming language
. > Graphics
. > Game control
. > AI
. > movement & interaction
- Creating 2D media
- Creating 3D media and worlds
1 - The DarkBASIC Programming Language
If you have never used a programming language before, it is worth reading through the Principles help document which explains fundamental basics such as variables, arrays and so on. Open up the DarkBASIC editor, and use the Help menu to access the main menu, then select the Principles link.
Once you have a basic grasp of the language, you should then look at the included tutorial (follow the Tutorials link from the main help menu). This will give you a basic introduction to setting out a game. Note that although this tutorial uses
gosub a lot, I recommend learning about and using functions instead.
Once you have completed this tutorial, I strongly advise that you look at Binary Moon's excellent
Limit Rush tutorial / game. This provides a good introduction on how to lay out games, how to think about game logic, AI and so on.
Limit Rush does not work with DarkBASIC Professional, you will need to either use DarkBASIC Classic retail, or download the DarkBASIC Classic demo from http://darkbasic.thegamecreators.com/?f=trial
Once you have learned how to write games in DarkBASIC Classic, virtually the same code can be used in DarkBASIC Professional. However, due to slight differences, you should start new projects in DBPro, you may not be able to run DarkBASIC Classic game source code in DBPro
Limit Rush Tutorial:
http://developer.thegamecreators.com/?f=t02/bm_tutorial_index
Also worth a look are the
3D Monster Hunt tutorials. Again, these need DarkBASIC Classic to run.
http://developer.thegamecreators.com/?f=t01/3d_tutorial_index
For DarkBASIC Professional specifics, you can also look at the tutorial page here: (Tutorial #6 is probably the most useful)
http://developer.thegamecreators.com/?f=dbpro_tutorials
Other places to look:
- The CodeBase -
http://developer.thegamecreators.com/?m=codebase_list&l=2
2 - Creating 2D Media
In order to create 2D media for game, needed for effects, text, menus, icons and so on, you will need a suitable graphics package.
Popular packages include:
- Jasc Paint Shop Pro
- Adobe Photoshop / Photoshop elements
Although there are others.
DarkBASIC supports a wide variety of image formats, although you will generally find that Bitmap (BMP) and JPEG (JPG) work well. For transparent images, such as a fence railing, Portable Network Graphics (PNG) is the most ideal format, DarkBASIC will recognise the inbuild transparency (alpha) layer. For effects such as rainbow shading, a Targa (TGA) file is recommended.
If you want advice on 2D media, please visit this forum:
http://developer.thegamecreators.com/?m=forum_read&i=4
3 - Creating 3D media & worlds
One of the most important parts of game production is the production of 3D media.
There are two catagories:
- 3D models > For your hero characters, guns etc.
- Worlds > These are the levels where your game takes place
You can use industrial packages like 3DSMax, although for beginners I would highly recommend the cheap, but usable MilkShape package ($22). You can get more information & tutorials for MilkShape here:
http://www.swissquake.ch/chumbalum-soft/
For 3D worlds, you have a variety of options:
- For external terrains, matrices are one possible solution, as used in Digital Awakenings' The Magic Land. These are easy to program, but not that flexible. MatEdit is an ideal program for creating and changing matrices.
http://www.matedit.com/
- If you want to create internal levels, or want a mix of external and internal, then Cartography Shop (sold on this site) is ideal, use the menu links on this site to access the CShop demo under World Building. CShop help is unfortunately fairly limited, however this code will come in useful for loading CShop maps in DarkBASIC:
function LoadCartShopLevel(file as string,LevelObject,LightMapObject)
if object exist(LevelObject) or object exist(LightMapObject) then exitfunction
if file exist(file)=0 then exitfunction
load object file,LevelObject
if file exist(left$(file,len(file)-2)+"_lm.x")
load object left$(file,len(file)-2)+"_lm.x",LightMapObject
set object light LightMapObject,2
ghost object on LightMapObject,2
endif
endfunction
- Another alternative is to use BSP (Quake / Half-Life) type maps. These can be created with programs such as WorldCraft which comes with Half-Life. You can also use the X to BSP converter which comes with DarkBASIC Pro to convert existing X levels to BSP format.
Although DarkBASIC does support various 3D formats, DirectX (X) format models are by far and away the best format to use. 3DS, MD2 and MD3 support is fairly poor, so it is worth using a program such as MilkShape or Deep Exploration to convert models before loading them in DarkBASIC Pro.
Look in this forum for more help
http://developer.thegamecreators.com/?m=forum_read&i=3
General Advice
- Don't be too ambitious, start with a simple project and work towards something more advanced.
-
PLAN your projects on paper before you start. I cannot emphasise this enough, a potential problem can be fixed in one minute at the planning stage, which could take hours to deal with at the testing phase. You should try to make your program structure as flexible as possible, this way if a certain aspect doesn't work, you can change it. You should think carefully about the structure before you start.
- Think about machine problems - Ensure that where possible, your program handles missing files / graphics features etc. as gracefully as possible.
Requesting Help
- Be polite and say please and thank-you, it might seem silly, but a positive attitude will get much better responses from other forum users
- Post samples of source code, explain in detail what you are trying to do (if applicable) and explain what your problems / queries are.
- If appropriate, post relevant media, as it may be an issue related to the model / texture etc. that you are using.
- SEARCH the forum to see if your query has already been answered.
Others feel free to add tutorials / advice etc.