• Updated 2023-07-12: Hello, Guest! Welcome back, and be sure to check out this follow-up post about our outage a week or so ago.

New game released: Blokz RAVE

phlogios

Member
Greetings! I have released a new 3D game for Mac OS 9.
https://phlogios.itch.io/blokzrave

It is a free tetris-like game with 3D graphics, designed to run on an original iBook or newer.
Let me know what you like or hate about it.

For the programming nerds out there: the game is written in C++ using CodeWarrior Pro 8.3, and is actually cross-platform and runs on Windows 98 as well, however that binary will not be released. The mac version uses Quickdraw3d RAVE for hardware accelerated graphics.
 

Byte Knight

Well-known member
Nice work - very polished! I played it in SheepShaver and got around 30 FPS. Will fire it up on my MDD next.

My only suggestion would be to add the ability to customize the keys.
 

phlogios

Member
Version 1.4 has been released with some general improvements to gameplay and performance.

Stay tuned for more improvements to performance.
 

stynx

Well-known member
Interesting. Is it possible to implement a benchmark mode?
Having a good RAVE benchmark would be nice.
 

stynx

Well-known member
Yes I have one, I'll make sure to include it in a future update. It is not beautiful though!
The following test would be _very_ nice:
- (visual) testing for features (per pixel transparency, per vertex transparency, texture filtering, texture size) > (the QD3D RAVE drivers do sometimes report BS)
- hidden surface removal impact (rotating cloud of cubes for example)
- polygons pre second (trismap vs simple tris vs solid obj)
- impact of transparency (vertex, texture)
- sorted vs. unsorted polygon drawing order
- flat-shading, phong-shading, gouraud shading, unfiltered and filtered texture performance for each test
- impact of fog

You could implement this with the cube-cloud as a basis with several options for amount of cubes. The features could be added on part or all of the cubes (transparency, textures ...) The perspective should allow a good mix of different sized polygons to be on the screen. Some card have very limited pixel-throughput but can calculate a large amount of vertices (3Dlabs Glint for example). So there should be different tests for big and small and mixed sized vertices.

Background: I am conducting some tests with several old graphics chips, like the QD3D accelerator from Apple. The QD3D accelerator is very interesting since it is an original Apple design, functionally somewhat related to the PowerVR. The original QD3D benchmarking and testing tool "Sneek3View" from Apple is very limited and has only a wall of polygons test for polygon throughput. any other Benchmarking tool ignores the QD3D accelerator.

Interesting early chips/cards are:
S3 Virge
3DLabs Glint and Permedia series
Apple QD3D Accelerator
Number Nine Imagine and T2R
ATI Rage I and II
Matrox Millennium I and II
3Dfx Voodoo

I would be willing to support your effort financially, if you like.

I have started a list of 3D chips a few years ago...
I'm still working on a revision of my benchmark results..
"Sneek3View" with its sources is in the RAVE_1.6_DDK

-Jonas
 

Attachments

  • qd3d.pdf
    76.8 KB · Views: 4
  • QD3D_comparison.v2.pdf
    712.2 KB · Views: 3
  • RAVE_1.6_DDK_Mac.sit.hqx
    3.9 MB · Views: 1

stynx

Well-known member
I have tested Blockz with the
Apple QD3D Accelerator and
Formac ProMedia 3D

The Apple QD3D is not recognized and QD3D falls back to the software renderer.
The Formac ProMedia 3D (S3 Virge based) works but has a lot of graphical errors (kinda normal for that card). (ca. 10-25fps with a 120MHz 604)

A 3D engine-selector for detected 3D accelerators would be nice.

-Jonas
 

phlogios

Member
Yes that is a good idea - I suspect some of the issues I’m having are related to my accelerator selection code so I will improve that a bit and let the user pick.
 

stynx

Well-known member
Yes that is a good idea - I suspect some of the issues I’m having are related to my accelerator selection code so I will improve that a bit and let the user pick.
The Apple QD3D Accelerator is often ignored by games since it lacks a lot of features like per pixel transparency and texture blending. It has only 512K texture memory but some other features that were not used by other accelerators like constructive solid geometry (boolean logic for volumetric objects).
I don't know how you render the menu and score-board. If these are 3D objects, it would most likely work with more 3D accelerators. Early 3D accelerators had often problems with mixing 3d and 2d context.

Challenging features for early 3D accelerators:
most early accelerators have limited or no transparency support (polygon and/or texture)
most early accelerators have no texture filtering (Virge, Rage (1,2) = very slow, Matrox Millennium II=none)
early accelerators often have a limited texture size (Virge=64x64pix max)
there is no texture support in some (Matrox Millennium, No.9 Imagine 128 II ) early accelerators.
there is no fog support in nearly all early accelerators.
most of the accelerators have limited or no sprite support (per pixel transparency).
multiple (colored) light sources can have a big impact on frame rates.

Ways to get around some limitations:
- Define a limited 3D context on the screen (rectangle with only 3D content) that is never overdrawn by 2D content. (FPS counter) **
- Use colored polygons instead of textured polygons where possible. ***
- Use polygon-constructs (like a border) instead of textures when transparency is needed. ****
- Do not use multi texturing (shadow maps)
- Reduce the amount of light sources
- sort the polygons by the z-index (Virge & Rage) before drawing -> back to front
- QD3D supports hardware accelerated 3D only in 16bit or 24/32bit color depth.
- Some accelerators can only render 3D in 32bit color mode!

** the reason is that some 3D drivers get very slow when the 3D portion is overdrawn by the 2D context. Some drivers seem to fight over what should be displayed, causing flickering snd redraw. Sometimes the 3D context gets redrawn multiple times in a single frame as a result.

*** early accelerators were often good in rendering 3D geometry but bad with textures because they were an afterthought. The pixel throughput could take quite the hit when textures were involved, sometimes dropping to 1/4th of the possible performance when textures were used.

**** transparent texture are nice to make a round border or a complex object-sprite that would take a lot of polygons to replicate. But if the accelerator does not support transparent pixels in a texture, the result might look ugly or it might even completely block the view.

Some options would allow more flexibility for the sometimes rudimentary 3D support of old 3D accelerators. The S3 Virge is one of the worst accelerator cores when it comes to standard features. The reason is of course that the Virge was developed before any standards were defined. On top of that, the 3D driver on the Mac was developed by Formac and was never fully functional. The Rage 1 had good drivers on the Mac but still lack some basic features. The Rage II has a good support on the Mac and was often only limited by the 2Mb of VRAM.

I hope you can understand my rambling :)

Your game is quite playable, even on older machines.

-Jonas
 

phlogios

Member
Thank you Jonas, that is great information to have.

Everything you see on screen is rendered as either a textured triangle or gouraud triangle. I am not doing any 2D bitmap operations. I tried drawing the text using RAVE’s bitmap functions but observed slightly worse or same performance on iBook so I removed that code path.

I am unfortunately sick and planning a wedding at the moment so I am struggling to find time to make improvements to the game, but I will get to it soon.

Keep the feedback and suggestions coming!
 

stynx

Well-known member
Thank you Jonas, that is great information to have.

Everything you see on screen is rendered as either a textured triangle or gouraud triangle. I am not doing any 2D bitmap operations. I tried drawing the text using RAVE’s bitmap functions but observed slightly worse or same performance on iBook so I removed that code path.

I am unfortunately sick and planning a wedding at the moment so I am struggling to find time to make improvements to the game, but I will get to it soon.

Keep the feedback and suggestions coming!
Take it easy. The computers and software we are dealing with can wait a few months-years :)

Using only RAVE is a good choice since it will limit incompatibilities.

The texture-based text may cause problems (but only in edge cases). You will have 26 unique textures for the letters alone on screen and that may reduce compatibility. Small textures (< 32x32px) are sometimes problematic, The QD3D accelerator for example can only render 128x128px textures at minimum and scales every texture up to 128x128px. It only support only 12 textures overall. I have not many informations on other accelerator limitations, though. You could dynamically generate textures for the menus on the fly by drawing it in memory as a single texture. And the implementation of a polygon-font could be in the form of individual flat 3D shapes or as a variant of a 7-segment display to be more flexible. You could also look into RAVE support for line drawing that should be supported by most accelerators.

The bitmap function in RAVE is very limited and often not completely supported in hardware. The QD3D accelerator supports the bitmap function but only as black and white, where black is transparent (despite not supporting transparent pixels!?). It is a very strange function and may actually be an overlay from the 2D graphics system in some cases. That would make is very slow.

I have the feeling that some 3D RAVE drivers are not well implemented and some functions are handed back to the soft-RAVE subsystem to draw on the screen. This back and forth will reduce performance a lot.

You can look into the Sneek3view demonstration from the RAVE 1.6 DDK, where different modes and functions are demonstrated, including texture and bitmap formats. There is also a line-demo that checks the support on the accelerator. Although, i cannot really say if the 2D-graphics system is also accessed when a RAVE-command is issued through MacOS.

The most compatible approach would be to implement the game completely without textures and special effects as a baseline. Maybe even only using flat-shading. This bare bone version could be benchmarked and compared against. Any additional feature like multiple light sources, shadow maps, dynamic textures, bitmap overly and so on could be added over time and benchmarked on different hardware.

I have a very big collection of graphics cards with RAVE support. Im only missing some like the
"3Dfx Banshee",
"3Dfx Voodoo 4/5",
"3DLabs Permedia NT",
"Number Nine Revolution IV"
and the original "ATI Rage" at the moment. I can test a lot!

I also don't have some of the later AGP cards with limited RAVE support.

-Jonas
 
Last edited:

phlogios

Member
My oldest is Rage integrated in Powermac 6500/300, and my newest is Radeon 9000 Pro Mac Edition.
What I am observing is that if I force the game to use the ”Apple Software Renderer” engine of RAVE, I get similar behaviour as in Sheepshaver. This is good - I can fix bugs locally on my Pismo without having to switch to an emulator.
Currently, the ”Engine” selection is based on whether the gestalt reports texture mapping support or not, but I will improve the automatic selection and also provide a manual way of choosing engine.
 
Top