[email] [print]  Tennis, Anyone?

Dec 14, 2005 15:56 UTC, by Chris Simmons, Senior Journalist.
From the hammer-arm department...

There's a new game in town and it is causing a racket of excitement! A tennis racket to be precise. Zenja Solaja is developing a new 3D Tennis game for the Haiku, Zeta, and Windows platforms, based around the re-working of his game engine for History of the World. He provided some benchmarks and a release timeline, and answered some of our questions too.

Here's part of his initial email to me:

Author: Zenja Solaja
Platforms: Zeta (and Haiku) and Windows
Graphics: OpenGL

Athlon Xp 2400 benchmarks:

60 fps using software rendering at 640x480 full screen.
24 fps using software rendering at 1280x768 windowed
>1300 fps using hardware rendering under Windows.

ETA: Single player beta 1st Quarter, 2006
Licence: Free

The players are SMILEYS - just wait till you see the player antics, they're hilarious.

We bring the FUN back in gaming.



Development screenshot...

Upon reading Zenja's email I fired back a couple of questions about the project. Here is what he had to say...

What's all this, then?
I've developed a new game engine for my History of the World project from scratch, which I'm reusing for this project. This engine handles platform specific issues (setup, keyboard, mouse, windowing), mixes sound, and handles OpenGL issues (fonts, texturing, animations etc), and it has an ample number of OpenGL objects which can interact with the world. This engine was created for BeOS and Windows.

For a tennis game, all I really needed to get started was create a game class (called Tennis) derived from my engine, create new graphic objects (court, crowd, playes, ball, net), and work on the physics, AI and player interaction. The physics are very basic (simple ballistic motion), so it took maybe a week to get right. The game rules and sequencing only required a week (hobby project week) to implement, since this really is a simple game.

The AI makes its shots based on random weighted table lookups (with predefined odds based on difficulty level). Different AI players have different weightings, so you'll get a different style of play from various opponents. I'm also thinking of creating an AI player which will automatically adjust the weighting tables based on success / failure ratios (a learning AI). The AI was suprisingly easy to implement for this type of game, since all it really boils down to is select where to return the ball based on a table lookup.

I've already got a sound engine which mixes multiple sound sources, with a customisable amplitude (to simulate distance). This was easy for BeOS, and a lot more time consuming for Windows. For the tennis game, once the free sound samples were found (isn't the internet great?), all you need to do is ask the engine to play a set sound at a given volume level. Easy.

Most of my time has been devoted to the graphics. The court, racket and crowd are relatively simple to draw. The biggest issue I had was with the players, since human motion is difficult to do. But why should the playes be human? After bashing my head against the wall trying to figure out the best way to manage human movement, I came up with the idea of using Smileys after visiting a web forum, where a Smiley held a tennis racket. The solution to my problem was so simple. Smileys are great since they're easy to render and animate, and they are amazingly emotional. After replacing my stiff human model with a heavily emotional smiley, the Tennis game came to life. The smileys get angry, mad, go green and red, ROFL and jump to the air, roll their eyes and do other antics which really make the game FUN. I'm having a blast figuring out new emotions I can give them, and programming the antics.

What is the current status of the game?
A full single player game is now playable, since the game rules, basic animations, player input and AI is done. I'm having fun testing the game.

What's left to do?
Lots. I need to overlay the score and other text messages to the screen, I need a menu screen and a OpenGL GUI to allow users to change graphic settings (I dont want a platform specific GUI). Multiplayer - there is no net code in the engine as of yet. There is no support for a doubles game (0-3 AI opponents). Other than the smiley antics, there are no cinematic animations (camera flyby etc). And I need to convince my gf to do a sexy voiceover for the score announcement :)

The game engine uses OpenGL and C++. It's amusing to watch the software industry with its managed code policy (Java, .NET etc), since the entire platform specific section of the code makes up less than 1% of the code, while the other 99% is platform agnostic. I've placed all of the platform specific files in a single directory, and it talks to the game (and vice versa) through a set of interface functions. The entire game is thus platform independant, only a recompile away. All this binary translation, bytecode and JIT compiler talk is absolutely meaningless if you set out from the very beginning to create a multiplatform project, and you end up with a native application for all platforms at the absolute maximum speed.

What are the difficulties?
Developing a game to work under multiple systems does have it's issues, but nothing too serious. Hardware accelerated OpenGL is a problem for BeOS (Rudolf has done wonders with his work), and it forces me to be frugal when adding eye-candy. It alsokeeps me constrained from getting carried away with the graphics and makes me focus on the core of the game. Too many modern games seem to be sponsered by graphics card manufacturers, with too much focus devoted to graphics, and too little focus on that which makes the game FUN. Take a look at the latest EA Sports offerings - those games, although beautiful, are very annoying to play since there are too many cinematics and camera zooms (which you cannot skip), which frustrates the player after seeing it 1000 times.

The game will be free, and available for single player beta test early next year. And it will be fun.

Anyone care to suggest a good name?

Thanks Zenja for this exciting news!

**update**

Just a quick update. I've been looking at using OpenAL for positional audio during the weekend, and have managed to get it working quite nicely under both Windows and BeOS (v1.0 of OpenAL). The tennis game now has working positional audio. Sweet.

Linked URLs

  • Tennis, Anyone? : http://haikunews.org/1142
  • Chris Simmons : mailto:cs.haiku@gmail.com
  • History of the World : http://members.optusnet.com.au/hotw/index.html
  • OpenAL : www.openal.org

Printed from Haiku News
http://haikunews.org/print/1142