If you cannot view this newsletter correctly, click here to view it online

Editorial - February 2014

Issue 132 cover

I often talk about the importance of testing. It wasn't until recently when a friend of mine qualified in being a professional tester that I realised just how many types there are. Check the jobs boards and you'll find that testing has become an industry in its own right. I've covered many of these areas in my time as an IT professional, but without the depth that is now expected. To cover every angle you'll need to unit test, acceptance test, functional, regression, installation, smoke, black, white and grey-box, performance, destruction, usability and security test to name many but by no means all types.

As individuals and hobbyist coders we can't expect to complete the full library, at what point would we find time to code! But this list does highlight that testing is of utmost importance, and we need to add it to our development regime. Test often and you can't go too far astray.

I have been scouring the forums this month to uncover the most testing of situations, and finding as I always do that somebody will always have the solution. You'll find two of these in the newsletter transformed into tutorials. Oculus Rift has passed the integration testing into FPSC Reloaded, along with Lua Scripting. In amongst you'll find more news from around the TGC globe and way beyond to the planets as yet unreachable by mankind (or are they?).

Until next time,

 Steve Vink



(1) FPSC News (2) AGK (3) AGK Tutorial (4) AGK Ad Network (5) TGC Channel (6) Mars One (7) From the Forums (8) Social Feeds

FPSC Reloaded Blog

FPS Creator Reloaded by The Game Creators


By Lee Bamber

Each month we will be bringing you updates on the progress of FPS Creator Reloaded. You will find a running commentary on the development through the FPSC-R Blog, but right here you will find some of the selected highlights that deserve your utmost attention. You can also follow the development on the official Facebook page. Within the R&D offices here at TGC, Reloaded is now our main focus and we aim to constantly develop it to make it into a world class game creation tool. With a refreshed passion we're excited to be bringing the technology up to date so it'll make amazing looking games.

Lee Bamber, FPS Creator Reloaded Developer summarises his January achievements.

I had the fear that this old module might not play nicely with the new version of DBP, but they were unfounded. The module performed very well and within an hour I was able to create a LUA script, call LUA functions, read LUA arrays and set LUA globals.

Lee Bamber


With the new year we bring new features never before seen in FPS Creator Reloaded. Not only are we building an application with all of the latest graphical tricks and perfomance to create stunning worlds, but we are also introducing you to new tools to give you more freedom than ever before.

Lua for FPS Creator Reloaded 

Scripting has been very popular in the original FPSC, and for good reason. This is the mechanism by which you create unique gameplay and add many dimensions to your game. FPI is the bespoke language and contains over 200 commands to customise your game. We are now taking this to the extreme, and opening up LUA as the scripting language. This will not only allow you to use similar commands to those you are familiar with, but you will also get the full library of LUA functionality too. This opens up advanced scripting abilities such as complex data manipulation, extensive mathematical operations, dedicated functions and much more. In short, we are opening up a whole new world to anyone ready to take advantage of advanced scripting techniques. What's more, we are using a tried and tested module from DarkBASIC Professional (Unity), which we know has performed well for many years. Lua is used in many game engines such as Warcraft and Far Cry.

 Lua Scripts

What is Lua?

Lua is a powerful, fast, lightweight, embeddable scripting language. Lua combines simple procedural syntax with powerful data description constructs based on associative arrays and extensible semantics. Lua is dynamically typed, runs by interpreting bytecode for a register-based virtual machine, and has automatic memory management with incremental garbage collection, making it ideal for configuration, scripting, and rapid prototyping.

Lua has a deserved reputation for performance. To claim to be "as fast as Lua" is an aspiration of other scripting languages. Several benchmarks show Lua as the fastest language in the realm of interpreted scripting languages. Lua is fast not only in fine-tuned benchmark programs, but in real life too. Substantial fractions of large applications have been written in Lua.

For more information on Lua, visit the website.


The Room Blobs - an update

You may recall the idea of Room Blobs in an earlier newsletter. We are proud to announce that they have now been appropriately named the Construction Kit. Work has started on this in parallel with the main engine work. The Construction Kit will be integrated directly into the 3D Editing Mode and allow you to make all sorts of cool structures very quickly and easily. We hope to give the early adopters a test version soon.

Into the Rift


Another great addition to FPSC Reloaded this month is Oculus Rift integration.  This is the latest in Virtual Reality technology, putting you well and truly into the middle of the action. Taking VR further than ever before, it will ultimately be a consumer-level device with a true 3D window into your game, where the motion of your head will control the camera. Hopefully it won't be long before the prototype devices become a little more elegant. In the meantime, you can see us testing it for the first time in the office.



Reloaded Discount Deal 

