

Makin' It Rain - How Raindrop Effects Work In 2D Games - cal5k
http://bulletproofoutlaws.com/?p=264

======
iamwil
To me, the biggest lesson I've learn from game programming tips and tricks was
to not model the world exactly. Just model it enough to trick the eye. My
first inclination was, "but of course you need the splats where the rain drop
line ends! How would it make sense otherwise?" But it's not until you see the
video that you get that, hey that worked well enough.

I imagine it's applicable to other realms of programming as well, like web
programming. We should question if we really need something on the page, or if
there's just some way to fake it or get away with doing less. Or same with
scheduling notifications to be delivered. Does it really need to be real-time?
Or can we just cheat a little since the tolerance is much higher?

~~~
jrockway
_Or can we just cheat a little since the tolerance is much higher?_

Sure, we call this caching. Imagine you have a blog with comments. You can
generate the page for each user when he wants it, and then it's a real view
onto the data that you have available. Or, you can generate it once a second
and just serve the stale version -- not much can happen in one second. Making
that compromise is the difference between handling 10 requests a second and
10,000 requests a second. Almost always a good tradeoff.

(Doesn't NYTimes do this?)

~~~
ElbertF
I've noticed this on Reddit. When you submit a comment it's inserted into the
page with a bit of JavaScript but when you refresh the page it's gone. Refresh
the page again after a few seconds and it's there.

------
Luc
Or you could use color cycling:
<http://www.effectgames.com/demos/canvascycle/?sound=0> (choose 'Highland
Ruins - Rain' and show the options to see the palette). Crazy in these modern
times, of course.

~~~
corysama
Those color cycling demos are amazing. Unfortunately, color cycling has fallen
out of practice both because it is too hard to teach artists and because the
double-lookup-per-pixel is memory bandwidth intensive on modern hardware (old
systems had dedicated hardware to support this).

------
BPO_Quickdraw
haha awesome, you blew my server up. Upgrading now but it'll take a couple
days they say.

Anyone reading: that's my game development blog, I'm starting an iPhone game
dev studio and documenting the progress of starting it up and making the first
game, day by day!

Check it out if you're interested in game dev and feel free to ask any
questions!

\- Quickdraw

~~~
jordanroher
I'm very interested in iPhone game development. I'm working on a title for
PC/Xbox based on the XNA framework and finding it fairly easy to use. Is there
anything like that for the iPhone? Any good place to find a comparison of
frameworks? I'm not averse to coding interactions by hand (trying to make a 2D
RPG, not a platformer, so Torque isn't appropriate), but I can't make sense of
the options.

~~~
jon914
Cocos2D is the most popular 2D iPhone game framework. An alternative, if
you're used to the Flash/ActionScript way of doing things, is Sparrow. You may
also find that if you're doing an action/physics game in the future, Box2D
will inevitably be necessary.

If you're looking for a GUI as opposed to a programming API, in addition to
the fine options above, my startup (<http://www.stencyl.com>) also does this
and is based on Sparrow (and Flash for exporting to the web).

However, I'll be realistic and say that if you're making an RPG, you'll find
it much easier to build it by hand.

~~~
timknauf
Stencyl looks like a lot of fun, kudos! And am I right that some of the linked
games have even managed to score themselves sponsorship?

~~~
jon914
Thanks! The Balls in Space game scored several sponsorships that have
collectively gotten it into the 4 figures range, which is pretty good by Flash
standards.

------
kindlyviking
Excessive use of font bolding in this article.

~~~
BPO_Quickdraw
For people in a hurry. :) You can just skim the bold sections and get the
important points of the post. I tend to write way more than anyone would
really want to sit down and read haha

\- Quickdraw

~~~
kindlyviking
Fair enough :)

------
BPO_Quickdraw
iamwil: "My first inclination was, "but of course you need the splats where
the rain drop line ends! How would it make sense otherwise?""

Exactly, I think that's default programmer-logic. "If there's a drop, it must
have a splat." I used to do some programming but I'm more of an artist than a
progger so I figure writing about little artsy tricks like that might help
other devs out. It can be rough trying to fit cool stuff onto tiny phones haha

Luc: I'm a pixel artist at heart so I love color cycling, but ya, appearing in
front of another layer blows it up. Also these days I don't think iPhone games
use palettes much...I know older cel phones needed them, but for iPhone I seem
to be able to get away with just using big ol' .PNGs with no palettes (which
rules, 'cause I can get anti-aliased edges).

\- Quickdraw

~~~
relix
It's also interesting just from a project management point of view, or anyone
doing a startup, imo. Good blog!

~~~
BPO_Quickdraw
Thanks! I'm trying to cover the stuff that surrounds game dev, managing my
time, keeping track of expenses, marketing the game, etc. 'cause I think that
stuff gets glossed over a lot.

Like I'll be posting my financials for the month soon, even though I know
they're going to be negative since my game isn't out yet haha But it's the
principle of the thing, getting into the habit of keeping accurate records.

Glad you like the blog! I'm shooting for daily-esque updates so pop in again
in a couple days!

\- Quickdraw

------
cal5k
Welp, looks like I crashed their server...

Update: There it goes!

