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 ... 5
1
Thanks, Doan!  I hope it's enjoyable for sure.

Think it's time to take a breather for a month or so, take some time to really sit down and enjoy the games posted here myself.

2
Excellent, thank you much.

3
I've uploaded the demo version for The Sect of Achturan for approval.  I'd actually done a silent upload a month ago and then promptly found a few minor issues that bugged the hell out of me, but this version's pretty solid; the older one can be discarded.

Left in the debugger code for fun.  Any and all feedback/criticism welcome for sure!

4
SCI Syntax Help / Re: Menu Bar Issues
« on: July 19, 2019, 10:08:03 PM »
Taking another look at this, now that I've switched to flags, gotten that working, and cleaned up a bunch of other stuff.

I see that Graph's a Kernel thing, and grGET_COLOURS is defined as 2, but I'm having some trouble figuring out just what this is doing.  Can/Does grGET_COLOURS get redefined to make this statement false in some cases?  Is there a reason this chunk could be screwing with my memory use?  As noted, the Colors function doesn't seem to work anyway in my game or when I plug those two above files into the template, though it does in the raw template, so I must still have something weird going on in my MenuBar script, but I'm having trouble seeing what it is.

5
SCI Syntax Help / Re: Can someone explain Flags to me?
« on: July 12, 2019, 10:08:30 PM »
That does seem to make the difference here, from a few brief tests.

6
SCI Syntax Help / Re: Can someone explain Flags to me?
« on: July 12, 2019, 08:00:42 PM »
Most telling, I guess, is that this:

Code: [Select]
(if (Said 'what')
(Bset 0)
(FormatPrint "Bset 0: %d" (Btst fAlleyLightBusted))
(Bset 5)
(FormatPrint "Bset 5: %d" (Btst fBrokenSandwichThrown))
(Bset 69)
(FormatPrint "Bset 69: %d" (Btst 69)))

shows that 0 and 5 get set, but the last printout still says "Bset 69: 0"  Moreover,

Code: [Select]
(Bset 0)
(FormatPrint "Bset 0: %d" (Btst fAlleyLightBusted))
(Bset 69)
(FormatPrint "Bset 5: %d" (Btst fBrokenSandwichThrown))
(FormatPrint "Bset 69: %d" (Btst 69)))

shows that Btst fBrokenSandwichThrown (which is the element 5) is getting set in this latter case as well, even with the number specified.  So 5 seems to be getting set in either case, which I guess may point to the issue being in selecting the array element, as troflip noted?  I checked setting 70, as well, and find that 6 gets set instead.

