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.


Jan 13 2008

Game in a Week, T minus 9 hours

Tag: #1: Petition Damsel, Game in a Weektrevor @ 3:07 pm

Three hours on, here’s where I’m at:

  • Fixed a bunch of gameplay bugs, a few of them causing spectacular crashes (but these were all the usual corner-cases where you expect to find crashes.. respawning after dying while in the middle of using a petition was one of these, for example).
  • Tuned time bonuses so that individual games now tend to last about two to three minutes for me. I’m sure that if you went in really trying to play as long as possible, rather than just having fun, that you could probably play infinitely. But I don’t really have time to do proper play tuning and difficulty ramping for a release tonight, and I don’t want the game to be too difficult for first-time players. So I’m erring on the side of ‘accessible’.
  • “How to Play” screen implemented. I like it a lot, even if the code is shocking. I’m going to have to put an apology in the file, when I release the code.
  • Adjusted VectorStorm’s initial resolution selection code (for the very first run only). VectorStorm now tries to initialise a resolution of 800×600, instead of choosing the smallest supported fullscreen resolution. If the current hardware doesn’t support 800×600, it will choose the next smallest resolution supported. If nothing under 800×600 is supported, then it will choose the smallest resolution that is supported. The resolution can still be changed from the options screen.
  • Added a “back” option from the options screen, so people don’t have to guess the ‘q’ keymapping.

Stuff that remains to be done:

  • Custom graphics for three different characters
  • Polish title screen
  • Sound effects
  • As much gameplay tuning as I can manage.

Jan 13 2008

Game in a Week, Day 6.25: First playable

Tag: #1: Petition Damsel, Game in a Weektrevor @ 11:47 am

Not going to spend too much time writing here, but.. this game was definitely overcomplicated for what I can comfortably design and build in a week. With only twelve hours to go, I finally have my first fully playable version of Damsel with all gameplay elements in place.

Stuff remaining to do, in approximate order of importance:

  • A “How to Play” screen.
  • Tune time rewards for actions taken.
  • Add a few new graphics. (I’ve reused colored versions of a few sprites for very different purposes right now)
  • Find and integrate sound effects.
  • Make binary builds.

Jan 12 2008

Things I have learned

Tag: #1: Petition Damsel, Game in a Week, General lifetrevor @ 6:02 pm

I have serious trouble typing the word “petition” at speed. It keeps coming out as “peitition”. Writing it on paper isn’t a problem. Investigating other words with repeated sound patterns, I found that “Banana” reliably comes out as “Banena”, and “Pinocchio” as “Pinocchiao”.

The only conclusion I can draw from this experiment is that my mind is really good at inventing creative means of procrastination, when I really should be programming.


Jan 11 2008

Game in a Week, Day 5

Tag: #1: Petition Damsel, Game in a Weektrevor @ 11:17 pm

Screengrab from Day 5.  Believe it or not, this shows approximately the same state of play as the shot from Day 4.Another day of not quite achieving the goals I set out for myself. I still don’t have a fully playable game prototype, but the scene is now much more recognisable than it was yesterday. It’s amazing how just a few vectors can give a scene some context.

I ended up not having as much time to program today as I had hoped, again due to a combination of illness and unpleasant weather. But I’m still generally pleased with how much I got done today, under the conditions. And I’m still pretty confident about having Damsel wrapped up on Sunday (though I would have liked an extra day to polish the gameplay)

Stuff that has taken longer than I expected: Finding an appropriate size for characters relative to the level graphics, while still making characters vaguely recognisable and having a nicely sized level to work within. Navigation AI for the AI characters, to keep them walking along the edge of the street. And, of course, general design. I’d originally allocated the first two days to nail down the game design, but I’m still tweaking with it now as I’m implementing it, trying to make the game more compelling. (The four-way intersection, for example, is a design modification that I made today; the game was set in a parking lot, yesterday).

I’ll probably start showing off bits of actual gameplay tomorrow. Very close to having everything I need in place to turn it into an actual game. :) And of course, there are still lots and lots of graphics left to create. But it’s coming together. So overall mood: missing every deadline I set myself, but I still think I’ll finish on time.


Jan 11 2008

Game in a Week, Day 4

Tag: #1: Petition Damsel, Game in a Weektrevor @ 12:45 am

Snap from day four of DamselIt’s late. It’s been extremely hot today. It’s half past midnight as I write this, and it’s still far too hot to sleep. Or for that matter, to really be very good at coding.

I really wanted to get a playable Damsel prototype working today, but I’ve simply been unable to focus. Oh well; at least I made some progress, still! The shot above is a partial screengrab of the current state of play. The red rectangle represents the player, the blue rectangles represent other game objects. They’ll all be replaced with other graphics, eventually; probably Saturday. And the eagle-eyed among you will have noticed the score display that i’ve blatantly copy and pasted out of the Asteroids sample game from VectorStorm.

At this moment, the game does respond to player controls, but you can’t yet really play the game; no scoring is implemented, and very few actual gameplay functions are in place. But at least all the major types of gameplay objects are there, and it’s just a matter of wiring up all their functionality. With any luck, I’ll be able to make up for lost time tomorrow, and get my full gameplay prototype implemented.


« Previous PageNext Page »