TGC Newsletter readers can currentlly gain a 20% discount on the price of Reloaded. To take advantage of this offer, enter the code TGCDEAL when you're checking out during the order process. Save today, ORDER HERE.

AGK Version 1 Updates

As AGK Version 2 continues to be developed, a number of fixes have been applied to the current version 1. This takes the product out of beta and into stable release 1.21. You will find the download in your account product page.

AGK V2 Alpha 2 Updates

Pledgers to AGK Version 2 can download the latest updates now, and work with more stable versions of the latest functionality. Keep posting your bugs to allow us to develop the most stable, feature-rich final version :


There are also a number of new commands included:



Developers are actively publishing AGK games

More about App Game Kit 2

App Game Kit (AGK) 2 will be a new and enhanced version of our current App Game Kit product. AGK is already used by hundreds of developers around the world, helping them to quickly create games and utility apps that can be coded once and then deployed across popular mobile platforms.

We have an exciting vision of how we want to evolve the product and your help is already moving the development forward with confidence.

For those new to AGK, the BASIC scripting system is very easy to learn and start coding with. If you're a seasoned developer you can access the extensive AGK libraries and use these inside your C++ projects.

The BASIC language has lots of game based commands that make it a cinch to create sprites, play sounds, add physics, code multiplayer games and much, much more. Once your game is compiled  you can take the resulting project byte code and run that through special players that we have created for the support platforms (iOS, Android, Windows, Mac, Blackberry). 

So far we have outlined the new capabilities that have become a tangible path to AGK 2. Don't forget that prior to July, we already had our initial Kickstarter funded and Goal One reached. Here is a reminder of the features that are included with those levels:

AGK has a very strong 2D engine on to which we will add new commands and effects so your games can look even more awesome.

Additionally, the sound library will be expanded to allow finer control of individual sounds - the volume and pitch will be controllable. Where supported, we'll add seeking control of sounds and music files and the ability to read the current volume data. The new App Window Size feature will allow you to change the size of the app window at game run-time for Windows and Mac. 

AGK 2 KickstarterYou can still pledge! We have a PayPal option now that the Kickstarter Project has completed.



AGK Mini Tutorial - Stepping out of the Pen

The easiest way to find a topic for a tutorial is to ask a question on the forums. This month I'm taking Naphier's code for working in Documents in the Windows environment, but outside of the AGK folder. This is useful for allowing the user to both load files into the game, and also save files such as screen shots. The code below will work in Windows 7 and Windows 8.

Under normal circumstances, AGK will keep your app file and folder navigation within the installation folder, and an additional AGK subfolder in the Windows' user folder structure.

This is imposed to ensure that the security constraints of all platforms can be adhered to. For example, you cannot look through the files of another application on Android. But in a Windows environment, we can relax these rules, and there are two commands that enable this:

These commands allow you to read and write files anywhere on the disk (within the normal constraints of the operating system).

The next challenge is to locate the user files location. This cannot be assumed to be on drive C:\ and we also need to know the user profile name to construct the path. This is done by deconstructing the default write path. If you recall, any files that are updated or created are written to a folder in the user documents folder. The format is:

<DRIVE>:\users\<user>\AGK\<Application>\media folder 

Firstly, we need to retrieve this path:

path$ = GetWritePath()

We can now use the getStringToken command to break this down into the constituent parts. The command requires a delimiter, and an index number. It will use these to break up the string, and return the part of the string requested by the index. This will become clear by reviewing the code:

drive$ = GetStringToken(path$ , "/" , 1)
userDir$ = GetStringToken(path$ , "/" , 2)
userName$ = GetStringToken(path$ , "/" , 3)

Let's use an example to explain what just happened. Take the folder path:


Forward slashes are used in the AGK representation of a path. Token 1 is the text up to the first delimiter, and we have created a variable drive$ to store this. Token 2 is the string between delimiters 1 and 2, which is stored in variable userDir$. Finally the third token is the string between delimiters 2 and 3, and represents the user name, used as the folder name in Windows. We have saved this as userName$. There are more elements but we are not interested in these.

Now, we can reconstruct these variables to set our new write path:


In just 5 lines of code, we have interrogated the necessary file structure and allowed our application to save files outside of the standard framework. What follows below is the complete solution from Naphier, to illustrate how you can utilise this. It includes code to create a new folder (myFolder) if it doesn't already exist, and writes a new file (myfile.txt) in the folder. Finally it displays the breakdown of the file path.

path$ = GetWritePath()
drive$ = GetStringToken(path$ , "/" , 1)
userDir$ = GetStringToken(path$ , "/" , 2)
userName$ = GetStringToken(path$ , "/" , 3)
found = 0
folder$ = GetFirstFolder()
while folder$ <> "" and found = 0
    if folder$ = "myFolder"
        found = 1
        folder$ = GetNextFolder()
