Author Topic: Adam's Quest for a Test Quest - technical issues  (Read 5946 times)

0 Members and 1 Guest are viewing this topic.

Offline Adam

Adam's Quest for a Test Quest - technical issues
« on: October 23, 2013, 06:34:55 PM »
Hi!

I'm totally new to SCI developing, and also to this forum, I hope I am posting my question on the right board.

I've just played around with the pic editor of the SCI Companion, to make a first room for a test adventure. It was great fun, but now the palettes are giving me a bit of a headache.

The plan was to use the second and third palettes for day-night cycle. It worked almost fine, but there are two colours (16 and 28) that do not change on the pic when changing the palette.

Thus, the question is whether this is an intentional behavior? How to solve this problem? I tried to change the colour index there, but that didn't work either.

Attached the pic too, if someone is willing to have a look at it.

Thanks
Adam
« Last Edit: October 30, 2013, 10:54:33 AM by Adam »



Offline MusicallyInspired

Re: SCI Companion secondary palette unexpected behavior
« Reply #1 on: October 23, 2013, 07:55:55 PM »
You have to make sure the apecific colour you're using feom the palette is not the same colour between palettes. Sometimes different palettes have the same colour in the same position on the palette. Just because one colour changes between palettes doesn't mean that all colours of the same value will change, if that makes sense.

I'm on my phone right now but will check your picture when I can, unless someone else does first.
Brass Lantern Prop Competition

Offline MusicallyInspired

Re: SCI Companion secondary palette unexpected behavior
« Reply #2 on: October 23, 2013, 09:35:49 PM »
Just opened it. I see what you mean. That's a very bizarre bug I've not run into. But then, I haven't used multiple palettes before either. I'm not sure anyone has yet. Try using a different slot of the palette if they're not filled with colours already. Very bizarre.

Have you tried testing the game? Or opening the pic in SCI Studio's pic editor? It might just be a visual glitch within SCI Companion itself.

EDIT: Just tried it in SCI Studio, same result. Although, SCI Studio has a different method of selecting colours. Instead of showing only the currently selected palette, it shows all four palettes and you can choose a colour from any of them no matter what palette is being used. And reading the draw command it does say "Set Visual: 0,28". Meaning, palette 0, colour slot 28. What's strange is all the other commands have that as well. But for some reason for this command it's interpreting it as a hard select on the 0 palette instead of a dynamic set on whatever the currently selected palette is. I'm not sure how to make it react differently. A bizarre bug.

Upon further experimenting, by selecting draw events of other colours and swapping the palettes while previewing the entire picture, I discovered that the draw events I had selected suddenly started being "hard selected" as well and persisted across palettes. Very strange. It's almost like you have to draw the entire picture in one palette without selecting another palette. Then change the alternate palettes afterwards without drawing or selecting draw events. It almost seems like a function is assumed but was not provided and interface for in the editor, that is, to persists "hard selections" of colours in a palette or not. Unless that function IS provided and I'm being stupid...
« Last Edit: October 24, 2013, 01:10:10 AM by MusicallyInspired »
Brass Lantern Prop Competition

Offline gumby

Re: SCI Companion secondary palette unexpected behavior
« Reply #3 on: October 23, 2013, 10:11:02 PM »
Yeah, I just experienced the same thing while testing this problem, both IDEs have the same issue.  I hate to suggest it, but it might be worth deleting all the set palette commands & recreate them from scratch. Perhaps that might clear up the issue.

Or maybe do it in a test game first so you don't accidentally lose any work testing this theory out...

In the Great Underground Empire (Zork port in development)
Winter Break 2012 Rope Prop Competition

Offline Adam

Re: SCI Companion secondary palette unexpected behavior
« Reply #4 on: October 24, 2013, 02:22:06 AM »
Thank you for your prompt answers!

I've tried to use another slot then redoing all the palette setup, but everything remained the same.

After having a relaxing sleep I now suspect it has to do something with both colours having white as one of their dither colour. Nope, it doesn't.

Edit: I had another try yesterday. With the same result sadly. I usually set colours during the creation process, though always jumping up to the start in the history. I noticed that these became the "frozen" colours. Could this workflow cause these problems? Do I have to plan ahead and make my palette at the start?

I would be thankful if someone could fix this pic, so I don't have to redo it a third time (as I am pretty satisfied how it looks right now).

Oh, and @MusicallyInspired: I haven't tried it in a game yet. I'm just starting to use the tools, drawing at first, so right now I'm still missing the know-how to test it in a game. Will look into it as soon as possible.

Edit 2: Upon further experimenting I can now state that if you change a colour in palette 0, then it will be a hard set colour for every other. Thus the solution for me was not using palette 0. Three of them will be enough for day-night cycle.
« Last Edit: October 26, 2013, 01:34:47 PM by Adam »

Offline Adam

Re: SCI Companion secondary palette unexpected behavior
« Reply #5 on: October 26, 2013, 07:48:51 PM »
It's me again.

So the pic looks as intended now, but somehow I cannot get it run in game. I tried to modify the template game, but as son as I load my own pic instead of the white one, the game does "freeze" after the intro. By freeze I mean the cursor changes to load and I cannot do anything but move around with the cursor.

