Thursday, 17 February 2011

Creates Tutorials, Conquers Resources and TDN, Slays localClientConnection Hax

I use the Torque 3D indy game engine, and to be honest it always had a rather steep learning curve. The site is a mine of 10 years of coding and scripting information ... but rather disjointed and scattered, so I decided to make a tutorial on creating a simple, single player first person shooter game to help ease the initial bewilderment. It's the "Simple FPS Tutorial".

On the Gargegames/Torque3D Indy Game Engine Site, my profile's "submitted resources" count has increased hugely. Admittedly the sheer scale of this expansion ended up being driven by the character and word count associated with the blogs/resources rather than my own quest to fill an entire page and bit of the resources section with my own graven image.

Resource word count had shrunk somewhat, no doubt down to the new servers and general on-going web flux and reorganization that came about with sinking of IA and the rising of GG. Plus the return of the "backslashes eating posting bug".

So an inititally planned three part series, which was then extended to a four part series, in the end became a twelve part series with a considerable amount of waffle stripped out, ending up being a "just the facts, ma'am" set of 12 tutorials that answer some of the most repeated questions posed by scum-sucking, whining, noobs ...

... er ... I mean ...

... valued and respected newcomers to the GarageGames and Torque Community.

So, by the time it takes to publish 4 or 5 Penny Arcades - which is about my last remaining tenuous grip on the actual concept of measurable lengths of time - all parts were written, tested, tweaked, refused uploading, seperated into more parts, tweaked, tested and forced down a copper wire. And then converted into a rather dodgy pdf format (having not done that before) using some open source stuff I found lurking around the net, before finally shoving it into the newly created T3D tutorials section of TDN ... which I also had no idea how to do, and made a right mess of Ronny's formating in the Tuts section until he fixed it.

And so, it is done ...

mfw ... minus the ears ... and boobs obviously ... and good teeth, I'm British ...

It's a step by step tutorial covering what is required to make a simple single player FPS:

Starting a New Project (also covered in docs but I wanted to start the beginning at the very beginning)
Creating the game area for the level
Making Custom Weapons (Art and Script) files for semi-automatic and full-automatic weapons
Having both weapons share a common file for particle effects and audio
Making a custom Player
Making a custom gametype
Making a custom Ai and associated simplistic combat scripts <---- often asked question by scumsucking n00- community newcomers. Previously the answer was both esoteric and hidden in forums/TDN.
Using paths for the custom Ai
Scripting gameplay <---- triggers FTW!
Creating a cool explosion in-game <---- games love explosions!

In the end, only three files are ever edited by the user (datablockExec, scriptExec, default.bind), all others are custom created from scratch ... so there is no overwriting of stock data.

Anyhow, the stock response to new forum posts asking about any of the above should now be:
TDN is your friend

Obviously I had to bang this "Simple FPS Tutorial (single player)" out as fast as possible, especially after what Renee had been threatening to unleash upon the world. Simple FPS Tutorial would have appeared to possess a puny manhood post release of such a monster. So first blood to Steve.

Steve Pictured After Final Tutorial Upload

And the pdfs (with the accompanying custom files for reference) are availabe on eb's Unofficial Torque Community Upload System.


So with that done and dusted, and basking in the warm glow of my supernova'd ego, it's time to return to my own project, originally codenamed "Badger of Doom" but possibly about to be renamed "Steve's Folly".

"Steve's Badger" ... no, let's not call it that ... has been somewhat of an organic creation, learned on the job, from the school of hard-knocks, studied in the sweltering miazma of here. Suffice to say there's been some hax made over the years, just to get stuff working and not have to think about. It was either that or whine incessantly in the forums. But, with the stars right it was the Penny Arcade upload to bring forth the mighty sword of spanking, and begin the momentous task of slaying every custom use of the dreaded ...
%hax = localClientConnection();

Said mighty task ... ended up not being quite as fearful as first thought, and was wrapped up in time to see Arsenal score the last goal against Barcelona on the telly. There was some amusing moments to the task though, the highlight of which was:

function serverCmdUnmountWeapon(%client)
echo("Server Command to UnMount Weapon - " @ %client.player.getname() @ ".noFiddling = " @ %client.player.noFiddling);
if(%client.player.noFiddling != 1)

Did you see what I did there :P
Oh how we laughed!

And now we have fully functional networking, regardless of the fact that it's single player, nice to have stuff working properly with pretty script rather than ... that. In fact there's still one small issue but that's 'cos I've got a little hack to interrupt "player move" in code using a global and we'll have to let that wait before we attempt a frontal assault against the code.

So, back to gameplay creation it is. I've had an enormous, completed, but rather empty of action corridor crawler level for what seems like eternity, and it needs turning into a working single-player FPS level.

Video of the play-through of the completed Simple FPS Tutorial

No comments: