Several years ago, GOAT Store Publishing contacted a bunch of homebrew Dreamcast developers about putting together a commercial disc with homebrew games on it. DCSquares to be included on GOAT Games, Volume 1, and I started working on several improvements to the game, improving single player mode by adding challenge levels, and adding multiplayer support.

GOAT Games Volume 1 was never released, but below is a video showing off the updated DCSquares. The sound effects were not working on this Mac build, as it was only tested on the Dreamcast. Multiplayer is also difficult to demo on the Mac, as it requires multiple controllers.

Two years ago I gathered some interesting stats from the DCSquares score database. Here’s an updated version of those stats using the data as of today:

General Stats

* Total users that have submitted a score: 457
* Total games played: 54,132
* Total squares collected: 1,564,992
* Total time spent playing: 38 days (note: scores entered through the website do not record a time, so this is actually higher)
* Average games played per user: 118
* Average number of squares collected per game: 48
* Average score per game: 30,556
* Average combo per game: 47
* Average game time: 61 seconds
* The most users that have scored the same score is 74. They all scored 1,080 points.

Got a PC without 3D acceleration? Introducing DreamZZT Lite, which uses SDL instead of OpenGL to draw the screen.

A test version is available for Windows 2000 / XP: DreamZZT-lite 3.0.8. The debug console is disabled, otherwise it should run the same as the normal 3.0.8 release. This build also includes the experimental Lua interpreter, but I’m not officially supporting it yet.

I’ve updated the DCSquares Facebook application. You can now submit score codes from the Facebook app, no need to visit the regular DCSquares site. Of course, the easiest way is to just have DCSquares submit the scores for you.

ZZT-OOP is fine for simple scripts, but it’s very dated and not very powerful. Starting with DreamZZT 3.2, another scripting language will be available in addition to ZZT-OOP: Lua 5.0. Lua supports functions, variables, and file access, among other things.

Creating a Lua object using a 3rd party editor is as simple as creating a ZZT-OOP object that executes “#become lua”. DreamZZT will then run everything past that line as a Lua script instead of ZZT-OOP. Of course, if DreamZZT ever gets a text editor, or if someone adds the Lua object type to KevEdit, you’ll be able to create Lua objects directly.

@Luatest
#become lua
function main()
local msg = nil
local them = nil
while true do
while (msg == nil) do
coroutine.yield()
them,msg = pop_message(me)
end
if(msg == "shot") then
set_msg("Ouch! I was shot by a " .. them.name .. "!")
end
if(msg == "touch") then
set_msg("That's my purse! I don't know you!")
end
end
end

Note that you must call coroutine.yield() inside your loop to pass control from your script back to the game engine. The set_msg(), move() and wait_for_message() functions automatically call coroutine.yield() for you. Also note that the Lua implementation is using a message queue, so you don’t have to worry about locking and unlocking your objects like you do with ZZT-OOP.

For a more complex example, I’ve rewritten the DremZZT Tutorial in Lua, which you can view here. You can compare it to the original ZZT-OOP code to get an idea of what the new functions do. You’ll also notice that Lua has full access to the TUIWindow class, so you’ll be able to use text entry fields, check boxes, etc. from inside your games.

The Lua interpreter and updated tutorial are in the svn trunk, however saved games containing Lua objects created on PowerPC Macs are not compatible with other platforms and vice versa, due to how that CPU stores data. This issue will be resolved eventually, but right now just don’t transfer saves between PowerPC Macs and the rest of the world 🙂 For information on checking out and building DreamZZT from svn, see Building DreamZZT from Source.