Editorial - April 2010

Issue 87 cover

Real Programmers Don't Document - If it was hard to write, it should be hard to understand. Unfortunately, far too many coders live by this old saying, to the detriment of themselves and the people trying to maintain their applications. Worse still, it all too often extends to the help made available to the users. If you want to help yourself, comment your code, and comment it well; there is nothing wrong with having as many comments as there are code lines. If you want to help your users, and ultimately keep hold of them, document your applications well. It was hard to write, so don't lose your well earned audience by confusing and frustrating them.

This month you'll find many of the secrets of DarkBASIC Professional and FPSC, with some well documented code made available to you. We have a number of success stories to encourage you to keep coding and get your applications out there. FPSC X9 nears the next incarnation, with many of the new features revealed this month. We have FPS Creator model packs to suit a range of requirements, and an extra large newsletter full of a host of useful and inspiring features.

Until next time,

Steve Vink

 

Take Control

TGC Seek Great Freelance Game Coders

Did you know that our team is made up predominantly of forum members? You may remember Paul Johnston, now a core member of the development team, as Sparky, who created the now indispensible collision system as a free plugin. As editor of the newsletter, I started back in the forums in 2003. I offered my services as a tutorial writer before becoming editor of Issue 50, just over 3 years ago. My predecessor, Rich Davey, also rose from the forums to create the forums you know today as well as developing and managing the website.

Big changes are taking place within our industry and great opportunities are opening up. TGC are looking for experienced game developers to help us expand our product base across a number of different platforms.

Ideal candidates must have these skills and attitudes;

* Have an established portfolio of games and applications to show what you can produce.
* Be able to develop using any of the most popular programming languages.
* Be self motivated, have a positive attitude and a creative spirit.
* Understand how to optimise software to ensure fast performance.

If you feel you fit the bill and want to be part of our development team then please email Rick Vanner here; rick@thegamecreators.com 

Send your CV to us right now and explain why you think you're the best choice!

TGC are Seeking a Freelance Marketing Whiz!

* Are you an experienced marketing professional?
* Do you love TGCs products and know how they tick and why users choose them?
* Are you on the ball with the latest social networking trends and do you keep an eye on emerging technologies?

If you can answer yes to all of the above then we’d love to hear from you.

Contact Rick Vanner directly by email here; rick@thegamecreators.com

Send your CV and explain why you think you can add marketing expertise to the TGC team!

 

contents

(1) Site News (2) iPhone Apps (3) DarkBASIC Pro (4) TGC on AppUp (5) FPSC News (6) Model Packs (7) Leadwerks (8) Tip Of The Month (9) DBP DLLs (10) TGC Store (11) Cut-price Foliage (12) From the Forums (13) Winner (14) Outro

Website Overhaul

Easier Site MenusThe Game Creators website will be getting a new look in the very near future. We're making sure that as well as looking good, it will be easier to navigate and faster to get where you want to be. New multi-level menus simplify the navigation process, and your personal account pages including order history have been made easier to browse through. We're bringing everything under one roof at the same time, with FPS Creator products and the multitude of plug-ins and additional applications joining www.thegamecreators.com.

Over a years worth of work has gone into this ground up redesign. While it will look very similar to what you are used to and has a totally new back-end to it. 

More importantly, the changes behind the scenes mean we can deliver product information and related content to your browser more efficiently, ensuring you see the best deals every time. For example, if you add some model packs into your shopping basket the system will automatically offer you relevant discounts that you can use to reduce the cost of your order.

Developers who sell their tools on the site will also be able to track live orders, keeping up to date on their earned revenue.

Watch out for the site change very soon, and let us know what you think via the forums.

iPhone / iPod Touch Compilation Pack

iPhoneDownloadsAs the downloads of TGC iPhone applications reaches over 6.5 million, we are also presenting a pack of ten great games for just 99 cents! This compilation contains TEN of our best apps from 2009, we hope you enjoy them at this incredibly low, low price! There's hours of fun to be had by all - from the frantic finger stabbing game play in iDare Deluxe to blasting aliens in Retro Shoot. There's something for everyone in the family in this quality packed compilation.

 

Goals! Pro Available on the iPhone App Store

 

 

Dropsum1. DropSum

Enjoyed by over 7.5 million PC users worldwide, Dropsum will stretch your mental agility and give your brain a good workout. Match up tiles that add up to 9 in this addictive maths tile game.

Retroshoot2. Retro Shoot

We've taken the great gameplay from the 80s and brought it bang up to date with vibrant neon graphics and pulse pumping music and sounds. There are 15 levels of action to play in this fast moving space shooter.

Dare3. iDare Deluxe

iDare Deluxe tests your finger dexterity to the max. In this fully featured version of the Five Finger Fillet game you can impress your family and friends with your accurate touch skills. The FREE version of iDare has been played by over 3.5 million gamers, now you can own the full version with 5 game modes, 4 combinations of stabbing and 6 different hand styles.

Looney4. iLooney

