Game Development Community

Precipitation effect image problem

by Zach · in Technical Issues · 05/18/2005 (6:45 am) · 5 replies

My problem is pretty well outlined in the image. I have a image for a precipitaion effect and I can't figure out why its only rendering a quarter of the image in game.

img.photobucket.com/albums/v646/lastender/Problem.jpg
Any help regarding the issue is appreciated.

#1
05/18/2005 (7:00 am)
What is the image size (in pixels) of the png image ? It's square and a power of 2 right ? Did you try making it 1/4 of the size ? Maybe the image has to be a certain size.
#2
05/18/2005 (7:09 am)
The image size is 128. I tried resizing it to 64 to see if it would make a difference and I get the same effect. It always seems to be a quarter of the image no matter what size.
#3
05/18/2005 (7:35 am)
Take a look at the rain.png file in the TGE demo. There are actually 12 rain drops in that image. Taking a quick look at the Precipitation::spawnDrop it looks like it gets a random index into that image to choose what to display.
#4
05/18/2005 (5:56 pm)
I fixed my problem by changing the #define DROPS_PER_SIDE from 4 to 1 in precipitation.h but since I'm not a programmer I dont know if this will cause any unwanted behavior.
#5
05/18/2005 (7:59 pm)
It shouldn't.