SetFolder("") //so it isn't "media"
if found = 0
fileID = OpenToWrite("myFile.txt" , 1)
WriteLine(fileID , "hello!")



AGK Ad Network

Naphier has put forward a proposal to create an AGK Network. In essence, this would involve all AGK developers getting free advertising of their published apps and games through one another. In return, you will be advertising the publications of your fellow developers in your game. The project is at the feasibility stage, so it's important to voice your support in the forum thread if you are interested. You don't need a published game yet to submit your opinion.

How it works

The principle is very straight forward and once enrolled, easy to implement.

The sytsem will be akin to Admob adverts and image sizes. You'll be able to provide multiple banners for different products and versions. A number of code snippets will be provided for the required functionality in your game. These are likely to include

Developers will have access to a simple web page that shows the clicks for each ad/app combination, with a view to expanding the stats and functionality should it become a successful venture for all involved.

AGK Ad NetworkExpress your interest now in the forum thread, and get involved with the discussions at this embryonic stage.

The TGC YouTube Channel

Youtube ChannelHave you visited the TGC YouTube Channel yet? You may be surprised:

Youtube ChannelTake a look at our channel now, and make sure you hit the subscribe button to stay up to date with new video uploads. Very often you'll get advanced previews of upcoming news.

Extra Terrestrial Ambitions

Our community can never be accused of having modest ambitions or shying away from big challenges. Although many newcomers arrive with the dream of having the next MMORPG built in a day, their eventual aspirations are not that much smaller. 

Lunar Lander 2020

Back in December, I happened across the most sensational ambition yet from one of our Community members. Stephan Guenther (Space Dream Studios) has published numerous apps including Graviflyer, Blaulicht and most impressively the software for the 2020 Lunar Lander simulator at Kennedy Space Visitor Centre.

But his latest challenge is out of this world, quite literally. Whilst listening subconciously to a crazy story on the radio in the car, I heard the name Stephan Guenther. It was followed by an interview with a man speaking fantastic English but with a German accent. On checking out a couple of Google links on my return home, it was indeed our very own Space Dream Studios.

Mars One

So what was this crazy story? It was the background to a project to send a manned mission to Mars. And Stephan has volunteered to be part of the mission. By the way, it's a one way ticket; there is no physical way to return from such a trip due to the gravitational effects on the human body.

If you want to read Stephan's profile and read more about the Mars One mission, take a look at the official website

From The Forums

Halos aren't always a good thing

A regular question reared itself again recently in the AGK forums, although it is relevant to anyone loading images into their game, whether it be DarkBASIC Professional, FPSC or any other environment. The issue is described as:

"I made a tree...[and] set the background to a pinkish color. I then use setImageTransparentColor to make the background transparent. However it doesn't fully remove the background from the image. Any thoughts on how to fix it?"

David Gervais, a regular and professional artist, has responded with a comprehensive guide to getting your images game-ready.

Here is the example of the effect: 



When you stamp an image over a bright purple background and that original image has alpha channel transparency the tree image 'bleeds' into the purple background.. and as you can see the results are close to what is happening in the game.



The right image uses a flat neutral gray (R128,G128,B128) as the background which is then set as the transparency colour. As you can see it's still not as good as the middle one, but it's better than using purple (R255,G000,B255) as the transparent color..

The effect becomes even more apparent if the tree is placed on a dark or black background.


If possible always try to use 32 bit PNG image with alpha channel transparency. It's the best solution. But as demonstrated, there are compromises that can be done. If you go with a flat grey, you can make the grey a bit darker and have slightly better results if most of your game is set with a darker background (e.g R162,G162,B162)

Keep up to date with TGC on Facebook & Google+

Find us on Facebook to discover more about The Game CreatorsJoin over 6,000 fans on TGC's Facebook page to keep bang up to date on news, user projects from the forums and discussions.

We're keen to hear from all our avid users and we always love to hear what you've been up to with the tools we sell. So if you have something you want to share with the wider TGC audience why not post it into the TGC Facebook page?

FPSC Reloaded

FPS Creator Reloaded on FacebookThere are now over 1500 fans discussing Reloaded on our Facebook page right now. Whether you simply want to see the update and progress news as it is released, or get involved in technical discussions about LOD, Light and lots of other topics, sign up to this page today to be part of it.


App Game Kit 

You can join in the Facebook discussions in our AGK group page with over 560 members and we have a new AGK Facebook page.



You can also follow our products on Google+ 

TGC on Google+

FPSC Reloaded on Google+

App Game Kit on Google+ 




I think humans will reach Mars, and I would like to see it happen in my lifetime.

Buzz Aldrin