Editorial - September 2008

Issue 68 cover

I love my PC, and for many years have not upset my relationship by introducing a games console into the house. The repetition of last year's dismal UK Summer weather, however, has driven me to purchase a Nintendo Wii; I have become instantly hooked. The Wii has won my affections. To state the obvious, it has a great control system that everyone from my four year old daughter to our more mature friends can work and enjoy (I say "our", as it has become a pastime for the whole family and a rapidly expanding circle of friends who just happen to be passing by more frequently). But for anyone with an interest in game design, it is so much more.

Die-hard Playstation and Xbox fans will always cite graphics as being one of the major factors that make the Wii inferior. They are absolutely correct in the facts; the Wii does not have the graphical processing power of its rivals. But I would contest the claim that it makes it inferior.

There are some great lessons to be learned from the developers of Wii games, who have to be more creative to work around the lack of chrome available. The most notable feature of the majority of titles are the clean, crisp and bright graphics. There is a distinct and innovative use of primitive shapes, as demonstrated by the Mii system of characters. Returning back to basics, realism has been replaced by inventive use of motion-trails, particle effects and visual prompts.

My recommendation this month - especially for those in the UK suffering from cabin fever, is to locate your nearest Wii-owning buddy and take a closer look at what can be achieved by thinking simpler, and thinking around the perceived problem.

The TGC Store breaks away from FPS Creator this month, and is now available to all. Facebook faces a monster application called Social Arcade, all the news on this new online venture can be found in this newsletter. Our regular tutorial - creating a platformer - has taken a giant leap forward this time around. Even if you have not been following the full series, there is some great knowledge to be learnt about limb collision detection. The rest can be discovered for yourself, have a great read and a great September.

Until next time,

Steve Vink, TGC Newsletter Editor

contents

(1) Social Arcade (2) Convention '08 (3) Dare to be Digital (4) MSNBC Feature (5) TGC Store (6) D&D (7) FPSC News (8) Competition (9) Videos (10) DBP Tutorial (11) Lee's Tip of the Month (12) PlayBasic (13) From the Forums (14) Winner (15) Outro

Facebook gets an Arcade Facelift

Social Arcade by The Game CreatorsSocial Arcade is a Facebook exclusive application allowing anyone to make their own arcade games. The ALPHA version - expected to be released in the first week of September will initially allow the creation of 2D platform games.

As new features are added, the following types of games will be possible:

Absolutely no programming or art skills are necessary. All game entity behaviours are managed by the application using server-based AI behaviours. The user simply chooses the type of game they want to make and then construct it using the game elements for that genre. If you place down an enemy it will act like an enemy and it will know how to move around any scenery that the user places down. All game elements like scores, lives, high score tables and title pages are handled automatically by the app and can be customised by the user.

Once the game is completed the user simply clicks on the "Publish" button and the game is posted into their news feed on Facebook for friends to play and enjoy. If the user chooses to share the game for editing, friends can take the game and make their own version.

Social Arcade started development in mid-April 2008 and will continue to be developed through to 2009 and beyond.

Social Arcade on FacebookBehaviours and Intelligence

Behaviours encapsulate everything that relates to a game object, including artificial intelligence, animation frames and sequences, sounds, effects (such as particles and events). The user doesn't need to worry about any of this, the application handles it all. Every object in Social Arcade will have a behaviour associated with it that relates to what a user might envisage the object doing. For example, a tank will move around slowly kicking up dust as it moves and shoots cannon balls. Another behaviour will make a lava ground object emit fire and smoke and kill anything that lands on it.

The AI section has been a big focus and at an early stage we realised that we wanted to make upgrading Social Arcade as painless for users as possible. To this end all the Behaviours (which include AI) are stored on the server rather than inside the application. If we want to add a new behaviour we simply write it in the AI language we developed and store it in the database. When Social Arcade runs it pulls the current set of Assets from the database together with their suggested behaviours. This method makes Social Arcade very easy to extend without forcing the users to download a new version each time it is updated with new features.

