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)

#261
Thanks. I wonder if I have too many strings? I tried splitting the big function into several parts, and got the same error message. The module contains seven thousand strings, and there are other modules of a similar size.

Before using AGS I used Sludge, and Sludge had a 65,500 String limit. So I wrote some code to compress entire conversations into a single string. It was ugly and awkward but it worked. Do you think I need to do the same with AGS? Or could there be some other problem at work here?
#262
I just hit the error message "symbol table overflow" (using 2.72) and can't finsd any reference to it online. Any suggestions? I'm guessing that this is because I have a function that calls too many other funtions. Do I simply need to split the function in two, or is there another solution?
#263
Quote from: GarageGothic on Mon 28/04/2008 12:27:45Multiplying the color seems like it would create very dark sprites
Yes, I found that! It's very sensitive to small changes in color, so I mostly used white and shades of very pale gray. Gradients worked fine, there was no obvious banding.

Quote from: GarageGothic on Mon 28/04/2008 12:27:45were you happy with the way the engine interpreted lightmaps (both in regards to color and lightness)?

Yes, but I was never very demanding. Most of my scenes needed just regular shadows here and there, and it was quick and easy. I think I used some red shadows for an underground Hades scene or two, or some blue underwater reflections, but I wasn't very adventurous. The most I did was just making black tunnels for characters to walk into and disappear from sight. I seem to recall that fading to white was a little harder, but doable by combining lightmaps and individual tinting.

Quote from: GarageGothic on Mon 28/04/2008 12:27:45Do you have any preference as to how you'd like to see it implemented in AGS?

I'm just amazed that you're doing it! That's great! Ease of use for simple stuff is all that matters to me. Oh, and the ability to have very subtle shades - I have a lot of shades of white.

My next game will be Dante's inferno, so anything that allows flickering flames would be uber-cool. :)

