Free Slice Behavior in Nightlies

Ask and answer questions about making games and related topics. Unrelated topics go in that other forum.

Moderators: marionline, SDHawk

Post Reply
User avatar
Meatballsub
Liquid Metal Slime
Posts: 996
Joined: Mon Oct 15, 2007 6:39 pm
Location: Northwest Georgia
Contact:

Free Slice Behavior in Nightlies

Post by Meatballsub »

I'm in the process of converting Ruin over to the nightly version, and I can already tell you of two issues that have risen since the change.

Free Slice isn't working how it was in Beezlebufo. It essentially is not clearing anything on the screen from what I can tell. For example, it is ignoring a command like free slice (encounterslice) in my game. Was there a change in how slices are handled in the nightly versions?
User avatar
Bob the Hamster
Lord of the Slimes
Posts: 7660
Joined: Tue Oct 16, 2007 2:34 pm
Location: Hamster Republic (Ontario Enclave)
Contact:

Post by Bob the Hamster »

Normally, if a "free slice" command is not working, my first guess is that you accidentally loaded two copies of the slice you are trying to free:

Code: Select all

variable(sl)
sl := load hero sprite(0)
sl := load hero sprite(0)
free slice(sl)
The code above will look as if free slice has done nothing, because there were two copies of the sprite, and only the second one was pointed to by the handle.

This type of error can be debugged by using "View/Edit Slice Tree" option in the F8 debug menu

HOWEVER....

Since you say the script worked fine in beelzebufo and the problem only appeared in the nightly, it seems more likely that you have discovered a bug.

Can I see the script in question? Even if this is an engine bug, seeing the script that triggers it will help me locate the problem area.
Last edited by Bob the Hamster on Tue Jun 02, 2015 4:57 pm, edited 1 time in total.
User avatar
Meatballsub
Liquid Metal Slime
Posts: 996
Joined: Mon Oct 15, 2007 6:39 pm
Location: Northwest Georgia
Contact:

Post by Meatballsub »

Bob the Hamster wrote:Normally, if a "free slice" command is not working, my first guess is that you accidentally loaded two copies of the slice you are trying to free:

Code: Select all

variable(sl)
sl := load hero sprite(0)
sl := load hero sprite(0)
free slice(sl)
The code above will look as if free slice has done nothing, because there were two copies of the sprite, and only the second one was pointed to by the handle.

This type of error can be debugged by using "View/Edit Slice Tree" option in the F8 debug menu

HOWEVER....

Since you say the script worked fine in beelzebufo and the problem only appeared in the nightly, it seems more likely that you have discovered a bug.

Can I see the script in question? Even if this is an engine bug, seeing the script that triggers it will help me locate the problem area.
Didn't know about that debug command, but it really helped with figuring this out. Looks like you were correct and the slice was erroneously loaded twice. I've figured out how to fix it because of that. Thanks!
TMC
Metal King Slime
Posts: 4308
Joined: Sun Apr 10, 2011 9:19 am

Post by TMC »

Commands for creating and freeing slices did undergo some internal changes recently. It may be that these changes exposed a pre-existing bug in your game: maybe you are incorrectly freeing a slice somewhere else. Also, slice glitches have appeared in Char's lovely home which were not there in Beelzebufo, so there may be a real problem with slices in nightlies. Even if it was also a preexisting bug there, that's pretty concerning. I haven't looked into it yet.
User avatar
Meatballsub
Liquid Metal Slime
Posts: 996
Joined: Mon Oct 15, 2007 6:39 pm
Location: Northwest Georgia
Contact:

Post by Meatballsub »

I feel pretty certain that it was a preexisting issue in my case.
Post Reply