Adventure Game Studio

AGS Support => Advanced Technical Forum => Topic started by: Pumaman on Sun 05/06/2005 23:32:14

Title: AGS 2.71 Final 2 - Politically Correct Edition
Post by: Pumaman on Sun 05/06/2005 23:32:14
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
Title: Re: AGS 2.71 beta 1 - Big Brother Edition
Post by: strazer on Mon 06/06/2005 00:22:23
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?
Title: Re: AGS 2.71 beta 1 - Big Brother Edition
Post by: Gilbert on Mon 06/06/2005 03:27:47
: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.
Title: Re: AGS 2.71 beta 1 - Big Brother Edition
Post by: Gregjazz on Mon 06/06/2005 06:21:55
So would the compression work with 256-color mode, too? Sounds exciting!
Title: Re: AGS 2.71 beta 1 - Big Brother Edition
Post by: scotch on Mon 06/06/2005 06:30:22
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.
Title: Re: AGS 2.71 beta 1 - Big Brother Edition
Post by: strazer on Mon 06/06/2005 07:44:27
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).
Title: Re: AGS 2.71 beta 1 - Big Brother Edition
Post by: Rui 'Trovatore' Pires on Mon 06/06/2005 07:48:49
<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.
Title: Re: AGS 2.71 beta 1 - Big Brother Edition
Post by: GarageGothic on Mon 06/06/2005 09:07:38
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.
Title: Re: AGS 2.71 beta 1 - Big Brother Edition
Post by: Rui 'Trovatore' 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.

Just thought you'd like to know, though this was such an extravaganza on my part it's not likely to be a problem.
Title: Re: AGS 2.71 beta 1 - Big Brother Edition
Post by: SSH on Mon 06/06/2005 09:44:06
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?  :=
Title: Re: AGS 2.71 beta 1 - Big Brother Edition
Post by: Gilbert on Mon 06/06/2005 10:10:24
hehe ssh read my post a few posts back. ;)

The PreloadView() idea sounds good though.
Title: Re: AGS 2.71 beta 1 - Big Brother Edition
Post by: Rui 'Trovatore' 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...
Title: Re: AGS 2.71 beta 1 - Big Brother Edition
Post by: fovmester on Mon 06/06/2005 13:14:51
Whoa! Sprite compression!  :o That's wonderful! Hope it works without slowdowns!
Title: Re: AGS 2.71 beta 1 - Big Brother Edition
Post by: Redwall on Mon 06/06/2005 14:24:17
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. ;)
Title: Re: AGS 2.71 beta 1 - Big Brother Edition
Post by: Kinoko on Mon 06/06/2005 14:45:12
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).
Title: Re: AGS 2.71 beta 1 - Big Brother Edition
Post by: Rui 'Trovatore' Pires on Mon 06/06/2005 15:25:22
"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.
Title: Re: AGS 2.71 beta 1 - Big Brother Edition
Post by: 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.
Title: Re: AGS 2.71 beta 1 - Big Brother Edition
Post by: edmundito on Mon 06/06/2005 17:03:36
Chris!

You're a mad man.
Title: Re: AGS 2.71 beta 1 - Big Brother Edition
Post by: monkey0506 on Mon 06/06/2005 17:15:30
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!*
Title: Re: AGS 2.71 beta 1 - Big Brother Edition
Post by: Pumaman on Mon 06/06/2005 19:10:18
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.
Title: Re: AGS 2.71 beta 1 - Big Brother Edition
Post by: Rui 'Trovatore' Pires on Mon 06/06/2005 19:26:59
CJ - yeah, 4 or five full loops 16bit color 640x480. But ingame, and even with sprite compression on, no noticeable slowdown. And yeah, the problem with deleting the folder happens every time. I've ever rebooted (on unrelated reasons, but a reboot's a reboot). No luck, it still happens. And BTW, maybe something got corrupted somehow, becase I made a NEW folder and tried to delete it... and WHAM, got the error again... :(

EDIT - Oh, and there were also 3/4 loops with a regular-sized sprite, I don't remember what it was but it was about 50x70... maybe. It's an estimate from memory, so that's probably wrong. The point is, the grand total of loops in that view was 7/8. But the problem disappeared when I cleared the 4/5 loops of huge sprites.
Title: Re: AGS 2.71 beta 1 - Big Brother Edition
Post by: Pumaman on Mon 06/06/2005 19:37:02
Hmm, can you create a New Game and try to delete a sprite folder? See if we can check whether it's your PC or something specifically in your game?
Title: Re: AGS 2.71 beta 1 - Big Brother Edition
Post by: Rui 'Trovatore' Pires on Mon 06/06/2005 19:41:41
Hmm, probably my PC... it didn't work either. I started a new game, I randomly chose the Discworld template, and tried to delete a folder - no luck.

Ah well, I guess I'll have to live with it.
Title: Re: AGS 2.71 beta 1 - Big Brother Edition
Post by: Pumaman on Mon 06/06/2005 19:48:25
It's probably a rather obscure bug in AGS that only shows up in certain circumstances, I doubt it's actually a problem with your PC.

Does anyone else get this problem when trying to delete a sprite folder?

Did you have the problem with 2.7 ?
Title: Re: AGS 2.71 beta 1 - Big Brother Edition
Post by: bullfrog on Mon 06/06/2005 19:58:48
I get the same error message.

Then I create new sub-folders and delete them several times in AGS 2.7..

I get  randomly an error box "Internal error in tree processor (callfrom 0)"

____________
Sorry...my English sucks... ::)
Title: Re: AGS 2.71 beta 1 - Big Brother Edition
Post by: Gregjazz on Mon 06/06/2005 20:04:34
Quote from: monkey_05_06 on Mon 06/06/2005 17:15:30
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

Heheh, I just got my own dialog thing working, too! I may just upload the source code sometime, too. It's very simple and easy to use.
Title: Re: AGS 2.71 beta 1 - Big Brother Edition
Post by: HeirOfNorton on Mon 06/06/2005 20:31:28
Quote from: Rui "Brisby" Pires on Mon 06/06/2005 15:25:22
"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."

I get the exact same error with a couple of large arrays in a struct, more detail in the other thread:

http://www.adventuregamestudio.co.uk/yabb/index.php?topic=21191.msg258912#msg258912

HoN
Title: Re: AGS 2.71 beta 1 - Big Brother Edition
Post by: Pumaman on Mon 06/06/2005 21:42:07
I've just looked into it further and there is indeed a bug when deleting sprite folders. It affects 2.7 too. I'll get it fixed for the next beta.
Title: Re: AGS 2.71 beta 1 - Big Brother Edition
Post by: monkey0506 on Tue 07/06/2005 01:10:23
Quote from: JLM on Mon 06/06/2005 15:32:36I mean especially a feature to define different colors for read/unread topics.

I just noticed this part.  I'll have to implement that into the new SM... ::)

And Chris I swear if you beat me to this, I am going to...well...I'll probably just bow down at your feet for finally updating the dialog system...
Title: Re: AGS v2.7 Refresh 2 now released!
Post by: strazer on Tue 07/06/2005 08:23:21
What do you think about renaming the built-in enum names from "Direction" to "AGS_Direction" for example to decrease the likelyhood of them being used as variable names by the user and thus causing conflicts (http://www.adventuregamestudio.co.uk/yabb/index.php?topic=20591)?

And now that we are able to flip dynamic sprites, I think it would be essential to be able to determine if a view frame is flipped or not (via GetGameParameter or whatever).

Oh, and how about DynamicSprite.CreateFromBackground(int background_frame) ?
That would make manipulating the background a lot easier.

Things from the tracker that I think are long overdue:

- Crossfading problem when changing rooms (http://www.adventuregamestudio.co.uk/tracker.php?action=detail&id=77)
- Better character collision handling (http://www.adventuregamestudio.co.uk/tracker.php?action=detail&id=463)
- topic-option-on/-off/off-forever (http://www.adventuregamestudio.co.uk/tracker.php?action=detail&id=309)
- Turning off startup dialog script (http://www.adventuregamestudio.co.uk/tracker.php?action=detail&id=127)
- eEventBeginDialog / eEventEndDialog (http://www.adventuregamestudio.co.uk/tracker.php?action=detail&id=380)
- Allow "repeatedly_execute" in room scripts (http://www.adventuregamestudio.co.uk/tracker.php?action=detail&id=514)
- Crossfade ambient sounds (http://www.adventuregamestudio.co.uk/tracker.php?action=detail&id=484)

Edited by Gilbert: Hehe how come you still posted this to the old thread when we're at a new version cycle already, especially when the suggestions are related to feaqtures in the new beta ? :=

Edit by strazer: Whoops! Thanks! ;D
Title: Re: AGS 2.71 beta 1 - Big Brother Edition
Post by: Gilbert on Tue 07/06/2005 09:11:39
Quote from: Pumaman on Mon 06/06/2005 19:10:18
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?
Well, I'm not quite sure, but that can be handy if it's really a LARGE game with TONS of sprite, which doesn't apply to me (I think I won't make that kind of HUGE games anyway, moreover for some reasons I'll stick to V2.62, at least for now), unless the game players set the sprite cache to as low as, like 2MB in setup, which I can't prevent.
Title: Re: AGS 2.71 beta 1 - Big Brother Edition
Post by: Pumaman on Tue 07/06/2005 19:50:34
Quote from: strazer on Tue 07/06/2005 08:23:21
What do you think about renaming the built-in enum names from "Direction" to "AGS_Direction" for example to decrease the likelyhood of them being used as variable names by the user and thus causing conflicts (http://www.adventuregamestudio.co.uk/yabb/index.php?topic=20591)?

Well, there's two possible problems:
1. if people are already using them as variable types (eg. custom functions taking a Direction parameter) it could cause problems to change them
2. the script editor call-tips could look a bit odd with "AGS_Direction" as one of the parameters

Quote
And now that we are able to flip dynamic sprites, I think it would be essential to be able to determine if a view frame is flipped or not (via GetGameParameter or whatever).
Oh, and how about DynamicSprite.CreateFromBackground(int background_frame) ?

Those are reasonable enough requests, if anyone else would find them useful?

Quote
eEventBeginDialog / eEventEndDialog

On the subject of this, can anyone think of a better name for a new handler than "on_event_always" ... it would sound a bit crap calling it that.

Quote
Well, I'm not quite sure, but that can be handy if it's really a LARGE game with TONS of sprite, which doesn't apply to me (I think I won't make that kind of HUGE games anyway, moreover for some reasons I'll stick to V2.62, at least for now), unless the game players set the sprite cache to as low as, like 2MB in setup, which I can't prevent.

I've been wondering about changing the sprite cache size options, actually. Realistically 2 MB is far too small and nobody has that little RAM. Also, with 640x480x32 games, you won't fit many sprites into the default 10 MB cache size, so maybe I should replace the options with 10, 25 and 50 MB.
Title: Re: AGS 2.71 beta 1 - Big Brother Edition
Post by: Gilbert on Wed 08/06/2005 02:23:07
Quote from: Pumaman on Tue 07/06/2005 19:50:34
Quote
And now that we are able to flip dynamic sprites, I think it would be essential to be able to determine if a view frame is flipped or not (via GetGameParameter or whatever).
Oh, and how about DynamicSprite.CreateFromBackground(int background_frame) ?

Those are reasonable enough requests, if anyone else would find them useful?


This can actually be very useful, even better, if CreateFromBackground() can accept 4 more optional parameters:
DynamicSprite.CreateFromBackground(int frame, int x1, int y1, int x2, int y2)
Which clips the sprite in a rectangular area.
Title: Re: AGS 2.71 beta 1 - Big Brother Edition
Post by: Rui 'Trovatore' Pires on Wed 08/06/2005 06:59:56
Just one little thing I thought I'd mention which is pretty much common knowledge but undocumented. Maybe it should be in the manual that if you have a "text window" set us as the dialog GUI the options will be centered on the screen and the text window will resize to fit the options. I mean, it's quite nifty, but if it ain't in the manual, how's people gonna know?
Title: Re: AGS 2.71 beta 1 - Big Brother Edition
Post by: monkey0506 on Thu 09/06/2005 06:37:33
Something else I would like to see is user-defined optional parameters (i.e., allowing us to create them for our own functions).  I've come across several instances where it would be much easier to just leave the parameter out instead of having to #define a ***_DEFAULT action for *** action.  Not a high priority task I guess, but it would have its perks. :=
Title: Re: AGS 2.71 beta 1 - Big Brother Edition
Post by: strazer on Thu 09/06/2005 06:59:25
That works fine already, just like with normal optional parameters:


// main script

function SomeFunction(MyEnum thevar) {
  Display("%d", thevar);
}



// script header

enum MyEnum {
  eFirst = 2,
  eSecond = 3
};

import function SomeFunction(MyEnum thevar=eSecond);

Title: Re: AGS 2.71 beta 1 - Big Brother Edition
Post by: GarageGothic on Thu 09/06/2005 09:21:23
Some feedback:

1) I don't feel any difference with the editor sprite caching, except perhaps that there's a bit more hard drive acces when opening up a sprite folder.

2) Sprite compression doesn't cause any slowdowns either on my 2.4GHz P4. On the other hand, it isn't quite as effective as I had hoped. My game .exe file went from 69MB to 55MB, which is decent. But compressing the files afterhand using WinRar, gave me a slightly larger distribution file for the version where the sprites were already compressed (22MB and 23MB). I'll have to see how much this changes when I downgrade my sprites to 16 bit.

I'm very happy with the new DynamicSprite functions. I am wondering though, if it would be possible to add a character.LockGraphicOffset command? I'm aware that it could be a problem as character sprites are normally assigned using the View/Loop/Frame system. But it would allow you to put e.g. a floor reflection at the same x,y as the player sprite and thus use area scaling instead of DynamicSprite scaling (which I understand is slower?). I suppose an alternative would be the already suggested LockObjectOffset command, but for many situations, re-using a character would be preferable to setting up separate objects in every room.

This leads to another question... Is DynamicSprite.Resize actually slower than area scaling if the x/y ratios are identical?

Thanks for a wonderful beta!
Title: Re: AGS 2.71 beta 1 - Big Brother Edition
Post by: bullfrog on Thu 09/06/2005 20:07:19
Yet another:
We're sorry, the AGS editor has encountered a serious error Exception 0x00000000 at EIP 0x00000000, AGSEDIT v2.71.605, SIP=26,

I created a new GUI and wanted to change its background image.
Same thing with new buttons...

The existing ones work properly...
Title: Re: AGS 2.71 beta 1 - Big Brother Edition
Post by: monkey0506 on Thu 09/06/2005 20:48:09
Quote from: strazer on Thu 09/06/2005 06:59:25That works fine already, just like with normal optional parameters:

Ah...But it only works with global functions. :-\  I'd like to see it available for local functions as well...
Title: Re: AGS 2.71 beta 1 - Big Brother Edition
Post by: Pumaman on Sat 11/06/2005 18:32:01
QuoteThis can actually be very useful, even better, if CreateFromBackground() can accept 4 more optional parameters:
DynamicSprite.CreateFromBackground(int frame, int x1, int y1, int x2, int y2)
Which clips the sprite in a rectangular area.

I can see the uses for that, I'll certainly consider it.

QuoteJust one little thing I thought I'd mention which is pretty much common knowledge but undocumented. Maybe it should be in the manual that if you have a "text window" set us as the dialog GUI the options will be centered on the screen and the text window will resize to fit the options. I mean, it's quite nifty, but if it ain't in the manual, how's people gonna know?

It is mentioned in the descriptjon for hte "Dialog options on GUI" setting, but perhaps it should be more explicit. I'm not really sure where it should be mentioned, though.

Quote1) I don't feel any difference with the editor sprite caching, except perhaps that there's a bit more hard drive acces when opening up a sprite folder.

If your sprite file is relatively small, you won't notice any difference and in fact it might be slightly slower. The change is designed to speed up loading large games (ie. where the sprite file is getting on for 100 MB), where you do notice the difference.

Quote2) Sprite compression doesn't cause any slowdowns either on my 2.4GHz P4. On the other hand, it isn't quite as effective as I had hoped. My game .exe file went from 69MB to 55MB, which is decent.

The effectiveness of the compression will depend on how much detail is in your sprites. Because it's just basic RLE compression, it'll compress down any transparent areas of the sprite well, but if the sprites are detailed and varied it won't work as well as it would with 'plainer' graphics.

QuoteI'm very happy with the new DynamicSprite functions. I am wondering though, if it would be possible to add a character.LockGraphicOffset command?

If you mean a way to set the character to a sprite slot rather than a view, it would require fairly major changes to AGS. It is currently assumed that all characters have a current view/loop/frame so it's not an easy addition to make.

QuoteThis leads to another question... Is DynamicSprite.Resize actually slower than area scaling if the x/y ratios are identical?

No the actual resize operation is the same speed. But using walkable area scaling, AGS will do tricks like caching the scaled graphic where possible to minimize the amount of resizing it has to do.
Therefore, a simplistic scripting implementation with Resize calls every game loop would be slower.

QuoteYet another:
We're sorry, the AGS editor has encountered a serious error Exception 0x00000000 at EIP 0x00000000, AGSEDIT v2.71.605, SIP=26,

I created a new GUI and wanted to change its background image.
Same thing with new buttons...

Thanks for the info, I've found and fixed the bug for the next version.
Title: Re: AGS 2.71 beta 1 - Big Brother Edition
Post by: SSH on Sun 12/06/2005 14:04:24
Does the compression automatically turn itself off on a sprite-by-sprite basis if it would make the srpite bigger?
Title: Re: AGS 2.71 beta 1 - Big Brother Edition
Post by: Pumaman on Sun 12/06/2005 15:11:22
No, but that's a possibility for future. Because almost all sprites have a transparent area of some sort, it's likely to have at least a minor impact on them.
Title: Re: AGS 2.71 beta 1 - Big Brother Edition
Post by: GarageGothic on Mon 13/06/2005 17:15:49
Thanks for the replies CJ. They were very helpful.

Quote from: Pumaman on Sat 11/06/2005 18:32:01
QuoteI'm very happy with the new DynamicSprite functions. I am wondering though, if it would be possible to add a character.LockGraphicOffset command?

If you mean a way to set the character to a sprite slot rather than a view, it would require fairly major changes to AGS. It is currently assumed that all characters have a current view/loop/frame so it's not an easy addition to make.

I understand. That's pretty much what I thought. I wonder if it would be possible then, as a workaround, to add a function that changes the sprite number of a specific view frame at runtime? Such as SetFrameSprite(int view, int loop, int frame, int slot)?
Title: Re: AGS 2.71 beta 1 - Big Brother Edition
Post by: strazer on Thu 16/06/2005 10:02:56
1.) The X and Y properties of a SayBackground overlay return strange values. In my test it had X=30000 and Y=0.

2.) Is there currently a way to determine if an object has "Use walkable area scaling" enabled or not? If not, may I suggest Object.IgnoreScaling.
Title: Re: AGS 2.71 beta 1 - Big Brother Edition
Post by: Pumaman on Thu 16/06/2005 20:07:24
QuoteI wonder if it would be possible then, as a workaround, to add a function that changes the sprite number of a specific view frame at runtime? Such as SetFrameSprite(int view, int loop, int frame, int slot)? 

I'll look into it.

Quote1.) The X and Y properties of a SayBackground overlay return strange values. In my test it had X=30000 and Y=0.

Ah yes, well spotted. This is because SayBackground overlays are attached to the character and follow them around the room so the x&y are stored differnelty in the engine. I'll fix the properties to return the right values.

Quote2.) Is there currently a way to determine if an object has "Use walkable area scaling" enabled or not? If not, may I suggest Object.IgnoreScaling.

Not currently, but it would make sense to add that property so that it's consistent with characters.
Title: Re: AGS 2.71 beta 1 - Big Brother Edition
Post by: Cyberion on Sat 25/06/2005 10:03:51
well, sorry for bothering with such unimportent thing, but i though that i would say it. nothing too serious or anything, but it would be nice if you can make the "talking color" field a little bit wider, cause when i'm using a high color mode, i'm adding 5 digit numbers in there, the last number isn't seen or half seen, cause the field is too small. So would be nice if you can increase the width of the field.
Title: Re: AGS 2.71 beta 2 - Summer Edition
Post by: Pumaman on Sat 25/06/2005 15:49:09
Ok, beta 2 is now up. This is a relatively minor release but it fixes the crashes that have been reported in the editor, as well as adding a couple of new features.

Let me know if you have any problems.

Quotenothing too serious or anything, but it would be nice if you can make the "talking color" field a little bit wider, cause when i'm using a high color mode, i'm adding 5 digit numbers in there, the last number isn't seen or half seen, cause the field is too small

Sounds reasonable to me, I'll see what I can do.
Title: Re: AGS 2.71 beta 2 - Summer Edition
Post by: Etcher Squared Games on Sat 25/06/2005 17:26:49
Hi all,
This is my first time suggesting something for AGS, so please be kind if I'm not doing this right.

Using all the resources I know about, I didn't find anything about global searching of scripts.

I've had recent need to search all my scripts for certain text, but as of right now, I know only how to search a script at a time.  Is it possible to add in a feature to search through all scripts for a certain text?

I don't care about, say, double clicking on a link and it automatically taking me there.  Just as long as I know how to get there.  Something like
Global - line 25
Global - line 52
Header - line 34
Header - line 34    // in case it is on the line twice
Room3 - line 77

etc etc....

Title: Re: AGS 2.71 beta 2 - Summer Edition
Post by: Rui 'Trovatore' Pires on Sat 25/06/2005 22:03:55
That's impossible to do because when the rooms aren't loaded... er, they aren't loaded, period. The most you could hope for was something that looked in the global script, script header and the script off the currently loaded room.

Mind you, you can export all your scripts, there's an option to do that, and then use Word or whatever to find whatever you want... not perfect, but it'll do ya.
Title: Re: AGS 2.71 beta 2 - Summer Edition
Post by: TheMagician on Sun 26/06/2005 15:20:07
Quote* Added DynamicSprite.Rotate function.
:D Super! As soon as I'm home tonight, I'll try fooling around with it!

Quote* Editor now uses "Speech" and "Music" sub-folders to store speech and music files in to reduce the clutter in the main game folder.
Very nice, as well! I suppose there is a reason why you didn't create a sub-folder for sounds?

Quote* Hi-colour palette pane now allows you to type in a colour number and see its RGB settings.
Very useful for me!

Quote* Pamela lip-sync allows multiple phenomes per frame.
Er ... whatever ... ?? What exactly is this good for? And who is Pamela?

Great update! Thanks Chris!
Title: Re: AGS 2.71 beta 2 - Summer Edition
Post by: Rui 'Trovatore' Pires on Sun 26/06/2005 15:24:49
Pamela is a third-party app you have to use if you want to lip-synch your characters' talking animation with voice. It's all there in the manual. ::)

