Author Topic: AGS 2.71 *UPDATE* now released!  (Read 25970 times)  Share 

monkey_05_06

  • AGS Project Admins
  • Has left the building.
Re: AGS 2.71 *UPDATE* now released!
« Reply #20 on: 07 Jan 2006, 02:06 »
Hmm...enforcing OO-scripting removes old functions like GUIOn & GUIOff...but enforcing new style strings doesn't remove functions like InputBox (although you can't use it, it is still part of the game...).

I can't even seem to find a #define to declare whether or not new style Strings are enforced (there obviously is one declared internally, I just don't know what it's called), so for the purposes of my example, I'll use the assumed definition: #define STRICT_STRINGS.  Then basically, as far as I can tell, all that would have to be added would be:
#ifndef STRICT_STRINGS
// OLD STRING BUFFER FUNCTIONS
import void SetGlobalString(int stringID, const string newValue);
import void GetGlobalString(int stringID, string buffer);
import void InputBox(const string prompt, string buffer);
import int  GetTranslationName (string buffer);
import int  GetSaveSlotDescription(int slot, string buffer);
import void GetLocationName(int x, int y, string buffer);
import void GetRoomPropertyText(const string property, string buffer);
// string functions
import void StrCat(string main, const string newbit);
import int  StrCaseComp(const string str1, const string str2);
import int  StrComp(const string str1, const string str2);
import void StrCopy(string dest, const string source);
import void StrFormat(string dest, const string format, ...);
import int  StrLen(const string);
import int  StrGetCharAt (const string, int position);
import void StrSetCharAt (string, int position, int newChar);
import void StrToLowerCase (string);
import void StrToUpperCase (string);
import int  StrContains (const string haystack, const string needle);
import void ParseText (const string);
import int  Said (const string text);
import int  SaidUnknownWord (string buffer);
import void GetMessageText (int messageNumber, string buffer);
#define strcmp StrComp
#define strlen StrLen
#define strcpy StrCopy
#define strcat StrCat
#endif

Of course, the check would have to be added in a few other places...but that's the main area where it would be important.
Let's be honest. Most people suck at coding. I suck at coding, but at least my code is readable. To Hell with anyone too lazy to maintain consistent formatting in their code. I could deal with bad interfaces and structure if I could even read your horrible code. And that's putting it nicely. -monkey

Radiant

  • Mittens Knight
  • AGS Baker
  • ...and we are the Dreamers of Dreams.
  • Radiant worked on a game that was nominated for an AGS Award!Radiant worked on a game that won an AGS Award!
Re: AGS 2.71 *UPDATE* now released!
« Reply #21 on: 07 Jan 2006, 10:43 »
Trivial bug: if you open the "animating backgrounds" menu, the room is marked as dirty even if you don't actually save anything. *edit* I mean if you don't change anything.

It would be nice to have a button to copy the additional backgrounds to the clipboard, just like you can copy the main background to the clipboard.
« Last Edit: 07 Jan 2006, 18:43 by Radiant »

Re: AGS 2.71 *UPDATE* now released!
« Reply #22 on: 07 Jan 2006, 16:11 »
monkey: It's AGS_NEW_STRINGS and I don't think it will work since the #ifdef/#ifndef stuff only works at compile time and is not recognized by the autocomplete.

Radiant: http://www.bigbluecup.com/tracker.php?action=detail&id=177
(and check your PMs please)
« Last Edit: 07 Jan 2006, 16:12 by strazer »

monkey_05_06

  • AGS Project Admins
  • Has left the building.
Re: AGS 2.71 *UPDATE* now released!
« Reply #23 on: 07 Jan 2006, 17:09 »
No...I wasn't referring to that.

AGS_NEW_STRINGS simply says that new style strings (Strings) exist, not that they are enforced.

And the #if(n)def stuff does work with autocomplete when it's used internally...for example:

Quote
#ifndef STRICT
// OBSOLETE STUFF
...
EDITED BY CJ to remove huge copy & Paste

#endif

