MAGIC Contest

posted in extralongjournal
Published May 29, 2007
Advertisement
I've added a post to my MAGIC contest entry page. I'll be updating that page this week and during the week of the contest.

I've pasted the entry I wrote here, but I may not do so for future entries - converting the wiki-style formatting tags to html tags is a pain.

2007 - 05 - 29, 2:56pm (GMT)


Working with TGB


This weekend I started work on a small game using Torque Game Builder. The game is a simple 2-D side-scrolling skateboard game. You control a skateboarder and do tricks over gaps, down stairs, etc. Below are the observations I made while making this game.

Getting Started - Documentation


The first thing I had to do is re-familiarize myself with TGB and Torque Script. I started by logging on to the Torque Developer Network (TDN). The TDN is a wiki-based documentation system for all of the Garage Games game development products. There they have various tutorials on completing common tasks for common game types.

I started out by following a tutorial for getting a platformer game avatar running around on a tile map. The tutorial was easy to follow, but it included some seemingly strange code to get around some of the quirky aspects of TGB.

For instance, the collision code was a little strange. Instead of using an 'onCollision' type of callback to respond to collisions with the environment, they instead manually tested for projected collisions every frame over a small time interval.

This was apparently because the physics/intersection code in TGB often results in objects teleporting to the wrong side of a collided object. This problem is probably magnified when you have very large objects relative to the tiles in your tile map.

After completing that and a few other tutorials, I moved on to some actual coding. This involved using a documentation manual that comes with TGB. The documentation here was decent, but the page (it is basically a giant HTML page) wouldn't load correctly in Firefox or Opera, leading me to use Internet Explorer 7, which was kind of a pain in the neck (remembering to open with a browser other than my default).

Looking for documentation on more uncommon tasks in TGB wasn't all that easy. Granted, I eventually found answers to all of my questions, but it was time consuming. Searching for help with Torque Script often brings up a lot of unrelated junk, or stuff specific to the Torque Game Engine, and not TGB.

Working with the TGB Application


TGB comes with an application that acts like a 2-D game maker. In this application you can edit sprites, particle systems, static images, etc. You basically drag and drop these object templates you've created onto the game field. Here they can be scaled, rotated, and otherwise manipulated. Overall, the application is pretty nice, but it can be a pain to work with.

Selecting objects is a chore sometimes. You're bound to have lots of overlapping objects on a 2-D game field, and selecting overlapping objects in TGB isn't always easy. Selection generally works such that when you repeatedly click on a spot, it will cycle through all of the objects that overlap that point. This would be fine if it always worked, but it doesn't. This results in having to move objects out of the way so you can get to the one you want, which I imagine wouldn't always be a very easy thing to do.

Another strange thing, and one that I think is common to a lot of game making programs, is having to always work with instances of objects. In order to edit an object's collision polygon, size, or rotation, you have to create an instance of of the object and work on that instance. In other words, it doesn't let you easily define all that stuff for all instances of the object type (I realize my use of the word 'object' here is confusing). This results in strange design workarounds when you are trying to define an object that you will create many instances of during the game (and not in the editor).

In my skateboard game, for instance, I had to create the skater's ragdoll and gibs (yes, he explodes) in the editor, somewhere off of the playing field. Then, in the game, when the skater falls, I have to clone these objects and place them where they should go, or just move the off-screen objects over to the player's position.

Another gripe I have with the editor is its lack of script support. In the editor, you can edit an object's class type, its name, and add dynamic variables to its class, but that's it. You can not edit your script files in the editor. This is especially annoying because TGB does not come with its own Torque Script editor. You have to use a text editor or find a Torque Script editor some where else. All of the free ones I've tried have been less than desirable, and even the ones with a price tag aren't so great. Right now I'm still using a trial of Torsion, the editor I've found to be the best for my usage.

Deployment


Building your game for deployment is very easy. The TGB application has a built in 'build' tool that compiles a version of your game that can be distributed by itself. You don't seem to get much control over your final directory structure or packaging, but that doesn't bother me.

Working With Vista


The most painful part of TGB was its non-compliance with Vista. It requires that you save your game projects under its installation directory, and as we all know, saving files under Program Files in Vista is a no-no. Also, TGB was unable to find the 'compatibility files' that Vista creates when you save files somewhere under Program Files. Thus, none of my artwork was ever visible to TGB.

In the end I had to install TGB in my Users/blah/Documents to get a reasonable work environment.