AI controls all game objects, such as static backgrounds, platform lifts that move back and forth, ladders, enemies that hunt down the player and so on. The foundations for the behaviours are in place and working with the selection of assets we currently have. We would like to cover as many genres as possible, although at the moment we have been concentrating on the "Platform" genre and will expand to cover others later on.

Watch out for the imminent release of Social Arcade Alpha, we'll announce details in the TGC forums and on the TGC Facebook page.

The TGC Official Convention 2008

The Game Creators Convention 2008, Hinsley Hall, Leeds 

Last call for attendees!

September may only have just crept upon us, but that leaves just six weeks to the convention. If Book Online!you have left booking until the last minute, it's here. You can send a cheque and your form as described at the end of this article; or you can fast-track your request using the Google Checkout system that has been set up here.

What is happening at the convention?

As always, there will be a number of presentations by the TGC team on a variety of topics. They tend to be highly topical and so they have not yet been confirmed. There will be a wide range of subjects, all of which will give you a better insight and a distinct advantage in your upcoming developments.


Helios Meheness

There is an additional presenter this year; Grant Clark who is known to many of the forum browsers from a few years ago. Grant wowed us all with games such as Nanopod and Helios, along with some great retro-styled demos and comprehensive tutorials. He will be there to open up the world of game-making in DarkGDK, and will have some interesting demos to showcase too. If you want to savour some of Grant's previous work, his original page is still available with all of the downloads. Amongst the games and demos, you'll also find a collection of bitmap fonts for your projects.

  

Once in a Lifetime Opportunity

Lee Bamber will this year be offering everyone at the convention the chance of a lifetime. By the end of the convention there will be a new upgrade of DarkBASIC Professional, updated and enhanced with the requests that are put forward during the weekend. If you are attending and have a particular bug or feature that's slowing you down, start thinking about the best way to demonstrate how it works now, and how it needs to look by the end of the convention. Last year the community shaped the way DBP developed over the coming months, this time around the results will be instantaneous!

Prizes and Giveaways

Convention PrizesOnce again there will be a handful of goodies to hand out.  As well as prizes donated by regulars such as Freddix and Ron Erickson, we'll be throwing in some books I received for review (Dungeons & Desktops in this issues, and Quests which you'll hear about next month) and Rick will no doubt add more to the prize pot.

Booking Details

Convention Day Rate - £32.00 per day (£64.00)

Convention Attendance
Tea/Coffee/Biscuits throughout the day
2-course Buffet Lunch

Full Weekend Rate - £180

Convention Attendance
Tea/Coffee/Biscuits throughout the day
2-course Buffet Lunch
Accommodation (Friday/Saturday evenings).
3-course, self-service Evening Meal (Friday/Saturday)
Breakfast (Saturday/Sunday Morning)

Most of the accommodation is en-suite, but it is advisable to book early to guarantee your room. Other parties will also be using the facilities and booking rooms.

You can download the booking form here, and return it with a small deposit to reserve your place. We are very excited about this event, and hope that you will take advantage of this unique opportunity. Find more details and join in the discussions on the forums.

The Game Creators at Dare to be Digital

by Janet Winstanley


Captain Cannonball

Lee and I attended the Dare to be Digital event in Edinburgh on 10th-12th August. We had a great time introducing lots of new people to FPSC and 3D Gamemaker. The main part of the event was 17

teams from different universities who had the task of making a game in 10 weeks. The Protoplay part of the event was to introduce the public to these games by letting them come along and try them all out, and then they could vote for their favourite. We were not allowed to vote but our choice was a game called Captain Cannonball, made using Dark Basic Professional and Dark Physics.

The Game Creators were there to introduce people to game making and the attendees really seemed to enjoy it, it was great to see the look on the young people's faces when they made their own game then got to play it; the parents seemed to be having fun too. I mean, where else could you shoot crazy chickens with a banana gun!

It was really busy all three days and we had lots of interest from people wanting to purchase FPSC and 3D Gamemaker, but unfortunately we weren't allowed to sell at the event. We also had people that wanted to introduce the software into their schools and colleges which is a great boost to us and means we are on the right track.

The Game Creators at Dare to be Digital

