Author Topic: AGS 2.61 Final now released!  (Read 40836 times)

Pumaman

  • Creator of AGS
  • Administrator
  • Mittens King
  • I sense danger.
    • Lifetime Achievement Award Winner
    • Pumaman worked on one or more games that won an AGS Award!
    •  
    • Pumaman worked on one or more games that was nominated for an AGS Award!
AGS 2.61 Final now released!
« on: 30 May 2004, 19:16 »
It's time for me to present to you the final version of AGS v2.61...

Changes since Pre-Final:
* Fixed lockup which could occur with some nested interactions.
* Fixed Mouse Moves Over Hotspot being broken for hotspot 0 in beta 2.
* Fixed lockup when trying to delete a sprite which was in use.

All changes since v2.60 SP1:
* Added AreThingsOverlapping, DisableGroundLevelAreas, EnableGroundLevelAreas, FileIsError, HasPlayerBeenInRoom, RawDrawImageResized, RawDrawImageTransparent, SaveCursorForLocationChange, SetCharacterFrame, SetGraphicalVariable, SetGUIObjectEnabled, SetInvItemName, SkipUntilCharacterStops script functions.
* Added operators % ! ^ << >> to scripting engine (remainder, Not, XOR, LeftShift, RightShift).
* Added repeatedly_execute_always script event function, which is called every game loop, even when a blocking function is running. Supported in both the global script and room scripts.
* Added character[].z variable, to allow you to make a character levitate into the air whilst still using the baseline, light levels and interactions of its Y co-ordinate.
* Added OLE Automation support to editor, to allow plugins to interact with the editor, add menu options, new panes, and so forth. This includes support for editor-only plugins which are not included with the game at run-time.
* Added plugin API engine functions BlitSpriteRotated, BlitSpriteTranslucent, CanRunScriptFunctionNow, CallGameScriptFunction, DisableSound, GetDirectSound and UnrequestEventHook; events AGSE_SCRIPTDEBUG and AGSE_AUDIODECODE; and new entry point AGS_EngineShutdown.
* Added view preview window to let you quickly test loop animations.
* Added ability to get a view frame's speed and sprite number from GetGameParameter.
* Added game.speech_text_align variable to control the alignment of lucasarts-style speech.
* Added game.auto_use_walkto_points variable to allow you to stop the engine automatically moving the player to walk-to points.
* Added game.inventory_greys_out variable to enable inventory controls to grey out with the rest of the GUI when disabled.
* Added game.skip_speech_specific_key variable, which allows you to set that only one particular key can skip speech (eg '.' in old lucasarts games).
* Added system.viewport_width, system.viewport_height, system.version text script variables.
* Added "Mouse click only" skip speech style, which only allows speech to be skipped with a mouse click, not a key press.
* Added "Change colour depth" option to Game menu, to make it more intuitive than just being on the Palette pane.
* Implemented Match Brace feature in script editor.
* Changed text window background image positioning and clipping such that you can now have transparent edges on the outside of the border graphics whilst using a background image.
* Newly added GUI Buttons are now set to Run Script by default.
* Added ability to set a tiled background image for GUI sliders.
* Enabled sliders to be grabbed by the entire width of the handle, not just the width of the main slider bar.
* Added "Handle offset" option to sliders, to allow you to manually shift the handle across if the graphic doesn't line up properly.
* Added Cancel button to the InputBox (and the Debug Ctrl+X box).
* Editor welcome dialog now displays game folder name before complete path in Recent Games list.
* Stopped autocomplete list popping up when inside strings and comments in the script editor.
* Increased max dialog messages to 3000.
* Increased max speech files from 2000 to 3000.
* Changed the Object Pos display in the Objects pane of the editor to display the lower-left co-ordinate, as used in the game engine, rather than the top-left.
* Renamed "Blank game" to "Default game", and added "Empty game" template (courtesy of AGA) which has no default sprites at all.
* The Dump Text feature now also dumps the script header if "Text scripts" is selected.
* Changed goto-previous to save a nested history of previous topics so that it can be used to retreat up the dialog tree.
* Ambient sound is now restored properly after a PlayVideo.
* Added low disk space check when saving a save game slot.
* Added option to script editor Find dialog to start search from current location, rather than start of script.
* Lucasarts-style speech now abides by the setting of game.close_mouth_end_speech_time.
* Encrypted strings in compiled files, to prevent the player loading the exe into notepad to cheat.
* Mouseover GUI button pics no longer work while in a blocking cutscene.
* While moving a GUI object, the X/Y co-ordinates update dynamically in the properties window.
* When using FOLLOW_EXACTLY, the following character is now drawn in front of the followed character; an extra option to FollowCharacterEx allows you to reverse this behaviour if you wish.
* Editor now remembers the settings of "Lock sprite to current room" and "Remap colours to game palette" between imports.
* Prevent the user restoring a save game if views have been added to the game since it was saved. This prevents later problems with the SetCharacterView and SetObjectView functions.
* Removed close button from Edit Action window in the interaction editor, to fix the problem where a script could get disconnected from its interaction.
* Removed the "Don't automatically lose inventory" option - it's now always on (not having it checked was a debugging nightmare).
* PlayAmbientSound now does not reset the sound if you play an ambient sound that is already playing.
* CyclePalette now supports rotating the colours in both directions.
* FaceCharacter(EGO,EGO) now does nothing rather than facing left.
* Default hotspot names (eg "Hotspot 1") are no longer output in the translation source file.
* Keypresses are now discarded rather than queued if a blocking script is running when you press the key.
* Skipping cutscene will now skip text boxes if No Auto Remove text is set, rather than hanging the game.
* Fixed character walking on the spot at the end of a move occasionally.
* Fixed Talk cursor flashing up briefly before dialog options turn back on during a conversation.
* Fixed MoveToWalkableArea not working if the character was off the screen.
* Fixed QFG4-style speech not working.
* Fixed crash in DisplayTopBar.
* Fixed Sierra-style speech not supporting flipped view frames.
* Fixed lockup which could occur with some nested interactions.
* Fixed bug where characters could get stuck when using Adjust Speed with Scaling.
* Fixed Setup program not working if it was run from the command line.
* Fixed font wierdness and crashing the first time you run a new game made from a template.
* Fixed "Mouse moves over hotspot" running even if the mouse was actually moving over a GUI on top of the hotspot.
* Fixed GUIs sometimes not re-enabling themselves until the mouse moved over them.
* Fixed continuous idle loops not starting immediately after speech finished.
* Fixed character view not always getting set back to normal view after talking but before dialog options are displayed.
* Fixed script compiler allowing local strings to be returned from functions.
* Fixed crash in SetGlobalString if you passed a very long string to it - now truncates to 200 characters instead.
* Fixed translation output including text from deleted GUI buttons and labels.
* Fixed auto-timeout text not working with DisplayTopBar.
* Fixed editor having problems with finding the right script function to edit if you made a mistake with { } placement.
* Fixed character being moved to non-walkable area if you left a room that it was moving in.
* Fixed editor wiping most of the currently loaded room when you loaded a different game in.
* Fixed editor problem editing script functions if the function was called before it was used
* Fixed DisplaySpeech resetting the character's frame to 0 after they finished talking.
* Fixed compile error if a string ended in a backslash.
* Fixed problem with #define if tabs were used rather than spaces.
* Fixed commented out #define statements so that they are properly ignored by the compiler.
* Fixed 100% CPU usage while a text box was displayed.
* Fixed character portrait remaining on screen when the parser-in- dialog was used.
* Fixed digital speech and music files not being used if the current directory was not the game's directory when the game was run.
* Fixed IsKeyPressed not working with shift, ctrl and alt.
* Fixed idle animation not always kicking in straight away after  the character stopped moving.
* Fixed '@' character not being displayed in GUI labels.
* Fixed region tint problem if the amount was set to 50%
* Fixed error message if you set the game to start in room -1.
* Fixed inventory hotspot colours >32000 not working
* Fixed GUI Properties window appearing on the taskbar.
* Fixed GUI button text not being drawn backwards when Backwards Text was enabled.
* Fixed config file "datadir" setting not working with root directories.
* Fixed editor crash if you pressed Alt+F4 while the GUI Properties window was selected.
* Fixed editor crash if you closed the Interaction Editor while the script editor window was open.