It's nice and bright outside and the Looney is stuck inside with nothing but the voices in his head to keep him company. Looney is making a run for it; only one thing stands in his way - you! This turn based game with its great lunatic voice over will make you laugh and challenge your ability to think ahead like a crazy dude in a straight jacket!

iBlow5. iBlow

The application that lets you blow realistic bubbles on your iPhone. Simply blow gently and steadily into the microphone and your virtual bubble will expand in size. When it's just the size you want, give an extra strong blow and it will release and wobble  around. You can then gently push it with your fingers or hit it in the centre to pop it. iBlow is a fun and creative app that you and your family will love. You can even blow bubbles that contain your own photos.

Touch6. Touch & Go

This is a fun and innovative match 3 casual game that uses the touch input of your device to the max. The rules are simple, drag the blocks and throw them together. When three or more of the same color collide they all explode. Just don't let the blocks pile up too high. If they stack to the top then your game is over. Touch & Go is a great time filler and has beautiful graphics too!

SmackIt7. Smack It Deluxe

In this exciting and fast paced game your reactions are tested to the maximum. We all love Wack-a-mole from the arcades and this game uses the same hit reaction game play. Kids will love Smack It Deluxe as they compete to be the best.

Mission Control8. Mission Control

In this game you've been employed to direct the flight paths of all incoming and outgoing ships. Rise through the ranks from a lowly Rookie to the respected role as a Mission Controller. The game needs keen concentration as you direct multiple ships to and from the refuelling depots.

iMoon9. iMoon Walk

The lights are low, the atmosphere is electric, the music is on, the dance floor is gleaming, there is only one thing missing - You! Help move the feet of the dancer as fast as you can in this simple and fun speed and dexterity challenge game.

iDork10. iDork Lite

Lost in a world of school paperwork is iDork, your doodled stick man who needs help to escape the reams of homework sheets that are his prison. iDork is very sensitive and has to avoid many dangers across 20 levels of play. A great adventure game awaits you!

DarkBASIC Professional News - Upgrade 7.5 Update

DarkBASIC Professional

Bug Fixes and Source Code Access

In addition to the continued tweaks to the editor, we also embarked this month on the process of sorting through and fixing the bugs reported in the DBP Bug Board, starting with those that have been reported and confirmed by the community. The current U75 beta already contains a number of these fixes which you can find detailed in the readme that accompanies the beta. We also added a new function to the shader effects system called RENDERCOLORTARGET which you can read more about in the FPS Creator Migration news, and in the Tip Of The Month. You may also be pleased to hear that you can now gain access to the very latest state of the Dark Basic Pro command modules source code directly from Google Code right now. Just visit http://code.google.com/p/darkbasicpro/ to gain access to a read-only snapshot of all the native DBP command modules, along with a snapshot of how you should set-up your Visual Studio 2008 for compiling the DLLs. We believe access to the source code will help you understand how the commands behave under the hood, and give you a much deeper insight into what specific parameters actually do. We are also hoping that if you have some C++ experience and you notice the cause of a bug you might be experiencing, you can email our Google Code collaborator who will be able to reproduce and fix the bug much quicker than if we relied on the traditional steps to reproduce strategy. Another cool benefit to having full access to the source, is that you can take a DLL and modify it to suit your own project needs such as adding debug code into the Setup DLL, or extra 3D commands into the Basic3D DLL. Last month we made DBP free to use, so it made sense that this month we provide free access to the source code as well. For those of you who don't really want to start mucking about with C++ and SVN, the benefit for you guys is more eyes on the code, which means more fixes and I dare say, more features.

Odd Blox

Odd Blox, a DarkBASIC Professional Game 

The basic concept of Odd Blox, written by Steven Holding, is quite simply building blocks. It is one of a handful of completed games out there that incorporate DarkPhysics to good effect, the physics being an integral part of the game rather than just for show. "I was playing with my two sons", says Steven, "when I thought of the game. It uses DarkPhysics and the game started out as a simple Build them up and then knock them down game which is still in there as the main game you need to play to unlock stuff."
 
Odd Blox ScreenshotThe game allows you to progress through achievements after which unlockables are released. These include three new styles of blocks which come with their own mini-game (which you need to play to unlock the next 'style'). There's Fantasy mode, Castle mode and Sci-Fi mode. Free-Build mode is also available with no time limit. Pre-fabs are another feature allowing you to build segments of blocks for quick building of features such as domino rallies and buildings. If that's not enough to keep you occupied, there are three mechanical construction tools allowing you to add fixed, rotating and hinged connections between blocks so you can build objects such as cranes, cars and doors. Finally, you have a range of destructive tools including a laser gun to pulverise blocks, time bombs and even a pea-shooter.

Odd BloxThe game is available from to download via the forum thread in Program announcements. You can also feed back here and encourage the community to throw out a few more games!

TGC Heroes

TGC Heroes started as a community project in October 2006. It has moved from Game Design Theory to Work in Progress to a publicly released game.  The game idea was to create a remake of Nintendo's hit Super Smash Brothers with TGC related characters.

