Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Nostalgic

Pages: [1] 2 3
1
SCI Syntax Help / Re: Number of Turns
« on: April 16, 2011, 01:01:05 PM »
Thanks. I'm not sure it actually works. After putting in your code, I have code like this:

(if(< gTurns 2)
  Print("This is the first turn.")
)

But it always prints the text "This is the first turn."

2
SCI Syntax Help / Re: Forcing a Keypress or Mouse Click
« on: April 14, 2011, 01:44:21 PM »
Sorry for the delay in response. Yeah, that solved the problem nicely. Everything works as it should at this point.

3
SCI Syntax Help / Number of Turns
« on: April 14, 2011, 01:20:41 PM »
Maybe I missed this somewhere; maybe it should be obvious.

Is there a way to programmatically do something based on the number of turns? (By "turn" here I guess I mean each time the player types something.) For example, I'd like to generate a certain message if the player does a given action on the first turn (or the first couple of turns). After that, however, the response will be different.


4
SCI Syntax Help / Re: Forcing a Keypress or Mouse Click
« on: February 16, 2011, 05:31:51 AM »
Okay, so I basically had tried what you guys suggested. Here's how I modified the title screen logic of LockerGnome:

Code: [Select]
...
(case 5
Print("....")

(GameTitle:
init()
setPri(15)
setStep(0 8)
setCycle(Fwd)
setMotion(MoveTo 160 170)
)
= DISPLAY_AUTHOR TRUE
= cycles 10
)

(case 6
(send gRoom:newRoom(1))
//= CAN_CONTINUE TRUE
)
) // end switch(state)

Notice how I replaced the CAN_CONTINUE TRUE with the command you guys suggested? However, this precludes the following logic from the handleEvent method from running:

Code: [Select]
 (if(CAN_CONTINUE)
(send gRoom:newRoom(INITROOMS_SCRIPT))

And if I don't let that logic run, then any commands I type in the room aren't understood. For example, typing QUIT gives me "You've left me responseless."

If I take out the newly added line and just let CAN_CONTINUE TRUE run, then everything works as expected. Keep in mind that all this logic is being done in the TitleRoom screen of LockerGnome. That shouldn't make a difference I suppose, since it's a room just like any other.

5
SCI Syntax Help / Forcing a Keypress or Mouse Click
« on: February 15, 2011, 08:06:01 PM »
One thing that's interesting about some SCI games is that you have to click a key or the mouse or whatever to get rid of the title screen. That's fine --- except for the fact that new players don't know that. I've experimented with a few games and people not familiar with these games routinely just sit there waiting for the title screen to go away.

Is there a way to simulate a key press after a given amount of time?

I've found a few threads that almost seem to answer this general question but they are usually talking about something else and so I'm not sure where to put the code or how to structure it.

6
Doan's old Knight's Quest demo was open source and had some great examples in the code that helped me out tremendously. Is it not in the fangames section?

The game does appear to be there. Nothing on the descriptive text indicates the source is available, so I'll check it out. If it is the case that some games have source and some don't, maybe just an indication of that is all that's needed.

7
Right, I get there are examples of code. But are there open source games where you can see that code in a specific context? I know the LockerGnome thing is out there so that's nice. I saw the Leisure Suit Larry 2 tutorial, but it's really hard to follow and it depends on you having the resources.

I think what would be nice is if the community had at least some games that do various things and that are available with full source. This is pretty much what every other game community provides along with isolated code examples and documentation.

8
Just checking: is there a list of any games done with SCI that have their full source code available? One of the things I notice is that communities with game engines that don't have a lot of source available for study tend to languish pretty bad. One exception to this seems to be AGS, but then again its DemoQuest has a huge amout of source available. Communities like Inform and TADS seem to thrive on this.

9
SCI Development Tools / Re: How does SCI Studio or SCI Companion compile?
« on: February 13, 2011, 07:46:17 AM »
Check out my thread from the past:

http://sciprogramming.com/community/index.php/topic,207.0.html

What you're running into is what I ran into: SCI is horribly documented in many ways, in terms of its supporting tools. A sad state of affairs. You actually seem to have persisted a bit more than I did, however.

My guess is that what might be happening is that the tools are doing some sort of precompile step in a stepwise fashion. So essentially you have scripts with the "use" statements commented out or something. Then you compile the standalone scripts in the first pass to get the sco file. Then the second pass of the compilation process puts the "use" statements back in. I do agree with you, however, that it seems really odd how the files circularly depend on each other. That's why I believe there must be a mechanic that does multiple passes for compiling.

The other thing you might notice is that when you use the scc compiler, you have to have all the files in the same directory. But in actual SCI templates, the source is in an src directory. The resources are not in that directory but rather in the parent. And some included header files are not even in those directories at all.

10
I have a suggestion for the SCI Companion tool. It's a relatively small one but the idea would simply be to have persistence in the app window when it's shut down so that when you start the tool back up, it opens to the size you had set it previously.

So, for example, if the tool was maximized and then shut down, when it is next started up, it will start up in the maximized state.

(I don't know how to do this in C++, so I can't offer much in the way of how to do it. In C# I usually use PersistWindowComponent and opt to write to an XML file instead of the registry because I try to avoid the registry if I can.)

11
I'm also still working on making it support a c-style syntax instead (or rather, in addition to) the LISPy syntax.  I don't know if that would affect your tutorials or not...

As long as the C-style is in addition to the LISP-like syntax, as you mention, this may not be too much of a problem. I had written a tutorial about using Java and Junit and then I started using that same tutorial to write about using C# and Nunit. What I ended up doing was abstracting the common bits and then getting specific for each particular language/tool.

I could probably do something similar for the idea of the LISP-like vs. C-like programming style for SCI. I could see two ways of doing it.

(1) Just have the scripting sections be broken into two literal sections. One that covers the LISP, the other that covers the C.

(2) Interleave the LISP and C examples as part of one section, but indicate to the reader that they are going to be picking one or the other.

Quote
Also, don't know if it's relevant.  But I was planning to have class/method documentation automatically generated from specially-marked-up comments in the code.

So this is sort of like the javadoc comments in Java or the XML summary comments in .NET?

That's an interesting (and good) idea. Let me see how far I can get in something like that. I'm still learning the in's and out's of SCI but a good way for me to learn that would certainly be to go through and put in function/class descriptions. My main concern would be my accuracy at this point.

12
I would probably focus on SCI Companion as it is the program I would suggest people begin with. The coding will be the same on either, so it would be valuable for people who use either or both...but I think the SCI Companion is the one to focus on.

That makes sense and is the direction I was leaning in.  I actually find SCI Companion a more useful program than SCI Studio in a lot of ways.

Quote
I don't think the creator of LockerGnome quest will get back to you. He has moved in a different programing direction and doesn't respond to emails about SCI.

Yeah, it's been awhile and no response, so I think I'm out of luck. I could just craft my own game I suppose and that probably would be the intellectually honest thing to do. The problem is that part of me writing the tutorial is also how I'm learning SCI, so there's a bit of a chicken and egg thing there. :)

What I started doing is building off of the existing SCI Tutorial (on the SCI Studio site) but rewriting large portions of it, adding more examples, and clarfiying what I had found to be confusing aspects. That's how I came across LockerGnome in the first place.

That said, part of what I'm doing is crafting some of my own rooms as well. So it's not like everything I'm doing is totally stealing. (That sounds suspiciously like a feeble rationalization, doesn't it?)

