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

Editorial - March 2013

Issue 121 cover

The storyline of many films has been the blurring of reality and virtuality. From humankind entering the virtual world of Tron, to computers dominating our world in I-Robot and The Matrix, it has been a captivation of ours for many decades. The majority of these stories involve the battle between technology and the organic, comprehensible world we are accustomed to. Computers are generally bad! With Perceptual computing, the fantasy comes a step closer to reality. Fear not though; it comes in a form that is engaging, entertaining, and accessible to the hobbyist coder. We report this month on both Lee Bamber's new Ultimate Coding Challenge, and another AGK-developed perceptual game from the community, the artwork of which adorns the cover of this edition.

We keep our feet on Terra Firma to bring you the latest news on FPSC Reloaded, the updates in functionality for AGK, new games and apps available for your PC, and lots to learn through Kindle books and the App Developer Group.

Until next time,

Steve Vink

contents

(1) FPSC News (2) Ultimate Coder II (3) App Game Kit (4) AGK Kindle Book (5) Mr Dork (6) Perceptual Computing (7) MPL3D (8) App Developers Group (9) From the Forums (10) Facebook (11) The Game Creators News

FPSC Reloaded and Revamped

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.

 

Live Play Previews

The goal for game level previews is that when you press the green Test Level button, instead of the map editor being terminated and the new game executable launching into build mode, the map editor will simply snap into a new 'live play' mode which re-uses all the existing assets present in the map editor at that point. With this in place, theoretically, you should be able to press the button and instantly transport to the start marker in first person view, right inside your map editor world. I used to have such a feature in FPSC way back when called Preview but it was trapped between two worlds and did not really delivery on it's promise. You could say I am going back to Preview and finishing the job.

The Occluder Makes an Appearance

The Intel Software Occluder was something written back in 2011, which uses a system memory depth buffer and CPU rasterisation techniques to figure out which objects are entirely occluded by the scene.  The source code looks straight forward but it is quite involved and will take a lot of reading and picking out techniques to understand the whole thing, but it's a great technique, especially for PC's that have multiple cores. We'll be investigating whether this is something we can integrate into the product.

Perceptual Challenges

My app for the Intel Ultimate Coder Challenge II will be written in DBP, the same language used to create Reloaded, so this technology will filter through to the Reloaded universe at some point in the future. Early ideas include detecting if you dodge left or right and control the FPS camera to peek round corners or avoid rockets that are fired in your direction. Voice control so you can change and fire weapons/spells/abilities with a word. Facial tracking so the camera will focus in on the object you are looking at on screen (i.e. if you look to the top left corner of the screen, the camera zooms in slightly and blurs out the rest). We could even experiment with hands-free gaming, where you don't even need a mouse or keyboard (but that might be a stretch for high-speed combat).

Crunch Time

Starting last Tuesday and for the following four days I have entered what is disdainfully known in the industry as crunch mode. Essentially forced labour of coders until the deed is done, which in my case is two apps that need finishing immediately. I have the support of the whole team to help me in this, and together with help from the publisher involved, we are making lots of progress. Once done my shackles will be removed and I can totally focus on Reloaded from the rest of the year, so expect to read a lot more in next months newsletter.

GCD 2013

As part of my involvement in Intel's Perceptual Computing Competition I will be making the 5,000+ mile journey to GDC in late March. If you're attending then look out for a lost Wigan lad wearing an AGK polo shirt! I'll be blogging and tweeting during the event.

Lee's BlogKeep reading Lee's Blog for the very latest updates on the progress of FPSC Reloaded.

Make your Pledge to the Project 

FPSC Reloaded is underway and will be with our diehard fans and newcomers in 2013. But we still want your support to reach some ambitious but incredible stretch goals to implement even more fantastic features. Pledgers have already committed £6,550 to the project, over half way to the first stretch goal!

Already, FPSC Reloaded will incorporate new or improved:

FPSC Reloaded PledgeIn order to fulfill our stretch goals we are now offering avid FPSC users a way to get involved in FPSC Reloaded with our own internal TGC pledge system.

We have kept it simple and are offering a single pledge amount of £50. Just like Kickstarter, your pledge will be used to help pay for the development and entitles you to a few gifts.

