Game Development Community

dev|Pro Game Development Curriculum

.plan for Daniel Buckmaster

by Daniel Buckmaster · 06/28/2014 (7:42 am) · 24 comments

It's been ages since I've written anything, so here goes. I'm afraid there won't be anything super interesting or attention-grabbing, which is why I've had to resort to the old .plan naming scheme - this is really just some rambling, meandering, and towards the end, a little bit of planning!

Safaris in T3D

One thing we all know Torque is lacking is documentation. I thought it might be a nice idea to try to solve this organically by suggesting that people write up their experiences discovering things about the engine. We go on little 'safaris' all the time when using Torque - or at least, I do. The source code is so vast that you're constantly being challenged to learn about a new part of it.

I thought people might find it helpful to see these little journeys documented, as some sort of way of easing themselves further into the engine source. I've written two of them so far, one on the engine's return code and one on the existing unit testing framework.

The jury's out on whether these will actually prove to be helpful to people. I'm well aware that the two I've done so far are incredibly rough, and probably need a bit more polish to be very useful to anyone but me. But they're a start, and maybe I'm overestimating how confusing my stream-of-thought style is.

Unit tests

Speaking of unit tests, I've been busy replacing our current test framework with Google Test, a helpful library for unit test stuff. The motivation behind this was twofold:

  1. Using external libraries for things like testing increases our compatibility with other open-source codebases, and allows new developers to come aboard without having to learn Torque-specific systems.
  2. T2D uses it, and more similarity between the two engines can't be a bad thing - especially if we can now share unit tests for core systems.
Once we get this reviewed and merged, we can start the long process of reviewing and porting T3D's existing unit test suite, and ading new tests to cover more cases. One cool feature is a plugin I found that adds memory leak checking to Google test. It will automatically validate the state of the heap before and after every test that is run, and fail the test if it's leaking. It already caught a 'memory leak' in the console print code that is used to output test results - but it turns out that's just how the console works, and it can be disabled :P.

Funnily enough, having dug into them a little bit, I can highly recommend unit tests as a fantastic way to learn about parts of the engine you wouldn't normally venture into. There's some interesting stuff there!

t3d-bones and Python

You may be familiar with t3d-bones, my attempt to make a simple-as starter script template for T3D, and to write make basic tutorials to build on it. I just finished an important milestone for myself - I ported the basic main.cs to Python, thanks to Frank Carney's ScriptT3D resource.

https://cloud.githubusercontent.com/assets/904269/3420890/0ebae740-fecb-11e3-98ec-2c8ce98b6213.png

And I made a demo with a Python logo just for funsies (I didn't make the logo, though. You think I'm that artistic?). I'm fairly happy with the wrapper I wrote around Frank's code - primarily this involves the 'new' object, which allows you to create SimObjects with decent Python syntax, rather than writing inline TorqueScript everywhere. For example:
group = T3D.new.SimGroup('GameGroup')

logo = T3D.new.RenderShapeExample({
    'shapeFile': 'game/PythonLogo.dae',
    'position': '0 3 2'
})
group.add(logo)
I've also started to add decorators that export console functions in a really slick (if I do say so myself) manner:
@T3D.callback('GameConnection')
def onConnect(self):
    self.transmitDataBlocks(0)

@T3D.callback()
def onExit():
    ServerConnection.delete()
    ServerGroup.delete()
    T3D.deleteDataBlocks()