The Dare To Be Digital event was sponsored by many developers and publishers including Channel 4 - a UK television network - so keep your eye out and maybe you'll see Lee. You won't see me; I was hiding under the table when the cameras went past!

 

MSNBC report on 3D Technology

"The Game Creators are very pleased to have been awarded an MTBS certification for the implementation of S-3D technology in the latest update to Dark Basic Professional"

The Game Creators recently featured in an article on MSNBC regarding 3D technology in games. An audience of 800 SIGGRAPH 2008 visitors witnessed true 3D gaming on dedicated projection equipment, and this is the focus of the article.

Last month you may recall Lee's Tip of the Month centered around this emerging technology which is already embedded in the latest update of DarkBASIC Professional. TGC have been awarded certification for compatibilty with the associated hardware and drivers.

"3D was meant to be seen in 3D, and it's great to see an organization like MTBS plant a flag firmly in the ground and state with determination that they want the real thing, and you know what? I think they will get it too! The Game Creators are very pleased to have been awarded an MTBS certification for the implementation of S-3D technology in the latest update to Dark Basic Professional. We look forward to extending our native support for S-3D to our other brands, including DarkGDK and FPS Creator in the near future," said Lee Bamber, President & CEO of The Game Creators.

MSNBC articleYou can read the full article on the MSNBC website.

Standalone Store for Everyone

DarkBASIC Professional

Standalone TGC StoreThe TGC Store, which has been embedded in FPS Creator for some time now, is also available as a standalone product. The Store has been released in beta format and is available as a free download, and will immediately show you everything available, from props and buildings to atmospheric music tracks. The new version functions in exactly the same way as the embedded FPSC version, using points to purchase and download assets. If you don't have a credit card, or have a relative looking to invest in your creative skills, your account can be credited for you, leaving you to get your resources as and when you need them.

The resources are compatible with your favourite coding applications, whether you are looking for small props, huge buildings or music to set your game mood. Previews are available through the store, and don't forget that many of our artists have provided a wealth of resources totally free. Even if you don't need anything specific right now, download the TGC Store and grab the free items, if only to sample the quality and put them to the test.

TGC StoreDownload the beta version of the store now and start downloading your free items. We encourage you to feed back in the forum thread to ensure the store is as user-friendly as you want it to be.

Scraggle's Wonderful Emporium

Code Brewers Resources 

Craig Chipperfield has for some time been supplying the community with a number of free resources, as well as tracking down and providing links to a host of other relevant freebies on the internet. There have been a number of updates and new additions, as well as a complete overhaul and new name for the site. Here is an opportunity to familiarise yourself with The Code Brewers repository.

Seamless texturesSeamless Textures

Numerous seamless textures, from grass to wood panelling, stone and tree bark are available in 1024 x 1024 resolution.

Star and Sun ImagesStars / Suns

16 hi-resolution PNG images with transparent backgrounds. One archive is available for quick download of all images.

Nebulae texturesNebulae

Ten Nebulae images, perfect for decorating the night skies. Again, these are transparent PNG images to make them completely flexible.

Planet TexturesPlanets

Possibly the most time-saving of the resources, the planets include a number of options. Included are 2D lightmapped images, textures for sphere models, lightmapped textures, bump and normal maps.

Real Planet texturesReal Planets

Ready-to-use textures for actual planets. Craig has taken the time to resource images that are free to use, and provided them in one place.

Gas GiantsGas Giants

Some more visually spectacular planets in the usual formats for easy application. The advantage of lightmapped textures is that you can optimise your game engine if you will only see one side of your planet.

Bitmap FontsBitmap Fonts

A huge collection of bitmap fonts are available at thecodebrewers.com. Whether you need hi-tec, eerie or sporting themes, you will find something to suit.  You may recall Craig authoring a tutorial on their use in Issue 59, which includes everything you need to implement a full font system.

All of these resources are completely free. We encourage you as always to provide feedback to the author, and let Craig know where and how you have used them.

The Code BrewersThe Code Brewers website: http://www.thecodebrewers.com/

 

MPL3D Solar System Update

