AGS 3.0.2 SP1 now available!

Started by Pumaman, Sat 21/06/2008 17:39:25

Previous topic - Next topic

Ghost

Um, no... but now I have, and it works perfectly. Thank you, CJ- life saver!

SSH

#41
Not really SP1-specifc, perhaps, but:

Code: ags

  import static function Inc(String name, int max=2147483647);


gives:

Quote
Failed to save room room1.crm; details below
UltraVariables.ash(178): Error (line 178): default parameter out of range

EDIT:
Trial and error shows that the limit for a default parameter is 32000... very odd!

The data types part of the help file says that is maxint... is that wrong?

(N.B. it would be nice if MAXINT was defined along with other constants like limits.h has)
12

AJA

I found something weird in the latest release (haven't tried SP1) when I was making my OROW game.

Every now and then the inventory hotspot marker settings would revert back to "no marker" (every item) when I had already set all of them to "use sprite slot". The hotspot position stayed where I had set it.

All I know is that sometimes when I tested the game, the markers had disappeared and then I checked the item settings which had changed on their own. Actually, now that I've opened the game project, the markers have changed to "no marker" again.

Pumaman

#43
QuoteSpeaking of future versions, would it be possible to have AGS put the savegame folders under My Documents\My Games\ on XP instead of My Documents?

Yeah, I can appreciate this. I'm not sure if there is a standard name in XP, but it could create the folders as sub-folders under My Documents\My Saved Games or something.

QuoteFailed to save room room1.crm; details below
UltraVariables.ash(178): Error (line 178): default parameter out of range

Trial and error shows that the limit for a default parameter is 32000... very odd!

Default values for parameters are stored by the compiler as 16-bit ints, therefore they're limited to 32000. This isn't documented because default parameters themselves are an undocumented feature ;)

QuoteEvery now and then the inventory hotspot marker settings would revert back to "no marker" (every item) when I had already set all of them to "use sprite slot". The hotspot position stayed where I had set it.

Hmm, did you have more than one inventory item pane open at the time? The problem is that the hotspot marker is a single game-wide setting, but is reflected in each individual inventory item editor. I really need to change the way this works because it's quite confusing.

AJA

Quote from: Pumaman on Fri 04/07/2008 18:53:59Hmm, did you have more than one inventory item pane open at the time?

Maybe... So, the marker settings are saved when the pane is closed? I always changed them back to using a sprite individually (so every item pane was open in the end). But I never changed the settings to "no marker" for any of the items.

SSH

Quote from: Pumaman on Fri 04/07/2008 18:53:59
Default values for parameters are stored by the compiler as 16-bit ints, therefore they're limited to 32000.

The manual says shorts go from -32768 to 32767, is it wrong?
12

Lt. Smash

Quote from: SSH on Sat 05/07/2008 17:21:03
Quote from: Pumaman on Fri 04/07/2008 18:53:59
Default values for parameters are stored by the compiler as 16-bit ints, therefore they're limited to 32000.

The manual says shorts go from -32768 to 32767, is it wrong?
no this shouldn't be wrong.

normally shorts go from -32768 to 32767. (cause (â€"2^15) to (2^15 â€" 1))
integers from -2147483648 to 2147483647. (cause (â€"2^31) to (2^31 â€" 1))

SSH

Quote from: Lt. Smash on Sat 05/07/2008 18:15:16
no this shouldn't be wrong.

I know it shouldn't be wrong, but the limit I described of 32000 implies it is
12

Pumaman

Quote from: AJA on Sat 05/07/2008 16:31:51
Maybe... So, the marker settings are saved when the pane is closed? I always changed them back to using a sprite individually (so every item pane was open in the end). But I never changed the settings to "no marker" for any of the items.

The best way to make sure is to quit the editor, load it up again, open a single inventory item and make your changes there. Then save the game and quit, load it again, and it should be applied to all inventory items. As I say, I need to improve the interface for this because it's pretty rubbish at the moment.