The first snippet defines a callback for GameConnection::onConnect, (notice how the 'self' object will be bound to a SimObject which you can call TS methods on, thanks to Frank's code). The second defines a namespace-less callback for the onExit function.

You can find all this code in the python branch of the repo, where I'm keeping it for now, until I decide whether I should merge it in and have __init__.py files everywhere, or keep it separate, or start a new repo. Lukas was talking about porting t3d-bones to C#, so maybe a polyglot repo would be a good idea... I haven't started tutorialising the python stuff yet, but hopefully the code is self-explanatory enough!

Monster Mash

I found out a few months ago about itch.io's jam page, which lists community-run game jams hosted on itch.io. I decided, since it's the first week of my uni break, that I'd commit to making a small game for the Monster Mash jam. Though it's only a week long, I'm hoping to get a basic idea out. The theme is to create games with 'monster' protagonists, so I'm planning on doing something a bit interesting. To make up for my complete lack of 3D modelling abilities, I plan to make a game where you play as a 'swamp thing' or lake monster that is never seen above water. You'll lurk around, snatching unfortunate tourists trying to enjoy the beach, or messing about in boats.

images.wikia.com/villains/images/4/40/JawsDM0108_468x347.jpg

The plan is that you won't go completely unchallenged - park rangers will try to shoot you if you get too bold. There's a twist, of course, but I have to see if it plays any good before I reveal it!

Jams seem like a great way to hone game-dev skills, and just find good ways to improve the engine. I'm very much looking forward to getting a handle on the art pipeline by creating some very simple tourist models (think Matryoshka doll level of shape complexity here), and making some nice third-person camera behaviour. And it's also a personal thing - I've often bemoaned my inability to finish an actual game, so hopefully having a single week with a very tight focus and deadline will do me some good!

So long,

and thanks for reading! Until next time...

About the author

Studying mechatronic engineering and computer science at the University of Sydney. Game development is probably my most time-consuming hobby!

Page «Previous 1 2
#1
06/28/2014 (4:42 pm)
Sounds cool dB! I like the Python syntax! Much simpler than the other Python examples i have seen.

I like the game concept, sounds risky but also possibly very addictive ;) good luck!
#2
06/28/2014 (11:31 pm)
Torque Safaris : That is the best description I've ever read about using Torque.

Itch.io : I really wanted to find this site again and boom, Daniel Buckmaster delivers the goods!

Game Jams : I create the Particle Editor for T2D out of a Mini Ludum Dare jam, am planning to participate in next August's main Jam.

Jams are really the best way to push your skills to the limit.

You start out ecstatic, the world is your oyster, etc. When the timer starts to run short, you panic, cutting back features like a madman and end up with something strange but definitely creative. It teaches you what you should focus on in a very brutal but extremely efficient way!
#3
06/29/2014 (8:49 am)
Good luck with your game jam. Personally I've always found them stressful, but hey. Will be interesting to see what you come up with. May I suggest posting either blog updates during or a finished blog after detailing your dev process.
#4
06/30/2014 (3:31 am)
I kind of dread those game jams.

It seems to me that I would just have to mock up a character like a rabbit and then some carrots to collects(a modified health patch) before getting shot/eaten etc. by a big black evil rabbit and you see that would have been one hell scary thing to come up with :o)

That Python thing is very interesting. Sadly I have not have the time to use Franks python stuff yet(way too much Torque Scripting work to be done in these days). I am very interest in trying it out. I used to do some python programming back then. I kind of learned how to program behaviors of drawing bots on the screen according to fractal rules with python back then when introduced to the language. That was fun and Python is really a very gentle tool to use.

Quote:One cool feature is a plugin I found that adds memory leak checking to Google test. It will automatically validate the state of the heap before and after every test that is run, and fail the test if it's leaking. It already caught a 'memory leak' in the console print code that is used to output test results - but it turns out that's just how the console works, and it can be disabled :P.

Now that is awesome!
#5
06/30/2014 (3:49 am)
Lukas: I'm all about syntax. That's why I'm such a sucker for Haskell :P. If there's any repetition I try to cut it out. My ultimate goal is something like this:
@consoleclass
class GameConnection:
   def onConnect(self):
      pass
   def onEnterGame(self, seq):
      pass
so that the class name isn't repeated. But I'm having trouble casting the SimObjects that get passed to callbacks to the proper derived class (in this case, GameConnection).

Simon: yeah I thought it was appropriate :P. Can't wait to see what you do with Ludum Dare! I'm actually hoping 7DFPS happens again in August. Sad I missed the last one.

Steve: I'm going to write daily blogs, but I don't think I'll post them daily. I might add them as comments to this blog actually. Speaking of which, here's a shot of the environment so far.

Dwarf King: if you want to try out Python without dealing with the engine changes, check out the t3d-bones release page - there's a pre-compiled version that you can just download and run if you have Python installed. It is a really nice language! Except for still not having anonymous functions :/.

EDIT: First blog entry. I had all sorts of plans to write up in more detail, but on the other hand, who cares, and I don't have time for this :P.
#6
06/30/2014 (6:51 am)
Interesting first read, m8! And yes, there's probably a resource in EVRYTHING! ;)
#8
07/01/2014 (3:58 pm)
Game Jams are designed for terrible hacks in Torquescript! ;)
#9
07/01/2014 (5:54 pm)
Isn't TorqueScript itself designed for terrible hacks? :)

I personally like to use the polite word "flexible".
#10
07/02/2014 (3:07 pm)
No blog for today since it's been a long one and tomorrow will be more exciting, but here's a preview:

