gbadev.org forum archive

This is a read-only mirror of the content originally found on forum.gbadev.org (now offline), salvaged from Wayback machine copies. A new forum can be found here.

Graphics > Weather effects

#173098 - brave_orakio - Mon Mar 22, 2010 2:31 am

How do you guys implement weather effects (if you have them) in your game? For example Boktai 2 had rain from time to time, and tales of phantasia had places with snow. There are probably other games as well.

So do you implement them as sprites? I guess in this case just use a few different types of, say rain sprites or snow sprites and buffer them all in vram. Just use indexing to implement animation from rain falling to splashing so it won't be a huge burden on the CPU.

As BG, I have no idea how to do this. Easier for something like fog I suppose but rain and snow using BG is a bit diffiuclt yes?

Thoughts and ideas please! Thanks!
_________________
help me

#173099 - headspin - Mon Mar 22, 2010 7:46 am

In The Detective Game I just used sprites. You only need an 8x8 sprite for them, then just dma the splashes when they turn to um.. splashes. Not sure what makes you think they will take alot of CPU. The only concern is how many sprites you have free to use, not the CPU.
_________________
Warhawk DS | Manic Miner: The Lost Levels | The Detective Game

#173100 - brave_orakio - Mon Mar 22, 2010 8:01 am

I was thinking of filling the screen with them that's why I thought to use buffering all animation frames(around 2 for rain right? Maybe a liitle more for something like snow) would be less CPU intensive and not that bad in regards to vram usage.
_________________
help me

#173102 - Azenris - Mon Mar 22, 2010 10:05 am

Golden Sun for the GBA also used sprites
_________________
My Homebrew Games

#173105 - Miked0801 - Mon Mar 22, 2010 6:17 pm

If you are clever, you can use palette cycling on your BGs to get a very nice rain/snow effect. Or you can just paint some small lines on your BG and move the BG quickly to get a rain effect as well. I've used both and they both work well. Check out Spyro Eternal Night GBA on some of the snow levels for an example of just how good palette cycling weather effects can be. Hell, check the game out for all the technical wizardry we put in there. That game was awesome to work on.

#173106 - Kyoufu Kawa - Mon Mar 22, 2010 6:36 pm

Most of the weather effects in GBA Pok?mon, and therefore by extension OpenPok?, are done with sprites and some global palette manipulation. Even the fog.

#173119 - brave_orakio - Tue Mar 23, 2010 4:09 am

Thanks! I should check those games out to see those techniques. Didn't know these games had weather effects in them. But I hope I can still find Spyro around here though. Might be a bit difficult where I'm from.

edit: Did some research about openpoke. It's a homebrew game so where can I download this?
_________________
help me

#173126 - Kyoufu Kawa - Tue Mar 23, 2010 5:31 pm

http://helmet.kafuka.org/openpokesrc.rar

I stopped working on it a while back, though I've been recently dabbling with a DS port. As far as I remember, only the fog and sandstorm effects are in.

#173145 - brave_orakio - Wed Mar 24, 2010 3:59 am

Thanks much! Now all I need to do is hunt for Spyro! Wish me luck!
_________________
help me

#173172 - Kyoufu Kawa - Wed Mar 24, 2010 7:57 pm

Good luck. I might look into that game myself, actually.

#173191 - brave_orakio - Fri Mar 26, 2010 1:47 am

Mike what about Spyro: A new Beginning? Where you involved with that as well? It's the one available locally but I'm not sure if it has the same graphical effects eternal night has.
_________________
help me

#173205 - Miked0801 - Fri Mar 26, 2010 6:27 pm

Completely different game, engine, and people. We rolled our own special engine for Eternal night. It plays - unique, compared to the others. I think it's the highest ranked GBA game I ever worked on, and for good reason :)

#173207 - Kyoufu Kawa - Fri Mar 26, 2010 6:43 pm

I got myself a copy of Spyro Eternal Night. The Fire Temple (?) looked amazing and the palette cycles in that area were already great -- I don't know if I dare play up to a snow level.

#173209 - Miked0801 - Fri Mar 26, 2010 7:01 pm

HBlank Scanline X/Y register tweaking to give the heat effect on top of the amazing palette cycling there. While running a game at speed. Fire temple is awesome. The credits effects are also all done with hblank effects to give the atmospheric waving.

#173214 - Kyoufu Kawa - Sat Mar 27, 2010 2:14 pm