TGC HeroesThe game features several characters known in the forums and from the TGC team, including Nutt (Nutt and Mr. Bear), Lee, Cool (from Dumbow and Cool), B.D. (CheeseCake) and many more. Gamers have seventeen different characters to choose from, each with their own animations and finishing moves. TGC Heroes features ten different arenas, including models and backgrounds from Starwraith 3D Games. Other contributors include Bizar Guy, Gil Galvanti and LBFN.

Gameplay consists of SSB-type melee and the objective is to keep from getting knocked out of the arena. The game features fast-paced four-player combat, with intelligent AI. Two human players can compete against each other, as well as against two additional AI players. The game engine has the KO function and percentage based recoil. It has shielding manoeuvres, special attacks, kicks and punches.

In terms of gameplay and technical implementation, this is a great example of what can be achieved with DarkBASIC Professional. Menus and in-game control is well thought out and kept simplistic enough to be picked up immediately by the player. We would like to see this game mature in terms TGC Heroes Forum Threadof graphics and presentation, to make this a game that can sit amongst it's peers with pride. You can feedback in the forums and help the TGC Heroes team add a little polish, as well as find the latest game download.

Dark Game Studio Bonanza

Bonanza 

Special offer while stocks last: Dark Game Studio, Dark Physics, Dark Lights, Dark AI and Extends for an incredibly low price of $49.99. Save over $170!

Creating your own PC games is now easier than ever with this special compilation of game making tools:


Order Now

Order the BonanzaSave over $170 on this special deal. Be sure to check out the screen shots and the online videos. You can of course order safely and securely online, for delivery via postal mail.

Free Products from The Game Creators
FPS Creator   -   DarkBASIC   -   2000 Store Points

Intel AppUp Gaining Momentum

There are many new opportunities for independent developers to publish their work through the Intel AppUp Store. With DarkBASIC Professional and DarkGDK, you already have the tools to create quality content, and last month we provided you with the extra tools needed to make them AppUp-ready. We already have some success stories to share with you, and more ventures coming to fruition as we go to press. If you're new to the AppUp store you can read up about the developer web site here - Intel's AppUp Developer site and you can download the AppUp store for netbooks here at the AppUp Centre.

Goals

GoalsThe iPhone was the first platform that Goals was developed for; now you'll find it ported to the PC. More specifically, it's been adapted to be sold through the AppUp store. The scrolling pitch of the iPhone version is now minimised as the larger screen of a netbook allows more of the pitch to come into view. Enjoy the bigger screen game but with the portability retained in this netbook version of the popular game.

  

Looney

LooneyThis is another game that made its TGC debut on the iPhone and is now available for your netbook with the simplicty of the AppUp install process. It's nice and bright outside and the Looney is stuck inside with nothing but the voices in his head to keep him company. Looney is making a run for it;  only one thing stands in his way - you! This turn based game with its great lunatic voice over will make you laugh and challenge your ability to think ahead like a crazy dude in a straight jacket!

TGC partners with Game Makers from the Community

Towers for AppUpThe Game Creators recently asked forum members with suitable games to get in touch, with a view to helping them publish their creations through the AppUp store. We already have three games ready to go. The first one - Towers - placed highly in our Puzzle Competition a few years ago, and was described by one of the judges as "pure class". Build circular towers, brick by brick in a Tetris-inspired puzzler. The pieces drop from above and you can spin the tower around to put them in place (you can also rotate the pieces of course). Thankfully this isn't as complex as it sounds - the pieces don't rotate in 3D for example, it's more just a 360 degree Tetris build, and a far better and most addictive game because of it.

NetbokuThe second game is Netboku, which as it's name suggests is a Sudoku based puzzler designed specifically for Netbooks. The graphical presentation is spectacular, and with the help of TGC it is now AppUp-enabled and ready to play. The Game Creators experience in this field ensures that all aspects are covered, from testing and building a robust application to marketing the product successfully.

The most recent game to enter the fold is Tilted Video Poker.

Tilted Video Poker - from Concept to Store

Tilted Poker  

by Andrew Thompson

When I first saw the details about the AppUp store and that TGC were looking for games to submit to it during March, I originally offered my previous game, Space Aliens From Space. Whilst Rick liked the game and suggested it could be submitted, I learnt of some of the requirements of the AppUp Store and realised that it would not be possible to make the game compatible with the netbook and develop it further to reach the standards expected of it in time for the end of March; so I asked Rick if a video poker game would be a good idea. I had written a video poker game about four years previously so I knew essentially what was involved at a gameplay level at least. I came up with video poker because most importantly I knew that I could accomplish it within the three weeks I had available and because video poker as a concept is likely to be well established in customers' minds and that they would be familiar with it.