All of these functions only autocomplete if OO-scripting isn't enforced.  The same principle should apply to new style strings being enforced (with old style string functions not autocompleting).
« Last Edit: 07 Jan 2006, 18:06 by Pumaman »
Let's be honest. Most people suck at coding. I suck at coding, but at least my code is readable. To Hell with anyone too lazy to maintain consistent formatting in their code. I could deal with bad interfaces and structure if I could even read your horrible code. And that's putting it nicely. -monkey

Pumaman

  • Creator of AGS
  • Administrator
  • Mittens TRAITOR
  • I sense danger.
    • Lifetime Achievement Award Winner
    •  
Re: AGS 2.71 *UPDATE* now released!
« Reply #24 on: 07 Jan 2006, 18:06 »
Hmm...enforcing OO-scripting removes old functions like GUIOn & GUIOff...but enforcing new style strings doesn't remove functions like InputBox (although you can't use it, it is still part of the game...).

Yes, I never got round to doing that. Thanks for reminding me, I need to remember to do it for the next version.

Radiant

  • Mittens Knight
  • AGS Baker
  • ...and we are the Dreamers of Dreams.
  • Radiant worked on a game that was nominated for an AGS Award!Radiant worked on a game that won an AGS Award!
Re: AGS 2.71 *UPDATE* now released!
« Reply #25 on: 07 Jan 2006, 21:48 »
Radiant: (and check your PMs please)

Ah yes, must have missed that. Regarding the older crash-with-soundplay bug, it seems to no longer occur on the latest full build of AGS. Since it was a heisenbug I can't fully guarantee it, but I've tested it long enough to be 99% certain.


By the way I found this change, not sure if it's intentional... you can no longer quit AGS games by pressing Alt+F4. Since you can quit just about anything else in Windows with those keys, it's pretty much a habit of mine, and it's more convenient than c-a-del.


monkey_05_06

  • AGS Project Admins
  • Has left the building.
Re: AGS 2.71 *UPDATE* now released!
« Reply #26 on: 07 Jan 2006, 22:29 »
Aww Chris...all those obsolete functions were definitely necessary. :P

I guess I didn't realize how long it was.  Glad to hear it will be implemented in the new version.  How long till we see the next beta? :=  Just kidding.  I'll keep an eye out for it.
Let's be honest. Most people suck at coding. I suck at coding, but at least my code is readable. To Hell with anyone too lazy to maintain consistent formatting in their code. I could deal with bad interfaces and structure if I could even read your horrible code. And that's putting it nicely. -monkey

Radiant

  • Mittens Knight
  • AGS Baker
  • ...and we are the Dreamers of Dreams.
  • Radiant worked on a game that was nominated for an AGS Award!Radiant worked on a game that won an AGS Award!
Re: AGS 2.71 *UPDATE* now released!
« Reply #27 on: 09 Jan 2006, 11:35 »
When I put my game in windowed mode, for some reason the songs that are MP3s don't play, but those that are MIDIs do.


The following code has an error (the last line should be "ObjectOff (0)" instead), which triggers at runtime. However, AGS reports the top line (the one with "random (2)" in it) as the line in which the error occurs. The error being an invalid object number, by the way.

[code]
    if (Random (2) == 0) {
      ObjectOn      (0);
      SetObjectView (0, BIRDIE);
      AnimateObject (0, 4, 6, 1);
    } else ObjectOff (1);
[/code]

Re: AGS 2.71 *UPDATE* now released!
« Reply #28 on: 11 Jan 2006, 21:34 »
maybe a little bug:
i made a template from an existing game in 2.71 with music and speech files in the new folders.
if i use this template the music and speech folders are empty and the soundfiles are gone.

if i copy the soundfiles in the standard directory -
i get this messages

---------------------------
AGS Editor
---------------------------
AGS now uses a 'Speech' folder to read your speech files from. This is to help cut down the clutter in your main game folder. Your existing speech files will now be moved.
---------------------------
OK   
---------------------------
---------------------------
AGS Editor
---------------------------
AGS now uses a 'Music' folder to read your music files from. This is to help cut down the clutter in your main game folder. Your existing music files will now be moved.
---------------------------
OK   
---------------------------

and it works fine