These pledges will go towards the development of demo assets and media and also new features when we raise enough through this way. This list includes:

As further pledging milestones are reached, you can expect to see Tree Systems, Entity Reflections, Entity and Icon Makers, Water/cloth physics, road painting, vehicles, additional game modes and more.

If you choose to back us and pledge we can offer you the following:

FPSC Reloaded Pledge

Please pledge today!

* You will receive the model packs as soon as your order is processed.
* FPS Creator Reloaded is not due to be completed until October 2013.
* New stretch goals may not be available until sometime after October 2013.

The Perceptual Conversion of 7 Ultimate Coders

The Ultimate Challenge. Seven developers compete for seven weeks to create apps that utilize the  latest Ultrabook convertible hardware along with the Intel Perceptual Computing SDK and camera to build the Ultimate app prototype.

So what has Lee chosen to dedicate every waking moment of his life to, this time around?

"A great ‘Perceptual Computing' app must provide an experience that transcends the limitations of existing solutions", writes Lee in his official weekly update. "My project will be to create a new breed of Webcam software which solves the problem of bandwidth lag while teleconferencing with multiple users over the internet. At the same time, I will build features into the app to allow hands-free sharing and manipulation of images, voice and facial synthesis to protect your privacy and my favourite; the ability to transport yourself into a virtual 3D scene such as a conference room or Viking mead hall. Markets include professional video conferencing, remote-learning and of course entertainment and gaming. With only seven weeks to code this app from scratch, it's ambitious to the point of foolishness, but I love a challenge and the final product (if I survive) will be the ‘must have' app for your camera."

In amongst Lee's trademark ramblings of a programmer truly dedicated to his craft, there are some wise words that we should all pay heed to. "In the real world, we like stuff that just works. The better it works for us, the more we like it. The keyboard works so well we've been using it for over 140 years, but only for writing text. You would not, for example, use it to peel potatoes. Similarly, we would not use Perceptual Interfaces to write a blog, nor would we use it to point at something right in front of our nose, we'd just reach out and touch it.

"Context is king, and just as you would not chop tomatoes on your touch tablet, there will be many scenarios where you would not employ Perceptual Computing. Deciding what those scenarios are, and to what degree this new technology will improve our lives remains to be seen. What I do know is that app developers are very much on the front line and the world is watching!"

Read the full version of Part One of Lee's blog here, and check back for progress over the coming weeks.

You can also watch Part Two, which includes the transformation of your host into a live 3D face. Forget what you already perceive about mapping a video onto a predefined model, here you will see the realtime transformation of Lee into his databound counterpart. This technology forms the essence of the challenge, transporting one person into another's computer in full virtual reality.

 

AGK Roundup

AGK has arrived

With so much activity inside the development hubs of The Game Creators it is sometimes challenging to keep the community up to date with the progress we are making. Here we have a roundup of the many projects that make up the momentum we are feeling right now, and will be bringing to you very soon.

The Cogs of New AGK Technologies

The definitive way to ensure new AGK108technology is always injected into the product is to create a demand for it. Rather than wait for the demand to come to The Game Creators, we are creating it ourselves. You have seen a number of apps and games appear over the previous months, with more to come. Each one of these apps requires new features, and these requirements are added to AGK. Facebook interactions, notifications and many more features are already in the Beta that is available to all AGK owners in their Order History. We are close to cementing these in a full upgrade release shortly.

Game Center commands for iOS are now in AGK.

A feature pivotal to iOS releases is Game Centre, Apple's social gaming network. Game Center enables your users to track their best scores on a leaderboard, compare their achievements, invite friends to play a game, and start a multiplayer game through auto-matching.

Push notifications for iOS and Android

Turn-based games have had the monotony of waiting for your opponent removed with Push technology. Make your move, and your device will tell you when your opponent has responded; there is no need to constantly monitor. Seen in popular games such as Words with Friends, you can now find this feature within AGK, and already integrated into Hide It Find It.

Bug Fixes

As we progress, fixing the errors reported is of course implied. Improved image loading and slow loading on iOS was a specific problem for many users, and this is now resolved. You can review current issues and report others on the bug board here.