The only thing that ever bugged me about the Sludge implementation (and it's a VERY minor point) is that the lightmap had to be the exact same size as the background. Sometimes, being lazy, I just wanted to create a small lightmap and slap it in a corner of a scene or even reuse it in different scenes. As with the projector example. But that's a very trivial issue.

Beyond that...

Another idea that comes to mind (apart from the obvious one of animation) is to allow the offsetting of light maps according to a characters' position. And even scaling! Imagine a room where an overhead projector is turned on (using lightmaps). A character could walk between the projector and the wall and have the image shown on their face, offset and scaled in a dramatic way. Heck, they could even cast a shadow! But I suspect that would be a lot of work for one gimmick. But imagine if a lightmap could be offset according to the alpha channel on a character. You could have freaky 3D lighting effects on their face as they moved past a window or projector.. just thinking aloud here. Very moody, very atmospheric, but I'd imagine a real pain to implement.
#264
Quote from: GarageGothic on Mon 28/04/2008 12:39:57However, a large array will take up memory space and increase the size (and save/restore time) of the player's savegames.
I hadn't thought of that. Good point. I hate it when games have unnecessarily bloated save files. So "ifs" it is then. Thanks!
#265
Quote from: GarageGothic on Mon 28/04/2008 05:07:15I'm having a few problems deciding how to interpret saturation and luminance values based on a lightmap and haven't been able to find any existing implementations for reference. I tried downloading SLUDGE

This is from the SLUDGE help file. If it helps:
QuoteWith a light-map loaded, every character's red, green and blue colour values will be multiplied by the red, green and blue values of the pixel in the imageFile at the corresponding location. Lightmap modes are: PERPIXEL: Each pixel of a character is multiplied by the light map colour in the same position - i.e. one character will have many different colours applied to it in different places. HOTSPOT: Each pixel of a character is multipled by the light map colour at the character's hotspot (base point) - i.e. each character will only have one colour applied to it, determined by where it is currently positioned. The light-map arithmetic is applied before setCharacterDrawMode is taken into consideration.

In Sludge, setCharacterDrawMode makes the character lighter, darker, transparent, etc., and is applied separately. On its own, a light map of pure white would have no effect, and a small amount of gray would create a noticeable shadow. Your idea of animated shadows sounds even better.
#266
I need to chop up a very long text (several hundred pages) into thousands of strings. Each string is assigned two numbers for search purposes. Which is the fastest way to do this?

Make a huge array of strings? This feels most elegant, but the array would need to be filled when the game started, which might add a delay.

Or make a huge function with a lot of "if" statements? This makes messier code and feels clunky.

And I take it there are no limits to string length (except the AGS editor 500 character limit) and arrays can have several thousand items?
#267
Quote from: SSH on Mon 28/04/2008 10:35:03
Quote from: tolworthy on Mon 28/04/2008 10:09:52
(2) adjust speed with scaling. This made the biggest difference.

Did having it turned on cause the problem, or did having it turned off cause the problem?

Turned on. I think it was a combination of things (speed, and possibly animation speed since this would affect antiglide), but I saw the biggest difference when I disabled "adjust speed with scaling."
#268
Solved it! It turned out to be a combination of several things, in order of importance:

(1) a bonehead mistake: I have the same character with different names for "large" and "small" versions. At one point in testing I changed the walk speed for the wrong character.

(2) adjust speed with scaling. This made the biggest difference.

(3) tweaking other variables - e.g. animation speed, walk speed, etc.

My apologies for implying the AGS code was broken.
#269
Quote from: GarageGothic on Mon 28/04/2008 03:29:43Do the NPCs use scaling or are they drawn to actual on-screen size?
Unfortunately everything is scaled. The NPCs are a general purpose "crowd" function that's designed to fit dozens of different scales and perspectives. I do have two different scales of main character, but I'm hesitant to create any more, since each size requires about 200 new sprites (12 frames per loop, 8 directions, plus speaking, etc.).

WalkStraight seems to work fine, so I'll probably just avoid using "Walk" altogether.
#270
Quote from: Pumaman on Sun 27/04/2008 19:38:18
Would you be able to upload a small 1-room game that demonstrates the problem?
no, but I could upload a very large 1-room game that demonstrates the problem: http://enterthestory.com/dump/Enter%20The%20Story.zip :) The main character is the one who walks and jumps in a straight line, from the middle to the bottom right and back again a few times. (the file should be downloadable about 10 minutes after this message). Sorry the file is so large.
#271
Quote from: Pumaman on Sun 27/04/2008 17:05:25
I'm sure that particular issue was fixed. What movement and animation speeds are you using for the main character? When did this problem start happening?
It's always been an issue, but I never paid attention to it because I was new and figured I was doing something stupid. (Probably I still am!) The character in question has his walkspeed set to 4. He walks from (140,100)->(390,150) and scales from 40 to 60%, ending up at 70 pixels high. His jumps are about the same as his height. He jumps maybe 3 or 4 times a second, and otherwise walks the right speed. I think I saw jumps when using a larger sprite, but the jump was a much smaller percentage of his height so thst's less of a problem.
#272
I have the same problem that is described in part 2 of this thread: http://www.adventuregamestudio.co.uk/yabb/index.php?topic=14325.0
Pumaman said he's add it to his list of things to fix. That was in 2004. Any update?

More details:
I have around forty characters on screen who walk randomly using "walkStraight" and they work perfectly. But the main character uses "walk" and jumps by around 70 pixels at a time. Antiglide is on, and all characters have solid turned off. Any idea what might be happening, or how to fix it?
#273
Quote from: EvilTypeGuy on Fri 25/04/2008 04:19:01
I need to know how many people out there actually *use* and *need* the AGS Linux port.

Linux was a crucial factor in my choosing AGS. it is why I am, now committed to using 2.72 forever: my first game will connect with future releases using RunAGSgame.  (RunAGSgame DOES work in 2.72 under Linux doesn't it?)
#274
Edit: after seven hours of trying I finaly found the solution. This code was being called twice. Nothing to see here.

[original post:]
I need to change rooms several times in the same cutscene. I understand that 'ChangeRoom' has to run as the last item in any script. So I wrote the following code (The actual function is very, very long, but I think these are the relevant parts:)

Code: ags

function runCutScene(String cutSceneName)
{	if(cutSceneName =="room1") {
	StartCutscene(eSkipAnyKeyOrMouseClick); 
	character[1].Say("I am now in room1");
	EndCutscene(); 
	player.ChangeRoom(2) return; }
	if(cutSceneName =="room2") {
	StartCutscene(eSkipAnyKeyOrMouseClick); 
	character[2].Say("I am now in room2");
	EndCutscene(); 
	player.ChangeRoom(3) return;}
}

A user clicks in room 1 to call runCutScene(1).
runCutScene(2) is called automatically when room 2 loads, after fade in.
Result: CRASH: AGS complains about two instances of 'ChangeRoom' being queued.
So I tried again:

Code: ags

function runCutScene(String cutSceneName)
{	if(cutSceneName =="inside") {
 StartCutscene(eSkipAnyKeyOrMouseClick); 
	character[1].Say("I am now inside");
	EndCutscene();
	setTimerToWaitThenChangeScene(2); return; }
	if(cutSceneName =="outside") {
	StartCutscene(eSkipAnyKeyOrMouseClick); 
	character[2].Say("I am now outside");
	EndCutscene(); 
	setTimerToWaitThenChangeScene(3);
	return; }
}

This is the same, except runCutScene(1) ends by setting a global timer. This is checked by repeatedlyExecute. When the timer ends, the player moves to the new room. This time the room loads properly, but "I am now in room2" is spoken in room 1, BEFORE the room changes!

Any idea what's happening, and how I can fix it?

(edited to clarify what room is what)
#275
Quote from: KhrisMUC on Wed 23/04/2008 12:08:57
You could put the button text and button color on the image for the GUI, then clear the button's text (which'll turn it transparent).

Thanks. I've done that on the more important buttons, but it means making three graphics for every button (pushed, not pushed, etc.). It just seems like a lot of work for a simple plain button. Is there no other way?
#276
Is there some way to get GUI buttons in a different color than grey/gray? If I use a custom graphic then the entire image is shown, and I need three images per button. But all I want is buttons that aren't grey. Any ideas?
#277
Thanks for the suggestions. Sounds like they would work.

In this case I can't use ghost followers, since I have over forty characters on screen already, and AGS wont allow more than 50. And there are also issues with any extra code slowing down the scene.

I finally opted for a completely different solution: the small character problem is made much worse because they all look similar, and are all moving erratically. So I made it so the user can press the space bar to stop them, then clicking on one is much easier.

Thanks again for the ideas.
#278
Is it possible to selectively turn off pixel perfect clicking? I need to be pixel perfect for large or stationary characters, but small and fast moving characters are almost impossible to click on :)
#279
Quote from: seraphimdreamer777 on Thu 17/04/2008 04:46:17So basically what I'm asking is how I give enemies A.I.
My game has a lot of characters who have very simple AI. You just need to use 'repeatedly_execute_always()'. In my game I typically have 30 characters on screen, and they decide to walk or talk on their own.

The only problem I had was speed, since it can slow the game down f you change so many things every frame. But I solved that by checking just one character every frame, and using "WalkStraight" instead of "Walk" whenever possible.
#280
Ah! it's obvious now you point it out! I'd added that line because I intended to leave a "spare" string for future use, then never paid attention to it. Thanks!
SMF spam blocked by CleanTalk