News:

Printed Amstrad Addict magazine announced, check it out here!

Main Menu
avatar_Carnivius

Rain?

Started by Carnivius, 08:53, 21 October 15

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Carnivius

Just curious how would you go about doing a rain effect on CPC and would be fast enough to use in games?  And what games have good examples of a rain effect?  :)
Favorite CPC games: Count Duckula 3, Oh Mummy Returns, RoboCop Resurrection, Tankbusters Afterlife

Joseman

continental circus & ghouls n ghosts have rain... i dont know if they are a good example

Enviado desde mi GT-N7100 mediante Tapatalk


ssr86

#2
On Enterprise I'm doing rain as compiled xor sprites. However I have a linear buffer screen setup... on CPC it would get a little trickier...(but only if you want the rain to drop diagonally - in the case of vertically-falling-rain it would be the same for both systems) You would have to worry about the end of lines (with linear buffer the pixels just wrap up to the next line and it's ok).

It looks something like this (although currently I'm not drawing conitinuous line but only every second pixel of it... to make it somewhat faster and it looks better imo)


enterprise 64/128 - a new mini-game wip - YouTube

AMSDOS

I'm not quite sure what effect your after. A series of lines in different colours I think has been done, in conjunction with rotating the colour palette, but has been done for effect, rather than being implemented into a game.


I made some code in Pascal, to generate a physically moving 2D star field, just to see how that would go. The star field is like the one in the early AMSOFT Space Hawks game, though I'm assuming you want something more, than just a point.



* Using the old Amstrad Languages :D   * with the Firmware :P
* I also like to problem solve code in BASIC :)   * And type-in Type-Ins! :D

Home Computing Weekly Programs
Popular Computing Weekly Programs
Your Computer Programs
Updated Other Program Links on Profile Page (Update April 16/15 phew!)
Programs for Turbo Pascal 3

Carnivius

Quote from: ssr86 on 09:12, 21 October 15
On Enterprise I'm doing rain as compiled xor sprites. However I have a linear buffer screen setup... on CPC it would get a little trickier...(but only if you want the rain to drop diagonally - in the case of vertically-falling-rain it would be the same for both systems) You would have to worry about the end of lines (with linear buffer the pixels just wrap up to the next line and it's ok).

It looks something like this (although currently I'm not drawing conitinuous line but only every second pixel of it... to make it somewhat faster and it looks better imo)


enterprise 64/128 - a new mini-game wip - YouTube


That's the sort of thing I'm after.  But on CPC in Mode 0 (which is gonna make the angle of the rain a bit different to avoid blockiness I guess, hm).    Diagonal rain is good but I wouldn't be opposed to vertical rain if the effect looks good too.     

Also wonder if it can be done in isolation to certain areas of a screen, such as if the screen layout has an outside and an inside (like a cave opening) could the rain only appear on the outside parts of that screen (with sprited rain drop splashes on solid objects) or would it better just to make sure the outside and inside areas are on totally different screens and stop the rain effect when you move onto the inside screen?
Favorite CPC games: Count Duckula 3, Oh Mummy Returns, RoboCop Resurrection, Tankbusters Afterlife

ssr86

Quote from: Carnivac on 09:25, 21 October 15
Also wonder if it can be done in isolation to certain areas of a screen, such as if the screen layout has an outside and an inside (like a cave opening) could the rain only appear on the outside parts of that screen (with sprited rain drop splashes on solid objects) or would it better just to make sure the outside and inside areas are on totally different screens and stop the rain effect when you move onto the inside screen?
The way I'm implementing it is: storing a LUT of screen line addresses for the drops depending on the frame (rain falls 104 pixels which is 13 drop lengths so I have one LUT of 13 addresses: the six odd numbered are for the first screen buffer and the even numbered entries are for the second screen buffer) and then based on the order number of each drop (currently 42 drops) add x position offset to that address. I think it should be possible to limit the movement the way you want... although would need some more logic or alternative LUTs... Hard to say at the moment. Should be easier with vertical rain for sure.

TFM

#6
Quote from: Carnivac on 08:53, 21 October 15
Just curious how would you go about doing a rain effect on CPC and would be fast enough to use in games?  And what games have good examples of a rain effect?  :)

No problem, See Fres Fighter:



Or you prefer snow? Here:


TFM of FutureSoft
Also visit the CPC and Plus users favorite OS: FutureOS - The Revolution on CPC6128 and 6128Plus

MacDeath

basically it is like a starfield, but a vertical one, being on the foreground.
;D

AMSDOS

Quote from: MacDeath on 20:57, 21 October 15
basically it is like a starfield, but a vertical one, being on the foreground.
;D


Nope, they want it done as Lines.  ???
* Using the old Amstrad Languages :D   * with the Firmware :P
* I also like to problem solve code in BASIC :)   * And type-in Type-Ins! :D

Home Computing Weekly Programs
Popular Computing Weekly Programs
Your Computer Programs
Updated Other Program Links on Profile Page (Update April 16/15 phew!)
Programs for Turbo Pascal 3

||C|-|E||

#9
I am remembering that Myth, in the Level of the vikings, had a nice rain effect with the little drops exploding when touching something. You can see it here, just jump to 23:56




Quite a lot of drops, to be honest, and with diagonal movement. They impact the speed a little bit, but not so much  :)

Powered by SMFPacks Menu Editor Mod