Nicholas Francis of Over the Edge Entertainment

To date, we have used this system to build “GooBall,” a 3rd-person driving game/shooting game, a hover bike racing game, and a helicopter prototype. It typically takes us 3-4 man-days from idea to playable prototype — the prototype for GooBall was created in only four hours.

I’ve heard that Unity compiles executables for Mac and Windows. Which parts of Unity are cross-platform?

The Unity Editor is a Mac-only application; it consists of 30,000 lines of Objective-C code, so it’s staying on the Mac. The actual engine, which is written in C++, is cross-platform, so from the Mac editor you can build both a Mac and a Windows game.

Tell us about the shader technologies inside Unity.

All graphics in Unity are driven by shaders. A shader is a text file that describes exactly how something should be rendered. It can contain multiple passes, level-of-detail and versions for different cards. You write shaders from inside the Unity Editor, so you get live updating of your scenes as you develop them. Each shader can export several properties (e.g. colors, textures, floats), so the same shader can be shared between many materials in a game. This makes it simple for graphic artists to work without needing to worry about how something is actually rendered on the hardware side.

Originally, the shading system was open sourced, but since I was never really able to get anyone to contribute code for it, it was rolled into Unity. Today, we use shaders for everything, even for drawing tool handles in the editor. Shaders can either target the OpenGL fixed-function pipeline, or you can write them using fragment programs in Cg, and it will automatically work with any cards that support whatever you happen to use in your shader. This all happens inside the editor as a preprocessing step, so end users don’t have to install Cg.

How easy is it to integrate physics into a Unity project?

Physics is one of our coolest features — we have integrated the Open Dynamics Engine, which is a wonderful piece of OSS software. To use physics in a game, you just attach a RigidBody component to a game object, after which it’ll fall down, happily passing through other objects. When you add a Collider component, it will land on whatever else there is in your scene to collide with.

We then have a range of components that work with this system, adding damage, destructible joints, explosion/blast wave effects. When you want to get your physics object to do something other than being just physical, you need to script it. Here, physics can be a challenge to get right. Often, physics looks and feels so cool that you want to put everything under physics control, but it quite often makes it harder to get in a good gameplay feel — instead of moving your player and the enemies, you are constantly pushing them around. Once you get it right, though, you usually get some great feedback on it.

Do you think Unity is well-positioned to attract the attention of independent developers?

I definitely hope so. There’s a class of hardcore geeks who will never be satisfied with something they didn’t code from scratch. However, for people who just want to sit down and create games, and actually finish them as well, Unity is a very solid tool to utilize. In addition, since so little is hardcoded in Unity, there is a lot of room for cool ideas — the damage stuff is just a bunch of scripts I put together in a few days.

Tell us about the workflow of Unity — for example, from idea to finished game.

Here’s how we do it. We always start with using some common demo assets (programmer art), and do some quick scripts for the player control, just to get a feel for if this game is actually going to be fun. After that, we sit down and do a 2-3 page design brief, outlining the key points of the gameplay. Then we begin in earnest — and this is where the integrated editor comes into play. We can read Photoshop files with all layers, build complete scenes in Maya and import into Unity.

If you want to reorganize your files, just move them about; we store everything in a huge database, so no references are lost even if the files move about and are renamed.

As we build on a game, some reusable components emerge. We turn these into prefabs — objects that are shared between scenes. You can then place them in your scenes and modify them to your heart’s content. If you change the master copy, all scenes are updated automatically! The neat thing here is that we keep track of what you’ve changed in the scene, and don’t update stuff that you have modified. So if you put in your standard enemy and boost his hit-points, you can then modify the standard enemy’s damage. The enemy you place will get the damage parameter from the prefab, but maintain his hit-points.

When you build the final game, we sweep through all the scenes, find out which assets you actually use and only export those in the final app. This last step is so powerful that we kept tweaking our GooBall GDC demo up until 10 minutes before we had to burn the CD. That was so scary, but felt somewhat neat afterwards.

With the release of Tiger coming in early 2005, can we expect to see the use of Core Image to add special effects to Unity-built games?

I’m not sure about it — I haven’t had time to check out the beta, so I don’t really know anything about it. Also, I’m worried about the graphic card requirements. Sure, it’s neat technology, but if it renders your game unplayable for 90 percent of your audience, I’m not sure it’s such a good idea to use. In that case, I would prefer to roll our own lightweight version. In Core Image, it seems that the focus is on image quality. For a game, you might want to sacrifice that to keep it a constant speed. That being said, it might be so cool we just cannot help ourselves. We definitely want to get some type of image-based effects in.

Recently, you’ve made the change from Python scripting to C# scripting. What prompted this change?

