Adventure Game Studio

AGS Support => Advanced Technical Forum => Topic started by: pcj on Wed 21/02/2007 15:27:20

Title: Game name length
Post by: pcj on Wed 21/02/2007 15:27:20
I didn't see anything about this in the forums or even a mention of it in the System limits section of the manual, but the length of the Game name field seems to be a pretty arbitrary limit (one which I need to be a bit longer), so I was wondering if there were a way to make it longer, i.e., in the global script, or if I should just wait for 2.8.

Thanks.
Title: Re: Game name length
Post by: Ashen on Wed 21/02/2007 16:00:16
The Game.Name (http://www.adventuregamestudio.co.uk/manual/Game.Name.htm) property can be altered in script, and should only have the same limits as any other String (if there are any? It can definitely be longer than the field in the editor allows).

Any help?
Title: Re: Game name length
Post by: Scorpiorus on Wed 21/02/2007 16:04:19
And yeah, I agree a longer name support in the Game name editbox would be nice. For cosmetic reasons.
Title: Re: Game name length
Post by: pcj on Wed 21/02/2007 16:07:04
Quote from: Ashen on Wed 21/02/2007 16:00:16
The Game.Name (http://www.adventuregamestudio.co.uk/manual/Game.Name.htm) property can be altered in script, and should only have the same limits as any other String (if there are any? It can definitely be longer than the field in the editor allows).

Any help?

Should work, I'll check it out, thanks.
Title: Re: Game name length
Post by: monkey0506 on Wed 21/02/2007 16:13:00
My tests show that you can only make the Game.Name property up to 99 characters. But I may have found a bug in that trying to access Game.Name.Length generates an error:

Quote---------------------------
Compile Error
---------------------------
There was an error compiling your script. The problem was:

In: 'Global script'



Error (line 9): must have an instance of the struct to access a non-static member



Do you want to fix the script now? (Your game has not been saved).
---------------------------
Yes   No   
---------------------------

Line 9:

  Display("game name length: %d", Game.Name.Length);

I had to copy Game.Name into another String first to be able to figure out its length.
Title: Re: Game name length
Post by: Scorpiorus on Wed 21/02/2007 16:26:35
Ah yeah, that's a known issue with the implementation of static properties where we can't directly access their member fields and need to use a temporary as you say.
Title: Re: Game name length
Post by: monkey0506 on Wed 21/02/2007 16:58:02
Okay as long as it's a known issue I won't report it then. ;)

But what I said about the length holds, Game.Name is truncated to 99 characters in the script.
Title: Re: Game name length
Post by: Pumaman on Wed 21/02/2007 17:36:28
The editor limits the game name to 29 characters, which I can see might not be enough if you have a long game name.

As a workaround, in your game_start script, do something like:
Game.Name = "This is my really long game name".

As monkey says, at run-time the game name is limited to 99 characters; if this poses a problem for anyone, tell me what the name of your game is and I'll have a think about it :P
Title: Re: Game name length
Post by: monkey0506 on Wed 21/02/2007 17:37:38
But CJ...you must include subtitles...very long subtitles. :=
Title: Re: Game name length
Post by: Kweepa on Wed 21/02/2007 22:54:05
"The game that is almost impossible because to complete it you must before anything else p"
Title: Re: Game name length
Post by: pcj on Wed 21/02/2007 23:12:22
What's the reasoning behind limiting the game name anyway, besides string limits?
Title: Re: Game name length
Post by: SSH on Thu 22/02/2007 10:01:19
Because having such a long name is stupid?
Title: Re: Game name length
Post by: Pumaman on Thu 22/02/2007 15:51:52
There's no particular "reasoning" to most of the limits in AGS, it's more to do with the data structures that the game is saved into.
Title: Re: Game name length
Post by: pcj on Thu 22/02/2007 15:59:43
Ah, ok then.
Title: Re: Game name length
Post by: GarageGothic on Thu 22/02/2007 16:08:54
Titles longer than 99 characters??!?  :o Here I thought that "The Lord of the Rings: The Battle for Middle-Earth II â€" The Rise of the Witch King" was a horribly long name for a video game. I'd hate to see how the desktop shortcut for the game looks.