What is COM plugin support?

This is a new type of plugin support, which allows the creation of editor-only plugins. These plugins appear as usual in the Plugin Manager, but rather than adding extra features to your game, they can enhance the editor. Therefore, you can use a COM plugin without making your game rely on any external DLL's.

Currently the AGS Editor provides a full implementation of interfaces to allow access to Dialogs, and not a lot else. If people find it useful, however, I can add further interfaces to the rest of the editor.

What are they useful for? Well, it enables plugins such as:
* globalints list
* sounds list
* export dialogs as text
* view dialogs as tree

For more information, see: http://www.adventuregamestudio.co.uk/accomplug.htm

What are these "#sectionstart" things that are littering my script?

The new #sectionstart and #sectionends have been introduced to once and for all fix problems people have been having editing script functions. Basically, if there was a brace missing somewhere, the editor got all confused when parsing the script file and could screw up the script.
This way, it looks a bit messy, but it also means that there should no longer be any problems with editing script functions.

What's a LeftShift/RightShift/XOR operator?

If you don't know, you don't need to know. They're quite advanced operators that most people won't need.

What's a Remainder operator?

The new % operator (also known as Mod) calculates the remainder of a division. Suppose you have a raw time in seconds and you want to display it as Minutes:Seconds. you can do:

int minutes = raw_time / 60;
int seconds = raw_time % 60;

