Wednesday, July 11, 2007

Intuition's Slalom - A Scratch Game

play Intuition's SlalomOn Monday, I discovered a Web 2.0 online community website called Scratch. It looks like one of those sweet MIT experiment project things. You can download the Scratch application, do what is the equivalent of programming with Lego pieces, and post your creation - which would likely be a game or animation - on the Scratch community website for people to look at. I think it's a fantastic way to bring programming to the masses. So I was inspired to make a game.

I've had this idea for a while. The game is called Slalom. You have an avatar, and you must move the avatar to one side of a falling object. The side you want to be on is toward the word that corresponds to the color of the falling object itself. For example, you have to move to the right side of a red falling object if the word "red" is on the right.

The challenge of the game lies in the fact that the words switch sides and eventually switch colors. So the word "red" might be on the left but might be the color blue. You need to be on the left side of the red ball even though the text is the color blue. The little mind puzzle has been around for a long time - psychologists would often do this to mess with people. Recently, this kind of puzzle was used in the Nintendo DS game Brain Training.

Overall, the game took me just a couple days to make. It would have been quite a bit faster, but the Scratch application needs some work in my opinion. It's not object oriented, so you have to workaround ways to get values out of the objects. What really needs to happen is that Adobe needs to make a version of this app that sits on Flash. If they managed that, they would start yet another revolution.

Play the game here and let us know what you think.

Clocky! and other recipes for indie dev survival


How do you actually wake up, instead of waking up every 9-10 minutes to throw your arm at the over-sized snooze button of your oil-burning alarm clock? This is the answer, and of course it's in the form of a robot. Damned robots. If DaVinci went polyphasic then maybe this is the way to do it.

While we're off the subject of anything actually involving game development, or the gaming industry, I've decided to share a recipe, that also help you and I survive, just as Clocky hopefully will. I usually cook in large quantities which make for a good amount of leftovers that I can reheat whenever I want while I am at work. This is one of my old stand-bys that I learned from my very good friend, Shyam.

Red Curry Beans

