February 3rd, 2004
|01:06 pm - Pinball design|
Pinball design can be a lot of fun. I'm greatly enjoying Visual Pinball. Coding the backend is turning out to be a treat, too. Math has never been my strong suit, but I'm feeling so chuffed right about now about how I solved the problems I needed to solve. You're may not going to understand most of this, but I spent all morning on it so I'm gonna yammer about it cause the last time I checked, my name was on this LJ and not yours. Hoy!
OH AIN'T WE GOT FUN
Click for a big-ass picture of the playfield.
The game is called Abbie & Martha's Whizbang Gumball Factory. The original concept was created back in 2001 and the development has over three years of off-and-on tinkering as I learn VP's quirks and foibles and how to model ramps and stuff. The game's not as complicated as my other perpetual work-in-progress Cloverleaf, but it's providing its own challenges. This is the most recent whiteboard revision; it could very well be subject to change but I'm real happy with the way the ramps are now. (The left-ramp used to look like a spiral staircase, but the ball frequently got stuck in one of the spiral loops.) Thankfully some of the lessons I've learned with AbMarf (internal codename, ooooooooh) can be used in Cloverleaf, too -- most notably today's little addition.
The basic premise of the game is this: Those two lovable scamps, Abbie and Martha, have gotten themselves into the Whizbang Gumball Factory and are playing around with the brightly-colored gumballs! You have to work with and around them in order to produce brightly-colored gumballs and ship them off to parts unknown.
Abbie hides behind the big white bumper on the lower-left, and Martha hides up in the center of the playfield (her picture is on her hideout and everything.) Martha's got the best feature so far of the game -- two little black flippers reside in the hideout, and I've set up some special sensors that let the flippers come out and smack a ball if it's approaching the hideout. You know, cause kitties like playing with shiny things and stuff. Martha's reaction time can be tweaked to make it harder to shoot the hideout target, and she can be disabled temporarily if you start NAP mode. But I'm getting ahead of myself here.
The primary goal of the game is to hit the six colored standup targets in the game (or have the colors spotted for you), then shoot the Colorizer (left ramp) to give the ball a rich hue, and then shoot that completed ball through Quality Control and into the Shipping ramp (which will look like an 18-wheeler if I have my way with VP's modelling... eventually.) Repeat this process until all six colored gumballs are shipped, and then you get Gumball Mania Multiball! All six colored gumballs are put on the playfield, and you'll score jackpots by shooting either Abbie or Martha's hideout. The process starts all over once all six balls have been shot to hideouts or drained.
I know this may be laughable, but in essence, it's one of the simpler games out there once you figure out what to do.
Additionally, while you've got a red, yellow or blue gumball in play, all targets with that color count double (for both score and bonus.) So if you hit the red bumper or red standup with the red gumball, you get a little something extra. All red, yellow and blue targets also increase that color's special jackpot (you can see the beginning of the jackpot display on the right side of the screenshot.) During Gumball Mania, shooting a hideout with a red, yellow or blue gumball will score the appropriate jackpot value. All other balls score a 250,000 jackpot value. Plus there are ways to get a double or triple jackpot, but again, I'm getting ahead of myself here.
Today's lesson was learned when I was trying to figure out what to do with the Colorizer ramp. It's open all the time, but the "Colorizer" part is only active when you've lit up all six color lights. Any other time the ball loops around and is fed to the right flipper. So, taking a page from Pat Lawlor's design book, I decided to have the game keep track of how many times you've hit the Colorizer ramp loop, and provide you with rewards every few hits or so.
Seeing as how the point of the game is to light all the colors, I figured the reward would be "every few ramp shots, you get a color spotted." The problem is that the shot is a right flipper shot and the ball feeds back to the right flipper. You could very easily dominate the game by constantly shooting the ramp, and part of game balance is finding a way to prevent that, or at the very least, hinder it. So I decided that you'd get a reward for every 5 ramp shots. And there would also be two other rewards you'd get, in sequence (this is what Pat Lawlor and other good designers like to do; witness the Bear Kicks in The Addams Family or the Robots in Twilight Zone.) So at 5 ramp shots you'd have a color spotted, at 10 the value of the NAP Mode would increase, and at 15 you'd get an addition to your Bonus Multiplier (known as "X".) Then at 20, we'd spot another color, increase NAP at 25, and X at 30... you see where this is going.
Now there are several ways you could have the game keep track of what reward comes next. You could set up an array that represents what I said above ("At 5, spot color. At 10, increase Nap. At 15, increase X...") but that represents a finite amount of rewards. Say you stopped the array at 50. What happens when the player hits 55 ramp shots? Sure, it could happen. Not likely, but it could, and as a game designer you have to be prepared for any situation.
"Well, I'd tell the game if the count goes over 50, reset the array pointer and start all over again!" Why? That'd be arbitrary. And inelegant. It's a kludge, and I do too much kludging already. You want the game mechanics to operate and function on their own with as little coder-nudging as possible. In a sense, you want to set up a very rudimentary AI that knows where it's at and what to do next, all by itself. (Martha's flippers, a variant on the "Thing Flips" function of Addams Family, is an AI setup as well -- if you successfully get the ball by Martha's flippers too many times, her reaction time gets quicker. Frustrated kitty!)
So I basically decided the game would only have to keep track of one variable: The total number of times you've hit the ramp. And depending on how that number can be divided by 5 (the number of shots needed to trigger a reward) and how that result is divided by 3 (the number of rewards available), you can determine when the next reward is due, and what it'll be. (Okay, the reward possibilities are restored in an array, so technically there's two variables I have to keep track of, but I could have easily have done it with three if...then statements.)
A little late-night discussion on IRC helped me work out the equations needed. As I said before, math is so totally not my strong point, so when I finally got the game working and watched the rewards pile up as the ramp was hit, I was really fucking proud. There's that amazing sense of accomplishment you get when you take something on that you think may not be possible, only to hammer it out and figure it out and get some help and get it to work. That's just great.
(Of course, the next question is: What do you do if you've got a colored ball and shoot the ramp and the next reward is supposed to be a color light spotted? You have no need for that reward. I must think of something else that'd be beneficial to you, either a special jackpot increase or something, for such a case. Again, you gotta be prepared for every situation.)
But that's enough of that for now. I have to get some food soon before I fall over.
|Date:||February 4th, 2004 01:13 am (UTC)|| |
Visual pinball is nice and all (I remember Pinball Construction Set on my old Apple II - those were the days), but what about Railroad Tycoon 3
I got the demo of RT3 and played the heck out of it. Had a lot of fun, but they didn't include the sandbox mode so I couldn't create the Northern & Specific.
>>Now there are several ways you could have the game keep track of what reward comes next. You could set up an array that represents what I said above ("At 5, spot color. At 10, increase Nap. At 15, increase X...") but that represents a finite amount of rewards. Say you stopped the array at 50. What happens when the player hits 55 ramp shots? Sure, it could happen. Not likely, but it could, and as a game designer you have to be prepared for any situation. <<
4 Solutions come to mind;
1) Start running a simple "ramp = ______ point" with the blank being some undetermined value.
2) Do the Jurassic Park solution; if you hit the ramp a million times, have it charge up a multiball or some sort of massive series of actions (say, landing the ball in both cat's hideouts) for a huge payoff. Then restart the entire sequence after the bonus is awarded/time runs out.
3) Just have it restart altogether. You already ruled this out though.
4) Demand that, along with the various bonuses, that the ramp is hit periodically to keep the level up. Say, every 45-60 seconds, drop it a level (if you're using 5 ramp shots as your determinator for each level, than it'll fall that many). So, if someone wants to keep the bonuses high while alternately hitting the various jackpots, they're gonna have to work their asses off.
>>(Of course, the next question is: What do you do if you've got a colored ball and shoot the ramp and the next reward is supposed to be a color light spotted? You have no need for that reward. I must think of something else that'd be beneficial to you, either a special jackpot increase or something, for such a case. Again, you gotta be prepared for every situation.)<<
Do you have colored balls in addition to the regular silver ones as "bonus" balls or the like? I missed this.