Tilted poker for NetbooksSo I had to make a video poker game. Sounds easy? I don't think so! One thing I knew is how the gameplay was going to work. This was clearly defined in my mind and I knew that for an application to sell well, it has to look and sound great too. My initial approach to the project was based on this, I knew it had to look flashy and eye catching whilst at the same time being a clean and transparent interface. I took the bold step of coding a rudimentary engine to handle the visual elements of the game first. In a sense I made the polish and dropped a game in it. My original intention was not to make just a video poker game, but to make a whole selection of casino card games using a single graphical theme running throughout them. This sort of thing is made so much easier with the use of GDK and C++ because you can define and implement a nice, solid object-oriented structure. In the end however, time caught up with me and I knew it would not be possible to make all four games that I wanted to make, at the level of quality I was striving for in the time that I had left, so I had to make the decision to make it JUST a video poker game.

The practical upshot of keeping in my object oriented and highly modular code is that if I now want to quickly produce another type of card game, I can do it very quickly and keep the same graphical theme that is in my Video Poker game.

For the most part in development I was working on my home PC which has a resolution of 1280x960 (which is a 4:3 display) and quite a beefy graphics card. I did NOT have a netbook available to test my code on. So I made my game, and I thought it was truly amazing. I got a few people I know to test the game and they pointed out problems and flaws in the game and I fixed them, and then it was time to send it over to Rick for reviewing. The first reply I got from Rick knocked my spirits a little bit. He said that the app suffered from slow loading times and crashed often and there were graphical glitches and that the windowed app took up the whole screen and therefore some of the graphics were obscured by things like the start menu and the taskbar. This all happened when there was less than a week left until the deadline.

Tilted pokerI begged my friend to let me borrow his notebook for a few days and I just spent 40 hours in just two days getting it all to work properly. I had to put the application into full screen exclusive mode on the netbook, which presented a whole array of new problems. I had another problem with my playing cards, which were 3D objects drawing incorrectly on the netbook, which after some research and head scratching I figured out to be the aspect ratio of the camera. Eventually I got it all working and I sent it off to Rick and Lee for reviewing. A few more small problems had to be figured out and solved and eventually I got a final version sent to them.

One thing that was involved with the submission process was providing to TGC three copies of my program; an unhindered version for debugging and testing, a version with authentication and debug code, and of course a release version with authentication code for the store.

Working on this project has taught me many things:

 

FPS Creator Updates

FPS Creator News

FPS CreatorFPSC X9 X9

The work on the internal version of V117 progresses at a good pace. In the last bulletin you learned of the addition of rag doll via a third party script, the improvement of the physics system and the appointing of a new member to help work on FPS Creator alongside the core team. Since then we have ticked off a few more migration features. Firstly, we have overhauled the entire engine to use timer-based logic instead of cycle based. This means you can look forward to your games running between 60 and 120 frames per second based on your monitor's refresh rate. Playing under these frame rates gives you a smooth and slick game play experience and you will really enjoy the quality level of your finished games.

The second feature that is close to completion as you read this is the full screen effects system shaderswhich has required new code to be added to Dark Basic Pro to accomplish. Rather than depend on the DarkSHADER module to supply the full screen effects framework, DBP has been enhanced to allow additional shader elements to work including the RENDERCOLORTARGET function. What this means to FPSC users is that the latest V117 has built-in support for post process effects without the need for external modules. We have already added BLOOM - which looks great by the way - and we are working on finishing DEPTH OF FIELD, which requires a whole host of new shader techniques to provide the depth information to the render process.

In parallel to this work, our newly recruited collaborator has been Aritificial Intelligenceadding DarkAI support. This support exceeds the capabilities of the original X10 DarkAI implementation in that it allows FPI authors (scripters) to take full control of the DarkAI sub-commands so you can pretty much create any behaviour you want within the capabilities of the exposed DarkAI commands. The bottom line on this feature is that your characters will spring to life as enemies, friends and non-combatants, and even switch from ally to foe at the touch of a button. I think you will be excited about the new DarkAI approach when you start to see model pack characters take advantage of their larger, more cunning AI brains.

Lots of other activities are underway surrounding the FPSC universe, far too many to note here, but you can look forward to native support for talking characters built into the engine allowing you to command a character to pick-up a WAV and LIPSYNC file and start talking based on your scripting. As you can see the migration features are coming in thick and fast, and once we have done an extensive test, we look forward to sharing what we have created in the V117 public beta. There will even be ways to get access to it sooner, but you will have to scour the DBP U75 beta to find out how!  

FPSC X10FPS Creator X10 V110 released

The good news is the V110 update has been released, and thanks to a great effort by the beta testers you now have access to a store full of media to populate your X10 worlds. Not only that, we have also uploaded the extra special X10 modders kit, which allows you access to the latest V110 code and recompile it to create your own X10 engine mod. Although there is no official support for the code or what you do with it, I think you will enjoy exploring and tweaking the inner workings of your game and ensuring you have more control of your X10 project. You can find the X10 code hosted on Google Code at http://code.google.com/p/fpscreatorx10engine/ and the kit you will need to compile the code is hosted on the main X10 website, or simply download it directly here. Have fun!