Performance! We were occasionally switching to C++ because Python was just too slow — when your code physics are running at 100MHz, you need all the speed you can get. This meant moving to a statically typed language, which basically means C# or Java. Java is really nice, there are many people using it out there; but in the end, C# won. You can write in C# (which is so close to C++ that I don’t think about it when I switch), you can write in JScript, which very much resembles ActionScript in Flash.

At present, we are using Mono, as it is the same on both Mac OS X and Windows, and it has a lot of great features — ahead-of-time compilation, so you get so close to full C++ speed (our Python scripts were running at one percent of C++ speed). They are even implementing Java for it, and if it gets ready we’ll definitely be adding that as well.

Speaking of scripting, I’m interested to know why not something like Ruby or Lua? C# seems so… so Microsoft.

It is imperative to us that we make scripting be as fast as absolutely possible — having to write in C++ is something that just stinks once you’ve tried the three compile-link-execute that scripting supports. This limits our platform choices to C# and Java. Through Mono, we get a fantastic environment supporting far more languages than Java.

So how would you go about adding features to Unity via the scripting language?

All your scripts derive from a class called Behavior. The behavior provides saving, loading, and editing of all your public variables, as well as the important ability to be turned OFF.

You can then override some functions:

  • If you implement Update, you get called once per rendered frame.
  • If you implement FixedUpdate, you get called once per physics frame (typically 100MHz).
  • If you implement Render, you get a callback for each camera where you can implement custom rendering functionality.

In order to communicate with other components, there are two main methods:

  • You can get them (e.g. does my GameObject have a Transform, if so, move it up a bit), call methods and access their properties.
  • Messages: Components can broadcast messages — if you implement a function called CollisionEvent, you get precise information whenever your game object hits something.

You can also send messages yourself — our Missile script just reacts to collisions, and sends out an ApplyDamage message to any game objects within a distance. It does not know what the game objects do when they receive a damage message, nor does it care. Some will explode, some will catch fire, some just don’t react to that message and completely ignore it.

How useful would Unity be for 2D games?

Funny you should ask, just today I took out 10 minutes to dream up doing a 2D side-scroller. Well, actually it was more 2.5D. The graphics were 3D but all the gameplay was 2D. To be honest, 2D is not what Unity does best, but it still does it better than anything else.

Can you see any non-game use for Unity?

Unity is designed for making games, but I don’t see any reason why not. When the people who did Flash were coding that, I don’t think they imagined that one day somebody would take it and do a multi-player graphical adventure game with it. That’s one of the cool things about releasing it at an affordable price — just seeing what people will use it for. I’ll be a bit disappointed if all we see is 3D racing shooters based on our pre-made car handling and damage scripts.

Could you tell us some more about your game, Gooball?

GooBall is a very simple game — you have a ball and have to get through several levels within a time limit. What sets this game apart is the ball’s ability to be gooey. It can stick to and jump off vertical surfaces, slingshot round the underside of things and generally do funky stuff. One of our main focuses has been to get a console feeling into it. We’ve kept the game very simple; there are no add-ons or shops, just pure adrenaline and dexterity challenges, combined with a sharp and simplistic graphics style we’re very happy with. We’ve put an insane effort into getting the ball ‘just right’. David has been coding the ball for three months and doing nothing else. Currently, we have the game code mostly complete (just need to do menus, hi-scores and stuff), and are starting the great asset push — this should have us done in October, ready for a Christmas release.

Can you elaborate on the different licensing options for Unity?

Basically, we want to put it into the hands of all the people who’ve so far been staring in bewilderment at the Torque source. We plan on releasing the Indie version at $200-300. This is fully featured (shaders, physics, everything) except you cannot build a Windows game, and are only allowed to distribute electronically.

Then we have the ‘Pro’ license at $1000. This is the same as the Indie, except you can release on CD as well. If you want to release on PC, that’s another $1000. We don’t want royalties with any of these. It’s very hard to find something that’s fair. I think this strikes a good balance, as Indie developers can get their hand on it and do wacky stuff. They can get it out and make money off their creations. If they are going CD or PC version, that means they have some type of distribution lined up, and make money from their creations — hence it’s only fair that we get some as well, so we can keep Unity cool.

When will Unity be released?

Hopefully, we will ship in the first-quarter of 2005. When we decided to release it to the public, a lot of weird things had to be cleaned up. We can live with an engine that has some quirks, but we want it to be accessible and usable from the start, so we’re cleaning up, simplifying stuff, etc. I’ve just started doing the manual — that’s going to take a while to get up to the quality we want as well.

GarageGames markets their AAA level engine Torque at $99, and there are a dozen other engines on the market, even open source projects such as the Crystal Space Engine. How do you feel they compare to your engine?

Torque might have been (possibly still is) AAA, but I haven’t seen anyone doing AAA games except for GarageGames. I think the main difference between Torque and Unity is that with Unity, you get the complete tool chain (that several AAA houses have seen and are drooling over) all integrated into one app, ready to go. With Torque, you get an enormous amount of source code, and have to figure your own way from there. As for Crystal Space… It’s a nice, LGPLed engine; however, you are, as with Torque, completely without a modern tool chain.

