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....
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
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.
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
Assault Andy Administrator
I make other people create vaporware
Registered 29/07/2002
Points 5686
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.
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.
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.
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.