imgur.com/IDVsbJM.png

I fail to understand why anybody likes TorqueScript. Probably Stockholm syndrome. :P
#12
07/03/2014 (2:55 am)
Basic AI is happening! The tourists now fetch a ranger if you don't eat them :P. I suppose my next step is to actually allow you to eat them...

#13
07/03/2014 (4:23 am)
TorqueScript has everything a good programming/scripting language should consist of. It comes with many of the good things C++ has such as inheritance and polymorphisms and the much needed control structures.

It also has the awesome non case sensitiveness(which C++ does not have) that makes scripting so much easier... Until one gets back to C++ and kind of get lazy and forget it... Dooh!

It is very easy for people who has dabbled in PHP(that came from C++ as well) to learn and hence a whole army of PHP developers would easily be able to pick TorqueScript up and that also goes for C++, C and C# developers as the languages syntax and structure is really C like overall.

Their is no stockholm syndrome here.

TorqueScript is a very small and efficient language that is very easy to learn.

It does the job.

It looks like something most people already know.

It has all the most important features of a complete programming language.

Their are several very good and low cost or even free IDE(Torsion, Kommodo Edit and Codeweaver) to use out there.

In fact I strongly suggest that people have a look here:
TorqueScript

Or let me quote the resource above:
Quote:TorqueScript is a very powerful, flexible language with syntax similar to C++.

It is fast and flexible(it can do almost everything)so therefore powerful and the syntax is more or less known to most programmers/scripters/web developers etc.

TorqueScript is also the language where we have like 10 years or more of knowledge combine in older books and on this website. Getting rid of TorqueScript would be like shooting one self in the foot.

TorqueScript gotta stay and keep on developing. Anything else would be a huge mistake. All the old books are still damn useful and they really contain a lot of good tips and tricks. Even all the many plugins are made in TorqueScript.

So are we a hostage? No. We are not. No more than we are a hostage to C++, C#, Blueprint, Unreal Script(UE 3) or JavaScript(Boo Unity) in the whole game industry. TorqueScript was the tool decided to go with and so that engine became linked to it. Look how many Unreal 3 developers rage due to the fact that Unreal Script was removed from Unreal 4 :o)

If people find that TS misses some features then by all means implement them in TS :o) That is innovation. But saying that we do not need to stick with TS anymore and leave it behind is for me the same as someone saying
"Hey let us get rid of the mathematical rules and make up our own rules in this universe". Not that I say you wish to remove TS :o)

Fine but what about all the old mat? I mean it is embedded everywhere in our world and used to solve problems and used as example and resources just like Torque Script is everywhere in Torque Engines and used to solve problems and serves as possible examples and solutions for many newcomers and even references for many of the old guard Torque developers.

TorqueScript gotta stay and evolve like C++ does it. It is really everywhere and removing it will hurt us all badly ;o)

Oh and TS! TS! TS! TS! TS! TS! Yaaaa! :O)

Do you use the navmesh(the walkabout you made) kit here?


#14
07/03/2014 (7:08 am)
Cool stuff, Danny!
#15
07/04/2014 (3:54 am)
Dwarf King: I disagree with just about everything you said, but let's not have the discussion here ;P. I'm using the standard navmesh stuff built into 3.5, which one modification of my own to allow NavPaths to render outside the editor. I'll be pull-requesting that, so that navmesh and navpath rendering can be more unified.
#16
07/04/2014 (6:01 am)
Cool!

I mean that you use the standard navmesh stuff built into 3.5 AND not that you disagree about improving TS and keep it :o)

Also no need to discuss this. I simply just take an appropriated decision the day TS is canned or removed ;o)
#17
07/04/2014 (6:47 am)
Really.. Did I just create the 3rd PR to the T3D wiki? :P Man that shit is dead..

Anyways @dB I tried to write a "Safari"-style documentation of the terrain rendering. Here, I think it turned out alright and only took me an hour!
#18
07/05/2014 (11:31 pm)
Keep up the good work Danny!
#19
07/07/2014 (3:33 pm)
Done-ish, but minutes too late to submit. Drat. Post-mortem and source code coming soon.
#20
07/07/2014 (4:16 pm)
Cool stuff! I guess a bit more in-game feedback would make it less of a 'make-your-own-fun' game but I had a good time with it!

Would be cool if making the sound/bubbles would spark the NPC's interest and they would come to investigate...their own murder.
Page «Previous 1 2