Author Topic: Rain?  (Read 2460 times)

0 Members and 1 Guest are viewing this topic.

Offline Carnivius

  • Supporter
  • 6128 Plus
  • *
  • Posts: 1.514
  • Country: gb
  • Mayhem Attack Squad
    • index.php?action=treasury
    • Awards
Rain?
« on: 10: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?  :)
like
0
No reactions
Favorite CPC games: SwitchBlade, Stryker in the Crypts of Trogan, Turrican II, UN Squadron, Oh Mummy

Offline Joseman

  • 6128 Plus
  • ******
  • Posts: 815
  • Country: es
    • Awards
Re: Rain?
« Reply #1 on: 11:02, 21 October 15 »
continental circus & ghouls n ghosts have rain... i dont know if they are a good example

Enviado desde mi GT-N7100 mediante Tapatalk

like
0
No reactions

Offline ssr86

  • CPC664
  • ***
  • Posts: 120
  • Country: pl
    • Awards
Re: Rain?
« Reply #2 on: 11: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
« Last Edit: 11:15, 21 October 15 by ssr86 »
like
0
No reactions

Offline AMSDOS

  • Supporter
  • 6128 Plus
  • *
  • Posts: 3.939
  • Country: au
    • index.php?action=treasury
    • Programs for Turbo Pascal 3
    • Awards
Re: Rain?
« Reply #3 on: 11:19, 21 October 15 »
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.



like
0
No reactions
* 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

Offline Carnivius

  • Supporter
  • 6128 Plus
  • *
  • Posts: 1.514
  • Country: gb
  • Mayhem Attack Squad
    • index.php?action=treasury
    • Awards
Re: Rain?
« Reply #4 on: 11:25, 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?
like
0
No reactions
Favorite CPC games: SwitchBlade, Stryker in the Crypts of Trogan, Turrican II, UN Squadron, Oh Mummy

Offline ssr86

  • CPC664
  • ***
  • Posts: 120
  • Country: pl
    • Awards
Re: Rain?
« Reply #5 on: 11:39, 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.
like
0
No reactions

Offline TFM

  • Visit the mysteries of the CPC at www.futureos.de
  • Supporter
  • 6128 Plus
  • *
  • Posts: 9.899
  • Country: aq
  • Space Chicken for FutureOS is free!
    • index.php?action=treasury
    • FutureOS - The revolution on CPC!
    • Awards
Re: Rain?
« Reply #6 on: 21:37, 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:
[youtube]https://www.youtube.com/watch?v=3aOO7nQywFA&feature=youtu.be&t=625[/youtube]


Or you prefer snow? Here:


[youtube]https://www.youtube.com/watch?v=VtVYaQuDw5c&feature=youtu.be&t=31[/youtube]
« Last Edit: 18:43, 10 November 15 by Gryzor »
like
0
No reactions
TFM of FutureSoft
Also visit the CPC and Plus users favorite OS: FutureOS - The Revolution on CPC6128 and 6128Plus

Offline MacDeath

  • Chaotic post writer and mock-up specialist
  • Supporter
  • 6128 Plus
  • *
  • Posts: 4.075
  • Country: fr
    • Awards
Re: Rain?
« Reply #7 on: 22:57, 21 October 15 »
basically it is like a starfield, but a vertical one, being on the foreground.
 ;D
like
0
No reactions

Offline AMSDOS

  • Supporter
  • 6128 Plus
  • *
  • Posts: 3.939
  • Country: au
    • index.php?action=treasury
    • Programs for Turbo Pascal 3
    • Awards
Re: Rain?
« Reply #8 on: 11:28, 22 October 15 »
basically it is like a starfield, but a vertical one, being on the foreground.
 ;D


Nope, they want it done as Lines.  ???
like
0
No reactions
* 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

Offline ||C|-|E||

  • Administrator
  • 6128 Plus
  • *****
  • Posts: 1.869
  • Country: gb
    • index.php?action=treasury
    • Mundo CPC
    • Awards
Re: Rain?
« Reply #9 on: 17:58, 22 October 15 »
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


[youtube]https://www.youtube.com/watch?v=436ub4BgbHA[/youtube]

Quite a lot of drops, to be honest, and with diagonal movement. They impact the speed a little bit, but not so much  :)
« Last Edit: 18:44, 10 November 15 by Gryzor »
like
0
No reactions