Overlay custom objects?

  • 3 Replies
  • 3041 Views
*

Offline rainulous

  • 71
  • 10
  • I never picked up the key.
    • View Profile
    • Hartje Music
Overlay custom objects?
« on: October 19, 2012, 22:35:35 »
I'm looking to create a sort of vignette overlay, but I'm not even sure if it's possible. Is there a way to do this with custom objects?
Thanks for the stars, everyone!

*

Offline egomassive

  • 1852
  • 250
    • View Profile
    • egomassive games
Re: Overlay custom objects?
« Reply #1 on: October 20, 2012, 00:41:35 »
Certainly. Make an image of a vignette border 600 by 240 pixels. Use this code:
Code: [Select]
[Custom Object 1]
Image=Vignette.png
Tile Width=600
Tile Height=240
Offset X=-288
Offset Y=-108
Finally, place object the object in the bottom-right corner of layer 7. This will put it in front of everything else including other objects on layer 7.

There is a problem with objects appearing briefly after entering a screens. This is most noticeable when shifting to duplicate screens. The best remedy is to use a KS mod. KS Ex and KS+ both render objects on the first pass.

Here's an example vignette image I made to make sure I had the offsets correct

*

Offline GrayFace

  • 805
  • 61
    • View Profile
    • my site
Re: Overlay custom objects?
« Reply #2 on: November 01, 2012, 14:43:36 »
AFAIR, custom objects still appear with a little delay. That's why I used Template objects in Ball Tutorial, in KS Ex. Combined Fog in http://nifflas.lpchip.nl/index.php?topic=5017.0 is such simple object.
BTW, upcoming KS Ex version indeed always renders new screens in 1 pass, while the older versions did it so only if an appropriate option was set.
« Last Edit: November 27, 2012, 15:36:18 by GrayFace »

*

Offline plural

  • 187
  • 102
  • twice shy
    • View Profile
Re: Overlay custom objects?
« Reply #3 on: November 01, 2012, 20:26:45 »
The best and only way I've found to completely negate this (in the original KS and any mod version) is to make background/tileset tiles that are exactly the same as the overlaying object. That way the only way you'll notice is seeing Juni not being covered during the tick before the custom objects load in. Granted it takes a lot more work/redundancy to duplicate each custom object into a tileset but it works well.

To do a vignette I'd ignore layer 3 around the entire outside of each screen and use solid invisible blocks for ground/walls and layer 2 as the vignette double and layer 0 as most of the level geometry that the invisible blocks should mimic and layer 1 as any decoration you might need to be on top of that. Then make the parts of the screen inside the vignette as you would normally. And use the custom object with the info and placement that egomassive mentioned. That way the only way the illusion is broken is the second you see Juni not covered, but it's a lot less noticeable when it's only the area where she is and not the entire border/vignette every time. This is something I wish I thought to do a long time ago.