Stupidly, both are utterly classic techniques. It's the execution that makes SEN worth looking at.

#173215 - brave_orakio - Sat Mar 27, 2010 3:19 pm

Now I really want to hunt for this game even more!
_________________
help me

#173603 - brave_orakio - Mon Apr 19, 2010 3:59 am

I finally found the game. I haven't gotten that far but all I can say is:
Outstanding! Even in the beginning all the technical wizardry you guys put in is evident. Even the AI surprised me, jumping over obstacles and pits to get to Spyro!

Out of curiosity Mike are you the lead developer? I could only find 2 people which fit your username here and the other one would be the vice president. I can't imagine the vice president of a company programming so...
_________________
help me

#173616 - Miked0801 - Mon Apr 19, 2010 7:04 pm

yep, I was the lead.

#173617 - headspin - Mon Apr 19, 2010 7:43 pm

Miked0801 wrote:
yep, I was the lead.


It's nice having some people from the industry on here
_________________
Warhawk DS | Manic Miner: The Lost Levels | The Detective Game

#173619 - Miked0801 - Mon Apr 19, 2010 9:28 pm

You'd be surprised just how many industry people post and read on here. At least a dozen I know of and some I have worked with in the past and present. This place really is The place to get info on GBA/DS programming outside of a few restricted Nintendo locations.

#173631 - sverx - Tue Apr 20, 2010 9:19 am

Miked0801 wrote:
This place really is The place to get info on GBA/DS programming outside of a few restricted Nintendo locations.


Who had doubts? ;)

#173633 - headspin - Tue Apr 20, 2010 10:30 am

sverx wrote:
Who had doubts? ;)


well I always knew there were people from the industry (knew Mike was for a long time), how many though I did not. So I guess I should say good to hear "many industry people post"
_________________
Warhawk DS | Manic Miner: The Lost Levels | The Detective Game

#173639 - sverx - Tue Apr 20, 2010 1:59 pm

head: yes, but I quoted another sentence... :P

#173646 - headspin - Tue Apr 20, 2010 7:34 pm

sverx wrote:
head: yes, but I quoted another sentence... :P


Well it was sorta relevant :)
_________________
Warhawk DS | Manic Miner: The Lost Levels | The Detective Game

#173649 - brave_orakio - Wed Apr 21, 2010 1:56 am

Mike how does palette cycling work with the snow effect? Its easy to see how to implement the palette cycling in things like say the waterfalls or those moving lights in the background since there's nothing else behind those things. But with the snow , except for the flakes itself, the rest is transparent.

I mean that even with palette cycling, the transparent pixels(those with color index 0) won't change right? How did you make the snow animate like that? Or did you mix in some BG scrolling as well? Although I don't think it has BG scrolling because the snow seemed to move in different directions.
_________________
help me

#173651 - Miked0801 - Wed Apr 21, 2010 3:29 am

We had the best palette cycle artist in the world work on this for us. Seriously.

Basically, you can map colors in ramps to match the background color for say 15 of 16 palettes in a ramp, draw a line with each pixel being a different value in that ramp, then move the 1 snowflake color through the ramp to give the illusion of movement. Line it up across enough pixels and set the animation speed correct and you have falling snowflakes.

Look carefully, you will see that the pattern does repeat every 2 seconds or so. That said, our artist is a true master at this technique. I could never even come close to doing what he does/did here.

And no, there is no BG movement on the snow levels, it is all palette work. In the fire levels, we're doing bg scroll tricks per scanline to give the heat wave effect though. If you are able to view the palettes in real time, you'd see just how crazy we get with this. On DS, this is becoming a lost art though.

#173653 - brave_orakio - Wed Apr 21, 2010 5:57 am

Truly incredible. I have never seen weather effects done like this before or even now. Is that why you say its alost art on DS?

Doesn't sound that difficult to implement on paper, but definitely no easy task when you have to actually do it with the rest of the BG.

Looks like I have to update my sprite/tile drawing tools to be able to do something like this.
_________________
help me

#173665 - Miked0801 - Thu Apr 22, 2010 6:31 pm

The DS has 2D support, but is primarily a 3D platform - limited as it is. While we have done texture palette cycling effects in our games, we have enough throughput to just animate a texture to achieve the same effect without needing specialized palette cycling skills anymore. Hurts on throughput compared to a palette load, but one has a lot more power to play with than on GBA.