MPL3DFrom one planetary based feature to another, Manuel Perez de Lema Lopez has released an update to the Solar System application,originally featured in issue 63. Having received feedback on the first release, a number of improvements have been made:

MPL3D WebsiteThe update is free for registered users, and for those who have not yet experienced MPL3D Solar System, the new features add to the reasons to take a look now. Visit the website for full details.

MPL3D Solar System Screenshot MPL3D Solar System Screenshot

TGC Sponsored Competition Results

The Christian Developers network have announced the winners of their latest competition. Sponsored in part by The Game Creators, the goal is to create quick, fun games focused on Christiandevs websitedifferent aspects of Christian teaching (either moralistic, theological or both) to promote Christ, Christian Games and Fun. Check out the Christiandevs website for the winners.

 

Dungeons & Desktops

Dungeons & DesktopsThis month I received Dungeons & Desktops - a relatively new publication by author Matt Barton- as a birthday present. In the usual style of computer-oriented books, it's quite sizeable, runs to several hundred pages, and covers a lot of ground. This however, is not a programming manual, although the content is just as useful to the budding games programmer. Rather, it is a history of Role-Playing Games, their inception and how they have evolved over time.

The subtitle refers to Computer Role-Playing Games (CRPGs). Although this encompasses the bulk of the book, it actually starts back in the 19th century and gives a fleeting overview of what came before. For me, this was just as intriguing as the electronic forms of RPGs that we are familiar with today. Admittedly I was a great fan of Dungeons and Dragons in my youth, and extended my repertoire to other great alternatives such as Judge Dredd. This book will certainly bring the memories flooding back for anyone else fortunate enough to experience this classic era in gaming.

The CRPG aspect is neatly divided into a timeline of Ages, rather like those you expect to find in game titles that span vast expanses of time. Again, there is much to be learnt about the first steps of this genre in the Dark Age, when the rare breed of computer genii started to realise the potential of mainframes for a new artform. From there the significant milestones, technological breakthroughs and great mistakes of the past few decades are detailed as we are taken through the six ages of CRPGs.

For me, this is a fascinating read. Regular subscribers may notice that I like to draw from my real-world experiences and utilise them to think outside the box when considering game design. Dungeons & Desktops is a good reference and insight into the thoughts and implementations - both successful and not so successful - of some of the biggest and most resilient game designers, creators and publishers.

A word from the author

I asked Matt Barton to pass on a few words of wisdom specific to the audience of the newsletter. Here's what he has to say:

"My advice to anyone aspiring to write good role-playing games today - particularly independent developers - is to become intimate with the games of the past. These include not only legendary classics like Ultima and Final Fantasy, but also lesser-known gems such as The Bard's Tale, Pool of Radiance, The Magic Candle, and many others. These games took diverse approaches to the central challenge of adapting tabletop role-playing games to the desktop, and even the "failed" approaches, such as the intriguing spell creation system of Betrayal in Krondor, or the fascinating reagent-mixing system in The Four Crystals of Trazere, may still yield great insights for modern developers striving to create something new. Furthermore, experiencing first-hand the brilliant gameplay of games such as Chrono Trigger and The Dark Heart of Uukrul would help developers hoping to refine these techniques in their own games. Even studying wretched games like Descent to Undermountain or Pool of Radiance: Ruins of Myth Drannor might help developers avoid making the same mistakes as their predecessors. Perhaps most importantly, however, is the knowledge of how a new game fits into what amounts to a giant network of previous achievements, hopefully contributing something that will have as much impact on the genre as the great artists of previous decades."

Excerpt - Chapter Five: The Silver Age

In 1981, the CRPG was still in its infancy. Programmers were refining their techniques and discovering the true capabilities of personal computers. More importantly, standards were emerging that would greatly improve interfaces, making CRPGs much more intuitive and far less cumbersome. So far, most CRPGs had been of interest only to hardcore role-playing fans already intimately familiar with D&D conventions.

These games lacked the sort of user friendliness that would have made them accessible to a larger audience. In any case, many gamers didn't relish the idea of learning one role-playing system just to abandon it when the next game came out.