Any last words?

We hope to do for the game biz what Apple did for the movie guys with Final Cut Pro — provide a tool that empowers users and makes the Mac the place to be for Indie game developers. If your readers would like to learn more about Unity, please visit OTEE’s homepage.

OpenSound Control Wrapper in Objective-C

Illposed Software has recently posted an implementation of Open Sound Control written in Objective-C. OpenSound Control (“OSC”) is a protocol for communication among computers, sound synthesizers, and other multimedia devices that is optimized for modern networking technology and has been used in many application areas.

Related link: Illposed Software

opensound,control,wrapper,objective,c

Simon Extreme Source Code Provides Cocoa Gems

The creator of “Simon Extreme” has made the game’s source code available. According to the author, the source code features a number of useful Cocoa programming techniques that are undocumented or under-documented. One that caught my eye right off the bat is a replacement class for NSSound, but there are several others that handle windows, views, buttons, web-based SQL queries, and more. The compressed source code file weights 2.9MB and there’s another download with the original art in Photoshop format.

Related Link: Simon Extreme Source Code and Photoshop Art Sample

simon,extreme,source,code,provides,cocoa,gems

Acquiring Exposure for Shareware Developers

Our annual Mac game developer contest, uDevGames, will soon arrive, and feedback from our traditional sponsors has been positive. With prizes totaling over $25,000 in last year’s contest, we are reaching out further to new sponsors, and also reminding developers of shareware software that they too can take part in the “win-win” situation with contest sponsorship. Benefits such as:

  • Official Sponsors Page — Your URL and business description will remain on this page until uDevGames 2005
  • Official Prizes Page — Your donated prize(s) will be featured on this page until uDevGames 2005
  • Free Banner Advertising — Placement of your banner on the iDevGames and uDevGames website until the end of uDevGames 2004
  • Co-op Marketing — Listed in all PRs and media events related to uDevGames 2004
  • Community Networking — Get to know our large community of developers—your potential market!

Sponsorship is open to any developer from around the world that markets quality Mac OS X shareware such as games, utilities and applications. Prize donation may be any quantity of registrations (licenses)/products as you feel comfortable with. Potential sponsors should contact iDevGames, before August 2nd at the following link:

uDevGames 2004 — uDevGames: Sponsorship Inquiries

acquiring,exposure,for,shareware,developers

Simultaneous Development on Mac and PC

The Apple Developer Connection has a short article on simultaneous development.

Out of the box and at no extra charge, Mac OS X gives us tools for graphic performance tuning, code cache profiling, memory leak/corruption hunting, file systems and network monitoring, remote debugging and profiling, and crash postmortem collection–dozens of useful tools to visualize whatâ€(tm)s really going on inside our games

It’s an interview with Rob Barris from Blizzard Entertainment which covers why developing for both platforms has been of benefit to them.

Related Link : Simultaneous Development: Blizzard Entertainment Does Both At Once

simultaneous,development,on,mac,and,pc

Kaijin by Phelios

Team and Tools
Kaijin is the result of the efforts of three people: programmer Patrice Krysztofiak, artist Djaggernaut, and musician Dean Evans. PuppyGames also deserves special recognition for allowing us to use their sound effects, as well as Apple Worldwide Developer Relations, and ATI Developer Relations.

We developed Kaijin with both Metrowerks’ CodeWarrior and Apple’s Xcode. The latter was used to verify that the PTK Xcode libraries were recompiling correctly. On the Windows side, Metrowerks CodeWarrior was utilized. The engine driving the game is based on our own product called PTK. Graphic assets were created with Super Sprites and industry-standard Photoshop. A component of PTK called KSound was used to play the music and sound effects.

The development of our games is done under Windows 2000 utilizing CodeWarrior for three main reasons. Our artists are using Windows, and so working on one platform improves our workflow. I actually lack a Mac, and must borrow my wife’s Mac to port the games—this can take several minutes or a couple hours. Running CodeWarrior on both platforms keeps me in the same environment, which has the following benefits:

* CodeWarrior recurses though the folders to automatically find the correct files. This is a big advantage compared to VC++ or Xcode.
* Dead code stripping. We all have unused functions that we might use one day, don’t we?
* Non MDI interface. I just cannot do without floating windows!
* Uses wireframe resizing for the windows. We have an old Mac and that makes the GUI extremely slow when applications use live content resizing.

I also use Xcode and VC to recompile the final product to ensure that it behaves correctly; using different compilers also reveals unexpected bugs sometimes.
h3. What Went Right
h4. Telecommuting and team synergy
The distance between the designer and I didn’t affect the development or progress of the project at all; we both work well together online and independently and we knew what we had to do and did it. We communicated via instant messaging about once a day, just to synchronize our work. We don’t use any CVS servers, because we’re both experts at breaking these kind of tools and desynchronizing the projects, so we just worked the old fashioned way. I usually operate that way with all the other contractors I work with as well. Sometimes we communicate by email when we work late at night and the other person is not online, or if we’re in different time zones.

