Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - NilG

Pages: 1 2 [3] 4 5 6
SCI Syntax Help / Re: Can someone explain Flags to me?
« on: June 12, 2019, 05:07:44 AM »
Is $8000 hex?  I know how to convert hex, but I'm a little fuzzy on how it applies here, if so?  I've got no real experience with bitwise operation; I feel like I get the most basic of concepts, but I'm definitely lacking in the applicability department, so I'm kind of slow at translating when it comes up.

SCI Syntax Help / Re: Can someone explain Flags to me?
« on: June 11, 2019, 12:16:13 PM »
Awesome!  I just counted and I've got 70 global binary variables in what's probably a little less than a quarter of the full game.  I can shift quite a few local variables over this way as well, which could help trim the necessary logic from some of the main rooms into the specific room/input scripts.  My heap's shifting further from nightmare to comfortable with each trick you all pass on.

Might not be bad to compile some article on the Wiki for heap management tricks like these for some of us more amateur programmer types.  Perhaps I'll take some time to at least start on something like that; it'd be nice to contribute for sure in content if not coding and ideas.

SCI Syntax Help / Re: Loading External Scripts on the Fly?
« on: June 11, 2019, 12:42:19 AM »
 That's interesting, I'll have to read through and see; that certainly seems like it could be a way of going about it.  Passing a few var copies should still be kinder on the memory for the room in general than a couple lines of logical operations.

I'll have to check into the flag trio, too.  I'm not familiar with them, but see the code bit pasted in the QFG1 thread.  Most of the global variables I've created are TRUE/FALSE so far, so if there's that wide a gap in memory usage, it could definitely be worth implementing, assuming I can sort through it.  A generous assumption, to be sure, but...

SCI Syntax Help / Re: Loading External Scripts on the Fly?
« on: June 10, 2019, 02:45:25 PM »
Excellent, so parsing the input as with the QFG1 sample and Kawa's

((ScriptID 301 0) handleEvent: pEvent)

syntax which was correct, I do seem to be able to do this now.  DisposeScript works after to seemingly free up the space again.

Copied over all the looks for one room; I am receiving a compiler error for events which include variables from the originating script (Undeclared identifiers, Unknown variables, etc).  I can probably chop it so that the bulk of these events are taken care of externally while the ones requiring local variables remain in the original script.  Is that probably the best way to go?  It should certainly help with the space, but I wouldn't be adverse to keeping all of the responses themselves confined to the one script if possible.

SCI Syntax Help / Re: Loading External Scripts on the Fly?
« on: June 10, 2019, 01:31:41 PM »
Nice, thank you both, I'm going to try some of these out.