QuoteThe manual says shorts go from -32768 to 32767, is it wrong?

Shorts do indeed go from -32768 to 32767, it's just a quirk of the script compiler that limits default parameter values to 32000.

GarageGothic

#49
I think I found a bug. It seems that if you make an object invisible before or right after changing its graphic, its sprite will not actually update. It's difficult to explain, but here's an example:

Code: ags
if (jigsaw_shadowobject != null) {
  jigsaw_shadowobject.Graphic = 0;
  if (jigsaw_shadowsprite != null) jigsaw_shadowsprite.Delete();  //uncommenting this will make the object's dynamicsprite not update for some reason 
  jigsaw_shadowobject.Visible = false;
  }


This code is supposed to change the graphic of an object (jigsaw_shadowobject) from a DynamicSprite (jigsaw_shadowsprite) to sprite 0 (other sprite numbers give same result, so it's not a 256 color issue), then delete the DynamicSprite and hide the object. However, the next time I create the DynamicSprite  from a different existing sprite, it shows the same graphic as the previously deleted sprite (if I don't delete the sprite, on the other hand, it updates properly). I'm guessing that the object somehow still "owns" the sprite, so it doesn't get deleted, but shouldn't that give an error message?

If I comment out "jigsaw_shadowobject.Visible = false;", everything works as intended, except for jigsaw_shadowobject being visible of course. Can easily be fixed by moving it off-screen, but still the behaviour seems weird.

Edit: The new DynamicSprite IS created properly - I've verified this by drawing it to the background. It's only the Object.Graphic that doesn't actually update to the new version of the sprite when setting "jigsaw_shadowobject.Graphic = jigsaw_shadowsprite.Graphic;". Could this be related to the bug where GUIs using DynamicSprites as graphics didn't update properly?

Edit 2: Inserting a "Wait(1);" before turning the sprite invisible prevents the problem, so it seems only to happen if the sprite is deleted and the object turned invisible during the same loop.

Pumaman

Hehe well spotted, that could happen if you did things in that order. It should be fixed in 3.0.3 beta 1.

Ishmael

Quote from: Pumaman on Fri 04/07/2008 18:53:59
QuoteSpeaking of future versions, would it be possible to have AGS put the savegame folders under My Documents\My Games\ on XP instead of My Documents?

Yeah, I can appreciate this. I'm not sure if there is a standard name in XP, but it could create the folders as sub-folders under My Documents\My Saved Games or something.

I don't know about its standard-ness, but a lot of commercial games put their save files and other stuff under My Games.
I used to make games but then I took an IRC in the knee.

<Calin> Ishmael looks awesome all the time
\( Ö)/ ¬(Ö ) | Ja minähän en keskellä kirkasta päivää lähden minnekään juoksentelemaan ilman housuja.

SSH

(as seen here:  http://www.adventuregamestudio.co.uk/yabb/index.php?topic=26306.msg458681#msg458681)

If you have your speech style set to SierraWithBackground, Text Overlays seem to acquire a white background. Looks like an AGS bug to me...
12

Pumaman

QuoteIf you have your speech style set to SierraWithBackground, Text Overlays seem to acquire a white background. Looks like an AGS bug to me...

I'm struggling to remember if this is a bug or by design, but the manual does say "A screen overlay looks identical to the way speech text is displayed in conversations" which seems to imply that it's by design. At least, as far as I can tell it has always worked this way.

You won't always get a white background -- you should get the speech text window drawn around the text (but this will just be white if a text window isn't set).

So I think in conclusion this isn't a bug, but I have to admit I'd forgotten that it worked this way too!

SSH

#54
Would it be possible to have a future feature of it optionally working the same way as it does in every other mode, please?

If I change the Speech Style just before I create the overlay, then change back after its created but before I get rid of the overlay, will the overlay look how I want (i.e. without BG?)

EDIT 2:

This isn't possible, because there's a SetSpeechStyle, but no GetSpeechStyle :(
12

SMF spam blocked by CleanTalk