The solution came in the form of long-running series, such as Ultima, Apshai, and Wizardry. Once gamers had mastered the interface, they could move on to the next game in the series with relative ease. As we'll see, these series had benefits for both developers and gamers, and they mark an important turning point in the history of the CRPG.

The most important games of the Silver Age are Ultima I: The First Age of Darkness and Wizardry: Proving Grounds of the Mad Overlord (both 1981). Both games launched successful and influential series that lasted into the 2000s, but it was Ultima that catapulted the genre into the mainstream -- indeed, its influence even extended overseas and inspired the Japanese console RPGs that so many of us are familiar with today.

Win This Book at the Convention

The publishers of Dungeons & Desktops have kindly donated a copy of the book, which we will give away at The TGC Convention in October.

FPS Creator News

FPS Creator News

X10 Model Pack Conversions

FPSC X10All model packs created for FPS Creator were designed for and tested against the DirectX 9 version of the product. When X10 was released, some users tried to use their model packs on X10 only to find incompatibilities and strange behaviour because X10 was designed with a different entity system and 3D rendering approach. We had a number of requests to make the model packs compatible with X10 and began converting them over. To date, four model packs have been converted over as close as possible to the original content, and are freely available to owners of the X9 model packs (model packs 1, 2, 3 and 16).

"...existing model packs will work out of the box and third party model packs and items will also be automatically compatible"

Some users have expressed an interest in the remaining 14 model packs and are wondering when the next one will be released. It was decided that rather than create two sets of assets, it would make more sense to release an update to FPS Creator X10 which allows the original model packs to be loaded without requiring any conversion whatsoever. This way existing model packs will work out of the box and third party model packs and items will also be automatically compatible. This work is built into the migration project currently in development and we will release more information as it becomes available. Watch the newsletter and forums for an opportunity to beta test the new migration version.

FPSC Agent V2.00

Compatible with FPSCTechno Valley has released version 2 of his helper tool, FPSC Agent. It's a handy utility that allows access to all of your tools in one quick-click icon in your system tray. Whether you need to create a new segment or test your latest game, the utilities are just a couple of clicks away. There are also options for backing up your game folders and tidying up the unnecessary files. In this latest version, you can also add all of your own custom links to the same menu.

FPSC Agent 2.00The full details are in The Game Creators forum.

 

He Is Coming

He Is ComingAlthough still a work in progress, this game is worthy of our attention. Andy Nicholas is paying attention to the smallest of details whilst creating this FPSC production, and the beta looks promising. You can download the Speed Test Beta from his site, and get a small preview now. He Is Coming, made in FPS CreatorHaving played the more comprehensive closed beta, I was pleasantly surprised. Firstly, the lighting is befitting of the game style, and when coupled with the sound effects it is a truly chilling atmosphere. It also encompasses some more devious elements; you won't get from A to B without being observant and employing some daring manouevres.

He Is ComingWatch the forum thread for progress and news of the game release. Andy promises the release of the full game is imminent!

NVIDIA Physx Demo Competition

NVIDIA PhysX Competition

9800 GX2The deadline for the NVIDIA PhysX competition has now passed, and judging will commence imminently. We thank you all for your efforts to produce some astounding work, and the results will be made available shortly.

If you haven't taken the opportunity to look at the Work-in-Progress threads created by the entrants, they are available on the forums.

Video Gallery

TGC Video Gallery

There are a number of small but fun games in the Program Announcements. Michael P has been particularly busy, producing two puzzle games.

Sudoku

Most people are familiar with Sudoku. You are presented with a grid of squares, made up of smaller grids and a handful of numbers to get you started. You must complete the remaining squares according to a number of simple rules. This version allows you to customise the grid to suit your skill level, setting the initial quantity of visible numbers. You can also play non-standard variations by setting the number of squares in the play area.

SudokuDownload this game from the forum thread  

Kakuro

This is another number-based puzzle game, in which rows and columns must add up to the designated values. Like Sudoku, repetitions are not allowed. Kakuro lends itself to more than one valid solution. Again, you can customise the skill level of the game in terms of size and initial number of hints.

