The Daily Click ::. Forums ::. Klik Coding Help ::. Night effect
 

Post Reply  Post Oekaki 
 

Posted By Message

Ruffus



Registered
  30/05/2003
Points
  3
8th June, 2003 at 02:58:29 -

I´m working on RTS, and I have problems with creating night.
First I created a big box on the screen and changed transparency, but then the game slowed down. Maybe you can help me, how to create night....

 
_op_

ShadowCaster

Possibly Insane

Registered
  02/01/2002
Points
  2203
8th June, 2003 at 03:10:22 -

Yep, that's absolutely going to make your game slow down. Try just creating a single active object the size of the window (not the size of the frame) and have it follow the frame. That's a lot faster than making an active object the size of the frame.

Other than that, the only real thing you can do is edit all the sprites manually. If you have Photo-Paint you can create a script that'll darken all your images automatically, though not too many people use that anymore.

If you have Linux, you can download Photo-Paint for free from Corel ( www.corel.com )

Mike

 
"Now I guess we're... 'Path-E-Tech Management'" -Dilbert

Assault Andy

Administrator
I make other people create vaporware

Registered
  29/07/2002
Points
  5686

Game of the Week WinnerVIP Member360 OwnerGOTM JUNE - 2009 - WINNER!GOTM FEB - 2010 - WINNER!	I donated an open source project
8th June, 2003 at 03:32:53 -

Lots of people have trouble with shadow/night effects. What if you used the overlay object and got it to draw a black dot at every 2nd pixel? Because that's all a semi-transparent image is.

 
Creator of Faerie Solitaire:
http://www.create-games.com/download.asp?id=7792
Also creator of ZDay20 and Dungeon Dash.
http://www.Jigxor.com
http://twitter.com/JigxorAndy

Long John Kickbag



Registered
  26/08/2002
Points
  148
8th June, 2003 at 03:43:33 -

A semi-transparent image is not just an image after putting black dots all over it, not to mention even setting all them pixels would be slow (drawing lines would make more sense). Anyway in a semi-transparent image it gets the average (with a ratio depends on the transparency value) of the colour below it and the actual colour on the image. If you aren't using any other ink effects then you might want to try out this example I made: http://nimble.icetec.net/?page=6&listid=5

 
Resize! - www.clicksplat.com/comparison.html

Assault Andy

Administrator
I make other people create vaporware

Registered
  29/07/2002
Points
  5686

Game of the Week WinnerVIP Member360 OwnerGOTM JUNE - 2009 - WINNER!GOTM FEB - 2010 - WINNER!	I donated an open source project
8th June, 2003 at 04:15:46 -

i know its not putting black dots all over it, it almost is though. Like if you drew a square and coloured have of it in, but not have any pixels touching left,right,up or down. It's almost the same, so you could simulate it with overlay.

 
Creator of Faerie Solitaire:
http://www.create-games.com/download.asp?id=7792
Also creator of ZDay20 and Dungeon Dash.
http://www.Jigxor.com
http://twitter.com/JigxorAndy

Blackgaze

Possibly Insane

Registered
  01/11/2002
Points
  3161

VIP Member
8th June, 2003 at 05:05:55 -

normal to do but i never thought of night affect of 1 active object semitransparent. i might try that.
There should be an extension for night effect/fog of war i think.

 
Formerly known as "Spiderhead".

Returned after four years.
www.youtube.com/user/sevlech for more infomation

Assault Andy

Administrator
I make other people create vaporware

Registered
  29/07/2002
Points
  5686

Game of the Week WinnerVIP Member360 OwnerGOTM JUNE - 2009 - WINNER!GOTM FEB - 2010 - WINNER!	I donated an open source project
8th June, 2003 at 05:15:46 -

Im gonna work on this now, and try to make an effective fog of war system.

 
Creator of Faerie Solitaire:
http://www.create-games.com/download.asp?id=7792
Also creator of ZDay20 and Dungeon Dash.
http://www.Jigxor.com
http://twitter.com/JigxorAndy

Blackgaze

Possibly Insane

Registered
  01/11/2002
Points
  3161

VIP Member
8th June, 2003 at 06:04:10 -

cant wait

 
Formerly known as "Spiderhead".

Returned after four years.
www.youtube.com/user/sevlech for more infomation

Long John Kickbag



Registered
  26/08/2002
Points
  148
8th June, 2003 at 08:06:19 -

Actually it really doesn't look very much like it unless you have an exceptionally high resolution. You couldn't use the overlay object in any case, the overlay object draws on the background layer so it would only affect the background and it has no transparency so you wouldn't be able to see the image behind it at all. Dithering has its uses, but this isn't one of them.

Anyway, lots of small object's with an ink effect runs faster than one big object with an ink effect. That's why my example is faster than one using a big semi-transparent object. Not to mention it can filter out different colours and do lighting effects.

 
Resize! - www.clicksplat.com/comparison.html

Long John Kickbag



Registered
  26/08/2002
Points
  148
8th June, 2003 at 11:47:53 -

No, I have 15" LCD monitor on 1024 by 768 and I can clearly see the differences between something that has been dithered and something that is the same colour throughout. Look at this picture, http://nimble.icetec.net/dithshade.gif , you can easily tell the difference between the two (they would be the same if you took the average of all the pixels for each). With more constrast between the colours it becomes more prominent as well.

 
Resize! - www.clicksplat.com/comparison.html

AsparagusTrevor

Mine's a pint of the black stuff

Registered
  20/08/2002
Points
  2364

Game of the Week WinnerHas Donated, Thank You!VIP MemberEvil kliker
8th June, 2003 at 12:07:29 -

What about the Pallette Object? That can darken the pallete. Unless you've got Windows XP, in which case, it doesn't seem to work.

 
Image

Blackgaze

Possibly Insane

Registered
  01/11/2002
Points
  3161

VIP Member
9th June, 2003 at 12:44:52 -

can pallete object work in TGF?

 
Formerly known as "Spiderhead".

Returned after four years.
www.youtube.com/user/sevlech for more infomation

Hayo

Stone Goose

Registered
  15/08/2002
Points
  6949

Game of the Week WinnerHas Donated, Thank You!VIP MemberGOTM 3RD PLACE! - APRIL 2009Weekly Picture Me This Round 27 Winner!Weekly Picture Me This Round 41 Winner!Weekly Picture Me This Round 45 Winner!
9th June, 2003 at 13:55:48 -

yeah, but only in 256 colour mode

 
www.hayovanreek.nl

Blackgaze

Possibly Insane

Registered
  01/11/2002
Points
  3161

VIP Member
9th June, 2003 at 14:15:55 -

hmmm i might as well try that.


 
Formerly known as "Spiderhead".

Returned after four years.
www.youtube.com/user/sevlech for more infomation
   

Post Reply



 



Advertisement

Worth A Click