Soliciting ideas for game programming "tips"

⌘-R in Chief
Posts: 1,258
Joined: 2002.05
Post: #1
If you have an idea for a game programming "tip," post it. The tip can be basically anything. It can be an idea for a graphical trick to achieve a certain appearance, a best practice for organizing your development work flow, a neat way to make graphics scalable between the Mac and the iPhone very easily, perhaps a technique to do variable pitch on engine sounds etc. It doesn't matter if it's specific to particular tool or language or anything. It can be really simple, or it can be pretty involved. Doesn't matter. If it's something you think others will benefit from, it's a candidate.
Quote this message in a reply
Moderator
Posts: 449
Joined: 2003.08
Post: #2
For iPhone Development:
When using UIImages, the convenience constructor [UIImage imageNamed:] returns an auto-released UIImage object, however, it also caches that UIImage in case it is used again later. This can lead to there being more memory alloc'd than thought (if viewed in something like Instruments). I am unsure exactly when the cached version is released as well. [UIImage imageWithData:] doesn't create this cached data.
Quote this message in a reply
Moderator
Posts: 522
Joined: 2002.04
Post: #3
If you profess to have no artistic talent, there is still no excuse for bad color choices in your games. Use the eye dropper (with a 3x3 average or so, if your software supports it) on images of favorite games, professional photographs (like National Geographic), or nice paintings. Or, Google "Color Scheme Generator" and go nuts. Generators work better for interface colors.
Quote this message in a reply
Moderator
Posts: 522
Joined: 2002.04
Post: #4
You can get a lot of free source textures from http://www.cgtextures.com .
Quote this message in a reply
Moderator
Posts: 522
Joined: 2002.04
Post: #5
There are two decent length of time magic numbers. The value 0.15 seconds is good for flashes. The value 0.3 seconds is good for interpolating things in and out, like for moving GUI items on screen or for the length of time spent blending in an animation from zero weight to full weight.
Quote this message in a reply
Moderator
Posts: 522
Joined: 2002.04
Post: #6
A decent basic explosion can be composed of four elements. The first is a bright flash of light, something like a big additive particle or particles, that lasts for about 0.15 seconds. The second is a shot of sparks quickly expanding from the center point. The spark particles should be stretched in the direction of motion. They should last for about 0.25 seconds. The third component is smoke. You can get away with these particles lasting from 1-2 seconds. They should have a slight random velocity and grow over time, and have a slight upwards force. The fourth component is fire. This is the hardest one to make look good. For starters, just try to get something that gives a nice orange glow with some texture. This should last for less long than the smoke, something like about 0.75 to 1.5 seconds randomized.
Quote this message in a reply
Moderator
Posts: 3,574
Joined: 2003.06
Post: #7
aarku Wrote:A decent basic explosion can be composed of four elements. The first is a bright flash of light, something like a big additive particle or particles, that lasts for about 0.15 seconds. The second is a shot of sparks quickly expanding from the center point. The spark particles should be stretched in the direction of motion. They should last for about 0.25 seconds. The third component is smoke. You can get away with these particles lasting from 1-2 seconds. They should have a slight random velocity and grow over time, and have a slight upwards force. The fourth component is fire. This is the hardest one to make look good. For starters, just try to get something that gives a nice orange glow with some texture. This should last for less long than the smoke, something like about 0.75 to 1.5 seconds randomized.

That is very similar to my explosions in Ace Omicron! How did you get my code? LOL

Actually, before I do the stuff you outline above, I do a big, quick shockwave first. Then for the smoke, I use animated sprites which start with bright yellow then start fading to dark black smoke over the frames. I call those black smokers. Then I make an alternate "explosion model" and blow pieces of the ship everywhere and attach a black smoker to like three parts as they're spinning away. It looks awesome!

One way to visualize the sparks is to watch how molten droplets of steel look when being arc-welded. They start dazzling bright, then orange for a bit, then randomly seem to fizzle out pretty quick.

Explosions are really where it's at for gaming fun. Great tip aarku! I would add: When you think you got your explosion "down", add some more stuff to it to put it over the top!

And now for my "pro" tip: Use backup software and also learn to use version control software! This cannot be understated. I learned about the importance of this tip the hard way Sad
Quote this message in a reply
Moderator
Posts: 452
Joined: 2008.04
Post: #8
Get royalty-free music from http://www.shockwave-sound.com/. It's usually like $20-40 a song, and they have quite a sizable catalog of pretty good stuff. (maybe that's not really programming, but it's a game dev tip).

Howling Moon Software - CrayonBall for Mac and iPhone, Contract Game Dev Work
Quote this message in a reply
⌘-R in Chief
Posts: 1,258
Joined: 2002.05
Post: #9
Good work guys. Keep em coming. Smile
Quote this message in a reply
Member
Posts: 320
Joined: 2003.06
Post: #10
For your first game, make Tetris, or something similarly simple, and finish it. If you tackle something too big you will take longer to learn less and ultimately give up. After Tetris you might be able to tackle Breakout.

Chopper, iSight Screensavers, DuckDuckDuck: http://majicjungle.com
Quote this message in a reply
Post Reply