I kid you not, I took a peek at QFG1 last night thinking they might have done this, including your uploaded decompile files, Charles.  For some reason I looked at "ask" (which seems to occur pretty consistently internally, though I hadn't thought to check with the chatty castle guard) instead the more likely "look."  Probably should have been a little more thorough there.

SCI Syntax Help / Loading External Scripts on the Fly?
« on: June 09, 2019, 09:48:07 PM »
This may be a stupid question, but I've got a couple of rooms that are on the edge in terms of heap space, and it's causing some issues already (like can't open Inventory at times).  The rooms are basically done, but the game itself will probably have more quite a few more global variables and things that will end up pushing them over.  I'm looking into tightening things up, but I was wondering if there is any way to load an external script on the fly?

What I'd really like to do is have, say, one script that deals with 'ask' responses and one that deals with 'look' responses for this room.  I'm trying to account for as much user input as I can, and if I could take even just these two subsets of user inputs and set it in some way that an external script is called when the user 'asks' something then disposed immediately after, for example, I feel like it could go a long way to alleviating heap issues.  It's hacky, but it would get the memory where it needs to be if just the handling of these two inputs could be offloaded and put into memory only on-demand.

I may be grossly misunderstanding things here, but just checking on the possibilities.  I'm looking for ways to legit tighten up and rein in the script as well.  I'm hoping not to have to cut things, though that will probably be the only alternative for at least one of the rooms at this point, if I can't figure something else out, so figured I'd ask at least.

SCI Syntax Help / Re: Dialog Box Edges Hiding Objects Behind
« on: June 08, 2019, 04:47:47 AM »
It seems like adding and initing a PV directly doesn't do anything; no compiler errors or anything, the object just isn't appear.  Strange, I think, but I could just be missing something.

Out of curiosity, what do you mean when you say that PVs exist for automatic re-addition to the background on restore?  I don't know much about the save/restore process, but without this object type specifically, things wouldn't show up?

SCI Syntax Help / Re: Dialog Box Edges Hiding Objects Behind
« on: June 07, 2019, 09:03:33 PM »
That makes sense, then, I didn't realize the Views were added then replaced.  If the PVs utilize less room, do they still end up in the space in memory where the Views were before?  My limited understanding is that heap doesn't get any defragging, so do the deleted Views just leave holes which can be utilized by smaller chunks, if any arise?  I'm not very memory knowledgeable, aside from the bits I've read here, and there may be more for me to read and experiment with to better understand.

As for the animated background objects, makes sense too.  I wasn't sure after reading through the Animate kernel call if it applied to objects added to the pic (and also didn't realize that the Views and Acts were replaced by a different object class).  I can certainly deal with any clipping around text that has to result from background objects anyway, just figured I'd ask.

SCI Syntax Help / Re: Dialog Box Edges Hiding Objects Behind
« on: June 07, 2019, 07:36:51 PM »
Follow up, I also tried this on a second room that had very limited memory just to see if memory usage was really positively affected.  What I found in this case is that the room has just a bit less memory after committing about a dozen view using addToPic: and that it looks like the heap space is way more fragmented than it was before (attached).

Would this be expected using addToPic?  Just about everything should be disposing between each change of the room, and this fragmentation occurs even if I just alt-T directly to the room from the opening, so there shouldn't be junk carrying over.  There were previously only two listings until addToPic was implemented all around.  Is it a matter of ordering things better, or is this just a thing that happens?

SCI Syntax Help / Re: Dialog Box Edges Hiding Objects Behind
« on: June 07, 2019, 07:02:27 PM »
Nice, thanks, addToPic: does seem to do the trick and save a bit on memory to boot.

Some of the backgrounds objects I'd like to add I initially defined as actors so that they could have cycling animations occurring.  I see that I can pull the same trick with Act new: and addToPic, but it doesn't seem that using setMotion in that call

Code: [Select]
((Act new:) view: 532 loop: 2 cel: 0 posn: 83 85 setPri: 1 addToPic: setMotion: Fwd)
works to provide movement.  I'm taking a look at the Animate kernel call, not sure if that could be helpful?  I haven't done any direct work with cast or gCast, though, and haven't figured out yet how it works, if it's even the right thing to look into.  Would this be the right direction to experiment in, or am I going about it all wrong?  I feel like it's probably possible, although it could just be wishful thinking.

SCI Syntax Help / Dialog Box Edges Hiding Objects Behind
« on: June 01, 2019, 12:51:54 PM »
Just going to go for broke and ask this one, slight as it is, since I notice it every time I play through and forays into the two windows scripts haven't made me any smarter.

I've noticed when dialog windows open, they seem to hide objects a few pixels to either side of them.  The attached is an example.

I'm a shitty artist and trying to work around this by creating most background objects as separate views placed onto the scene.  It ain't pretty, but it's prettier than my attempts at vector-based art.

This really isn't a big deal and doesn't affect play at all, I just notice that background objects like the bookcase in the attached get hidden around the left/right sides of each dialog window (showing the yellow wall instead in this case) and was wondering if there's a modification that can be made to prevent this while maintaining pretty much everything else as is about the dialog box?

SCI Syntax Help / Re: Music/Playing Note Sticks When Leaving a Room
« on: June 01, 2019, 12:42:48 PM »
That's true, portability; I guess .NET's still required, which is the big one?  I seem to have worked out most of the issues here to some extent and will keep looking at things.  This one's SCI0, so I don't have the full extent of goodies available for 1, but I wasn't sitting around as a kid thinking about how limited those Sierra games were back then, either, just marveling at how limitless they felt.  In this case, I guess it's go retro or go home.    :D

SCI Syntax Help / Re: Music/Playing Note Sticks When Leaving a Room
« on: May 31, 2019, 03:46:12 PM »
Just another note, "fixed" it by switching the flute over to a plucked instrument with a slow enough release that the sound keeps through the duration.

I'll probably want to revisit and either sort it here or get sciAudio implemented after some practice.  I preferred the original sound in this track, and I do really enjoy the fact that exporting to mp3 retains the effects used on the MuseScore mixer, adding some versatility without really sacrificing the retro sound (imho).  Some of the tracks are less than ideal through the GM driver, though nothing completely unexpected yet.

Anyway, for the time being, I'll probably stick to this hacky track since at least it plays without shitting all over literally every other room, haha.  Still interested in learning more about these things, though.

SCI Syntax Help / Re: Music/Playing Note Sticks When Leaving a Room
« on: May 31, 2019, 02:43:54 PM »
Oh, that's good to know, then.  It's SCI0, wanted to stick with the parser and early 90s kind of feel overall with this one, at least.

SCI Syntax Help / Re: Music/Playing Note Sticks When Leaving a Room
« on: May 31, 2019, 01:22:30 AM »
I'd really just used Soundbox at first because I'd seen mention of its use on the boards here.  It seemed like the MIDI files could be imported directly without issue, so I wasn't sure if Soundbox was advised for any specific reason.  When I decided to add loop points to them, though, it looked like Soundbox was again necessary, since I think the Companion editor only allows enabling and disabling of existing loop points?

It's also all brand new.  I've started working on the MIDIs themselves a couple of weeks ago, but just started monkeying with them and the game last week.  That and my status as not-really-any-kind-of-programmer makes it all a real learning experience.  I am positive that I'm doing most things pretty ugly while learning the ropes.    :D

The driver theory sounds pretty reasonable, if also like something that'll guarantee the need to rethink the attack.

Pages: 1 2 [3] 4 5 6

SMF 2.0.19 | SMF © 2021, Simple Machines
Simple Audio Video Embedder

Page created in 0.053 seconds with 20 queries.