1 can of black beans
1 bag of frozen stir fry vegetables (use fresh vegetables if you live on the edge)
1/4+ cup peanut oil (vegetable or any oil will work, but peanut tastes best)
1-3 Tbs red curry paste (personally i use Mae Ploy, it's delicious)
3-5 cups of rice (i buy short-grain rice in bulk to save money, $20 for 25 lbs.)


Firstly, if you do have fresh vegetables, I advise you to use at least one or two tomatoes, along with an onion and a green pepper. If you just have the bag of frozen vegetables, that will work, however the final result of the bean curry won't be as soupy, which will not penetrate the rice as much.

Chop, cut or throw your vegetables into the pan (onion first, then green pepper, then tomatoes) with a tablespoon or two of peanut oil and saute on medium. This isn't low in fat, I use a lot of fat when I cook because it tastes better and works for this recipe in particular. Once the onions are translucent or the vegetables are nice and sauteed, add in 1 tablespoon of red curry paste, and mix with the remaining oil in the pan. This should dissolve and season all of the vegetables mildly. If you want it stronger this is the time to add more, tasting as you go.

After you're happy with the amount of heat, keep the vegetables cooking, we want them cooked through pretty well so this will eventually turn into a thick chili-type consistency. Now thoroughly drain the black beans and add them to the pan. Next mix the beans and vegetables together and spead on a piece of bread, cracker or spoonful of rice to taste. If the spice isn't up to snuff, you can add more red curry paste here.

I usually let this cook down on medium-low for a good bit, allowing the heat to breakdown the vegetables and the beans enough to become one substance. Store this in your fridge until you re-heat and serve on top of rice, or any carbohydrate you have around for a well balanced snack or meal. This also works really well for a tortilla chip dip.

Tuesday, July 10, 2007

Bouncing balls... and cubes?

A few weeks ago, I was getting antsy and wanted to redo intuition's web page with some sleek looking CSS, a web 2.0ey PHP backend and a Flash navigation interface. This might still happen, but not in the near future as we have other priorities... like making games. But around that time, I decided to give actionscript 2.0 the good ol' college try and with the help of the book I posted about on Friday.

While this isn't all the functionality I wanted with this little do-dad, I am pretty happy with the results, and with what I've learned by doing it.

Firstly, is the problem with rotating movie clips in flash. During the later stages, I wanted to be able to scale the movie clip to any size I want, and then subtract a relative value from the global variable: gBOTTOM in order to adjust the world bounds accordingaly, however the problem I encountered can be seen in the .swf below. Also note the jumpy bug was something I didn't care to fix since it wasn't part of the end goal.



While the movie clips in the above .swf are not circles, but cubes, the behavior is the same since the bounding boxes are always rectilinear, no matter what shape lies inside. While it sort of makes for a neat animation of squares, I wanted circles, so the code looked something like this in order to get the radius of each circles.

//ROLLING CUBE BOUNDS

if (this._y >= gBOTTOM - this._height/2) //bouncing upwards bounding relative to size
{
this._y = gBOTTOM - this._height/2;
this.ySpeed = (-this.ySpeed)/2.22;
}



This really didn't work, since the resting point was so sporadic, the circles didn't seem to hit the ground most of the time, but rather float. In this case, I conceded what may have been a victory and reverted my code back to using constant bounds for constant sizes of balls.



Next for this would be collision (and reaction) of all and any balls, and Mike, who has been helping me throughout this, mapped out what that would take, and it looks terrifying. While adding collision detection and reaction to this would be stunning, I think I may tackle that once I get at least some OOP experience under my belt.

Meanwhile here is the code for the entire rollingcubes.swf heavily edited from it's original form as the first lesson in Chapter 10 of the book I'm using from Friends of Ed "Foundation Actionscript for Flash 8." The code all lies on frame 1 of the .fla and if enough people want the .fla I'd be happy to post it, however I doubt this will arouse much interest.


//BOUNCING BALLS SANS COLLISION

function mover():Void
{
this._x += this.xSpeed;
this._y += this.ySpeed;

if (this._x < wall =" 1.22" _x =" gLEFT;" xspeed =" -this.xSpeed/1.22;"> gRIGHT) //bouncing off right wall = 1.22
{
this._x = gRIGHT;
this.xSpeed = -this.xSpeed/1.22;
}
if (this._y < gravity =" 3">= gBOTTOM - this._height/2) //bouncing upwards
{
this._y = gBOTTOM - this._height/2;
this.ySpeed = (-this.ySpeed)/2.22;
}
if ((this.ySpeed <= 2) && (this.ySpeed >= -2)) //clamping the vertical movement
{
this.ySpeed = 0;
this.stop();
}
if (this.xSpeed < -0.5) //friction on leftward movement
{
this.xSpeed += 0.5;
}
if (this.xSpeed > 0.5) //friction on leftward movement
{
this.xSpeed -= 0.5;
}
if ((this.xSpeed >= -0.5) && (this.xSpeed <= 0.5)) //clamping the horizontal movement
{
this.xSpeed = 0;
}
if (this.pressState == 1) //stop everything while pressing
{
this.ySpeed = 0;
this.XSpeed = 0;
this.lastX = this._x;
this.lastY = this._y;
this.stop();
}
if (this.pressState == 2) //link the rotation with the horizontal speed
{
this._rotation += this.xSpeed;
}
}

function dragster():Void //use on press, drag the balls around
{
this.pressState = 1;
this.startDrag();
}

function dragsterOff():Void //use on release, vectors for launching the balls
{
this.pressState = 2;
this.stopDrag();
this.xSpeed = (this._x - this.lastX)/3;
this.ySpeed = (this._y - this.lastY)/3;
this.play();
}

//WORLD BOUND CONSTANTS & STATES
_global.gLEFT = 83;
_global.gRIGHT = 550;
_global.gTOP = 5;
_global.gBOTTOM = 400;
_global.pressState = 0;

//apply event handlers to movieclip instances on the stage
bigBall.onEnterFrame = mover;
bigBall.onPress = dragster;
bigBall.onRelease = dragsterOff;
bigBall.onReleaseOutside = dragsterOff;
medBall.onEnterFrame = mover;
medBall.onPress = dragster;
medBall.onRelease = dragsterOff;
medBall.onReleaseOutside = dragsterOff;
smallBall.onEnterFrame = mover;
smallBall.onPress = dragster;
smallBall.onRelease = dragsterOff;
smallBall.onReleaseOutside = dragsterOff;


Monday, July 9, 2007

Should We Turn to Advergames for Flash Game Development?

Gamasutra posted a great opinion article today from Magnus Alm of Swedish developer Muskedunder Interactive entitled Why The Game Biz Should Turn To Flash.


He beings by explaining why the Flash game industry has seen a lot of growth lately:
• The upward economic trend within the games industry in general.
• Advertisement agencies realizing the need for skilled game design competence.
• A growing online and casual games market.
• And let’s not forget that flash games now are being ported to other platforms.

He then states that those with decent-sized marketing budgets are taking notice of the games industry and using online games as a means to sell their brand. He's referring to advergames here. This avenue can be a very lucrative path for many companies. There's a danger that lies in doing this kind of work, though.

First of all, you are selling out to a certain degree. Now, that's ok, especially if there's no other option for a newbie developer (like us). But as a developer that is essentially doing games as work-for-hire, you have to always be aware that you are at the mercy of your client and you can't just drop everything to go start working on your next artistic masterpiece of a game.

You also have to make sure that whatever you're making is targeting the market that your client wants. This is really a problem that will occur for almost any kind of external funding. With advergames, though, the client will be very adamant about this. Otherwise, what's the point of the game?

Magnus then proceeds to talk about Asia. The online games market in Asia is growing and lucrative. However, it should be noted that the Asian market is incredibly difficult to get into. Between piracy, different market expectations and tastes, and other random cultural barriers, finding success in the Asian market is the exception, not the rule.

The next sections seem to be the most intersting though: finding a path to console development through Flash and exploring new revenue models. He states that the major consoles, plus soon to be the PSP, have or will have download services where players can download games via the internet. He lists Alien Hominid and flOw as examples of games that started out Flash and ended up on consoles. That happens to be our strategy, too. It seems to be a great idea. For revenue models, Magnus mentions the Korean model of free-to-play with microtransactions for non-gameplay items. It seems to be a successful model. In fact, that's our current model for the multiplayer version of Dinowaurs.

In the end, most game developers want to get to the point where they can make the kinds of games they want as soon as possible. There are many ways to get there. Are advergames a good one? Maybe. Just make sure to always be aware that you are working for your clients, not yourself. Alternatives to advergames are out there; those will be discussed later.

Friday, July 6, 2007

Learning to Flash

Intuition has spent a lot of time working on ideas, writing them into pitches for places like Adult Swim and Kongregate, (my user name is: aeiowu) but we haven't had a chance to really flex our development muscle as of yet. So while doing all this "scholarly" writing and whatnot, I've taken on the task of learning actionscript in hopes of helping out the prototype situation later on.

I normally like to learn things on my own, or through the interpipes somehow, but Josh did some research (he's learning, or relearning actionscript as well) and found some promising books for designers who want to code, rather than coders who want to learn a new language. Call me fickle, but I need a book from an author who knows how to relate to me, and given I have more of a design background, is working out very well.

I'm through the first ten chapters at the time of this post, and am working on my own programming problems with the help of Mike. I have made a couple "cool" demos from the tutorials in the book and my own marginally customizable "particle system" (just using the x and y scale of a movie clip). The particle system is really just a jiggly sphere, but the lesson I learned here was how to control the parameters of a function outside of the function itself because I built the function so guidelines could be applied when assigning the function to each movieclip.


function bubbler(thing:MovieClip, jitter:Number, size:Number):Void
{
var xVal:Number = 0;
var yVal:Number = 0;
onEnterFrame = function()
{
xVal = (Math.random()*jitter) - size;
yVal = (Math.random()*jitter) - size;

thing._yscale = yVal;
thing._xscale = xVal;
};
}

//Initialize
bubbler(blob_mc, 22, 222);

Thursday, July 5, 2007

Getting my failures out of the way

Hi! I'm Greg

I've been playing games for a long time. I remember the introduction of the Prodigy internet service, the rise and fall of Sierra games, and a jaw-dropping incident with Pong at an uncle's house. Today, I am studying graphic design at Iowa State University, with a heavy emphasis on game development. While ISU doesn't offer a game-dev major, a few classes do help with networking like-minded individuals towards a common goal. Combine that with 3D modeling & animation classes, a background in english at the University of Iowa, and a pretty solid design education, all that seems to be missing is the programming. This blog isn't about any of that though, at least not directly. Instead I will share some of the information and misinformation I've gathered over the last 4 or 5 years with all of you guys, and then once that's over with, which will be soon, I'll post documentation, process and maybe even some tutorials.

So here are some simple lessons that ring true for just about everyone trying to get into this industry at this age (college aged and younger) without much experience.

Make games, don't play them
Sure, you wanna play games, and you should, but game development has nothing to do with high-scores or head-shots, and everything to do with a passion for creation.

Start small
Use flash, Torque game builder trial version, Multimedia Fusion or something like that to prototype your first simple game idea. Make checkers or breakout, you'll learn a lot. If you want to break into the 3D realm, make a mod with the SDK of an existing engine, half-life unreal tournament 2004 and etc.

Sell-out
At least a little bit. You still have to make compromises about your ideas. If you don't have to make compromises, then you're either a rich programmer/artist and don't need funding or you'll never get your game past pre-alpha due to the scope being larger than SPORE and you not budging on any of your ideas with your team members .

Work like crazy
The harder the work, the more you will learn, the better you will be. This industry is not for the weak-willed and throws a ton of obstacles in your way of becoming part of it.

Focus on your craft, prepare for rejection
After a year or two, you shop your stuff around and nobody likes it, keep going. After 5 years, find a different craft, or a better way to do it.

Do it yourself
With nearly all the jobs in the land requiring 2-3 years of experience with a AAA release under your belt, it seems like you're staring down the business end of a catch-22. And you are. However by working on your own portfolio, in small projects and in unfunded teams, you can overcome this gap by investing your time into all your failures. Or better yet, go indy!

Fail first
Failures are a necessary and important part of learning how to develop, especially with such a technical art form, skills are constantly improving, as is software and tools. Learning how to structure a project, gauge feasibility and beyond, are all huge parts of a project's success, and by getting them wrong without anyone footing the bill for it, you'll do your career and your would-be publishers all a favor.

We're Like a Hot Dog In Search of a Bun

After looking at this image and snickering for a moment, I quickly realized that we are the hot dog. We have a meaty game development substance to us, and are in search of a bun to present our meat in a way that is easy to grab and consume. Not only that, but we're not sure exactly what kind of hot dog we are and therefore what kind of bun should hold us. We just stand there, intrigued by the opportunity we see before us.

So the search continues to find our proverbial bun. With regards to that, a lot has happened in the past couple weeks.

After Dinowaurs was turned down, we sent it over to Jim Greer and the folks at Kongregate. They seemed pretty interested in the idea, but were thinking more about the game being a multiplayer experience. Finding that out was exciting, because our original idea was for the game to be a multiplayer game. So now we're working on editing the pitch to be multiplayer. Hopefully they'll enjoy what we've come up with.

Then, all three of our pitches sent to Adult Swim were shot down. However, there was a glimmer of hope. They seemed to really like one of our ideas in particular - Hitchhikémon. As the name suggests, the game is based on the Pokémon franchise. In Hitchhikémon, you cruise the highway, picking up Hitchhikémon who seem like promising additions to the team and battling other Hitchhikémon masters. You must order your Hitchhikémon to fight from the roof of your speeding truck while avoiding oncoming traffic, road debris, and civilian drivers. Utilize strategic thinking to decide what weapons they'll use in a given fight to develop their skills into a true killer.

So basically, the game is like Pokémon, but instead of walking around, you drive in your truck. Not only that, but you fight with your hitchhikers while you're still driving - and you have to avoid obstacles. It's every hitching stuntman's dream game.

The problem with this game is that the name is a pretty big part of what makes it funny, and considering the ridiculous size of the Pokémon franchise, attempting an obvious parody would be pretty risky for Adult Swim. The good news is that we're quickly closing in on the kinds of things Adult Swim is looking for.

Mike continues to work on Melba Toast. What is Melba Toast? I'll leave the details to Mike, but for now I can say that it's our highly-optimized Flash 9 engine. And it'll rock your socks off. We've been debating on whipping up a really small game with it. Right now we're thinking of trying to clone Tanks from Wii Play. Man, that's such a great game. It has this N-type quality to it, where the mechanics are extremely simple, yet extremely well-tuned. Really, the game would end up a poor man's Tanks because of how hard that quality is to pull off. Stayed tuned to see what happens with that project.