====================================================================== Big Dice Games Presents: Woody Tigerbaum's Twisted Marble Factory ====================================================================== ------------------------------------------------------------ A Journal of Developing a Game in a Week for PyWeek5 ------------------------------------------------------------ :Author: Dave LeCompte :Contact: pyweek at bigdicegames dot com .. contents:: Saturday, September 1st, 2007. 9:00 AM ------------------------------------------------------------ There are five candidate themes announced - I'm not entirely excited by any of them. - Twinkle - Turmoil - Ticking - Twisted - Tyger, Tyger I have an idea I like for "Twisted", but it doesn't really fit the other themes very well. I've got an idea I'm lukewarm on that could fit "turmoil" or "ticking", but it relies on art ability that I don't really have. Another idea might work for "twinkle", or maybe for "Tyger, Tyger". Saturday, September 1st, 2007. 12:30 PM ------------------------------------------------------------ I've gone to the store to stock up on snack-ish foods. I've printed out a PDF of Ken Perlin's noise_ function (the "Improving Noise" one, which claims a 10% performance improvement and some other niceties). My favorite game idea so far is the "tubes" design (which I'll describe later). I have come up with the following ways to tie it in to some of the themes - Twisted This one's easy: the basic mechanism for playing the game is to twist the tubes. - Twinkle A stretch: The balls are made out of twinkleonium - Ticking A cop-out: there's a countdown clock that's always ticking. - Tyger, Tyger: Another cop-out: You have the opportunity to play as Tyger Blake. Come to think of it, an identical cop-out would work with "Tess Turmoil" to bring in the fifth theme. - Turmoil: As I noted above, I can totally cop out and use the various themes as character names. Alternately, I can use the same stretch as 'Twinkle', above, for 'Turmoil'; a ball that does bad things if you catch it. .. _noise: http://mrl.nyu.edu/~perlin/paper445.pdf Saturday, September 1st, 2007. 5:00 PM : CONTEST STARTS ------------------------------------------------------------ The theme is TWISTED! I am totally stoked; that's the theme that gave me the idea I most wanted to work on. Basic idea: balls are moving from the top of the screen to the bottom of the screen in tubes. You can twist the tubes (sort of like braiding). At the bottom of the screen, there are bins with labels (RED: 5 GREEN: 2) - your goal is to fill the tubs with the correct number of balls in the time allotted. Saturday, September 1st, 2007. 6:37 PM : First Runnable ------------------------------------------------------------ I sketched out a rough layout of the basic playfield. I put it into a basic OpenGL draw loop, and took a screenshot of the app. I wanted to upload it to the PyWeek website, but there's an error with the database, I guess. .. image:: ScreenShots/07-09-01-firstWindow.png :width: 4in :align: center Saturday, September 1st, 2007. 9:00 PM : Feeling Sleepy ------------------------------------------------------------ I made some sketchy drawings of tubes and balls. I've got some minimal code to show balls moving, as though through the tubes - the tubes don't animate - it'd be cool if they did. I grabbed this screenshot: .. image:: ScreenShots/07-09-01-ballsAndTubes.png :width: 4in :align: center I need to reorganize the code substantially in the morning and rewrite much of what I've just written. Some stuff to shoot for in the morning: - balls following twists in the tubes - bins for balls to fall into - player input to twist and untwist tubes - bins go away when "satisfied" I'm hoping I can get all that done by noon - if so, I'll have "first playable" less than 24 hours into the contest. Sunday, September 2n, 2007. 10:30 AM : Balls Following Tubes ------------------------------------------------------------ Last night, around 11:30, I wrote some code to generate "candy cane" tube art. This morning, I rewrote a lot of the logic I was hacking together yesterday. There's now a "board" class, which contains a lot of "logic pieces" (e.g. "straight tube" or "twisted tube"). The logic piece controls the movement of the balls, and handles the drawing of the balls. When a ball exits one logic piece, the piece reaches up to the board to find the neighbor logic piece, and hands the ball off to the neighbor. Sunday, September 2nd, 2007. 7:00 PM : First Playable ------------------------------------------------------------ After getting the balls to follow tubes, I took a break for lunch and brainstormed some additional "logic pieces", like: - a hopper that collects balls until it has 3, then spit them out in rapid succession - a paint shop box - balls exit a different color than they came in - carousel - 2 inputs, 2 outputs, balls randomly pick an exit - cloner - 2 inputs, 2 outputs - one ball enters, two balls leave - teleporter pods (transporter pads) - cross the level quickly - cage match - 2 balls enter, one ball leaves After coming back from lunch, I implemented the pipe-twisting code, and was pleasantly surprised how enjoyable it is to push marbles around. I made some jokes in IRC about "losing my marbles" - certain configurations would allow marbles to disappear. I cleaned those bugs up, and moved on. I googled "Wood Photoshop Tutorial" and found http://www.myjanee.com/tuts/wood/wood.htm which allowed me to make a passable pine texture. I proceeded to make a simple crate texture, which didn't satisfy the folks in IRC, so I took another pass at it. Lesson learned - the 2 minute version might be just barely functional, but the 10 minute version is well worth the investment of 8 minutes. I went on to do the tedious work of create the shipping label textures. They don't look great right now - they definitely need a second pass, as per the lesson above. I added in the logic to have the balls reduce the value of the crates requirements and the game was playable. I was surprised that at its simple level, the game's actually engaging to the point that I enjoy clicking and moving the balls around - I may not need to add in all the gadgets I came up with, above. I made a ZIP of the game in this state, and people have suggested a few improvements: - The tubes make it a little hard to see the balls - The balls could be a little spread out - at the moment they come in waves - Perhaps start off with less boxes/tubes? - It would be nice to have some visual indication for where you can click to twist the tubes. (The cursor snapping doesn't work well enough IMHO.) I'm considering each of these - I definitely planned to have easier levels; the current game is perhaps a 7 or 8 on a difficulty scale from 1 to 10, which is a pretty nice spot to start tuning from - I can make the game a little harder to reach my "difficult" setting, and pull it back a lot for the tutorial and introductory levels. Monday, September 3rd, 2007. 10:00 AM : Polish Begins ------------------------------------------------------------ Some of the things I want to tackle, in no particular order: - Fix FSMMgr focus dump - Main Menu - Options Menu - Pause Menu - Py2EXE for testers - fix bunching up (per feedback) - brass rings at twist locations (per feedback) - intro slide show ("Hi, I'm Woody Tigerbaum!") - Sounds: end-of-shift whistle, good "plonk", bad "clunk", twist sound - music: something inspired by "powerhouse". Should be low intensity, building over time (use MeatEngine.MoodMusic) - Tutorial - Playable (unlockable?) characters Monday, September 3rd, 2007. 7:00 PM : Lazy Day ------------------------------------------------------------ I didn't get much done today. Some things I did work on, though: - Py2EXE - brass rings - transparent tubes - music - cheat button (press '1', and a white ball falls in the leftmost crate) Py2EXE seems like it's still causing the Skellington harness problems, so I ended up getting rid of the Skellington-enforced structure. Sorry, Richard. Brass Rings: Per the feedback (above), I wanted to add additional gizmos to both sell the vaguely Victorian-era theme of the game, plus give the users a reference to know where to click. This ended up not being terribly hard to add in, and I think it works: .. image:: ScreenShots/07-09-03-02-transparent-pipes.png :width: 4in :align: center Transparent Tubes: also in the above figure, you may be able to make out that the tubes are now made up of alternating stripes of 90% opacity and 0% opacity. (Contrast with earlier, which had 100% and 0%.) If you can't see it, it's all right - the effect is much stronger ingame, with the balls moving. I think this addresses the complaint that the balls aren't very visible in the tubes. Music: I fiddled for far too long today inside FL Studio (which I first came to know as Fruity Loops). I came up with a piece of music that is kind of fun to listen to. Actually, I have two related pieces of music, one at 140bpm, which is my base music, and an additional piece at 150bpm that has some synthesized voices saying "twisted", "tubes", and "it is not a truck". (Thank you, Senator Stevens for inspiration!) I'll probably just alternate between the two pieces so that people can hear them both. Cheat Button: I wanted to skip ahead to the end of the level, so I added in a button to drop a white ball in the first crate. This isn't much, but it helps. Monday, September 3rd, 2007. 10:30 PM : Small Progress ------------------------------------------------------------ Ok, I added in some logic to keep the balls from bunching up on the screen. The new behavior is that each board has a maximum number of balls on the screen at once, and won't try to launch a new ball until a calculated length of time has gone by and the balls are below the maximum (the combination spreads the balls out and doesn't cause an initial slam when the board is empty). Also, the balls are drawn from a weighted probability pool. This allows for some customization of each board. To recap what remains: - Main Menu - Options Menu - Pause Menu - Credits Screen - intro slide show ("Hi, I'm Woody Tigerbaum!") - Sounds: end-of-shift whistle, good "plonk", bad "clunk", twist sound - music: need to hook up my music - Tutorial - Playable (unlockable?) characters - Initialize boards based on level descriptions - crates should slowly exit the screen Wednesday, September 5th, 2007. 7:00 PM: Where Was I? ------------------------------------------------------------ I spent a great deal of time yesterday doing fluffy stuff I can't even remember. I put out a call to get some help with color-blindess issues, and I was pointed at a website that filters a webpage to help you sort of see it through the eyes of a color-blind person. I need to create some textures for that. I made art for the intro screen, including a factory in Google SketchUp, and reworking the package art from PyWeek4. I integrated my FSM manager code, which allowed me to hook the main menu in to the game, and the intro into the main menu. Oh, I recorded the intro pitch. "Hi, I'm Woody Tigerbaum!" Around midnight, I decided to go to bed. And then I came right back and made a sketchy (heh) picture of Tess Turmoil. I think it'll do OK, especially since she's only going to be about 150 pixels high on the screen. Of the stuff above, what did I get done? - Main Menu: pretty much functional - probably want to rework the button art. - Intro Slide Show - need to rework the portrait of Woody. - Music - hooked up, could opt to prefer the "normal" music over the "dance" music. - playable characters - this will just be a mission selection thing. - initialize boards based on level descriptions - done Stuff that remains (in part, cut and pasted from LiveJournal, so forgive the duplication): - lose conditions : right now, you can beat a level, but you can't lose. I intend to add in an error counter and a clock. The trick will be to choose penalties that make the game challenging, but not too hard. - level design : my levels are pretty simple, and I have designed 4 so far - cranking out 16 should be easy - level select screen : it's user-hostile right now. - pause menu : when switching away from the screen, a menu should pop up to say the game's been paused. Put a "keyboard help" option here. Ditch the current level, quit the game. - level introductions : just little dialog boxes with flavor text, also will be the bulk of the tutorial. Do these as memos - Tim is on a notepad, Tyger is on legal paper, Tess is on graph paper, Woody is on letterhead. - sounds : the game's got music, but no sounds. Should be easy, just gotta do it. Need: whistle, plonk, clonk. - voices : each character needs 'emotes'. I have volunteers for several of the characters. - colorblindness patterns - character portraiture - My "Woody Tigerbaum" portrait needs to be reworked. I've got a "Tess Turmoil" sketch that I plan to use. I also need to make a "Tutorial Tim" and "Tyger Blake" portrait. Almost as though I were an artist. - Options Menu : maybe not - I can put the options on keys - Credits Screen - Sounds: end-of-shift whistle, good "plonk", bad "clunk", twist sound - Tutorial - crates should slowly exit the screen Wednesday, September 5th, 2007. 11:15 PM: Must Sleep ------------------------------------------------------------ I got the lose conditions in. I got a bunch of sounds in. Some of the levels are impossible. The level-select screen draws portraits - I need to finish the portraits. I got a set of voice emotes for "Tutorial Tim". Time to sleep. Thu, September 5th, 2007. 10:00 PM: The Clock is my Enemy ------------------------------------------------------------ I did an estimate of how much time I have before the final upload is due, and it was something like 20 available hours of work. That's scary. I could easily use 30 hours for all the art and tweaking I need to do. To do list, copied down from LJ: - continue adjusting level design - many levels are impossible (including at least one with no pipes leading to a crate) - pause menu - should be quick, buttons exist, just a matter of doing it - level intros - don't know if I'll have time for the fun intros I wanted to do - level outros - same - voices - I'm getting voices from friends (thanks!), need to incorporate them. - record "woody" voices. I laid claim to Woody's voiceover, so I had better do it. - colorblind patterns - still - character portraits - this could take a while, and end up not looking good. - credits screen - this could be the last thing I do - tutorial - this will tie into the level intros. I jotted down notes of the 4 lessons taught in the 4 tutorial levels. Nothing too fancy, no real logic, just a quick note for each. - crates exiting screen - small bit of coding, nothing fancy. - keyboard options support - should toggle certain options using the keyboard, like colorblind assistance, music, sound, and mouse inversion. - unlockable mission screen? - could be fun, but for PyWeek judging, might just piss people off if I don't provide a cheat. - balls pneumatically going up the right side of the screen - needs art, needs logic - bag with no replacements color distribution method - small benefit to the player - crate voting ball generation location method - would be very noticable to the player Colophon ------------------------------------------------------------ This document was authored in ReStructured Text, and converted to more interesting forms using The DocUtils_/ReST_ package. - to generate HTML rst2html.py devlog.txt devlog.html - to generate PDF rst2latex --documentoptions=12pt,letterpaper devlog.txt devlog.tex pdflatex devlog.tex .. _DocUtils: http://docutils.sourceforge.net/ .. _ReST: http://docutils.sourceforge.net/rst.html