For the most part, the designer, Djaggernaut, understood exactly what was needed. The graphics were delivered in the right format and were ready to use immediately. This didn’t create the designer/coder “tensions” that may often occur otherwise, which in effect made the development of the game a pleasant journey.

Finding the right people to work with is a real challenge. In my opinion, you don’t need to find the best in their discipline, but the serious ones who will finish their projects. I usually scout in forums and make contacts with people, and word of mouth does the rest; then it’s all about “the good vibes.”
h4. A different background from the norm
The choice of not using a tiled background not only reduced the amount of work required to put in the level design, but also gave Kaijin a twist on the conventional shoot-’em-up look. The backgrounds are composed of a big looping image with a second texture to create a parallax effect. We didn’t want the starfield look that gives a “cold” look to shoot-’em-ups. Since there’s a lot of action on the screen and no enemies are ground based, we forget about the backgrounds very quickly and get absorbed by the game.
h4. Using OpenGL and QuickTime
The use of the OpenGL-based game engine PTK made the port really easy and fast; it took only about a couple of hours to get the Mac version up and running. I was delayed a little bit by the spline routines (PTK’s KSpline), which hadn’t yet been tested on the Mac and required a little bit of tweaking on the loader part. Endianness issues that I didn’t implement on the PC side were a problem; I was expecting a bug there so that wasn’t a surprise.

Using QuickTime for all the media in the tools was the biggest time saver. No need to worry about the file formats nor future file formats—upgrade QuickTime and benefit from new file formats just like that! (Do I sound like a QuickTime evangelist!?)
h4. Few alpha releases
Not releasing any alphas before we had an almost complete product helped a lot. We saved a lot of time and stress since we didn’t have to listen to the critics saying, “I’d like that alien to do this and that, etc.” We just did what we felt was right and listened to our instincts. We only later tweaked the game after the first alpha version was out. Since we’re a small company (just my wife and I) we can’t afford a big “official” beta test campaign—our family and friends are the official testers of the games.
h4. An agreed payment schedule
Paying the designer progressively gave the him a real motivation to get the work done faster and right the first time. We set little milestones and every time they were completed, the assets were paid immediately.
h4. Resolution and input control
Changing the resolution from 640×480 to 800×600 during the development gave a new “fresh look” to the project. The levels became much easier to edit and a lot more interesting to play. Actually, the game only runs in one resolution; you set up the desired screen resolution in the shoot-’em-up editor and you are ready to play!

The input is done the old fashion way for the keyboard and mouse (GetKeys, GetMouse). The gamepad code has been written by Matt Gray, since I couldn’t get into HID at all. I realized quickly it was too complicated for me, so I contracted Matt to do the work. (When I see such technologies I realize I still know close to nothing about programming and have a lot to learn!)
h4. The Visual Level Editor
The editor is unusual in that it is like an SDK with a visual editor. You start with a whole framework where you have everything ready, and you need to program your menus, weaponry systems, etc. The editor just stores all the visual information, movements, etc. It’s like Macromedia Director but in C/C++ (you still have to program at some point).

The editor contains a big portion of the PTK game engine replayer code, which made the development of the game a breeze. My next step is to improve that editor to handle ground units and variable altitude units. The replayer already handles it, there is just no way to edit the values right now.
h3. What Went Wrong
h4. The first version of the menu.
The first menu did not match the game design, and so the designer had to redraw it. This wasn’t a big problem, though, because the designer was able to use the editor to quickly update the menu and other game assets. Typically, it was as simple as adding a few aliens, editing a few splines and launching the game to see a live result immediately.
h4. The level editor was still a work in progress.
The file format of the level editor wasn’t originally defined and is a raw structure saved on disk. It was constantly modified during development, and that delayed the creation of the levels all the way until the very end of the project. We had to redo “test” levels every time a change was made to the format. The use of data chunks could have minimized that problem, although I’m not sure if implementing it that way would really have saved any time.
h4. A bug in the game engine; but bad news turned into good news.
The drop shadow and the effects for the radioactive areas in the game revealed a bug in PTK. In the end, this bug was fixed and turned a wrong to a right since it ended up improving PTK.

During that same period some registered PTK users discovered a few glitches/problems in the library. I fixed them and also added some of their suggestions:

* Event callbacks
* More and better support of picture formats.
* Syntactic fixes in some functions (- const char* instead of char* etc).
* Better gamepad detection/support (still currently in development for “hats” type controllers, users are sending me gamepads for testing).
* Xcode dead code stripping problem solved by modifying the sound engine.
* Double endian flipping (KMiscTools).