Memblock commands

A much sought-after feature from the DarkBASIC Professional stable is memblocks. These are now to be a standard part of the language, allowing manipulation of media, data and more.

Object alpha blending depth sorting, Object Instancing

As the 3D aspect of AGK continues to progress, some of the features that simplify and optimise your games are making their way into the language. Being able to utilise alpha blending fully and respect depth sorting is essential, and is working as expected in the 3D engine. Instancing - which allows you to optimise your environment where models are reused - is also implemented.

Get device language

In a global world and a global programming language, it is important to know the language your users are speaking. This will be possible in the next release by interrogating the language of the device, and allowing you to fine tune the user experience accordingly.

 

FPSC-2-AGK

FPSC-2-AGK is a useful tool that allows you to easily convert any level cerated in FPS Creator, so it is ready to use in your games made with App Game Kit. Not only will a fully light mapped and textured level be exported, but also the code and project files needed to load and play the level in AGK can be generated. 

 

 

 Order your copy from the FPSC2-AGK Order page.

 

AGK Snippets

Do you have any AGK code snippets that you would like to share with the community? We're building a collection of useful code samples that showcase individual features of AGK. This will help new and existing users get to grips with all areas of the AGK engine.

Follow the forum thread to learn more about AGK and it you can, please submit your own snippet of code advice. TGC will be adding a whole section to the AGK web site where these snippets will be easy to access and read. 

Teach Yourself AGK on Kindle

This is not as confusing as it seems. Grab yourself a copy of Teach Yourself Game Programming for Android and Windows for your kindle from the Amazon store, and ultimately you will find yourself with the skills to publish your games to the Amazon Store!

Teach Yourself Game Programming for Android and Windows allows users of any age or experience to learn game programming. This book will take you through two phases. In phase one you will learn the basics you need to produce a working game, then you will be taken through a simplistic game example. In phase two you will expand upon your already acquired knowledge so that you can create games good enough to sell. You will then be taught how to program a game that is actively available on the Google Play market place. By the end of this book you will be able to produce games that you can sell on both Windows and Android devices. If you have access to an Apple Mac you can even compile the same games for Mac OS X and iOS for iPhone and iPad devices.

Teach Yourself Game Programming for Android and Windows

Anyone already owning AGK can download the first six chapters for free. You'll find the link in your Order History on The Game Creators' website.

Teach Yourself Game Programming for Android and WindowsThe kindle edition of this book is available now from the Amazon bookstore.

Dork in a Box

Mr DorkMr Dork 1 and 2 games are now available as boxed PC products in the UK. Published through Focus Multimedia, your favourite character can be purchased through numerous outlets, to be treasured as a physical product, complementing the long-running downloadable PC versions and iDork available on iPad, iPod Touch and iPhone.

Lost in a world of school paperwork is 'Mr Dork' your doodled stick man who needs help to escape the reams of homework sheets that are his prison. Mr Dork is very sensitive and has to avoid many dangers across 63 levels of play. You draw lines for him to walk and jump across so he can reach the rip in the paper where he can make his escape. If Mr Dork touches any objects like pencils, protractors, staple removers and pencil sharpener blades then he'll die and be reset to the start of the level. Other dangers include doodles that come alive, such as a sketched gun that shoots bullets and UFOs that fly around.

Mr Dork for PC

Game level difficulty slowly builds as you play through and you progress is remembered between each game sessions. Playing the game is a cinch, hold down the left mouse button and then draw a line for Mr Dork to walk on. When you're happy with the line, single click a point to where you want Mr Dork to walk to. If you press the right mouse button all drawn lines will be cleared so you can plot a new course around the level. Some times Mr Dork has to navigate up the screen, you can press the space bar to make him jump up. If there's a line above him he will land on it. Good luck helping Mr Dork escape!

Mystifyingly Perceptual

Mystic Blocks

Intel Perceptual Computing Challenge

