DCSquares: GOAT Games Edition

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.

Random Stats

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.

Players by platform

* Windows: 55%
* Mac: 43%
* Linux: 2%
* Dreamcast: 0% (only 23 scores ever submitted for Dreamcast)

Hall of fame:

* Highest score: Harryfronman scored 677,472 points
* Highest combo: captain collected 354 squares in a row
* Most squares: Harryfronman collected 731 squares
* Longest time: jason survived for 16:47 minutes

Hall of shame:

* Lowest score: runkennyrun scored 1,000 points (scores below 1,000 are rejected)
* Shortest time: Baphmomet survived for 2.3 seconds

16 players only collected 1 square but managed to score more than 1000 points.
99% of players use the in-game score client, only 1% of scores were entered through the web.

DCSquares Jewel Cases

I received a request to produce another one of the DCSquares jewel case / booklet sets that were available at the East Coast Gaming Expo.

If I do put together a few more of them, is anyone else interested in one?

Blogged with Flock

SuperZZT support

I added basic SuperZZT support to DreamZZT:

Most of the SuperZZT-specific objects aren’t supported yet, but game files will load and SuperZZT water and floors are supported. More to come!

DreamZZT Lite

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.

Let me know if it does / doesn’t work on your systems.

DCSquares Facebook Application

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.

Lua 5.0 in DreamZZT

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.

Here’s a simple example of using Lua from within DreamZZT:

@Luatest
#become lua
function main()
wait_for_message("touch")
set_msg("Here, the player, have some health")
zzt.status.give_health(20)
end

And a more advanced example that handles more than one message:

@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.

DreamZZT 3.0.8

DreamZZT 3.0.8 is released!

Downloads

New Features

  • Sound support for Dreamcast
  • Support STK-colored torches, ammo, energizers
  • Uses system clock for improved game timing
  • Game speed and volume can be adjusted from title screen
  • Integration with the Trac ticket system for in-game bug reports
  • Optimized rendering to improve performance
  • Mission:Enigma is now completable
  • Auto-update support for Windows

Bug Fixes

  • Centipede segments harm player (#23)
  • Centipedes could become disconnected if shot by an enemy (#27)
  • Board transitions may not work properly after saving (#39)
  • Change object search order to match ZZT (#13)
  • Support stat-less objects (#29)
  • Handle backspace key in debug console
  • ZZT-OOP objects could still receive messages when locked (#48)