Editors Note: Having SVN already installed for my own projects, I successfully downloaded the FPSC X10 code and was browsing through it in under 3 minutes. I won't be creating my own X10 mod - there are plenty of coders out there already skilled in this area - but it's a good opportunity for all budding game writers to look at the structure and detail behind a commercial application. Unless you are a programmer by trade, this is very probably your first opportunity to see a project of some magnitude; the X10 game engine weighs in at 133 files (predominantly dba files) and over 6 megabytes of code.

TortoiseSVNYou may need a helping hand getting started with SVN. In issue 85 of the newsletter, you'll find everything you need to get you started with TortoiseSVN, a popular free tool for interacting with code repositories. Use this in conjunction with the FPSC X10 Google Code Project details to download and get started.

Special Offer while Stocks Last - $22.99, Save Over $150.00!

Take advantage of this whopping special offer! Get FPS Creator and 9 Model Packs for an incredibly low price of $29.99 USD (€22.00 EUR, £19.99 GBP). This deal includes:

Click here to purchase the Bonanza pack, including FPS Creator
for just $29.99 / €22.00 / £19.99

 

Model Pack Fest

Low Poly Models for FPS CreatorLow Poly Models for FPS Creator

This month sees the release of four incredible model packs, each one capable of taking your game to the next level in professionalism and finesse. There are zombies, castle dungeon artifacts, fantasy characters and post-apocalyptic scenery to choose from, covering a wide range of gaming scenarios.

 

Zombie Apocalypse

Available now from the FPS Creator site, click here for full details.

 

Post Apocalypse

This pack contains a wide range of entities for creating a post apocalyptic world. A total of 220 entities are included ranging from destroyed buildings and rubble to fences, overlays and much more.

With Model Pack 40 you can create debris-filled scenes that give your game that wartorn look and feel. With a wide range of entities to choose from you can make thousands of different layouts to make your game look unique.

Available now from the FPS Creator site, click here for full details.

 

Dungeon Scenery for FPSC

This pack is designed to supply more Items/Objects for any Dungeon scene and its contents will also fit well into any Medieval or Castle scene.

Custom Sound FX

There are ‘66' new custom sound effects applied to the animated models in this pack.

Segments

Entities

 

Fantasy Characters

This fantasy character pack for FPS Creator introduces several new characters: assassins, necromancers, workers, villagers, guards and barbarians!

Available now from the FPS Creator site, click here for full details.

Leadwerks Engine 2.3

leadwerks Engine 

By Josh Klint

This month we bring you a video created by Pure3D, a visualisation company that uses Leadwerks Engine to create realtime landscape simulations. We recommend you watch this in full screen and appreciate the HD-rendered detail of the terrain and dense vegetation, woodland, wildlife and more.

 
Find out more about the Leadwerks Engine HERE.

Lee's Tip of the Month - Native Post-Processing

More tips from Lee Bamber

Up until now if you wanted to do post-processing in DBP you had to create lots of cameras and execute a FASTSYNC chain or use a DarkSHADER module to handle the shader for you. Both of these had drawbacks in that you had to either rely on an additional module that duplicated many of the internal features of DBP, or have a program that was extremely difficult to read and maintain.

Thankfully, through some necessary migration work in the FPSC camp, DBP has been given a new built-in feature which allows a third alternative to post-processing. For those who are interested to learn about this, post-processing is the technique by which you can create things like Bloom and Depth Of Field effects to create glows around your bright areas of the screen and blur out more distant objects much like a real camera would.

The new addition was the support of the RENDERCOLORTARGET semantic in the FX shader effect. Previously this instruction was ignored to keep the shader system simple, but the benefit of an elegant coding solution was too important to ignore. Thanks to this semantic, you can now declare a shader texture like this:

texture Downsample1Img : RENDERCOLORTARGET 
<
int width = 1024;
int height = 768;
>;

What this means is that you are creating a texture inside the shader which will be dynamically created for the purpose of rendering something to it, and it will be destroyed when no longer needed. This allows you to redirect the output render of a render pass as follows:

pass Downsample
<
string RenderColorTarget = "Downsample1Img";
>
{
ZEnable = False;
VertexShader = compile vs_1_1 VS();
PixelShader = compile ps_2_0 PSDownsample( frameSamp );
}

As you can see we can now specify the render target as "Downsample1Img" and feed in our original texture which is passed in as "frameSamp". Finally when you are ready to render to the actual backbuffer, you simply omit the RenderColorTarget declaration and it will revert to its default behaviour, so:

pass Final
<
string RenderColorTarget = "";
>
{
ZEnable = False;
VertexShader = compile vs_1_1 VS();
PixelShader = compile ps_2_0 PSDownsample( Downsample1Samp );
}

So you can see how the result of the previous process is passed into the final iteration where it will be rendered to the backbuffer (our screen). For example, to create bloom:

Bloom Effect

