Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

2D All the way! / Weather effects over my '2d' sprite world

Author
Message
Prep
20
Years of Service
User Offline
Joined: 17th Nov 2003
Location:
Posted: 10th Feb 2004 01:06
The game i'm making is a overhead scrolling RPG type thing, I on a whim decided it would like to add some weather effects to it. (I like to do things that help me lean something new)

I think this would normally be quite easy, a plain with a scrolling texture would look good enough for this, and I made that exactly.

The problem, I can't put it in front of the sprites, as then the sprites can't be seen.

So I thought, well instead of using a plain, how about using another sprite, simple enough, except I can't work out how to scroll the texture on it effectively. I came up with a paste image routine but it was far to much of a performance drainer to work. So I put my thinking hat on (literally may I add) and found this command

SET SPRITE TEXTURE COORD

But basically I can't produce a scrolling texture effect with it (maybe due to my lack of knowledge of what is really going on with it, I look at that tutorial that has it in on this site a while back and thats where I remembered the command from).

Anyway to cut a long story short (well relatively), has anyone some fine ideas on how I can get this working, I don't want to lose the sprite map I use, its far faster then pasting the tiles and is very integeral to the whole game engine anyway.

Any help is greatly apprecaited, i'm not just asking for code either, I like to work things out myself to a degree, I find when I do I tend to remember better then when I pasted someone elses code in. (thought code examples are always welcome! )

Thanks.

To be no more, sad cure.
UnderLord
20
Years of Service
User Offline
Joined: 2nd Aug 2003
Location:
Posted: 10th Feb 2004 05:27 Edited at: 10th Feb 2004 05:29
if you made a plain try ghosting it then if you make the plain grey it will look like fog. and rain thats a easy one to do if you want to do that

load the rain image then do a for-next loop and have it randomize where the drops of water will fall you will only need like one piece of rain that will be transparent so that way when it overlaps with a characters head or body it won't block them out of view. or maybe ghosting the rain will work too who knows.

oh yeah for the scrolling problem just use the same way you get the scrolling for when a character moves this way you only use one bitmap and or plain to make the fog and you won't have to strech it out eaither thus other area's won't really have "fog" on them until that area can be seen on the screen.

The search continues.
Prep
20
Years of Service
User Offline
Joined: 17th Nov 2003
Location:
Posted: 11th Feb 2004 01:12
Thanks for the ideas, I can't say I have had any luck getting a plain to appear in front of sprites though. If I draw sprites first, I just see the plain, and if I draw them last I just see the sprites.

Ghosting the plain just reveals the 3d background.

Any other thoughts, can it even be done with a plain over sprites? Or am I going to have to find some interesting way using sprites for the weather?

Thanks again.

To be no more, sad cure.
UnderLord
20
Years of Service
User Offline
Joined: 2nd Aug 2003
Location:
Posted: 11th Feb 2004 04:57
Well in this game that i played it was 2d and looked sort of like Zelda online =P it was called Graal or was it grall but anyhow

When that game had fog on it you'd useally see the sprite running on the fog IE they looked as if they wernt in any fog more of running ontop of it.

The search continues.
Prep
20
Years of Service
User Offline
Joined: 17th Nov 2003
Location:
Posted: 11th Feb 2004 22:20
I have managed quite a nice fog effect (well good enough for me!) just by making a grey sprite the size of the "game area" and altering its alpha value as shown in the following code. My characters are "behind" it to, which is always a good thing.



But i'm really more interested in rain, any more tips / ideas?

To be no more, sad cure.
UnderLord
20
Years of Service
User Offline
Joined: 2nd Aug 2003
Location:
Posted: 11th Feb 2004 22:34
load the image and then do something like this i guess

position image 1,rnd(640),rnd(480)

but of course that will probably only position 1 image in a diffrent area you might try a for next command or something for that. or you could do the above and then you'd need to put the image on a x axis to make it look like its falling the only way i can think of it doing would make it look like its falling down and off the screen. so it'd look cheap and cheesey

The search continues.
Pincho Paxton
21
Years of Service
User Offline
Joined: 8th Dec 2002
Location:
Posted: 11th Feb 2004 22:44
Quote: "I have managed quite a nice fog effect (well good enough for me!) just by making a grey sprite the size of the "game area" and altering its alpha value as shown in the following code. My characters are "behind" it to, which is always a good thing.
"



Rain is the same thing, but you make a rain animation, and repeatedly change the sprite image.

Prep
20
Years of Service
User Offline
Joined: 17th Nov 2003
Location:
Posted: 12th Feb 2004 00:07
Yea I have thought about changing the images the sprite uses to make it animated, with limited success might I add. Well it worked but it wasn't too good performance wise, I dropped quite a few FPS, saying that though I was making the next frame on the fly, maybe making a load of images before hand and doing something like.



But I was hoping to avoid doing so many images before hands, ah well no rest for the wicked and all.

Thanks for the advice guys.

To be no more, sad cure.
PowerFang
20
Years of Service
User Offline
Joined: 6th Feb 2004
Location: Australia (But currently in the USA)
Posted: 13th Feb 2004 02:15
Prep.....i'm doing a similar style game......maybe we can hook up and exchange ideas/combine efforts.

email me at: mbaskerv@hotmail.com if interested

Login to post a reply

Server time is: 2024-05-13 16:40:41
Your offset time is: 2024-05-13 16:40:41