Author Topic: SCI0 newRoom transition effects bugged?  (Read 4243 times)

0 Members and 1 Guest are viewing this topic.

Offline WD-40

SCI0 newRoom transition effects bugged?
« on: July 24, 2015, 04:04:03 PM »
Hello, this is my first post. I would like to address an issue about the SCI0 game template, but first a little about me. I'm a nooby SCI programmer, just started a couple weeks ago. However, I'm not new to programming and have been at it for a couple decades now. I'm a major fan of all the Sierra adventure games and am excited to have found this community!

Now about my problem: I wanted to make the screen checkboard fade out/in when changing rooms, but I couldn't find any information about how to do it on this forum or in the source code of other fan games. After looking at the template code for a couple hours I determined that the following code snippet was put in the wrong class:

(if(< paramTotal 2)
    = gDefaultPicAni Random(0 5)
)(else
    = gDefaultPicAni picAni
)

I moved this snippet from "Main.sc: instance public Template of Game, method (newRoom roomNum picAni)" to "Game.sc: class Rm of Rgn, method (newRoom newRoomNum picAni) and now newRoom transition effects work properly just by doing the following:

(send gRoom:newRoom(2 dpCLOSEREOPEN_CHECKBOARD))

Let me know if this is a bug that has already been addressed, or if I'm completely mistaken (I'm still really new to SCI programming)

Thanks!
« Last Edit: July 24, 2015, 04:14:42 PM by WD-40 »



Offline troflip

Re: SCI0 newRoom transition effects bugged?
« Reply #1 on: July 24, 2015, 04:35:54 PM »
That sounds reasonable. Let us know if you find any ill effects from it.

The template game came from LSL3 (I think), and sure enough LSL3's code looks like the SCI0 template game. Maybe it didn't use room-to-room transitions, and so no one noticed there was no easy way to trigger them.
Check out my website: http://icefallgames.com
Groundhog Day Competition

Offline Kawa

Re: SCI0 newRoom transition effects bugged?
« Reply #2 on: July 24, 2015, 04:41:28 PM »
Like in SCI11, you can just use the room's style property:
Code: [Select]
(instance public rm001 of Rm
(properties
picture scriptNumber
style dpCLOSEREOPEN_TOP //Added this line.
// Set up the rooms to go to/come from here

Looking at LSL3 right now, it has random transitions.
« Last Edit: July 24, 2015, 04:45:55 PM by Kawa »

Offline WD-40

Re: SCI0 newRoom transition effects bugged?
« Reply #3 on: July 24, 2015, 05:27:00 PM »
Looking at LSL3 right now, it has random transitions.

Yes, it's supposed to be random unless a second parameter is provided with a transition id. This bug ignores the second parameter and just makes transitions random no matter what. Not really annoying at all unless you want the checkerboard fade to work.

Regarding SCI1.1, I tried downloading/running the Alpha version but Windows says the executable is "not a valid Win32 executable".  :(
« Last Edit: July 24, 2015, 05:31:02 PM by WD-40 »

Offline Kawa

Re: SCI0 newRoom transition effects bugged?
« Reply #4 on: July 24, 2015, 05:29:58 PM »
Neither template is a Windows program to begin with.

Seriously, for either template, if you want a particular room to have a particular transition, just use the style property.

Offline WD-40

Re: SCI0 newRoom transition effects bugged?
« Reply #5 on: July 24, 2015, 05:35:00 PM »
Neither template is a Windows program to begin with.

Seriously, for either template, if you want a particular room to have a particular transition, just use the style property.

Changing the style property is the first thing I tried, but it had no effect. I'm guessing it only works for SC1.1 games. 

I'm using SCICompanion v2.1.0.5. It runs fine, I couldn't get V3 to run at all.
« Last Edit: July 24, 2015, 05:37:40 PM by WD-40 »

Offline Kawa

Re: SCI0 newRoom transition effects bugged?
« Reply #6 on: July 24, 2015, 05:43:45 PM »
I checked it twice to make sure. Style property is the way to go.

Offline troflip

Re: SCI0 newRoom transition effects bugged?
« Reply #7 on: July 24, 2015, 05:47:23 PM »
I'm using SCICompanion v2.1.0.5. It runs fine, I couldn't get V3 to run at all.

That's odd. What OS are you running? It's possible I've made some changes that prevent it from running on old OS's (XP, etc..), I'm not sure.
« Last Edit: July 24, 2015, 05:54:47 PM by troflip »
Check out my website: http://icefallgames.com
Groundhog Day Competition

Offline WD-40

Re: SCI0 newRoom transition effects bugged?
« Reply #8 on: July 24, 2015, 06:05:09 PM »
I'm using SCICompanion v2.1.0.5. It runs fine, I couldn't get V3 to run at all.

That's odd. What OS are you running? It's possible I've made some changes that prevent it from running on old OS's (XP, etc..), I'm not sure.

Windows XP... I guess it's time to upgrade :P

Offline WD-40

Re: SCI0 newRoom transition effects bugged?
« Reply #9 on: July 24, 2015, 06:07:53 PM »
I checked it twice to make sure. Style property is the way to go.

You're right, I took another whack at the style property and it works, so long as it's done above "(super:init())". I guess I have two methods of doing it now ;D

Offline Kawa

Re: SCI0 newRoom transition effects bugged?
« Reply #10 on: July 24, 2015, 06:19:57 PM »
I didn't say "change it in init" though. I quite clearly showed it set in the room's properties block. ???

Offline WD-40

Re: SCI0 newRoom transition effects bugged?
« Reply #11 on: July 24, 2015, 06:34:15 PM »
I didn't say "change it in init" though. I quite clearly showed it set in the room's properties block. ???

Right again (I missed that). I like your way much better now :)

I guess my way of doing it could work better for dynamic transitions. Like say if you wanted a checkerboard effect the first time a room loaded, but something more standard every time after that.  not super useful though.
« Last Edit: July 24, 2015, 06:36:36 PM by WD-40 »

Offline lskovlun

Re: SCI0 newRoom transition effects bugged?
« Reply #12 on: July 24, 2015, 07:07:07 PM »
I guess my way of doing it could work better for dynamic transitions. Like say if you wanted a checkerboard effect the first time a room loaded, but something more standard every time after that.  not super useful though.
It is often used to select different transitions based on which room you came from.

Offline troflip

Re: SCI0 newRoom transition effects bugged?
« Reply #13 on: July 24, 2015, 08:09:25 PM »
Windows XP... I guess it's time to upgrade :P

When I upgraded the SCI Companion project to build in VS 2013, by default it removed support for building a binary  that worked on XP. I've set it to use the XP toolset now (and it still compiles), so with any luck the next build I release will work on XP.
Check out my website: http://icefallgames.com
Groundhog Day Competition

Offline MusicallyInspired

Re: SCI0 newRoom transition effects bugged?
« Reply #14 on: July 24, 2015, 08:38:19 PM »
Lol I remember trying to get old Companion to work on an old Win95 laptop so I could continue work on KQ2SCI at school. Wouldn't work without a certain dll. I plopped it in there and it worked, though! A few graphical glitches in image preview thumbnails, but working on resources in editors worked fine. A strange occurence, though. In the picture editor these horizontal and vertical lines the colour of the Visual paletye entry selectednwould span the whole editor screen and converge on the cursor crosshair. Was kind of handy sometimes, actually. Never happened on XP and up.
Brass Lantern Prop Competition


SMF 2.0.14 | SMF © 2017, Simple Machines
Simple Audio Video Embedder

Page created in 0.117 seconds with 25 queries.