As far as we (as PTK users) know, there aren’t any major bugs in PTK. We’re currently tweaking the actual version to be as polished as possible, and once we reach a sufficiently polished state, I will start adding new functionality. The lead requests are for video playback, file enumeration operations and picture saving in miscellaneous formats.
h4. Unexpected problems
I experienced unexpected problems with the splines when I attached the aliens to them. The speed wasn’t constant along all the “segments” of the spline, and we could see the aliens slowing down and speeding up significantly. I chose the solution of pre-rendering them in memory and discarded identical pixels. We can almost say that the whole game is running from a look-up table now!

When a bug decides to attack, he picks a random pre-generated spline and follows it until the end. When it reaches the end it decides to go back to its position or pick a random new position. Sometimes special events occur (ship captured), in which case the aliens are sent back to their original positions (idle state).
h4. Underestimating the game difficulty.
Since I was programming the game I got used to it very quickly and didn’t realize how hard it was. We kept the hard mode and levels in Tiger, and made easier levels in Eagle and Dragon for a more casual playing experience. At first there was no shield and I could complete the game without it, but I wanted the game to be more globally accessible.

When releasing the first alpha version this shortcoming became really obvious. We redesigned levels for Eagle mode, and just kept the harder levels for Tiger mode. Also, the first “AI” (aliens shooting directly at you) made the game way too hard. I changed that to random firing for the little bugs; now only certain bugs can aim.
h3. Afterthoughts
With Project Kaijin, the bigger and more interesting part for me was to write the editor-I love writing tools! I began to write the editor in March of 2003 with the goal in mind of making the ultimate shoot‘em-up editor. I’ve been working on it part time since then. At the very beginning of January 2004 I finally reached a usable point and decided to make a relatively straightforward shoot-’em-up that would show the capabilities of the engine. I subsequently contacted the designer, Djaggernaut, and asked him if he would be interested in the project.

The development of the game itself took roughly two months working part time. During its development period I was writing another game called Abracadabra and updating Helix. Tweaking the evaluation version of a game turned out to be a complete job in itself. You have to satisfy the casual player as well as the hardcore player, and this is a tougher task than it looks—but I always love trying!

* Demo

1 Editor’s note: MSX is an old Z80-based family of home computers which was popular in Asia, South Korea, South America and some European countries. The standard was created by ASCII of Japan, in cooperation with Microsoft.

kaijin,phelios

iDevGames Looking for uDevGames 2004 Sponsors

Since 2001, an annual contest to encourage independent game developers to create an original Mac game has been held by iDevGames. The contest is called uDevGames, and in 2004, it awarded over $25,000 in prizes, including software, hardware, and books, to the winning developers. These prizes, generously donated by the sponsors of uDevGames, are utilized by the winning developers to further their Mac game development, and help to make the Macintosh an even better gaming platform. The uDevGames Contest benefits not only the winning developers but also the entire developer community through the release of all participants? source code at the end of the contest. This year?s contest is slated to begin in August, and iDevGames is currently seeking sponsors to donate prizes. Questions, inquiries, or comments should be directed to Carlos Camacho, Editor-in-Chief.

BBC BASIC V on Mac OS X with Brandy Basic

Brandy Basic, an Open Source BBC Basic (Basic V) interpreter, written by Crispian Daniels, has found its way to Mac OS X. BBC Basic is the version of BASIC supplied with computers running RISC OS, and anyone wanting to try their hand at BBC Basic will need this interpreter to do so. Currently, this interpreter should have no limitations, although graphics require the use of the Jlib library, written by Jonathan Griffiths. (Editor’s Note: The JLib website has disappeared and JLib is only available through various download sites. Take note that Brandy Basic must be compiled, and requires downloading two separate files. Make sure to read the readme before compiling.)

Related link:

Brandy Basic V Interpreter

bbc,basic,v,mac,os,x

REALbasic 5 by REAL Software

Introduction

In this review I take a good look at the capabilities of REALbasic 5 in the game development area. REALbasic is a cross-platform visual, event-driven, and object- oriented programming (OOP) environment. These four features differentiate REALbasic from any programming environment on the Mac. In fact, it is hard, if not impossible, to find any programming environment on any platform that has all four properties.

“Visual” means that we can visually create a user interface with so called “controls”. These controls are user interface objects, like a textarea, QuickTime movie, or Canvas, that can be dragged into a window. “Event-driven” means that REALbasic code is only executed in an event, for example when a key is pressed by the user or a timer expires. This frees the CPU from needlessly executing code.

REALbasic allows the developer to create object-oriented applications. Unlike a procedural language the code and the data are combined in a so-called “class.” Although the concept can be slightly difficult to grasp for new programmers1, once mastered it is very powerful for writing, reusing, and maintaining your code.