I'm not sure why, yet, though; I've gone back and recopied the Bset from this script again, and have experienced the same even when I leave it as is (allowing for the no return warning to pop-up).  I've run a search and verified that there isn't some other Bset procedure I've added somewhere else that's getting called in lieu of the one in Main.sc (and there's only the one there).  It does seem strange.

7
SCI Syntax Help / Re: Can someone explain Flags to me?
« on: July 10, 2019, 10:05:09 PM »
RoomScript event handler:

Code: [Select]
(if (Said 'throw>')
(if (Said '/rock/light')
(if (not (gEgo has: INV_LIEVENROCK)) (Print 6 57)
else (self setScript: lightsOut)))
(if (Said '/rock/window')
(if (not (gEgo has: INV_LIEVENROCK)) (Print 6 57)
else (Print 6 93)))
)

and then it's actually set in the lightsOut script:

Code: [Select]
(instance lightsOut of Script

(method (changeState newState)
(= state newState)
(switchto state
(
(ProgramControl)
(Print 6 58)
(theLight loop: 2 cel: 0)
(= seconds 1)
)
(
(= cycles 1)
(gEgo view: 002 loop: 1 cel: 0)
)
(
(= cycles 1)
)
(
(if (!= (gEgo cel:) 5) (gEgo cel: (+ (gEgo cel:) 1)) (self changeState: 2)
else (= seconds 1))
)
(
(= cycles 1)
)
(
(if (!= (theLight cel:) 2) (theLight cel: (+ (theLight cel:) 1)) (self changeState: 4)
else (= cycles 1))
)
(
(= gDefaultPalette 1)
(Rm drawPic: 6)
(theDoor cel: 1)
(theFirstDumpster cel: 1)
(theLight loop: 3)
(thePuddle cel: 1)
(if (not (Btst fGreaseJarInTrash)) (theSecondDumpster cel: 1)
else (theSecondDumpster cel: 3))
(theTrashPile loop: 1)
(theTrash1 cel: 1)
(theTrash2 cel: 1)
(theTrash3 cel: 1)
(theTrash4 cel: 1)
(theWallLine show:)
(Bset fAlleyLightBusted)
(gEgo put: INV_LIEVENROCK)
(theGlint dispose:)
(= cycles 1)
)
(
(gEgo view: 0 loop: 1 cel: 7)
(Print 6 59)
(= seconds 2)
)
(
(PlayerControl)
(Print 6 60)
(= cycles 1)
)
)
)
)

8
SCI Syntax Help / Re: Can someone explain Flags to me?
« on: July 10, 2019, 08:46:47 PM »
Yeah, throwing the rock corresponds to the alley light bustage.

Huh.  It does say it's 69, so that seems a good thing.  I guess it's Btsting the right one, since it keeps treating it as false, instead of switching to the else Print statement.

The fifth flag is for an event taking place on another room altogether, and one that isn't even in use yet outside of the enumeration (all events still utilize the original global variable).  Search confirms that it doesn't pop up in any of the other files...

9
SCI Syntax Help / Re: Can someone explain Flags to me?
« on: July 10, 2019, 06:35:49 PM »
I've currently got 71 flags enumerated and a 10 item gameFlags array.  gameFlags is itself the final global variable.  I've got 73 other globals before that I've added, though the ones related just to this screen are commented out, bringing that to 71.  None of the other three global variables which were previously associated with this screen, which are also used in other rooms, should be in play here.

(FormatPrint
    "gameFlags: %04x %04x %04x %04x %04x"

dump for gameFlags 0 - 9:

Starts out:
0000 0000 0000 0000 0000 0000 0000 0000 0000 0000
which is fine.  A couple will get set to true initially, but not implemented, so all false is good.

Nudge bag:
0400 0000 0000 0000 0000 0000 0000 0000 0000 0000

Throw rock:
8400 0000 0000 0000 0000 0000 0000 0000 0000 0000

Nudge bag after throw rock:
0400 0000 0000 0000 0000 0000 0000 0000 0000 0000

fAlleyLightBusted is the very first flag enumerated, so my understanding's fuzzy, but the addition there is expected?  fTrashMoved is the second to last of 71, so that one looks to be in the wrong place as far as I understand.  It's resetting the whole first byte or maybe array element altogether maybe when it flags what seems to be the wrong bit anyway?

10
SCI Syntax Help / Re: Can someone explain Flags to me?
« on: July 10, 2019, 02:23:45 AM »
I do Compile All each time before a test run and almost always rebuild just to kill the redundancy, but I just went through and compiled both Main and rm006 specifically to be sure.  Still no luck.  No saved games; I've largely relied on the debugging shortcuts, but even when I do save, I crush any save files to be safe.  There aren't any currently.

In game.sh, I just have the enum in a list format:

Code: [Select]
(enum
fAlleyLightBusted
fArtBoxFirstOpened
fArtifakeSwapped
       
        fStinkySandwichKickout
fTrashMoved
fWearingCoveralls
)

No numbers specified, so I don't *think* that's the case, but is it possible?

11
SCI Syntax Help / Re: Can someone explain Flags to me?
« on: July 09, 2019, 06:23:09 PM »
Now I'm going crazy.

A month or so ago, I set up flags all around and they all seemed to work without a problem.  I foolishly reverted to globals, but recently began to switch back to flags after figuring out a way to work with scripts to keep them positive heapwise.

But one's giving me trouble now that I can't figure out, and that's only after editing one room script.

Code: [Select]
(procedure (Btst flagEnum)
;Test a boolean game flag
(return (& [gameFlags (/ flagEnum 16)] (>> $8000 (mod flagEnum 16))))
)


(procedure (Bset flagEnum  &tmp oldState)
;Set a boolean game flag
(= oldState (Btst flagEnum))
(|= [gameFlags (/ flagEnum 16)] (>> $8000 (mod flagEnum 16)))
(return oldState)
)

(procedure (Bclr flagEnum  &tmp oldState)
;Clear a boolean game flag
(= oldState (Btst flagEnum))
(&= [gameFlags (/ flagEnum 16)] (~ (>> $8000 (mod flagEnum 16))))
(return oldState)
)

They are as copied directly from this thread, other than I added the return statements to bypass warnings.

But for example, if I run this:

Code: [Select]
(if (Said 'nudge/bag,trash')
(if (not (Btst fTrashMoved)) (Print 6 23) (theTrashPile ignoreControl: ctlWHITE setMotion: DPath 138 148 loop: 0) (Bset fTrashMoved)
else (Print 6 28))
)

I get the correct Print statement and theTrashPile moves, BUT it will just let me do this repeatedly and subsequent Btst fTrashMoved indicates it's false.

I have another flag, fAlleyLightBusted, that seems to stick after I throw a rock at the light... until I nudge the trash, at which point it seems to go false. Enter and leave the room multiple times, no problem, until the nudge.  Neither flag even has a related Bclr; once they're set once, they should be set forever.  They're also completely unrelated actions; the only Bset for fTrashMoved is the one above and, again, everything in the "if" statement happens except the flag set.  fAlleyLightBusted doesn't even get set in the RoomScript, it's in a different Script (although same script doc) altogether.

Basically, it all seems fubar, at least when it comes to this damn bag.  I tried setting up a test:

Code: [Select]
(if (Said 'what')
(FormatPrint "Trash Moved: %d" (Btst fTrashMoved))
(FormatPrint "Lights Out: %d" (Btst fAlleyLightBusted))
)

and find that fAlleyLightBusted does go from false to true (or, more accurately, a very large negative number, is that good?) when the rock is throw.  fTrashMoved remains 0 when the nudge script kicks in.  And fAlleyLightBusted goes back to 0 when the nudge script is run. 

Should the test above accurately reflect flag settings, as I feel like it should?

I've double and triple checked that all previously global variables have been correctly renamed to flags (and these flags/variables only apply to this single room).  The flag names match the enums given in game.sh.

Is there a way to flush print the contents of gameFlags all over so I can check if the wrong bit is getting set for the bag?  I wouldn't even know how to go about fixing that, but I really just can't see anything that would cause this behavior and it's the only thought I'm having.

12
SCI Syntax Help / Re: Menu Bar Issues
« on: July 09, 2019, 09:09:04 AM »
That could be it, regarding ScummVM; I've renamed it and now it's saying it can't find game data, so I'll step through that set of stuff to see if I can figure anything out.

I've found that I can reproduce in the template game by copying the game.sh and a slightly modified version of MenuBar.sc (just modded to remove references to globals/publics in my Main).  Attaching here. if anyone's kind enough and inclined to take a look.  From what I can tell, the game.sh setup is right, and I'm guessing the problems would be more drastic if not, so that leaves something in MenuBar?

EDIT:  Alrighty, if I comment out this bit:

Code: [Select]
(if (< (Graph grGET_COLOURS) 9)
(SetMenu MENU_COLOURS 32 0)
else
(SetMenu MENU_COLOURS smMENU_SAID '/color')
)

the Inventory text is fixed and everything seems to work throughout the menu, except Colors which just does nothing at all.  Colors actually doesn't seem to work whether I leave the code in or not (which I'd failed to notice before), so not sure if it's related.  This bit appears verbatim to the template game, although I'm using Sierra Script here.  Not sure if the difference could be in that?  I'm not really certain what the first condition is checking/doing, so while it seems technically valid, I don't know if it's doing something weird.

Anyway, this seems to be the stomper, or at least it's making all the visible difference when I comment it out so far as I can tell...

13
SCI Syntax Help / Re: Menu Bar Issues
« on: July 08, 2019, 09:05:43 PM »
Decided to revisit this a bit today, as I'm moving onto a new section of the game and figure it's probably worth figuring out memory issues sooner rather than later...

I've confirmed that DisposeLoad isn't disposing of the MenuBar script in Main.sc (and double-checked the script constants to make sure I didn't get that confused somewhere.

I made sure the latest ScummVM was installed, but get the following when I try to load it:


Code: [Select]
The game in 'C:\Users\nil_g\Documents\Projects\Games\Sect of Achturan\The Sect
of Achturan\' seems to be an unknown SCI [SCI0, SCI01, SCI10, SCI11, SCI32]
engine game variant.

Please report the following data to the ScummVM team at
https://bugs.scummvm.org/ along with the name of the game you tried to add and
its version, language, etc.:

Matched game IDs: astrochicken, christmas1988, christmas1990, iceman, camelot,
longbow, ecoquest, funseeker, hoyle1, hoyle2, hoyle3, jones, kq1sci, kq4sci,
laurabow, lsl1sci, lsl2, lsl5, cnick-lsl, cnick-kq, cnick-laurabow,
cnick-longbow, cnick-sq, mothergoose256, msastrochicken, pq2, qfg1, qfg2,
sq1sci, sq3, sci-fanmade

  {"resource.001", 0, "ae5701f8065566ae0083be1717c9a7d5", 956919},
  {"resource.map", 0, "9ada910254421dc90fe7692567b2c799", 1614},

I've seen this issue noted on the forum, although can't find it for the life of me right now, so I'll take another look when I'm a little more together to see if I can get that running.

I've also plugged in the PrintBadMem procedure, but found it's returning as expected when I call it in the title screen/first room, although the menubar is already displaying wrong by then (so I assume it already should be coalescing).  The string looks right, so I'm not sure if this tells us anything or if, just as likely, I'm doing something wrong.

I did notice that throughout the game the incorrect characters on display within the Inventory text appear to change.  They also changed to a "> " when I added/ran with the PrintBadMem procedure.  Perhaps this can help track down where things are occurring?

Because I'm so green at programming, I'm trying to wrap my head around memory population and order.  Do include and use statements get substituted during preprocessing or linking?  Does this even affect the order of memory population, or am I just wrong altogether?  I've started delving a little deeper into coding, but it's still pretty alien to me.  I'm sure I can find these answers somewhere else, if it's a lot.

But unfortunately, I'm still struggling to figure out where the issue here might lie.  If memory's getting overwritten/corrupted, does the fact that it's only like two or three letters mean that it's just plugging in like 3 bytes where it shouldn't be?  Am I wrong in assuming that that means there's probably something screwed up somewhere else, wherever it's expect that memory to be in line with whatever else it's supposed to be doing?

Sigh.  Guess I won't give up my day job.

14
I've uploaded the demo for the thing I've been working on...  Unfortunately, I discovered afterwards that some save game files seem to lock up the game when you go to restore.  Most of them seem to be working without issue, but that could definitely be annoying.  That and the Inventory possible-memory menu text aside, though, it should be pretty solid...  If I can sort the occasional save game glitch, it'd be good to reupload.

15
SCI Syntax Help / Re: Menu Bar Issues
« on: June 25, 2019, 03:32:18 PM »
I'll have to try stepping through as suggested and see what happens.

It hasn't run through ScummVM yet; I used SVM once years ago to play through Sam and Max a bit, but am not super familiar with it.  It seems to play other fan games quite well, but I'm getting some kind of error attempting to load the game, a hashing issue with the resources that's mentioned elsewhere on this forum.  I'll play with it, though; theoretically it's working with fan SCI0 games and has for years, so there's probably something to be done.

Don't *think* DisposeLoad's tanking it from a glance, but I'll definitely take a look through things for that sort of possibility as well, not a thing I'd considered for sure.

Pages: [1] 2 3 ... 5

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

Page created in 0.108 seconds with 21 queries.