I'm curious now - what does that mean in layman's terms? What can we do now that we couldn't before?
Title: Re: AGS 2.71 beta 2 - Summer Edition
Post by: Kinoko on Sun 26/06/2005 16:00:05
Minor, but I just realised in the manual under SetIdleView you say DELAY is a measure of seconds, but it's actually a measure of the standard fps default in a game. Mine's different so I just got caught out wondering why it was only waiting half as long as I specified.

Actually, wouldn't it be better to specify the frames rather than "seconds" given that people can change their game speed?
Title: Re: AGS 2.71 beta 2 - Summer Edition
Post by: GarageGothic on Mon 27/06/2005 16:18:13
Quote from: Pumaman on Sun 05/06/2005 23:32:14* Added DynamicSprite.Rotate function.

CJ, you're my hero!!!

I should probably go home and test this, but I'd might as well ask: It says in the help that the degree must be between 1 and 359. But the crop mode sounds like a very useful tool for other things as well. Would it be possible to either make it work for angle 0, OR add a specific crop mode for dynamic sprites? Thanks.
Title: Re: AGS 2.71 beta 2 - Summer Edition
Post by: Pumaman on Mon 27/06/2005 19:23:05
Quote from: Worm III on Sat 25/06/2005 17:26:49
Using all the resources I know about, I didn't find anything about global searching of scripts.

Thanks for your suggestion, I can see how it would be useful.

However, in the mean time you can use the "Dump Game Text To File" option on the Game menu to dump everything into one big text file that can then be searched.

QuoteVery nice, as well! I suppose there is a reason why you didn't create a sub-folder for sounds?

Well, the Music and Speech folders each correspond to a VOX file (music.vox and speech.vox, respectively). This logically seperates the files that will be bundled into the vox's, and those that are in the exe.
However, I can see the argument for a seperate Sounds folder to seperate them out from the rest of the game, if people think that would be useful?

QuoteEr ... whatever ... ?? What exactly is this good for? And who is Pamela?

Don't worry about it, I only put this on the changelog for completeness -- as far as I know only one game is currently using the pamela lip-sync feature and if you're not using it, then this doesnt affect you.

QuoteMinor, but I just realised in the manual under SetIdleView you say DELAY is a measure of seconds, but it's actually a measure of the standard fps default in a game. Mine's different so I just got caught out wondering why it was only waiting half as long as I specified.

Good point, I'll update the manual. Specifying it in game loops would probably have been a better idea, but it's too late to change that now, unfortunately.

QuoteI should probably go home and test this, but I'd might as well ask: It says in the help that the degree must be between 1 and 359. But the crop mode sounds like a very useful tool for other things as well. Would it be possible to either make it work for angle 0, OR add a specific crop mode for dynamic sprites? Thanks.

Hmm, using a rotation of 0 as a way of cropping the sprite seems very hackish to me, so I'd prefer to add a seperate Crop method.
Title: Re: AGS 2.71 beta 2 - Summer Edition
Post by: Rui 'Trovatore' Pires on Mon 27/06/2005 20:12:49
QuoteDon't worry about it, I only put this on the changelog for completeness -- as far as I know only one game is currently using the pamela lip-sync feature and if you're not using it, then this doesnt affect you.

Arr(tm), but I like knowing how AGS works, and have fiddled a bit with Pamela, and don't rule it out in the future. So I'm curious -

Quotewhat does that mean in layman's terms? What can we do now that we couldn't before?
Title: Re: AGS 2.71 beta 2 - Summer Edition
Post by: GarageGothic on Tue 28/06/2005 09:47:25
The rotate sprite function is awesome, and not at all slow as I feared. However, it crashes whenever I use angles of 135 degrees and above. Problems start between 135 and 140, and this increment seems to depend on sprite size, although tiny sprites also crash the engine. On large sprites I get an Out of Memory message, on smaller ones just a generic error message.

I wrote the simplest possible script just to test it, so I doubt the problem is in there:

DynamicSprite* hest;
hest = DynamicSprite.CreateFromExistingSprite(289);
hest.Rotate(140);
hest.Delete();


And here's a couple of the error messages:

Rotating 20x20 sprite 138 degrees (no problem at 137):
An exception 0xC0000005 occured in ACWIN.EXE at EIP = 0x004DF068 ; program pointer is +6, ACI version 2.71.869, gtags (289,16)
in Global script (line 5365)

Rotating Roger sprite (default sprite 2000) at 137 degrees:
Error: Out of memory: failed to allocate -76 bytes (at PP=6)

Rotating several MB large sprite at 135 degrees:
Error: Out of memory: failed to allocate -1364 bytes (at PP=6)

Edit: I should add that this was tested on 32-bit color 640x480 resolution. I haven't tried it with other settings.
Title: Re: AGS 2.71 beta 2 - Summer Edition
Post by: SSH on Tue 28/06/2005 09:54:22
Quote from: Pumaman on Mon 27/06/2005 19:23:05
QuoteVery nice, as well! I suppose there is a reason why you didn't create a sub-folder for sounds?

Well, the Music and Speech folders each correspond to a VOX file (music.vox and speech.vox, respectively). This logically seperates the files that will be bundled into the vox's, and those that are in the exe.
However, I can see the argument for a seperate Sounds folder to seperate them out from the rest of the game, if people think that would be useful?

Actually, if sounds, music and speech are all in separate folders, then you could allow Dialog/Speech lines to have something like "&GREET Hi there, my name is Roger" which would look for speech\greet.ogg/mp3/wav/etc....

To have meaningful filenames would make adding speech much easier! You always have to go through the game after adding speech and test every line in case you got your numbering wrong!
Title: Re: AGS 2.71 beta 2 - Summer Edition
Post by: TheMagician on Tue 28/06/2005 11:09:39
^^ YES to everything SSH said.

In my opinion: the more organized the game folders are the easier it is to keep track of everything when your game gets complex.
So I think a Sound subfolder would be very nice.
Title: Re: AGS 2.71 beta 2 - Summer Edition
Post by: Pumaman on Tue 28/06/2005 19:46:48
Quote from: Rui "Jade" Pires on Mon 27/06/2005 20:12:49
Arr(tm), but I like knowing how AGS works, and have fiddled a bit with Pamela, and don't rule it out in the future. So I'm curious

It means you can attach an AGS view frame to multiple pamela phenomes rather than the one you used to be able to attach a frame to.

QuoteThe rotate sprite function is awesome, and not at all slow as I feared. However, it crashes whenever I use angles of 135 degrees and above. Problems start between 135 and 140, and this increment seems to depend on sprite size, although tiny sprites also crash the engine. On large sprites I get an Out of Memory message, on smaller ones just a generic error message.

Heh, serves me right for forgetting my trigonometry, and only testing it with small angles. Thanks for spotting it :)

QuoteActually, if sounds, music and speech are all in separate folders, then you could allow Dialog/Speech lines to have something like "&GREET Hi there, my name is Roger" which would look for speech\greet.ogg/mp3/wav/etc....

That's a good idea, actually. Though it still wouldn't stop you having to play test it to make sure all the files were there, it's still easy to make a typo in &GREET :P
Title: Re: AGS 2.71 beta 2 - Summer Edition
Post by: SSH on Wed 29/06/2005 09:18:40
Couldn't AGS produce a log file/warning of any missing speech files? I guess you'd want it to be easily dismissed if you just hadn't got round to doing them all yet, but you'd also want to see indetail which files it had managed to pick up
Title: Re: AGS 2.71 beta 2 - Summer Edition
Post by: Radiant on Sat 02/07/2005 14:12:17
If you declare a variable in a module header, and have an export from that module, AND export the same variable from the global script, you don't get an error message, but the references from room script to the variable won't match those from the module (did that make sense? :) )

If you hit 'recompile all room files' while the current room is dirty, you are asked if you want to save it - but it's still dirty after recompiling everything.

(edit) I find the new syntax replacement system too intrusive. When I type "int a, b;" it automatically adds an extra space after the comma. I understand that some people may find this useful but could you please add an option to turn it off, for those people who find it annoying that what you type is not what you get?
Title: Re: AGS 2.71 beta 2 - Summer Edition
Post by: Pumaman on Mon 04/07/2005 22:07:32
Quote from: Radiant on Sat 02/07/2005 14:12:17
If you declare a variable in a module header, and have an export from that module, AND export the same variable from the global script, you don't get an error message, but the references from room script to the variable won't match those from the module (did that make sense? :) )

This is a problem, but the issue is scripts can legitamately export the same thing as each other -- for example, repeatedly_execute can be in multiple scripts but that's fine. I'll have a think if there's a clean way to catch this.

Quote
If you hit 'recompile all room files' while the current room is dirty, you are asked if you want to save it - but it's still dirty after recompiling everything.

I just tried this but it seemed fine -- did you choose "Yes" or "No" when it asked to save it?

Quote
(edit) I find the new syntax replacement system too intrusive. When I type "int a, b;" it automatically adds an extra space after the comma. I understand that some people may find this useful but could you please add an option to turn it off, for those people who find it annoying that what you type is not what you get?

There already is one, use the File, Preferences option in the script editor and untick "Automatically add space after comma".
Title: Re: AGS 2.71 beta 2 - Summer Edition
Post by: Radiant on Mon 04/07/2005 22:58:22
Quote from: Pumaman link=topic=21373.msg264473#msg264473
This is a problem, but the issue is scripts can legitamately export the same thing as each other -- for example, repeatedly_execute can be in multiple scripts but that's fine. I'll have a think if there's a clean way to catch this.
The way I understand it, if a function is present in multiple scripts, then all of them will be called (is that correct? Or only for a system function such as rep_ex?) However, I can't think of a good application for having a variable in multiple scripts.

Quote
Quote
If you hit 'recompile all room files' while the current room is dirty, you are asked if you want to save it - but it's still dirty after recompiling everything.
I just tried this but it seemed fine -- did you choose "Yes" or "No" when it asked to save it?
Yes. And it was saved again in the process of recompiling :)

Quote
There already is one, use the File, Preferences option in the script editor and untick "Automatically add space after comma".
Way cool!
Title: Re: AGS 2.71 beta 2 - Summer Edition
Post by: on Wed 06/07/2005 11:11:17
There's one thing on my wishing list:

some games (including my own) seem to use the highest possible colour
depth, instead of 16k, in order to get "finest gradients" right.
Now each time I start AGS there's a warning message "Your game is in 32k.
But your desktop is in 16k. The colours..." etc. It would be great to have a
"Don't show this warning again" option- because, strangely, the game looks slightly gritty in the editor but perfect when I run it, even though the desktop col. depth is 16k.

Would be nice to have that option.

And I still think it would be a nice touch to show, in the Dialog Editor, the text of an option instead of only its number...
Title: Re: AGS 2.71 beta 2 - Summer Edition
Post by: Kweepa on Wed 06/07/2005 15:36:37
Quote from: Ghost on Wed 06/07/2005 11:11:17
strangely, the game looks slightly gritty in the editor but perfect when I run it, even though the desktop col. depth is 16k.

Are you running it full screen? It will switch to 24 or 32 bit colour in that case.
Title: Re: AGS 2.71 beta 2 - Summer Edition
Post by: Pumaman on Wed 06/07/2005 16:35:43
Quote from: Radiant on Mon 04/07/2005 22:58:22
Yes. And it was saved again in the process of recompiling :)

Strange, I just tried that and it wasn't dirty afterwards.

Quotesome games (including my own) seem to use the highest possible colour
depth, instead of 16k, in order to get "finest gradients" right.
Now each time I start AGS there's a warning message "Your game is in 32k.
But your desktop is in 16k. The colours..." etc.

Is there any reason that you don't just run Windows at 32-bit? Since virtually everyone uses 32-bit desktops these days, I can't really justify adding in a "don't remind me again" option for such a rare message.
Title: Re: AGS 2.71 beta 2 - Summer Edition
Post by: strazer on Wed 06/07/2005 23:34:42
Quote from: Pumaman link=topic=21373.msg264868#msg264868Is there any reason that you don't just run Windows at 32-bit? Since virtually everyone uses 32-bit desktops these days, I can't really justify adding in a "don't remind me again" option for such a rare message.

I run the editor on Linux via WINE and I always get this message with 32-bit games since Linux desktops are 24-bit for some technical reason. So I would use it but I don't really care since it's just a click away.

Edit:

Can we have "repeatedly_execute" in room scripts (http://www.adventuregamestudio.co.uk/tracker.php?action=detail&id=514) please?
It would save a lot of time not having to explain to users how and where to paste room rep_ex code.
Title: Re: AGS 2.71 beta 2 - Summer Edition
Post by: on Thu 07/07/2005 18:00:57
i always refused to use 32k because, well, i have quite an old pc (P450) and it actually slows down (a bit. or maybe I'm just paranoid  ;)

I would like having the option to disable that warning, but of course I see that it is a minor, rare message, and it's really just a mouse click.

but can I have the first few words of a dialogue option in the script? That's something that should please quite a lot of people!
Title: Re: AGS 2.71 beta 2 - Summer Edition
Post by: strazer on Thu 07/07/2005 18:21:57
Quote from: Ghost on Thu 07/07/2005 18:00:57
but can I have the first few words of a dialogue option in the script? That's something that should please quite a lot of people!

What do you mean? GetDialogOptionText (http://www.adventuregamestudio.co.uk/tracker.php?action=detail&id=173)?
Title: Re: AGS 2.71 beta 2 - Summer Edition
Post by: Gilbert on Fri 08/07/2005 02:28:35
Also, I just noticed he wrote 16k, 24k and 32k colours.

It should be 16bit, 24bit and 32bit.
32k (or 64k) is actually just hicolour (i.e. 15/16bit).

Just a small correction, nothing special.
Title: Re: AGS 2.71 beta 2 - Summer Edition
Post by: GarageGothic on Mon 11/07/2005 12:21:55
I have a small suggestion for the DynamicSprite.CreateFromExistingSprite function, although I don't know if it's even technically possible.

My primary use for the function is to create "effect sprites" (reflections etc.) from character sprites. Most of these effects use transparency settings. However, if you're using alpha channel for the characters, object transparency won't work for the copied sprite. So, I was wondering, would it be possible to add an option to remove the alpha channel when creating the dynamic sprite (thus downgrading it from 32 to 24 bit)?

Edit: And another thing. Regarding this suggestion, I had a crazy idea:

Quote from: Pumaman on Sat 11/06/2005 18:32:01
QuoteThis can actually be very useful, even better, if CreateFromBackground() can accept 4 more optional parameters:
DynamicSprite.CreateFromBackground(int frame, int x1, int y1, int x2, int y2)
Which clips the sprite in a rectangular area.

I can see the uses for that, I'll certainly consider it.

I was thinking whether it'd be possible to apply the transparent pixels from a similarly sized sprite as a mask when cropping the dynamic sprite from the background. I suppose it would actually work by copying the "pink pixels" from the existing sprite onto the dynamic one.
If the CreateFromBackground function would work on other background frames than the visible one, this could be used for all kinds of interesting "see through" effects, where part of the background was replaced by a different version of the same screen. This would even allow for semi-dynamic lighting of scenes (much better than the flashlight plugin).

Edit2: considering these wild ideas, a triangular cutout instead of a square would be an interesting option as well.
Title: Re: AGS 2.71 beta 2 - Summer Edition
Post by: on Wed 13/07/2005 14:35:36
I have a idea. Could you add a click and drag option for the interaction editor for the next updated version. Lets say if I added a interaction in a wrong place by mistake I can then correct that by clicking on it with the mouse and drag it onto where it belongs instead writing the interaction or make the same commands code again.Ã,  It will speed for allÃ,  games programmer alot.
Title: Re: AGS 2.71 beta 2 - Summer Edition
Post by: strazer on Wed 13/07/2005 16:26:01
Tracker: Drag-and-drop of interaction commands (http://www.adventuregamestudio.co.uk/tracker.php?action=detail&id=152)
Title: Re: AGS 2.71 beta 2 - Summer Edition
Post by: on Thu 14/07/2005 21:02:11
Quote from: strazer on Thu 07/07/2005 18:21:57
Quote from: Ghost on Thu 07/07/2005 18:00:57
but can I have the first few words of a dialogue option in the script? That's something that should please quite a lot of people!

What do you mean? GetDialogOptionText (http://www.adventuregamestudio.co.uk/tracker.php?action=detail&id=173)?

No, nothing that's about the scripting commands- just something like this:
I have a topic "Hi, how are you"

and in the dialog script editor I'd then have

[Topic Number] // "Hi, how..."

just to hace a small reminder what a topic is about, because a large dialogue is usually a messy session of switching between the screens.

I have asked for this some time ago, and someone said this feature was in one of the older versions, so I'd LOVE to see a comeback.
Title: Re: AGS 2.71 beta 2 - Summer Edition
Post by: strazer on Thu 14/07/2005 21:43:04
I guess the feature has been removed because if you changed the dialog option text, the dialog script comment would have to be updated too. In fact, there's still an outstanding tracker entry (http://www.adventuregamestudio.co.uk/tracker.php?action=detail&id=207) for that.
Perhaps CJ decided it just wasn't worth the trouble and removed them entirely?
Title: Re: AGS 2.71 beta 2 - Summer Edition
Post by: Radiant on Sat 16/07/2005 22:42:15
As an avid keyboard user, could I please ask that all menu options have a different hotkey? E.g. alt-U, D refers to both GUI/Delete and GUI/eDit interface_click, and alt-R, B is doubly mapped (and also, the room menu has some hotkeys missing, and 'S' would be more logical for 'Save room').

Also, could you please add hotkeys to the Module Manager Menu, and especially make 'escape' exit that menu? Thanks!

Finally, I'm not sure if I mentioned this before, but it would be useful to be able to name dialogs, rather than having a list of numbers. This would have no relevance for scripting, but would simply make the 'dialogs' list more clear just like the 'rooms' list is more clear with naming
Title: Re: AGS 2.71 beta 3 - London edition
Post by: Pumaman on Sun 17/07/2005 13:20:23
QuoteCan we have "repeatedly_execute" in room scripts please?
It would save a lot of time not having to explain to users how and where to paste room rep_ex code

Sounds sensible yes, I'll try and do it for this version.

Quotebut can I have the first few words of a dialogue option in the script? That's something that should please quite a lot of people!

This was originally in but then was taken out because it wasn't kept up to date if you renamed a dialog option. It has been on the to-do list for ages to put it back in and keep it up to date, but it's just one of those features that seems to keep getting left behind, for which I apologise.

QuoteSo, I was wondering, would it be possible to add an option to remove the alpha channel when creating the dynamic sprite (thus downgrading it from 32 to 24 bit)?

Sounds reasonable to me.

QuoteI was thinking whether it'd be possible to apply the transparent pixels from a similarly sized sprite as a mask when cropping the dynamic sprite from the background. I suppose it would actually work by copying the "pink pixels" from the existing sprite onto the dynamic one.

Can you clarify what you mean -- using the non-transparent area of another sprite as a mask to decide which pixels are copied from the background onto the new sprite?

QuoteI have a idea. Could you add a click and drag option for the interaction editor for the next updated version.

This has been on the to-do list for ages, but because the vast majority of people use scripting rather than the interaction editor it just hasn't been high priority I'm afraid, and it's quite technically difficult to implement considering the benefits it would provide.

QuoteAs an avid keyboard user, could I please ask that all menu options have a different hotkey? E.g. alt-U, D refers to both GUI/Delete and GUI/eDit interface_click, and alt-R, B is doubly mapped (and also, the room menu has some hotkeys missing, and 'S' would be more logical for 'Save room').

Well spotted, I hadn't noticed those double-mappings, I'll get them fixed.

QuoteFinally, I'm not sure if I mentioned this before, but it would be useful to be able to name dialogs, rather than having a list of numbers. This would have no relevance for scripting, but would simply make the 'dialogs' list more clear just like the 'rooms' list is more clear with naming

I can appreciate this yes, in fact I think it's already on the tracker.



Anyway, beta 3 is now up. This includes new string support, please read the description in the updated first post of how to use it. Feedback would be appreciated here on whether it works, this new string support is still considered experimental.
Title: Re: AGS 2.71 beta 3 - London edition
Post by: Rui 'Trovatore' Pires on Sun 17/07/2005 17:55:20
I'm liking it. But:

Here's what I had.

string buffer;
(etc... then in a function: )
if (car!=null) StrCopy(buffer, car.name);

"car" is a character pointer, or whatever you call it. The property "name" is undocumented, so I assume unnoficcial, but I couldn't figure out any other way to get the character's name.

Now with:

String buffer;
(etc... then in a function: )
if (car!=null) StrCopy(buffer, car.name);

...it told me it couldn't convert String* to string, or the other way around. Makes sense, I thought, and saw my mistake, so I edited it such:

String buffer;
(etc... then in a function: )
if (car!=null) buffer=car.name;

...and I got:
Error (line 264): Type mismatch: cannot convert 'char*' to 'String*'

I don't understand the nature of the error, so I don't know how I misread the correct use of thing. This is as much to let you know a problem I'm having, as a user, as to ask for more information as to why this happened. Accourse I can imagine that car.name would be a string and not a String, but that's the only thing I can think of. And if that's the problem, I don't understand the error message.

EDIT - Also, how do I update the following:

else if (obj!=null) obj.GetName(buffer);

...since buffer is now a String?
Title: Re: AGS 2.71 beta 3 - London edition
Post by: Pumaman on Sun 17/07/2005 19:29:08
QuoteString buffer;
(etc... then in a function: )
if (car!=null) buffer=car.name;

...and I got:
Error (line 264): Type mismatch: cannot convert 'char*' to 'String*'

Because car.name is actually a char[] rather than a string, it's not automatically converted. This will be replaced wiht a proper Name property for the characters in due course.

QuoteEDIT - Also, how do I update the following:

else if (obj!=null) obj.GetName(buffer);

Sorry, I probably didn't make this clear. For the final version, all the GetXXX(string buffer) functions will be replaced with properties that return a String. For now I've just done the GUI label, textbox and button so you can't convert code using other ones yet. As I say, it's a pilot version.
Title: Re: AGS 2.71 beta 3 - London edition
Post by: Rui 'Trovatore' Pires on Sun 17/07/2005 20:15:18
Arright, 's clear now. Makes not much difference - everything still works dandy if I keep the "strings" as is. Congratulations, too - these'll make for much nicer, user-friendly code and no mistake (I was getting really tired of being able to do stuff like "if (sldSlider.Value==number)" and THEN being forced to go "string buffer; lblLabel.GetText(buffer); if (StrComp(buffer, "whatnot")==0)"...).
Title: Re: AGS 2.71 beta 3 - London edition
Post by: edmundito on Sun 17/07/2005 20:50:44
Quote* Game now attempts to mute audio when alt+tabbing away to another application.

Hip, hip, hooray!
Title: Re: AGS 2.71 beta 3 - London edition
Post by: GarageGothic on Mon 18/07/2005 14:21:12
Another beta, awesome! Glad to see that the 90+ rotation is fixed - I've had to work around that one until now :) And thanks for fixing PgUp!

Quote from: Pumaman on Sun 17/07/2005 13:20:23
QuoteI was thinking whether it'd be possible to apply the transparent pixels from a similarly sized sprite as a mask when cropping the dynamic sprite from the background. I suppose it would actually work by copying the "pink pixels" from the existing sprite onto the dynamic one.
Can you clarify what you mean -- using the non-transparent area of another sprite as a mask to decide which pixels are copied from the background onto the new sprite?

Yes, that's basically what I meant, except I imagined that it would be done by first grabbing the dynamic sprite, then apply the transparency (which would also make it useful for sprites that aren't copied from backgrounds).

Here's an example. Let's say that you want to create a UV-flashlight effect, so you create one normal background (background frame 1) and another, ultraviolet lit version of it (background frame 2). Now you cut out a 64x64 area of frame 2 at (mouse.x, mouse.y), getting a square shaped dynamic sprite. However, we want a circular flashlight beam. So you take a pre-existing circular sprite, resize it to 64x64 and copy the transparent area of this (the pink, rounded corners around the circle itself) onto the dynamic sprite. Finally you either rawdraw this or assign it as an object at (mouse.x,mouse.y).

Title: Re: AGS 2.71 beta 3 - London edition
Post by: SSH on Mon 18/07/2005 14:23:12
but, but, CJ: all the fun in AGS programming is working around things like the string handling. Fixing things will mean that ANYONE can do stuff.  :'(
Title: Re: AGS 2.71 beta 3 - London edition
Post by: HeirOfNorton on Mon 18/07/2005 18:15:46
Quote from: Pumaman on Sun 05/06/2005 23:32:14
* Fixed compiler crash when declaring a large struct.

Sweet. This fixed my crash, and now everything I'm trying works perfectly.

Between the constant bug-fixes, the new sprite compression and String functions... CJ, has anyone told you lately that you are the coolest person in the world?

HoN
Title: Re: AGS 2.71 beta 3 - London edition
Post by: on Mon 18/07/2005 23:55:56
Is it possible to add "delete" button for dialog and characters playersÃ,  so I can delete unneeded dialogs and characters from the characters list?
Title: Re: AGS 2.71 beta 3 - London edition
Post by: Adamski on Tue 19/07/2005 00:39:52
Is it possible to do away with having to label music and sound effects as generic "sound1.ogg" or "music23.mp3" and have unique names for these files yet? Perhaps the music, sound and speech sub-folders can be expanded too so us people using lots of audio assets would have an easier time managing and organising everyting.
Title: Re: AGS 2.71 beta 3 - London edition
Post by: monkey0506 on Tue 19/07/2005 06:08:14
Just wondering, I can create an array of Strings:

String strs[30];

But will this work properly?  It compiles, I'm just wondering if it works correctly because I'm too lazy to test it.  Also, is a String object a pointer to something, because I figured since I can put a Hotspot or a Character as a struct data member, I could use a String, but I get an error saying "member cannot be pointer" or something to that effect.  Which pretty much stinks.  I love the new String functionality...but...I think while you're working on it you should make them capable of being implemented in structs.  That would be nice.

That's my two cents at 12:08 in the morning...
Title: Re: AGS 2.71 beta 3 - London edition
Post by: Rui 'Trovatore' Pires on Tue 19/07/2005 07:16:35
Stalkey - you can always ask NetMonkey about his media manager plugin.
Title: Re: AGS 2.71 beta 3 - London edition
Post by: strazer on Tue 19/07/2005 07:52:34
Yeah, after all, all the multimedia functions would have to be changed to accept file names instead of numbers which is a lot of work for relatively little gain in my opinion.

What I do is set up enums in the main script header like this:


// Main header script

enum Game_SoundEffects { // arbitrary name
  eSoundBirdChirpLow = 41, // arbitrary names
  eSoundSuccess = 20
  //...
};

enum Game_Music {
  eMusicEerie = 3
  //...
};


I can then use them like this:


  PlaySound(eSoundSuccess);
  PlayMusic(eMusicEerie);


You can name your enums whatever you want but I like to prefix them with "eSound", "eMusic" and so on so they are consistent with the AGS enum naming scheme and they are less likely to conflict with reserved (variable) names and so the auto-complete pops them all up when I begin typing "eso..." etc.

The same works great for GlobalInts as well.

(The media manager thread is here (http://www.adventuregamestudio.co.uk/yabb/index.php?topic=19045), btw.)
Title: Re: AGS 2.71 beta 3 - London edition
Post by: Gilbert on Tue 19/07/2005 08:49:38
So far I see that nearly all the functions in the string functions (not other string property related fields, as mentioned) of the manual were converted already, except two of them:
StrSetCharAt() and GetMessageText()

It seems that the Chars[] property is currently read-only, maybe it's a good idea to make this writable, so to replace StrSetCharAt()? Like:
String blah="HAHAHAHA!";
blah.Chars[4]=0; //truncates it to "HAHA"

Also, maybe GetMessageText() can now be written like:
String tmpstr=String.GetMessage(10);



(not bug report, just suggestions)
Title: Re: AGS 2.71 beta 3 - London edition
Post by: strazer on Thu 21/07/2005 01:23:15
Quote from: monkey_05_06 on Tue 19/07/2005 06:08:14I think while you're working on it you should make [Strings] capable of being implemented in structs.  That would be nice.

I second that.

And a small thing:
Is there a reason why the room interactions are called "Player enters screen (before fadein)" and so on?
I imagine it would be a little less confusing for beginners if these would be called "Player enters room (before fadein)".
Title: Re: AGS 2.71 beta 3 - London edition
Post by: GarageGothic on Thu 21/07/2005 13:19:40
Um, I wish I could give some feedback on the new beta, but I haven't even manage to compile my game with it yet. Could somebody please explain how to modify my current string-using functions to work with the new beta?

As far as I understood, you'd have to add "const" in front of the word "string" in your function headers, like this:

function AddText(const string inputtext)

but then when I compile, I get error messages that it can't convert const string to string or something like that, referring to lines within the function.
To fix it, I try to put "const" on the string declarations within the function, it tells me to use "readonly" instead, but that doesn't work either.

Also, a piece of code like this gave me similar error messages now:
string buffer;
if (GetSaveSlotDescription(101, buffer) == 0) {


How can I fix this, short of rewriting everything to use Strings with capital S?
Title: Re: AGS 2.71 beta 3 - London edition
Post by: Gilbert on Thu 21/07/2005 13:34:10
Quote from: GarageGothic on Thu 21/07/2005 13:19:40
How can I fix this, short of rewriting everything to use Strings with capital S?
Unfortunately, it's the best way, unless you keep on using the old functions and old "string" type. The "replace" function of text editors helps.
My suggestion is, if you're too worry about the changes involved, don't upgrade the AGS version, stick to the version the game was already made for, unless you desperately need some new features (and also, don't rely on betas for real games, as things are still changing).


, (using new "String"s in an old function simply cannot be done) but since I didn't do much experiments, I'm not so sure about it.
Title: Re: AGS 2.71 beta 3 - London edition
Post by: GarageGothic on Thu 21/07/2005 13:42:29
I need to upgrade the AGS version because the fix for the sprite rotation is vital to my dynamic shadows script. But all these weeks of scripting conversation longs, html-formatting, custom dialog modes - all of them using strings intensively... There must be some way of making it work.

I don't think I even need the new Strings for any of these functions, and now that it works I'd rather not mess with it again. I just want AGS to compile it without complaining about my perfectly good functions :)
Title: Re: AGS 2.71 beta 3 - London edition
Post by: Pumaman on Thu 21/07/2005 20:06:12
QuoteYes, that's basically what I meant, except I imagined that it would be done by first grabbing the dynamic sprite, then apply the transparency (which would also make it useful for sprites that aren't copied from backgrounds).

Ah ok I see what you mean, yeah that could allow some cool effects.

Quotebut, but, CJ: all the fun in AGS programming is working around things like the string handling. Fixing things will mean that ANYONE can do stuff.

:P

QuoteSweet. This fixed my crash, and now everything I'm trying works perfectly.

Glad to hear it!

QuoteIs it possible to add "delete" button for dialog and characters players  so I can delete unneeded dialogs and characters from the characters list?

Yeah I've been meaning to do this for ages. In the meantime, just ignore them and re-use them when you need a new one.

QuoteIs it possible to do away with having to label music and sound effects as generic "sound1.ogg" or "music23.mp3" and have unique names for these files yet? Perhaps the music, sound and speech sub-folders can be expanded too so us people using lots of audio assets would have an easier time managing and organising everyting. 

netmonkey's media manager plugin should simplify this, but I'm not sure what its current status is.

I do see your point though, names are much nicer than numbers and especially now that we have sub-folders for music and speech to separate them from sounds, it should be simpler to implement.

strazer suggests a good workaround from a script point of view, but there is still the issue of having hundreds of "soundXXX.mp3" files in your game folder and trying to remember which is which, so I do understand the issue.

Quotesince I can put a Hotspot or a Character as a struct data member

Eeek well spotted that's a bug, you shouldn't be able to do that.

Yes a String is an object (the implementation of the new OO-style scripting is what has allowed this new String style to finally be added).

Quoteyou should make them capable of being implemented in structs.

I'd like to allow pointers in structs, we'll have to see what else comes up.

QuoteIt seems that the Chars[] property is currently read-only, maybe it's a good idea to make this writable, so to replace StrSetCharAt()?

I'm not sure what to do with this one. The standard practice of Java/C# is that strings are immutable (ie. you can't change them). This is because allowing it can create hard-to-track-down bugs, for example:

String a = "Hello there!";
...
String b = a;
...
a.Chars[4] = 'X';
...
Display("b: %s", b);   // displays  "HellX there!"

because strings are just pointers, allowing 'a' to be modified means that 'b' also gets changed, which can cause a lot of confusion and false bug reports.

Therefore I'm tempted to add some sort of String.AppendChar function to make it easier to build strings, and leave Chars[] read-only.

QuoteIs there a reason why the room interactions are called "Player enters screen (before fadein)" and so on?
I imagine it would be a little less confusing for beginners if these would be called "Player enters room (before fadein)".

Originally "room" and "screen" were used interchangably, but it would be more consistent to say "room" here I agree.

Quotebut then when I compile, I get error messages that it can't convert const string to string or something like that, referring to lines within the function.

Can you post one of your functions that is causing the problem, along with what the error message is and which line it's on, then we can hopefully show you how to change it.

Basically any string parameter that the function is going to modify needs to stay as just a "string" (for example, if you're going to StrCopy into it); if the string parameter is not going to be changed by the function, it becomes a "const string".

Quote
Also, a piece of code like this gave me similar error messages now:

Code:
string buffer;
if (GetSaveSlotDescription(101, buffer) == 0) {

That should still work fine, what error are you getting?

Title: Re: AGS 2.71 beta 3 - London edition
Post by: Adamski on Thu 21/07/2005 20:59:20
Quotenetmonkey's media manager plugin should simplify this, but I'm not sure what its current status is.

I do see your point though, names are much nicer than numbers and especially now that we have sub-folders for music and speech to separate them from sounds, it should be simpler to implement.

strazer suggests a good workaround from a script point of view, but there is still the issue of having hundreds of "soundXXX.mp3" files in your game folder and trying to remember which is which, so I do understand the issue.

The reason why I brought this up is that it seems to be a relic left over from the dos editor. Netmonkey's plugin is very nice, but I have concerns about it using the .NET framework.

Strazer's suggestion is excellent though, very useful :)
Title: Re: AGS 2.71 beta 3 - London edition
Post by: edmundito on Thu 21/07/2005 21:22:43
Quote from: Rui "Brisby" Pires on Tue 19/07/2005 07:16:35
Stalkey - you can always ask NetMonkey about his media manager plugin.

Uhh.... update coming soon! An update that actually works!
Title: Re: AGS 2.71 beta 3 - London edition
Post by: monkey0506 on Thu 21/07/2005 22:24:41
Pumaman:

So you're telling me I'm not supposed to be able to use Hotspots and Characters as struct data members? LOL.  Not that I ever actually used it except in testing...but it's kind of funny that I thought it was allowed when in all actuality it turns up to be a bug.  And BTW, I wasn't asking if a String was an object, I knew that much, I was asking if a String object was a pointer.  Which I'm presuming that it is based on your comments.
Title: Re: AGS 2.71 beta 3 - London edition
Post by: Gilbert on Fri 22/07/2005 03:43:38
Quote from: Pumaman on Thu 21/07/2005 20:06:12
QuoteIt seems that the Chars[] property is currently read-only, maybe it's a good idea to make this writable, so to replace StrSetCharAt()?

I'm not sure what to do with this one. The standard practice of Java/C# is that strings are immutable (ie. you can't change them). This is because allowing it can create hard-to-track-down bugs, for example:

String a = "Hello there!";
...
String b = a;
...
a.Chars[4] = 'X';
...
Display("b: %s", b);Ã,  Ã, // displaysÃ,  "HellX there!"

because strings are just pointers, allowing 'a' to be modified means that 'b' also gets changed, which can cause a lot of confusion and false bug reports.

Actually from the manual, I thought using the = assigment is a content copy rather than a pointer copy (but now it appears as pointer copy), simply because of the following line you wrote in String.Copy() of the manual:
"Returns a new copy of the specified string. You should not normally need to use this, since strings can be assigned using the = operator."
In that case that .Copy() function is VERY importantly needed, as you MUST use this to duplicate a fresh one for modifications, I found that description a bit misleading.
I know nothing about those modern programming conventions (OO/Java/C#, etc.), but if you can allow direct = assignment of Strings there're ambiguities already, this kind of assignments looks like high level language practice (like bAsIc :P ), so it'll be a bit confusing:
String a = "hahaha"; //initializes content of a
String b = a; //makes b a copy of the pointer a

In my opinion, since AGS is a game creation package for ease of use, maybe it's worth discussing whether = for Strings works as a content copy or a pointer copy.
Personally I favour content copy more, as it'll be more friendly for most users to have it work like oridinary types like int, short, etc. (it will not be consistent with other struct objects, but it can somehow be noted in the manual). If It's a content copy, things are easier to manage, and you can, say, setting the individual characters safely.

Quote
Therefore I'm tempted to add some sort of String.AppendChar function to make it easier to build strings, and leave Chars[] read-only.
But if it's just .AppendChar(), you can always just use:
a=String.Format("%s%c",a,'!');
and still, changing a character in the middle will become complex, compared to StrSetCharAt() we already have for old strings.
Title: Re: AGS 2.71 beta 3 - London edition
Post by: monkey0506 on Fri 22/07/2005 06:11:14
Okay...that clears some things up in my mind.  It's interesting though that:

String a = "this is some text";
String b = a;

Would make 'b' a pointer to the same object that is pointed at by 'a' instead of copying the contents.  I didn't really understand what the String.Copy() function was for until now, as to create String b as a copy of String a one would have to type something to the effect of:

String a = "this is some text";
String b = a.Copy();

And I have to go...there was more, but I'm busy with other things and I won't get around to finishing this tonight.
Title: Re: AGS 2.71 beta 3 - London edition
Post by: GarageGothic on Fri 22/07/2005 10:31:37
Problem solved. It turned out that the the error in:

string buffer;
if (GetSaveSlotDescription(101, buffer) == 0) {


wasn't actually in THAT piece of the code, although that was the script line number returned in the error message. The problem was in the code run after the if statement.

Another stupid oversight on my part was that I'd changed "string" to "const string" in my global script, but forgot to update their import statements in the script header.  ::)

I can now compile and report that sprite rotation works perfectly!
Title: Re: AGS 2.71 beta 3 - London edition
Post by: monkey0506 on Fri 22/07/2005 15:55:19
Well, I finally gave in to temptation and downloaded the beta on my grandfather's computer...And I did some testing.  It would seem to me that the '=' (equal sign) DOES do a content copy on Strings instead of a pointer copy.  Which IMO is the way that it should be.  Here's the code I used:

#sectionstart game_start  // DO NOT EDIT OR REMOVE THIS LINE
function game_start() {
  // called when the game starts, before the first room is loaded
  String StrA = "this is some text";
  String StrB = StrA;
  Display("%s - 1", StrA);
  Display("%s - 2", StrB);
  StrA = StrA.Append("some more text");
  Display("%s - 3", StrA);
  Display("%s - 4", StrB);
}
#sectionend game_start  // DO NOT EDIT OR REMOVE THIS LINE


And the text that was displayed was as follows:

this is some text - 1
this is some text - 2
this is some textsome more text - 3
this is some text - 4

I came to the conclusion that it does a content copy because if it was a pointer copy then surely StrB would have been displayed as "this is some textsome more text - 4", right?  In any case, I find the content copy much preferable to a pointer copy.

I did find something that I would consider a bug when trying to type:

// main global script
String StrA = "this is some text";


I got an error saying that you cannot initialize a global pointer.  At least in the case of Strings, I think that you should be able to assign initial values.

As for the question I asked earlier about String arrays, I have done some testing now...and I think there may be a problem:

// main global script file

String MyStrs[10];

#sectionstart game_start  // DO NOT EDIT OR REMOVE THIS LINE
function game_start() {
  // called when the game starts, before the first room is loaded
  MyStrs[0] = "MyStrs[0]";
  MyStrs[1] = "MyStrs[1]";
  MyStrs[2] = "MyStrs[2]";
  MyStrs[3] = "MyStrs[3]";
  MyStrs[4] = "MyStrs[4]";
  MyStrs[5] = "MyStrs[5]";
  MyStrs[6] = "MyStrs[6]";
  MyStrs[7] = "MyStrs[7]";
  MyStrs[8] = "MyStrs[8]";
  MyStrs[9] = "MyStrs[9]";
}
#sectionend game_start  // DO NOT EDIT OR REMOVE THIS LINE


The problem is that when I try to compile, I get an error:

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

In: 'Global script'



Error (line 8): Type mismatch: cannot convert 'const string' to 'String*'



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

"Cannot convert 'const string' to 'String*'"...On a wild guess I tried putting the text on the left side and it said that a variable is required on the left side of an assignment.  I figured that much.  So is this a bug or are String arrays not going to be allowed?

That's about all I have for you today.  Later.

Edit:

I'm beginning to think that String arrays won't work at all.  I typed the following code:

// main global script file

String MyStrs[10];

#sectionstart game_start  // DO NOT EDIT OR REMOVE THIS LINE
function game_start() {
  // called when the game starts, before the first room is loaded
  String str = "something";
  Display(str);
  str = "something else";
  Display(str);
  MyStrs[0] = MyStrs[0].Append("this is some text");
  Display(MyStrs[0]);
}
#sectionend game_start  // DO NOT EDIT OR REMOVE THIS LINE


As I already said, typing "MyStrs[0] = "this is some text";" produces an error, so, as you can see, I tried Appending some text.  This produced an error as well.  First the following was displayed (as it should have been):

something
something else

Then the game exited with the following error:

Quote from: Error---------------------------
Adventure Game Studio
---------------------------
An internal error has occured. Please note down the following information.
If the problem persists, contact Chris Jones.
(ACI version 2.71.872)

Error: run_text_script1: error -6 running function 'game_start':
Error: Null pointer referenced
in Global script (line 12)


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

So the append function didn't work since the pointer was still null.  So I tried adding a line "if (MyStrs[0] != null) ...", and it produced yet another error:

Quote from: Error---------------------------
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.71.872)

in Global script (line 13)

Error: Null string supplied to CheckForTranslations

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

The above game_start function is the entire code for the game apart from the default script of the Default game template...and I just checked the help manual, and it turns up that CheckForTranslations is an internal function of AGS. (Line 13, btw, is "Display(MyStrs[0]);").  So by enclosing line 13 into the if statement, the String is neither stored nor displayed.  So...will this be fixed or will String arrays not be allowed just as string arrays were not allowed before them?  Personally, I would prefer the first, but it's not really up to me, which is why I'm asking.
Title: Re: AGS 2.71 beta 3 - London edition
Post by: Pumaman on Fri 22/07/2005 19:02:15
QuoteI was asking if a String object was a pointer.  Which I'm presuming that it is based on your comments.

Yes, it is.

QuoteActually from the manual, I thought using the = assigment is a content copy rather than a pointer copy (but now it appears as pointer copy), simply because of the following line you wrote in String.Copy() of the manual:
"Returns a new copy of the specified string. You should not normally need to use this, since strings can be assigned using the = operator."

You are right in that this statement in the manual would be wrong and confusing if strings can modified. In the current version strings cannot be modified, so there is no difference from a users' point of view as to whether you use Copy() or = . However, if Chars[] was writable for example, then there would be a significant difference and a reason to use Copy().

QuoteIn my opinion, since AGS is a game creation package for ease of use, maybe it's worth discussing whether = for Strings works as a content copy or a pointer copy.

Again, the way that Java/C# get around this question is simply by making string content read-only. That way you don't need to know whether it's a pointer or content copy because the result is the same.

Quotechanging a character in the middle will become complex, compared to StrSetCharAt() we already have for old strings.

It wouldn't have to be. There could easily be a function that worked like this:

str = str.ReplaceCharAt(4, 'X');

that way you still get the ease-of-use of SetCharAt, but the actual string content isn't changed and therefore you don't have issues of pointer vs content copies.

QuoteIt would seem to me that the '=' (equal sign) DOES do a content copy on Strings instead of a pointer copy.
I came to the conclusion that it does a content copy because if it was a pointer copy then surely StrB would have been displayed as "this is some textsome more text - 4", right?

No, it is a pointer copy. But from your point of view as a scripter, it doesn't matter because as you note the result is the correct one.

Notice the key line of code:
StrA = StrA.Append("some more text");

This doesn't actually change StrA -- it creates a new string and then does a pointer copy of the new string into StrA. In other words, it's short for this:

String StrNew = StrA.Append("some more text");
StrA = StrNew;

If you just did this:
StrA.Append("some more text");

on its own, it would do nothing. StrA is not actually modified, but it returns the modified string (which is just thrown away in this case).

QuoteAs for the question I asked earlier about String arrays, I have done some testing now...and I think there may be a problem:

String arrays do not currently work as you've discovered, but I will fix them before the Final.
Title: Re: AGS 2.71 beta 3 - London edition
Post by: monkey0506 on Fri 22/07/2005 19:19:47
Okay.  Well than I guess that clears up the issues that I just edited my post about.  Glad to hear that we will be having String arrays...but any word on putting them in structs?  You said that you would like to implement this, so I was just wondering whether I should expect it or not.  I'm really happy with the work that you've done here Chris!  Keep it up (PLEASE  ;D)!

Also, I would like to comment on the new String.Format function.  I like the fact that it is static so we no longer have to create buffer strings to format things like label text.  It will be nice when I get home to be able to type something to the effect of:

LucasLbl.Text = String.Format("%s", GetModeText());

Of course I just made that up right now, that's not what it will really look like, but it's much nicer than:

string buffer;
StrFormat(buffer, "%s", GetModeText());
LucasLbl.SetText(buffer);

So good job Chris, and thank you!
Title: Re: AGS 2.71 beta 3 - London edition
Post by: RickJ on Sat 23/07/2005 05:47:23
Re: Sound and Music file names
Quote
Yeah, after all, all the multimedia functions would have to be changed to accept file names instead of numbers which is a lot of work for relatively little gain in my opinion.  What I do is set up enums in the main script header ...
Would be neat if these could be created and included in the header automatically.   We wouldn't need to copy sound and music files to SoundNN or MusicNN files.   

On another and vaguely related topic, it would also be nice if the sprite import mechanism would retain the file name so that it could be displayed along with the other sprite properties or so that it could be used as the default export file name.



Title: Re: AGS 2.71 beta 3 - London edition
Post by: Rui 'Trovatore' Pires on Sat 23/07/2005 07:43:45
On that note I have to say that I disagree with RickJ, I find it quite helpful how it exports the sprites and names them whatever number they had. It's much easier for me. Just my opinion on a suggestion.
Title: Re: AGS 2.71 beta 3 - London edition
Post by: Gilbert on Sat 23/07/2005 07:48:38
http://www.adventuregamestudio.co.uk/tracker.php?action=detail&id=227

But it's a bit going off topic now, let's stay with bug reports  for V2.71. I think suggestions related to the new String handling method is okay though.
Title: Re: AGS 2.71 beta 3 - London edition
Post by: edmundito on Mon 01/08/2005 02:04:48
I found a typo in the manual, under SetMusicVolume:

Example:

SetMusicVolume(-3);

will set the room volume to quitest.

---

Where's the other e? :)

Also, I don't know if this could be a bug, but SetMusicMasterVolume does not seem to completely mute music playing at 0. I've been using oggs to test this, and I can still hear the music playing in the background. Is this the way it's supposed to work? and if so, why? (I'm suspecting it has to do with SetDigitalMasterVolume, huh?)

Edit: Okay, Rui solved this for me: http://www.adventuregamestudio.co.uk/yabb/index.php?topic=21010.0

BUT THE TYPO STILL STANDS! :P
Title: Re: AGS 2.71 beta 3 - London edition
Post by: strazer on Tue 02/08/2005 05:39:55
According to the manual Character.FaceLocation expects screen coordinates when in fact it works with room coordinates.
Title: Re: AGS 2.71 beta 3 - London edition
Post by: monkey0506 on Tue 09/08/2005 06:55:32
I got an error message when trying to open a project I'm working on.  Actually it was about 100 - 200 errors.  Something about an error loading a sprite that didn't exist.  It also told me I may have deleted a sprite that was in use.  I got this error message before, and so I decided to wait a while on the Beta...but now it popped up again...I'm not really sure what the problem is, but re-importing the GUI took care of it (there is currently only one GUI and no scripts created from the GUI, so...no worries).  It didn't crash AGS, it just displayed a zillion errors telling me about all the missing sprites.  Thank goodness the enter key clears away those error messages.
Title: Re: AGS 2.71 beta 3 - London edition
Post by: on Tue 09/08/2005 09:02:02
This is the same thing what happened to my game. And it destroyed my game. Every sprites was lost. :'(
Title: Re: AGS 2.71 beta 3 - London edition
Post by: Pumaman on Tue 09/08/2005 21:30:43
QuoteI found a typo in the manual, under SetMusicVolume:
QuoteAccording to the manual Character.FaceLocation expects screen coordinates when in fact it works with room coordinates.

Thanks, I'll fix these.

QuoteI got an error message when trying to open a project I'm working on.Ã,  Actually it was about 100 - 200 errors.Ã,  Something about an error loading a sprite that didn't exist.

That's quite worrying. What version of AGS was the project created with? Do you still have a copy of the game before you upgraded it so that I can try it myself and look into it?

QuoteThis is the same thing what happened to my game. And it destroyed my game. Every sprites was lost.

This is always a risk when using a beta version, and is why the original post in this thread makes it clear to back up your game before trying out a beta :)
Title: Re: AGS 2.71 beta 3 - London edition
Post by: monkey0506 on Thu 11/08/2005 04:52:43
It's a new project that I'm developing from within this BETA.  It's the SM I've been working on.  So there's not a big ordeal with the sprites.  I only had about 21 - 22 sprites that were lost, so I reimported them.  But then I got about 10 - 15 errors per sprite...that was truly disturbing. :=  If you need me to I could randomly open and close AGS to try and simulate the error again... ::) Seeing as it was a random error with only the message about the corrupted (missing?) sprite and no other message...
Title: Re: AGS 2.71 beta 3 - London edition
Post by: Pumaman on Thu 11/08/2005 18:52:18
Hmm, so it wasn't upgrading a game from a previous version then, it just randomly gave you the error when working with the beta?

You didn't happen to keep a copy of the game where it said the sprites were missing, did you?
Title: Re: AGS 2.71 beta 3 - London edition
Post by: monkey0506 on Thu 11/08/2005 20:35:06
Yes, it did just randomly give me the error when working with the beta.  I did some stuff on it, saved it, came back later, and then I got the error.  I don't have a copy of the game with the "missing" sprites, but I will be sure to send one your way if it happens again.

EDIT:  I found a text file containing the messages displayed, if it helps at all...

http://www.sitesled.com/members/meleepta/agsedit.log

Also, I know you are at Mittens, but just curious as to how String data member support was coming.  Talk to you guys when you get back.  Have fun!

EDIT:  I'm trying to write this new script in the most up to date method, so I'm trying to use Strings in place of strings.  I must say, it's a lot nicer.  However, since I can't currently use them as data members, I'm still having to use char arrays for some of them.  That's not why I'm editing my post though.  I thought that I could return a String from the function to get around using a buffer parameter, but it gave me an error with returning a local string from a function...Although you can return local integral types from functions, I didn't get upset.  I decided I would just have to use a buffer parameter, so I used a String parameter.  However, when I actually called the function, the String I passed as the parameter was unchanged.  I kind of understand why, but it would be nice if we could get rid of having to use string buffer parameters altogether (I did use a string, and it works now).  So, I suppose that's all for now.
Title: Re: AGS 2.71 beta 3 - London edition
Post by: strazer on Thu 25/08/2005 10:13:30
Broken links in the manual:
  Tutorial -> Setting up the game -> "hotspot interactions"
  FAQ and Troubleshooting -> Game creation problems -> "here"
  Scripting -> Overlay functions and properties -> See Also: "MoveOverlay"

Edit:

Spelling:
  The run-time engine -> The demo game -> "available as a seperate download" => separate
  The run-time engine -> The Wavetable Synth MIDI driver -> "only available seperately => separately
  Tutorial -> Setting up the game -> Conversations -> "The Dialog Editor is quite self-explanitory => explanatory
  Tutorial -> Setting up the game -> Game options -> Use letterbox (320x240 / 640x480) resolution -> "The screeen will be "letter-boxed"
  Tutorial -> Setting up the game -> Game options -> Number dialog options -> "as well as seperating the options" => separating
  Tutorial -> Setting up the game -> Advanced room features -> Importing a file as the walkable area mask -> "draw these in the editor itsself"
  Other features -> The text parser -> "all words seperated by the comma will match"
  Other features -> Translations -> "You can now give this file to your translaters." => translators
  Other features -> Lip sync -> "Seperate the letters by forward slashes."
  Scripting -> Script modules -> "split your code into more managable chunks" => manageable
  Scripting -> Character functions and properties -> Character.LockView -> "used to perform
animations with charaters" => characters
  Scripting -> File functions and properties -> File.Error -> "whether an error has occured"
  Scripting -> Object functions and properties -> Object.MergeIntoBackground -> "if a game event has occured"
  Scripting -> Game / Global functions -> IsKeyPressed -> "numeric keypad can have inconsitent keycodes" => inconsistent
  Scripting -> Game / Global functions -> RunAGSGame -> "as if it had been launched seperately"
  Scripting -> Game / Global functions -> SetGameOption -> "a seperate command to change them"
  Scripting -> GUI control functions and properties -> GUIControl.SetPosition -> "create dynamically resizable GUIs" => resizeable
  Scripting -> GUI control functions and properties -> GUIControl.SetSize -> "create dynamically resizable GUIs" => resizeable
  Scripting -> Maths functions and properties -> Maths.DegreesToRadians -> "Since the trigonometic functions" => trigonometric
  Scripting -> Mouse functions and properties -> Mouse.ChangeModeGraphic -> "This permenantly changes" => permanently
  Scripting -> Multimedia functions -> SetMusicMasterVolume -> "This is slightly mofidied by" => modified
  Scripting -> Multimedia functions -> SetMusicVolume -> "set the room volume to quitest" => quietest
  Reference -> Interaction events -> "following events are avialable in" => available
  Reference -> Scripting event reference -> on_event -> "depends on which event has occured"
Title: Re: AGS 2.71 beta 3 - London edition
Post by: Gilbert on Thu 25/08/2005 12:43:32
Shuuuu... These are for the V3.0 Service Release Premium Edition, otherwise he has nothing to fix and add after V3.0 is finished. :=
Title: Re: AGS 2.71 beta 3 - London edition
Post by: Rui 'Trovatore' Pires on Fri 26/08/2005 10:25:22
Bug. I toyed with the possibility of making an IF template, and using properties as placeholders of descriptions. But when I tried to give a property a description which I suspected was too long (and was already mentally making workarounds for), and pressed ENTER... the editor quit. Just like that. No error message. No game saving. No nothing, it just quit. And when I booted it up again, no errors at all - but it was as I had left it only when I had last saved.
Title: Re: AGS 2.71 beta 4 - Mittens Edition
Post by: Pumaman on Sat 27/08/2005 15:41:32
QuoteYes, it did just randomly give me the error when working with the beta.  I did some stuff on it, saved it, came back later, and then I got the error.  I don't have a copy of the game with the "missing" sprites, but I will be sure to send one your way if it happens again.

That is worrying. Has this happened to anyone else?

If it happens again, as well as saving a copy of the files for me to look at, can you try deleting hte "sprindex.dat" file, and then renaming the "Backup_acsprset.spr" to "acsprset.spr" and see if it comes back to life?

QuoteI thought that I could return a String from the function to get around using a buffer parameter, but it gave me an error with returning a local string from a function...

This is now safe with the new Strings, so I'll look into fixing it so that you can do this.

QuoteBroken links in the manual:

Thanks, I'll fix all these when I get a moment.

Quotewhen I tried to give a property a description which I suspected was too long (and was already mentally making workarounds for), and pressed ENTER... the editor quit.

Thanks for the report, this is now fixed in beta 4.


Anyway, Beta 4 is now up. This replaces all the built-in functions that used to take a "string buffer" parameter with versions that return a String instead. As usual, the manual links have been set up so you can easily find the new one.

Also, you can now use arrays of Strings, and the "noloopcheck" keyword allows you to bypass the while loop iteration checks since it was causing problems for some people.

Let me know of any problems.
Title: Re: AGS 2.71 beta 4 - Mittens Edition
Post by: monkey0506 on Sat 27/08/2005 17:43:09
Woohoohoohoo!!! ;D

You ROCK Chris!!!

Edit:  I found that noloopcheck doesn't appear in the function import if you import the function to a struct.  It only appears in the definition or else it tries to make noloopcheck the function name, which causes an error.  And it's not documented that it shouldn't appear in the import...

Edit:  I didn't do any super extensive testing because I realized that I still can't use Strings as data members...and there were other problems that I realized with my script that just kind of shut me down for a while...I'll come back to it later and let you know if I find anything else.
Title: Re: AGS 2.71 beta 4 - Mittens Edition
Post by: Pumaman on Mon 29/08/2005 17:20:31
QuoteI found that noloopcheck doesn't appear in the function import if you import the function to a struct.  It only appears in the definition or else it tries to make noloopcheck the function name, which causes an error.  And it's not documented that it shouldn't appear in the import...

Fair point, I'll mention that in the manual.


Now, I've discovered that the character.Room property doesn't work in this beta (you'll get a "dot operator must be followed by member function or property" error), and I'm working on a fix.
Title: Re: AGS 2.71 beta 4 - Mittens Edition
Post by: monkey0506 on Mon 29/08/2005 19:59:48
Okay.  Nevermind.  I was going to post a bit about the old-style strings not seeming to have been changed.  They are apparently now part of the Game struct.

I was also going to post an error I got when trying to return a String from a function, then I realized that Chris told me that it will be looked into and somehow got the idea in my head he said it could be done.

But this bit still puzzles me a little.  When the error popped up, it said "(ACI version 2.71.878)", and when I checked the Version tab in the properties pane (of the editor in Windows) the version read "2.71.614.0".  Is there a difference between these two values (other than the integral difference)?

Now if only I could get rid of MY buffer parameters. :=

[EDIT:] Yay!  I found a way to do it by putting a global String in the SM's main script and returning that from the function.
Title: Re: AGS 2.71 beta 4 - Mittens Edition
Post by: Fekix on Wed 31/08/2005 13:32:49
Two suggestions:

If i have a String 'mystring' i can call every String Function with this String except of String.Format.
mystring.Append, mystring.LowerCase, mystring.Length and so on work just fine but to Format the String i can't type mystring.Format("any String in here") even if the editor Popup have this option in the Dropdown menu i have to use mystring = String.Format("any String in here"). When i use mystring.Format the Game compiles but it doesn't work like it should ;)

The second suggestion is that when declarating a String it should be initialized with the value "".
For Example:
String mystring;
int length = mystring.Length;

doesn't work
but

String mystring;
mystring = "";
int length = mystring.Length;

works fine.
And

String mystring = "";

doesn't work, tooÃ,  :-[

Not really a problem but it would be much more comfortable.

Great work so far,
thanks Felix
Title: Re: AGS 2.71 beta 4 - Mittens Edition
Post by: Pumaman on Wed 31/08/2005 19:51:34
QuoteBut this bit still puzzles me a little.  When the error popped up, it said "(ACI version 2.71.878)", and when I checked the Version tab in the properties pane (of the editor in Windows) the version read "2.71.614.0".  Is there a difference between these two values (other than the integral difference)?

Yes, the editor and the engine have different build numbers.

QuoteIf i have a String 'mystring' i can call every String Function with this String except of String.Format.
mystring.Append, mystring.LowerCase, mystring.Length and so on work just fine but to Format the String i can't type mystring.Format("any String in here") even if the editor Popup have this option in the Dropdown menu i have to use mystring = String.Format("any String in here"). When i use mystring.Format the Game compiles but it doesn't work like it should

Well, it does work, you'd just have to do this:

mystring = mystring.Format("any String in here");

But yeah, I'll remove it from the drop-down list for strings, since it's confusing having it there.

QuoteString mystring = "";

doesn't work, too 

What error do you get?

String mystring = "";

works fine for me.
Title: Re: AGS 2.71 beta 4 - Mittens Edition
Post by: Fekix on Wed 31/08/2005 23:32:04
I declarated the String outside a Function at the top of the mainscript and String mystring = ""; doesn't work for me it says 'cannot assign initial value to global pointer'
Title: Re: AGS 2.71 beta 4 - Mittens Edition
Post by: monkey0506 on Wed 31/08/2005 23:57:50
Yes, initialization of Strings would be nice so I don't get that silly "NULL pointer passed to CheckForTranslations" error. :=

I'm using an array of them BTW, so I can't do it. ;)
Title: Re: AGS 2.71 beta 1 - Big Brother Edition
Post by: strazer on Thu 01/09/2005 03:56:37
I always wait for the next beta and its features before adding anything to the tracker so I totally forgot about these:

Quote from: Pumaman on Thu 16/06/2005 20:07:24
Quote2.) Is there currently a way to determine if an object has "Use walkable area scaling" enabled or not? If not, may I suggest Object.IgnoreScaling.

Not currently, but it would make sense to add that property so that it's consistent with characters.

Tracker'd: http://www.adventuregamestudio.co.uk/tracker.php?action=detail&id=526

Quote from: Pumaman on Sun 17/07/2005 13:20:23
QuoteSo, I was wondering, would it be possible to add an option to remove the alpha channel when creating the dynamic sprite (thus downgrading it from 32 to 24 bit)?

Sounds reasonable to me.

Tracker'd: http://www.adventuregamestudio.co.uk/tracker.php?action=detail&id=527

Quote from: Pumaman on Thu 21/07/2005 20:06:12
Quote from: monkey_05_06 on Tue 19/07/2005 06:08:14I love the new String functionality...but...I think while you're working on it you should make them capable of being implemented in structs.

I'd like to allow pointers in structs, we'll have to see what else comes up.

Tracker'd: http://www.adventuregamestudio.co.uk/tracker.php?action=detail&id=528
Title: Re: AGS 2.71 beta 4 - Mittens Edition
Post by: Pumaman on Thu 01/09/2005 19:12:48
Quote from: Fekix on Wed 31/08/2005 23:32:04
I declarated the String outside a Function at the top of the mainscript and String mystring = ""; doesn't work for me it says 'cannot assign initial value to global pointer'

Ah yes, you can't initialize it if it's a global variable. It may be possible to add support for this, but it's relatively complicated to do so I can't promise anything.

QuoteI always wait for the next beta and its features before adding anything to the tracker so I totally forgot about these:

Thanks for keeping the tracker up to date, strazer :)
Title: Re: AGS 2.71 beta 4 - Mittens Edition
Post by: SSH on Fri 02/09/2005 14:00:50
If you import the same single GUI twice (from a gue file), it renames one of them to "" the empty string. What script name will this have? g?

It also doesn't rename the object names of the things in the GUI. I expect that this could seriously screw up the OOP stuff. Maybe they should all be renamed with "_Copy" on the end or something?

Actually, it seems that doing a double import fo the same GUE really screws up everything: sprites, GUIs, etc. Fior example, I managed to end up with sprites with the same sprite number in more than one sprite folder! Maybe there needs to be some more checking on this?

EDIT:

In fact, the whole GUE import seems a little wierd. I've been importing two GUEs into default games and fidnign that the sprites display all wrongly: the wrong sprites are shown in gui buttons and backgrounds. However, if I take the 80x50 gray sprite, for example, copy it to clipboard, paste as a new sprite and change one of the references to that sprite to the new copied sprite, it works. If I then change back to the original it then works again. It looks maybe like some kind of "dirty" bit isn't being set somewhere???

Here's a RAR with the problem shown. http://www.lumpcity.co.uk/~ssh/sgs_gue_prob.rar

The sgstest2 directory works, the sgstest4 directory doesn't. To get the sgstest4 game, here's what I do:

Start new game with default template
Change to 16 bit colour
Import YesNo script module
Import SGS script module
Import YesNo GUE
Import SGS GUE
Change all global script references to SaveGameDialog and restoreGameDialog etc. to sgs.Save and sgs.Load
Copy in the room1 room
Compile

The Save dialog is all screwed up: sprites for buttons displayed are pretty random

Then if I go to sprite manager, SAVELOAD folder, copy the grey box to clipbaord and paste as new sprite, then go to SAVELAOD GUI, click on the button name go_Saveload_one chnage sprite to the new sprite, compiel, run, all works again...

Any ideas?
Title: Re: AGS 2.71 beta 4 - Mittens Edition
Post by: Pumaman on Sat 03/09/2005 20:09:05
Well spotted, thanks for the info.

As for duplicate GUI control names -- I'll just have it automatically remove the name from the control if this happens, like it does with the GUI.

QuoteIf you import the same single GUI twice (from a gue file), it renames one of them to "" the empty string. What script name will this have? g?

In this case the GUI has no script name, but it can be accessed via the gui[] array if necessary.

In terms of the images messing up, it is indeed not marking the GUI images as dirty, so when it comes to draw the GUI it's still using the old sprite slot numbers of before it was imported. I'll get it fixed.

The quickest workaround is just to double-click the Image option in the button's properties window and then just select the image that's already there, and it should refresh the GUI.
Title: Re: AGS 2.71 beta 4 - Mittens Edition
Post by: SSH on Sat 03/09/2005 21:27:40
Reselecting the sprite didnt seem to work when I tried it, but obviously I'll try my scenario again with beta 5 when its out.
Title: Re: AGS 2.71 beta 5 - Stingy & Fred Edition
Post by: Pumaman on Sun 04/09/2005 18:38:20
Ok, beta 5 is now up, which should fix that.

It also adds some other stuff, including lazy evaluation and you can now return a local String from a function. See the change list in the first post for more details.
Title: Re: AGS 2.71 beta 5 - Stingy & Fred Edition
Post by: monkey0506 on Sun 04/09/2005 19:52:30
Huzzah for lazy eval!!! :=

And for local String returnination.

Great work Chris.

[EDIT:]

There's a problem with the new return-type checking.  Let me first type up a bit of example code:

void myfunc(int param) {
  if (param < 0) return;
  /* else do stuff */
  }


Well...prior to the return-type checking, this would work (and it should IMO).  The problem is "return;" is not registered as returning a "void" value, so it's creating an error.  Instead I have to type:

void myfunc(int param) {
  if (param < 0) {
    void ret;
    return ret;
    }
  /* else do stuff */
  }


Now that's just a bit annoying... ::)
Title: Re: AGS 2.71 beta 5 - Stingy & Fred Edition
Post by: Kweepa on Sun 04/09/2005 20:57:12
"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."

Awesome! Cheers!
Title: Re: AGS 2.71 beta 5 - Stingy & Fred Edition
Post by: Pumaman on Sun 04/09/2005 23:33:19
Quote from: monkey_05_06 on Sun 04/09/2005 19:52:30
There's a problem with the new return-type checking. Let me first type up a bit of example code:

Hmm yes, "void" in general isn't supported properly. Just use "function" instead for the return type and then it will allow you to just do:
return;
Title: Re: AGS 2.71 beta 5 - Stingy & Fred Edition
Post by: monkey0506 on Mon 05/09/2005 11:13:25
Quote from: Pumaman on Sun 04/09/2005 23:33:19
Quote from: monkey_05_06 on Sun 04/09/2005 19:52:30
There's a problem with the new return-type checking. Let me first type up a bit of example code:

Hmm yes, "void" in general isn't supported properly. Just use "function" instead for the return type and then it will allow you to just do:
return;

Meh.


Okay.  But I'd still like to see this fixed if at all possible...
Title: Re: AGS 2.71 beta 5 - Stingy & Fred Edition
Post by: SSH on Mon 05/09/2005 20:01:59
Thanks for the fix CJ

Now I realise that my module looks REALLY untidy without pointers in structs. I have to leave the strings and dynamc sprites out of the struct that holds everythung else
Title: Re: AGS 2.71 beta 5 - Stingy & Fred Edition
Post by: Kweepa on Mon 05/09/2005 21:35:40
Using "String"s I get these flooding ac.log:


String 019CBF40 allocated: 'FILTER:'
String 019F5FF0 allocated: 'FILTER: VISIBLE'
String 019CBF40 deleted: 'FILTER:'
String 01AE2FE0 allocated: 'FILTER: VISIBLE SOLID'
String 019F5FF0 deleted: 'FILTER: VISIBLE'
String 01A1FFC8 allocated: 'FILTER: VISIBLE SOLID FALLTHRU'
String 01AE2FE0 deleted: 'FILTER: VISIBLE SOLID'
Title: Re: AGS 2.71 beta 5 - Stingy & Fred Edition
Post by: monkey0506 on Mon 05/09/2005 21:45:22
Quote from: SteveMcCrea on Mon 05/09/2005 21:35:40
Using "String"s I get these flooding ac.log:


String 019CBF40 allocated: 'FILTER:'
String 019F5FF0 allocated: 'FILTER: VISIBLE'
String 019CBF40 deleted: 'FILTER:'
String 01AE2FE0 allocated: 'FILTER: VISIBLE SOLID'
String 019F5FF0 deleted: 'FILTER: VISIBLE'
String 01A1FFC8 allocated: 'FILTER: VISIBLE SOLID FALLTHRU'
String 01AE2FE0 deleted: 'FILTER: VISIBLE SOLID'


Egads I get a lot of those too!
Title: Re: AGS 2.71 beta 5 - Stingy & Fred Edition
Post by: SSH on Tue 06/09/2005 10:25:58
There's an interesting issue with the whole object oriented stuff: if you have a script module that uses a struct to OO-ify its things, great, but then if you have any functions like repeatedly_execute, etc.  in the module then you either have to make them have full access to the struct (and thus everything else, too) or you have to make them just call a struct version of the function. Is there a way to have two versions of the struct, one visible inside the module, and one outside? Can the extends functionality do this?

Title: Re: AGS 2.71 beta 5 - Stingy & Fred Edition
Post by: strazer on Tue 06/09/2005 21:40:49
Would it be possible to make mouse.SaveCursorUntilItLeaves also restore the mouse cursor when leaving a GUI?
It would simplify things like changing the mouse cursor over a GUI so we could do something like


function repeatedly_execute() {

  if (GUI.GetAtScreenXY(mouse.x, mouse.y) == gSomegui) {
    mouse.SaveCursorUntilItLeaves();
    mouse.Mode = eModePointer;
  }

}
Title: Re: AGS 2.71 beta 5 - Stingy & Fred Edition
Post by: Pumaman on Tue 06/09/2005 23:28:46
Quoteokay.  But I'd still like to see this fixed if at all possible...

I'll bear it in mind, but "void" is not a supported type so it's not really a big issue.

QuoteNow I realise that my module looks REALLY untidy without pointers in structs. I have to leave the strings and dynamc sprites out of the struct that holds everythung else

As I say, hopefully I can add support for this to a future beta.

QuoteUsing "String"s I get these flooding ac.log:

Yes, the last couple of betas have done this -- it's in case anyone has any serious errors with the new Strings, it will help me debug them. Obviously I'll remove the logging before 2.71 Final.

QuoteThere's an interesting issue with the whole object oriented stuff: if you have a script module that uses a struct to OO-ify its things, great, but then if you have any functions like repeatedly_execute, etc.  in the module then you either have to make them have full access to the struct (and thus everything else, too) or you have to make them just call a struct version of the function. Is there a way to have two versions of the struct, one visible inside the module, and one outside? Can the extends functionality do this?

Just making repeatedly_execute call YourStruct.RepeatedlyExecute or whatever is the simplest solution, and I can't think of an easy way to make this much cleaner at the moment. Still, not a big issue.

QuoteWould it be possible to make mouse.SaveCursorUntilItLeaves also restore the mouse cursor when leaving a GUI?
It would simplify things like changing the mouse cursor over a GUI so we could do something like

Sounds like a reasonable request, I'll certainly consider it.
Title: Re: AGS 2.71 beta 5 - Stingy & Fred Edition
Post by: Kweepa on Wed 07/09/2005 00:10:48
Quote from: Pumaman on Tue 06/09/2005 23:28:46
QuoteUsing "String"s I get these flooding ac.log:

Yes, the last couple of betas have done this -- it's in case anyone has any serious errors with the new Strings, it will help me debug them. Obviously I'll remove the logging before 2.71 Final.

Ok, sorry about that.
My hard drive had gone to sleep and the game paused for a second while it warmed up again to write the file. I thought it might have been an oversight.

I did notice this (with the new left to right precedence enabled):

float x = -y + z;

is equivalent to:

float x = -(y + z);

rather than the expected:

float x = (-y) + (z);
Title: Re: AGS 2.71 beta 5 - Stingy & Fred Edition
Post by: edmundito on Wed 07/09/2005 07:51:29
Quote* Implemented lazy evaluation for && and || operators.

Does this mean that if you got... if (boolean == true && (a > 5)) then if boolean is false it will not check if a > 5?

I could come up with a better example that would actually be useful, but I think you get the idea.
Title: Re: AGS 2.71 beta 5 - Stingy & Fred Edition
Post by: Pumaman on Wed 07/09/2005 20:29:06
QuoteI did notice this (with the new left to right precedence enabled):

float x = -y + z;
is equivalent to:
float x = -(y + z);
rather than the expected:
float x = (-y) + (z);

Hmm yeah, interesting point ... the left-to-right precedence affects only the main operators, and not the - operator. It's probably too late to change it now, though.

QuoteDoes this mean that if you got...
if (boolean == true && (a > 5))
then if boolean is false it will not check if a > 5?

Correct. It is more useful in this situation:

Character* theChar = Character.GetAtScreenXY(mouse.x, mouse.y);
if ((theChar != null) && (theChar.Solid == true)) {

with the previous version, this was not possible since the game would abort with a null reference error if theChar was null.
Title: Re: AGS 2.71 beta 5 - Stingy & Fred Edition
Post by: edmundito on Wed 07/09/2005 20:38:59
Yeah, that's what I was talking about... I had a problem like that in Saturday School, I believe... it had to do with objects, though, so I had to repeat part of the code to make it work.
Title: Re: AGS 2.71 beta 5 - Stingy & Fred Edition
Post by: strazer on Wed 07/09/2005 21:17:47
Quote from: Pumaman on Wed 07/09/2005 20:29:06
Hmm yeah, interesting point ... the left-to-right precedence affects only the main operators, and not the - operator. It's probably too late to change it now, though.

I completely understand and support your desire to avoid having to break someone's script, but I think in instances like these it's more important to make things correct, consistent and predictable. Just fix it, add a note to the changelog and be done with it.
Title: Re: AGS 2.71 beta 5 - Stingy & Fred Edition
Post by: GarageGothic on Thu 08/09/2005 20:17:25
Just a quick question for CJ: Will any kind of sprite cropping (other than the current rotate crop) be implemented for 2.71? If not, I won't wait anymore to release my shadowbox-script.
Title: Re: AGS 2.71 beta 5 - Stingy & Fred Edition
Post by: SSH on Thu 08/09/2005 22:57:05
String related stuff: does using the new String.ReplaceCharAt or whatever its called work like the old one where you could replace the last char with 0 to truncate the string? If not, and maybe a good idea anyway, t would be nice to have a String.Substring function with start are length parametrs which returned any arbitrary substring of the String. I know I could write one by hand-concatenation the individual chars, but there doesn't seem to currently be a neat way to make a string shorter.
Title: Re: AGS 2.71 beta 5 - Stingy & Fred Edition
Post by: SSH on Fri 09/09/2005 18:07:27
Quote from: SteveMcCrea on Wed 07/09/2005 00:10:48

I did notice this (with the new left to right precedence enabled):

float x = -y + z;

is equivalent to:

float x = -(y + z);

rather than the expected:

float x = (-y) + (z);


Also, you can't assign an enum a negative value... dunno if this is related
Title: Re: AGS 2.71 beta 5 - Stingy & Fred Edition
Post by: monkey0506 on Fri 09/09/2005 22:29:22
Quote from: SSH on Thu 08/09/2005 22:57:05String.Substring function with start are length parametrs which returned any arbitrary substring of the String.

It wouldn't be too hard to make one...I'll PM you the code since it's not directly related to this beta.
Title: Re: AGS 2.71 beta 5 - Stingy & Fred Edition
Post by: Superman95 on Sat 10/09/2005 03:04:10
I have a couple feature requests, i hope it's in the right place.

Make the module manager, a modeless dialog box.Ã,  I have dual monitor and it would be really helpful to keep it open in the other monitor to easily jump between script and the rest of the editor.

Allow string or String to be in a struct.  This would be VERY helpful to me.

Allow nested types....like this:

struct Statistics
{
  int Strength;
  int Intelligence;
  int Agility;
  .....
}

struct Profile
{
  string Name;
  Statistics Stats;
}


thanks.
Title: Re: AGS 2.71 beta 5 - Stingy & Fred Edition
Post by: monkey0506 on Sat 10/09/2005 08:38:42
Both of those things have already been suggested before you. :=

Seeing as a String is a pointer, pointers will have to (to some extent at least) be allowed within structs for this to work.

As for nested types...it works if the type has previously been imported into the game...but that's not official support.  Official support is being worked on.

And I believe that requests belong in their own thread (except when directly pertaining to features that will definitely appear in the final version of the beta).  But like I said, both of these have already been brought up...

I've been up 26.5 hours and I'm about tired now...so...I'm off to sleep.
Title: Re: AGS 2.71 beta 5 - Stingy & Fred Edition
Post by: SSH on Wed 14/09/2005 14:33:44
Some String wierdness:


String newroom = Game.InputBox("!Teleport to room:");
if ((newroom!="") && (newroom.AsInt<ROOMS)) {
// some stuff
}


gives the compile error "type mismatch: cannot convert const string to int"

why can't I compare newroom to ""?

I worked around it by using newroom.Length!=0 instead, but I think it deserves some attention. Same happens with ==, so I guess its an empty-string issue.


NB: Changing operator precedence doesn't make a difference
Title: Re: AGS 2.71 beta 5 - Stingy & Fred Edition
Post by: edmundito on Thu 15/09/2005 06:53:26
I'd like to point out that in the manual, under script reference\script language keywords\data types there is no mentioning of the bool type. I assume is a 1bit type, right?

And uh.. is there a size for enums?
Title: Re: AGS 2.71 beta 5 - Stingy & Fred Edition
Post by: HeirOfNorton on Thu 15/09/2005 13:21:46
Quote from: Edmundo on Thu 15/09/2005 06:53:26
I'd like to point out that in the manual, under script reference\script language keywords\data types there is no mentioning of the bool type. I assume is a 1bit type, right?

Actually, the bool in AGS is just a predeclared enum, not a seperate type. And for its size...
Quote
And uh.. is there a size for enums?

As I recall, enums are treated interally as ints, so they are all 4 bytes.

HoN
Title: Re: AGS 2.71 beta 5 - Stingy & Fred Edition
Post by: Pumaman on Thu 15/09/2005 22:55:35
QuoteI completely understand and support your desire to avoid having to break someone's script, but I think in instances like these it's more important to make things correct, consistent and predictable. Just fix it, add a note to the changelog and be done with it.

Actually, looking into this further it seems that it's not the - prefix that's broken, but actually that + has a higher precedence than -, which means that this:
5 - 3 + 2
is giving 0 rather than 4, even with Left-to-Right enabled.
This is obviously a bug so I'll fix + and - to have the same precedence for the next version.
(Edit by strazer: AGS v2.71 Beta 6: * Fixed + having a higher precedence than - and thus 5 - 3 + 2 giving 0 rather than 4.)

QuoteJust a quick question for CJ: Will any kind of sprite cropping (other than the current rotate crop) be implemented for 2.71? If not, I won't wait anymore to release my shadowbox-script.

Hopefully it will, yes, it's the next task I'm planning to do.

QuoteString related stuff: does using the new String.ReplaceCharAt or whatever its called work like the old one where you could replace the last char with 0 to truncate the string? If not, and maybe a good idea anyway, t would be nice to have a String.Substring function with start are length parametrs which returned any arbitrary substring of the String.

That's a fair point, String.Substring and String.Truncate methods have been added for the next beta. Although you can write your own workaround fairly easily, these seem useful enough that they should be part of the engine.

QuoteAllow string or String to be in a struct.  This would be VERY helpful to me.

Allowing pointers (including Strings) in structs is what I'm working on at the moment, I hope to have it in the next beta but it's proving to be something of a nightmare so no promises yet.

Quotegives the compile error "type mismatch: cannot convert const string to int"

why can't I compare newroom to ""?

Well spotted, the string version of == and != are marked as returning a string rather than a bool so it can't AND them with another comparison. I'll get it fixed, in the meantime you could do:

if (newroom!="") {
  if (newroom.AsInt<ROOMS) {
    // some stuff
  }
}

instead as a workaround (ie. avoid the && operator).
(Edit by strazer: AGS v2.71 Beta 6: * Fixed error trying to AND/OR the string comparison == and != operators with other operators.)

Quote from: ProgZmax on Wed 14/09/2005 19:44:30Ability to set the current loop of heretofore view ONLY settings.  For example, instead of multiple views for speech, blinking, thinking, allow the user to place all the animations in one view and toggle the loop number (say from the dialog script) so you save space.

Bulleted views.  You specify a name and then can click +/- to expand a view list.  This is ideal for characters with a huge number of animations and far more object oriented.

Noted, but can you please put suggestions in a separate thread if they don't directly relate to the functionality of this beta; that way we can keep this thread focussed.

QuoteI'd like to point out that in the manual, under script reference\script language keywords\data types there is no mentioning of the bool type. I assume is a 1bit type, right?

And uh.. is there a size for enums?

enums and bools are both 32-bit integer types.
Title: Re: AGS 2.71 beta 5 - Stingy & Fred Edition
Post by: monkey0506 on Fri 16/09/2005 00:00:03
This next beta sounds good.  How long (abouts) until we get to see it? :=
Title: Re: AGS 2.71 beta 5 - Stingy & Fred Edition
Post by: GarageGothic on Fri 16/09/2005 00:13:21
Quote from: Pumaman on Thu 15/09/2005 22:55:35
QuoteJust a quick question for CJ: Will any kind of sprite cropping (other than the current rotate crop) be implemented for 2.71? If not, I won't wait anymore to release my shadowbox-script.
Hopefully it will, yes, it's the next task I'm planning to do.

Awesome, thank you so much CJ. I hope I don't seem too greedy if I also remind you of this:

Quote from: Pumaman on Thu 16/06/2005 20:07:24
QuoteI wonder if it would be possible then, as a workaround, to add a function that changes the sprite number of a specific view frame at runtime? Such as SetFrameSprite(int view, int loop, int frame, int slot)?
I'll look into it.

Quote from: Pumaman on Thu 15/09/2005 22:55:35enums and bools are both 32-bit integer types.

LOL - here I thought I was saving memory by using bools instead of chars.
Title: Re: AGS 2.71 beta 5 - Stingy & Fred Edition
Post by: SSH on Fri 16/09/2005 09:23:29
Quote from: monkey_05_06 on Fri 16/09/2005 00:00:03
This next beta sounds good.  How long (abouts) until we get to see it? :=

betas automatically get delayed if anyone asks when the next one will be  >:(. But CJ usually releases them at a weekend.   :=
Title: Re: AGS 2.71 beta 5 - Stingy & Fred Edition
Post by: monkey0506 on Fri 16/09/2005 22:09:28
Quote from: SSH on Fri 16/09/2005 09:23:29
Quote from: monkey_05_06 on Fri 16/09/2005 00:00:03
This next beta sounds good.  How long (abouts) until we get to see it? :=

betas automatically get delayed if anyone asks when the next one will be  >:(. But CJ usually releases them at a weekend.   :=

Oh...oops. :-[

I suppose that would make sense. :=
Title: Re: AGS 2.71 beta 6 - Autumn Edition
Post by: Pumaman on Sat 17/09/2005 11:49:22
Quote from: monkey_05_06 on Fri 16/09/2005 00:00:03
This next beta sounds good. How long (abouts) until we get to see it?

Surely you've been here long enough to know not to ask that question :P


Anyway, beta 6 is now up. This adds support for pointers in structs, among other things.
The pointers in structs feature has been rather a nightmare to implement and involved some significant changes to the script compiler, so please can you make sure that your existing scripts still work, and please report immediately if you get any crashes or strange behaviour with this version.
Title: Re: AGS 2.71 beta 6 - Autumn Edition
Post by: HeirOfNorton on Sat 17/09/2005 16:02:02
Quote from: Pumaman on Sun 05/06/2005 23:32:14
* Added support for having pointer variables in structs.

Edit:

Does this include struct-within-struct, or just builtin types?

Nevermind, tried it out. Only builtin types, still no struct within-a-struct.  :(
Still pretty neat though, being able to put a Character* (or whatever) in a struct.

Quote
* Added DynamicSprite.Crop

Cooool. I'll get on improving the Ags3d+plus+ module to take advantage of this.

HoN
Title: Re: AGS 2.71 beta 6 - Autumn Edition
Post by: Kweepa on Sat 17/09/2005 17:44:13
Quote from: Pumaman on Sun 05/06/2005 23:32:14
* Fixed pamela voice lip-sync not always processing last phenome correctly.

Wow, Pamela does a complete biological breakdown of the speaker? :=
Great beta as usual!

[EDIT] Script compilation is much faster here. And no obvious problems yet.
Title: Re: AGS 2.71 beta 6 - Autumn Edition
Post by: GarageGothic on Sat 17/09/2005 17:47:56
Wohoo, CJ you da man. I'll try it out right away. First, one more suggestion though:

Could we please have a DynamicSprite.Save(string filename) function? Having background-to-sprite and cropping functions would make this a very interesting option (such as having the player paint his own logo/portrait with RawDraw and then export it to a pcx file).
Title: Re: AGS 2.71 beta 6 - Autumn Edition
Post by: Gregjazz on Sat 17/09/2005 21:14:45
* Fixed walk-to point getting randomly moved if you alt+tabbed back into AGS from another application.

So that's what it was!! I always had that problem but never quite identified it...

And in agreement with GarageGothic, DynamicSprite.Save(string filename) would be sweet.
Title: Re: AGS 2.71 beta 6 - Autumn Edition
Post by: monkey0506 on Tue 20/09/2005 01:06:01
Quote from: Pumaman on Sat 17/09/2005 11:49:22
Quote from: monkey_05_06 on Fri 16/09/2005 00:00:03
This next beta sounds good. How long (abouts) until we get to see it?

Surely you've been here long enough to know not to ask that question :P

Actually at the time, it never occurred to me... :o

And I like the use of Strings within structs.  Finally :D.  Unfortunately, I've now uncovered some more bugs (in my own script, not the engine).  Back to work! :=

[EDIT:] I've noticed that using an enumeration as an array size works outside of a struct, but not inside of one.  I.E.:

enum myenum {
  eMyenum1 = 1,
  eMyenum2 = 2
  };

int stuff[eMyenum1];

struct mystruct {
  int somestuff[eMyenum1];
  int somemorestuff[eMyenum2];
  };


I typed that into the global script of a new game, pressed Ctrl+S, and then it gave me the error:

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

In: 'Global script'



Error (line 11): Array size must be constant value



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

Lines 3-6:  enum declaration
Line 7: whitespace
Line 8: array declaration
Line 9: whitespace
Lines 10 - 13: struct declaration

In short, line 11 is "int somestuff[eMyenum1];".  It doesn't have a problem with line 8, "int stuff[eMyenum1];", it just doesn't like me trying to use an enumeration as an array size within a struct... :-\  I was hoping to get rid of some of these #defines in place of something that works with autocomplete...
Title: Re: AGS 2.71 beta 6 - Autumn Edition
Post by: strazer on Tue 20/09/2005 01:42:50
Quote from: monkey_05_06 on Tue 20/09/2005 01:06:01I was hoping to get rid of some of these #defines in place of something that works with autocomplete...

You can use this trick to activate auto-complete for #defines:


// header

#define MYENUM1 34 // import int MYENUM1;


It's sort of a bug and, if I remember correctly, something CJ won't fix for a while. :)
Title: Re: AGS 2.71 beta 6 - Autumn Edition
Post by: Scorpiorus on Tue 20/09/2005 01:56:54
Quote from: monkey_05_06 on Tue 20/09/2005 01:06:01
enum myenum {
Ã,  eMyenum1 = 1,
Ã,  eMyenum2 = 2
Ã,  };[

int stuff[eMyenum1];

I was also hopping use that kind of trick to make it extend an array on its own.

enum MyItems {
eItem1=0,
eItem2,
eItem3,
eMaxItems
};


Nice that it works with those out of struct, at least :)

[edit to fix eItem1]
Title: Re: AGS 2.71 beta 6 - Autumn Edition
Post by: monkey0506 on Tue 20/09/2005 04:42:36
Quote from: strazer on Tue 20/09/2005 01:42:50
Quote from: monkey_05_06 on Tue 20/09/2005 01:06:01I was hoping to get rid of some of these #defines in place of something that works with autocomplete...

You can use this trick to activate auto-complete for #defines:


// header

#define MYENUM1 34 // import int MYENUM1;


It's sort of a bug and, if I remember correctly, something CJ won't fix for a while. :)

Thanks for the tip... :=
Title: Re: AGS 2.71 beta 6 - Autumn Edition
Post by: SSH on Tue 20/09/2005 14:47:17
I've been trying to do this:


struct slowmove_t extends slowmove {
  int x0, y0, x1, y1;
  int dx, dy;
  int stepx, stepy;
  int delay;
  int timer;
  int fraction;
  Object *o;
  Character *c;
 
  import static function find_free();
  import function setup(Object *o, Character *c, int x, int y, int delay);
  import function move();
  import function update();
};

slowmove_t slowmove_i[MAX_SLOWMOVES];

function slowmove_t::setup(Object *o, Character *c, int x, int y, int delay) {
  this.o = o; /// AGS BARFS HERE!
// etc....
}


And AGS says: "Error (line 31): Nested non-property pointers not supported".

I'm not nesting anything, I just want to assign, say, slowmove_i[0].o = o; by doing slowmove_i.setup(o, ...);

EDIT:
Well, OK, this is a pointer, as is this.o Ah well, I worked around it, albeit a little inelegantly. Maybe there could be a bit more explanation in the error message.

While we're on dodgy error messages, if I accidentally refer to the type of a struct array instead of the array itself, I get the unhelpful message:


slowmove_t[i]....

"Variable '[' already defined"

when it should say:

"I pity da fool that thinks slowmove_t is an array"


EDIT 2:

Actually, if you have a String inside a struct, say called s, you can never do this.s, because this and s are both pointers and you get that error I mentioned earlier. This rather restricts the "strings in structs" feature! It also means that although you cn declare protected Strings in a struct, you cannot actually access them!

Edit by strazer

AGS v2.71 RC 1:
* The "this" pointer can now access pointer members in its struct.
Title: Re: AGS 2.71 beta 6 - Autumn Edition
Post by: Snarky on Wed 21/09/2005 14:46:36
I haven't tried this, but couldn't you just write s instead of this.s? That's how it works in Java, at least.
Title: Re: AGS 2.71 beta 1 - Big Brother Edition
Post by: strazer on Wed 21/09/2005 15:24:39
Quote from: Pumaman on Tue 07/06/2005 19:50:34
Quote from: strazer on Tue 07/06/2005 08:23:21
And now that we are able to flip dynamic sprites, I think it would be essential to be able to determine if a view frame is flipped or not (via GetGameParameter or whatever).

Those are reasonable enough requests, if anyone else would find them useful?

Tracker'd: http://www.adventuregamestudio.co.uk/tracker.php?action=detail&id=536
Title: Re: AGS 2.71 beta 6 - Autumn Edition
Post by: A�rendyll (formerly Yurina) on Wed 21/09/2005 22:51:20
Hmm... this sure looks promising!

If I may do a suggestion for the future, I'd say it would be nice to have better speechview options. I'm currently looking fo different expressions, but I'm finding it hard to code. It would be nice to have more simple options to do so.
Title: Re: AGS 2.71 beta 6 - Autumn Edition
Post by: Rui 'Trovatore' Pires on Thu 22/09/2005 12:13:31
I know I already addressed the issue of not being a way to get a character's name in a string (it currently returns a [200] char), but I'd like to bring it up again. It's relevant because it's probably the only thing not "Stringasized", and it is one that is preventing me from updating my script. Well, I can update most of it, but I'd like to update all of it...
Title: Re: AGS 2.71 beta 6 - Autumn Edition
Post by: SSH on Thu 22/09/2005 12:56:48
Quote from: Rui "Brisby" Pires (a Furry) on Thu 22/09/2005 12:13:31
I know I already addressed the issue of not being a way to get a character's name in a string (it currently returns a [200] char), but I'd like to bring it up again. It's relevant because it's probably the only thing not "Stringasized", and it is one that is preventing me from updating my script. Well, I can update most of it, but I'd like to update all of it...

Actually, there's quite a few builtin functions that don't work with Strings when they could.

Quote from: Snarky on Wed 21/09/2005 14:46:36
I haven't tried this, but couldn't you just write s instead of this.s? That's how it works in Java, at least.
No, you just get an error. AGS script isn't Java!
Title: Re: AGS 2.71 beta 6 - Autumn Edition
Post by: GarageGothic on Thu 22/09/2005 17:34:32
Are the coordinates for DynamicSprite.CreateFromBackground room or screen coordinates? I can't seem to grab RawDrawn background art from outside the (0-320, 0-200) area? Also, will it ever be possible to RawDraw to background frames other than the one shown?
Title: Re: AGS 2.71 beta 6 - Autumn Edition
Post by: SSH on Fri 23/09/2005 16:32:03
I just got this error after moving my mouse off the windowed game:

---------------------------
Illegal exception
---------------------------
An exception 0xC0000005 occured in ACWIN.EXE at EIP = 0x7C93426D ; program pointer is +1099, ACI version 2.71.884, gtags (1,1)
Title: Re: AGS 2.71 beta 6 - Autumn Edition
Post by: Pumaman on Sat 24/09/2005 13:05:18
QuoteCould we please have a DynamicSprite.Save(string filename) function? Having background-to-sprite and cropping functions would make this a very interesting option (such as having the player paint his own logo/portrait with RawDraw and then export it to a pcx file).

Ok, I can see how that would relate to these changes, I'll think about it.

QuoteI've noticed that using an enumeration as an array size works outside of a struct, but not inside of one.

Fair point, I'll get it fixed.

QuoteAnd AGS says: "Error (line 31): Nested non-property pointers not supported".

Good point, I didn't bother implementing support for pointer.pointer because I thought it could never happen. But, of course, with the "this" pointer I've been proven wrong! I'll look into it.

QuoteWhile we're on dodgy error messages, if I accidentally refer to the type of a struct array instead of the array itself, I get the unhelpful message:

Yeah, there are various situations like this. But if I start to fix things like this it could turn into a never-ending torrent of "if I do this then this, the error message isn't intuitive"; at the end of the day, the compiler can't really provide a full explanation of every possible mistake you can make (though it would be nice if it did). I'll leave it for now.

QuoteI know I already addressed the issue of not being a way to get a character's name in a string (it currently returns a [200] char), but I'd like to bring it up again.

Heh yes, I keep forgetting about this ... Character.Name will come soon, honest!

QuoteActually, there's quite a few builtin functions that don't work with Strings when they could.

Such as? As far as I'm aware, character.name is the only remaining example of this.

QuoteAre the coordinates for DynamicSprite.CreateFromBackground room or screen coordinates? I can't seem to grab RawDrawn background art from outside the (0-320, 0-200) area? Also, will it ever be possible to RawDraw to background frames other than the one shown?

Hmm you're right, it's not quite working properly. It seemed ok when I originally tested it but now taking another look there's something wrong with CreateFromBackground. I'll look into it, and get it fixed.

QuoteI just got this error after moving my mouse off the windowed game:

Did it happen when the mouse moved out of the window, or when you clicked somewhere else?
Title: Re: AGS 2.71 beta 6 - Autumn Edition
Post by: Kweepa on Sat 24/09/2005 20:41:57
Quote from: Pumaman on Sat 24/09/2005 13:05:18
QuoteWhile we're on dodgy error messages, if I accidentally refer to the type of a struct array instead of the array itself, I get the unhelpful message:
...at the end of the day, the compiler can't really provide a full explanation of every possible mistake you can make (though it would be nice if it did). I'll leave it for now.

Perhaps it would be better to just say "Syntax error" rather than an error message that is inaccurate or misleading.
Then users won't think there's something wrong with the compiler.
Title: Re: AGS 2.71 RC 1 - New Orleans Edition
Post by: Pumaman on Sun 25/09/2005 17:12:38
QuotePerhaps it would be better to just say "Syntax error" rather than an error message that is inaccurate or misleading.
Then users won't think there's something wrong with the compiler.

That might be a good idea actually, I'll have a think about it.


Anyway, RC 1 is now up. It should fix up a few remaining bits and bobs -- the "this" pointer should now work with member pointers (SSH's problem).

The reason I think it's time to go to Release Candidate stage now rather than add any more features is that the new Strings are so useful that I'd like to get them out there as soon as possible.

I am still a bit cautious about releasing this though after a couple of reports of sprite file corruption, so if you get any errors like that with this version, please do report them immediately.

Title: Re: AGS 2.71 RC 1 - New Orleans Edition
Post by: GarageGothic on Sun 25/09/2005 17:55:46
Quote from: Pumaman on Sun 05/06/2005 23:32:14* Added Character.Scaling property; renamed IgnoreScaling to ManualScaling to reflect its new functionality.
* Added DynamicSprite.SaveToFile function.
* Arrays and structs are now officially supported, and are documented in the manual.
* Fixed CreateFromBackground not using the X & Y co-ordinates correctly.

Awesomeness! I can't believe how much 2.71  has improved the overall quality of Shadowplay. All hail CJ!

Edit 3: Removed two other edits. Never mind, it seems to work now.
Title: Re: AGS 2.71 RC 1 - New Orleans Edition
Post by: strazer on Mon 26/09/2005 15:47:08
Quote from: Pumaman on Sun 05/06/2005 23:32:14* Added GP_ISFRAMEFLIPPED option to GetGameParameter.

Thank you!

Quote from: Pumaman on Sun 25/09/2005 17:12:38The reason I think it's time to go to Release Candidate stage now rather than add any more features is that the new Strings are so useful that I'd like to get them out there as soon as possible.

How about fixing a couple of minor bugs then? I'm thinking of

- Label doesn't display if shorter than word (http://www.adventuregamestudio.co.uk/tracker.php?action=detail&id=80)
- Room edges don't trigger when overlapping (http://www.adventuregamestudio.co.uk/tracker.php?action=detail&id=81)
- Sierra-speech and dialog options display (http://www.adventuregamestudio.co.uk/tracker.php?action=detail&id=466)
Title: Re: AGS 2.71 RC 1 - New Orleans Edition
Post by: Superman95 on Wed 28/09/2005 05:05:24
Hey CJ,

I wouldn't really call it a bug, but I thought it might be something you'd want to know.

I have an NVIDIA Quadro card.  When I turn off Hardware Acceleration, the AGS runtime engine stops working.  I turned it off to make another game work.  I forgot I turned it off and it took me awhile to figure out why AGS stopped working.  I wouldn't call it a bug, but if you didn't know, I thought I would give you a heads up.
Title: Re: AGS 2.71 RC 1 - New Orleans Edition
Post by: monkey0506 on Wed 28/09/2005 14:37:09
Nice work.  Unfortunately I'm looking at being without power for a month.  So unless I start coming to work with my mom every day (like I did today) I probably won't have computer access, nevermind the internet.
Title: Re: AGS 2.71 RC 1 - New Orleans Edition
Post by: Pumaman on Wed 28/09/2005 20:05:34
QuoteHow about fixing a couple of minor bugs then? I'm thinking of

Yeah, it is about time I looked at those, I'll consider it.

QuoteI have an NVIDIA Quadro card.  When I turn off Hardware Acceleration, the AGS runtime engine stops working.  I turned it off to make another game work.  I forgot I turned it off and it took me awhile to figure out why AGS stopped working.  I wouldn't call it a bug, but if you didn't know, I thought I would give you a heads up.

Care to expand on "stops working"? Do you get an error message?
Title: Re: AGS 2.71 RC 1 - New Orleans Edition
Post by: Superman95 on Wed 28/09/2005 21:06:38
no, the main window gets created but no content is drawn in it.  Honestly, it seems more like a DirectX or Allegro issue.  But, I just thought i would mention it.
Title: Re: AGS 2.71 RC 1 - New Orleans Edition
Post by: strazer on Thu 29/09/2005 15:59:03
Quote from: Pumaman on Wed 28/09/2005 20:05:34Yeah, it is about time I looked at those, I'll consider it.

Thanks!
Another thing I forgot to mention (again) is repeatedly_execute in room scripts (http://www.adventuregamestudio.co.uk/tracker.php?action=detail&id=514). I think it's a bit inconsistent and sounds so easy to do, seeing as repeatedly_execute_always already works.
Wasn't it supposed to be fixed already (http://www.adventuregamestudio.co.uk/yabb/index.php?topic=21373.msg267212#msg267212)?
Title: Re: AGS 2.71 RC 1 - New Orleans Edition
Post by: Pumaman on Thu 29/09/2005 21:34:11
Quoteno, the main window gets created but no content is drawn in it.  Honestly, it seems more like a DirectX or Allegro issue.  But, I just thought i would mention it.

Ah, ok. Thanks for mentioning it, it would be handy if AGS could detect the problem and display a message -- at least that would help anyone who had the problem.

QuoteAnother thing I forgot to mention (again) is repeatedly_execute in room scripts. I think it's a bit inconsistent and sounds so easy to do, seeing as repeatedly_execute_always already works.

It's more to do with the fact that there's already an interaction for it, so it would effectively allow two Repeatedly Execute scripts in a room (the one named repeatedly_execute and the interaction script), which is why I'm cautious.
Title: Re: AGS 2.71 RC 1 - New Orleans Edition
Post by: Superman95 on Thu 29/09/2005 21:36:48
I don't understand why you would need both, if you can do it with an interaction.  What would you gain from that?
Title: Re: AGS 2.71 RC 1 - New Orleans Edition
Post by: SSH on Fri 30/09/2005 01:45:39
Not having to use the interaction editor!
Title: Re: AGS 2.71 RC 1 - New Orleans Edition
Post by: Gilbert on Fri 30/09/2005 02:10:31
Quote from: Superman95 on Thu 29/09/2005 21:36:48
I don't understand why you would need both, if you can do it with an interaction.Ã,  What would you gain from that?
Actually the problem is inconsistency, I'd rather both re and re_always handled in the same way in rooms, i.e. either both in interaction or both user manually created.
IMO I prefer the latter as the script will be more readible, opposed to having function names liek room_b().
Title: Re: AGS 2.71 RC 1 - New Orleans Edition
Post by: Rui 'Trovatore' Pires on Fri 30/09/2005 08:46:08
My two cents: I like using the interaction editor for it. For consistency. Everything ELSE uses the interaction editor.
Title: Re: AGS 2.71 RC 1 - New Orleans Edition
Post by: RickJ on Fri 30/09/2005 09:05:14
I'm with SSH on this one.  In general I prefer not using the interaction editor whenever possible.   Perhaps at some point in the future the script language could be extended so that interactions could be defined in the room script.  The new OO way of things presents some interesting posibilities for this and perhaps interaction functions could have useful names such as...

Object.LookAt()
Room.PlayerLeaves()
Room.RepeatedlyExecute()
:
etc

The interaction editor or the script editor could then be used to define/modify such interaction functions.

I realize this probably won't make the cut for RC2  :=, but it's something interesting to consider for the future, IMHO.   
Title: Re: AGS 2.71 RC 1 - New Orleans Edition
Post by: Rui 'Trovatore' Pires on Fri 30/09/2005 09:11:47
A thought about RickJ's suggestion - that COULD raise the number of responses for each cursor mode (instead of the current limit of ten) to whatever the user wanted to, provided there WAS an existing cursor with a matching name.
Title: Re: AGS 2.71 RC 1 - New Orleans Edition
Post by: TheMagician on Sun 02/10/2005 16:24:25
Just one question:

now that we have those nice "Music" and "Speech" subfolders, how about a "Sound" subfolder?

I think it would make things more organizable.

Apart from that: many thanks CJ for the features of the new Release Candidate!!  :D

Title: Re: AGS 2.71 RC 1 - New Orleans Edition
Post by: Colxfile on Mon 03/10/2005 15:30:09
I've hit a small thing when testing a game. If I click on the room-script edit button in the room-settings editor (and then do whatever I like and finish and save or whatever happens), then the button is selected and can be 'clicked' by hitting the enter key. If I then go on to test the game, and hit enter while the whole thing is being compiled, then room-script editor pops-up. Then the game runs.
Not sure how much of a biggie this is, but thought you'd like to know anyway. :)
Title: Re: AGS 2.71 RC 1 - New Orleans Edition
Post by: edmundito on Sat 08/10/2005 01:10:41
Possible bug, my good man:

I had something like this on the script header for a module

/*
struct CommentedStruct {
};
*/

Yet when I typed it on the script editor, it would appear on the little list that pops up. What does that mean?  :o
Title: Re: AGS 2.71 RC 1 - New Orleans Edition
Post by: SSH on Thu 13/10/2005 12:51:56
It's a well-known "feature" that the autocompleter ignores comments when populating. It can be handy sometime, e.g. having autocompletion for #defines by making a commented-out declaration of the same name
Title: Re: AGS 2.71 RC 1 - New Orleans Edition
Post by: edmundito on Thu 13/10/2005 14:31:18
Is it also a feature for ags to confuse me a whole lot while I'm scripting? ;)
Title: Re: AGS 2.71 RC 1 - New Orleans Edition
Post by: monkey0506 on Thu 13/10/2005 22:17:43
It also processes commands like:

// $AUTOCOMPLETEIGNORE$
// $AUTOCOMPLETESTATICONLY$

The first of which would cause autocomplete to ignore the line, i.e., if I do:

// header file
import int myint; // $AUTOCOMPLETEIGNORE$

// script file
int myint;
...
export myint;


Then myint would exist, but wouldn't be autocompleted.

The second is for struct member functions that should only be autocompleted if they are accessed statically, i.e.:

struct MyStruct {
  protected int myint;
  import void SetMyInt(int value);
  import int GetMyInt();
  import static void DoSomething(); // $AUTOCOMPLETESTATICONLY$
  };

MyStruct mystrobj;
mystrobj.(...) /* autocompletes SetMyInt and GetMyInt */
MyStruct.(...) /* autocompletes DoSomething */


So it can be useful...but it can have its drawbacks at times.  If you just separate some of the words, perhaps like:

/* str uct CommentedStruct { ... }; */


Instead of:

/* struct CommentedStruct { ... }; */


I think that should break the autocompletion...
Title: Re: AGS 2.71 RC 1 - New Orleans Edition
Post by: Dorcan on Fri 14/10/2005 17:24:50
Mmm seems that I can't check if the backspace button is pressed with IsKeyPressed. When I look at the console, it says:
"IsKeyPressed:  unsupported keycode 8".
I'm not sure, but wasn't it supported before the 2.7 version ?

I'm making my own textbox, and I need to check if this button was pressed, as you can guess. Using the on_key_press function wouldn't be practical at all.

Any chance to support this keycode (and maybe other useful ones) for a next beta... ?

Edit: Oh, one more thing. There is no way to get rid of dynamic sprites when you close the game with ALT+F4 or by pressing the red cross. I allways get the message "Dynamic sprite # was never deleted".

Having an event eEventQuitGame would be quite useful IMO.
Title: Re: AGS 2.71 RC 1 - New Orleans Edition
Post by: HeirOfNorton on Sat 15/10/2005 00:37:01
Coupla string things. Not sure if these are bugs, deliberate, or just too hard to bother with... (or if I'm the only one having these problems)

First, say I have this code:

function MyFunction(String mystring) {
  //blah blah
}

//later

MyFunction("This is some text");


In this case, the game aborts with the error message "Cannot convert const string to String" I kinda understand why that would be, but it is rather inconvenient. It does work if I assign to a seperate String, and pass THAT String to the function.

Second, would it be possible to have Strings auto-initiallized to "", or would that just mess this up for people too much? Right now it's not very intuitive that I can declare a String, but that I cannot perform, eg. an Append function on it (because it is a null pointer, nothing to append to).

Anyway, these are work-around-able, but these seem like things that SHOULD work.

HoN
Title: Re: AGS 2.71 RC 1 - New Orleans Edition
Post by: monkey0506 on Sat 15/10/2005 03:06:48
Interesting that it can't make the conversion from const string to String (as in the case of text surrounded by quotation marks).  I think I've done that in a couple of places where I specifically didn't want it to work with old-style strings...but I can change it.
Title: Re: AGS 2.71 RC 1 - New Orleans Edition
Post by: SSH on Sat 15/10/2005 10:37:14
HoN, I think AGS's behaviour is correct. A function parameter which is a "String" means that the function can modify the string. If you pass it a literal, it cannot modify the literal, so therefore if you want a function to accept literals, you must declare it as const string. If you want to use all the new methods, you can always assign the function argument to a new string as the first thing in the function.

and you can initialise strings to "" if you do:

String n="";
Title: Re: AGS 2.71 RC 1 - New Orleans Edition
Post by: Pumaman on Sat 15/10/2005 14:45:08
QuoteI'm with SSH on this one.  In general I prefer not using the interaction editor whenever possible.   Perhaps at some point in the future the script language could be extended so that interactions could be defined in the room script.  The new OO way of things presents some interesting posibilities for this and perhaps interaction functions could have useful names such as...

Yes, it would be handy to be able to bypass the inteaction editor completely for people who want to do so. That's certainly a possibility for a future version.

Quotenow that we have those nice "Music" and "Speech" subfolders, how about a "Sound" subfolder?

Yes, I'll try and get that done.

QuoteI've hit a small thing when testing a game. If I click on the room-script edit button in the room-settings editor (and then do whatever I like and finish and save or whatever happens), then the button is selected and can be 'clicked' by hitting the enter key. If I then go on to test the game, and hit enter while the whole thing is being compiled, then room-script editor pops-up. Then the game runs.

Hmm, I'll look at that, thanks for reporting it.

QuoteMmm seems that I can't check if the backspace button is pressed with IsKeyPressed

That could well be the case, I'll look into it.

QuoteIn this case, the game aborts with the error message "Cannot convert const string to String" I kinda understand why that would be, but it is rather inconvenient. It does work if I assign to a seperate String, and pass THAT String to the function.

That's a good point, which I'll look into -- as a workaround declare the function parameter as "const string" and then it will accept both Strings and literals.
Title: Re: AGS 2.71 RC 1 - New Orleans Edition
Post by: edmundito on Sat 15/10/2005 15:57:38
Quote from: Pumaman on Sat 15/10/2005 14:45:08
QuoteI'm with SSH on this one.  In general I prefer not using the interaction editor whenever possible.   Perhaps at some point in the future the script language could be extended so that interactions could be defined in the room script.  The new OO way of things presents some interesting posibilities for this and perhaps interaction functions could have useful names such as...

Yes, it would be handy to be able to bypass the inteaction editor completely for people who want to do so. That's certainly a possibility for a future version.

What would be cool would be if the interaction editor and the script editor were two different methods of viewing the code, kind of what the ActionScript editor does in flash, you know? You can switch between basic and advanced, but that would mean that you would be able to choose from every possible action in the interaction editor, and that would be crazy...

Also, that was  a suggestion, and this is a place to post about bugs. Oh well.
Title: Re: AGS 2.71 RC 1 - New Orleans Edition
Post by: Adamski on Wed 19/10/2005 10:51:46
I have a suspsicion that SetChannelVolume isn't actually working... I'm sure I've reported this one before, perhaps it's just my hardware? Anyone else mind doing a quick test?
Title: Re: AGS 2.71 RC 1 - New Orleans Edition
Post by: Privateer Puddin' on Wed 19/10/2005 14:16:25
http://www.adventuregamestudio.co.uk/yabb/index.php?topic=22075.0 maybe it is this.. i'm not sure :D

QuoteThe music volume does get automatically reset at various points, so using SetChannelVolume on it won't work very well.
Title: Re: AGS 2.71 RC 2 - Mad Parrot Edition
Post by: Pumaman on Sat 22/10/2005 17:44:47
RC2 is now up, which fixes some bits and bobs.

QuoteI have a suspsicion that SetChannelVolume isn't actually working... I'm sure I've reported this one before, perhaps it's just my hardware? Anyone else mind doing a quick test?

What channel are you trying to use it on? As custard says, it doesn't work very well on the background music channel.
Title: Re: AGS 2.71 RC 2 - Mad Parrot Edition
Post by: SSH on Mon 24/10/2005 13:31:16
Possible bug report here: I've been finding that sometimes when using CTRL_T test game, when I close the game down control returns to the editor, but the game is still running and I have to kill it with the Task Manager before I can use test game again. It doesn't happen all the time (maybe only when quiting when a Display box is shown) but its a real pain. I'm also getting a very slow frame rate on a dual-processor AMD Athlon 64 X2 4800+ with 2G memory....

seems to happen when exiting via Windows X or Alt-X. Not with ctrl-Q yet. Also, when it finally is killed by task manager, AGS pops up "Run time engine did not terminate correctly, if prersistsent please post in Tech Forum"

Other problem I'm getting on this code:

---------------------------
Illegal exception
---------------------------
An exception 0xC0000005 occured in ACWIN.EXE at EIP = 0x00433BBE ; program pointer is +6, ACI version 2.71.888, gtags (0,0)

AGS cannot continue, this exception was fatal. Please note down the numbers above, remember what you were doing at the time and notify CJ on the Tech forum.

in Credits (line 151)
from Credits (line 230)
from Room 1 script (line 12)

line 151 of Credits script is:          

       this.typet=nl.Substring(0, 1);

strangely, this was working fine until just now. It had been OK, then it broke, then I added in some debug code and it worked again. Took out the debug and it still worked, then changed something else and it broke again and I cant fix it now!

You can find this dodgy code at: http://www.lumpcity.co.uk/~ssh/credittest.rar
Title: Re: AGS 2.71 RC 2 - Mad Parrot Edition
Post by: Dorcan on Mon 24/10/2005 19:08:44
Quote* 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 IsKeyPressed not working with backspace (ASCII code 8).
Thank you a lot :)

QuoteI've been finding that sometimes when using CTRL_T test game, when I close the game down control returns to the editor, but the game is still running and I have to kill it with the Task Manager
Same problem for me, I think it came with the RC1 version. I'm not sure, but it seems to me that it only happened after closing the game by pressing the x button, when a warning message was supposed to appear, but for a reason or another simply didn't.
Title: Re: AGS 2.71 RC 2 - Mad Parrot Edition
Post by: Pumaman on Mon 24/10/2005 20:23:11
QuoteAn exception 0xC0000005 occured in ACWIN.EXE at EIP = 0x00433BBE ; program pointer is +6, ACI version 2.71.888, gtags (0,0)

Thanks for reporting that, I've found the problem ... it's a bug in Substring and Truncate, I'll get it fixed.
(Edit by strazer: "AGS v2.71 RC 3: * Fixed crash in String.Substring and String.Truncate methods.")

QuotePossible bug report here: I've been finding that sometimes when using CTRL_T test game, when I close the game down control returns to the editor, but the game is still running and I have to kill it with the Task Manager before I can use test game again. It doesn't happen all the time (maybe only when quiting when a Display box is shown) but its a real pain. I'm also getting a very slow frame rate on a dual-processor AMD Athlon 64 X2 4800+ with 2G memory....

Hmm, strange ... I haven't been able to replicate this yet. Do you test the game full-screen or windowed? Does it happen both ways?
Title: Re: AGS 2.71 RC 2 - Mad Parrot Edition
Post by: SSH on Tue 25/10/2005 13:24:17
I've only tried Windowed, but my whole computer was acting weird yesterday (the 3d text screensaver was glitching all over and everything was very slow) and it hasn't happened yet today, since a reboot. It may be that some things were installed that "required a reboot" and the reboot was postponed causing somethign odd in the system, but I'll update if it comes up again today.

heh, 30 second later i see its doing it again...

When the AGS game is closed with the Windows X button, the window disappears from the screen, but the Taskbar thing is stil there. I can minimise and restore it still, and the zooming effect occurs back and forth, but the window is zero size, without even a titlebar.

Title: Re: AGS 2.71 RC 2 - Mad Parrot Edition
Post by: Gilbert on Tue 25/10/2005 13:31:00
Will it be possible that your computer is infected by a Y-rus, or that some hardware components are yelling, "I'm dying... please... help me... donate your $$$ to revify me..."?
:=
Title: Re: AGS 2.71 RC 2 - Mad Parrot Edition
Post by: SSH on Tue 25/10/2005 13:45:43
Well, the computer is only 4 weeks old, has McAfee giving it a clean bill of health, ditto with MS AntiSpyware, Spybot, AdAware.

Other factors:

I'm using the module manager to edit a module, then I leave the module manager and hit CTRL-T
Title: Re: AGS 2.71 RC 2 - Mad Parrot Edition
Post by: edmundito on Tue 25/10/2005 14:42:42
I personally get slow response from the default dialog options  (when you don't use a GUI) and I think the inventory gui object also give me problems but only if it's carrying inventory for 640x480. I tried this on ags 2.6x, so I don't know if 2.7+ fixed it. It all started when I installed my GeForce 6600 GT card, which is pretty powerful.

However, all of this happens if a game is running. The editor has never given me any trouble.
Title: Re: AGS 2.71 RC 2 - Mad Parrot Edition
Post by: SSH on Tue 25/10/2005 15:07:03
scotch downloaded my game folder and tried it on his system and couldn't reproduce this issue either. Interestingly enough, I have dual GeForce 6600 GTs...

Let me try it on the other computer i have on my desk...

Hmm, other computer doesn't seem to have this problem. Dorcan, can you post your system specs, please, so we can see if there's a common theme?

I installed the latest video drivers and that doesn't seem to help. Also, the same problem occurs when the AGS game crashes: it displays the dialog telling me the script line and call stack and that I referenced a null pointer, then i hit OK and the  program is still in the taskbar. I can use AGS up to the point where I try and test the game, where I have to go and kill off the old prog before I can go further.
Title: Re: AGS 2.71 RC 2 - Mad Parrot Edition
Post by: edmundito on Tue 25/10/2005 23:38:28
What a coincidence! Mine is AGP because my computer is old... I don't know if that makes any difference.

I know that old RON games play like crap when I try to pick dialog options...
Title: Re: AGS 2.71 RC 2 - Mad Parrot Edition
Post by: Pumaman on Wed 26/10/2005 18:43:18
If you run the game normally rather than using the Test Game feature, do you also get this problem where the game hangs around after you exit?
Title: Re: AGS 2.71 RC 2 - Mad Parrot Edition
Post by: SSH on Wed 26/10/2005 21:00:33
Not sure, will try on the bad computer tomorrow... however I can say that it hasn't happened to me yet if I've done CTRL-T without any changes: i.e. the game wasn't dirty and didn't need re-saving

EDIT:

Also, I notice that Helm says in his Caverns readme that RestartGame is crashing the AGS engine. I've noticed that too.
Title: Re: AGS 2.71 RC 2 - Mad Parrot Edition
Post by: Dorcan on Sat 29/10/2005 11:30:35
QuoteDorcan, can you post your system specs, please, so we can see if there's a common theme?


------------------
System Information
------------------
Operating System: Windows XP Professional (5.1, Build 2600) Service Pack 2
System Manufacturer: VIA Technologies, Inc.
System Model: VT8363
BIOS: Phoenix - AwardBIOS v6.00PG
Processor: AMD Duron(tm) processor,  MMX,  3DNow, ~1.0GHz
Memory: 320MB RAM
DirectX Version: DirectX 9.0c (4.09.0000.0904)

---------------
Display Devices
---------------
Card name: NVIDIA GeForce4 Ti 4200
DAC type: Integrated RAMDAC
Display Memory: 128.0 MB
Driver Name: nv4_disp.dll
Driver Version: 6.14.0010.7184 (English)
DDraw Status: Enabled
D3D Status: Enabled
AGP Status: Enabled


Happened to me again as I was working on a room script and tested the game with ctrl+T. I closed the window, continued working on my game a few minutes, then I noticed that it was still written "[Running game]" on the agseditor title bar.

Edit: I have another problem. When launching an ags games in fullscreen, I can't move the mouse and the game runs quite slowly, for like 10 seconds. Then everything works fine. I think it's a problem with directDraw, because I have a similar problem when starting video files, where sometimes the movie wouldn't play before 10 seconds. Maybe the problem with the game not quitting normaly has something to do with directx, I don't know.
Title: Re: AGS 2.71 RC 2 - Mad Parrot Edition
Post by: Rui 'Trovatore' Pires on Sat 29/10/2005 15:12:36
BTW, I've been having this issue for a while (dunno if it's just my peecy or if it's common) - after Alt-Tabbing out and back in (ayuh, it's not exactly the sort of think you should do regularly, but it's necessary at times) the game gets slower, less responsive, jerkier. Not immediately noticeable, but there will be moments when it's it'll be obvious. Quitting and re-running the game solves it, naturally.
Title: Re: AGS 2.71 RC 2 - Mad Parrot Edition
Post by: Gilbert on Mon 31/10/2005 10:23:40
Well it seems it was there for versions, auto-complete in script editor pops up the function "PlaySpeech(int, int)" which was undocumented, is it just some test stuff you put into the editor? If it's just obsolete and won't work I think it should be removed to avoid confusions.

More info here (http://www.adventuregamestudio.co.uk/yabb/index.php?topic=23214.0).
Title: Re: AGS 2.71 RC 2 - Mad Parrot Edition
Post by: Elliott Hird on Mon 31/10/2005 13:48:15
No, add it as a feature instead, it'd be useful.
Title: Re: AGS 2.71 RC 2 - Mad Parrot Edition
Post by: SSH on Mon 31/10/2005 16:55:52
Quote from: Elliott Hird on Mon 31/10/2005 13:48:15
No, add it as a feature instead, it'd be useful.

Or, to put it politely, "I'd prefer that the function was fixed and documented, if broken, rather than removed"  ::)

Elliott, I know that you said in your first post that you have Aspergers, but don't use that as an excuse to order people about, especially our esteemed leader
Title: Re: AGS 2.71 RC 2 - Mad Parrot Edition
Post by: strazer on Sun 06/11/2005 14:10:46
Quote from: Pumaman on Tue 06/09/2005 23:28:46
Quote from: strazer on Tue 06/09/2005 21:40:49Would it be possible to make mouse.SaveCursorUntilItLeaves also restore the mouse cursor when leaving a GUI?
It would simplify things like changing the mouse cursor over a GUI so we could do something like

Sounds like a reasonable request, I'll certainly consider it.

Tracker'd: http://www.adventuregamestudio.co.uk/tracker.php?action=detail&id=546
Title: Re: AGS 2.71 RC 3 - Mad Parrot Edition
Post by: Pumaman on Sun 06/11/2005 18:12:16
Ok, RC 3 is up. This is a minor update -- it fixes up a couple of things and also upgrades Allegro (which may fix the game not shutting down properly after testing it -- can you guys check and see?).

I'd like this to be the final release of 2.71 but there are still a couple of things outstanding that I'd like to fix first:
1. The sprite file corruption that has been reported once or twice in this thread. Has anyone seen this lately? I'd really like to get to the bottom of it if there's a problem.
2. The "invalid handle" error message that Sektor 13 reported in this thread (http://www.adventuregamestudio.co.uk/yabb/index.php?topic=23320.0) -- if anyone else has seen this problem, please let me know.
Title: Re: AGS 2.71 RC 3 - Mad Parrot Edition
Post by: Barbarian on Sun 06/11/2005 20:05:19
Quote from: Pumaman on Sun 06/11/2005 18:12:16
Ok, RC 3 is up. This is a minor update -- it fixes up a couple of things and also upgrades Allegro (which may fix the game not shutting down properly after testing it -- can you guys check and see?).

CJ, I'm constantly in awe at your amazing skills and efforts of always working so hard to improve AGS.
Ã,  Ã, Regarding the game not shutting down properly problem... with your last rc2 version, I found I would get an error-message of the engine not shutting down properly, about 50% of the time, when shutting down the game from a test run in the editor.Ã,  With the rc3 version you just released, I've now tested and shut-down my game many times, and so far no more shutting down error messages, so for me at least, it seems to be working much better now in that regards.Ã,  :)

Ã,  Ã, Once again, great job, and Thank you so much for AGS and for sharing with us all. Really, AGS has become a regular part of my life over the last couple of years, and I enjoy my time playing aroung with AGS and amoung the community here.Ã,  Ã, Best regards.
Title: Re: AGS 2.71 RC 3 - Mad Parrot Edition
Post by: monkey0506 on Sun 06/11/2005 21:08:29
I for one have never had any problem exiting the game after testing it, but I have had that problem with sprite corruption...As a matter of fact, when importing a game from AGS 2.62 a couple of days ago, I got the error again for a large number of sprites.  It may even have been the same game which I originally encountered the errors with.  So perhaps it's a problem with importing old games?

I'll have to download RC3 and test it out to see if the error has possibly somehow become resolved.  And if it hasn't then I'll let you know.
Title: Re: AGS 2.71 RC 3 - Mad Parrot Edition
Post by: Pumaman on Wed 16/11/2005 19:45:40
Any luck with this?

I really don't want to release the Final version of 2.71 until I've got to the bottom of this problem, so if anyone else has experienced any sprite corruption problems, please let me know.
Title: Re: AGS 2.71 RC 3 - Mad Parrot Edition
Post by: SSH on Wed 16/11/2005 21:28:11
Just to confirm as I mentioned in other thread: I've not yet had the game shutdown bug with RC3
Title: Re: AGS 2.71 RC 3 - Mad Parrot Edition
Post by: Dorcan on Wed 16/11/2005 23:14:50
me either
Title: Re: AGS 2.71 RC 3 - Mad Parrot Edition
Post by: monkey0506 on Wed 16/11/2005 23:35:12
Sorry I never updated my post Chris.  It did turn out to be a problem with importing an old game from 2.62, but when I tried to open it with 2.7 (after un-raring it again) it was still corrupted, so it seems that I don't have a non-corrupted version of the file.  It's possible that I've just accidentally replaced my backup with a file that had the corrupted sprite index.

Other than that I haven't seen the problem, so I don't really know what to tell you.  If you want I could send you the old file.

Sorry I can't help more.
Title: Re: AGS 2.71 RC 3 - Mad Parrot Edition
Post by: SSH on Thu 17/11/2005 12:44:35
Minor bug: if you have a function import in a struct and you split it over two lines:


struct a {
  import function b (int x,
                              int y, int z);
}


Then the autocompleter doesn't pick it up, and in fact pick up a wrong identifier instead... this may apply out of structs, too.
Title: Re: AGS 2.71 RC 4 - Politically Correct Edition
Post by: Pumaman on Wed 23/11/2005 23:33:57
Glad to hear that the game-shutting-down bug seems to be fixed now.

QuoteSorry I never updated my post Chris.  It did turn out to be a problem with importing an old game from 2.62, but when I tried to open it with 2.7 (after un-raring it again) it was still corrupted, so it seems that I don't have a non-corrupted version of the file.  It's possible that I've just accidentally replaced my backup with a file that had the corrupted sprite index

Hehe ah well, thanks for checking.

QuoteThen the autocompleter doesn't pick it up, and in fact pick up a wrong identifier instead... this may apply out of structs, too.

The autocomplete parser is quite basic, and yes it will only recognise functions properly if the definition is all on one line. However, there are also several other situations in which it doesn't work properly if things are split over two lines so I won't give it much attention for now, sorry.


Anyway, RC 4 is now up. This should fix the Savegame-with-screenshots problem that some people have been having, so please let me know whether it makes any difference.

If anyone else has an example of a game that experienced sprite corruption, please let me know ASAP.
Title: Re: AGS 2.71 RC 4 - Politically Correct Edition
Post by: Colxfile on Fri 25/11/2005 15:38:39
Quote from: Pumaman on Sun 05/06/2005 23:32:14* Removed "Target DOS" option from the menu, since the DOS engine is no longer available.

You'll probably want to axe the warning "Games with names longer than 8-letters will cause some troubles if you compile for DOS" error if you create a new game with a name longer than 8-letters...
Title: Re: AGS 2.71 RC 4 - Politically Correct Edition
Post by: SSH on Mon 28/11/2005 13:38:30
The error reported by Snake Blisken in my Zoom module threadÃ,  ( http://www.adventuregamestudio.co.uk/yabb/index.php?topic=23664.0Ã,  ) is wierd: I can't see anything in the 2.71 changelog that would cause the problems he sees. However, it would be nice to have a mechanism whereby a module can specify a minimum AGS version required for its use...

I'd also like to mention that this BETA is actually more stable, it seems than the 2.70 final, so maybe its time to get this mutha on the road...
Title: Re: AGS 2.71 RC 4 - Politically Correct Edition
Post by: Pumaman on Mon 28/11/2005 19:42:51
QuoteYou'll probably want to axe the warning "Games with names longer than 8-letters will cause some troubles if you compile for DOS" error if you create a new game with a name longer than 8-letters...

Good point, will do.

QuoteThe error reported by Snake Blisken in my Zoom module threadÃ,  ( http://www.adventuregamestudio.co.uk/yabb/index.php?topic=23664.0Ã,  ) is wierd: I can't see anything in the 2.71 changelog that would cause the problems he sees. However, it would be nice to have a mechanism whereby a module can specify a minimum AGS version required for its use...

That is interesting, but I won't pay it too much attention since it seems to be fixed.

You can require AGS 2.71 by doing:

#ifndef AGS_NEW_STRINGS
#error AGS 2.71 is required for this module
#endif

QuoteI'd also like to mention that this BETA is actually more stable, it seems than the 2.70 final, so maybe its time to get this mutha on the road

I agree -- we are at RC 4, and it's pretty much ready for release. The only things keeping it back are:
(1) to know for sure whether the "invalid handle" error with the screenshots module is now fixed
(2) the sprite corruption problems that have been reported occasionally
Title: Re: AGS 2.71 Final - Politically Correct Edition
Post by: Pumaman on Fri 02/12/2005 20:44:49
Ok, well I've uploaded the Final. It doens't look like we're going to get to the bottom of the sprite corruption for now, so I'd may as well release 2.71 since it has several worthwhile fixes.

This is the tentative final version. If no serious problems are found, I'll make it the Official 2.71 release.
Title: Re: AGS 2.71 Final - Politically Correct Edition
Post by: strazer on Fri 02/12/2005 21:49:32
Nice, thanks. Time to update my modules.
Btw, were you able to fix the stereo 8-bit wave file crash (http://www.adventuregamestudio.co.uk/yabb/index.php?topic=23658.0)?

Edit:

I've just noticed in the manual for String.UpperCase and .LowerCase, in the code examples it says "newstring" instead of "mystring".

Edit 2:

Regarding String.AppendChar:

  String somestring;
  somestring = somestring.AppendChar('a');

The latter part causes a "Null string/pointer referenced" error unless I define somestring as
  String somestring = "";

Would it make sense for AppendChar to "activate" the String, for lack of a better word, if it is null when a character is added to it?
Title: Re: AGS 2.71 Final - Politically Correct Edition
Post by: Rui 'Trovatore' Pires on Fri 02/12/2005 22:27:00
I guess I might as well say this, it's been on my mind a lot...

I haven't rested it myself, but I've read reports of the snow/rain plugin not working with the newest betas - since beta 4, I believe. Normally I'd ask this of Scorpiorus, but he's been MIA for quite a while now. So I was wondering... CJ, I don't suppose you could see what caused it to stop working, and maybe, I dunno, if it's unrelated to the changes... change it back?
Title: Re: AGS 2.71 Final - Politically Correct Edition
Post by: Pumaman on Sat 03/12/2005 12:28:33
QuoteBtw, were you able to fix the stereo 8-bit wave file crash?

Yes, sorry I might have forgotten to include it on the changelog. It should be fixed in 2.71 final.

QuoteI've just noticed in the manual for String.UpperCase and .LowerCase, in the code examples it says "newstring" instead of "mystring".

Thanks, I'll correct them.

Quote
Regarding String.AppendChar:

  String somestring;
  somestring = somestring.AppendChar('a');

The latter part causes a "Null string/pointer referenced" error unless I define somestring as
  String somestring = "";

Would it make sense for AppendChar to "activate" the String, for lack of a better word, if it is null when a character is added to it?

Yeah it's an interesting point ... we've discussed it briefly before as to whether Strings should be automatically initialized to "" rather than null ... they probably should be, thinking about it, but it's too late to do that for 2.71 now.

QuoteI haven't rested it myself, but I've read reports of the snow/rain plugin not working with the newest betas - since beta 4, I believe. Normally I'd ask this of Scorpiorus, but he's been MIA for quite a while now. So I was wondering... CJ, I don't suppose you could see what caused it to stop working, and maybe, I dunno, if it's unrelated to the changes... change it back?

What is it that doesn't work? I've tried adding the plugin to a game and compiling it and that seemed ok ... is it actually at runtime that you get the problem?
Without knowing how the code for the plugin works, it's probably not viable for me to fix it.
Title: Re: AGS 2.71 Final - Politically Correct Edition
Post by: Rui 'Trovatore' Pires on Sat 03/12/2005 20:29:33
Ah, you'd have to talk to Trisk, he's the one I remember right now that had trouble with it... I know it wasn't really my place place to mention it, but I thought it should be mentioned.
Title: Re: AGS 2.71 Final - Politically Correct Edition
Post by: strazer on Sat 03/12/2005 21:23:13
He posted about it here (http://www.adventuregamestudio.co.uk/yabb/index.php?topic=23610.msg291924#msg291924).
Title: Re: AGS 2.71 Final - Politically Correct Edition
Post by: monkey0506 on Sat 03/12/2005 21:31:09
[In a pitiful attempt to relate this to the topic:]

I'd just like to say that initializing Strings to "" would be very useful to me.  In fact, if they could just never be null it would make things easier for me because I have all these checks running around (if (StringParam == null) return;) and whatnot...it's just kind of a hassle.

[Offtopic (kind of):]

Strazer, when this does go official, (please) don't put the ScrollingDialog module in the archive.  I broke it.  The last update crashes the game and I haven't uploaded a fixed version...I'll get on that soon, but I just wanted to let you know it's broken right now.
Title: Re: AGS 2.71 Final - Politically Correct Edition
Post by: strazer on Sat 03/12/2005 21:58:59
Got it.
Title: Re: AGS 2.71 Final - Politically Correct Edition
Post by: SSH on Mon 05/12/2005 13:36:28
I tried searchign the forums to find out about this sprite corruption thing, but couldn't track it down. Howver, I have my own sprite corruption issue. In this test game (http://www.lumpcity.co.uk/~ssh/sprfont.rar). I try to "print" ABCDE with sprites using RawDrawImage. However, the sprites come up as crap. Also, the same sprites look OK in the GUI or as objects. Yes, the colour depth is OK and this is copied into a new blank game, so I dont know what is wrong!

The game is compiled with Final, but it was doing it in RC4 too. However, I'm pretty sure I've had Rawdraw working in RC4 earlier...
Title: Re: AGS 2.71 Final - Politically Correct Edition
Post by: Pumaman on Mon 05/12/2005 19:58:14
Your room background is 8-bit, which is why the 16-bit sprites are messing up when being drawn onto it.
Title: Re: AGS 2.71 Final - Politically Correct Edition
Post by: SSH on Mon 05/12/2005 20:31:46
I'm sure it still did it with a 16-bitter. If so, I'll repload tomorrow.

No it doesnt. I'm sure that BG was not 8 bit - oh well. Humble pie for dinner!
Title: Re: AGS 2.71 Final - Politically Correct Edition
Post by: GarageGothic on Tue 06/12/2005 16:44:43
Quote from: Rui "Shodan" Pires (a divine AI) on Fri 02/12/2005 22:27:00I haven't rested it myself, but I've read reports of the snow/rain plugin not working with the newest betas - since beta 4, I believe. Normally I'd ask this of Scorpiorus, but he's been MIA for quite a while now. So I was wondering... CJ, I don't suppose you could see what caused it to stop working, and maybe, I dunno, if it's unrelated to the changes... change it back?

I didn't have any issues with the plugin in either of the betas and just compiled the game with final version, and the plugin does what it's supposed to. Has anyone but Trisk actually experienced this problem?
Title: Re: AGS 2.71 Final - Politically Correct Edition
Post by: SSH on Wed 07/12/2005 12:11:33
Well, this time everything's 16bit, but I get a corruption when I grab the BG as a dynamic sprite. Test game is in the same place here (http://www.lumpcity.co.uk/~ssh/sprfont.rar)

The background draws OK, but the Dynamic Sprite that I grab from it has all these vertical black stripes in it which looks like a resolution confusion again...

I hope its not my own screwup again...

Furtehr info: I tried replacing where I use DynamicSprite.CreateFromBackground with   DynamicSprite.CreateFromScreenshot and then cropping. This works, however, I am trying to draw and then capture in zero time so that it is invisible to the user and the screenshot one needs a Wait(1) to update the screen and also no overlying GUIs... Looks like a DS.CFB bug to me...
Title: Re: AGS 2.71 Final - Politically Correct Edition
Post by: Trisk on Wed 07/12/2005 16:45:45
On the Snow/Rain plugin:

It worked fine on AGS 2.7 in Prodigal. But when I ported the game up to 2.71 RC3 and/or RC4, suddenly the rain disappeared. So I loaded the Snow/Rain demo game that comes with the plugin to see if that was any better, and neither the rain nor the snow show up.

Weird that nobody else is having this problem, since it worked fine for me in 2.7 and 2.62...

I'm running in 16bit color...maybe people who aren't having troubles are running in different color depths?

-**EDIT**- Other people are having this problem too. Check this topic:

http://www.adventuregamestudio.co.uk/yabb/index.php?topic=23494.0
Title: Re: AGS 2.71 Final - Politically Correct Edition
Post by: Pumaman on Wed 07/12/2005 20:58:46
SSH: you have to be very careful when mixing colour depths.
In your case now, the room background is 32-bit but the game itself is 16-bit. This means that CreateFromBackground is creating a 32-bit sprite from the background, but then when you create a graphical overlay it gets created as 16-bit (since overlays are always created at the game's colour depth).
Then putting this 32-bit sprite into the 16-bit overlay and then drawing the 16-bit overlay onto the 32-bit background all gets rather messed up.

Trisk: interesting ... well, without speaking to Scorpiorus there's no way I can really know what's wrong with the plugin.
Title: Re: AGS 2.71 Final - Politically Correct Edition
Post by: SSH on Thu 08/12/2005 07:47:27
But then, since there aren't really any 16-bit graphics file formats, how do you import a 16-bit BG? I thought AGS used to convert 32-bit BGs to 16-bit in a hicolour game, not at runtime but in the editor... has this changed?

btw, my guess with Rain/Snow is due to which version og the Allegro DLL people have installed...
Title: Re: AGS 2.71 Final - Politically Correct Edition
Post by: Gilbert on Thu 08/12/2005 07:50:42
Yes you're right I think.

If your game was setup as 16-bit already, the editor would automatically convert true colour images into 16 bit while importing.
If you setup a game as 32-bit first and imported some graphics, however, the graphics will not be converted back to 16-bit even if you changed the colour depth in the editor (which I suppose was what you did), so you need to reimport these images.
Title: Re: AGS 2.71 Final - Politically Correct Edition
Post by: SSH on Thu 08/12/2005 09:39:12
But I never had the game as 32-bit...

Well, Irfanview converted the BG to a 16-bit PNG and now I get instead:

---------------------------
Illegal exception
---------------------------
An exception 0xC0000005 occured in ACWIN.EXE at EIP = 0x004053D0 ; program pointer is +6, ACI version 2.71.892, gtags (108,20)

AGS cannot continue, this exception was fatal. Please note down the numbers above, remember what you were doing at the time and notify CJ on the Tech forum.

in SpriteFont (line 103)
from Room 2 script (line 21)


Most versions of Windows allow you to press Ctrl+C now to copy this entire message to the clipboard for easy reporting.
---------------------------
OK   
---------------------------

line 103 is:

    RawDrawImageTransparent(x, y, spr, transparent);

which seems to occur when i call the function with transparent != 0

Also, now the sprites are displays as kack again...  ::)

Is there a way to find out what bit depth a background is imported as (as you can with sprite properties)? It used to be the game resolution it was imported at, but now seems to dpeend more on the file you import: GIFs always import as 8-bit, 32bit PNGs import as 32 bit. In fact, I no longer trust those sprites that say they are 16-bit. SOmething has changed in the file import.

btw, the mouse co-ords display on sprite import is wrong, as it says 40,40 when at 20,20 at zoom level 2 (default)...
Title: Re: AGS 2.71 Final - Politically Correct Edition
Post by: Gilbert on Thu 08/12/2005 12:22:59
Hmmm, maybe the PNGs had alpha channels which messed up the import, try converting them to 24-bit PCX (which does not support transparency) and see if that helps.
Title: Re: AGS 2.71 Final - Politically Correct Edition
Post by: SSH on Thu 08/12/2005 13:12:19
Thanks, Gil, that seems to work!

There's definately something funny in the PNG import, though...
Title: Re: AGS 2.71 Final - Politically Correct Edition
Post by: on Thu 08/12/2005 21:39:38
With ags271rc2 all things work fine! But after installing ags271rc4 and ags271final I got 2 serious problem:

1. It's not longer possible to initialize the audiocard â€" Message: Unable to initialize your audio card (program Failed to init digital sound driver).

2. The computer freeze not every time but about every second time when running “Test game” or the compiled game. With freezing I mean Windows crash totally and it's only possible to turn the computer of and on.

I've try it with more than one game. Also I've have make the most simple game with just one room and one walkable area and nothing else.

My computer:
Dell Optiplex GX1p Pentium II, 450 MHz, 256 mb ram.
Video Card: Radeon 7000 series with 32 mb ram.
Sound Card: Roland CPU-401
System: Windows98SE.
Title: Re: AGS 2.71 Final - Politically Correct Edition
Post by: Scummbuddy on Fri 09/12/2005 16:20:26
1) Did you have Windows Media Player open? It doesn't need to be playing anything, but if I have it open, I get that same message.

2) You may have to join the exclusive AGS club that has to test their game by clicking on the game icon in the games folder, and no longer through the AGS menu. Congrats!  :=
Title: Re: AGS 2.71 Final - Politically Correct Edition
Post by: SSH on Fri 09/12/2005 16:24:11
Ironically, RC3 fixed your problem #2 for me. Check that your DirectX, video drivers, etc. are up-to-date.
Title: Re: AGS 2.71 Final - Politically Correct Edition
Post by: Pumaman on Fri 09/12/2005 19:15:15
SSH: The PNG probably had an alpha channel that was meaning the background got left at 32-bit. GIF's also get left at 8-bit.

These "features" were originally meant to allow for clever tricks so that you could use an 8-bit background in a 16-bit game for instance; however now I think they're just annoying and counter-intuitive, so I'll modify the editor to automatically convert all backgrounds to the game colour depth on import.

Heimdal: strange, it shouldn't have a problem with Windows 98, and in fact other people have said that the new version improved things for them on Win98. Are you sure you haven't got any other sound apps open, like Scummbuddy says?
Title: Re: AGS 2.71 Final - Politically Correct Edition
Post by: GarageGothic on Fri 09/12/2005 19:20:27
Quote from: Pumaman on Fri 09/12/2005 19:15:15These "features" were originally meant to allow for clever tricks so that you could use an 8-bit background in a 16-bit game for instance; however now I think they're just annoying and counter-intuitive, so I'll modify the editor to automatically convert all backgrounds to the game colour depth on import.

But will you still be able to set the color depth to 16-bit, import your backgrounds and non-alpha sprites, then switch back to 32 and import the rest? I use this trick a lot to avoid wasting file size on 32-bit backgrounds.
Title: Re: AGS 2.71 Final - Politically Correct Edition
Post by: Pumaman on Fri 09/12/2005 20:16:24
Yes, when you import a background it will convert it to the current game colour depth.
Title: Re: AGS 2.71 Final 2 - Politically Correct Edition
Post by: Pumaman on Sun 11/12/2005 00:00:19
Ok, Final 2 is now up.

"What's Final 2?!?!", I hear you ask. Well, a few things were found with the final so this is a new one. The main reason I'm releasing this is because of the numeric keypad problem, which is a regression over 2.7 so it really needs to be fixed.

Hopefully this should be it, asuming no big problems are found with this version.
Title: Re: AGS 2.71 Final 2 - Politically Correct Edition
Post by: Kinoko on Sun 11/12/2005 06:49:26
Well, that's good enough for me so I've finally downloaded the new version and I'm playing around with it.

I have one problem which isn't a bug but I didn't feel it was worth starting a whole thread about.

I'm getting the error Type Mismatch: Cannot convert 'const string' o 'string' for the line ccCreateCommand(1, "MOVE:380,166; MOVE:360,186; GOTO:1;");


This is a function of the Character Control System plugin. Is it possible form me to fix this problem myself? Or do I have to try and get the plugin itself updated by Scorpiorus (who I havent seen here in a very long time)?
Title: Re: AGS 2.71 Final 2 - Politically Correct Edition
Post by: SSH on Sun 11/12/2005 08:56:54
Two ways to work around it:

1) Use the Char Control module instead of plugin

2) Do this:


string x;
StrCopy(x, "WHAT I WNT TO SAY");
old_function(x);


Hack, but will work
Title: Re: AGS 2.71 Final 2 - Politically Correct Edition
Post by: Kinoko on Sun 11/12/2005 09:50:01
Oh, I didn't even know there was a module. I'll take a look at it, thanks!
Title: Re: AGS 2.71 Final 2 - Politically Correct Edition
Post by: GarageGothic on Tue 13/12/2005 19:37:35
This is seriously weird. Until now I've had no problem with the Snow/Rain plugin, but as of Final 2 it has stopped working. It works fine with a compiled game using v. 2.71.888 but not on 2.71.894.

Edit: Ah, now I know why I couldn't reproduce the rain plugin issue until now. It seems that if you have an old acwin.exe file in your game directory, the game will be compiled with an executable for that version rather than that of the current editor version. So for a couple of builds I've kept compiling the game using the old .exe. Sorry for the confusion Trisk.
Title: Re: AGS 2.71 Final 2 - Politically Correct Edition
Post by: strazer on Tue 13/12/2005 22:16:44
Quote from: Kinoko on Sun 11/12/2005 09:50:01Oh, I didn't even know there was a module.

Are you sure? (http://www.adventuregamestudio.co.uk/yabb/index.php?topic=20608.msg251586#msg251586)  :P

I'm in the process of updating/rewriting the module for AGS v2.71 and there's still one bug I have to figure out.
If you have to upgrade to v2.71 now, you better work around using SSH's suggestion for now.

Edit: Module updated. (http://www.adventuregamestudio.co.uk/yabb/index.php?topic=20608)
Title: Re: AGS 2.71 Final 2 - Politically Correct Edition
Post by: SSH on Thu 15/12/2005 15:14:54
EDIT: I've been noticing that my GUIs are displayed wierdly in the editor. I say GUI is, say, 50x10 pixels with transparent BG in 320x200 res. But the editor draws a 100x20 magenta box for me to place my buttons, etc, in... very hard to position things in! This was pretty much straight after usign the empty template.

Also, I've used a SetRestartPoint() in room 3's before fadein (starting room) and then once in room 2, I do a RestartGame, but it just reinitialises Room 2... I'm still investigating this one. EDIT: Ah, just the old... "The game can't save while a script is running, so SetRestartPoint will actually wait until the first game loop when there isn't a blocking script running in the background. Is this likely to be the issue?" This should be added to the manual entry for SRP, btw... "Only creates a restart point once the game has stopped running scripts"


Just for more info on SnowRain. I tried using it and it didn't work for me. The plugin comes with the Allegro 4.0 DLL. I tried copying in the 4.1 and 4.2 DLLs to the compiled dir to see if that helped, but no such luck. I also tried JUST having newer versions, but that didn't help either. And renaming the 4.2 DLL to 4.0 just breaks things! So much for the DLL idea. Shame that Scorp seems to not be around for a while!

Title: Re: AGS 2.71 Final 2 - Politically Correct Edition
Post by: Pumaman on Thu 15/12/2005 22:53:58
Fair point about the documnetation for SetRestartPoint, I'll do that.

As for the GUI editor, it's deliberately a bigger area than the GUI to allow you to easily move controls around -- but if your GUI background is transparent I can see how this could be confusing.

You can always turn on the border temporarily, then turn it off once your controls are placed.