How does the new repeatedly_execute_always work?

You can add the new function to your global script, as follows:

function repeatedly_execute_always() {
}

It will be called once every game loop, just like repeatedly_execute. There are two main differences though:
* repeatedly_execute_always is always called - even when a blocking function is running
* repeatedly_execute_always cannot call blocking functions itself.

If you try to use a blocking (eg. Wait, MoveCharacterBlocking) or delayed-response (eg. NewRoom, RestoreGameSlot) function from within repeatedly_execute_always, the game will exit with an error.

There are several handy uses for this function, and you'll notice that you can also do tricks with it to interrupt blocking functions. If you call StopMoving, for example, then if the main script is currently blocked on MoveCharacterBlocking, it will resume.

http://www.adventuregamestudio.co.uk/ags_261.zip

If no serious bugs are found in the next few days, this will become the official 2.61 and I'll upload it to the website.
« Last Edit: 26 Aug 2005, 00:28 by strazer »

Re: AGS 2.61 Final now released!
« Reply #1 on: 31 May 2004, 11:53 »
Thanks a lot, CJ!

Do bug reports still go in this thread?

I've noticed that releasing a view set by SetCharacterFrame always releases the character to loop 0 (facing down) instead of staying with his last used loop.

Edit:
This only happens when using SetCharacterFrame or AnimateCharacter without changing views.

Using the normal view has the advantage that a character doesn't have to be released from another view first before moving. Therefore the SetCharacterFrame function is ideal for making all characters able to blink without having to call ReleaseCharacterView before every action.

The problem is releasing the frame when the character is idle, as described above.
Since I want it all to happen non-blocking in the background, I have to work around this behaviour by saving character loops in an array and repeatedly updating it.
Doesn't work so well at the moment.

It would be really helpful if at least the SetCharacterFrame function wouldn't change character's loops?

Edit2: Yeah, I'm using something like that as a workaround, just a bit more complicated. :)
But I got it to work correctly now. Thanks!
« Last Edit: 31 May 2004, 19:45 by strazer »

evilspacefart

  • smell... smell...
    • I can help with backgrounds
Re: AGS 2.61 Final now released!
« Reply #2 on: 31 May 2004, 19:09 »
Holy smokes! I'm still trying to get used to 2.6 and Cj released 2.61 final. Sweet.

Pumaman

  • Creator of AGS
  • Administrator
  • Mittens King
  • I sense danger.
    • Lifetime Achievement Award Winner
    • Pumaman worked on one or more games that won an AGS Award!
    •  
    • Pumaman worked on one or more games that was nominated for an AGS Award!
Re: AGS 2.61 Final now released!
« Reply #3 on: 31 May 2004, 19:34 »
strazer: ReleaseCharacterView doesn't touch the loop number. The easiest solution to your problem is to write your own functions - something along the lines of:

int oldLoop;

function MySetCharacterFrame(int charid, int view, int loop, int frame) {
  oldLoop = character[charid].loop;
  SetCharacterFrame(charid,view,loop,frame)
}

function MyReleaseCharacterFrame(int charid) {
  ReleaseCharacterView(charid)
  character[charid].loop = oldLoop;
}

Re: AGS 2.61 Final now released!
« Reply #4 on: 31 May 2004, 20:08 »
Btw, do you have the formula handy for how long text is displayed is on the screen?
Something like

