AGS 2.71 Final 2 - Politically Correct Edition

Started by Pumaman, Sun 05/06/2005 23:32:14

Previous topic - Next topic

Pumaman

Following advice from my lawyers, AGS will in future be known as "Computer application that can be used to create games of an adventure or otherwise nature".
Anyway, the Final is now here.

Now, the main changes here are some spritey things:

Firstly, the editor no longer loads the complete sprite set into memory when you load a game. This is for two reasons:
1. with large games where the sprite file was getting on over 500 megs, it was taking absolutely ages to load the editor, and
2. if you didn't have enough RAM, the editor couldn't load the game at all

Now, the changes mean that the editor has a capped sprite cache of 70 MB. This however means there is the possibility that if you have more than 70 megs of sprites on one screen (eg. a large View with loads of large sprites), the editor could slow to a crawl of disk thrashing.

So, testing is required to see whether:
(a) it works at all -- does it still load and save the game successfully with no corruption
(b) performance is affected. How much faster or slower is the editor now? Is saving the game much slower?

Obviously the difference will only be noticable on relatively large games.

The second change is optional sprite compression. There is a new option in the General Settings tab to compress sprites. This is done with a basic RLE compression scheme, but it should reduce the sprite file size by about 70%.

So, again testing is required here to see:
(a) whether it works properly and there is no corruption of images
(b) how performance is affected. Saving the game will obviously take longer if spries are compressed. But how does the game engine perform? Does the game seem any slower when it's having to decompress sprites as well as load them from disk?

STRING CHANGES

Beta 3 introduces new friendly string support. Strings have long been the achilles heel of AGS scripting, and hopefully this will start to sort it out.

There's a new String type (that's a capital 'S'). These new strings behave like Java/C# strings in that you can easily assign to and manipulate them.
For example, in 2.7 and previous versions, you had to do this:
string text;
StrCopy(text, "This is my text");

in 2.71 beta 3, you can now do:
String text = "This is my text";

Furthermore, the == and != operators can be used to compare strings for equality (equivalent to using StrComp but much nicer). An additional benefit is that there is no longer a need for GetText() and SetText() methods -- instead, we can now just have Text properties.
As of beta 4, all the old-style functions that took a "string buffer" parameter have now been changed to return a string instead. Where properties have been created, you should be able to use them like any other property, so:
lblLabel.Text = "Hello";
String buttonValue = btnOK.Text;
and so on.

Backwards compatibility

