Sprite Editor Question

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

Moderators: marionline, SDHawk

Post Reply
User avatar
Soule X
Red Slime
Posts: 86
Joined: Wed Sep 19, 2012 4:18 pm
Location: Indianapolis

Sprite Editor Question

Post by Soule X »

Is the fact that the cursor in the sprite editor no longer remembers the position from sprite to sprite intentional?

I haven't downloaded a nightly in a long time, so I'm not sure how long it has functioned this way, but before it was much easier to line up sprite edits with little effort. It's one of the reasons I used the Custom sprite editor over an outside editor.

Also, unrelated, I noticed that when I left custom open for a long period of time and came back to it that the ability to switch palettes in the sprite editor stopped working, both the arrow keys and clicking on the list. I had to restart the program to get it working again, which I don't ever remember happening before. Not a big deal, but I figured it might be the symptom of another problem.
TMC
Metal King Slime
Posts: 4308
Joined: Sun Apr 10, 2011 9:19 am

Post by TMC »

That wasn't intentional, it was a sideeffect of a bunch of code cleanup. I've fixed it. Let me know if anything else has changed for the worse.

The palette problem is weird, but I came across a weirder bug today. I'll note down to try leaving Custom open a long time and seeing if it happens.
User avatar
Soule X
Red Slime
Posts: 86
Joined: Wed Sep 19, 2012 4:18 pm
Location: Indianapolis

Post by Soule X »

I've noticed that whenever there is a script error or I reload a script in test mode the entire screen turns black afterward. The game is still functioning normally otherwise (I can tell by the sound effects). If another script error occurs the screen will flash on for a second and go dark again immediately.

It seems to only happen on some maps, and the only difference I can see between the maps it does and doesn't happen on is that the maps that are size 16 x 10 do not seem to have this happen.
TMC
Metal King Slime
Posts: 4308
Joined: Sun Apr 10, 2011 9:19 am

Post by TMC »

I actually fixed a bug when reloading scripts yesterday. Does that make any difference? I doubt it though. Hmmm.. I think I vaguely remember seeing something like that some months ago. Are yuo using a recent nightly build? Do you make use of "load palette" or other master palette commands? Does it happen on script errors when not using Test Game?

I wonder how many people actually make use of script reloading. It's off by default because its unfriendly and you have to know what you're doing; yesterday I was tearing out my hair because of misuse of it.
Last edited by TMC on Sat Apr 08, 2017 2:03 pm, edited 2 times in total.
User avatar
Soule X
Red Slime
Posts: 86
Joined: Wed Sep 19, 2012 4:18 pm
Location: Indianapolis

Post by Soule X »

I find it somewhat helpful for quick testing of changes. However, it also happens with any script error. There are no palette affecting commands in most of the scripts it happens in (which is all of them). And, yes, it happens outside of Custom as well. I'm currently using 20170403. I'll try the newest update and see if that changes anything.

Also, I just noticed some other strange behavior.

This line of code works perfectly fine:

Put Camera (Camera Pixel X, 200 * (Next Opponent -- 1))

Whereas reversing the order of the values like so

Put Camera (Camera Pixel X, (Next Opponent -- 1) * 200)

produces this error...

"hard-coded function camerapixelx takes at most 0 arguments but is being passed 1 arguments"


EDIT: The latest nightly has the same behavior.
Last edited by Soule X on Sat Apr 08, 2017 2:38 pm, edited 1 time in total.
TMC
Metal King Slime
Posts: 4308
Joined: Sun Apr 10, 2011 9:19 am

Post by TMC »

I can't reproduce this script error problem, even on Windows. It might be specific to your game. Could you send it to me?
Soule X wrote:"hard-coded function camerapixelx takes at most 0 arguments but is being passed 1 arguments"
Wow. It's incredible that I've never encountered this problem myself. I thought I knew Hamster Speak inside-out. After initial disbelief, I do actually know why this happens, it's a flaw in the way HSpeak parses commas, which I do probably need to rewrite anyway. It's going to be a major undertaking.

You can avoid the problem by writing "Put Camera (Camera Pixel X(), (Next Opponent -- 1) * 200)"
User avatar
Soule X
Red Slime
Posts: 86
Joined: Wed Sep 19, 2012 4:18 pm
Location: Indianapolis

Post by Soule X »

Okay, I found the culprit and I'm very confused. It's happening because of my custom fade in script that happens when you first enter the map. It's due to the script calling Reset Palette to get the colors back to normal. However, if you use Fade Screen In instead of Reset Palette it doesn't have any problems.

So this...

Code: Select all

script, Fade In, begin

Reset Palette
Update Palette

end
...causes the screen to go black after the debug menu and script errors.

This does not...

Code: Select all

script, Fade In, begin

Fade Screen In

end
I don't get it. I would have assumed they did basically the same thing.
TMC
Metal King Slime
Posts: 4308
Joined: Sun Apr 10, 2011 9:19 am

Post by TMC »

Ah, great. I should be able to get to the bottom of this.
This doesn't surprise me, as behind the scenes there's some complicated logic around screen fades and ensuring a suitable palette when a script error occurs.
Post Reply