Author Topic: Trying to understand picture resources in sci1.1  (Read 7213 times)

0 Members and 1 Guest are viewing this topic.

Offline claudehuggins

Trying to understand picture resources in sci1.1
« on: January 29, 2017, 02:26:48 PM »
It's been a while since I asked another dumb question.
For one of my newer projects, I'm making the switch to SCI1.1. My progress came to a hault rather quick, however.
I drew a picture using the given tools in SCI companion, saved it, made a room out of it, and started the game. When the game switches to the picture I drew, only a small portion of the picture is drawn. The ego cannot move except when clicking directly next to him (moving him a small amount), and the OnMeCheck feature I coded triggers on the entire picture instead of just ctlTEAL like I coded it to.

The attached pictures are (blurry cell phone photos of) the picture as I drew it, and how it appears in-game.

Is this a common problem? Did I mess up somewhere in the drawing process?

Here's my feature code if that helps.

Code: [Select]
(instance theDoor of Feature
   (properties
      x 80
      y 30
      noun N_DOOR
      OnMeCheck ctlTEAL
   )
)

And in the room init

Code: [Select]
(theDoor init: setOnMeCheck: ctlTEAL)
I'm using Sierra syntax.

I literally just started SCI1.1 this week, so my apologies if this seems like a dumb thing to ask. I couldn't find anything on it in the forums or tutorial pages :(
I tried rebuilding the resources, thinking it was maybe loading an unfinished version of the picture, but it still only draws a small number of the instructions.

Also, this was typed on my phone as my work computer doesn't have Internet, so please forgive me for any weird formatting in this post.

If you need any more information to help, let me know and I'll do my best to provide it. As I mentioned I'm on my phone and this is all I can provide as of now.


A while ago, at a block party I found myself socially trapped at, I thought to myself: I need a t-shirt that says, "I'd rather be programming".

Offline troflip

Re: Trying to understand picture resources in sci1.1
« Reply #1 on: January 29, 2017, 05:59:21 PM »
Attaching the pic resource might help, so I could look at it.

SCI 1.1 generally uses bitmapped images for the visual screen. It's possible there are bugs in SCI Companion that let you draw vector visual stuff, but which aren't actually supported by the engine.
Check out my website: http://icefallgames.com
Groundhog Day Competition

Offline Kawa

Re: Trying to understand picture resources in sci1.1
« Reply #2 on: January 29, 2017, 06:21:56 PM »
If there are unsupported vector commands, I haven't encountered them yet, and I use vectors for placeholders and initial sketches.

Offline troflip

Re: Trying to understand picture resources in sci1.1
« Reply #3 on: January 29, 2017, 07:02:28 PM »
Also, this code should not compile:

Code: [Select]
(instance theDoor of Feature
   (properties
      x 80
      y 30
      noun N_DOOR
      OnMeCheck ctlTEAL
   )
)

since the property is onMeCheck, not OnMeCheck.

Also, this code is incorrect:
Code: [Select]
(theDoor init: setOnMeCheck: ctlTEAL)

Have a look at the documentation - you need to specify omcCOLORS:
http://scicompanion.com/Documentation/Classes/Feature.html?highlight=setonmecheck

« Last Edit: January 29, 2017, 07:08:43 PM by troflip »
Check out my website: http://icefallgames.com
Groundhog Day Competition

Offline claudehuggins

Re: Trying to understand picture resources in sci1.1
« Reply #4 on: January 30, 2017, 05:05:03 PM »
I tried replacing the background with a version I did in ms paint; this one worked. However, despite the control color existing on the door area, it no longer triggers the message anywhere, and I'm still having troubles with the ego not moving properly. :(

The "OnMeCheck" (with capital O) was a typo from writing it on my phone, sorry about that

And the incorrect code was me misunderstanding a probably outdated tutorial...whoops.

Later today I'll see if I can get on an Internet-connected computer and attach my pic resource. I'll also try to drop in my room script in case something is messing up there.
A while ago, at a block party I found myself socially trapped at, I thought to myself: I need a t-shirt that says, "I'd rather be programming".

Offline MusicallyInspired

Re: Trying to understand picture resources in sci1.1
« Reply #5 on: January 30, 2017, 08:21:51 PM »
You need to use polygons for walkable paths. Control colours won't cut it in SCI1.1. You draw them in the Picture editor on top of the bitmap and then export it as code into the script or something like that. Actually, I think that part is automatic...
Brass Lantern Prop Competition

Offline claudehuggins

Re: Trying to understand picture resources in sci1.1
« Reply #6 on: January 31, 2017, 08:43:42 AM »
So. Update: turns out I'm just a fool. But I'll explain what I was doing wrong in case someone else has the same foolishness.

Problem 1: No movement on ego
Solution: I forgot to add (gGame handsOn:) to my init. The previous room ended on handsOff. Forehead to desk ensued. The polygons were fine; I just forgot to actually let the player walk on them.

Problem 2: Picture only drawing halfway
Solution: I guess it was the vectors messing up. I took a screenshot of the picture I drew, saved it as a bitmap, imported it, and it worked fine. Honestly you can't even tell the difference, stylistically speaking.

Problem 3: onMeCheck not triggering
Solution: I'm still not sure what was wrong with the control colors (unless they are COMPLETELY different from SCI0 and nobody told me :P), but I redid the code with total access polygons and that works fine, so I'll use that from now on. I like it more anyway; it looks somehow cleaner to me. And I can use control colors for other things without worrying about running out :). The white lines on the control layer were pure force of habit and I'll remove them here in a bit. edit: I didn't even show my control layer so this was pointless to mention...I'm tired.



Short version: Almost everything I was complaining about is fixed now. My room is working correctly. Thank you to everyone for being patient with me. I'll start using the documentation instead of blindly trusting the (possibly outdated and in Studio syntax) tutorials and the new room button :P Lazy programming gets you lazy results.

Even shorter version: Almost all my problems were from coding, not the picture itself. Also, Polygons are great and SCI Companion makes them really easy to use and understand. Where have you been all my life, polygons? :D



I'm really excited that my code is working now. This is my first time successfully using SCI1.1 after trying to learn it for weeks now. Somehow it's managed to completely baffle me, but I'm starting to understand!! (I'm coming from a background of self-taught Python and LUA...and I only really got started programming a few years ago at age 16 or 17)
A while ago, at a block party I found myself socially trapped at, I thought to myself: I need a t-shirt that says, "I'd rather be programming".

Offline Kawa

Re: Trying to understand picture resources in sci1.1
« Reply #7 on: January 31, 2017, 12:31:57 PM »
*cough*Lua is not an acronym*cough*

Offline troflip

Re: Trying to understand picture resources in sci1.1
« Reply #8 on: January 31, 2017, 12:41:15 PM »
Glad you got it worked out! But it would be really useful if you could upload the vector pic that didn't draw properly, so I could diagnose it!
Check out my website: http://icefallgames.com
Groundhog Day Competition


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

Page created in 0.041 seconds with 23 queries.