Author Topic: Island of Secrets  (Read 77457 times)

0 Members and 9 Guests are viewing this topic.

Offline Doan Sephim

Re: Island of Secrets
« Reply #30 on: February 19, 2012, 09:21:37 AM »
6) Actually that input is necessary. I need those kind of harsh words, actually. I have some of the same issues with the game myself. I give you 5/5 points in being a pretty darn good Beta tester! Once I iron out the Canyon Beast scene and iron out some more issues, would you like to try out what I have now?
I would be happy to try try it out for you

Offline JRedant

Re: Island of Secrets
« Reply #31 on: February 20, 2012, 04:59:03 PM »
Some things left to do before a second demo is ready:

My GET routine needs to be debugged.
I need to introduce "EAT MUSHROOMS" into the general statements, as it's not a room specific command. It's an inventory command.
The first of the Death screens is about ready.

It's looking better, now that I tied more of the book into the game.

Offline JRedant

Re: Island of Secrets
« Reply #32 on: February 21, 2012, 08:40:49 PM »
Just a thought occurred to me...is this based off of MACLISP or Common Lisp? There's just something very familiar and LISP-like about SCICompanion.

Offline Cloudee1

Re: Island of Secrets
« Reply #33 on: February 21, 2012, 11:10:53 PM »
Yes the sci syntax is based off lisp
Halloween Competition Brass Lantern Prop Competition Groundhog Day Competition

Offline JRedant

Re: Island of Secrets
« Reply #34 on: February 21, 2012, 11:14:31 PM »
Do you know which one, roughly? I thought it might have been based off of Common Lisp (ANSI X3J13)


Offline JRedant

Re: Island of Secrets
« Reply #36 on: February 22, 2012, 11:01:16 AM »
Ahh, okay...now I see it. I thought the picture editor looked more like LOGO than LISP, but LOGO was influenced by Smalltalk to begin with. Alan Kay is a genius.

Offline JRedant

Re: Island of Secrets
« Reply #37 on: February 25, 2012, 08:32:05 AM »
Once again, I'm taking creative liberty. I'm following the book, instead of the program, in designing this game. This is not a bad thing. This is taking something and making it my own, so long as I can pull it off!

For the record, I love doing the artwork, especially tracing the scenes that I need, figuring out what details I need, what the scene calls for, what the surrounding scenes require. I can focus a good 3-4 hours in getting a room right.

That, and I really like having beta testers pull the damn thing apart. It makes for a stronger product.

I'm hungering for more, so here we go!...back to the picture editor

Offline JRedant

Re: Island of Secrets
« Reply #38 on: March 02, 2012, 11:52:39 AM »
I'm at some sort of compiler confusion, or programmer confusion.

My programming algorithm is as follows, inside main.sc in the global Said portion:

If user types "examine mushrooms" or "look at mushrooms"
(
   If user has mushrooms in his inventory
   (
      Drop mushrooms from inventory
      Place "Piece of parchment" in inventory
      Increase score
      Print some sort of message
   ) else ( etc... )
)


Here's what I came out with:

        (if(Said('examine/mushrooms'))
           (if(send gEgo:has(INV_MUSHROOMS))
             (send gEgo:put(INV_MUSHROOMS))
             (send gEgo:get(INV_ONEPARCHMENT))
             (send gGame:changeScore(5))
             Print("etc.")
           )(else
             Print("etc")
         )
      )

Problem: When I type in "examine mushrooms", instead of doing what I intended, it prints out the description of the room. What am I doing wrong? Assume that I've defined INV_MUSHROOMS, and INV_ONEPARCHMENT.

Offline gumby

Re: Island of Secrets
« Reply #39 on: March 02, 2012, 12:16:54 PM »
Sounds like you've got a more generic said statement prior to the code you posted.  Once a said statement is processed, the event is handled and no more said statements will be processed (normally).
In the Great Underground Empire (Zork port in development)
Winter Break 2012 Rope Prop Competition

Offline JRedant

Re: Island of Secrets
« Reply #40 on: March 02, 2012, 04:32:43 PM »
Am I hearing that I'm going to have to make one really large IF-THEN statement to handle all of the Said statements in Main.sc?

I can do that, for the record, it won't be a problem.

Offline gumby

Re: Island of Secrets
« Reply #41 on: March 02, 2012, 05:09:09 PM »
What are you doing in the main.sc?  Can you post the code so we can have a look?  I'm guessing you've got something like said(examine) in there and its getting evaluated first.
In the Great Underground Empire (Zork port in development)
Winter Break 2012 Rope Prop Competition

Offline JRedant

Re: Island of Secrets
« Reply #42 on: March 02, 2012, 05:50:43 PM »
Starting at Line 266, you come across the following:

     (method (handleEvent pEvent)
      (super:handleEvent(pEvent))
      (if((<> (send pEvent:type) evSAID) or (send pEvent:claimed))
          return(TRUE)
      )

        /***********************************/
        /* Add global said statements here */
        /***********************************/



This was where I assumed that you would put in, for example, inventory related Said statements. I had put in two. The one, that became buggy for some reason. The following, which came afterwards, works just fine:

        (if(Said('eat/mushrooms'))
           (if(send gEgo:has(INV_MUSHROOMS))
             Print("Eww.")             
         )(else
            Print("Eat what?")
         )
      )

Putting me back to square one. What went wrong with what I was trying to do?

Offline gumby

Re: Island of Secrets
« Reply #43 on: March 02, 2012, 06:20:37 PM »
Well, that all looks fine.  Where are your Said() strings that end up throwing the prints that display the room descriptions?  I was thinking those were the ones that were causing the problems.
In the Great Underground Empire (Zork port in development)
Winter Break 2012 Rope Prop Competition

Offline MusicallyInspired

Re: Island of Secrets
« Reply #44 on: March 02, 2012, 09:48:37 PM »
You have to kind of nest them or else it'll take the first "look" statement as the only one. You have to put all generic action saids last after all the specific ones you want. Here's an example from KQ2SCI:

Code: [Select]
        (if (Said('look>'))
            (if (Said('/fence'))
                Print(3 0)
            )
            (if (Said('/tree'))
                Print(3 1)
            )
            (if (Said('/flower , windowbox , box'))
                Print(3 2)
            )
            (if (Said('/cottage'))
                Print(3 3)
            )
            (if (Said('/window'))
                Print(3 4)
            )
            (if (Said('<in / mailbox'))
                (if (== (send gEgo:onControl()) ctlSILVER)
                    (if (gMailBoxClosed)
                        Print(3 5)
                    )
                    (else
                        (if (send gEgo:has(INV_BASKET))
                            Print(3 6)
                        )
                        (else
                            (if (send gEgo:has(INV_EMPTYBASKET))
                                Print(3 6)
                            )
                            (else
                                Print(3 7)
                            )
                        )
                    )
                )
                (else
                    PrintNotCloseEnough()
                )
            )
            (if (Said('/mailbox'))
                Print(3 8)
            )
            (if (Said('/door'))
                (if (== theDoor:cel() 0)
                    Print(3 9)
                )
                (else
                    Print(3 10)
                )
            )
            (if (Said('[/!*]'))
                Print(3 3)
            )
        )
Brass Lantern Prop Competition


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

Page created in 0.055 seconds with 22 queries.