Jan 20 2008

Game in a Week #2 begins

Tag: #2: The Muncher's Labyrinth,Game in a Weektrevor @ 11:15 pm

CowWell, I’ve had a week of vacation, and suddenly I’m feeling the pressure to do another “Game in a Week”. Like last time, I’m selecting the topic immediately before going to bed (early night tonight!), and will finish by midnight on Sunday.

Today’s book is “Which Lie Did I Tell: More Adventures in the Screen Trade”, by William Goldman. It’s a paperback edition published by Vintage Books in 2001. A friend loaned me his copy of this book and I enjoyed it so much that I bought my own copy — this one — solely so that I could loan it out to other friends. But it’s not out on loan right now, and I randomly opened the book to page 324, where the first sentence completely on the page is:

Still just a bunch of munchers.

(It’s actually part of a ‘CUT TO’ direction in an example screenplay fragment, and is referring to a herd of cows which aren’t actually doing much of anything)

Initial reaction is that it’s suggesting a Pac-Man sort of game. But that’s probably too obvious, and somebody’s already made Pac-Man. Maybe I can take the context of the quote and do something about cows. Or even focus on the word “bunch”, and do something involving a flock or swarm of something. Or maybe all of the above.

In any case, I’ll start on a real design tomorrow after work. :)


Jan 20 2008

Filled-color vector sprites

Tag: Engine,VectorStormtrevor @ 11:58 am

Color-filled asteroidWow, that went a lot faster than I expected. I finished all of the tasks I laid myself in the last post, and so VectorStorm can now lay down areas of color by using a combination of a VertexArray command to specify vertices, and a TriangleStrip or TriangleFan command, specifying the order in which to use the vertices.

In this case, I’m using a TriangleFan to fill the asteroid, and a LineStrip to outline it. And it looks even better than I’d been hoping. I feel reassured that this isn’t going contrary to the “vector graphic” aesthetic; it’s just taking the overall look further along in the same direction it was already going.


Jan 19 2008

VectorStorm… to the future!

Tag: Engine,VectorStormtrevor @ 12:36 pm

VectorStorm is already a somewhat idealised version of vector graphics.  That is, it’s taking the principles behind real-world classic vector graphics hardware, and is pushing a little beyond what ever actually existed.

For example, VectorStorm supports hardware-accelerated transformations.  It allows blending between two different colors along the length of a vector.  And it supports rendering ‘points’, which are not lines at all.  No real vector graphics system (at least, that I’m aware of) has actually supported these features.

So I’m thinking about going further with it, based on the things I wanted to be able to do in Damsel, but couldn’t. And first among these is the ability to lay down solid areas of color, rather than solely lines.  This would have helped distinguish between grass and road, without the need to draw huge outlines, which are functional but not particularly attractive.

In order to lay down areas of color, I’ll need to add a way to draw filled triangles.  (Do I want to make them opaque triangles, like in normal 3D games, or should I stick with additive, as in traditional vector graphics?  Opaque lets you use a lot more techniques, such as layering.. and you’d be able to easily do things like have asteroids block the stars in the background, by filling it with black triangles.. but additive is more accurate to the methods used to actually draw on a vector-style screen.  Will need to consider this)

To implement triangle rendering, I’ll need to take a few steps.

  1. Need to extend fsFile to be able to cope with multiple-line commands, instead of requiring each command to fit onto a single line.
  2. Using these multi-line commands, extend the vsDisplayList to also accept vertex arrays and then implement indexed vector rendering commands referencing those vertex arrays (“MoveToIndex”, “LineToIndex”, etc.)
  3. Update fsFile to be able to cope with variable-length commands, instead of requiring a fixed number of arguments for each command.
  4. Use the variable length commands to add a new vsDisplayList command: “LineStrip i1 i2 i3 i4…”.  This will let me remove a lot of optimisations from the vsDisplayList rendering of ‘MoveTo’ and ‘LineTo’ functions, by defining explicit strips directly in the data files.
  5. With all of the above working and in place, add triangle rendering commands referencing the same vertex arrays (“Triangle i1 i2 i3″, “TriangleStrip i1 i2 i3 i4…”, “TriangleFan i1 i2 i3 i4…”,  etc)

So I’ll be poking with this stuff for the next couple of days.  I’m hoping to have it all working by sometime early next week, though I only have limited time to work on it.  Guess we’ll see how I go!  :)


Jan 17 2008

Petition Damsel Post-Mortem

Tag: #1: Petition Damsel,Game in a Weektrevor @ 9:35 pm

So it’s been a couple days since I finished Petition Damsel and posted it on the site (For the few folks who have been having troubles with the Win32 binary package; I’m pretty sure that version 1.0.1.1 has finally fixed the “incorrect configuration” problem).

I’ve had some time away from Damsel, I’ve played partway through Moai Better Blues, and a little of I Wanna Be the Guy (I’ve made it about two thirds of the way through the second screen; took me well over an hour!), and so at this point, I think I’m far enough away from the whole experience that I can begin to evaluate how it went.

So without further ado:

What went right

  • Using VectorStorm: With VectorStorm as a basis for the project, I could really jump right in and implement game concepts very quickly. It gave me support for changing screen resolutions, visual quality, volume levels, and all sorts of other “Quality of Life” stuff that I never would have had time to implement within the week, if I had started from scratch. It also meant that I could blatantly rip off code that I’d already written, such as the UI that I wrote for my ‘Asteroids’ clone in VectorStorm.
  • No code Monday&Tuesday: Restricting myself from doing any coding on Monday and Tuesday meant that I could really focus on getting the design right, rather than risk coding myself into a dead end.
  • Good quality music: I love Magnatune. Seems like whenever I need music for a project, I can find exactly what I need there. In this case, the new album from Ehren Starks had exactly the moody piano music I wanted for the introductory quote reveal. Finding a suitably manic piece to move into was much harder, until I happened to bump into a piece by the Napolean Blown Aparts which I’d heard a year or two back, and which turned out to be just what I needed. I’ve bought an awful lot of music from Magnatune over the years, and their licensing allows me to use their music in noncommercial projects. So in my book, they rock. :)

What went wrong

  • Using VectorStorm: I don’t know that VectorStorm was really the right choice for this type of game. Vector graphics have a kind of old-school cred, but they also tend to feel a little serious, where I was trying for a more lighthearted, slightly madcap feeling for this game, and I feel like the vector graphics took away from that.
  • No code Monday&Tuesday: In practice, the best parts of the design only occurred to me after I started implementing the game; they were triggered by actually playing the game. Having the playable version actually helped the design process.
  • Difficulty of creating sprites: I hadn’t run into this before because I had never created a vector sprite more complicated than the ship from ‘Asteroids’, but it’s actually really difficult to create vector sprites as complicated as the Petition Damsel for the VectorStorm library; I basically had to draw them freehand on graph paper, and then transcribe points manually. Next time I do something like this, I want to have a vector sprite editor tool which will let me design these objects interactively.
  • First playable very late: My “first playable” version of Damsel wasn’t ready until Sunday morning; only about twelve hours from the final deadline. I really should have had that on Thursday, so that I’d have had time to tune the gameplay, instead of having to release whatever I happened to implement in the final hours of Sunday, with no time to experiment with variations. Next time, perhaps I’ll start coding on Tuesday, and hopefully have a first playable much earlier.
  • Overambitious design: The design I had at the end of the design period was far, far beyond what I could actually realistically achieve within the remainder of the week, and was radically cut down at the last minute on Sunday. In the future, I need to generate far simpler designs from the outset!

So there we go. All told, I’m extremely pleased (and was rather shocked) at how well Damsel turned out, bearing in mind all the troubles I ran into along the way. It literally came together during during the last nine hours of the week-long deadline, as I was trying to write out all the bits of design that I simply didn’t have time to implement.

I’m going to address a bunch of these issues before or during the next ‘Game in a Week’. I’m currently hoping to start the next one in a couple weeks. Gives me some time to write that vector sprite editor, first. :)


Jan 13 2008

Petition Damsel, done!

Tag: #1: Petition Damsel,Game in a Weektrevor @ 9:29 pm

Phew. Well, it’s three hours before the deadline, and I’ve finally finished.

So what are you waiting for? Petition Damsel is over there in the righthand column, under ‘Get Games’. There are Win32 and OSX builds right now. Once I’ve had some sleep, I’ll upload a snapshot of the source code so that Linux and other folks can build it for themselves.

I’m really interested to hear what people think of it. Positive, negative, whatever; I’d like to hear people’s thoughts; put comments over on the Petition Damsel download page.


« Previous PageNext Page »