Pumaman

  • Creator of AGS
  • Administrator
  • Mittens TRAITOR
  • I sense danger.
    • Lifetime Achievement Award Winner
    •  
Re: AGS 2.71 *UPDATE* now released!
« Reply #29 on: 11 Jan 2006, 22:51 »
By the way I found this change, not sure if it's intentional... you can no longer quit AGS games by pressing Alt+F4. Since you can quit just about anything else in Windows with those keys, it's pretty much a habit of mine, and it's more convenient than c-a-del.

Hmm, that is strange, must be due to upgrading Allegro. I'll look into it.

Quote
When I put my game in windowed mode, for some reason the songs that are MP3s don't play, but those that are MIDIs do.

Really? I can't see any reason why changing from full-screen to windowed would have any effect on the music ... if you switch back to full-screen does it start working again?

Quote
The following code has an error (the last line should be "ObjectOff (0)" instead), which triggers at runtime. However, AGS reports the top line (the one with "random (2)" in it) as the line in which the error occurs. The error being an invalid object number, by the way.

I wonder if this is true of all "else" clauses, I'll look into it.

Quote
i made a template from an existing game in 2.71 with music and speech files in the new folders.
if i use this template the music and speech folders are empty and the soundfiles are gone.

Good point, Music and Speech files will no longer be compiled into the template because of the new folders. I guess I kinda assumed that templates would be simple enough not to include music or speech, but that's a bad assumption to make, so I'll see about getting it fixed.

Radiant

  • Mittens Knight
  • AGS Baker
  • ...and we are the Dreamers of Dreams.
  • Radiant worked on a game that was nominated for an AGS Award!Radiant worked on a game that won an AGS Award!
Re: AGS 2.71 *UPDATE* now released!
« Reply #30 on: 12 Jan 2006, 14:29 »
Quote
When I put my game in windowed mode, for some reason the songs that are MP3s don't play, but those that are MIDIs do.
Really? I can't see any reason why changing from full-screen to windowed would have any effect on the music ... if you switch back to full-screen does it start working again?

Yes.

Iceboty V7000a

  • Local Moderator
  • * KILL* * KILL * * KILL *
    • Lifetime Achievement Award Winner
    •  
Re: AGS 2.71 *UPDATE* now released!
« Reply #31 on: 13 Jan 2006, 01:09 »
I bet it's possibly something with DirectX drivers that somehow the graphics interferred with the audio (and vice versa) for some unknown reasons in some circumstances.

Pumaman

  • Creator of AGS
  • Administrator
  • Mittens TRAITOR
  • I sense danger.
    • Lifetime Achievement Award Winner
    •  
Re: AGS 2.71 *UPDATE* now released!
« Reply #32 on: 14 Jan 2006, 21:55 »
The following code has an error (the last line should be "ObjectOff (0)" instead), which triggers at runtime. However, AGS reports the top line (the one with "random (2)" in it) as the line in which the error occurs. The error being an invalid object number, by the way.

This is because the "else" is on the same line as the "}", so the way that the code gets compiled it only puts the line-number change into the code stream for the "if" and not the "else".

Basically, the fix would be rather cumbersome and I'm not really sure it's worth the effort.

Re: AGS 2.71 *UPDATE* now released!
« Reply #33 on: 14 Jan 2006, 22:46 »
The version 2.71 is a great update (but will there be a final release of the scripting syntax? Features are getting obsolete quicker than some people get accustomed to them) ;)
A question from a newbie: the Snow/Rain plugin (available for download from this site) worked fine with the previous AGS 2.70 release, but refuses to work with the new 2.71 engine. It generates no error messages (except when "Force OO-based scripting" is ticked: then "undefined object XXX" messages begin to appear, but it happened with 2.70 as well), the demo game runs nicely... except that there is no snow or rain. ??? Is it due to the major changes in scripting from 2.70 to 2.71 or it needs the update of the plugin DLLs from the developer? I think other plugins should also be tested  for compatibility, but my question concerns for now this one. Thanks.

Pumaman

  • Creator of AGS
  • Administrator
  • Mittens TRAITOR
  • I sense danger.
    • Lifetime Achievement Award Winner
    •  