Matty H is continuing his domination of the Intel competitions, following his successful entry Bomb Breaker with a new entry into the Perceptual Coding challenge. Mystic Blocks utilises the perceptual camera to control the game environment, in your attempt to successfully rotate blocks to match the patterns presented to you. Anyone familiar with the UK game show Hole In The Wall will be familiar with the concept, although in Mystic Blocks you stay dry! Featured below is Matty's prototype, where you can see him moving the block with his hands, and the screen by his head movements. All of this is being achieved using AGK (Tier 2) and the Intel Perceptual SDK.

We hope to update you with future successes as this competition progresses.

MPL3D Solar System - Out of this World!

MPL3D Solar System

The new version of MPL3D Solar System has arrived. This well-established title includes new touch-enabled capabilities and a customizable spaceship mode, allowing the user to navigate all around the galaxy with Newtonian physics for the space flight.

Made with DarkGDK , this is the 5th version of the MPL3D series, and yet more imporovements on the original release. This is astronomy for the whole family.

MPL3D Solar System now has enhanced textures for celestial bodies and improved graphic effects, including

Navigate your Spaceship

Touch control adds a feeling of intuitive, natural handling, bringing a new experience to the end user. Spaceship mode enhances the entertainment side of the simulation, and even a fabulous 3d asteroids mini-game has been included. Spaceship control mode has all the usual options for this type of simulation, which include joystick and touch control, to allow you to use your preferred method for control of the craft.

The spacecraft has numerous configurable options:

The cockpit includes all kind of gauges for the three crew members, including gyroscope, G-force indicator, mission time, and even a 3d radar of the solar system.

MPL3D Solar SystemMPL3D Solar System is available now on AppUp.

 

App Developers Group - Algorithms And Efficiency

TGC App Developers Group  

The editor of The ADG Newsletter, Adam Hodgson, continues to share his knowledge of the pearls of wisdom that make good coders into brilliant coders.  

Recursion - Efficiency in coding

by Adam Hodgson

While it's not always as fast as its iterative equivalent, recursion can be a powerful ally when used correctly.  The beauty of recursion lies within its simplicity.  It is often easier to comprehend a recursive solution than an iterative one. 

What is recursion?

Recursion is simply calling a function within itself.  The most famous example for recursion is the factorial function.  

In pseudocode:

function factorial(int num)
    if(num = 0 ) return 1;    // base condition
    return num*factorial(num-1);
endfunction

This differs from iteration (loops) in a number of ways.  The first is that the local variables don't interfere with each other with each call of the function.  This comes as a mixed blessing.  The advantage is that we get a fresh instance of the function with each call but in order to remember each instance of the function, more memory is required.  In fact, memory is required for each recursive function call and as we all know, computers have a finite amount of memory.  This means that too many recursive calls can lead to what's called a stack overflow - running out of memory.  

The following program will eventually run out of memory and crash

function addToInfinite(int num)
    return num + addToInfinite(num+1);
endfunction

Most recursive functions will have what's known as a ‘base case' at the beginning.  When the base case is true, the recursion stops and all of the instances begin returning values.  Upon each return, the memory taken up by the function call is freed.  When creating a base case, we must be careful to ensure that it will end the recursion at some point.  If the base case is never executed the program will eventually run out of memory.  

How does recursion simplify coding?

So far, the examples of recursion can easily be converted into a loop and still be easy to understand but there are times when recursion is the most intuitive route to take.  

For example, lets say there are three people giving out one piece of free candy each, Alfred, Bill and Carl, and their positions are (2,5), (6,3), and (7,8) respectively.  What's the shortest distance (in metres)  you can walk from your location of (0,0) and visit all three people (you don't have to return to your original point).  Since we need to visit all three people once (hence no short cuts), we simply walk to the closest person from our current location each time.  As we start at (0,0) the closest person to us right now is Alfred (at 5.38m).  So we walk to Alfred.  From Alfred's position the next closest person is Bill (at 4.47m).  Finally, we walk the 5.1m to Carl.  This totals to 14.95m.  

Time to take this problem to pseudocode.  As you may have noticed, for each point we arrive at (including our starting point) we find the closest point and then proceed to walk to it.  Programming this bit requires checking the distance between each unvisited point and our current location to find which point is the closest.  We then repeat that process for every point we walk to.  You may see a recursive solution beginning to take shape.  

In pseudocode:

// store points in an array
Points[3] = { (2,5), (6,3), (7,8) };
 
function ShortestDistance(Point current, Point Points[ ])
     // base case - if there aren't any points left in the array then
// return a distance of zero.  The recursion ends when this statement is true. 
     if( Points.size < 1) return 0.0;
    
     // local variables
     int index = 0;
     float shortest = getDistance(current, Points[0]); // starting distance
     float tempDistance = 0;
     // find the closest point
     for n = 1 to Points.size -1
         // get the current distance
         tempDist = getDistance(current, Points[n]);
       
         // if the current distance is shorter than the distance stored in
// ‘shortest', set shortest to the new distance
         if(tempDist < shortest)
               shortest = tempDistance;
               // store the index as well
               index = n;
         endif
 
     next n
 
     // copy the closest point
     newStart = Points[index];
 
     // remove the closest point as we no longer need to check it
     Points.remove(index);
 
     // add the shortest distance we calculated above to the shortest distance
// found with the new starting point and remaining unvisited points
 
     return shortest + ShortestDistance(newStart, Points); // recursion!
 
Endfunction

The iterative solution looks very similar (try programming it yourself) but one thing you do have to remember is to reset certain variables when necessary.  Since each recursive call gets its own set of local variables, we don't need to worry about this but when programming an iterative solution we must reset certain variables to neutralise any unwanted effect it may have on the next iteration.  This can get messy with algorithms which require a lot more variables. 

Choosing between recursion and iteration comes down to a matter of preference.  Selecting a recursive method can help with readability not only with yourself but with others who may utilize your code.  However, recursion has its limitations and as there is such a catastrophic consequence for incorrect or careless implementation, we must be cognitive of the extent to which we use it.  As stated above - a powerful ally when used correctly. 

This article was presented in Issue 16 of the ADG newsletter. We welcome all independent developers to join us, the pre-requisite is simply that you are eager to share experience and resources with your fellow developers.

 

From The Forums

The Forums have Moved

In our bid to contiunually improve all aspects of our technology, the forums now have a new home. This has been instantly reflected in faster responses, and enhanced upload quotas for bigger projects. It also helps our management of the data.

Sprechen Sie Deutsch?

AGK DevelopmentFor our community members in Germany, there is an article about Android development using AGK. It certainly looks interesting, and perhaps somebody with both Germnan and English skills can share it on the forums for us.

SQLite3 for DarkBASIC Professional 

This plugin emables SQLite3 access. It is serverless, self-contained, requires no configuration and has no dependencies. SQL is a very powerful, very simple, database language in itself. And it's fast.

Elite: Dangerous

For a review of this new game by Daniel, take a look at this thread in Geek Culture. The game has been an inspiration to many, including the successful Star Wraith games wittem in DarkBASIC.

 

Keep up to date with TGC on Facebook

Find us on Facebook to discover more about The Game CreatorsJoin over 5,100 fans on TGC's Facebook page to keep bang up to date on news, user projects from the forums and discussions. At the time of writing we have just seen our 5,001st fan sign up to the Facebook group!

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?

Don't forget you can also join our FPSC Reloaded and AGK fan pages too.

The Game Creators News

News, views, product launches, videos, tutorials, model packs,
community projects and competitions;
you will find all of them on The Games Creators News site.

All of the newsletter articles, tutorials and announcements are now online, and available as soon as it hits the press. 

Subscribe using your Favourite Newsreader 

You can subscribe to our newsfeed using RSS, making delivery of our featured articles even more slick and efficient. The address for your reader of choice is:

//www.thegamecreators.com/news/feed

Add the feed to your mobile device, the example shown here is the News App that comes as standard on the Blackberry PlayBook; Read your news on the move!

 

Alternatively, use Google Reader on your Netbook or Desktop computer to browse the headlines at your leisure. You can use the monthly archives to review older information, and tutorials that will be as valuable in 12 months as they are today. You'll find numerous ways to browse by category and keywords, and even catch up with Lee Bamber's Tweets in the same interface!

 

"We are all created equal in the virtual world and we can use this equality to help address some of the sociological problems that society has yet to solve in the physical world."

Bill Gates