SudokuDownload this game from the forum thread

 

Bomberman Beta

Graphiboc has released his unfinished masterpiece, which has been put to one side whilst he completes his exams. The game is not perfect, but is still extremely playable, well presented and slick.

Bomberman BetaThe game can be downloaded from the WIP forum thread.

Ripple - Rhythm game

Another new release is Ripple, which follows the theme of maintaining a rhythm to a tune, albeit with your mouse in this incarnation. Keep in time and your score will rapidly increase.

Ripple - Rhythm gameThe forum thread with download can be found here

DarkBASIC Professional Tutorial - Building a Platform Game Part VI

DarkBASIC Platform game tutorial 

by Andrew Vanbeck

Download Tutorial Project

Enter the Ninja

This month we get to meet one of Bruce's adversaries, the Ninja! Not only can he be controlled with a joypad/Joystick (Press A button to take over), he also has artificial intelligence (AI). So we have lots to cover this month; multi-player handling; AI; a new bone collision system and combat. Once again the meat of this tutorial is in the code, which will benefit from a tidy-up in time for next month's tutorial.

Multi-player handling

Ninja Attack!Because Bruce now has some company, the update_player() function has had a major makeover. Now it needs a player number passed to it; right now it depends on whether the player object is visible, but it now has to take care of player controls and updating, as well as AI enemies. The Ninja can be controlled just like Bruce, except that for now the Ninja cannot climb ladders. The AI will need some work to get ladders working sensibly. Two new blocks have been added to specify player and ninja start locations. The player should have only one, but the ninja can have as many as is needed, as he will spawn randomly at one of the blocks.

Up until now the player variables have been stored as globals, which is not ideal when handling multiplayer like this, so it's been switched over to a typed array:

`Character properties
type charactertype
  plx# as float `X position
  ply# as float `Y position
  plz# as float `Z position
  plf# as float `Frame
  oplf# as float `Previous Frame
  plf_offset# as float `Frame offset
  plfs# as float `FrameSpeed
  pli# as float `Interpolation
  oplx# as float `Old X position
  oply# as float `Old Y position
  plxs# as float `X speed
  plys# as float `Y speed
  pdir# as float `Player direction smoothing
  mv as integer `Player moving direction
  pdir as integer `Player direction
  pmode as integer `Player animation mode
  plg as integer `Player on ground? 0 or 1
  hit as byte `Player hit by another player
  hit_down as integer `Player downed delay
  down as byte `Player hits by another player
  ai as byte `AI mode
  startdelay as integer
endtype
dim char(2) as charactertype

This is largely the same as the global setup, but with some new additions to enable combat etc - HIT, HIT_DOWN, AI, and STARTDELAY. HIT is a value from 0 to 3, and every time a player is hit this increases, until it reaches 3 and the player is knocked down. The player will stay down if they have been knocked down 3 times, then they will respawn. AI mode is set to >0 if the character is AI controlled, each value corresponds to a particular action.

I'm not sure how common it is to have AI handling simply intercept the player controls, but it works well. The AI mode is established depending on some basic factors:

Game Logic for Artificial Intelligence

So cyan is the default mode, waiting - from this mode the ninja can go onto any action, and when an action is complete the mode is usually set to wait. Most actions are decided based on general information, like: is the player close, can I see the player, is the player below me. Then these are used along with random triggers to decide what to do next.

I'm not sure how well balanced Bruce and Ninja are at fighting each other, but for now the AI puts up a reasonable fight, enough to get on your nerves at least.

Some very basic path finding will make ladder climbing possible, so we will look into that soon. The original game only had ladder climbing on the green enemy, but given that he's a Ninja I think he should have ladder climbing as well.

Combat

Along with map collision, often characters need to interact with each other much more exactly. Combat demands very accurate collision detection, but as this is a 2D game, it makes sense to keep the player on player collision 2D. One of the most robust methods to use is line on line collision, by passing 2 sets of line coordinates to a function you can check whether they intersect. The function I use was made several years ago by Kevin Picone, I'm sure there's much shorter functions out there and different ways to do it, but I find this one gives exacting results. Check the accompanying code for more details, the function is quite simply named intersect()