In order to maintain backwards compatibility, a new "const" keyword has been added. This applies only to old-style strings, and allows them to interoperate with the new ones. A new-style String can be passed to a function that expects a "const string" (which means that it will not be allowed to change the string's contents), but cannot be passed to a function that expects a "string" (since it could overwrite the string data and mess things up).

So, you may find that any custom functions you have that take a string parameter stop working. If this is the case, change the parameter from "string" to "const string" and that should fix it.

Apologies for the inconvenience, but this is the only way to allow new Strings to interoperate safely with old-style strings.


Changes from Final to Final 2:
* Editor now forces all background imports to the game's colour depth.
* Insert and Delete keys now have allocated keycodes and are officially supported.
* Fixed crash rather than error message if script exceeded stack limit.
* Fixed / * and Enter keys on numeric pad not working if numlock was off (broke in RC3).
* Fixed script compiler mis-interpreting very short block comments.
* Setting game.close_mouth_end_speech_time to 0 now continues sierra-style speech animation indefinately, like it does with lucasarts speech.
* Improved music skipping when changing rooms.


Changes from RC4 to Final:
* Removed the warning about DOS if a new game name was longer than 8 characters.
* Fixed numeric keypad keys being treated as if numlock was always on, caused by RC3's allegro upgrade.

Changes from RC3 to RC4:
* Fixed Restore Game occasionally corrupting the managed object pool.
* Fixed GUI control event handler function names being incorrectly truncated.
* Fixed backwards compatibility issue with SetCharacterProperty(CHAR_IGNORESCALING)
* Fixed music not resuming after PlayVideo if crossfading was enabled.
* Removed "Target DOS" option from the menu, since the DOS engine is no longer available.

Changes from RC2 to RC3:
* Added AGS_NEW_STRINGS define to allow script modules to test for new-String support.
* Added "Enforce new-style strings" game setting to allow you to disable old-style strings.
* Completely disabled Ctrl+V in all blocking situations.
* Fixed WAV music files not being picked up from MUSIC.VOX
* Fixed crash in String.Substring and String.Truncate methods.
* Updated to Allegro 4.2.0, this may hopefully fix the problem some people have reported where the game does not shut down properly when you exit.

Changes from RC1 to RC2:
* Added plugin API CreateScriptString method to allow plugins to return Strings.
* You can now pass a literal string into a custom function that requires a String.
* The "dynamic sprite was not deleted" messages are no longer displayed if you close the game using the Windows Close button or Alt+F4.
* Fixed memory leak in GUI.SetSize/Width/Height methods.
* Fixed only one edge interaction being run if the player walked off two overlapping room edges.
* Fixed voice speech not being played if a SkipUntilCharacterStops command was in effect when the speech was displayed.
* Fixed IsKeyPressed not working with backspace (ASCII code 8).
* Fixed a backwards compatibility issue with the IgnoreScaling property.
* Fixed plugin headers not being parsed for autocomplete in RC 1.
* Fixed region light level picking up tint amount if you switched it from tint to light and then selected a different region.

Changes from beta 6 to RC1:
* Added Character.Scaling property; renamed IgnoreScaling to ManualScaling to reflect its new functionality.
* Added Character.Name property.
* Added DynamicSprite.SaveToFile function.
* Added GP_ISFRAMEFLIPPED option to GetGameParameter.
* The "this" pointer can now access pointer members in its struct.
* Underscores can now be used in GUI and view names, and invalid names pasted into the box are now rejected.
* Enum values can now be used as array size in struct members.
* Arrays and structs are now officially supported, and are documented in the manual.
* Managed objects in plugins are now Dispose()d when the game exits.
* Sprite cache size options in the Setup program changed to better reflect the needs of higher resolution games.
* Fixed CreateFromBackground not using the X & Y co-ordinates correctly.
* Fixed some usability issues in the Import Sprite dialog, where moving the mouse off the side of the image while right-dragging would cause the cursor to jump around.

Changes from beta 5 to beta 6:
* Added support for having pointer variables in structs.
* Added DynamicSprite.Crop, DynamicSprite.CreateFromBackground, Game.GetMODPattern, ListBox.InsertItemAt, String.Truncate, String.Substring script functions.
* Added menu option to build only the music or only the speech vox, since in large games rebuilding both could take a long time
* Added plugin API GetManagedObjectAddressByKey and GetManagedObjectKeyByAddress methods.
* Improved script compiler speed; compiling is now about 4 times faster than v2.62 and about twice as fast as v2.7.
* Slightly tweaked blocking characters to stop them walking through each other as much.
* "void" is now properly supported as a function return type
* Fixed walk-to point getting randomly moved if you alt+tabbed back into AGS from another application.
* Fixed error trying to AND/OR the string comparison == and != operators with other operators.
* Fixed + having a higher precedence than - and thus 5 - 3 + 2 giving 0 rather than 4.
* Fixed the player character's PreviousRoom property starting off as the first room number, rather than -1 as it said in the manual.
* Fixed static methods in plugin headers not being picked up by autocomplete.
* Fixed compiler not giving an error if you forgot a semicolon after an object method call.
* Fixed pamela voice lip-sync not always processing last phenome correctly.

Changes from beta 4 to beta 5:
* Added "Adjust volume with scaling" character option and equivalent Character.ScaleVolume property.
* Added "New Run Script Action" to the right-click menu in the interaction editor, to allow you to quickly create a Run Script interaction without having to go through the interaction dialog.
* Strings can now be returned from a function.
* Implemented lazy evaluation for && and || operators.
* If Sound is disabled in the game Setup, then it no longer plays in PlayVideo either.
* Ambient sound volume is now dropped along with the music volume while speech is being played.
* Compiler now does type checking on return values from custom functions.
* Disallowed using "Narrator" as a character script name since it caused compile errors.
* Fixed compiler to not allow a struct to be a member of itself.
* Fixed Single GUI Import not updating GUI images properly, and allowing duplicate GUI control names to be imported.
* Fixed the Import Dumped Text option truncating dialog options to 70 characters.
* Fixed Out of Memory crash if you had a character off the bottom of the screen and a walkable area with continuous scaling touched the bottom of the screen.
* Fixed Auto-Number Speech Lines starting from NARR0 rather than NARR1 for the narrator.
* Fixed Character.Room property not working, which broke in beta 4.

Changes from beta 3 to beta 4:
* Arrays of new-Strings are now supported.
* Added String.AppendChar and String.ReplaceCharAt methods.
* Added "noloopcheck" keyword to allow you to bypass the script loop checks.
* Added new-style string properties and functions: ListBox.Items, Object.Name, Hotspot.Name, InventoryItem.Name, Object/Character/etc.GetTextProperty, File.ReadStringBack/ReadRawLineBack, Game.InputBox, Game.GlobalStrings, Parser.SaidUnknownWord, Game.GlobalMessages, Room.Messages, Game.TranslationFilename, Game.GetSaveSlotDescription, Game.GetLocationName
* Changed a couple of double-mapped shortcut keys on menus.
* Renamed "Player Enters Screen" events to "Player Enters Room" to use consistent terminology.
* Fixed compiler allowing built-in types to be used in struct definitions.
* Fixed editor crash if you manually removed a #sectionend and then tried to edit that script function.
* Fixed character disappearing if it was tinted/lit and used an 8-bit sprite in a hi-color game.
* Fixed old speed/sound settings reappearing when deleting and then creating new frames in the View Editor.
* Fixed editor crash if you typed a string longer than 200 characters into a text property.
* Fixed "out of memory" crash in game if you accidentally used a full-screen image as the talking view for sierra-style speech.

Changes from beta 2 to beta 3:
* Added friendly string support, where strings are objects and can be handled in a much more simple way than in previous versions.
* Added == and != operator support for strings.
* Added const string support to prevent accidentally passing the parameters the wrong way round to functions like StrCopy.
* Game now attempts to mute audio when alt+tabbing away to another application.
* Display command now obeys the SetVoiceMode setting.
* PgDn, PgUp, Home and End are now mapped to the ASCII codes of their equivalents on the numeric keypad, rather than duplicating arrow keys.
* Enlarged speech colour box on Characters pane to display 5 digits.
* Fixed compiler crash when declaring a large struct.
* Fixed volume jump if a track was fading out and you changed rooms to a room with a louder volume setting.
* Fixed editor check for vox files needing to be updated, which broke in beta 2 with the new sub-folders.
* Fixed DynamicSprite.Rotate not working with angles > 90 degrees.
* Fixed CyclePalette not updating the screen when cycling backwards.

Changes from beta 1 to beta 2:
* Added Object.IgnoreScaling property.
* Added DynamicSprite.Rotate function.
* Editor now uses "Speech" and "Music" sub-folders to store speech and music files in to reduce the clutter in the main game folder.
* Pamela lip-sync allows multiple phenomes per frame.
* Narrator speech now closes the Display() window when the voice finishes, if play.skip_display is set to auto-remove after time.
* Hi-colour palette pane now allows you to type in a colour number and see its RGB settings.
* If a dynamic sprite attached to an object is deleted, the engine now prints an error message rather than crashing.
* Fixed engine error if Turn Before Walking was enabled and a character only had left/right loops.
* Fixed Overlay.X/Y properties returning wrong value for SayBackground overlays.
* Fixed editor crash when selecting a sprite for a GUI control.
* Fixed editor crash when deleting sprite folders.
* Fixed editor crash on Characters pane if the character's normal view had no frames in loop 0.
* Fixed GIF import crash with some gif images (thanks to Hard Rock for the speedy fix)

Changes from 2.7 to beta 1:
* Added option to compress the sprite file to reduce disk usage.
* Added editor sprite caching, to improve performance and reduce memory usage of the editor with large games.
* Increased max speech files per game to 10000.
* Added Clickable property to GUI controls to allow you to disable a control without affecting its appearance.
* Added DynamicSprite.CreateFromExistingSprite, Resize and Flip functions, and Width and Height properties.
* Added Maths.ArcTan2 function.
* Added Slider.Min and Slider.Max to allow the script to access these slider properties.
* Added option to PlayFlic not to clear the screen before starting playback.
* The hi-color Palette pane now displays the current colour number in a text box so that it can be copy & pasted easily.
* Renamed the setup.exe in the AGS distribution to setup.dat to prevent unzip programs from trying to "install" it.
* Fixed compiler bug allowing enums to be redefined.
* Fixed colours in GUI editor showing up wrong in 32-bit colour games.
* Fixed SetCharacterIdle skipping the current frame if called while the character was moving or animating.

VERY IMPORTANT -- BACK UP YOUR GAME BEFORE TRYING IT OUT. THE SPRITE SAVING CODE HAS BEEN CHANGED AND BUGS/CORRUPTION ARE POSSIBLE

Remember, as always it's a beta so some files are missing -- get them from the 2.7 distribution.

beta no longer available, final version now released

strazer

#1
Neither the editor nor the game are noticably slower for me with sprite compression enabled (P4 2,4GHz, 640x480x32 on WINE/Linux).
My acsprset.spr file has shrunk from 13MB to 1MB! Wow!

Edit:

Quote* The hi-color Palette pane now displays the current colour number in a text box so that it can be copy & pasted easily.

Could you make it so it also works the other way around, i.e. that you can enter or paste a number in the text box and it displays what color it is?

Gilbert

#2
:D

Haven't tried it yet, however, since it's possible that not all sprite are loaded at once, in time critical events (like cutscenes which required music synchronizing animations, etc.) it can make the animations jerky (for loading sprites). I'll suggest adding 2 functions, like (well, sorta stole the idea from how AGI works):
PreloadSprite(int slot)
and
ReleaseSpriteControl(int slot)
The former, if sprite in slot isn't in memory already, will force reading it into memory and "lock" it (locking a sprite means it will not be released from memory until ReleaseSpriteControl() is called).
The later just "unlocks" a sprite (if it's locked) so the engine will have full control on it.

So, you can preload all the essential sprites before a cutscene and then release them afterwards. (I know it can cause problem if people never unlock preloaded sprites, however these functions are for expert users anyway, I think it wou;dn't be much problem).

EDIT: So I misread stuff again, the sprite caches are for the editor (well it's implemented for the engine ages ago), but anyways the about suggestiions still hold.

Gregjazz

So would the compression work with 256-color mode, too? Sounds exciting!

scotch

#4
Wonderful release!Ã,  Been waiting for sprite compression forever...
I got this error on starting the editor but it continued to work fine after I pressed ok...

---------------------------
AGS Editor Error
---------------------------
The dynamic link library 'accomole.dll' was not found, but it is required in order for the AGS Editor to run. Make sure you have installed AGS correctly.
---------------------------
OKÃ,  Ã, 
---------------------------

Edit: my game goes down from 15mb to 4.87mb, nice.

strazer

Beta versions only contain the files changed since the last stable version.
You have to extract them over the v2.7 release (it contains accomole.dll).

Rui 'Trovatore' Pires

#6
<stares at CJ>

Ok, it's official. You're a workaholic God. If the real AllMighty were as efficient as you, things'd be a looot different.

I mean Jesus Please Us, 2.7 hasn't even been really made officially official... thingy! And thanks for the Sliders Max and Min - I was just needing those, I just hadn't bothered not to work around them.

<sings Hossanna>

EDIT - Ok, so 2.7 was official after all, I hadn't checked the main page yet. It's just that I didn't get the newsletter yet, so I thought it still hadn't been released.
Reach for the moon. Even if you miss, you'll land among the stars.

Kneel. Now.

Never throw chicken at a Leprechaun.

GarageGothic

#7
Oh thank you, thank you, thank you. The new dynamic sprite functions are just what I need.  I'm crossing my fingers that any-degree rotation will sneak it's way into another beta ;) I can't wait to check out this baby.

Edit: And the new sprite compression sounds awesome too. I was getting a bit worried when my game file size doubled after I'd imported 150-something grayscale 120x200 frames.

Rui 'Trovatore' Pires

BTW, I DID experience massive slowdown in one instance, but then, I had 5 loops FILLED with 640x480 sprites in high-colour. Not to worry, since then I've been advised as to how to workaround THAT mess. But while it lasted, I had to give agsedit FULL PC priority, otherwise I wouldn't have been able even to delete the sprites.

Just thought you'd like to know, though this was such an extravaganza on my part it's not likely to be a problem.
Reach for the moon. Even if you miss, you'll land among the stars.

Kneel. Now.

Never throw chicken at a Leprechaun.

SSH

Is there any way to pre-populate the cache, if a particular cutscene uses a lot of new sprites?  Something like:

ImAboutToUseSprite(234);
ImAboutToUseView(COMPLEXANIM); // pre-populate cache with al sprites in view

or is that not necessary due to the new mind-reading plugin for AGS?  :=
12

Gilbert

hehe ssh read my post a few posts back. ;)

The PreloadView() idea sounds good though.

Rui 'Trovatore' Pires

Rereading these new posts I'd just like to say, I hope these new features don't make AGS more complicated, it would be a shame after all the objectivation which makes it so much simpler...
Reach for the moon. Even if you miss, you'll land among the stars.

Kneel. Now.

Never throw chicken at a Leprechaun.

fovmester

Whoa! Sprite compression!  :o That's wonderful! Hope it works without slowdowns!

Redwall

Quote from: Rui "Brisby" Pires on Mon 06/06/2005 12:43:52
Rereading these new posts I'd just like to say, I hope these new features don't make AGS more complicated, it would be a shame after all the objectivation which makes it so much simpler...

I very much doubt that many people would need to use most of this stuff. ;)
aka Nur-ab-sal

"Fixed is not unbroken."

Kinoko

I haven't got any slowdown yet, but I haven't tried it in any 'strenuous' circumstances yet. My game file size went down from 13 to 10 meg. It'll be interesting to see how big a difference there is in the finished game (which I expect to be around 50 meg).

Rui 'Trovatore' Pires

"Serious Error".

In my sprite manager, which is still of a very modest size, I have the folder "Main", and the subfolders "GUI" and "Animations". The subfolder "Animations" is devoid of sprites and has but one subfolder, "Intro", also devoid of sprites. I can't delete "Intro", it gives me the following error which I can't even Crtl-C:

"We're sorry, the AGS editor has encountered a serious error (yadda yadda yadda) Exception 0x00000000 at EIP 0x00000000, AGSEDIT v2.71.605, SIP=26, please not the numbers above yayya-yadda-yadda."

This doesn't look like the regular rectagunlar error box, either - this is a box that has come up MUCH less often, and only when some more serious error has happened. Basically it has only one button, "Close" (not OK not Cancel, and only that one) and is more of a square than a rectangle.
Reach for the moon. Even if you miss, you'll land among the stars.

Kneel. Now.

Never throw chicken at a Leprechaun.

JLM

By the way... Are you going to implement a new conversation system (or something) to AGS 2.71? I mean especially a feature to define different colors for read/unread topics. It would be necessary option for my game.

edmundito

The Tween Module now supports AGS 3.6.0!

monkey0506

#18
Quote from: JLM on Mon 06/06/2005 15:32:36
By the way... Are you going to implement a new conversation system (or something) to AGS 2.71? I mean especially a feature to define different colors for read/unread topics. It would be necessary option for my game.

EEK!  Don't do that! :o

;D

I'm still working on my dialog SM  :P.  But you should include:

I.  Struct support (official)
II.  Struct within struct support
III.  Pointer to custom struct type support

;D

I can't believe you're already working on the next version.  2.7 has been official for only like a few days (or weeks), right?

Edit:

Quote* Fixed compiler bug allowing enums to be redefined.

Aw... :D

Edit:  *Also assuming this means I can no longer use that enum if {yes, no};.  XD j/k, but it would have compiled lol!*

Pumaman

QuoteCould you make it so it also works the other way around, i.e. that you can enter or paste a number in the text box and it displays what color it is?

Shouldn't be a problem, I'll look into it.

QuoteHaven't tried it yet, however, since it's possible that not all sprite are loaded at once, in time critical events (like cutscenes which required music synchronizing animations, etc.) it can make the animations jerky (for loading sprites). I'll suggest adding 2 functions, like (well, sorta stole the idea from how AGI works):
PreloadSprite(int slot)
and
ReleaseSpriteControl(int slot)
QuoteIs there any way to pre-populate the cache, if a particular cutscene uses a lot of new sprites?  Something like:

Well, this would certainly be possible. The question is, is there a performance problem in this sort of scenario? I can certainly add a feature like that if necessary, but is it necessary?

QuoteI got this error on starting the editor but it continued to work fine after I pressed ok...

Yeah you need to unzip 2.7 into a new folder and then overwrite it with the beta.

Quote from: Rui "Brisby" Pires on Mon 06/06/2005 09:15:50
BTW, I DID experience massive slowdown in one instance, but then, I had 5 loops FILLED with 640x480 sprites in high-colour. Not to worry, since then I've been advised as to how to workaround THAT mess. But while it lasted, I had to give agsedit FULL PC priority, otherwise I wouldn't have been able even to delete the sprites.

Interesting, that's exactly the sort of feedback I was after. How many sprites was that? 5 loops with 20 frames each, each at 640x480?
This is what I was mentioning -- if you have more sprites on the screen in the editor than the size of the sprite cache, the editor will grind to a halt. Perhaps the best way would be for some sort of Preferences setting on the size of the cache, so you can adjust it if necessary.

Quote"Serious Error".

In my sprite manager, which is still of a very modest size, I have the folder "Main", and the subfolders "GUI" and "Animations". The subfolder "Animations" is devoid of sprites and has but one subfolder, "Intro", also devoid of sprites. I can't delete "Intro", it gives me the following error which I can't even Crtl-C:

The error happens when you try to delete the folder? Strange, I tried deleting a couple of sprite folders and it was fine. Does it happen every time? Can you make a backup copy of your game and try deleting some other folders? Is it just "Intro" that doesn't work, or do they all crash?

QuoteBy the way... Are you going to implement a new conversation system (or something) to AGS 2.71? I mean especially a feature to define different colors for read/unread topics. It would be necessary option for my game. 

I'm afraid I can't promise anything about what else will make it in, but the dialog system is something I'll be looking into.

SMF spam blocked by CleanTalk