“Cross-platform” refers to the ability to build applications for both the Mac and Win32 platform. With REALbasic 5, this also means that the IDE is available for both Mac and Win32.

Review Method

To put REALbasic to the test, I created three game projects: a small 2D action game, a 3D game, and a 2D particle engine. This gave me the best impression on how easy or difficult it is to create games and how the games actually performed. Since REALbasic can do 2D and 3D “out of the box” these small projects would serve as ideal tests.

Over the course of the review, I had to abandon the writing of the 3D game due to a lack of time and instead wrote 3D routines for a basic 3D viewer. In addition, I took these three projects to a PC with Windows XP to look at the cross-platform capabilities of REALbasic.

REALbasic Game Capabilities

Although REALbasic is a general purpose programming environment there is a good deal of functionality for game developement.

The most important game development controls are:

  • The Canvas — A general drawing area where all kinds of graphics can be drawn.
  • The SpriteSurface — This is the place to create 2D games.
  • The REALbasic3D control — For 3D games or graphics, or 2D games made in 3D.

As written in the review of REALbasic 4.0 on this website, there are more interesting controls for game developers, like REALbasicScript, Sound, and QuickTime, but the three mentioned above are most critical for developing games.

SpriteSurface

The SpriteSurface is a control that provides all kinds of built-in functionality useful for game developers who want to create a 2D game. It has functionality for drawing, sprites, tiles, collisions, frame rate, etc. Every SpriteSurface contains the sprites you defined for it, and the code in the Nextframe event can handle all the movement of the sprite in the SpriteSurface. All this looks very tempting, but does it work? To find out, I created a small game remotely similar to Galaga, an old-time favorite of mine. Creating a game area, with a SpriteSurface, loading the sprites, and implementing the physics of the game, etc., turned out to be very easy.

The object-oriented nature of REALbasic really pays off here. Animation became smooth after some experimenting with the frame rate. However, I do have some doubts about the speed of the whole thing. Sure, when you create a simple game like I did everything works just fine. If you want to do more difficult projects with plenty of sprites, many particle effects, and a scrolling background, you will really be pushing the SpriteSurface to its limits—it can become very slow. Some advanced 2D game features like parallax scrolling are also not supported by the SpriteSurface control.

Canvas

The Canvas control is a universal drawing area. Although it misses the typical game features from the SpriteSurface, it is more than adequate for game design. All types of useful events are available for mouse and keyboard input. You could write a complete game with it but that would demand writing your own game routines like collision detection.

I decided to write a small particle engine for the Canvas, where I could easily change the number of particles. Writing it was pretty straightforward due to the graphic routines of the Canvas control and the easy way in which REALbasic allows you to create an interface.

Testing the application went very well with a few hundred particles on the screen.

When I increased the number of particles to more than three hundred the animation was no longer fluid and I noticed some flickering on the Canvas. Some of this may have been resulting from the inefficiencies in my code, however my verdict is that in complex games the Canvas suffers from the same problem as the SpriteSurface.

The Canvas is an ideal control in combination with the SpriteSurface and REALbasic3D. Imagine you create a 2D shooter. You can use the SpriteSurface for the animation of the sprites and the Canvas for, e.g., radar screen.

REALbasic3D

REALbasic3D is a 3D drawing control written on top of Quesa. Quesa is a high level API written on top of OpenGL. REALbasic3D can only load 3DMF files. 3DMF stands for “3D metafile” and is the native file format for QuickDraw3D. This file format is not as widely utilized as OBJ or 3DS, therefore not many 3D modeling applications support 3DMF, especially in the lower-price region.

Although I had not written a 3D application before, it was amazingly easy to create 3D routines with REALbasic—I had a basic 3D model viewer up and running in no time. The visuals I could create were not up to par with all the 3D graphics that we are used to nowadays, but it was good enough to write a proper shareware game.

Someone more ambitious could write his own API in REALbasic right on top of OpenGL, but this is a task that is too much for most game developers.

Cross-Platform

One of the biggest changes from REALbasic 4 to REALbasic 5 is the introduction of the Win32 IDE. With REALbasic 4 you could create a Win32 build with the Mac IDE, but this could be a very time-consuming affair since you had to take your build to a Win32 platform and then do the debugging on the Mac again. Now with REALbasic 5 this is all gone. The source code created on the Mac can easily be transferred to the PC.

For a first version product, the Win32 is remarkably stable. It is also fast; in general I found it even faster than the Mac version. I had all my Mac games up and running under Win32 without a serious problem.

Other Differences with REALbasic 4

REALbasic 5 has metal windows and drawers but the two important differences on the Mac are the new compiler and debugger. The compiler runs outside the IDE, which means that when the application crashes the IDE stays unaffected. This is a big plus since REALbasic 4 used to crash a lot resulting from this. A downside is that compiling takes longer. Also, a completely rewritten debugger was implemented. In general, this debugger is more flexible and easier to use than the previous version.

