Author Topic: Point & Click conversions  (Read 6720 times)

0 Members and 1 Guest are viewing this topic.

Offline gumby

Point & Click conversions
« on: October 23, 2010, 05:17:54 PM »
What would be involved with converting a game (provided the source was included) from parser-based to point-and-click?  Could this be done programatically (some kind of code-generation tool)??.  I get that the UI would need to be generated manually (I suppose) & that an interactive inventory would have to be built.  Beyond that, I'm thinking it's an issue of replacing Said() string instances with the equivalent PNC code.

One problem I see is how to incorporate the icons.  It takes a fair amount of real-estate on the screen to accomplish.  What about 'pop-up' icons - I'm thinking like what you can do with the Windows taskbar.  It can be configured to be hidden until you move your mouse to the bottom of the screen & then it pops up & remains there until you move the mouse focus away from it.


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

Offline Cloudee1

Re: Point & Click conversions
« Reply #1 on: October 23, 2010, 06:12:57 PM »
I'll bet it would be hard to do. Pont and click code segments, the way I do it anyway, are subject oriented and that subject is referenced by clicks on a view, priority, control, or visual colors, or coordinate boxes or any combination thereof. parser games, the way we've been taught to use them are verb oriented, our codes are organised by look, get ... and then the subject regardless whether it's  a view, color, or coordinates. It would be hard to tell a program to convert "look at window" to "if click with gcursor inRect (15 11 85 34)." Assuming the window is drawn to the pic, there is absolutely nothing referencing that there is a window except the look statement.
Halloween Competition Brass Lantern Prop Competition Groundhog Day Competition

Offline MusicallyInspired

Re: Point & Click conversions
« Reply #2 on: October 23, 2010, 07:04:27 PM »
Regarding a pop-up icon bar, I created one a while back but it had issues I couldn't figure out at the time. Eventually the game runs out of heap space and just crashes. Maybe you gentlemen could figure out what the problem is. I like the idea of a pop-up bar a lot more than a static one.

http://brandonblume.com/games/pnc_icon.zip

There's probably some other bugs that I didn't fix but are probably easily fixable. There's a block on the top left of the screen where the cursours do strange things...and the Ego walks on top of the icon bar when it's visible. It's also difficult to walk and hit the vertical horizon with the walk cursour because of the icon bar. Anyway, check it out.
Brass Lantern Prop Competition

Offline Cloudee1

Re: Point & Click conversions
« Reply #3 on: October 23, 2010, 07:30:37 PM »
I've already got a peekaboo menu going. I looked at yours a while back Brandon and besides the heap stuff, it had some issues. It didn't seem like it responded to every click. Anyway, I'll attach what I've got here tomorow if you want to see it. I just haven't wrote the tutorial yet to go with it.
Halloween Competition Brass Lantern Prop Competition Groundhog Day Competition

Offline gumby

Re: Point & Click conversions
« Reply #4 on: October 23, 2010, 10:04:58 PM »
I'll bet it would be hard to do. Pont and click code segments, the way I do it anyway, are subject oriented and that subject is referenced by clicks on a view, priority, control, or visual colors, or coordinate boxes or any combination thereof. parser games, the way we've been taught to use them are verb oriented, our codes are organised by look, get ... and then the subject regardless whether it's  a view, color, or coordinates. It would be hard to tell a program to convert "look at window" to "if click with gcursor inRect (15 11 85 34)." Assuming the window is drawn to the pic, there is absolutely nothing referencing that there is a window except the look statement.
I see - I wasn't even thinking about clicks w/regard to the different visual 'layers' of a game.  I had simplified it to simply being an issue of views & screen coordinates.  

Maybe I should re-state the question:  I have been thinking with my current project that I might at some point want to go point-and-click (probably after the game is complete).  My game currently is very parser-dependent.  With that in mind, are there things that I can do up front so that eventually going to a pcn would be less painful?
In the Great Underground Empire (Zork port in development)
Winter Break 2012 Rope Prop Competition

Offline MusicallyInspired

