Menu

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.

Show posts Menu

Messages - EnterTheStory (aka tolworthy)

#201
All my room hotspots have one of two interaction types: "player go to a different room" or or "run script."

Whenever someone clicks the mouse I run a "tidy up" function, resetting some variables to zero. But I don't want to do that if "run script" is being called (in case those variables are needed). How can I tell which interaction is being called?

Or do I need to go into every hotspot and edit it manually, calling my "tidy up" code separately each time?
#202
Quote from: Trent R on Sat 08/11/2008 05:21:35
Perhaps files can be read through only once at first, and then store which line is the EOF.

Is there a way to jump to a particular line without reading everything before it? That would allow me to guess, and then just check if the EOF had been reached and guess again - five or six guesses would be enough for even the longest file.
#203
Quote from: Pumaman on Fri 07/11/2008 21:16:39it's a bit of a specialized request.
I seem to specialize in those. :)

Then it sounds like my best bet is either to accept the tiny delay in reading a long file from the start, or design my game differently. Fair enough.
#204
Quote from: Trent R on Fri 07/11/2008 20:15:34
So why not have 3 or 4 files with 1000 lines each?
~Trent
Complexity. The game will eventually contain at least 20 stories. Each will add maybe 3000 lines of text and may have 10-50 saved games.  Files can only be saved in the game folder, so it's going to become really crowded. The main purpose of the log is so users can find their own personal "story." If I break the files up they'll never find the one they want.
#205
Quote from: Pumaman on Fri 07/11/2008 16:47:10
I presume you're writing some sort of continuous log file, and want to have the game load in the last 20 lines when the game starts or something like that?
Exactly! The log gets longer and longer as the game progresses.

Why not just write text in reverse order? Because you can read the log like a book, so it has to go from oldest to newest.

Why not just record text in the game separately? Because the user can save and load old logs, so the game must be dependent on the logs.

Why not read from the start? Because my game will be very large. Right now there are 3 or 4 thousand lines of dialog.  Every six months I'll add a similar number. Reading and processing a 20 thousand line file could make the game hang for a few seconds.

I was hoping there was some way to find the EOF (end of file) and just jump back a bit.
#206
I need to read the last 20 lines of a raw text file. It's very long., so I'd rather not read every single line, count them, then read again stopping at the desired line. Any suggestions?
#207
Quote from: GarageGothic on Tue 14/10/2008 08:46:10
simplified pseudo-code example of how I do it:
Ah, that makes sense. At first I thought you had a magical way to look forward, and calculate how long a process might take before it even runs. But adding strategic "Wait(1)"s is simpler. I'm hoping to also speed up my code by replacing a lot of strings with integers. A lot of my core code involves comparing strings - I'm guessing that's a processor hog. I hope it is, anyway, since if it is then I can actually do something about it.

Quote from: Dualnames on Tue 14/10/2008 09:18:52
Well, the game at least when I first saw it was a bit overwhelming

I think that's a common response (made worse because the key dialog isn't there yet, so everyone is playing blind).  The new intro will be much clearer. I'm pretty much doing what you suggest, which has the added benefit of making the message stronger and clearer. I'm also adding new navigation aids that will (I hope) make the whole experience a lot more manageable.
#208
Quote from: GarageGothic on Tue 14/10/2008 02:02:20Perhaps the game could provide some kind of response (audio, a pop-up icon, or the mouse cursor changing) to indicate that your interaction has been registered before running the CPU intensive functions? Also, you could add a few Wait(1) calls during the check to allow the game engine to proceed a loop and avoid the audio glitching.
Excellents ideas. I'll do both.

Quote from: GarageGothic on Tue 14/10/2008 02:02:20At the end of each of these function calls, the total number of points is checked.

Does this mean AGS reads ahead and checks ALL code before the next "Wait()" before running any of it? (Otherwise you could only measure the length of a process as it was completed, so would not be able to warn users ahead of time)
#209
Quote from: GarageGothic on Mon 13/10/2008 16:34:22Such a simple change and yet the gameplay mechanics now make total sense and I feel that I have a mission to accomplish.

Thanks. I'm glad I'm not alone in thinking that. Small changes make such a big difference. For example, I'm reorganizing the intro again today: the change is fairly small, but I think it will make a big improvement to how people experience the game.

Quote from: GarageGothic on Mon 13/10/2008 16:34:22Without very good hints you risk the game ending up like one huge pixel hunt

The hint system is what I'm adding now.  It'll make a lot more sense when the dialog is all in place, in November.

Quote from: GarageGothic on Mon 13/10/2008 16:34:22
1) Please consider making the screen scroll automatically when the cursor nears the edge of the screen.

Good idea. I'll do that.

Quote from: GarageGothic on Mon 13/10/2008 16:34:22have you considered using an "idea inventory" similar to the Blackwell games or Resonance? If for instance I clicked on the Palace of Justice it would be stored in an inventory-like list, and I could then select it an click it on people in other rooms.

That's another good idea. That should be doable...

Quote from: GarageGothic on Mon 13/10/2008 16:34:223) Consider reducing the amount of hotspots. I don't think I would even spend time making characters think about the railing around a grave.

LOL - most of those "look at" statements are very generic and will be improved before release. Personally I would rather have EVERYTHING a hotspot, like in real life. So your idea of a "recently clicked hotspots" list is a good idea. The new dialog will guide people to what to click on.

