Author Topic: Interface overhaul/stripdown (like Myst)  (Read 12954 times)

0 Members and 1 Guest are viewing this topic.

Offline MusicallyInspired

Interface overhaul/stripdown (like Myst)
« on: August 05, 2017, 06:23:56 PM »
I know this is a big question, but I'm trying to basically replicate a Myst-like experience with the following functionality:

  • First person perspective/no Ego
  • Single-icon cursor interaction (for both movement and manipulating objects, so no selectable verbs)
  • Dynamic cursor VIEW changing depending on what it's hovering over (for looking left/right/up/etc)
  • No Iconbar
  • No Print message boxes (or text of any kind)

Not initializing Ego is easy enough. I also checked out in the documentation on how to create instance objects of background elements out of Polygons, which I'm planning to use for the look left/right/up/etc hotspots on each PICTURE (I was going to use CONTROL colours initially, but this way seems more elegant). My first question is how do I....er....handle pEvents so I can determine what a mouseclick does on certain polygons? I obviously don't want them to display text so verbs are out of the question, I just need some kind of functionality to test for the player input and change rooms/manipulate objects as necessary for each scene. I could have done this easily enough in SCI0 but SCI1.1 seems so much more complex and I can't quite convert the Studio Script code to Sierra Script. Any help is welcome.


Brass Lantern Prop Competition

Offline Kawa

Re: Interface overhaul/stripdown (like Myst)
« Reply #1 on: August 05, 2017, 07:31:02 PM »
I don't know about the rest of it but you know Companion can convert from one dialect to the other for you, right?

Offline MusicallyInspired

Re: Interface overhaul/stripdown (like Myst)
« Reply #2 on: August 05, 2017, 08:06:26 PM »
Yes, I do. My main problem is figuring out how to work with evMOUSBUTTON pEvents and how to make that work in conjunction with checking for Poylgons (if that's the best way to handle it...maybe it's not). SCI1.1's complexity is overwhelming me.
« Last Edit: August 05, 2017, 08:09:07 PM by MusicallyInspired »
Brass Lantern Prop Competition

Offline gumby

Re: Interface overhaul/stripdown (like Myst)
« Reply #3 on: August 05, 2017, 08:48:44 PM »
For the mouse-click event stuff, this might help: http://sciprogramming.com/tutorial.php?entry=9376
 
In the Great Underground Empire (Zork port in development)
Winter Break 2012 Rope Prop Competition

Offline MusicallyInspired

Re: Interface overhaul/stripdown (like Myst)
« Reply #4 on: August 05, 2017, 09:15:36 PM »
Ah that will indeed be very handy thank you! I must have missed this. Or forgot about it. Hopefully I can transcribe the NSEW functionality to multiple polygon shapes on each screen.
Brass Lantern Prop Competition

Offline lskovlun

Re: Interface overhaul/stripdown (like Myst)
« Reply #5 on: August 05, 2017, 10:24:50 PM »
It sounds like getting rid of the verb formalism just to get rid of text and multiple cursors is over-complicating things. SCI32 uses verbs for everything, and there is no text in many of those games (and just one cursor). The short form of AvoidPath might be useful though.
EDIT: fix link
« Last Edit: August 05, 2017, 10:59:27 PM by lskovlun »

Offline MusicallyInspired

Re: Interface overhaul/stripdown (like Myst)
« Reply #6 on: August 06, 2017, 09:48:12 AM »
Perhaps I'm not being clear. I don't want to strip the functionality out of the verb scripts per se or actual Print box code, I just don't want multiple icons accessible (or the impression of it) and I just won't display any text ever.
Brass Lantern Prop Competition

Offline Kawa

Re: Interface overhaul/stripdown (like Myst)
« Reply #7 on: August 06, 2017, 11:40:26 AM »
Icon selection and the notion of a current icon/verb are all part of the IconBar, so if you remove it and all references to it...

Specifically, the advanceCurIcon method and curIcon property of IconBar, I guess? You can right-click anywhere to cycle because User::handleEvent hands over to IconBar::handleEvent if gIconBar is non-null, but yeah.

Offline MusicallyInspired

Re: Interface overhaul/stripdown (like Myst)
« Reply #8 on: August 06, 2017, 11:10:10 PM »
That's why I was just thinking of simplifying the process and handling evMOUSEBUTTON events manually when hovering over certain polygons. I don't need all those verbs. I just need "when mouse hovers here, change cursor VIEW and do a thing when clicks."
Brass Lantern Prop Competition

Offline Doan Sephim

Re: Interface overhaul/stripdown (like Myst)
« Reply #9 on: August 08, 2017, 11:10:35 PM »
I use a bit of that kind of coding in Betrayed Alliance, particularly the door puzzle, the evil ghost puzzle, and the rotating tower. My code probably isn't optimized, but it could be of use. The source code is included in the download

Offline troflip

Re: Interface overhaul/stripdown (like Myst)
« Reply #10 on: August 09, 2017, 03:23:37 PM »
That's why I was just thinking of simplifying the process and handling evMOUSEBUTTON events manually when hovering over certain polygons. I don't need all those verbs. I just need "when mouse hovers here, change cursor VIEW and do a thing when clicks."

I think all the interaction functionality you need is already there. Features have a setOnMeCheck to which you can provide a polygon:

http://scicompanion.com/Documentation/Classes/Feature.html?highlight=setonmecheck

(or you can provide nsRight/nsLeft, etc..., or control colors, or whatever)

Then just pick a particular verb to leverage, and put your code in the feature's doVerb responding to that verb.
Or make a new method called onClick or something, and change the code that calls doVerb to call that instead.
Check out my website: http://icefallgames.com
Groundhog Day Competition

Offline MusicallyInspired

Re: Interface overhaul/stripdown (like Myst)
« Reply #11 on: August 09, 2017, 04:47:06 PM »
Thanks, guys.
Brass Lantern Prop Competition

Offline MusicallyInspired

Re: Interface overhaul/stripdown (like Myst)
« Reply #12 on: August 14, 2017, 09:48:54 PM »
Is there a function built into Feature to be able to change the cursor to another certain VIEW ONLY when hovering over a priority/control colour or polygon? I'm looking but it's not obvious to me if it's there. Or will I just have to handle the room's doit method manually for something like that?

EDIT: Another question. I'm successfully moving around from room to room (or should I say step to step and perspective to perspective) with interacting with polygons as verbs. However, I'm trying to figure out how to simply interact with explicitly nothing. That is, when I'm not clicking on any polygons it performs a certain action which doesn't take place if I'm not hovering over a polygon. Or would I be better off using control colours for this instead of polygons?
« Last Edit: August 14, 2017, 10:33:35 PM by MusicallyInspired »
Brass Lantern Prop Competition

Offline Kawa

Re: Interface overhaul/stripdown (like Myst)
« Reply #13 on: August 15, 2017, 11:31:44 AM »
If nothing more specific (Features et al) respond positively to an event, have the room respond?

Offline lskovlun

Re: Interface overhaul/stripdown (like Myst)
« Reply #14 on: August 15, 2017, 11:41:05 AM »
If nothing more specific (Features et al) respond positively to an event, have the room respond?
Or the DoVerbCode (which provides default responses in the standard verb framework). But a) this would affect all rooms (you could check the current room variable however...) and b) it doesn't work if you don't use features/views/props...


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

Page created in 0.04 seconds with 24 queries.