x = StrLen(text) * (80 / game.text_speed);

But that's not it. I can't seem to work it out.
It would keep me from having to check if DisplaySpeeches are still valid or not.

Edit:

Works great, thanks.

So I got the blinking working using seperate views, without storing the old loop. It was just getting too complicated (I'm dealing with multiple independent characters here).
Now of course I waste quite a lot of views by having to create an additional blinking view for each character.

Couldn't you make a SetCharacterFrame- or AnimateCharacter-like function that doesn't physically change the character's loop?
I'm thinking of something along the lines of SetMouseCursor, a function that changes the graphic, but not the mode.
It would make it possible to store the blinking sprites in the normal view without having to deal with changing the loop back.
« Last Edit: 01 Jun 2004, 14:30 by strazer »

Pumaman

  • Creator of AGS
  • Administrator
  • Mittens King
  • I sense danger.
    • Lifetime Achievement Award Winner
    • Pumaman worked on one or more games that won an AGS Award!
    •  
    • Pumaman worked on one or more games that was nominated for an AGS Award!
Re: AGS 2.61 Final now released!
« Reply #5 on: 31 May 2004, 21:47 »
The number of game loops it stays for is:

((StrLen(text) / game.text_speed) + 1) * GetGameSpeed()

Radiant

  • Mittens Knight
  • AGS Baker
  • Return once more to the Two Kingdoms!
    • I can help with publishing
    • I can help with story design
    • Radiant worked on one or more games that won an AGS Award!
    •  
    • Radiant worked on one or more games that was nominated for an AGS Award!
Re: AGS 2.61 Final now released!
« Reply #6 on: 01 Jun 2004, 13:22 »
Go Pumaman! Yay!

ravenfusion

  • Guest
Re: AGS 2.61 Final now released!
« Reply #7 on: 01 Jun 2004, 18:52 »
I've got 2.61 now, and I'm gonna try it on my laptop too. Thanks Pumaman. :D

SSH

  • Flying round the world at the speed of haggis
    • I can help with scripting
    • SSH worked on one or more games that won an AGS Award!
    •  
    • SSH worked on one or more games that was nominated for an AGS Award!
Re: AGS 2.61 Final now released!
« Reply #8 on: 01 Jun 2004, 19:45 »
In 2.61 Prefinal, if you select a bunch of sprites to delete and one of them is used in a view, it comes up with the warning box to tell you. And you hit OK.  And it comes up again. And you hit OK. And it comes up again. And you hit OK. And it comes up again. And you hit OK.  and you wish you saved before doing all this...

Infinite loop! Arrghhh!

Pumaman

  • Creator of AGS
  • Administrator
  • Mittens King
  • I sense danger.
    • Lifetime Achievement Award Winner
    • Pumaman worked on one or more games that won an AGS Award!
    •  
    • Pumaman worked on one or more games that was nominated for an AGS Award!
Re: AGS 2.61 Final now released!
« Reply #9 on: 02 Jun 2004, 22:31 »
Eeek, how has that happened? I'll get it fixed.

Re: AGS 2.61 Final now released!
« Reply #10 on: 04 Jun 2004, 03:43 »
This is probably old, but maybe no one ever stumbled across it.

DisplayAt(x, y, width, message);

Appears to use the width of the text message itself, instead of the width specified :o

Heh.

(You can look at my box thing in Magintz's box puzzle thread to see this in action - the opening message in player enters room after fadein).
« Last Edit: 04 Jun 2004, 18:52 by Relight »

Pumaman

  • Creator of AGS
  • Administrator
  • Mittens King
  • I sense danger.
    • Lifetime Achievement Award Winner
    • Pumaman worked on one or more games that won an AGS Award!
    •  
    • Pumaman worked on one or more games that was nominated for an AGS Award!
Re: AGS 2.61 Final now released!
« Reply #11 on: 04 Jun 2004, 21:01 »
The width you pass is the maximum width of the message box. If the text is shorter than that, the text box will be shrunk accordingly. Perhaps this should be stated more clearly in the documentatino

Pumaman

  • Creator of AGS
  • Administrator
  • Mittens King
  • I sense danger.
    • Lifetime Achievement Award Winner
    • Pumaman worked on one or more games that won an AGS Award!
    •  
    • Pumaman worked on one or more games that was nominated for an AGS Award!
Re: AGS 2.61 Final now released!
« Reply #12 on: 04 Jun 2004, 21:15 »
Ok, I've uploaded a new version with a new build of the editor (2.61.490) which fixes the Delete Sprite lockup that SSH reported, since I can see how annoying it would be.

I don't plan on any further updates to 2.61, and will give it a couple of days before updating the website and announcing it officially.

Re: AGS 2.61 Final now released!
« Reply #13 on: 04 Jun 2004, 22:33 »
Ahhh.... that makes sense. Thanks for the clarification.

jetxl

  • Mittens Viscount
  • No beard...
    • jetxl worked on one or more games that was nominated for an AGS Award!
Re: AGS 2.61 Final now released!
« Reply #14 on: 06 Jun 2004, 14:59 »
Joy! the % thingy bring back java class memories.
That repeat_execute_alwais is verrrrrrrrry handy.

Re: AGS 2.61 Final now released!
« Reply #15 on: 07 Jun 2004, 08:13 »
There seems to be a problem with the "preview this view" function.

If you preview a loop wich has "run next loop after this ..." selected you get a first run with both loops previewed, then it gets stuck on the second one when i think it should restart with the original loop.

bye

Pumaman

  • Creator of AGS
  • Administrator
  • Mittens King
  • I sense danger.
    • Lifetime Achievement Award Winner
    • Pumaman worked on one or more games that won an AGS Award!
    •  
    • Pumaman worked on one or more games that was nominated for an AGS Award!
Re: AGS 2.61 Final now released!
« Reply #16 on: 07 Jun 2004, 21:34 »
Thanks for letting me know, I'll fix it for the next version.

Radiant

  • Mittens Knight
  • AGS Baker
  • Return once more to the Two Kingdoms!
    • I can help with publishing
    • I can help with story design
    • Radiant worked on one or more games that won an AGS Award!
    •  
    • Radiant worked on one or more games that was nominated for an AGS Award!
Re: AGS 2.61 Final now released!
« Reply #17 on: 09 Jun 2004, 14:57 »
Small bug report:

in the view preview, the sprites are aligned by top. In the game, they're aligned by bottom.

if I define a struct thingy { int a, b }; and then define a thingy gizmo, then obviously the variables gizmo.a and gizmo.b are valid. However, checking ' if (gizmo) { do stuff } ' also works; does this actually represent a pointer to gizmo? It should imho be explained in the manual.

Pumaman

  • Creator of AGS
  • Administrator
  • Mittens King
  • I sense danger.
    • Lifetime Achievement Award Winner
    • Pumaman worked on one or more games that won an AGS Award!
    •  
    • Pumaman worked on one or more games that was nominated for an AGS Award!
Re: AGS 2.61 Final now released!
« Reply #18 on: 09 Jun 2004, 21:58 »
I wouldn't say that's a bug, more just the way that the view preview window works. If you think it would look better aligned to the bottom, I can probably change it.

With your second question, yes if you do this:

if (gizmo) {

then you are effectively checking if the pointer to gizmo is non-NULL, which will always evaluate to true (since dynamic memory allocation is not supported).

It's not documented because structs themselves are an unofficial feature and are not in the manual.

Radiant

  • Mittens Knight
  • AGS Baker
  • Return once more to the Two Kingdoms!
    • I can help with publishing
    • I can help with story design
    • Radiant worked on one or more games that won an AGS Award!
    •  
    • Radiant worked on one or more games that was nominated for an AGS Award!
Re: AGS 2.61 Final now released!
« Reply #19 on: 10 Jun 2004, 17:03 »
Okay, but my point was that a view would appear differently in the previewer, than in the game itself. I found out because I had an animation with variable height, that appears perfectly in the game but if you preview it, it jumps around a lot and the character's feet seem to move.

While we're on the subject of trivial details...

* font outline does show on GUIs in the game, but not while in the editor (i.e. if you have a font with auto_outline)

* for character 0, I cannot select view #1 as an Idle view.

* for any GUI, if I set: background color to 9, foreground color to 9, background color to 0, then foreground color to 0, THEN the background color is reset to 16.

* for consistency's sake with C, #0 should be a valid timer

* it appears that GetLocationName doesn't work from within RepExAlways

* putting Display ("") in your repeat_exec causes the game to inexplicably speed up; it's kind of weird