In regards to game development, I didn’t perceive major differences between REALbasic 4 and REALbasic 5; REALbasic3D, the Canvas, and SpriteSurface are essentially the same.

Conclusion

Writing cross-platform games has never been easier, and we have to thank REAL Software for this. REALbasic offers us an easy, stable, and fast IDE, with plenty of functionality for the game developer in both the 2D and 3D areas. REAL Software could improve the speed of the SpriteSurface and the Canvas to get even better results. The new compiler looks very promising and could give an overall performance improvement in future releases. The Canvas and SpriteSurface would benefit from this.

REALbasic3D is great for creating 2D and 3D games, but the visuals are rather simple compared to modern 3D games. This might be since REALbasic 3D does not support all the functionality in Quesa and Quesa in its turn does not support all the functionality of OpenGL.

The limitation to 3DMF files narrows the options of the graphic designer of the game. It would have been pleasant if REALbasic could import some more widely accepted 3D file formats like OBJ and 3DS.

Although REALbasic has its shortcomings, it still offers a great IDE to create games in the shortest possible time and for a very reasonable price.

Games made with REALbasic

One point of concern is the limited number of good games made with REALbasic. This may owe to the limited number of Mac game developers and the image of REALbasic as an application IDE.

On the other hand, there are among others Space Spuds, The Green Machine, and A-OK! to prove that good games can be made with REALbasic.

  • Rated ?
  • Version: 5
  • Category: Development Environment
  • Developer: REAL Software
  • Url: www.realbasic.com
  • MSRP: $99 to $399 (Academic license also available)

1 As opposed to a procedural BASIC IDEs such FutureBasic or TNT Basic.

realbasic,5,real,software

The Belt

The Belt stemmed from a pencil and paper game I used to play with friends in grade school.

thebelt01.gif The Belt

The game involved drawing two opposing bases with a belt of asteroids between them, followed by balancing a pencil on its point and pressing down on the eraser until it slipped and marked a line across the paper. Hence, your “laser bolt” would fire out from your turret and break apart pieces of the asteroids in the belt. Later you could also send a little droid that allowed you to fire from it instead of your base, making it easier to reach the enemy’s turrets.

thebelt02.gif Concept Sketch

This idea is fundamentally simple and reminiscent of earlier turret based computer games that had the users fire against changing wind conditions to hit the enemy turret. What makes it different is the inclusion of obstacles (the asteroids), additional weapons, and random alien entities.

Ulterior Motives

As you might have noticed, the uDevGames Contest is a Mac game programming contest—so why did I bother to create a cross-platform title?

thebetl03.gif Cartoon-style graphics

It would have been much easier to glue together some code and make it run on Jaguar only. However, one of the tenets of uDevGames is to educate. The people who need educating the most are not the young programmers just budding into the world of Mac game programming, but all those who look at the Mac platform and drool with envy but never make the plunge for fear of the unknown. I have spoken with many potential “switchers” who would come to the Mac platform in a heartbeat, if only it didn’t mean leaving behind many years of coding experience for a different platform. They didn’t know that CodeWarrior could compile Windows programs on the Mac. They also could not fathom how programming for two operating systems could be a joy instead of a chore. I made The Belt with the motivation that potential Switchers could see the Windows calls right next to the Mac calls, and see how easy it is to configure a CodeWarrior project to compile for both platforms.

Another feature that I wanted to sneak into The Belt was cross-platform Rendezvous support1. Many news sites reported that The Belt supported Rendezvous, but few actually noted that The Belt allows Rendezvous to work across Mac OS 9, Windows, and all versions of Mac OS X, not just Jaguar and above. This was accomplished by taking the specifications of the Rendezvous standard and scaling them down until it was slim enough to use in a game. For instance, there is no need for The Belt to keep track of communicate with your Rendezvous-enabled printers or routers. This made the code tiny enough that debugging was a snap, yet from the user’s standpoint it looks and feels like full fledged Rendezvous.

Crime Scene Report

One of the reasons I could create a high-polish game in less than three months was the modular design of my base engine code. As previously stated, I’ve been working steadily over the past year on various projects, all which use the same base engine for events, graphics, sounds, and other OS-specific abstractions. Utilizing this heavily used and debugged code allowed me to jump right in with creating the assets and game specific code.

To create the many assets of The Belt I used a combination of programs. I used Ray Dream Studio and Poser to create the lovely cell-shaded graphics. Photoshop is of course the standard for post-processing rendered images. An old version of the QuickTime Movie Player allowed me to process the audio files. CodeWarrior is my compiler of choice for cross-platform development.

Autopsy Report

Many things went right during the development of The Belt. The most prominent of which is my experience with writing Mac games. Not only did I have experience with the many pitfalls and midterm depression that inflicts game developers, but I also had solid code that I could throw into my game. This allowed less time spent writing and rewriting code, and more time spent creating assets and brainstorming the gameplay.