By controlling how much of the colour from the original frame image is passed into the process of shrinking and blurring you can control how much glow you get in your final screen render. Depth of field works in a similar way, with a lengthy series of rendering to secondary internal textures, but this time we pass in how far the pixel is away from the camera and use that information to decide how much we should blur the pixel. Pixels which are closest to the focal point in the scene are blurred the least, with the most blur occurring in the distance and in some cases when the pixel is very close to the camera.

Thanks to the new feature, you no longer have to create extra cameras to hold the render targets as you pass images from one step to the next to conduct your full screen effects, and all inside the native DBP support for FX effects. This feature will be available in the final U75 update, and you will also be able to see the code and shaders for the technique when we release the V117 source code of FPS Creator. With post-processing only taking about four lines of code now, there is no reason why you should not have bloom in your DBP creations with U75. If you want to be advised when the U75 is released just subscrive to our Twitter or Facebook feeds and we'll announce it as soon as it's live.

Writing your Own DLLs for DarkBASIC Professional

by Ian Mold 

Are you interested in getting your hands on the code for the DarkBASIC Professional DLLs? Want to help develop them for the community, or even customise for your own use? You do? Then read on and I'll tell you how you can do that.

Getting everything set up

What you will need

Setting up your environment

If you haven't got TortoiseSVN or Visual Studio installed, you should do so now. If you are installing Visual Studio at this point, after it's installed you should start it up and then close it at this point too, so that it can complete its initialisation.

Next you should install the DirectX SDK, and then install the iWear SDK.

Click Image for larger view

Now you should check that everything has installed and has been configured correctly. Re-open Visual Studio, and choose Tools->Options from the menu. On the resulting window, expand 'Projects and Solutions', and click on 'VC++ Directories'. Select 'Include files' from the drop-down list on the top right, and you should see something like the image to the right (Note, you can click all the images in this tutorial for a larger view)

The first two items in the list are the important ones - if they don't show, then you will need to manually add them. Do not worry if they are in a different order from that shown.

Click Image for larger viewSelect 'Library files' from the drop-down list on the top right, and you should see something like the image opposite

Again, the first two items in the list are the important ones, and their order does not matter - if they don't show, then add them in the same way as you did for the include files.

Downloading the DarkBASIC Professional source code.

You should now create a directory specifically for holding the DarkBASIC Professional source code that is separate from any other source code you may have. Doing so will make it easier for you to Click Image for larger viewmanage the DarkBASIC Professional SDK and the changes you plan to make. It will also make it easier for you to keep the source code up to date.

In this example, I will be creating a directory on my C drive named DarkBASIC ProfessionalSDK. You may place it elsewhere if you wish.

Click Image for larger viewRight-click in the right-hand panel, and select the option 'SVN Checkout...', where you will be presented with the following window:

Fill in the URL field with 'https://darkbasicpro.googlecode.com/svn/trunk/ darkbasicpro --username LeeBamberTGC', amend the checkout directory name field back to it's original value (C:\DarkBASIC ProfessionalSDK if you are following this example), and then click on OK.