Quote from: GarageGothic on Mon 13/10/2008 16:34:22the game seems to hang for a moment when I make a character think about the hotspot. ... I just don't see what could be so CPU intensive that it would hold up the game like this - it's just text being displayed after all.

That's what you think! :) That's the core story code at work, the heart of the whole project.  AGS is designed to be room based, but that isn't practical for my project, so mine is story based instead. Which means when you click on anything the engine basically checks the entire story to find the appropriate response. And checks it up to nine times, for reasons that are too boring to go into. I'll need to spend time optimizing the code even more. Not looking forward to that. :)[/quote]

Thanks again for the feedback. It's been most useful.
#210
Quote from: Ozzie on Mon 13/10/2008 02:40:04there are many hotspots, but you can't do anything with them, except for the exits obviously.
Yes, the "look at" dialog is at an early stage. When it's more polished I hope it will be more clear: instead of having several verbs (look at, pick up, etc.) and several inventory items, we instead have lots of people (pretty close to the max of 300) and a lot of other people and hotspots. So there's actually more potential for interaction than in other games, but not in the usual way. The idea is to suggest ideas to different people and hope they do what you want. For example, instead of "open door with key" you find someone who might want to get through a door, draw their attention to the key then draw their attention to the door. They should then have a Homer Simpson "d'oh" moment when they think "of course, yes, that's the answer" and go and do it. On the other hand they may not WANT to go through the door. I like the idea of respecting the characters' freedom like that, and having to get to know their individual wants and needs rather than treating them like puppets. But I think it will only work when the dialog is more complete and more polished so the characters start to feel like real people.[/quote]

Quote from: Ozzie on Mon 13/10/2008 02:40:04I don't have any avatar on earth or am I just controlling the ghost of the dead child? It's not clear to me.
Yes, I need to make that clearer. It's the ghost. I needed to do it that way because a lot of novels rely on having different people be totally alone, and in novels they don't always do what you want them to do. I couldn't do that is the user had control over the visible character, but the "ghost who tries to help them but they don't know the ghost is there" idea seemed to work in theory.

Quote from: sthomannch on Sun 12/10/2008 19:01:03hidden bugs
Thanks. I've been finding a few of the first kind as well. Conversations are separated by a '$' or a '@' depending on who spoke first, and sometimes I forget. I'll need to pay more attention :) The second bug is more interesting. From a technical point of view, the guillotine operator is a complicated (his head and body are actually separate characters) so there might be something unexpected happening. I'll look into it. Thanks.

#211
Thanks. Any suggestion for how to change the intro? Just open with one of the three intro segments and trigger the others depending on user actions?
#212
The latest test version (the final public test version) is here. Judging by the deafening silence after the last test version I'm probably doing something horribly wrong. But that's never stopped me before.

Edit: More details and known bugs (such as the need to remove the colon: in the install path) are on the daily blog.
#213
Quote from: Pumaman on Wed 08/10/2008 20:33:31
For performance reasons PlaceOnWalkableArea doesn't scan every pixel of the walkable area. In 2.72 it only scans every 5th pixel, so if you have a walkable area narrower than that it might not see it.
Thanks. That's exactly the information I needed! Much appreciated.
#214
Quote from: Dualnames on Wed 08/10/2008 09:24:39Why do this?

Because the game is complex. There are over 80 rooms, with up to ten walk-on points in each. I'm constantly tweaking walkable areas and WalkTo points. I often have characters walk on from off-screen. They are often accompanied by friends a few pixels away. Scales need to be decided based on the nearest floor, and all this has to be automated. It would take far too long to specify exact positions in every case. It's more practical to define entrances within a few pixels and rely on PlaceOnWalkableArea to catch any problems.
#215
I'm using 2.72 and PlaceOnWalkableArea is usually reliable. Except in a very wide room (600 game pixels) with a continuous floor that has a lot of thin parts and concave shapes. I place a character at (45,100), the nearest floor is at (45,110), but PlaceOnWalkableArea puts the character a (460,145)!

Does anyone know how PlaceOnWalkableArea calculates 'nearest'?
#216
Thanks for the clarification. Much appreciated.
#217
If I save an OGG file at a non-standard frequency (say, 48 kHz instead of 44.1 kHz, or something arbitrary like 1234 Hz) and it plays perfectly on my computer, does that guarantee it will play perfectly on every other  computer as well?

Please forgive the ignorant question, but I have no idea how the OGG library works.
#218
Quote from: GarageGothic on Mon 22/09/2008 14:51:01
You can use Game.GetLoopCountForView(int view) (and similar use Game.GetFrameCountForLoop to check that an existing loop doesn't have 0 frames).
Thanks! Much appreciated!
#219
Is there any way I can check if a view loop exists before calling it and risking a crash?
#220
http://www.adventuregamestudio.co.uk/yabb/index.php?topic=29505.0 This thread indicates that String.Compareto has an undocumented feature: it returns '-1' or '+1' depending on the relative length of strings. But another thread goes further:
Quote from: SteveMcCrea on Fri 06/01/2006 00:40:54
Try String.CompareTo(). I presume it's a wrapper for the C function strcmp, which returns 0 if the strings are the same, <0 if the first string should be first alphabetically, and >0 if the first string should be second alphabetically.

Can someone confirm? Thanks.
SMF spam blocked by CleanTalk