Mark Tully of TNT Basic


tnt01.gif

TNT BASIC

tnt02.jpg

AMOS

A game-tailored BASIC is somewhat of a new idea on the Macintosh. During development did you study Amiga/ST game creation tools such as Blitz Basic or AMOS?

I think it’s fair to say that AMOS was our inspiration. We used to knock out games together in AMOS all the time and we’ve thought for a long time that the Mac needed something similar. If you have a look at AMOS you’ll notice that there’s a lot of similarity between the two languages; that’s no coincidence, as the AMOS manual was never out of arm’s reach while we were designing TNT Basic!

As a former AMOS programmer that’s great to hear, however, is it possible to port an AMOS game to TNT Basic?

Well, one of the major differences between the two products lies in the handling of variables; TNT Basic requires that they be declared before using them. Although we have most of the features of AMOS, we don’t support some things such as asynchronous animation and data banks. So for simple AMOS games that don’t use them it should be a straightforward port, assuming you can get all your game assets converted.

Blitz Basic recently announced they would port their product to Mac OS X. Where do you see TNT Basic in this growing marketplace?

Our goal is to make TNT Basic a very competitive product both in terms of features and price. That said, TNT Basic development team is currently comprised of only two programmers as opposed to a product such as Blitz Basic that has the support of a full-time team.

Although your manual states anyone can make a game with TNT Basic, what type of prerequisites would you recommend to the non-programmer who is interested in creating games?

When I first started making games in AMOS, all I had was a lot of game playing experience and a few ideas for my own games. I found programming was the easy bit, the hard part was coming up with good ideas and sticking to it long enough to produce a playable game. So in answer to your question, I’d say two things, creativity and commitment.

What genres of games is TNT Basic suited for?

TNT Basic is aimed at the 2D game market. Within that paradigm there are games like shoot-‘em-ups, platform games, overhead racing games, adventure games, and many more—all of which TNT Basic would be suited to. We’ve made it easy for users to create tile-based maps, scroll them around as well as integrating collision detection, something that benefits all these genres.

tnt03.gif

Source code

Could you describe the steps in creating a game with TNT Basic?

A TNT Basic project is completely edited from one IDE called “Hieroglyph.” To create a simple game you import graphics into Hieroglyph, then you would begin to write some code. Hieroglyph features on-line help and syntax coloring to help you as you program. When you’ve written your code, you hit run and Hieroglyph executes your game through TNT Basic. If there are any programming errors, these will be highlighted and you can fix them. Then run again, play your game, then back to Hieroglyph, edit some more, run it again and so on. This is the commitment bit I mentioned earlier. As your game evolves you can add music, sounds, and maybe begin to make use of tiled maps to ease your development. It can take a while to get a good game, but don’t give up!

How is debugging carried out in TNT Basic?

TNT Basic has a very good runtime error detection model. If a program does something wrong then a message is presented reporting the exact line that caused the error. At this point in time, though, we don’t have a step debugger. However, we hope to get one in eventually. That will allow you to have your program in front of you as you play it step by step in a window.

So once the game is complete, how are they distributed?

Well the first thing that a user would need to do is to build a stand-alone executable. TNT Basic must be registered1 to do this, so if it’s not, that’s the first step. Then the user can distribute it as they see fit, for example on their website. Of course, we’d be more than happy to host it on our site as well.

Do you collect a royalty fee on your users’ games?

No, developers can sell their games in any manner they wish, for example, as shareware. Our only revenue stream is through registrations of the TNT Basic package itself. In fact, developers don’t even have to label their games “Made with TNT Basic.” This is unique as many game creation systems require their logos or banners in the final game. If a developer does want to mention TNT Basic, though, that is fine with us!

/tnt04.jpg

Screenshot

Smooth sprite animation is always a challenge in creating 2D games. Can you tell us a little about the graphic technology behind TNT Basic?

I learned to program by hacking together many simple Mac games, but none of them ever saw the light of day. This method led me to try new ideas and approaches to creating games. As I hated starting from scratch with each new project, I created a collection of engines and tools to be reused in future games. One of these tools was a sprite engine called “Blast” (another example is Hieroglyph). Blast is a very fast sprite engine based around “run length encoded” (RLE) sprites. Its sprite model can support any color depth scaling, translucency, anti-aliasing and non-image data. That means we can have sprites which are text, QuickTime movies or 3D objects. However, not all features are available in TNT Basic yet.

Does Blast handle masks, rotation and scaling?

It supports multi-level transparency masks and sprite transparency. Although it supports scalable sprites, we haven’t implemented it for this version of TNT Basic. Since it is a highly requested feature we should add it soon. For rotation, we will probably leave it out until we add hardware acceleration.