Click Image for larger viewDepending on the speed of your Internet connection, the download will complete in anywhere from 1 minute upwards (it's less than a minute on my 8 megabit connection). When it has completed, you'll see something like the following in your DarkBASIC ProfessionalSDK directory:

 

Coding and testing for DarkBASIC Professional

Preparing for DarkBASIC Professional testing

What we will do now is prepare an area with a copy of DarkBASIC Professional that you can use purely for testing purposes.

Locate the installation directory for DarkBASIC Professional, select all files within that directory (CTRL-A), and then copy them to the clipboard (CTRL-C).

Next, navigate to your DarkBASIC Professional SDK directory (C:\DarkBASIC ProfessionalSDK if you are following this example), enter the 'Dark Basic Pro' directory, and then paste from the clipboard (CTRL-V). Allow the copy to overwrite existing files or merge directory contents.

Click Image for larger viewFinally, edit the Launch.cfg file with Notepad, and change the line starting 'FullPath=' to point to this directory:

At this point, you now have a second installation of DarkBASIC Professional that will use the DLL's that you build in the next section.

Compiling for DarkBASIC Professional

Navigate into the directory 'C:\DarkBASIC ProfessionalSDK\Dark Basic Pro SDK\DarkSDK' and double-click the file 'DarkBasicProSolution' (it's the only file in a directory filled with other directories). This will open up Visual Studio with the DarkBASIC Professional DLL projects.

Click Image for larger view

If the project type on the drop-down list does not show 'release' as shown, then select 'release' from the list.

Select menu option Build->Build Solution, and the DLL's will be built into your test copy of DarkBASIC Professional that you prepared in the previous step. The build may take quite a while the first time through.

If you have carried out all of the steps correctly to this point, then all of the DLL's will compile cleanly without warnings and you have yourself a development and test system for DarkBASIC Professional!

I suggest that at this point you create shortcuts on your desktop to the following items for easy of access (adjust for your own chosen directory):

The first is for opening Visual Studio with the DarkBASIC Professional solution, the second is for opening the DarkBASIC Professional IDE in the test area so that it uses the DLL's you build, and the third is for fast access to the source directories, particularly so that you can update from SVN easily and regularly.

Things to think about when you make changes

First and foremost, remember that any changes that you make that you want included within the official releases will affect everyone, even if they appear to be completely hidden. Even adding a single new parameter to an existing function or changing the position of a value within a structure could cause problems within other plug-ins for example.

There is almost no reliance on third-party libraries within the DarkBASIC Professional source code. If you have a reason to include a third-party library in changes you plan to submit to us then please ask first before doing all the work and then finding we won't accept your changes. For example, we can't accept inclusion of any code that has a GPL based license for example, as this license is incompatible with the Apache License.

One final thing to remember is that if you introduce new commands to DarkBASIC Professional, it is up to you to also provide the text for the help files for those commands.

Testing your changes

Please ensure that you test any changes that you make thoroughly - write small programs that exercise your changes and include these when submitting your patches (see below). If you can, you should also test your changes against other plug-ins, either expansion packs (physics, shader etc) or third-party plug-ins. If your changes work without breaking those plug-ins, then your changes are more likely to be accepted.

In addition, we strongly suggest that you test any changes that you make by compiling the latest version of FPSC - as this is a large and complex program, it is more likely that it will expose any unintended consequences of your changes than smaller programs might.

Submitting patches for inclusion in the project

Creating a patch is fairly simple. First, if you have added new new files to any of the DLL projects, you should also right-click on those files and add them to SVN. Then switch to your top-level directory (C:\DarkBASIC ProfessionalSDK), select all folders, then right-click and select TortoiseSVN->Create Patch. Provide a name for the patch file and click OK.

All that you then need to do is contact me, sending your patch, help files and test code/media in compressed format - if the media is large, then consider uploading it onto a file-sharing site and giving me a link rather than sending it directly to my email address.

You should email your patches to Ian Mold, and include the word 'darkbasicpro' in the subject line.

One final thing - if you contribute to this project, you are agreeing that you are licensing your code under the Apache 2.0 licence. This is a perpetual, unrevocable license, so you can't ask for the code to be removed later. Be sure that you want to share with us.

Suggestions for other free downloads

This is a list of other utilities that I've found help with the development process.

 

The Game Creator Store - New Additions

The Game Creator Store 

Pick up free Store Points

The Game Creators have teamed up with the leading providers of virtual currency; perform a few simple tasks and top up your Store points. As well as being able to take up exciting offers and receiving potentially thousands of points, there are a host of other tasks to earn rewards. Watch a movie trailer, rate search results, answer questions, tag photos or choose from a host of activities that will ultimately earn you any of the high quality models and resources to make your game shine.

Open the Store, through FPS Creator , DBPro or the standalone version. Log in to your account and select the Buy Points option. Below the regular payment options you'll find links to gWallet, Offerpal, DoubleDing and TrialPay. You'll immediately find yourself in amongst the tasks and offers available, and can start earning immediately by watching a movie trailer or two!

Top up your Points by Mobile  

Pay by MobileYou can also purchase 500 Store Points directly with your mobile phone. You don't need a credit card or payment details, simply enter your request on the Store payment page along with your mobile number. This service is available in the UK, United States and the following European countries - Austria, Czech Republic, Denmark, Republic of Ireland, Finland, Germany, Netherlands, Norway and Sweden. Other countries may become available at a future date.

Upload Your Assets to The Game Creator Store

Did you know you can sell your models, segments, music and sky boxes in the Game Creator Store? We already have dozens of artists selling their media, and we welcome anyone with the talent to provide our community with quality assets to do the same. If you are interested in becoming a store seller, please contact Janet, our Store Administrator directly.

New Store Additions

Cycle TrainerCycle Trainer Low Poly Model

Model Pack 33 hosts a number of sports related items including this cycle trainer. Gym kit includes a punch bag, dumbells, exercise mat, bench and more. You can buy the full pack from fpscreator.com, or download the individual items through your store account.

 

 

Crocodile FPS Creator Model

Crocodile

If you are looking for a more obscure enemy for your next game, then look no further than this crocodile model. It's high poly to grab the detail, but one can afford to be extravagant on poly count if it's a centrepoint of your game. Add this to your jungle or lagoon for a shock reaction from your players!

 

BridgeLow Poly Bridge Model

In contrast to the previous offering, this highly detailed bridge is very lightweight, weighing in at just 88 polygons. The detail is achieved with diffuse, normal and specular maps to get the realistic effects of smooth-weathered stone you see here.

 

 

 

Derelict Building for 3D GamesAbandoned Building

A grungy derelict bulding. With a base of 5 FPSC segments and towering 7 segments high, it's ideal for a creepy zombie filled city.

All of the above models are available to purchase and download through the inbuilt Game Creator Store in FPS Creator and DBPro, and also using the standalone store for other game-making tools.

Treemagik G3 and Plant Life down in price

The Game Creators have reduced the price of these two great products, both ideal for creating all of the foliage you could ever need for your terrains. Treemagik G3 has been reduced from $49.95 USD to just $19.99 USD (£12.99 GBP €14.99 EUR)! Similarly, Plant Life is reduced from $44.95 USD to $19.99 USD (£12.99 GBP €14.99 EUR)!

Treemagik

Low-poly and high quality 3D tree creation has never been easier. Treemagik G3 introduces new breakthroughs in tree creation. With Treemagik G3 you'll be able to create some of the most beautiful 3D trees for your games, and all within seconds. Design and shape tree trunks, right down to the very vertice. Import branches and limbs into your creation, then cover the joints in leaves, it's that simple. Treemagik G3 also allows the designer to import and mold root systems on the base of their tree creations.

Treemagik G3Go to the Treemagik G3 page now for full details and to purchase at the new price of $19.99

Plant Life

Designed for low polygon environments, such as fast 3D games, Plant Life delivers a unique approach to creating photo-realistic foliage for use in real-time 3D environments. Without sacrificing Detailed low poly foliagequality, Plant Life creates vivid, colourful and realistic media at the lowest poly-count possible, all from a friendly and easy-to-use interface.

Plant Life websiteGo to the Plant Life page now for full details and to purchase at the new price of $19.99

From the Forums

Code Snippets - Angular Size of an Object in Pixels

Morcilla, author of MPL3D Solar System, has posted a useful snippet, written for both DarkBASIC Professional and for DarkGDK. This efficient piece of code works out whether an object is visible on screen, and if so how many pixels in size it is.

This has many uses, the main one being LOD (Level of detail). Rather than just use distance, it uses the presence of the object's size for greater control. For example, if you place a mouse and the Eiffel tower alongside one another, you may want to reduce the mouse to a billboard whilst retaining far more intricate details of the tower. The code can also be extended to establish whether objects are occluded along the line of sight.

Because the calculation is an approximation, it is ideally suited to a real-time environment where Forum Threadaccuracy is dispensed with in favour of faster calculations. If you want to see the code with all of the comments, then go to the forum thread for the full details. Otherwise, here's the snippet compacted down to the bare essentials.

DarkBASIC Professional version
   rem Diameter of the object and camera FOV must be supplied 
   Diameter# = 200.0
   camera_FOV# = 55.0


   distance# = (Object Position X(1) - Camera Position X()) *
(Object Position X(1) - Camera Position X())
+ (Object Position Y(1) - Camera Position Y())
* (Object Position Y(1) - Camera Position Y())
+ (Object Position Z(1) - Camera Position Z())
* (Object Position Z(1) - Camera Position Z())
   distance# = sqrt(distance#)

angular_size# = ( Diameter# / distance# ) * 57.3
   pixel_size# = ( angular_size# * Screen Height() ) / camera_FOV#
   pixel_size# = pixel_size# / 2.0
DarkGDK Version
float angular_size = 0.0f;
float Diameter = 200.0f;  
float distance = 0.0f;  
float camera_FOV = 55.0f;
float pixel_size = 0.0f;    



distance = (dbObjectPositionX(1) - dbCameraPositionX())
* (dbObjectPositionX(1) - dbCameraPositionX()) 
      + (dbObjectPositionY(1) - dbCameraPositionY())
* (dbObjectPositionY(1) - dbCameraPositionY()) 
      + (dbObjectPositionZ(1) - dbCameraPositionZ())
* (dbObjectPositionZ(1) - dbCameraPositionZ()) ;  
distance = sqrt(distance);    angular_size = ( Diameter / distance ) * 57.3f;  
pixel_size = ( angular_size * dbScreenHeight() ) / camera_FOV ;
pixel_size = pixel_size / 2.0f;

Community Efforts - DarkForm 

Dark FormsHealer2000 made a post back in February to the DarkGDK boards. It was a simple form-generating package, for creating forms, labels, textboxes, buttons and status-bars. Since then, a number of other members have contributed to the code, in terms of bug-fixing, improvements and even new functionality. Within a few days, a text area control was added, followed by side bars and a number of fixes highlighted by Bran Flakes and Matty Halewood. Shortly after came check boxes and picture boxes, and tutorials to aid the use of the command set. MattBatt followed up with sliders, with additions also by kklouzal.

Dark FormsThe success of this small project can be seen in two of the demo programs written. One is a client-server chatroom, no small task in itself. There is also a desktop capture demo, which extends itself to capturing a remote desktop, all included in the download on the forums.

Monthly Newsletter Winner - $100 voucher up for grabs every month!

Find us on Facebook to discover more about The Game CreatorsJoin us on Facebook for the chance to win a $100 gift voucher each month. Simply add yourself as a TGC Fan and you will be automatically entered into the draw each month. The voucher can be spent on any of the products on our site. Sign up now, and good luck!

 

Take Control

 

Outro

Share your news with over 23,500 active games developers!

If you have something you'd like featured in a future issue then please get in touch and include as much information as possible (including where applicable: screen shots, URLs and zip files).

Issue 88 deadline - April 27th 2010.

"My work is a game, a very serious game."

M.C. Escher (1898 - 1972)