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

Topics - EnterTheStory (aka tolworthy)

#41
According to this thread, a game will only ever use one winsetup file, even if you use RunGASGame. Which raises issues with translations. Let's say I have the following files (created with 2.72):

game1.exe
game1inFrench.tra
game2.exe
game2inFrench.tra

Now let's say I start game1, using game1inFrench.tra. Now I use RunAGSGame to run game2. AGS will still be using game1inFrench.tra, right?

So the only way to use translations with RunAGSGame is to create one giant translation file that includes both games:

allgamesinFrench.tra

Would that work? Or is there an easier way?

And if I had a hundred games and a humungously giant .tra file, would this slow the game down?
#42
I'm writing code for moving back and forth between games, using 'RunAGSGame.' Before leaving a game I save it. When coming back I load the saved game. But on the way back I always get this error message:


Code: ags

---------------------------
Adventure Game Studio
---------------------------
An error has occured. Please contact the game author for support, as this
is likely to be a scripting error and not a bug in AGS.
(ACI version 2.72.920)

Error: Restore_Game: Game has changed (views), unable to restore position

---------------------------
OK   
---------------------------


Any idea what I should do? Any ideas would be greatly appreciated!
#43
My pointer skills are very rusty, so I'm appealing to all you programming jocks out there. This code requires me to write the same variable name twice on each line. I'm sure this must be bad practice. Is there any way to re-write it ina simpler form? Thanks!

Code: ags

function readWriteBetweenGames(bool read) //
{	File	*f;	
	if(read) { f = File.Open("between games.dat", eFileRead);	if (f==null) return 999;}
	else	 { f = File.Open("between games.dat", eFileWrite);if (f==null) return 999;}	
	// rc people
	if(read){if(f.EOF)return 1; rightClickedPerson = f.ReadStringBack();} else f.WriteString(rightClickedPerson);	
	if(read){if(f.EOF)return 1; rcPersonX 			 	 = f.ReadInt();			  } else f.WriteInt(rcPersonX);	
	if(read){if(f.EOF)return 1; rcPersonRoom	  	 = f.ReadInt();			  } else f.WriteInt(rcPersonRoom);	
	if(read){if(f.EOF)return 1; rcPersonGame		   = f.ReadInt();			  } else f.WriteInt(rcPersonGame);	
	// memory objects
	int n =1; while(n <=10)
	{	if(read){if(f.EOF)return 1; memoryWhat[n] 	 = f.ReadStringBack();} else f.WriteString(memoryWhat[n]);	
		if(read){if(f.EOF)return 1; memoryWhatWho[n] = f.ReadInt();			  } else f.WriteInt(memoryWhatWho[n]);	
		if(read){if(f.EOF)return 1; memoryWhatGame[n]= f.ReadInt();			  } else f.WriteInt(memoryWhatGame[n]);	
		if(read){if(f.EOF)return 1; memoryWhatRoom[n]= f.ReadInt();			  } else f.WriteInt(memoryWhatRoom[n]);	
		n++;
	}	if(read){if(f.EOF)return 1; memoryWhatNow		 = f.ReadInt();			  } else f.WriteInt(memoryWhatNow);	
	f.Close();
}


Thanks in advance. (PS the actual function is a lot longer)
#44
I'm trying to optimize the following code:
Code: ags

if(player.variable ==1) dothis();
if(player.variable ==2) dothat();
if(player.variable ==3) dothis();
if(player.variable ==4) dothat();
if(player.variable ==5) dothis();
// repeated a hundred times every frame

Would there be a tiny speed increase to do this:
Code: ags

int n = player.variable;
if(n ==1) dothis();
if(n ==2) dothat();
if(n ==3) dothis();
if(n ==4) dothat();
if(n ==5) dothis();
// etc.

In other words, is finding player.variable a single step, or does it take a couple of steps (find player, find variable)?

Sorry if this is an idiot question!
#45
Several very old threads request the ability to delete characters. In 2005 Pumaman said it was on the 'to do' list. Did this ever happen?