Re: Point & Click conversions
« Reply #5 on: October 23, 2010, 10:58:09 PM »
I've already got a peekaboo menu going. I looked at yours a while back Brandon and besides the heap stuff, it had some issues. It didn't seem like it responded to every click. Anyway, I'll attach what I've got here tomorow if you want to see it. I just haven't wrote the tutorial yet to go with it.

Oh right, I forgot I posted it beforehand. I'd definitely like to see it.
Brass Lantern Prop Competition

Offline Omni

Re: Point & Click conversions
« Reply #6 on: October 24, 2010, 01:23:32 PM »
Oh, I am always around and this is one of the sites I check daily =p. But I have always been more of a lurker.

On the SCI Studio note: Getting this running in a modern compiler is basically a rewrite which I am working on. Headway is alittle slow but I am working on certain aspect which may help when compiling a game.

I need to upload what little I have to the SVN but when I do most of my code I am away from internet access.

Offline Cloudee1

Re: Point & Click conversions
« Reply #7 on: October 24, 2010, 01:55:49 PM »
As far as I understand how Zork works, I don't think it would be any problem to convert because you don't really have pic resources per se, right? But a script which places views (at least inventory) on screen. Now as I understand it, you have one basic script which handles your said statements. For your project, you can get by with just clickable views. If you look at the pnc tutorial, one of those chapters I stuck up some examples of scripting clicks on views. Mainly your checking which verb with the currentcursor switch and instead of if saids, your looking at if pEvents. so depending on how close you can come to...
Code: [Select]
(if(said(subject))  (switch(verb)))The closer  you would be to my pnc template
Halloween Competition Brass Lantern Prop Competition Groundhog Day Competition

Offline gumby

Re: Point & Click conversions
« Reply #8 on: October 24, 2010, 03:00:43 PM »
Mainly your checking which verb with the currentcursor switch and instead of if saids, your looking at if pEvents

That's kinda what I figured - swapping Said()s with pnc code equivalent.  I'll check out the tutorial for more details...
In the Great Underground Empire (Zork port in development)
Winter Break 2012 Rope Prop Competition

Offline Cloudee1

Re: Point & Click conversions
« Reply #9 on: October 27, 2010, 10:51:52 PM »
Sorry it took me so long to zip this up. I still want to go through it again to make sure there isn't something I screwed up before I actually stick it up on the tutorials page. But it should be close and you can decide what you think.
« Last Edit: October 28, 2010, 03:06:11 PM by Cloudee1 »
Halloween Competition Brass Lantern Prop Competition Groundhog Day Competition

Offline gumby

Re: Point & Click conversions
« Reply #10 on: October 28, 2010, 08:17:13 PM »
Okay, I downloaded it and took a peek at the main & rm001 scripts.  From first glance it seems to make sense - I'm looking forward to when the pnc tutorial is finished.

I've been thinking it over - I'm not sure how all the different verbs would map to pnc - I'm not sure if everything can be boiled down to applying an inventory object to another object in the room or to another inventory object.

I think I'll just start with parser-based game & then come back around & refactor it into a PNC.  Seems like less of a leap going from a parser-based game to another parser-based game.  But I'll continue to consider going straight to a PNC.
In the Great Underground Empire (Zork port in development)
Winter Break 2012 Rope Prop Competition

Offline Cloudee1

Re: Point & Click conversions
« Reply #11 on: October 29, 2010, 09:33:58 PM »
There's probably an intermedite step which might work better, something like: if click here then event = said talk that. I'm not sure what the syntax would be, but that would be the logic  I would try. Then if you get the parser working and you have the heap space to spare, you could just as easily have the option of parser or pnc.
Halloween Competition Brass Lantern Prop Competition Groundhog Day Competition

Offline gumby

Re: Point & Click conversions
« Reply #12 on: October 30, 2010, 09:00:26 AM »
Yeah, I like that idea - it's easy & straightforward.  I'm thinking just mapping the click events to Said('look at ...').  That would work with all the props.  That also leads me down the path of using control colors for non-interactive scenery which can be looked at, but not interacted with beyond that.

A parser/pnc option would be awesome - I hadn't considered that a game might support both...
In the Great Underground Empire (Zork port in development)
Winter Break 2012 Rope Prop Competition


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

Page created in 0.035 seconds with 22 queries.