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

Monday, 7 February 2011

Drawing, More Drawing, More Ruddy Drawing - also Theora, GUI

The previous few weeks have consisted of drawing, more drawing, and even more drawing, interspaced with faffing, more faffing and even more faffing, around with various ways to get a Theora video, and then not liking the quality and deciding on a GUI replacement instead.


Previously on Steve's rambling dev blogs:
[/ gravelly_American_voiceover]

I might have mentioned something about drawing an intro sequence for the narrative campaign part of my game. All the big games have them ... not that I've played any of those things in aeons, infact the previous weekend consisted of Penny Arcade (which I quite liked - a bit grindy though, shame the series got canned) and X-Com Enemy Unknown (which is X-Com UFO Defense ... not sure why the name change between UK/US but hey ...), a game which I actually had on floppy (no really kids, games used to come on plastic squares ... and before that it was tape!), and which I rebought from Steam ... not having a floppy drive anymore ...

Interestingly to mention or not as the case may be 'cos it's just occured to me ... these games all have animated intros, with the 1994 X-Com being closer to the static comic page style one bloke in his man-cave ended up using.

I'd had the overall idea taking up unnecessary amount of room in my brain fro a few years ... admittedly more in gazzillion dollar production values rather than one guy with a cheap and intermitantly malfunctioning A4 tablet from Win98 days who had completely forgotten how to draw ... and line drawing is somewhat less simple when your tablet isn't the same aspect ratio as your widescreen monitor ... A4 does not perfectly divide by 16:9 ...

I never managed to get the speed of completion down to anything reasonable but proceeded to "bang stuff out" and the line graph of "production" rose as the variable of "give a toss" sank. I ended up having to cut a few sequences/jokes due to not being able to fit them into the constraint of the music I wanted to play over.

The art style is supposed to be fairly fast to produce and easily replicapable - at least the last bit worked :P -, as I want to include the occaisional triggered comic page event in-game - but not too many of them, and most will either be plot or joke related, with the idea that narrative should give the gameplay a background in which to exist rather than just a "Ramirez, take down that X with your Y" ... plus that's why it's called the Narritive Campaign section ...

I also wanted a more naturalistic art style, but something not entirely heading in the opposite direction of my in-game 3D art, and I wanted to avoid the whole Japanese style ... talking of which ... brace for jokes!

In fact I ended up throwing in a pun on japanese comics.

Anyhoo, job done on that, and I set the whole thing to music as originally envisioned, and then converted it to Theora ... which didn't go as well as hoped. The Theora codec had a real hard time of coping with the subtler light/dark contrasts and a lot of the backgrounds ended up looking hazy and with visible moving errors on them. Even maxing out the bitrate didn't clean it up (but it did look better) and came in at around 17mb, my actual image files are 8.5mb ... so I reckon I might as well keep the quality and have them display as a scritped GUI sequence - with a skip button obviously, so the player can get straight to the action.

Whilst venturing around the interwebz on Theora related hunts, I did come across a whole load of Theora stuff including a slideshow creator which is basically what my intro is. It wasn't any use to me in the end but there's the link incase anyone fancies a look, and there's a load more Theora stuff at that site.

With >9000 hours of drawing finally out of the way (or at least, the huge load for the intro bit done, they'll be more of it in much smaller chunks in the future), it's back to actual game deving, and scripting the action for level 1.

In other news, I seem to have fixed a fair bit of issues that I'd experienced when I released Demo2 (not updated but still available for download courtesy of someone else's bandwidth) and after a fair bit of testing ... things seem better ... oh wait ... when I say "I seem to have fixed" I of course mean ... other people in the GarageGames bug forums have ... I just implement and test stuff I find lying around ...

Looks better in HD, but you knew that.
Also spot the balls up, one of the image isn't in a panel but gets a full screen stretch (fixed for in-game).