For this line on line collision, there's yet another typed array:

type line_collision
  xa as float
  ya as float
  xb as float
  yb as float
  owner as byte
  mode as byte
endtype
global line_count
dim linecol(100) as line_collision

The array holds both X and Y coordinates of the line, the owner object that the line belongs to, the mode is simply set to 1 on creation. On each loop, the bone structures of whatever player objects are visible are added to the linecol array. By tracking the object that the line is created from, it's possible to check which object is hit, without this Bruce would just punch himself the whole time. The bone structure on Bruce and Ninja are practically the same, with the exception of the bones on the sword hand, that cover the sword instead of the fist.

Collision using BonesEach bone that we need to check for collision is added, then checks against the collision table are done either by passing a set of line coordinates to line_colcheck(), or by passing the object and 2 limb numbers to line_limbcheck(). If a collision is found between bones 7 and 9 then Bruce just got slashed.

There are a few neat effects possible once the bone structure is known, creating skeletons for example, or even making the character blink. Each limb represents a bone, in DBPro these can be scaled, rotated, and offset. Although it's not possible to hide a bone in animated objects like these, it is possible to scale a limb to nothing, if I was more violently inclined I could add limb severing and blood effects.

Ninja is clearly a copy of Bruce with some minor adjustments, saving a lot of time and animating him was a lot easier - but the other enemy will need a completely different mesh structure. If you're like me and your media skills are in the ‘can just about get by' category, then re-using stuff is always a good idea.

Other changes

Last month I mentioned adding hotkeys to the blocks. That has been implemented now; when selecting a block press a number key to set it, then when editing just press the number key to set the edit block. You can also move the mouse to the bottom of the screen and click on a hotkey icon.

It didn't seem right to add all of this action and not have some cheesy sound effects to go with it, so I've added some free sounds from http://www.a1freesoundeffects.com - we will cover that next month.

Lee's Tip of the Month - Constructive Solid Geometry

More tips from Lee Bamber

Constructive Solid Geometry - otherwise known as CSG - is the technique of using the geometric data of two or more shapes to create a new shape. This is used for common tricks such as punching holes through walls or bolting details onto an existing mesh to create protruding features. Dark Basic Pro, once updated to U7.0, incorporates this feature and you can find CSG in the built-in help manual.

The commands are fine, but an example showing how they are used is even better. Included with this tip is source code and media from the DarkSOURCE product which shows you how to create a wall and a punch object, and then drive the puncher through the wall leaving a hole behind. The new wall is permanently changed and will respond exactly as a regular mesh would including correct collision detection and ray casting. Used sparingly, CSG is not process intensive and you can use the feature in real-time. For example, if your game had dynamite, you could create a punch shape that resembled the hole such an explosion would make and then allow the player passage into a new area of your game, simply by blasting through your wall in real-time!

CSG Demo CodeThe code itself is quite straight forward, and of the 109 lines of code in the attached example, only line 43 is of relevance with the code:

 perform csg difference 5, 6

This command takes the object number 5 as the solid object to be sliced into (the wall) and object number 6 as the punch object (the door hole) and calculates a new mesh based on the difference between these two shapes. The result is stored in object number 5, erasing the object that was previously there. Object number 6 remains unaffected and can be used again to punch more holes if you wish, or can be discarded after the operation.

CSG PunchingThere are more CSG commands but the 'difference' operation is the command you need to punch holes and indents into your static geometry. You could even use the CSG commands as the basis of a rudimentary 3D art package coupled with the MAKE MESH FROM OBJECT and SAVE MESH commands to export your modified geometry for later re-loading.

This pre-processing of CSG operations and saving them out for later reloading is a great trick if you want to eliminate the slight FPS drop that happens each time you perform a CSG task in real-time. If for example you are destroying a lot of wall, and ten CSG tasks are carried out at the same time, you may notice your game slow down slightly. To avoid this you can pre-explode the walls and save out the meshes. Load them back in before the main loop starts, and when the explosion occurs you simply swap out the old mesh walls and copy the new ones in. This can be done instantly without any slow down and there is no limit to how much CSG you can have in your game. A couple of limitations to this technique include requiring additional storage for the saved meshes, using more memory to store the meshes before the game begins and of course the location of your explosions would be somewhat fixed as the exact location of the hole would need to be pre-determined. Those limits aside, you can have a lot of fun mixing and matching real-time and pre-processed CSG in your game to create a much more destructible and dynamic landscape, and something you will see more and more of in games to come.

PlayBasic News

Playbasic News  

by Kevin Picone

With the end of the month looming, we're finally able see the completion of various refinements made to PlayBasic over previous months. The goal over this period has been to bring some newer visual effects and performance enhancements to the classic edition of PlayBasic. These come in the form of new rendering modes such as Alpha Mult, Alpha Inverted Subtractive and Anti Aliasing, through to further extensions to the texture mapping sprite engine which now supports Alpha Channels and Filtering as well as Mode combinations via the new Texel compression system. All of these give the user greater freedom to create more contemporary 2D visual effects, without breaking the bank or bumping up the graphics hardware requirements. We're in final stages of beta testing it at the moment, so the new update should be available by the time (or just after) you read this. So check the Underware Design home page for the actual announcement.

Where to from here? That's really becoming a big question. The simple answer is, we'll continue working upon PlayBasicFX, but time is slipping away from us again and there does seem to be some big decisions on the horizon. What's PlayBasicFX? It's the big brother to PlayBasic, new everything basically. Behind the scenes PBFX uses our VM2 -> VM3 runtime for greater power and performance. However, one thing that's stopping us at the moment is that new PBFX IDE is nowhere to be seen. So in the meantime the current beta uses the existing IDE. Not ideal, but a solution. But that's old news.

Some of the most interesting decisions ahead revolve around the core runtime technology. Things sure have changed a lot from the when first betas of PlayBasic were in development some five years ago. Originally our objective was to build a simple language to be resource and system friendly as possible, which turns out to be easier said than done. The evolution of that was obvious, build a version that uses the latest API's, and latest hardware buzzwords. This was the original direction of PBFX. Today however, I'm not so sure that's the best long term solution. If we forget about graphics API's just a second and focus purely on the core compiler & runtime technology then there are some big challenges ahead; namely transparently leveraging multicore and the most optimal native code generation. What fun!

Heroes Quest - 2008 PlayBASIC game making competition

Heroes Quest Competition

Fancy an extra $1500 in your back pocket ? Who wouldn't! Well, you've only got another month to get an entry into the Heroes Quest competition, so fire up those funky programming fingers and get cracking!

Not familiar with the Heroes Quest? In this year's theme, contestants are challenged to design a character-based platformer (in PlayBasic), where players must guide the hero in search of long lost treasures, or rescue the damsel in distress, as always. Designers are free to choose any type of platformer representation they see fit, be it side on, top down, isometric or even 3D if they're up to the challenge.

Head over to http://HeroesQuestCompetition.UnderwareDesign.com to get started.

Over And Out

Until next time, I'm off to continue bashing bits in some other dimension. Other wise known as sitting at my dev pc.

From the Forums

A few links you may have missed that have appeared in the past month...

Simple BASIC Language

Zotoaster has been experimenting with the idea of making a basic language from...a basic language! Smart implementation of some of the standard coding concepts are there, with a neat parsing engine and room for expansion. Take a look for inspiration.

Demon GUI

A thread originally started as a quick demo of a concept in the making has turned into an in-depth discussion of what makes a nice GUI, and the original project becoming a fully fledged system, hopefully due for an airing in the near future. Lancewrath, we wait in anticipation.

This month's Winner

Each month we pluck one lucky subscriber from the newsletter mailing list and award them a free copy of DarkBASIC Professional. The email address of this month's winner is: s**ner.prest***ge@gmail.com If this is you then send us an email to claim your prize.

Outro

Share your news with over 19,000 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 69 deadline - September 26th.

"The British are coming! The British are coming!"
Dan Topolski, BBC sports commentator, Beijing 2008.