SCI Studio 2.12 Released!

Brian_Provinciano I've released SCI Studio 2.12. I planned to release it a few days ago, but issues with the compiler slowed things down a bit. It was for the better though, since it's more full of features than it would have been if it was released earlier.

I'm now working on adding an inline assembler to the script compiler. It will work like this:

(method (draw)
DoSomething()
DoSomethingElse(1 2 234)
(asm
ldi ENABLED
aTop state
push1
pushi TRUE
callk DrawMenuBar 2
)
DoSomethingElseAgain(22 33 4454)
)

You will be able to place byte code anywhere within your normal code! That'll be part of 2.13 (a week or two from now).

http://www.bripro.com/scistudio
Robin_Gravel I can't download it. 404 error.

I guess you're working on the template's bugs.

Robin Gravel
AGI1122 It was up a little earlier, I downloaded it already.

Speaking of template bugs, I have found one. Walk to the bottom of the screen then after the character stops walk all the way to the right of the screen. Then when the character stops go up and watch what the ego will do. He starts moving to the right for some reason. The same thing happens if you go to the left as well. And it also happens if you go to the top then go left or right.

Also another bug(not sure if it has been fixed or not). The wander command will let the character wandering walk though a door using autodoor even when the door is closed.
AGI1122 Also Robin, you can download it off of my server since I host a mirror of the files. http://www.agigames.com/scistudio/

You should find every version of SCI Studio in that directory even 2.12.
Robin_Gravel Thanks for the help Chris.

I'll try the newest sci studio.

I'll check all the bugs in the template what you told me
but the freeze bug is a very serious problem for me.

Robin Gravel
Robin_Gravel Where is it, Chris?

The lastest version of sci studio I found is 2.11.
File name: scistudio21-20020701.zip

If I missed it somehow, let me know where it is.

Robin Gravel
AGI1122 I am not 100% sure which one is which, Brian has ftp access and uploads them as he pleases. It should be in there somewhere.

I beleive that file is the most recent version, but if it isn't Brian will probably upload it later.
Robin_Gravel Hi Chris.

Did you check if you have downloaded a 2.12 version or a 2.11 version?

Robin Gravel
AGI1122 The version I have right now is 2.12 It says it at the top of it. I downloaded it off of Brian's site, but it should be in that directory though. I will mail it to you. Check your mail.
Robin_Gravel Thanks Chris. I got it.

But the problem with the template's freeze is still here.

Robin Gravel
Brian_Provinciano I need to dig up the old Demo Quest source to figure out what it wrong with the "XXXXXX" thing. I've got so many CDs, it'll take a while.

Due to my reformat, I didn't have the agigames thing set up in my FTP program yet. I'll set it up and upload it.

I haven't encountered the walking right/left bugs. However, I only implemented the simple boundary so people farmiliar with AGI's template would feel more comfortable with it. By default in SCI games, the ego will walk off the screen. You should ALWAYS put control lines for boundaries over the entire screeen, unless you want the ego to walk to another room.
Lars Skovlund
Brian Provinciano wrote:

(asm
ldi ENABLED
aTop state
push1
pushi TRUE
callk DrawMenuBar 2
)
)


What would the point be? Your language already puts the SCI byte code to full use (at least I can't see anything missing), so there is really nothing that couldn't be done in the language that would be possible by using the assembler.
Brian_Provinciano I'm using it to help me build the VGA template more efficiently. I'm able to compile my scripts with half my code, and half disassembled byte code. Gradually, I'm converting the byte code to highlevel, compiling, and testing that it works the same.
AGI1122 I have been working with SCI Studio 2.12 today, and have been able to pin down where the memory loss problems exactly are. I turned on my resouce monitor and ran SCI Studio then I went to work on some scripts, the resource monitor kept showing a loss in percentages while the script editor was open. When I closed the script editor the loss stopped. But the memory didn't come back until I closed SCI Studio. Something in your script editor is draining the memory.
Brian_Provinciano
Chris Cromer wrote:

I have been working with SCI Studio 2.12 today, and have been able to pin down where the memory loss problems exactly are. I turned on my resouce monitor and ran SCI Studio then I went to work on some scripts, the resource monitor kept showing a loss in percentages while the script editor was open. When I closed the script editor the loss stopped. But the memory didn't come back until I closed SCI Studio. Something in your script editor is draining the memory.


The bad news is that it's beyond my control. I inspected it with the resource monitor, and discovered that Borland's VCL (the library used for all the GUI) isn't fully freeing the windows/controls. I created a simple two window application to confirm this, and it's true. I then discussed it with others using Borland's VCL, and they too, have the problem. The only way to free the memory is to close the program, then open it again. Win9x users may need to reboot! This is horrible! I'd switch it to another library, but it's got over three years of work in it, and it would invlove rewriting virtually the entire program.

XP/2000 (NT) can handle these leaks fine, but 9x (DOS) I guess can't.

The worst thing is that examining plain/empty Borland C++Builder VCL apps with the resource monitor, I've discovered that it takes up more memory that isn't freed just my moving/resizing the window, or even switching from the resource monitor back to the app. Now, when programs like SCI Studio have hundreds of controls/windows being created/moved/resized, it causes serious problems!

I started disliking Borland C++Builder a little while ago due to it's bugs, but now I REALLY dislike it!
AGI1122 Yeah that really does suck since I use win98. But if I leave the Resource monitor open it tells me right before my resources get too bad then I close SCI Studio and open it again... a bit of a hassle but at least my computer doesn't go critical on me.
AGI1122 I found another bug and fixed it myself in the template. When you are at the fastest speed you can't press "-" to go to a slower speed. Here is the fix:

Open MenuBar.sc and look for:

         (case MENU_SLOWERSPEED
            (if(< gSpeed 15)
               (send gGame:setSpeed(++gSpeed))
            )
         )


Then replace it with this:

         (case MENU_SLOWERSPEED
            (if(< gSpeed 16)
               (send gGame:setSpeed(++gSpeed))
            )
         )
Brian_Provinciano Thanks. I'll make a note to update it for the next release. I have the inline assembler done. When I'm done the new tutorials, I'll release 2.13.
AGI1122 I do have one question, where is the default speed set at when you first start and when you restart?

I looked though main.sc and a few other scripts but didn't see it. For some reason it is being set to 9 even though the normal speed set in game.sh is set to 8. I would like to fix this but don't know where the default is set for starting and restarting.
Brian_Provinciano If the speed was set to, say 9, in main.sc, the game would load really slowly! This is why the speed starts at 0 (no delay), then in initrooms.sc is set to the default.
AGI1122 Thanks, I found it and have fixed it so it uses the NORMAL_SPEED var. It was set to 6 in there.(though it was 9 but I guess I was wrong...)
Brian_Provinciano The speed var is the _delay_, while the number in the dialog box is just the speed shown to the player. This being the case, 0 is actually the fastest, but the player sees it as 15. 15 is the slowest, but the player sees it as 0.