Have you considered licensing Blast to developers?

We did at one point, but we decided not to. We’re more interested in selling TNT Basic as a complete solution.

tnt05.jpg

Screenshot

For an average shoot-‘em-up game, what type of FPS can we expect?

We ship an example with TNT Basic called “Bouncing Splats” that throws 50 sprites around the screen at 90-100fps on an iMac 400MHz. If a game were to be built up around that, then the frame rate would obviously drop. I’d hazard a conservative guess at a solid 50fps for an average shoot-‘em-up game. We don’t plan to stop there though—we’ve got a lot of optimizations, and a few neat tricks left to employ!

To achieve such high framerates, what type of development system are you using?

We develop TNT Basic using Metrowerks’ CodeWarrior under Mac OS X. I work on an iMac DV 400MHz, and John develops on a G4 Cube 500MHz .

Support for various MOD formats are very good in TNT Basic. How is the MP3 playback performance?

It’s actually surprisingly good. Apple has done a great job with QuickTime. It makes a CPU hit of about 10% which is pretty good for the quality of music you get. The CPU hit is even less under Mac OS X.

I notice that you support Apple’s InputSprockets for user input. Could you comment on this abandoned API and the challenges you are facing in providing user input in Mac OS X?

InputSprocket is a good idea, but there are some things which I would prefer to be done differently. I would like the option of being able to design my own dialogs for configuring keys, for example. I really think Apple should have brought InputSprockets over; they’ve introduced equivalent new technologies, but these are not (yet) as well polished and easy to use as InputSprockets were for me. The reason we don’t have configurable input under Mac OS X is simply because we have to completely rewrite all the input code for Mac OS X. It’s annoying because the new features of Mac OS X mean we can give things like customizable dialogs to our users, but these won’t work in Mac OS 9 as InputSprockets doesn’t allow them; so we end up with a schism in TNT Basic’s feature set across the two OSes.

tnt06.gif

TMAP Info

Speaking of Mac OS X, how is work proceeding on TNT Basic for Mac OS X?

We just released TNT Basic 1.02 which has a substantial speed boost for Mac OS X graphics. We still haven’t quite hit Mac OS 9 speeds, but as we get more experienced with Mac OS X we should be able to get there. We’re going to implement a ‘customize input’ dialog for Mac OS X in the next version. That’s the last piece in our Mac OS X compatibility checklist. Then we can get on with adding more features, which is what we really want to do!

I take it that the application was Carbonized. How difficult was the process?

I don’t think it really took that long for TNT Basic itself, it was probably less than a week; then another week or two for Hieroglyph and its plug-ins. As I mentioned, the tricky part was finding suitable replacements for Apple’s Game Sprockets. One of the main problems we had with Mac OS X was graphics. In Mac OS X, all windows are double buffered. What this means is that when you draw to your window, it doesn’t appear on screen, but instead goes to a buffer which then has to be flushed to screen. This is how Mac OS X’s Quartz does all its fancy transparency stuff; but it really hits your frame rate if you don’t handle it right.

Your website includes some simple tutorial games. Are you planning on releasing your own games that were created in TNT Basic?

To be honest we don’t have the time! Beans and Bang On were fun to create, but in the end we just gave them away to help people learn. Since we want to add many features to the product, we are concentrating on TNT Basic itself. We hope that by providing a great tool, a strong community will be built. Hopefully, we can work with the leading TNT Basic developers to obtain their games for educational and inspirational purposes.

Do you have any final words for the many Mac users who are hoping to use your product to make their dreams of creating games come true?

For $25 you could buy a shareware (or an older commercial) game. On the other hand, you could spend the same on TNT Basic and start making your own games. There are many routes available for users to enter the world of game development, however, current products create a kind of barrier to entry resulting from their steep learning curve. We feel TNT Basic offers the best solution for budding game developers as well as programmers who have been frustrated with the tools currently on the market.

Mark Tully

Position: Co-author of TNT Basic

Company: TNT Basic

Url: http://www.tntbasic.com

Bio: Mark Tully has been writing Mac games and tools for the last seven years while attending College and University. He now works as a professional games developer in the UK writing games for the PlayStation2.

1 Editor’s Note: TNT Basic is now freely distributed under an Open Source license.

mark,tully,tnt,basic

Recent Forum Threads

About iDevGames

Since 1998, iDevGames has been educating, supporting and enhancing the community of game developers that produce video games for the Apple Mac and iPhone platforms. Get the latest game development news by subscribing to our news feed.