Submitted by , posted on 13 October 2003



Image Description, by


This is the project I've been working on for the last two months, a 3D shareware pinball game, probably going to be named 3D Pinball Arcade. The idea was to make a pinball game in the tradition of real-world pinball machines that was in full, real-time 3D (something that doesn't seem to exist already anywhere I've looked) where it would be easy to design and build tables quickly. This way I could afford to build a large number of tables in addition to the free one, providing a large incentive for players to register.

One thing that should be obvious is my desperate need of a decent artist for drawing table and back-glass surfaces. What you are looking at is my Programmer Art, which I'm not proud of. Any good 2D artist with an intuitive sense of graphic design would be most welcome to join me on this project for royalty payments. Anyone interested can email me at Tubular42@AOL.COM with some samples of their work. I would prefer hand-drawn art, but most important is a good sense of layout and aesthetics.

The game is about 60% done, including physics, sound, animations, a script parser for programming the table's rules, and most of the 3D graphics basics. The shot at the top of the picture shows my first table at its current state of development. The table is named Everest, with a mountain climbing theme. The shape of the base of the table is built out of transparent textures generated from the collision data, which is just a bitmap itself showing solid areas and table items. On top of that, the ramps and the mountain platform are a single 3D Studio model, and the bumpers, lights, and targets are separate models and textures referenced by the table's layout file. This cuts down 3D modeling tasks to just the problem of trying to build the ramp rails without letting the polygon count get out of hand. Still to come are a decent 3D backdrop to the playing screen, and a 3D "arcade view" for choosing which table to play.

The bottom right part of the picture shows my original table design, which I drew before actually beginning coding on the game itself. I think it turned out fairly close to the original design, which makes me optimistic that it will be powerful enough to build a wide variety of tables.

The bottom left part of the picture shows a small sample of the script which controls the table's behavior. The script language is a simplified version of C, with a few touches from Pascal only added to make the compiler easier to write. I decided to write my own compiler and virtual machine to make sure the language had all the features I needed, ran fast enough, and could be easily integrated with my program. It uses a simple Context Free Grammar of only 110 terms, and an extremely simple first-fit method for parsing. This way I was able to finish the whole compiler and VM in a little under two weeks using just over 1000 lines of code, and including features like local functions, switch statements, and a preprocessor that scans through the code looking for sound and graphics calls, pre-caching the assets when needed, and replacing their reference in the code with a handle to the unique copy in memory. The only drawbacks to my simple compiler are that order of operations doesn't work on some complex expressions, requiring what would otherwise be unnecessary parentheses, and syntax error messages are extremely cryptic or misleading. However, due to the relative simplicity of Pinball rules, I was willing to make these sacrifices.

Once all of the kinks are worked out, designing additional tables should be a breeze, and anyone with medium skill in programming and a decent knowledge of pinball should be able to pull it off. I should stress that this is not going to be a table-building toolkit, as the tools I've been using aren't exactly user friendly. It's merely a way of making my work easier in building many tables. However anyone interested with good skill may contact me if they're interested in helping me design a table for a small cut of the profit.

Thanks to anyone who read this whole thing for their interest and keep an eye out for an IOTD or release of the finished version when I'm done! Hopefully in mid October.

JT Hooker



[prev]
Image of the Day Gallery
www.flipcode.com

[next]


 


Copyright 1999-2008 (C) FLIPCODE.COM and/or the original content author(s). All rights reserved.
Please read our Terms, Conditions, and Privacy information.