Also, I was unable to run my deployed game unless I ran it as an administrator. This does not boast well for TGB in terms of giving your game to end users running Vista.

What I Accomplished


In the three days I worked on the project, I accomplished the following:

  • The skateboarder can skate around on a level.
  • The skateboarder can ollie
  • Gravity and physics work the way I wanted them to (for the most part)
  • The game can detect (not very accurately) when the skateboarder should fall
  • The skateboarder can fall and explode into gibs when he hits the concrete
  • The background is layered and scrolls at different speeds while the skater is moving
  • After the skateboarder dies, the level automatically restarts.

    What I Did Not Accomplish


    The following are things I tried to do but could not finish:

  • There are ramps in the game, but I was unable to get the character to properly align himself on the ramp. Currently, he just stays horizontal as his front wheel slides up the ramp.
  • I couldn't clean up all of the art like I wanted to.
  • I couldn't get another trick in (I didn't even have time to try).

    Conclusions - The Proof is in the Pudding


    I totally nailed my target in terms of features and game play. In three days I got the basics for a game layed out, in play-able form. I am very pleased with my level of production and I'm confident that I'll be able to get something up and running for the contest. I think I got a lot more done than I would have if I were using my XNA or C++ code base. So far I think I can recommend TGB for this use.

    Screenshots of my Game


    (sorry for the cursor hovering over the scene. I should have disabled that.)





  • Next Entry A Trick!
    0 likes 4 comments

    Comments

    shadowcomplex
    Hey extralongpants,

    I am glad that you voiced your thoughts on TGB. I only know one person who has used it, and I am always looking for comments and critiques on TGB, as well as many other game builders.

    In a short while, I actually hope to sit down and write a full featured game maker, so these comments are invaluable.

    To clarify one thing: you mentioned the 'instance' problem of creating objects/object characteristics. So what you would ideally want, is the ability to create new objects with generic characteristics, and then be able to create instances of these pre-created objects in the game world and then modify (if need be) an instance's particular characteristics? Ok cool. If I am way off, please correct me.

    Also, the game looks cool. Any chance for a demo? :D
    May 29, 2007 03:05 PM
    extralongpants
    Quote:Original post by shadowcomplex
    In a short while, I actually hope to sit down and write a full featured game maker, so these comments are invaluable.

    Sounds cool. I would definitely like to see another really good one released.

    Quote:
    To clarify one thing: you mentioned the 'instance' problem of creating objects/object characteristics. So what you would ideally want, is the ability to create new objects with generic characteristics, and then be able to create instances of these pre-created objects in the game world and then modify (if need be) an instance's particular characteristics? Ok cool. If I am way off, please correct me.

    Yes, that's exactly what I mean.

    I think allowing the modification of scripts in the application would actually press the need for this more. If you could alter script code in the editor and create new 'classes' and such, there would be more of a need for visually defining things for your classes, like collision shapes, starting velocities, etc.

    In any case, I don't want to have to define a visual element in code, and I'd rather not have to copy the data from an existing instance in the game. There's also non-visual stuff that's just easier to edit in the application, such as flags for objects that have a gui control in the application, but some obscure name that you have to look up in script.

    Quote:
    Also, the game looks cool. Any chance for a demo? :D


    Thanks! I think I'll release what I've done at the end of the week, before the contest starts.

    By the way, you might want to check out an old program called Click n' Create (I mention it in my first post on the wiki contest page). I believe it was done by Corel back in the day. It was an application that was mainly designed to make Power Point-like presentations, but it was even better for making games.

    It had a weird (I say weird because I haven't seen it elsewhere) interface for editing game logic. You didn't really type anything in; it was almost all done with graphics and gui controls. It certainly wasn't perfect - large games with lots of logic started to look really messy after a while - but it was certainly usable. I made many games with that application. Ah the memories...

    Unfortunately the application doesn't quite work right in anything beyond Windows 98. But you could probably still get some ideas from it, if you can find a copy or a manual some where.
    May 29, 2007 04:49 PM
    shadowcomplex
    Rating super ++ for the recommendation.
    Thanks, and looking forward to the demo.
    May 29, 2007 05:57 PM
    HopeDagger
    I really like the art direction you're taking for your entry. I'll be sure to keep up with your continued progress.
    May 29, 2007 06:40 PM
    You must log in to join the conversation.
    Don't have a GameDev.net account? Sign up!
    Advertisement
    Advertisement