Any ideas?


Problem solved: "Write entire palette" option preferred.
« Last Edit: October 26, 2013, 08:09:03 PM by Adam »

Offline MusicallyInspired

Re: SCI Companion secondary palette unexpected behavior
« Reply #6 on: October 26, 2013, 10:53:04 PM »
I'm glad you got it working!
Brass Lantern Prop Competition

Offline Adam

Re: Adam's Quest for a Test Quest - technical issues
« Reply #7 on: October 30, 2013, 11:25:29 AM »
I've changed the topic subject, so I don't have to open a new one for all of my issues.

My next one may be an easy one, but I could not find any solution:
How to catch a cursor key pressed event?

I tried something like this:

Code: [Select]
(switch( (send pEvent:type) )
(case evKEYBOARD
(switch( (send pEvent:message) )
(case KEY_LEFT
...

It works properly for some of the keys (Enter/Tab), but not for the cursor keys. The event is triggered, but it does not go into the evKEYBOARD case. I suspect that's because they are claimed by something else. How can I turn this off?

I've started with the Template in SCI Companion.

Offline gumby

Re: Adam's Quest for a Test Quest - technical issues
« Reply #8 on: October 30, 2013, 05:00:19 PM »
Check this post here, it should help:  http://sciprogramming.com/community/index.php/topic,610.0.html

Specifically, I think you need to call the MapKeyToDir() kernel call before checking the cursor keys.  Let me know if this doesn't work for you and I can hack together some sample code.
In the Great Underground Empire (Zork port in development)
Winter Break 2012 Rope Prop Competition

Offline Adam

Re: Adam's Quest for a Test Quest - technical issues
« Reply #9 on: October 30, 2013, 06:46:34 PM »
Thank you! I tried that too, but to no avail. It doesn't even detect that they are keyboard events (doesn't go into "case evKEYBOARD"). A sample code would be really nice.

I somehow didn't notice there is a "SCI Syntax Help" board on the forum. I'll go over it.
« Last Edit: October 31, 2013, 04:26:42 AM by Adam »

Offline Collector

Re: Adam's Quest for a Test Quest - technical issues
« Reply #10 on: October 30, 2013, 07:18:08 PM »
I somehow didn't notice there is a "SCI Syntax Help" board on the forum. I'll go over it.

Yeah, there are a lot of resources available to help. First and foremost, there are these forums. They frequently do not seem that active, but there are several of us that check everyday. There are several tutorials both here and on the Wiki, not to mention all of the other resources of the SCI Wiki itself. You may wish to bookmark the online version of the SCI Studio Help File since it has a lot of information about programming in SCI that is missing in the SCI Companion help file. There are plenty of code examples here and the Wiki.

Don't forget that there are also a number of utilities for SCI on the Tools section here and more tools on the Wiki.

If you really want to get into it, there is the old FreeSCI group's document, Sierra Creative Interpreter Specifications preserved on the Wiki.
KQII Remake Pic

Offline Adam

Re: Adam's Quest for a Test Quest - technical issues
« Reply #11 on: October 30, 2013, 08:14:49 PM »
Thank you! This was quite helpful. I've quickly found the answer in the specifications:

"The movement event is only generated by the joystick driver. However, on request, the keyboard driver can convert keyboard events into movement events as described above. "

There they were, my precious events.
« Last Edit: October 30, 2013, 08:16:40 PM by Adam »

Offline Cloudee1

Re: Adam's Quest for a Test Quest - technical issues
« Reply #12 on: November 02, 2013, 09:29:52 PM »
Hey Adam, first and foremost welcome.

I'm glad you figured out your palette issues. I have always wanted to play with a day night cycle, but the game I want to use it for is so far off that I may never actually get to it so I have never actually attempted it yet and had absolutely no idea how to get you going there.

Don't worry about having a hundred different threads going. It would actually be better to have each problem in it's own thread. Especially if the title halfway describes the problem.  Then when others have the same issues, they may find the answer from your post, it will also help your issues get more visibility because other users may stop looking over a thread once they think your issue has been resolved.

Also Adam, I see where you mentioned that you are using the template game that came with Companion, I would strongly suggest visiting the tools page and downloading the current version of the template game before going too far. There are a few bug updates. There are two versions available, the parser as well as a point and click one. You can either start with them instead of creating a new game from within companion, or stick them in the companion folder and rename the folder to Template so that whenever you create a new game from inside companion, that is the one it will copy from.
« Last Edit: November 02, 2013, 09:40:10 PM by Cloudee1 »
Halloween Competition Brass Lantern Prop Competition Groundhog Day Competition

Offline Adam

Re: Adam's Quest for a Test Quest - technical issues
« Reply #13 on: November 04, 2013, 03:24:34 AM »
Thanks for the tip! I've updated to 1.1.

At first I did not plan to implement day-night cycle, but after I've played a bit with the pic editor I thought it would be fun. And now it even has some gameplay effects.
« Last Edit: November 04, 2013, 05:13:01 AM by Adam »


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

Page created in 0.112 seconds with 23 queries.