Re: AGS 2.71 *UPDATE* now released!
« Reply #34 on: 14 Jan 2006, 22:52 »
Yes, it has already been noted that the Snow/Rain plugin no longer works with 2.71.

We're not sure why, it needs the plugin developer to look into it; unfortunately he's been absent from the forums for a while, but hopefully when he returns he can take a look.

monkey_05_06

  • AGS Project Admins
  • Has left the building.
Re: AGS 2.71 *UPDATE* now released!
« Reply #35 on: 15 Jan 2006, 15:10 »
The version 2.71 is a great update (but will there be a final release of the scripting syntax? Features are getting obsolete quicker than some people get accustomed to them) ;)

AGS is currently in a transitory phase.  Chris is (quite literally) constantly working on it.  I wouldn't be surprized if strazer, m0ds, and AGA have all combined their superpowers to overcome the God of the Onion Rings, chain him to a wall, and force him work on it. :P

Chris is trying to perfect the scripting language, but it's a very extensive language, and it has been one of his goals during the changes to allow as much backwards compatiblity as he can.  Unless you see a new feature that you need, you can always just stick with the version that suits you best.
Let's be honest. Most people suck at coding. I suck at coding, but at least my code is readable. To Hell with anyone too lazy to maintain consistent formatting in their code. I could deal with bad interfaces and structure if I could even read your horrible code. And that's putting it nicely. -monkey

Re: AGS 2.71 *UPDATE* now released!
« Reply #36 on: 16 Jan 2006, 00:01 »
Ah, Chris is not simply a great perfectionist, he seems to be the GREATEST of them all ;D (but a great game deserves a great engine, no doubt about that, and AGS is a small marvel in itself for that purpose :D ) Backward compatibility is a crucial matter, for serious game development takes from months to years, and AGS versions change in course of that time, but what concerns me is: can it be that support of "everything at once" may lead to "bad" scripting style, when chunks of code written with "obsolete" syntax stuff will neighbor "new-fashioned" sections, which may lead to confusion of sorts, and possible runtime errors, especially with a programming rookie like me? (For a good game is impossible without scripting, even with AGS, and intricate scripting at that. I am studying it thoroughly a few weeks already, before attempting to start something wothwhile of my own, otherwise it would be only a waste of time). I mean, PERHAPS it would be better to retain backward compatibility on an "invisible" level, when the engine understands the "obsolete" script when importing a game created with a previous version, and automatically tries to CONVERT the code into new syntax, but no more allows to use the "obsolete" stuff directly when starting from scratch. In any case, that's only an IMHO, Chris doing a tremendous job to satisfy the needs of everyone who gets involved with AGS. And that's quite a number of different people who should be thankful to him as am I among many others :D

Pumaman

  • Creator of AGS
  • Administrator
  • Mittens TRAITOR
  • I sense danger.
    • Lifetime Achievement Award Winner
    •  
Re: AGS 2.71 *UPDATE* now released!
« Reply #37 on: 16 Jan 2006, 19:43 »
Quote
can it be that support of "everything at once" may lead to "bad" scripting style, when chunks of code written with "obsolete" syntax stuff will neighbor "new-fashioned" sections, which may lead to confusion of sorts, and possible runtime errors

That is possible, yes. However, that's simply the price of change and improvement.

You can continue to write script using old-style commands, as they are still supported, so if you were to find a clash of styles a problem then you could simply continue using old-style commands.

Quote
I mean, PERHAPS it would be better to retain backward compatibility on an "invisible" level, when the engine understands the "obsolete" script when importing a game created with a previous version, and automatically tries to CONVERT the code into new syntax, but no more allows to use the "obsolete" stuff directly when starting from scratch.

It would be nice for AGS to automatically convert the script, however this process would be so fraught with possible errors that it's really not a good idea. I'd rather just leave the old commands in, than face the wrath of you guys telling me that upgrading AGS has suddenly broken all your scripts :P

Also, if you are starting a new game from scratch, there is a "Enforce object-based scripting" checkbox on the settings tab which will disable the obsolete commands.