Jibble

Author Topic: Module: EpicShadows 1.0 (AGS 3.02+) - based on Shadow module by SSH  (Read 12413 times)

Slasher

  • .
    • I can help with AGS tutoring
    • I can help with scripting
    • I can help with story design
    • Lifetime Achievement Award Winner
    • Slasher worked on one or more games that won an AGS Award!
    •  
    • Slasher worked on one or more games that was nominated for an AGS Award!
SOLVED: Module: EpicShadows 1.0 (AGS 3.02+) -PROBLEM
« Reply #20 on: 27 Aug 2016, 09:35 »
Hi

when the player starts from a walkbehind the shadow fails to appear. The object is spelled right and is just above walkable area. It is ok in other rooms

any ideas?
« Last Edit: 29 Aug 2016, 11:32 by slasher »

Slasher

  • .
    • I can help with AGS tutoring
    • I can help with scripting
    • I can help with story design
    • Lifetime Achievement Award Winner
    • Slasher worked on one or more games that won an AGS Award!
    •  
    • Slasher worked on one or more games that was nominated for an AGS Award!
I edited the room to not have that particular walkbehind and it works as it should... all ok (nod)
« Last Edit: 30 Aug 2016, 13:17 by slasher »

Hi there! As I'm still using this module, I did a quick and dirt fix for it to work in modern AGS versions (module compatibility setting wasn't cutting it). Posting it here in case anyone wants it: https://drive.google.com/file/d/1iLAHrmQ2Fnqp_hfuuPNCz-g-O77KOf7O/view?usp=sharing

As I'm still using this module, I did a quick and dirt fix for it to work in modern AGS versions (module compatibility setting wasn't cutting it).

This module compiles properly if you set "Script compatibility level" to 3.4.1 (3.5.0 was the first version where System.ViewportWidth and other viewport-related things were deprecated). Or were there any other problems?

As I'm still using this module, I did a quick and dirt fix for it to work in modern AGS versions (module compatibility setting wasn't cutting it).

This module compiles properly if you set "Script compatibility level" to 3.4.1 (3.5.0 was the first version where System.ViewportWidth and other viewport-related things were deprecated). Or were there any other problems?
There were! It wasn't properly hiding the dummy object when changing rooms.

There were! It wasn't properly hiding the dummy object when changing rooms.

Do you know what happened to be a reason?
I'm comparing original code and your version, and don't see much difference tbh, rather than for initial object position. Everything else is mostly GetViewport* functions replaced with Camera counterparts.
I'm asking because in theory I'd like to keep AGS 3.5.* backwards compatible as much as possible.

One thing that I might mention, you create new camera every time a room is loaded, but that camera is never deleted.
Custom Viewports and Cameras are bit special in a way that they are not automatically deleted even when the pointer variable is gone. You have to actually call .Delete() for it.
(All created cameras are stored in Game.Cameras[] array)

Code: Adventure Game Studio
  1. this.shadowsCanvas = DynamicSprite.Create(cam.Width, Room.Height-this.oShadows.Y);
  2.  
Probably you could just use Game.Camera.Width instead here.
« Last Edit: 01 Jun 2021, 00:09 by Crimson Wizard »

One thing that I might mention, you create new camera every time a room is loaded, but that camera is never deleted.

Off-topic, but this reminded me that in "La Maleta", a warning.log was generated after I finished playing with a huge list of dynamic sprites that were never deleted. Potajito, maybe you've already fixed that, but if not, you might want to look into it :)
« Last Edit: 01 Jun 2021, 08:17 by Laura Hunt »

There were! It wasn't properly hiding the dummy object when changing rooms.

Do you know what happened to be a reason?
I'm comparing original code and your version, and don't see much difference tbh, rather than for initial object position. Everything else is mostly GetViewport* functions replaced with Camera counterparts.
I'm asking because in theory I'd like to keep AGS 3.5.* backwards compatible as much as possible.

One thing that I might mention, you create new camera every time a room is loaded, but that camera is never deleted.
Custom Viewports and Cameras are bit special in a way that they are not automatically deleted even when the pointer variable is gone. You have to actually call .Delete() for it.
(All created cameras are stored in Game.Cameras[] array)

Code: Adventure Game Studio
  1. this.shadowsCanvas = DynamicSprite.Create(cam.Width, Room.Height-this.oShadows.Y);
  2.  
Probably you could just use Game.Camera.Width instead here.
True that! Thanks for mentioning. I used Game.Camera.Width initially, then made some changes, then deleted them and that remained there. I'm still trying to understand the camera/viewport system and their differences D:

One thing that I might mention, you create new camera every time a room is loaded, but that camera is never deleted.

Off-topic, but this reminded me that in "La Maleta", a warning.log was generated after I finished playing with a huge list of dynamic sprites that were never deleted. Potajito, maybe you've already fixed that, but if not, you might want to look into it :)
Yeah, that should be fixed now!