No doubt 3.0 fixes this, but I use 2.72 for greater Linux compatibility. (My users' comfort is more important than my comfort.)

Manually overwriting a character is non-trivial, as many of my views use over two hundred sprites. I'd love to use the "import character" function but it won't work after 300 characters.

Are there any workarounds? Like importing over an identical name, changing an AGS file in a hex editor, etc.?
#46
I have a few characters where the same animation should play continuously, regardless of whether the character is moving or stops.

I could use the same animation for walking and idling, but as far as I can tell, every time a character moves the walking animation starts from frame 1. And when they stop the idle animation starts from frame 1. Is there any way to just have one long animation loop continuously? (I'm using 2.72)
#47
I'm using a translation source, but my characters still speak English.

EDIT: I guessed the wrong problem - see later answer.

[deleted code]
#48
Does anyone know of a program that can apply Floyd Steinberg dithering when reducing from 24 bit to 16 bit images? (Apart from Image Alchemy by Handmade Software, but that costs a hundred dollars.)

Also, does anyone know of an image editor that uses the same 16 bit palettes at AGS? I assumed that all 16 bit palettes are the same, but have noticed that if a 16 bit image (saved in Alchemy of Paint Shop Pro) is used as a 16 bit background in AGS 2.72, the colors change slightly.
#49
I'm trying to think of general purpose comments that can be used when looking at or thinking of something. But you can't use the object's name, or even the word "it." Here are my lame attempts so far:

1. "M'eh"

2. "Boring"

3. "Interesting"

4. "Sometimes words like [string] come into my mind, I don't know why."


Any other suggestions?



More details:

I have over 200 characters and 1000 objects. Any character can think about any other character or object, even if it's not in the same room. The user right clicks on character X, then right clicks on character  or object Y, then character X says something. Most characters and objects have default responses, but I also need generic responses.

A particular problem is children's responses. Most of my default responses assume the speaker is an adult. But those comments sound strange coming from the mouth of a child. On the other hand, it should be easier to find generic kids' responses, since most kids have general purpose phrases like "meh" and "boring."

I can't even use words like "it" and "those" because of issues with translation: many languages have different forms of "it" depending on the context (see this thread for details).

You can't say "looks like" or "I'm looking at" because the object may not be in the same room.

All characters are individuals, not groups, so saying 'I' is acceptable.

You can use the exact string of the object, if that's any use. It is also acceptable to specify a class of speaker (e.g. "if speaker is a child", "if speaker is male" etc.). But the only thing I can't specify is the looked at thing, since there are too many.

Use slang if you want. In fact, that may be the only way to solve the problem. It's probably impossible to find general purpose comments that work in every possible language or culture, so I'm asking translators to find their own general purpose responses, using whatever works for them.

#50
In my game I have about two hundred characters and over a thousand hotspots. To simplify responses I sometimes have general purpose responses, and just change the words "it" and "them" depending on if the hotspot is a plural. But this creates problems with translating the game into other languages.

Words like "it" and "them" and "you" don't translate well. My translator keeps asking for more detail about the kind of thing being looked at: in English it's just "that" or "it," but in Dutch (for example) the context matters.

Has anyone else come up against this problem? How have you solved it? How do you create general purpose response code that translates easily?
#51
I've been thinking of how to display a Chinese font in my game. What do you think? It would be a big job and don't speak Chinese so I thought I'd run it past you guys first.

1. Create a sprite for each Chinese character (I gather that simplified Chinese has 6500 characters.)

2. write a non-AGS program to convert this:

Code: ags

"random string in unicode font"


to this:

Code: ags

"12 345 6 78 901 2345 67..."  // sprite numbers and spaces, in a normal TTF font


3. Write a non-AGS program to convert a translation source. So this

Code: ags
"English line
Chinese line
English line
Chinese line"


becomes this

Code: ags
English line
12 345 6 78 901 2345 67
English line
890 12 345 67 8 901 23


4. Create 5 GUIs to act as speech balloons, with 20 buttons each
(for 20 sprites - i.e. you allow up to 100 words per Chinese sentence)

5. Create an alternative 'say' function

Code: ags

function sayChinese(String chinese_as_numbers)
{	// split the string into numbers
	// change the sprites used on the GUIs
	// decide the best x,y positions for GUIs and buttons, make visible
	// decide the best delay, etc.
}


Do you think that would work?
#52
A helpful user just wrote this regarding my game:

QuoteI decided to try playing the game using WINE.  Turns out that it runs beautifully that way. (Must be that one of the WINE developers loves adventure games. :) )

For reference, the version of WINE that I used was 1.1.1 running on
Debian Linux 5.0 (also known as "Lenny").

For your Mac users I have found a page on WINE's site that links to
conveniently packaged pre-built binaries.
[ http://wiki.winehq.org/MacOSX/Installing ]
All they need to do is download and "unpack" the software.

Is it really as simple as that? So AGS games can now run on the Mac?
#53
AGS lines have a 500 character limit (in 2.72 at least). But it appears that translated strings (used in translation source files) can be much longer. Which is very useful for languages like German.

What's the upper limit for the length of a translation String? (Could I, for example, translate a game into Old Entish?)
#54
It appears that the translation source (in 2.72) misses out some character names. Any idea why? I attach a screenshot: character list at right, resulting translation source at left.


My translator pointed out, for example, that "Conventionary" - a major character in the game - doesn't appear in the translation source at all, in any place. Any ideas what might be happening?
#55
I finally got the game finished. Well, the first story at least. Hopefully the second story won't take as long! I won't be promoting it until the second story is ready (in July) because it's been a learning experience and I'll do a lot of things differently in the next installment: Dante's Inferno.

But anyway, it's done! Woohoo! Hopefully there aren't too many rough edges, but  I think people got sick of testing it, so it's time to kick it out to the world and move on.  For screenshots, demo, the full game, and other stuff, see


EnterTheStory.com


Many thanks to all those who left feedback about early test builds. Anyone who's helped out gets a free game. If you helped and don't get an email from me in the next couple of days, just let me know.

Oh, and happy 2009!
#56
Advanced Technical Forum / alt-tab problems
Wed 17/12/2008 09:09:16
A couple of users have complained of ALT-TAB problems. For example:
QuoteWhen I alt-tabbed out, I couldn't go back in, it said mouse = 0 click = 0 or something, and got me stuck.

It works fine for me. Any idea what's happening and how to avoid it?

useful files:
The game he tested
the latest version
the latest version without music (smaller download)
#57
My game shut down while saving yesterday, resulting in corrupted sprite files. So I'm busy adding sprites from earlier backups. For speed, I save the entire sprite folder from the old backup, then 'import multiple sprites'. But strangely, this results in TWO identical sprites (with identical numbers) for each imported sprite. Is there any way to remove the second sprite? The game won't let me delete it because the number is of course used.

I don't have this problem when pasting over corrupt sprites one by one (using the clipboard), but this takes literally hours, since every single change means every other sprite in the folder is loaded again, with multiple error messages for each one (many of my sprite folders have over a 100 sprites in each).

Is there an easier way to recover sprites from a backup, without changing any other parts of the game?
#58
According to the old thread on the Linux runtime,
QuoteYou cannot tell ags which file to use as the game file. It looks for ac2game.dat in the current directory.

Does this mean that runAGSGame cannot work in Linux? Or is there a workaround -  can Linux detect one game's request for a game in another location?

I'm just finalising details for getting my game to run in Linux, and feeling pretty stupid that I never thought through the implications last year (I did ask about RunAGSGame in Linux back then, but nobody answered so I assumed it wasn't an issue.)
#59
I want to make a GUI button behave differently, depending on if it's the left or right mouse that called it. I tried mouse.IsButtonDown(eMouseLeft) but that doesn't work (I'm guessing because the button is triggered by the mouse being released).

Do I need to use repExAlways and constantly check if the mouse is pressed over a button? Or is there a simpler way?
#60
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?
SMF spam blocked by CleanTalk