A specific piece of code that boosted development was the creation of a centralized generic animation manager.

thebetl04.jpg Main menu

This allowed me to use the same code structure for creating graphics and animations for all portions of the game, including the main screen, dialogs, and in game elements such as explosions and alien sprites. Having this one code structure also cut down on the number of random bugs in the program, since once I had one “graphic” module created and bug-free, a simple copy and paste of the entire module gave me another bug-free animation.

Well-defined and early milestones also helped with the creation of The Belt. I originally worked out a highly optimistic schedule which would’ve had The Belt complete and ready for beta testing by mid-contest—one and a half months. While this schedule inevitably slipped, my dedication to the schedule allowed me to have a highly polished beta by the time there were thirty days left in the contest; just a two week slip in my schedule. If I had originally created a less optimistic schedule and made the beta for thirty days before the contest ended, I would have spent less time early on crunching and the schedule would have slipped even further, perhaps even far enough that I would have submitted the game only seven days before the development period ended, leaving little time for beta testing.

Adding Rendezvous support into the game was also a good thing, since it gave The Belt much notoriety among the news sites. For instance, Apple Games listed The Belt’s release, specifically noting how it utilizes Rendezvous2. While it is unclear whether having a “popular” game benefits your final voted score or not, I still feel that the more people who download and play The Belt the better.

Finally, having a supportive wife is a must for any married game programming hobbyist. As most of you know, game programming takes a large commitment of your time and mental resources, often leaving you in a vegetative state which your wife may find incredibly annoying. Without the full support of my wife, I know that The Belt would never have made it past the design phase!

“Objection, Your Honor!”

AI(artificial intelligence) in The Belt was a real problem. In the past my favorite method of AI has been generic algorithms, since they tend to be very generic and look at the overall strategy of the player.

thebetl05.jpg Game screen

However, my early attempts at implementing this for The Belt were complete failures, wasting three whole days of development time. I finally pieced together a simple Finite State Machine that works well enough, but is very limited; these limitations are very noticeable after 30 minutes of playing the game.

Networking was another big pain. The Rendezvous code was a snap, but I decided to use UDP packets for the actual in-game networking. This worked well at first, but I never implemented any safety nets for packets that got dropped. This means that after a minute or two the games would suddenly become out of synch for no apparent reason. So, instead of adding all the safety precautions, I switched to TCP. This left only the issue of lag time, which did not matter since I only allowed Rendezvous networked games, and Rendezvous networks mostly have high speed connections3.

thebetl06.jpg The cast

No postmortem that deals with making a Windows compatible product can get away without complaining about Windows itself. This problem is less of a technical issue as it is my ignorance of the Windows world of marketing. Now, I know which news and download sites to market my Mac game on, but what sites out there cater to Windows shareware products? And Windows download sites? The Belt was completely under-marketed on the Windows side, which could have hurt in the voting since many more Windows users could have voted for The Belt.

Post-development lethargy also stunted my creative efforts. The Belt undertook no large changes since its initial beta release. Why? The cop-out excuse is that I could not implement that “great new feature” in time for a bug-free product, but in reality I was just tired and lazy. I spent all my creative credits making the thing, and there was nothing left in my reserve to handle anything more than bug fixes.

Finally, having my wife realize that I pronounce Rendezvous with a final “s” sound has really annoyed me. Now every time I say Rendezvou-s I get a lecture about how “that’s not how you say it, and what would all the other Mac addicts out there think of you if they heard you say it that way?” In the end, it’s a wasted argument since I still pronounce it with an “s”.

The Verdict

I believe The Belt to be a well-polished and well-designed title from the ground up. It does what it is supposed to do well and with style, but it could have done with a few more features. In its current incarnation the game play is a little stunted, but adding a few new twists and weapons would have made the game play that much better. Still, it is a worthy product that I hope many people will download and enjoy!

My participation in uDevGames 2003 will depend on many factors, the most prominent of which is whether or not I have the time. Any graphics programs I may win as a result of the uDevGames 2002 Contest will definitely come in handy when creating assets for next year. Perhaps I’ll be able to upgrade my aging RayDream Studio to Carrara Studio? We’ll see!

1 Editor’s Note: Rendezvous was renamed Bonjour with the release of Mac OS X v10.4.

2 I do not believe any of the other uDevGames entries were listed there—perhaps if they had included Rendezvous?

3 Usually AirPort or LANs

  • Genre: Arcade/Strategy
  • Developer: Rocco Bowling
  • Url: http://homepage.mac.com/felinegames/
  • Team size: 1
  • Released date: October 21, 2002
  • Project length: 3 months
  • Development hardware: PowerBook G3
  • Critical applications: Ray Dream Studio, CodeWarrior, Adobe Photoshop

iDevGames Forum

iDevApps Forum