Nothing I'm going to present is going to be terribly new, I feel, but my hope is that it will be in a wider context; a sort of distillation of various topics that have come up. It would be nice to reduce any entry barriers for people who want to learn SCI. I'm thinking something that's a cross between a tutorial and a reference.

13
This may sound like a silly question in one sense. Here's the context: let's say you have someone writing a tutorial for SCI. Here's the question:

Would you recommend the tutorial focus on SCI Studio or SCI Companion? Or should the tutorial cover both in equal detail?


Beyond that issue, basically I'm trying to write up a moderately decent tutorial as part of a "nostalgic" tribute to game systems from the past. Part of this, of course, is a necessary focus on the tools used to create such games. What I'm hoping to do is not totally re-invent the wheel in all cases. For example, I'm using bits and pieces of tutorials I've already found. But I'm putting them in a wider and more cohesive context that tries to actually explain how SCI works.

If anyone has any ideas about what such a tutorial should include or focus on, I'm happy to hear about it.

Just two examples of what I'd like to include:

Build Sample Game (or Parts Thereof):
I'm trying to contact the original author of the LockerGnome game (listed on the SCI Studio site). I would actually like to use that (or some other open sourced game) as part of the tutorial, in terms of building up that game (or some part of it) as part of the tutorial. I often find this an effective way to present game tutorials, by taking an existing game that people can see and play with and then showing them how to build it. Or a part of it. Another example is "Knight's Quest" and the scene in the jail.

Scripted Scenes:
I'd like to include something about how to build "cut scenes" -- essentially automatic sequences where everything that the characters are doing is scripted. (Again, "Knight's Quest" has a large part of this at the beginning.)


14
SCI Development Tools / Re: SCI Companion - Language?
« on: April 29, 2007, 06:42:47 AM »
Okay, I just tried it on Windows 2000 and, so far, it looks to be working fine. I haven't tried every single thing yet, but I'll go through it and respond back if anything comes up.

As far as the WinME issue, my guess is you'll find that on Win98 as well. I don't know what the issue is necessarily but maybe requiring an "NT-based" machine is the way to go (either Win2000, WinXP, Vista). I think SCI Studio -- even though it doesn't say it -- has some flakiness on anything not NT-based as well.

Thanks for looking into this.

15
SCI Development Tools / Re: SCI Companion - Language?
« on: April 28, 2007, 03:39:15 AM »
Okay, I tried the logging version of the executable and the log on Windows 2000 says:

"Initializing application.
Couldn't register window classes.
Application exiting..."


Pages: [1] 2 3

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

Page created in 0.049 seconds with 19 queries.