AGS 3.1.0 Final - World's Heaviest Bridegroom Edition

Started by Pumaman, Sat 05/07/2008 23:21:19

Previous topic - Next topic

Pumaman

So the world's heaviest man has got married, after being wheeled to the wedding on the bed that he can't get out of. If we all continue making games, one day we can hope to emulate his success.

Changes in 3.1 Final:
* Fixed problem where if you closed a window and chose not to save changes, when you opened the window again the changes were still there
* Fixed script changes being lost if you opened a room script, made some changes, didn't save them, then opened the room itself, then created an event handler
* Fixed PlayVideo restarting the music after the video finished, even if it was set to play game music
* Fixed the debug console being drawn behind characters and objects
* Fixed changes to blink interval not always being applied immediately
* Fixed crash in Character.Say if the character's talking view had been set to an invalid view number
* Fixed duplicate entries in autocomplete if you set an enum value to equal another enum value
* Fixed potential issue compiling game after you opened and then cancelled the New Room dialog


Changes in 3.1 RC 2:
* Added Preferences option for whether the help window should be kept on top of the editor window or not
* Added Character.SpeakingFrame property to enable script to access the state of the Sierra-style speech animation
* Incorporated Tip of the Day suggestions
* Output window is now cleared when a new compile starts
* RunAGSGame now shows an error if you try and use it while running with the debugger, since it doesn't work in this situation
* Fixed Characters pane chopping off bottom of view preview when run at 120 DPI
* Fixed ListBox.RowCount always returning 0 until the GUI had been drawn for the first time
* Fixed hotspots/walkable areas screwing up if a new background was imported with the same size but different resolution to the old one

Changes in 3.1 RC 1:
* Room objects editor now draws alpha-channel sprites correctly
* Added separate Replace menu option to go straight to the Replace dialog
* Added recent searches list and Case Sensitive option to the Find dialog
* Added Tip of the Day area to the Start Page
* Updated Start Page to reflect AGS 3.1 changes
* Updated to v1.7.2 of Verb Coin template (thanks Electroshokker!)
* Editor now gives error if speech file number > 9999 rather than leading to in-game File Not Found errors
* Replaced references to "contact CJ" in error messages with "post on AGS Forums"
* Re-worded loopcheck error to mention checking the call stack to find the problem
* Fixed some music skipping problems when using ShakeScreen and during room transitions
* Fixed crash restoring save game if there was an active dynamic drawing surface created by CreateCopy
* Fixed sound numbers over 999 not playing
* Fixed Mouse.DisableMode crashing if cursor mode 4 (UseInv) was set as a Standard Mode
* Fixed Help window sometimes not allowing you to switch back to the editor easily.
* Fixed editor crash if you tried to run two copies of it simultaneously
* Fixed autocomplete treating "else" as a variable declaration
* Fixed Display() not working if the game had no GUIs

Changes in 3.1 beta 9:
* Added support for custom dialog options rendering
* Improved autocomplete to work better when adding code to existing functions
* Rewrote debugger to use a different method of communicating with the engine (Named Pipes instead of Files) which should hopefully resolve some stability issues some people have been having with it
* GUI Text Box now allows the user to type in extended chars like éíñ when the textbox is using a TTF font
* Output window is now automatically hidden when the call stack window is shown
* Fixed call stack window to be docked under the script pane rather than being drawn on top of it
* Moved Dialog functions into separate section of help file
* Fixed D3D driver smoothing all sprites, not just scaled ones, when "Smooth scaled sprites" was selected
* Fixed black outlines of walk-behind areas when using D3D anti-aliased filter
* Fixed sprite import colours messing up if there were index-0 pixels on the image but index 0 was not being imported as the transparent colour
* Fixed potential crash in D3D driver when drawing room objects

Changes in 3.1 beta 8:
* Added graphics filters when using D3D driver; this allows low-res games to be played reasonably in a window using the D3D driver
* Added 4x Nearest Neighbour filter to allow 320x200 games to easily be run on widescreen monitors at 1280x800
* Editor now shows script call stack when you break in the debugger / when an error occurs
* Improved import of 2.72 games to ensure that unhandled_event is called with Use Inventory interactions
* Changed error message when unable to initialise graphics mode to say the real resolution rather than game resolution when using a graphics filter
* Fixed object baselines messing up if you had a high-res game but not using native co-ordinates
* Fixed D3D causing stretched pixels if it ran a 320x200 game at 640x400
* Fixed error starting up editor if you closed it while minimized
* Fixed default and empty game templates having plugin references in beta 7

Changes in 3.1 beta 7:
* Added String.Replace, String.StartsWith, String.EndsWith, TextBox.TextColor, Parser.FindWordID
* Added new file format for exported characters to enable characters with more than 20 frames in a loop or 16 loops in a view to be exported; this also fixes some character settings not being preserved in the old file format.
* Removed obsolete InventoryScreen usage from the Default & Empty Game templates
* Changed Default and Empty Game templates to 16-bit colour by default
* Fixed Mask Import From File rejecting some valid masks, and stretching others
* Fixed translations not working on script lines that had embedded speech marks or backslashes

Changes in 3.1 beta 6:
* Added Character.HasInventory function as a simpler, more user-friendly alternative to InventoryQuantity
* DrawingSurface.UseHighResCoordinates is now initially defaulted to the game's Native Co-ordinates setting
* Fixed editor not showing hotspot walk-to points correctly
* Fixed editor creating GUI controls in the wrong place
* Fixed GUI.Y property rejecting valid Y co-ordinates with native co-ordinates
* Fixed solid characters and objects not blocking on right side of screen with native coordinates
* Fixed another possible cause of debugger errors
* Fixed dialog options text window edges with transparent parts not drawing correctly with D3D driver
* Fixed error trying to save a game to a network share
* Fixed GUI editor to not draw the background colour outside the actual GUI size

Changes in 3.1 beta 5:
* Added Dialog.ID, Slider.HandleGraphic, Slider.HandleOffset, Slider.BackgroundGraphic properties
* Added new GUI Visibility option to have a normal GUI but initially switched off.
* Added ability to set initial GUI Transparency in the editor.
* Added Preferences option to allow you to do Exact Palette background imports in 8-bit games, like you could in AGS 2.x
* Added option for AGS Editor to pop up a message every X days reminding you to back up your game
* Changed winsetup so that it doesn't pop up the Administrator prompt on Vista.
* Removed room height limit of 1400 pixels.
* When clicking the "..." button to go to an event script, AGS will now zoom to the line after the { rather than the "function" line itself
* Formally obsoleted the InventoryScreen command, since it didn't work with D3D driver anyway. It will no longer compile if Enforce Object-based Scripting is enabled.

Changes in 3.1 beta 4:
* Fixed the following problems when using hi-res co-ordinates:
*- GetRegionAt (and thus region events);
*- Character.PlaceOnWalkableArea (and thus Ctrl+W debug key);
*- Character.WalkStraight (and thus arrow keys);
*- Ctrl+A debug option to see walkable areas
*- dialog options text window GUI being half width
*- drawing room areas in editor when a low-res room was in a hi-res game
* Fixed GUI Inv Window ItemWidth/ItemHeight not being doubled up when importing pre-3.1 game
* Fixed problem with Mouse.SaveCursorUntilItLeaves if the original mode was now disabled when it tried to restore it
* Yet another fix to try and sort out debugger crashing on some PC's

Changes in 3.1 beta 3a:
* Fixed problem with GetLocationName/GetLocationType in backwards compatible co-ordinates mode
* Fixed problem with GUI sizes when using the 3.1 engine to run a pre-3.1 EXE.
* Fixed autocomplete popping up when it shouldn't do if you pressed space after typing a member property/function

Changes in 3.1 beta 3:

* Added 1024x768 resolution support.
* Added pop-up calltip when hovering the mouse over a function/property in the script.
* When the engine aborts with an error, the editor will now automatically zoom to the line in the script where the error occurred
* Finished adding calltip help texts for built-in script commands.
* "Copy co-ordinates to clipboard" option now automatically adjusts them for scripting if Use Low Res Coordinates is enabled
* Added manual page "Upgrading to AGS 3.1" explaining hi-res coordinates
* Added support for /// help text with struct properties
* Added Character.HasExplicitTint property
* Added editor plugin API IScriptEditorControl methods: SelectionStart, SelectionEnd, SelectedText, CursorPosition, GetLineNumberForPosition, GetTextForLine, GetTypeNameAtCursor
* Added warning message when you use the Import New Background option in a room, to help newbies who are using it by accident instead of the Change button.
* Added warning when you change the game resolution setting because of the impact of co-ordinates changing
* Room right-click "Edit this room" option is now always available, even for the currnetly loaded room
* Changed New Game and Empty Game templates to enable hi-res coordinates by default
* Fixed issue with StopMoving and PlaceOnWalkableArea when using native hi-res co-ordinates
* Fixed screenshot capture not working properly when D3D driver running a 320x200 game at 640x400

Changes in 3.1 beta 2a:
* Fixed 320x240/640x480 games being initialized at wrong resolution
* Fixed a 320x200/320x240 text display problem

Changes in 3.1 beta 2:
* Added option to use native hi-res co-ordinates.
* D3D driver now automatically tries 640x400 if your monitor doesn't support 320x200, like the DX5 driver already did
* Removed Setup option to use the "wrong" resolution.
* Added Game.UseNativeCoordinates property.
* Added some more calltip help texts.
* Added feature for editor to send anonymous system information to AGS website (see manual page "Anonymous usage information" for info)
* Maybe fixed an issue where the calltip got a box character on the end when help text was present.
* Fixed beta 1 bug where characters sometimes wouldn't move.

Changes in beta 1:

* Added option to continue running game loops while dialog options are displayed
* Added "Go to sprite" context menu option to script editor when right-clicking on a number
* Added Game.ChangeTranslation and Character.Move script functions.
* Added support for calltip help text if you put a comment starting with /// on the line before the import declaration. I've added this text for the String, DrawingSurface, Character and Game methods, and would appreciate your feedback as to whether it's useful enough to bother going through and doing it for the rest of the script commands.
* Moved the inventory hotspot marker settings from the inventory panes to the General Settings area since it makes more sense there and should reduce confusion
* Editor now prompts you if you modify a script file in an external application while it is open in the editor
* Removed 30 character limit on hotspot descriptions
* On Windows XP and earlier, AGS will now create a "My Saved Games" folder in My Documents and then create individual game folders underneath, to avoid clutter
* Renamed String.Contains to String.IndexOf to reduce confusion with other languages such as Java and C#. String.Contains will continue to work as well for the foreseeable future
* Fixed alpha-transparent dynamic sprites losing their alpha channel when you restored a save game
* Fixed object image not being refreshed properly if it had a dynamic sprite which you deleted at the same time as making the object invisible

THIS IS A BETA VERSION. USE AT YOUR OWN RISK. ALWAYS KEEP A BACKUP COPY OF YOUR GAME BEFORE TRYING A BETA VERSION

Download here:
http://www.adventuregamestudio.co.uk/AGS-3.1-Final.exe

GarageGothic

Quote from: Pumaman on Sat 05/07/2008 23:21:19* Added option to continue running game loops while dialog options are displayed
* Added "Go to sprite" context menu option to script editor when right-clicking on a number
* Added Game.ChangeTranslation and Character.Move script functions.

All excellent features. ChangeTranslation should be particularly helpful so user don't have to mess with winsetup.exe.

Quote* Added support for calltip help text if you put a comment starting with /// on the line before the import declaration. I've added this text for the String, DrawingSurface, Character and Game methods, and would appreciate your feedback as to whether it's useful enough to bother going through and doing it for the rest of the script commands.

Have to try it in action before I can comment, but it sounds like a useful feature.

Quote* Removed 30 character limit on hotspot descriptions

Awesome, I ran into that limit recently.

Quote* Renamed String.Contains to String.IndexOf to reduce confusion with other languages such as Java and C#. String.Contains will continue to work as well for the foreseeable future

I understand your reasoning, but I must admit that I will continue to use String.Contains. It seems a much more natural name for the function and is instantly recognizable.

Quote* Fixed object image not being refreshed properly if it had a dynamic sprite which you deleted at the same time as making the object invisible

Thanks! That must be the quickest fix ever!  :D

Lt. Smash

#2
Quote from: Pumaman on Sat 05/07/2008 23:21:19
* Added support for calltip help text if you put a comment starting with /// on the line before the import declaration. I've added this text for the String, DrawingSurface, Character and Game methods, and would appreciate your feedback as to whether it's useful enough to bother going through and doing it for the rest of the script commands.
This is a very nice and useable feature. But it would be even better if you seperate the text from the fill-in advice or at least highlight it. Look for example at the freeware java eclipse platform.
Some other things that would be nice for the script-editor:
- Ability to drag and drop selected code.
- If the autocomplete dialog opens for enums etc. don't close the calltip dialog.
- If the cursor stands after a '}' and I hit enter, the '}' shouldn't move back one tab.
- Ability to write: surface.DrawingColor=RGB(12,33,234);(if this is possible?) instead of using the colours tab and searching for a color number.
- Ability to wheter choose if the editor should automatically close curly braces.
so if the player writes { and hits enter, two new lines will be added. One empty with the active cursor in it and one after with a closed bracket.

The other improvements are very helpful and I hope that some more of the AGS wishlist (like ability to change hs und obj descriptions via code) will be added.

TwinMoon

Quote from: Pumaman on Sat 05/07/2008 23:21:19* Added option to continue running game loops while dialog options are displayed

Wow. Great stuff, Chris!

Dave Gilbert

Hallo all!  I'm having a little issue with my switching characters code.  The last version of AGS I was using was 3.01, and this code worked fine.  Now that I've upgraded to the 3.03 beta, it's acting a little funny.

You start the game as the character "Rosa", and it works fine.  But when you switch to Joey, he doesn't move at all.  He turns and faces the correct direction, but he doesn't walk to the spot you clicked on.  If you switch back to Rosa she walks normally.

Does anyone know why such a thing would happen? I've posted the code below, which worked just fine in 3.01 if anyone really wants to take a look at it.

Thanks!

Quote
function CharSwitch()
{
  Character *otherchar;
  Character *curchar; 

  int newvp=1;
  int oldvp;
  if (player.ID == ROSA)
  {
    curchar = cRosa;
    otherchar = cJoey;
   }
   else
   {
     curchar = cJoey;
     otherchar = cRosa;
   }
     curchar.StopMoving();
      otherchar.StopMoving();
   
    if (otherchar.x > curchar.x)
    {
   
      while (GetViewportX() < otherchar.x-160  && newvp != oldvp)
         {
           oldvp = GetViewportX();
            SetViewport(GetViewportX() +6,  GetViewportY() );
            newvp = GetViewportX();
            Wait(1);
            ReleaseViewport();
            
         }
    }

    if (otherchar.x < curchar.x)
    {

      while (GetViewportX() > otherchar.x-160  && newvp != oldvp)
         {
           oldvp = GetViewportX();
            SetViewport(GetViewportX() -6,  GetViewportY() );
            newvp = GetViewportX();
            Wait(1);
            ReleaseViewport();

         }
    }

   
   
if (GetGlobalInt(25)==0)
{
  if (player.ID==ROSA)
  {
    Mouse.ChangeModeView(eModeWait, 49);
         mouse.ChangeModeGraphic(mouse.Mode, 619);   
      cJoey.SetAsPlayer();
    cRosa.StopMoving();
    cJoey.StopMoving();
      cJoey.FollowCharacter(null);
      cJoey.Clickable = false;
      cRosa.Clickable=true;
      btn_notes.Enabled=false;
      btn_change_joey.NormalGraphic=26;
      btn_change_rosa.NormalGraphic=49;

      if (GetGlobalInt(70)==0)
      {
        Wait(10);
         Multi.SRespond("turswitch>>>>");
         int x=Multi.response; 
         if (x==1)
            MyDisplay("TUTORIAL: [[Excellent! We're now controlling Joey.[[(You can also switch characters by pressing the \"TAB\" key on your keyboard))[[Let's see if Joey has better luck with the door.  LEFT-CLICK on the door to make Joey interact with it.");
            SetGlobalInt(73, 1);
      }
      
   }
   else
   {
      Mouse.ChangeModeView(eModeWait, 48);
         mouse.ChangeModeGraphic(mouse.Mode, 259);      
       cRosa.SetAsPlayer();
      cRosa.StopMoving();
     cJoey.StopMoving();
      cRosa.Clickable=false;
      cJoey.Clickable=true;
      gMaingui.Transparency=0;
      btn_notes.Enabled=true;
      btn_change_joey.NormalGraphic=25;
      btn_change_rosa.NormalGraphic=50;
      
      if (cRosa.InventoryQuantity[ipaperclip.ID] >0 && GetGlobalInt(70)==0)
      {
         Multi.SRespond("tutrosainv1>>>>");
         int x=Multi.response; 
         if (x==1)
            {
               Wait(10);             
               MyDisplay("TUTORIAL[[You're now controlling Rosangela again, even if you can't see her.");
              MyDisplay("TUTORIAL[[Since the main interface is open, we can see her inventory, and look! There's the paperclip!  Now let's try using it on that door.");
              MyDisplay("TUTORIAL[[To open the door, LEFT-CLICK the paperclip.  Then, move the cursor to the door and LEFT-CLICK again.");

            }
            
      }
      
   }
}   
}

Pumaman

3.0.3 is a beta so it's possible that there may be problems, in particular the character movement code was changed to support the new Character.Move command.

Would it be possible to upload something that would demonstrate the problem?

Also, I'll merge this into the 3.0.3 beta thread.

Dave Gilbert

Thanks CJ!  I'm uploading a one-room example of the problem.  You hit the tab button to switch between the characters.  You start off as Rosa and she can walk around the room.  If you switch over to Joey, he won't walk but he'll turn in the correct direction.

Link:
http://www.davelgil.com/boe/conv/conv_switch_chars.zip

GarageGothic

Quote from: Lt. Smash on Sun 06/07/2008 11:54:25- Ability to write: surface.DrawingColor=RGB(12,33,234);(if this is possible?) instead of using the colours tab and searching for a color number.

You could try:
Code: ags
surface.DrawingColor = Game.GetColorFromRGB(12,33,234);

Lt. Smash

Quote from: GarageGothic on Sun 06/07/2008 16:26:30
Quote from: Lt. Smash on Sun 06/07/2008 11:54:25- Ability to write: surface.DrawingColor=RGB(12,33,234);(if this is possible?) instead of using the colours tab and searching for a color number.

You could try:
Code: ags
surface.DrawingColor = Game.GetColorFromRGB(12,33,234);

Oh. Ok, then this is already implemented.

Pumaman

Quote- Ability to drag and drop selected code.

It should work within the same window, but it seems that it only works once you've started editing the code -- if you just open the window and try to drag it won't work. I'll look into that.

Quote- If the autocomplete dialog opens for enums etc. don't close the calltip dialog.

This seems to be a limitation of the text editor component that AGS uses, I don't know if I can change this.

Quote- If the cursor stands after a '}' and I hit enter, the '}' shouldn't move back one tab.

Yeah I've been meaning to change the way this works, it's not very user-friendly.

Quote- Ability to wheter choose if the editor should automatically close curly braces.
so if the player writes { and hits enter, two new lines will be added. One empty with the active cursor in it and one after with a closed bracket.

That's a possibility for a future version.

QuoteThanks CJ!  I'm uploading a one-room example of the problem.  You hit the tab button to switch between the characters.  You start off as Rosa and she can walk around the room.  If you switch over to Joey, he won't walk but he'll turn in the correct direction.

Thanks, I've investigated this and confirmed it as a bug in beta 1. I'll get it fixed for beta 2.

Lt. Smash

when you go and add this calltips for other functions, it would be nice if you add them also for variables like player.x = Sets the current players x feet position.

Dave Gilbert

Quote

Quote
Thanks CJ!  I'm uploading a one-room example of the problem.  You hit the tab button to switch between the characters.  You start off as Rosa and she can walk around the room.  If you switch over to Joey, he won't walk but he'll turn in the correct direction.

Thanks, I've investigated this and confirmed it as a bug in beta 1. I'll get it fixed for beta 2.

Great!  Cheers, CJ.

freshpaint

How do you call the new dialog feature?

Shane 'ProgZmax' Stevens

Yay, non-block dialogs at last.  You are the man!

monkey0506

Quote from: Pumaman on Sat 05/07/2008 23:21:19* Added support for calltip help text if you put a comment starting with /// on the line before the import declaration. I've added this text for the String, DrawingSurface, Character and Game methods, and would appreciate your feedback as to whether it's useful enough to bother going through and doing it for the rest of the script commands.

Wasn't sure what this was meant to do till I saw it in action. This could be quite useful especially in helping new users. They'll still have to look up functions in the manual for the full description obviously, but the calltip prompt will help them remember without having to reference the full entry each time.

However on this system at the end of the line between the function parameters and the help text, I see a null-character box (the square character used by some fonts to represent null/non-displayable characters). Just a quirk in my system perhaps?

subspark

Quote* Added option to continue running game loops while dialog options are displayed

Nice work Chris! I believe I was the first one to complain about this limitation. Nice to see it fixed at last!
As for the other features...Bravo, Bravo! :D

Cheers,
Paul.

Pumaman

QuoteHow do you call the new dialog feature?

There's a new option in General Settings in the Dialog section called "Run game loops while dialog options are displayed".

QuoteHowever on this system at the end of the line between the function parameters and the help text, I see a null-character box (the square character used by some fonts to represent null/non-displayable characters). Just a quirk in my system perhaps?

Hmm strange -- I've made a change to the new beta, so let me know if it fixes this.


Anyway, beta 2 is now up. It contains significant changes to support native hi-res co-ordinates, so as a result I've now rebranded this as the 3.1 release.

Hi-res coordinates

Hi-res co-ordinates are accessed by the new option "Use low-res co-ordinates in script" in the Scripting section of General Settings.
By default, they will be disabled for backwards compatibility with current scripts.

In the editor, all co-ordinates will now always be shown at the native resolution. However, the above option will determine whether the scripts see them as low-res or hi-res.

If your game is 320x200 or 320x240 this change should make no difference.
If your game is at a higher resolution you will notice all the co-ordinates in the ediotr have doubled.

Because of the significant changes to support this, I expect that there will be problems. So please give it a go and let me know.

Sorry I'm a bit rushed here, I want to explain better but that will have to wait for tomorrow.

subspark

YIPEEEE! FINALLY HI-RES COORDS!! YOU DA MAN CJ!
I'd buy you a CrispyCream dougnut if I had the money to ship it to you!
Rock on dude! :=

Sparx.

Shane 'ProgZmax' Stevens

QuoteD3D driver now automatically tries 640x400 if your monitor doesn't support 320x200, like the DX5 driver already did

It's funny how something simple like this could be so useful.  I was wondering if this had been suggested since I recently switched video drivers and they no longer allow me to view 320x200 resolutions, so this is great!

monkey0506

The calltip-box issue has been resolved. And official high-res coordinates? That's been one of the longest outstanding issues I've seen. Sure there might be a few bugs to work out, but hopefully nothing serious will arise. This is one of the most exciting updates this year.

It would be amazing if the calltip help tool could be implemented for properties as well as functions. That would certainly be a huge undertaking adding all those comments, but I think for a new user it could be an invaluable tool in learning AGS.

GarageGothic

Hi-res coordinates? Oh bollocks, I foresee months of revising my scripts. Awesome feature nonetheless, should make for some smooooooth scrolling.

Dave Gilbert

woo.  you are the man.  checking this out now.

Shane 'ProgZmax' Stevens

#22
I get a 'cannot set video mode 320x240' error when trying to set my game to run fullscreen no matter which filters I use (2x, etc).  This happens in directdraw and d3d mode :(.  Also, my game resolution is now distorted to something larger than 320x240 (looks like an additional 60 pixel vertical area) and fonts no longer seem to scale down :(.



The text used to fit nicely in that bottom purple bar, and you'll notice the window is quite larger than it should be (you can actually see the color difference in the black where the proper screen size ends).

TheMagician

Quote from: PumamanRemoved Setup option to use the "wrong" resolution.

I'm creating a 320x240 game at the moment. Also I (and I guess many other players) use a TFT flatscreen display.

I always deliberately checked the "wrong" 640x480 mode in winsetup.exe because
a) when running the compiled game in fullscreen mode it looks crisper and sharper than the 320x240 mode
b) when testing and debugging the game I have a bigger window

Also I never had any issues with this "incorrect" setting.

Are these possibilities gone now or are there new ways to acchive these effects?

Lt. Smash

#24
I suggest to add this onto the implementing-list:

- Option to choose simple or advanced dialog creation.
     Simple: As it is.
     Advanced: You can use normal code:
In the dialog editor you set the options with attributes for Optiontext and textcolor. Show and Say aren't needed.
When you add a new option, the code editor adds:
Code: ags

if (DialogOption[NR].Clicked == true)
{
  
  Dialog.ShowOptions();
}


In the end it could look like:
Code: ags

Dialog.Start();
if (DialogOption[0].Clicked == true)
{
  player.Walk(12,12);
  player.Say("Txt");
  cPlayer2.Say("Txt2");
  DialogOption[0].SetState(eOptionOffForever);
  DialogOption[1].SetState(eOptionOn);
  Dialog.ShowOptions();
}
else if (DialogOption[1].Clicked == true)
{
  player.Animate(xxx);
  player.Say("txt")
  cPlayer2.Say("Txt2");
  Dialog.ShowOptions();
}


This is just a recommondation of how this could be implemented.
and I don't see why there is this simple dialog editor while there is no interaction editor.

Pumaman

QuoteIt would be amazing if the calltip help tool could be implemented for properties as well as functions. That would certainly be a huge undertaking adding all those comments, but I think for a new user it could be an invaluable tool in learning AGS.

I'd like to do this but there's no obvious point at which to pop up the calltip, whereas with functions you have typing the ( to do so. But what I might do it add something so if you hold the mouse over a variable it pops up the help text.

QuoteI get a 'cannot set video mode 320x240' error when trying to set my game to run fullscreen no matter which filters I use

Heh thanks, as usual I manage to not test the thing that I've broken -- 320x240 and 640x480 games were being initialized at the wrong resolution.
I've uploaded beta 2a with a fix. It should hopefully fix the text thing too, though I wasn't able to replicate it. If you still get the text problem with beta 2a would you be able to upload something that demonstrates it?

QuoteI always deliberately checked the "wrong" 640x480 mode in winsetup.exe because
a) when running the compiled game in fullscreen mode it looks crisper and sharper than the 320x240 mode
b) when testing and debugging the game I have a bigger window

In DX5 mode you have the graphics filters that provide a similar thing -- just select the 2x Nearest Neighbour filter and the game will run at 640x480.
The D3D driver will now do the same if it can't initialize 320x240 full screen.

The option had to be removed to support native hi-res co-ordinates; allowing people to run a 640x480 game at 320x240 as you could in previous versions would cause significant problems.

QuoteOption to choose simple or advanced dialog creation.

What you've described can already be done using the Dialog.DisplayOptions command.

QuoteI suggest to add the three main biggest features onto the implementing-list:
QuoteAny chance of finally implenting anti-alias fonts capability for dialog/speech for us high-resolution designers?

Please don't post feature requests in this thread -- there's the Wishlist thread for that instead. I'm trying to keep this thread clean for feedback on the beta.


Anyway, as I say I've uploaded beta 2a to fix the 320x240/640x480 display issues. Please let me know how you get on with this.

Shane 'ProgZmax' Stevens

#26
The resolution fix worked but the fonts still don't scale.  I think the problem is that now that you've removed the option in setup to manually set the resolution, I can't make the hi res fonts scale down by setting my game to 640x480 (filters don't have any effect on font scaling).  What you've done is actually correct, and people like me have been using a loophole to get smaller fonts than should be available at low resolutions, so I'm not really sure if it's even worth allowing.  It's certainly nice to be able to have really tiny readable fonts in a 320x240 game, but unless you can implement some way for the filter selection to allow the 'fonts designed for 640x480' rule (possibly by actually switching to that resolution?) I'll just have to find smaller fonts that actually have good visibility in low res.

Here's a visual example using 3.0 vs 3.1.0 beta 2a:







Same font, same point size, the only difference is before I could manually set the resolution to 640x480 to allow hi res font scaling and now I use the 2x filter.  Would it be possible to add some kind of engine setting to allow font scaling regardless?  Either that or some engine setting to allow the developer to pick the output resolution would work!

subspark

I agree. my fonts are whacked too.
great work on the UFO edition. that was a super fast release.

Cheers,
Paul.

Pumaman

Quote from: ProgZmax on Fri 11/07/2008 21:47:05
The resolution fix worked but the fonts still don't scale.  I think the problem is that now that you've removed the option in setup to manually set the resolution, I can't make the hi res fonts scale down by setting my game to 640x480 (filters don't have any effect on font scaling).  What you've done is actually correct, and people like me have been using a loophole to get smaller fonts than should be available at low resolutions, so I'm not really sure if it's even worth allowing.

Hmm, so have you been setting the "Fonts designed for 640x480" option to True, but your game is actually 320x240 ... and then you have changed the resolution in Setup to run it at 640x480? Therefore by running the game at its native resolution the fonts are too big?

If that's the case, then with previous versions surely if the user went into Setup and changed the resolution to 320x240 they'd get the same problem?

I could look into it automatically scaling down the fonts in this situation, but they would probably look quite rubbish if it did that.

Shane 'ProgZmax' Stevens

QuoteIf that's the case, then with previous versions surely if the user went into Setup and changed the resolution to 320x240 they'd get the same problem?

I could look into it automatically scaling down the fonts in this situation, but they would probably look quite rubbish if it did that.

Yes, that's why I think it would be nice if it was an in-engine setting (like a setting below resolution that would let you specify output resolution).  That way if you wanted scaled fonts in a low res game everyone would benefit, and with most video cards these days not even supporting low resolutions most people play the games scaled up to 640x400/480, anyway :).  Some kind of internal, optional setting would definitely be good, since I know a few people who have been using fonts in this way, Dave Gilbert's games included.

AGA

deltamatrix: requests don't go here. I moved your post to the right place.

Pumaman

Thanks, AGA.

QuoteYes, that's why I think it would be nice if it was an in-engine setting (like a setting below resolution that would let you specify output resolution).  That way if you wanted scaled fonts in a low res game everyone would benefit, and with most video cards these days not even supporting low resolutions most people play the games scaled up to 640x400/480, anyway .  Some kind of internal, optional setting would definitely be good, since I know a few people who have been using fonts in this way, Dave Gilbert's games included.

The problem is that this just isn't possible any more. Internally, the game is running at 320x240 and it's only at the very end of the game cycle that the result gets stretched by the filter to 640x480.

The old option that allowed this could do so because the co-ordinate system was always at 320x200-resolution. But now, if your game was to run at 640x480 the support for hi-res co-ordinates means that the engine would now expect everything to be at that resolution, which it wouldn't be in your 320x240 game.

Therefore, it's not really possible to support both hi-res co-ordinates and this font 'feature' that you're using. Of course anything is possible but I'm not sure that the amount of work it would require to implement would be worth the hassle.

Therefore, I think the only thing I can do is say that if you need this font hack then stick with 3.0.2 for now. I'm a bit concerned at how widespread it might be though, since Subspark says he's using it too, and you say Dave Gilbert's games are as well. Unfortunately it's not something I was aware of before embarking on this change.


Anyway, beta 3 is now up which adds and fixes some stuff, including 1024x768 support. Let me know if there are any problems.

TheMagician

Quote from: PumamanIn DX5 mode you have the graphics filters that provide a similar thing -- just select the 2x Nearest Neighbour filter and the game will run at 640x480.
The D3D driver will now do the same if it can't initialize 320x240 full screen.

Ok, I tested this briefly and the DX5 mode with 2x Nearest Neighbour filter works well.
However, I also used the D3D driver and was surprised that it's output quality is worse (pixels being distorted). Aren't they supposed to give the same result, as you said?

Here is a comparison of the two modes.
The screenshots are taken from a 320x240 game which runs in fullscreen mode:


Shane 'ProgZmax' Stevens

QuoteTherefore, I think the only thing I can do is say that if you need this font hack then stick with 3.0.2 for now. I'm a bit concerned at how widespread it might be though, since Subspark says he's using it too, and you say Dave Gilbert's games are as well. Unfortunately it's not something I was aware of before embarking on this change.

No problem.  Like I said, I always knew it was a loophole in the editor and wasn't ever really a feature as such.  I'll just have to start using small bitmap fonts, since there's no way I'm not going to take advantage of future improvements :).

monkey0506

#34
I know this isn't really the place for suggestions per se, but with the recent changes to the dialog system I've become aware that the Dialog structure doesn't have an ID member. Technically I guess this could be worked around using something like this:

Code: ags
int GetID(this Dialog*) {
  int i = 0;
  while (i < Game.DialogCount) {
    if (this == dialog[i]) return i;
    i++;
  }
}


But it would be simpler if I could just use:

Code: ags
dialog[i].ID


Also, I've mentioned it before but if there are NO dialogs in the game, the dialog array isn't defined at all. Clearly this saves space, but there is absolutely no way for the user to know from within the script whether this is the case...could perhaps a macro be defined?

Another thing that comes to mind is something brought up by skuttleman's KADS: the return and stop dialog-script commands. How exactly are these handled if using Dialog.DisplayOptions? Would it be possible to intercept these commands without actually having to replace them with a run-script?

Sorry if this is too suggestive (;)) for this thread...simply some thoughts on the dialog revisions.

BUG REPORT: (v3.1.0 beta 3)

Now when I type a struct member then a space I see the auto-complete list appearing with the struct functions and properties...selecting any of these apparently replaces the value I had already selected, except leaving the first character of the previous member. This is apparently a new issue with the latest beta (as far as I can tell). Notably it is only possible to select a member from the second appearance of the list by double-clicking on it, or arrowing down to it and pressing enter (the list is inactive?). This is as much information as I can really give...hopefully it's enough. If it makes a difference I was testing the calltip functionality with custom struct members...

Vince Twelve

Ooh, I had been using that font loophole too for Resonance.  I quite liked having smooth fonts on the 320x240 game.  I had been checking internally if the game was running in 320x240 or 640x480 and if it's the former, use a small bitmap font, and if it's the latter, use a nice ttf font.

I guess this locks me in 3.0.2 which is fine for now.  It has all the features I need. Though if you ever get around to that audio overhaul, I might be forced to look into working around this.

Pumaman

QuoteOk, I tested this briefly and the DX5 mode with 2x Nearest Neighbour filter works well.
However, I also used the D3D driver and was surprised that it's output quality is worse (pixels being distorted). Aren't they supposed to give the same result, as you said?

Hmm, that's strange. I tried out a 320x240 game on my computer, and it looked the same in D3D and DX5 full screen. I wonder if your graphics card might be trying to do some sort of wacky anti-aliasing or something when it stretches the image in 3D mode... can you try checking your graphics card settings in control panel and see if there's anything that looks like it might do that?

Does anyone else get this problem?

QuoteI know this isn't really the place for suggestions per se, but with the recent changes to the dialog system I've become aware that the Dialog structure doesn't have an ID member

Fair enough, though I'm not sure why you'd need to know the ID number?

QuoteAlso, I've mentioned it before but if there are NO dialogs in the game, the dialog array isn't defined at all. Clearly this saves space, but there is absolutely no way for the user to know from within the script whether this is the case...could perhaps a macro be defined?

Yeah I guess this would be a bit annoying for module authors, I'll look into it.

QuoteAnother thing that comes to mind is something brought up by skuttleman's KADS: the return and stop dialog-script commands. How exactly are these handled if using Dialog.DisplayOptions? Would it be possible to intercept these commands without actually having to replace them with a run-script?

It's irrelevant since DisplayOptions doesn't run dialog scripts. All it does is displays the options and returns which one was chosen.

QuoteNow when I type a struct member then a space I see the auto-complete list appearing with the struct functions and properties...selecting any of these apparently replaces the value I had already selected, except leaving the first character of the previous member

Interesting, I get that too but I also get it in 3.0.2 so it's probably been there for a while. I'll get it fixed.

QuoteOoh, I had been using that font loophole too for Resonance.

Blimey, not another one!! Who ever would have thought so many people would be using a feature that I didn't even know existed!!!  :-\

TheMagician

Quote from: Pumamancan you try checking your graphics card settings in control panel and see if there's anything that looks like it might do that?

I have a GeForce card which uses the NVidia Control Panel.

There is indeed a pane with different settings for scaling non-native resolutions:



1. NVidia scaling                                            2. NVidia scaling with fixed aspect ratio
3. Integrated scaling mode of the display     4. No scaling

What's interesing: with NO scaling and fullscreen mode selected I get a big black border around the image which is actually 640x480 (although the game is 320x240). However, the difference between DX5 and D3D are exactly the same as shown in the gif in my previous post.

freshpaint

I have about 20 rooms of a 800 x 600 res game (Darkdevil County) more or less completed, some with a fair amount of scripting.  The "keep lo res" mode doesn't work the way I'd thought it would, however, since all screen coordinates settable in the room properties panes get converted.  In particular, even though on the screen hotspots look right, when you move the mouse over them or try to run an interaction, the coordinates aren't right. 

My little roger example I'd uploaded for my hotspot misunderstanding shows what's wrong immediately.  You can change object x,y and hotspot walkto points in script, but not the x,y of the real estate they cover in the room editor pane (which is always hi res).

This is the original demo -- if you open it and run it under any of the new 3.10 versions and toggle the hi/lo res feature you'll see what I mean, I hope.  The status line is supposed to update when over the hotspot, etc.  The program runs just fine if you switch to hi res coordinates, however, since there's no coordinate stuff happening in the scripts.

Buggy Test.zip

As to going thru and doubling everything in the Darkdevil game -- well, this is what you get by not listening when your mother told you never ever to hardwire anything!  Conversion program, anyone?

The new dialog option to run loops works great for me.  Doing stuff in actual screen coordinates is going to be great when I get everything converted.  Until then...


Dave Gilbert

#39
Quote from: Vince Twelve on Sun 13/07/2008 07:53:28
Ooh, I had been using that font loophole too for Resonance.  I quite liked having smooth fonts on the 320x240 game.  I had been checking internally if the game was running in 320x240 or 640x480 and if it's the former, use a small bitmap font, and if it's the latter, use a nice ttf font.

I guess this locks me in 3.0.2 which is fine for now.  It has all the features I need. Though if you ever get around to that audio overhaul, I might be forced to look into working around this.

Doh.  Me too.  I've always been using hi-res fonts on a 320 x 240 screen.  Looks like I'll stay with 3.02 as well! 

Pumaman

QuoteI have a GeForce card which uses the NVidia Control Panel.

There is indeed a pane with different settings for scaling non-native resolutions:

Hmm, could you check if there is a specified Direct 3D settings area in the nvidia control panel, and see if there are any options like forcing on full-screen anti-aliasing or anything like that?

QuoteI have about 20 rooms of a 800 x 600 res game (Darkdevil County) more or less completed, some with a fair amount of scripting.  The "keep lo res" mode doesn't work the way I'd thought it would, however, since all screen coordinates settable in the room properties panes get converted.  In particular, even though on the screen hotspots look right, when you move the mouse over them or try to run an interaction, the coordinates aren't right. 

Thanks for raising this, I've investigated and there was a problem with GetLocationName in backwards-compatible mode. I'm not sure how I missed this myself, but anyway it's now fixed in beta 3a.

TheMagician

Quote from: PumamanHmm, could you check if there is a specified Direct 3D settings area in the nvidia control panel
Well there is a panel with settings for 3D applications ... but I can't make sense out of most of them:



I set basically everything to "off" but it still looked the way I described before.
Perhaps, as you suggested, the best thing is to try and see whether other users experience a similar problem.

Here is a simple test game

Everybody feel free to download it and take a look at Rogers mouth and arms especially to see if anything is distorted when you compare DX5 to D3D 9.

SSH

Quote from: Pumaman on Sat 05/07/2008 23:21:19
* Added 1024x768 resolution support.

Have you added a new option to the games database pages? ;)
12

freshpaint

Region code seems to have got broken.  I can't draw a region using the blocky thing in the editor under 3.1 beta 3a using either resolution mode.  (check out the 640 x 400 hi-res roger buggy test, above).

Have been working on converting all coordinates (isn't going to be as bad  as I'd originally thought).  With the "use high res mode":

In my Darkdevil game (800 x 600, 32bit color, regions aren't responding to walk-on/off events.

Also, the text gui I'm using for dialogs didn't get scaled up, so everything wraps in a squished space. Is there a textbox width command I'm missing?

Is it my imagination, or are NPCs running more slowly?  I felt compelled to double the speed of the NPC on my opening screen (a bus that uses waypoints).


monkey0506

#44
Guess I was being a bit daft about the DisplayOptions thing...don't know what I was thinking. Confused myself methinks. Sorry.

As for the dialog's ID...I'm sure I wanted to use it for something...but I lost the file I was working on at the time and forgot what I was doing.

(Edit) I remembered what I needed it for! I'm creating a dynamic array to store whether dialog options are elligible for scrolling or not based off of Game.DialogCount * MAX_OPTIONS where MAX_OPTIONS represents the highest number of options used by any dialog. In referencing the array I need the dialog's ID to get the appropriate index, i.e.:

Code: ags
int ID = (this.ID * Dialog_MaxOptionCount) + option;


As I said, it can be worked around, but an ID member would be faster.

Anyway, thanks.

Joseph DiPerla

Quote from: Pumaman on Sat 05/07/2008 23:21:19
I

Changes in 3.1 beta 3:

* Added 1024x768 resolution support.



Holy Crap!!!!! I didn't expect this one so soon...
Joseph DiPerla--- http://www.adventurestockpile.com
Play my Star Wars MMORPG: http://sw-bfs.com
See my Fiverr page for translation and other services: https://www.fiverr.com/josephdiperla
Google Plus Adventure Community: https://plus.google.com/communities/116504865864458899575

freshpaint

#46
When you do Ctrl-S to give yourself all inventory items in "use hi-res mode", everything gets crunched up (I'm 800x600, 32bit color mode). This is part of the screen:



Outside of Ctrl-S mode, when you invoke the inventory window gui, it appears correct  (items spaced out ok EDIT: I spoke too soon -- they seem cramped too) except that the clickable area of each inventory item seems to be incorrect (I can only activate an item if I click in the top left half of it).  Do I have to change this manually somehow?

Ctrl-W doesn't place you on a walkable area any longer, or else uses an incorrect map.  Ctrl-A shows old lo-res walkable map.

Ctrl-D works great!

UPDATE:  the arrow keys seem to be broken -- do I have to load an updated keyboard module?

SSH

You should probably change the numbers in the inv window control within the gui. The spacing is set there and seems like the defaults are too small in hi-res mode...
12

freshpaint

SSH -- thanks.  That did the trick.  The editor converted the height/width of outer and inner windows and buttons, etc. correctly, but not the items or screen placement.  The other issues involving walkable areas/regions and arrow keys remain.

Pumaman

QuoteRegion code seems to have got broken.  I can't draw a region using the blocky thing in the editor under 3.1 beta 3a using either resolution mode.  (check out the 640 x 400 hi-res roger buggy test, above).

Hmm yes I get this with the "buggy test" game too. How did you initially import the rooms? The game is 640x400 but the rooms seem to have been imported in "low-res" mode which is confusing it. I need to fix the editor but I'm trying to work out how it arrived in this situation -- did you initially import some 320x200 backgrounds and then change the game to 640x400?

QuoteIn my Darkdevil game (800 x 600, 32bit color, regions aren't responding to walk-on/off events.

I'll look into this one.

QuoteAlso, the text gui I'm using for dialogs didn't get scaled up, so everything wraps in a squished space. Is there a textbox width command I'm missing?

I'm not sure what you mean here. Which type of Dialog Options are you using? Do you have a text window GUI or are they being placed on a normal GUI?

QuoteIs it my imagination, or are NPCs running more slowly?  I felt compelled to double the speed of the NPC on my opening screen (a bus that uses waypoints).

Hmm, movement speeds should be the same. I'm pretty sure this was the case when I tested it but I'll double check. Are you saying that your NPCs have this problem but the player character doesn't?

Quote(Edit) I remembered what I needed it for! I'm creating a dynamic array to store whether dialog options are elligible for scrolling or not based off of Game.DialogCount * MAX_OPTIONS where MAX_OPTIONS represents the highest number of options used by any dialog. In referencing the array I need the dialog's ID to get the appropriate index, i.e.:

Fair enough; everything else has an ID property so dialogs should too.

QuoteCtrl-W doesn't place you on a walkable area any longer, or else uses an incorrect map.  Ctrl-A shows old lo-res walkable map.

Ah oops, I forgot to check those. I'll look into them.

QuoteUPDATE:  the arrow keys seem to be broken -- do I have to load an updated keyboard module?

Hmm no you're right, Character.WalkStraight is broken. I'll get it fixed.

Thanks for giving this a proper try-out, freshpaint -- it's just what we need to get the bugs worked out. I'm surprised at how many things I managed to miss when I was testing it out...

freshpaint

character.placeonwalkablearea doesn't work either (or rather, seems to use old lores map).

The buggy test import question: I think I imported the original room at 320, then found out I couldn't run it at that resolution full-screen on my machine, so scaled it up, but this was more than a month ago using whatever version was current then.

The dialog box that doesn't scale sideways  is a text box (the kind where you have to give it corners).   Also, the corners don't pick up transparency, and show up black.  I use the same gui for "custom text-window GUI" and it works just fine. Thusly: (I use truetype fonts).

(new 3.1)


(old 3.02)


It would be great if you could set a width property for this kind of gui.

PS: I actually kinda like debugging -- when it isn't my own s*it.... And since I'm currently ahem, er resting between employment opportunities...

The slowdown only seems to be noticable with NPCs.  I turn on FPS display and it is the same as before.  Player character seems ok, except regions have no effect.  I'm going to double check -- but it seems like my NPC in this room (Kyle) triggers a region interaction when he leaves the room (correctly, I think, I can't remember how I programmed it), but when player tries to leave the room across the same region, the trigger doesn't happen.  Nor do any of the lighting effects, music cues, etc.  that are set by regions.

Pumaman

Ok, beta 4 is now up, which should address all the reported issues with hi-res co-ordinates.

So far I haven't been able to reproduce any NPC speed problem, so please let me know if you discover any more about this.

QuoteIt would be great if you could set a width property for this kind of gui.

You can use the game.max_dialogoption_width setting to override this -- though the problem is now fixed in beta 4.

freshpaint

CJ, you are magnificent!  All the fixes work great. 

Will continue to work with this version going forward.  Will probably be uploading the new 1.5 version of Darkdevil County in the next few days using this version, since it has the alpha channel save fix in it as well.

Will see if I can get a specific example of the slowdown thing.  My computer sucks and does weird cycle-downs if it overheats, so it's possible it's a hardware problem.  I have a bus "walking" in the background using waypoints in room repeatedly execute, passing over several scaled walkable areas and lighting regions.  Maybe the pathfinder has more to check now?


monkey0506

Bug...?...report?

I am using Windows XP on a shared computer. I got off to let one of my roommates on, saved my work, but left the editor open. I chose to switch users to leave my programs open so I could get back to work a bit faster when I got back on. My roommate then turned the computer off ignoring the "other users are logged on" warning. When I started AGS all of my pane sizes had all gone haywire.

If it makes a difference...it may have simply been user/OS joint-stupidity: I first clicked "Log Off" which would have closed my programs except XP told me "The program cannot end because it is waiting on a response from you." AGS was prompting me whether I wanted to save. I closed the prompt but the logging off didn't continue. So I then selected "Switch Users" which is what I meant to choose in the first place. So perhaps it may have come as a result of that.

Anyway, perhaps unlikely as a recurring/common bug, but I thought you might want to know about it in case there are any other related issues. ;)

Pumaman

QuoteCJ, you are magnificent!  All the fixes work great. 

Will continue to work with this version going forward.  Will probably be uploading the new 1.5 version of Darkdevil County in the next few days using this version, since it has the alpha channel save fix in it as well.

Glad to hear it -- do let me know if you find any other issues.

QuoteI am using Windows XP on a shared computer. I got off to let one of my roommates on, saved my work, but left the editor open. I chose to switch users to leave my programs open so I could get back to work a bit faster when I got back on. My roommate then turned the computer off ignoring the "other users are logged on" warning. When I started AGS all of my pane sizes had all gone haywire.

Hmm strange, I tried doing something similar in Vista but it seemed ok. It's not exactly bug of the year but I'll keep it under review.


Anyway, beta 5 is now up with some minor changes and stuff.

freshpaint

#55
In latest 3.1 beta 5, hotspot markings have disappeared from the room edit screen (the little x marks).  The hotspots are painted correctly, the walktox,y in the property grid are correct, and the game runs correctly, but the markers are displayed wrong, almost as though they got double-converted, since if I play around with the scroll bars I sometimes see one or two of them shifted down about half a screen into the bottom gray area.

I hadn't noticed the markers missing in the previous beta version.  I was trying to create a new hotspot in a room and noticed it.  Both the new hotspot I created and converted hotspots have markers missing.

This is my Darkdevil County game I've been testing under each new version of 3.1.
It's 800  x 600, 32bit color.  I use 120 dpi.

UPDATE:  Also doesn't show up in the little Buggy Test file (which I think you have).

EDIT:  Also noticed that the gui corners for my dialog text box show transparency correctly if I use directdraw5 driver rather than (my default) 3d9:

dd5:



3d9:


SSH

I got this when trying to copy a sprite in from clipboard and then edit it:

---------------------------
Application Error
---------------------------
An unexpected error occurred. See below for details.

System.ComponentModel.Win32Exception: Error creating window handle.

   at System.Windows.Forms.NativeWindow.CreateHandle(CreateParams cp)

   at System.Windows.Forms.Control.CreateHandle()

   at System.Windows.Forms.ToolStripDropDown.CreateHandle()

   at System.Windows.Forms.Control.get_Handle()

   at System.Windows.Forms.ToolStripManager.ModalMenuFilter.PreFilterMessage(Message& m)

   at System.Windows.Forms.Application.ThreadContext.ProcessFilters(MSG& msg, Boolean& modified)

   at System.Windows.Forms.Application.ThreadContext.PreTranslateMessage(MSG& msg)

   at System.Windows.Forms.Application.ThreadContext.System.Windows.Forms.UnsafeNativeMethods.IMsoComponent.FPreTranslateMessage(MSG& msg)

   at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)

   at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)

   at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)

   at System.Windows.Forms.Application.Run(Form mainForm)

   at AGS.Editor.Program.RunApplication(String[] args)
---------------------------
OK   
---------------------------
12

SSH

#57
Dragging a new GUI button, it snaps back to half its size and co-ordinates after drawing it

I think GetTextWidth (and height?) are getting confused, too. They seem to return double the size.

Actually, what seems to be happening, is that even in native co-ords mode, DrawingSurface.DrawString doesn't use native co-ordinates unless you explicitly set UseHighResCoordinates on that D.S. However, all the graphical D.S. functions default to high res coordinates when in native mode.

12

freshpaint

#58
Just got this error.  Not sure what exactly I did except rename a music mp3 that I'd made a typo in. (EDIT: I think I had something called music9windsound.mp3 in the music folder)

Error: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
Version: AGS 3.1.0.52

System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
   at new(UInt32 )
   at LineLayout.Resize(LineLayout* , Int32 maxLineLength_)
   at LineLayout.{ctor}(LineLayout* , Int32 maxLineLength_)
   at LineLayoutCache.Retrieve(LineLayoutCache* , Int32 lineNumber, Int32 lineCaret, Int32 maxChars, Int32 styleClock_, Int32 linesOnScreen, Int32 linesInDoc)
   at Editor.RetrieveLineLayout(Editor* , Int32 lineNumber)
   at Editor.Paint(Editor* , Surface* surfaceWindow, PRectangle rcArea)
   at ScintillaWin.WndPaint(ScintillaWin* , UInt32 wParam)
   at ScintillaWin.WndProc(ScintillaWin* , UInt32 iMessage, UInt32 wParam, Int32 lParam)
   at ScintillaWin.SWndProc(HWND__* hWnd, UInt32 iMessage, UInt32 wParam, Int32 lParam)
   at System.Windows.Forms.UnsafeNativeMethods.CallWindowProc(IntPtr wndProc, IntPtr hWnd, Int32 msg, IntPtr wParam, IntPtr lParam)
   at System.Windows.Forms.NativeWindow.DefWndProc(Message& m)
   at System.Windows.Forms.Control.DefWndProc(Message& m)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at Scintilla.ScintillaControl.WndProc(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

cat

Quote* Removed room height limit of 1400 pixels.
Yay! Good to hear that!

GarageGothic

I'm quite sorry that I don't have the chance to test out the betas during my holiday. This version seems to contain some of the most important changes to AGS since DrawingSurface was introduced. I can't wait to get working with hi-res coordinates, and I'm very curious to see how well 1024x768 mode runs.

I know that I've been lobbying for better widescreen support forever, so at the risk of repeating myself, I'd just like to point out that it's unfortunate that the two highest resolutions of AGS don't have corresponding 16:10 modes (as 320x200 and 640x400 are to the lower resolutions). I don't expect that it will be possible to run the same game .exe in both  4:3 and 16:10 modes (fullscreen - not letterboxed) anytime soon, as I've previously suggested, but a 1024x640 and an 800x500 mode would be greatly appreciated. It seems quite contradictory that the most contemporary and hardware demanding resolutions can't take advantage of the full screen area of what is becoming the current monitor standard.

deltamatrix

I second that. A widescreen mode for all resolutions would be great. :=
BAD WOLF - TORCHWOOD - MR SAXON - THE BEES ARE DISAPPEARING - PANDORICA - RIVER SONG

subspark

Chris already said he would revamp the resolution system to support this and more I beleive. About 6 months ago to be precise. I initiated the topic requesting that AGS support 16:10 aspects along with the ability to tailor for 4:3 in the same game project. (There were complaints about GUI layout on various screen aspects). It is possible that this is something that CJ has already started planning but you'd best ask him about this.

Cheers,
Paul.

monkey0506

With the recent confusion (1, 2) with global variables vs. Set/GetGlobalInt, I wonder if it might now be time to deprecate these functions. Since I started scripting I have avoided the "GlobalInt" functions like the plague. If I need an int, it's much easier (in the end) to have a conveniently named variable that I can reference instead of having to keep track of arbitrary IDs.

Though arguably "they've always been there!", I'd say that the global variables pane effectively removes any real need for them. Further, it's already becoming apparent that users may assume a connection between "GetGlobalInt" and a "Global Variable" of type int. It seems logical enough that it could, has, and will cause conflict.

Just my $0.02 on the matter anyway.

Sadistyk

Hi. Today I tried to open an old AGS game (an .agf file) and this showed up:



The second line says : " hexadecimal value 0X02, it's a non valid character. Line 4834, position 19"

I tried to open the game with AGS version 3.0.2 SP1.

Pumaman

QuoteIn latest 3.1 beta 5, hotspot markings have disappeared from the room edit screen (the little x marks).
EDIT:  Also noticed that the gui corners for my dialog text box show transparency correctly if I use directdraw5 driver rather than (my default) 3d9:

Thanks, I'll look into these.

QuoteI got this when trying to copy a sprite in from clipboard and then edit it:

System.ComponentModel.Win32Exception: Error creating window handle.
   at System.Windows.Forms.NativeWindow.CreateHandle(CreateParams cp)

Hmm, another crash deep within .NET. I'm gradually losing confidence in the .NET Framework as a platform for Windows applications, and I'm not sure if there's much I can do about this.

When did the crash happen? Was it when you double-clicked the sprite to edit it, or did you use the right-click menu?

QuoteDragging a new GUI button, it snaps back to half its size and co-ordinates after drawing it

Actually, what seems to be happening, is that even in native co-ords mode, DrawingSurface.DrawString doesn't use native co-ordinates unless you explicitly set UseHighResCoordinates on that D.S. However, all the graphical D.S. functions default to high res coordinates when in native mode.

Thanks, I'll look into these.

QuoteJust got this error.  Not sure what exactly I did except rename a music mp3 that I'd made a typo in. (EDIT: I think I had something called music9windsound.mp3 in the music folder)

Hmm thanks, when did this happen? Was it as soon as you switched back to AGS after renaming the file, or did you press something that led to the crash?

QuoteI know that I've been lobbying for better widescreen support forever, so at the risk of repeating myself, I'd just like to point out that it's unfortunate that the two highest resolutions of AGS don't have corresponding 16:10 modes (as 320x200 and 640x400 are to the lower resolutions).

This is something I will investigate for a future version.

QuoteWith the recent confusion (1, 2) with global variables vs. Set/GetGlobalInt, I wonder if it might now be time to deprecate these functions.

Well, the manual pages for Set/GetGlobalInt already describe them as obsolete. The only further step I can take is to stop them compiling in Strict mode, but this would probably just cause aggro from people who are using them a lot in existing games.

QuoteHi. Today I tried to open an old AGS game (an .agf file) and this showed up:

How old was the game (ie. was it made with a 3.0 beta, or with an official 3.x release)? Could you upload the AGF file for me to investigate?

monkey0506

Quote from: Pumaman on Tue 29/07/2008 22:54:51
QuoteWith the recent confusion (1, 2) with global variables vs. Set/GetGlobalInt, I wonder if it might now be time to deprecate these functions.

Well, the manual pages for Set/GetGlobalInt already describe them as obsolete. The only further step I can take is to stop them compiling in Strict mode, but this would probably just cause aggro from people who are using them a lot in existing games.

Sorry I wasn't aware the manual entry had been updated. But it seems like people are quickly drawing a link between "global variables" and "GlobalInt"... :-\

freshpaint

#67
QuoteJust got this error.  Not sure what exactly I did except rename a music mp3 that I'd made a typo in. (EDIT: I think I had something called music9windsound.mp3 in the music folder)

Hmm thanks, when did this happen? Was it as soon as you switched back to AGS after renaming the file, or did you press something that led to the crash?

I think I had editor open, ran the program, wondered why the music didn't play, looked in the folder, saw the typo, changed name, came back, re-ran the program, and it crashed.  Pretty sure this is sequence.

[edit]
Sticking 2 cents into globalint issue: unless you allow named variables in dialogs, it's the only way to transfer data out of a dialog (other than with xchanging inventory items). 

The new dialog functions let you do most of it yourself in code now, but I bet they still get used a lot just because of the dialog issue.  I had been using them as convenient temp storage to figure out which dialog options had actually been selected after a dialog closed rather than dive in and out of dialog_request all the time. 

In fact, the dialog examples in the manual talk about using global ints like this.  If they're going away soon, maybe this should get changed.

Makeout Patrol

I'm having trouble with MIDI files. When I add them the the game's 'music' folder, doing everything that needs to be done, the next time I run the game, none of the MIDI files play at all (even the ones that were already in the folder). This has happened every time I've added MIDIs, and it fixes itself when I play around enough - sometimes restarting the editor gets it to work, sometimes opening the MIDI files in Windows Media makes it work, sometimes it's something else. This problem has persisted through reboots, as well. This doesn't affect any WAV, MP3 or OGG files - just MIDIs. What's up?

Vince Twelve

Windows Media has an annoying habit of messing with your SW Synth volume.  Open your computer's volume controls and check it.  If it's not there, you might have to go into options to make sure it shows up.  This had me stuck for about four hours once when Nanobots' music suddenly stopped playing and I couldn't figure out what was happening.  Turns out it was because I accidentally opened a MIDI in Windows Media Player.

freshpaint

#70
Created new game using default template in 3.1 Beta 5, using my Darkdevil County settings (800x600, 32bit), everything else uses the game defaults set for this version (I noticed that the default for new game is to use actual resolution). Guis for new game template aren't scaled up, however, tho the buttons seem to be:


Pumaman

That isn't actually a bug, but is something that will affect new games now that native co-ordinates is implemented.

Because the Default Game template is at 320x200, now that it is using native co-ordinates if you change the game resolution to something higher (eg. 800x600) the x/y/width/height is now interpreted as being in high-res co-ordinates. This means that if you change the game resolution you'll have to be careful about any existing co-ordinates that are in use.

QuoteI think I had editor open, ran the program, wondered why the music didn't play, looked in the folder, saw the typo, changed name, came back, re-ran the program, and it crashed.  Pretty sure this is sequence.

So are you saying that the editor crashed the second time that you tried to test the game, or did you close the game and then it crashed?

freshpaint

#72
I didn't exit the editor to Windows, if that's what you're asking.  I made the change while the editor was still open by popping up a folder window on the desktop, and the "run" game was exited prob. with alt-x, am pretty sure.  I think it crashed when I tried to run the game again, with the .mp3 file still named incorrectly.  If I can duplicate it will let you know.

Ok, understand about default game now. 

[EDIT]: New issue creating new gui: after drawing the button on a plain gui, the actual button created was half the size and popped into a half/resolution coordinate, thusly:


When I let go of mouse button, this is where it pops:


Other controls act the same way making it tricky to try to lay out a new gui by drawing (tho you can work around it).  On screen when run, new gui shows up wysiwyg, as in the second example, so it looks like maybe the drawing part of it uses incorrect coordinates?.  Sorry I keep coming up with s*it.

Shane 'ProgZmax' Stevens

A small (but weird issue) I notice with textwindow guis is that when you initially create them they use whatever is loaded in sprite index 1 as the placeholder sprites for the border.  Obviously this isn't a big issue if you have a small sprite, but since I happened to have a gui for index 1 it created a mess of overlapping guis that made it difficult for me to see what was going on.  Perhaps instead of using a default image the borders could just have a permanent visible outline around them?

Ghost

#74
Tiny issue with 3.0.2 SP1 - after quitting from AGS, it forgets about the none/crosshair/sprite settings used for inventory. I made three new inv. items, assigned a sprite, set the hotspot, compiled, all perfect. Then, after quitting/re-starting, the settings where reset to their default "No marker".

I also noticed that importing an 8bit sprite into a game of 16bit colour depth makes true black turn into magic pink (the transparent colour). Doesn't affect me much, but I thought I might as well post it.

I haven't touched any of the new betas yet, so if this has already been adressed forgive me ;)

freshpaint

#75
Just got the following while running Darkdevil County from editor in a window.  The player character was very close to the edge of the screen, editor popped up instead of her walking off (this often happens).  This is the first time I've seen this, tho.  The only other change I'd made was putting a tint on her just before testing.  Editor crashed, program terminated only partially and hung, had to terminate via task manager.  (EDIT -- I may have passed a saturation number out of range)

Error: An error occurred while parsing EntityName. Line 3, position 97.
Version: AGS 3.1.0.52

System.Xml.XmlException: An error occurred while parsing EntityName. Line 3, position 97.
   at System.Xml.XmlTextReaderImpl.Throw(Exception e)
   at System.Xml.XmlTextReaderImpl.Throw(String res, String arg)
   at System.Xml.XmlTextReaderImpl.ParseEntityName()
   at System.Xml.XmlTextReaderImpl.ParseEntityReference()
   at System.Xml.XmlTextReaderImpl.Read()
   at System.Xml.XmlLoader.LoadNode(Boolean skipOverWhitespace)
   at System.Xml.XmlLoader.LoadDocSequence(XmlDocument parentDoc)
   at System.Xml.XmlLoader.Load(XmlDocument doc, XmlReader reader, Boolean preserveWhitespace)
   at System.Xml.XmlDocument.Load(XmlReader reader)
   at System.Xml.XmlDocument.LoadXml(String xml)
   at AGS.Editor.DebugController._communicator_MessageReceived(String data)
   at AGS.Editor.EngineCommunication._watcher_Changed(Object sender, FileSystemEventArgs e)
   at System.IO.FileSystemWatcher.OnChanged(FileSystemEventArgs e)
   at System.IO.FileSystemWatcher.NotifyFileSystemEventArgs(Int32 action, String name)
   at System.IO.FileSystemWatcher.CompletionStatusChanged(UInt32 errorCode, UInt32 numBytes, NativeOverlapped* overlappedPointer)
   at System.Threading._IOCompletionCallback.PerformIOCompletionCallback(UInt32 errorCode, UInt32 numBytes, NativeOverlapped* pOVERLAP)

Pumaman

QuoteNew issue creating new gui: after drawing the button on a plain gui, the actual button created was half the size and popped into a half/resolution coordinate, thusly:

Thanks, though this has already been reported by SSH -- I'm looking into it.

QuoteA small (but weird issue) I notice with textwindow guis is that when you initially create them they use whatever is loaded in sprite index 1 as the placeholder sprites for the border.  Obviously this isn't a big issue if you have a small sprite, but since I happened to have a gui for index 1 it created a mess of overlapping guis that made it difficult for me to see what was going on.  Perhaps instead of using a default image the borders could just have a permanent visible outline around them?

Hmm yeah I don't really like the way the textwindow editor works anyway ... it was put there as a quick-and-easy hack that has since persisted into AGS 3. Something like that would probably be a good idea.

QuoteTiny issue with 3.0.2 SP1 - after quitting from AGS, it forgets about the none/crosshair/sprite settings used for inventory. I made three new inv. items, assigned a sprite, set the hotspot, compiled, all perfect. Then, after quitting/re-starting, the settings where reset to their default "No marker".

The way you set the inventory cursor hotspot in AGS 3.0.x is confusing, and has already been changed in the latest beta.

QuoteJust got the following while running Darkdevil County from editor in a window.  The player character was very close to the edge of the screen, editor popped up instead of her walking off (this often happens).

Hmm, that's strange. Did you have a breakpoint set at that point in the game or was it totally random?

Vince Twelve

#77
Testing out the fancy 640x480 native resolution, but having something weird go on with GUI coordinates.

I have a gui (gInventory) following the mouse around using the following code:


    gInventory.X=max(0, min(639, mouse.x+15));
    gInventory.Y=max(0, min(479, mouse.y+15));

However, when I mouse below 385 the game closes and the editor pops up and highlights the second of those two lines of code with a little error window:

"GUI.Y: co-ordinates specified are out of range.  Remember to use 320-res coordinates."

First off, I shouldn't be using 320 res coordinates right?  I assume this error has snuck past the upgrade.

Second of all, why is it doing this if the GUI is moving to a y>400?  If I change the 479 in the code to 400, it works fine, but the inventory box will no longer follow the cursor to the bottom 80 pixels of the screen...

It seems that setting a GUI to a y coordinate higher than 400 before the game runs (in the GUI's editor panel) works fine, but doing it in code using gInventory.Y while running the game produces an error.

And yes, the game is set to 640x480, not 640x400.

Bug?


Edit:  One other apparent bug.  I spent about 30 minutes trying to figure out why my characters were suddenly becoming non-solid.  But I just noticed that they apparently are only non-solid on the right half of the screen.  Characters don't block anything x>320.  Another bug from the upgrade?

RickJ

I have been heavily using the beta version in Linux (via VirtualBox) for the last week or so and it is working great.  Here are a couple things I noticed though...

GUI Editor
I have seen the GUI editor coordinate problem previously reported and would add that the GUI background color is draw at twice the actual size (the border is drawn correctly).  When new controls are created they appear to be draw at coordinates half the distance from where ther where created. I know this is already reported and just adding my brief observation in case it may be of help. 

Problem Using  Mapped Drive
VirtualBox creates a virtual disk for drive C.  Windows 2000 and AGS are installed on virtual drive C.  I have setup VirtualBox for seamless integration where I have the windows menu/taskbar at the top of my screen and the linux KDE menu/taskbar at the bnottom of my screen and my combined linux and windows desktop displayed on the remainder of the screen.  Start AGS and it runs in a windows style window.  Start Linux apps and the run in KDE style windows.

Games that reside on drive C can be edited and tested without any problems the same as on a native windows machine.  Linux apps, however,  can't access the virtual C drive.  Windows runing within birtualBox can however access the Linux file system using "net use" to map all or a portion of the native Linux file system to a windows drive letter (i.e. F:/ ).   There are many obvious advantages to keeping and working with AGS's game files on the native Linux file system rather than virtual drive C which is in actuality OBFF  (one big f#@king file) in the native file system.   

AGS is able to open, edit, and save game files residing on a mapped drive (mapped via "net use") without any problems.  However, all of the command under the Build menu cause AGS to crash with the " There are no more files." error shown below. 

Since it's possible to edit/save files  on a mapped drive then it would seem possible fix this problem.  If this little thing gets fixed, then I would say that the new AGS editor runs flawlessly in Linux (via VirtualBox).  Please take a look and let me know if fixing this is possible and if it's worth your effort.  I am planning on publishing a How-To in the near future on the forum for my other fellow Linux users and would want to make it consistent with your response.  Thanks.

Code: ags

Error: There are no more files.

Version: AGS 3.1.0.52

System.IO.IOException: There are no more files.
 ---> System.IO.IOException: There are no more files.

   at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
   at System.IO.Directory.InternalGetFileDirectoryNames(String path, String userPathOriginal, String searchPattern, ...
              Boolean includeFiles, Boolean includeDirs, SearchOption searchOption)
   at System.IO.Directory.GetFiles(String path, String searchPattern, SearchOption searchOption)
   at AGS.Editor.Utilities.AddAllMatchingFiles(IList`1 list, String fileMask, Boolean fullPaths)
   at AGS.Editor.Components.MusicAndSpeechComponent._agsEditor_ExtraCompilationStep(CompileMessages errors)
   at AGS.Editor.AGSEditor.CompileScripts(Object parameter)
   at AGS.Editor.BusyDialog.RunHandlerOnThread()
   --- End of inner exception stack trace ---
   at AGS.Editor.BusyDialog.Show(String message, ProcessingHandler handler, Object parameter)
   at AGS.Editor.AGSEditor.CompileGame(Boolean forceRebuild, Boolean createMiniExeForDebug)
   at AGS.Editor.Components.BuildCommandsComponent.TestGame(Boolean withDebugger)
   at AGS.Editor.Components.BuildCommandsComponent.CommandClick(String controlID)
   at AGS.Editor.GUIController._mainForm_OnMenuClick(String menuItemID)
   at AGS.Editor.MainMenuManager.MenuEventHandler(Object sender, EventArgs e)
   at System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs e)
   at System.Windows.Forms.ToolStripMenuItem.OnClick(EventArgs e)
   at System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e)
   at System.Windows.Forms.ToolStripItem.HandleMouseUp(MouseEventArgs e)
   at System.Windows.Forms.ToolStripItem.FireEventInteractive(EventArgs e, ToolStripItemEventType met)
   at System.Windows.Forms.ToolStripItem.FireEvent(EventArgs e, ToolStripItemEventType met)
   at System.Windows.Forms.ToolStrip.OnMouseUp(MouseEventArgs mea)
   at System.Windows.Forms.ToolStripDropDown.OnMouseUp(MouseEventArgs mea)
   at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
   at System.Windows.Forms.ToolStrip.WndProc(Message& m)
   at System.Windows.Forms.ToolStripDropDown.WndProc(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

Khris

Possibly another bug:

Quote from: zabnatI actually just tested it again and the objects baseline setting doesn't affect the place where object places its blocking chunk, it only affects whether character is drawn on top of the object or behind. I'm not sure if this is a bug or not, but this seems to be the case. The baseline used for blocking is always at the bottom of the object.

Pumaman

QuoteI know that I've been lobbying for better widescreen support forever, so at the risk of repeating myself, I'd just like to point out that it's unfortunate that the two highest resolutions of AGS don't have corresponding 16:10 modes

I've re-opened this discussion in this thread if you want to discuss it further.

QuoteHowever, when I mouse below 385 the game closes and the editor pops up and highlights the second of those two lines of code with a little error window:

"GUI.Y: co-ordinates specified are out of range.  Remember to use 320-res coordinates."
QuoteEdit:  One other apparent bug.  I spent about 30 minutes trying to figure out why my characters were suddenly becoming non-solid.  But I just noticed that they apparently are only non-solid on the right half of the screen.  Characters don't block anything x>320.  Another bug from the upgrade?

Thanks, these should be fixed in beta 6.

QuoteGUI Editor
I have seen the GUI editor coordinate problem previously reported and would add that the GUI background color is draw at twice the actual size (the border is drawn correctly).  When new controls are created they appear to be draw at coordinates half the distance from where ther where created. I know this is already reported and just adding my brief observation in case it may be of help. 

Hmm yeah this is a bit annoying ... originally it was deliberate but I can't remember why, and I think it just makes it confusing. I've changed this for beta 6.

QuoteError: There are no more files.
System.IO.IOException: There are no more files.

Hmm, this seems to be a bug in the .NET Framework, but I've put a workaround into beta 6 -- please let me know if it works.

QuoteI actually just tested it again and the objects baseline setting doesn't affect the place where object places its blocking chunk, it only affects whether character is drawn on top of the object or behind. I'm not sure if this is a bug or not, but this seems to be the case. The baseline used for blocking is always at the bottom of the object.

That's by design. If the object is a rock, for example, and you set its baseline to 1 so that characters will always be drawn on top of it, you wouldn't want its blocking area to be at the very top of the screen.


Anyway, beta 6 is now up which fixes some things.

SSH, I wasn't able to replicate any problems with DrawingSurface stuff so if you're still having a problem could you elaborate a bit more about what's going wrong?

I wasn't able to replicate these two crashes:
QuoteSystem.ComponentModel.Win32Exception: Error creating window handle.
   at System.Windows.Forms.NativeWindow.Creat eHandle(CreateParams cp)
QuoteSystem.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
   at new(UInt32 )
   at LineLayout.Resize(LineLayout* , Int32 maxLineLength_)
   at LineLayout.{ctor}(LineLayout* , Int32 maxLineLength_)

and they seem to be internal bugs in .NET and Scintilla, respectively.
Please let me know if they happen again.

RickJ

Quote
Quote
Error: There are no more files.
System.IO.IOException: There are no more files.
Hmm, this seems to be a bug in the .NET Framework, but I've put a workaround into beta 6 -- please let me know if it works.
It doesn't seem like it works.   Everything under the Build menu and create new game causes the error for me still.   Thanks for th quick response ;)

rich

#82
I moved this to the Wishlist.
I'm so excited!

RickJ

Not really a bug but I just noticed that the Textbox control does not have it's TextColor property exposed in the script.  It's useful for module/GUI designer who is using TextBox in conjunction with Buttons to make multiple input fields.   

freshpaint

Beta 6 is lovely!  Thanks for all the hard work you've put in on it.

Have a problem, however, with the new "loops running in background with dialog on screen" feature -- it doesn't seem to work in one of my rooms with a large dynamic sprite moving around via object.animate.

Also, on the opening screen of my Darkdevil County, it doesn't switch from  manual scaling to picking up walkable area scaling like it does without the flag set.  In this case I make a character walk in the background via character.addwaypoint.

My game is 800x600, 32bit color, with "use actual resolution" switch set and 3d9 drivers.

If you want me to pull out an executable code sample, let me know.


Pumaman

QuoteIt doesn't seem like it works.   Everything under the Build menu and create new game causes the error for me still.   Thanks for th quick response

Can you post the new error message? You shouldn't be getting an identical error any more, though you may be getting a very similar one.

QuoteI hope this is the right place to put requests for a new version...

No, please use the Wishlist thread for that. This thread is for feedback and bug reports about the beta version only, to keep things clean.

QuoteHave a problem, however, with the new "loops running in background with dialog on screen" feature -- it doesn't seem to work in one of my rooms with a large dynamic sprite moving around via object.animate.

Can you clarify what doesn't work? The sprite doens't move? It doesn't animate? Can you post an example?

QuoteAlso, on the opening screen of my Darkdevil County, it doesn't switch from  manual scaling to picking up walkable area scaling like it does without the flag set.  In this case I make a character walk in the background via character.addwaypoint.

I'm not really sure what you mean here. What exactly is the problem? Maybe posting a sample would be the easiest thing to do, if you'd be so kind.

RickJ

Quote
Can you post the new error message? You shouldn't be getting an identical error any more, though you may be getting a very similar one.
Sure thing.  Here is an error dump from trying to run the compiler.

Code: ags

Error: There are no more files.

Version: AGS 3.1.0.53

System.IO.IOException: There are no more files.
 ---> System.IO.IOException: There are no more files.

   at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
   at System.IO.Directory.InternalGetFileDirectoryNames(String path, String userPathOriginal, String searchPattern, Boolean includeFiles, Boolean includeDirs, SearchOption searchOption)
   at System.IO.Directory.GetFiles(String path, String searchPattern, SearchOption searchOption)
   at AGS.Editor.Components.MusicAndSpeechComponent.CompilePAMFiles(CompileMessages errors)
   at AGS.Editor.Components.MusicAndSpeechComponent._agsEditor_ExtraCompilationStep(CompileMessages errors)
   at AGS.Editor.AGSEditor.CompileScripts(Object parameter)
   at AGS.Editor.BusyDialog.RunHandlerOnThread()
   --- End of inner exception stack trace ---
   at AGS.Editor.BusyDialog.Show(String message, ProcessingHandler handler, Object parameter)
   at AGS.Editor.AGSEditor.CompileGame(Boolean forceRebuild, Boolean createMiniExeForDebug)
   at AGS.Editor.Components.BuildCommandsComponent.CompileGame(Boolean forceRebuild)
   at AGS.Editor.Components.BuildCommandsComponent.CommandClick(String controlID)
   at AGS.Editor.GUIController._mainForm_OnMenuClick(String menuItemID)
   at AGS.Editor.MainMenuManager.MenuEventHandler(Object sender, EventArgs e)
   at System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs e)
   at System.Windows.Forms.ToolStripMenuItem.OnClick(EventArgs e)
   at System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e)
   at System.Windows.Forms.ToolStripItem.HandleMouseUp(MouseEventArgs e)
   at System.Windows.Forms.ToolStripItem.FireEventInteractive(EventArgs e, ToolStripItemEventType met)
   at System.Windows.Forms.ToolStripItem.FireEvent(EventArgs e, ToolStripItemEventType met)
   at System.Windows.Forms.ToolStrip.OnMouseUp(MouseEventArgs mea)
   at System.Windows.Forms.ToolStripDropDown.OnMouseUp(MouseEventArgs mea)
   at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
   at System.Windows.Forms.ToolStrip.WndProc(Message& m)
   at System.Windows.Forms.ToolStripDropDown.WndProc(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


freshpaint

Regarding my problems with using the "run loops with dialog on screeen" issue:

Here's my familiar buggy test with roger.  In animating room 1, a big roger clone walks around in the background, going from manual scaling, through a scaled walkable region, and a region with lighting.  If you click on either the cup or the roger on the red center hotspot, you can have a brief dialog and see what I mean.  The dummy in the background walks for part of his path, then stops and doesn't resize or move until the dialog is off the screen.

Room 2 shows the screen freezing problem using an object animation rather than a walk cycle.  The hand follows roger around and does a simple animation using a dynamic sprite assigned to a view.  You can talk to the hand or to roger in this room and see what happens.

If the switch is off (ie, the way it used to be), both rooms work the way they do under 3.02.  The examples are based on code from my Darkdevil County demo that works fine without using the switch.

Buggy Test 3.10 beta 6.zip

Hope this helps.  Let me know if you need anything else.


Makeout Patrol

#88
There is a problem with translations. I'm not sure which version this came along in.

If a line in the translation includes an escaped quotation mark (\"), the translated line does not appear in the game, even though it is in the .trs file and translated properly. If I change the line in the game to include a single quotation mark instead of the escaped double, the translated line shows up while playing, but so does the backslash, if it is included in the .trs file.

I've worked around it by replacing double quotes in the game with single quotes, but I could see this being a pretty serious problem in games with Sierra style speech.

EDIT: Simple, non-escaped quotation marks in the .trs file show up normally in the translated game.

visionastral

Hello there,
Transparency doesn't work in characters at all, it just ignores it and shows the character fully opaque.
I'm using 32 bits sprites with alpha channel in screen res 800x600 32bits.
:-\

visionastral

#90
Transparency doesn't works for the GUI too...
Tryed with D3D and DDraw, no result, it just ignores the Transparency propertie, neither thru the IDE than scripting.
It seems the new properties are just unplugged.
:P

Another bug:
If you flip a sprite inside a view, it will render ok in the preview and  in the game when the room fade-in too, but after that it desapears from the screen.
All the frames flipped will not render, the others (non-flipped), will render well.

Another one:
If you export a character and then re-import it else were, it will lose some properties like displacement speed x,y , wich is not very important, but what truely is important is you will lose an arbitrary number of sprites of your character and the view animations (walk animations) will be corrupted.

Lt. Smash

Also one:
When using an alpha transparent sprite as button image, it doesn't show correctly (even when the gui has an alpha channel). Only when the gui background image is fully transparent then the button image shows correctly as it should. (so my experience)

Pumaman

QuoteRegarding my problems with using the "run loops with dialog on screeen" issue:

The problem here is that the Repeatedly Execute event is not running because the script is blocked in the Dialog.Start call (see Understanding Blocking Scripts).

You'd have the same problem if you used a Wait() statement.

The workaround for this situation is to add a repeatedly_execute_always function to the room script. Since this runs on a separate script thread it will not be blocked and you can put your logic in there.

QuoteIf a line in the translation includes an escaped quotation mark ("), the translated line does not appear in the game, even though it is in the .trs file and translated properly. If I change the line in the game to include a single quotation mark instead of the escaped double, the translated line shows up while playing, but so does the backslash, if it is included in the .trs file.

Thanks for the report, I'll look into it.

QuoteTransparency doesn't work in characters at all, it just ignores it and shows the character fully opaque.
I'm using 32 bits sprites with alpha channel in screen res 800x600 32bits.

Currently AGS does not support using the Transparency property on alpha-channel sprites -- you can only have one type of transparency or the other. This is an area for future improvement.

QuoteIf you flip a sprite inside a view, it will render ok in the preview and  in the game when the room fade-in too, but after that it desapears from the screen.
All the frames flipped will not render, the others (non-flipped), will render well.

Can you be more specific? Flipped view frames are used very commonly in almost every character walking animation and seem to be working fine for me. Can you provide more details of what you're trying to do?

QuoteIf you export a character and then re-import it else were, it will lose some properties like displacement speed x,y

Thanks, I'll look into this.

Quotewhat truely is important is you will lose an arbitrary number of sprites of your character and the view animations (walk animations) will be corrupted.

I tried exporting and importing a character and it seemed fine. Can you provide an example of this?

QuoteWhen using an alpha transparent sprite as button image, it doesn't show correctly (even when the gui has an alpha channel). Only when the gui background image is fully transparent then the button image shows correctly as it should. (so my experience)

What do you mean, "doesn't show correctly"? Have you tried the new AdditiveOpacity option in the beta?

freshpaint

In re running loops behind dialogs  in room rep-ex:

I guess I thought the new "loops in background" feature would magically switch things around to run on the correct execution thread and read my mind too.  Renamed my room rep-ex functions to repeatedly_execute_always, removed the "rep-ex" from the sidebar list, and both examples now run perfectly.  THANKS.

A bug does remain: When the character passes through the tinted region he shows up properly tinted in 3d9, but not tinted in Directx5.

Lt. Smash

Quote from: Pumaman on Tue 12/08/2008 21:02:52
QuoteWhen using an alpha transparent sprite as button image, it doesn't show correctly (even when the gui has an alpha channel). Only when the gui background image is fully transparent then the button image shows correctly as it should. (so my experience)

What do you mean, "doesn't show correctly"? Have you tried the new AdditiveOpacity option in the beta?

Yes I tried AdditiveOpacity. No difference.
You can see the problem here:

Both buttons have the same sprite.
  The left button is on a completely transparent gui above the blue gui.
  The right button is put directly onto the blue gui. - You see that it doesn't show the transparency just black pixels?

Also pixel-perfect click detection doesn't work on the fully transparent parts. Even if I use top-left pixel when importing.
I'm using 1024x768.

visionastral

#95
Quote from: Pumaman on Tue 12/08/2008 21:02:52
Currently AGS does not support using the Transparency property on alpha-channel sprites -- you can only have one type of transparency or the other. This is an area for future improvement.
I'll have to live with that, I suppose  ;)  But, this apply to GUIs too?

Quote from: Pumaman on Tue 12/08/2008 21:02:52
Can you be more specific? Flipped view frames are used very commonly in almost every character walking animation and seem to be working fine for me. Can you provide more details of what you're trying to do?

I'll make a zip for it, but I must admit I am making huge animations with huge sprites (300x475,32b), so I suppose that's why I'm facing problems no one else has encounter before.
Could it be because of the sprites size?

Quote from: Pumaman on Tue 12/08/2008 21:02:52
I tried exporting and importing a character and it seemed fine. Can you provide an example of this?

I can't provide you an example of that (because of the size), but I have verified once again, and it makes the same:
I have a character with 31x8 animations (248 sprites)
Each sprites has a size of 300x475 in 32bits (with alpha channel, of course!  ;) )

When I export the character and reimport it, it creates a new sprite folder with only 160 sprites in it. (88 less!)

The loops of the main view have only 20 frames each (instead of 31)
And when you start the game, the animation is corrupted, instead of playing only the 20 frames and make a truncated animation, it seems AGS trys to make the entire animation but fails (because it hasn't load all the sprites of course) and replace the empty slots of animation (wich weren't visible in the IDE) with random sprites. (and I suppose this could lead AGS to crash in the case it weren't enough sprites else were)

However, the sprites wich do loaded are ok. (no corruption even with huge sprites like mines)

edit:
Each loop has the correct 20 first frames of the animation, but the rest isn't saved/loaded.
I suppose the code is analysing every loop and exporting each sprite used in each frame secuentialy.
I don't know if it's a bug exporting or importing the character, but it's clear it doesn't want to go farther than 20 frames...
The sprites missing match with the missing loop frames.

visionastral

About the flipping sprite disapearing, it's an issue with the THEORA plugin.
Sprites flipped don't render in screen if in the background there is a Theora video playing.
But this only happen with flipped sprites (weird) and with the Direct3D driver ON, not with DirectDraw5 driver...
I'll talk about this with the plugin creator, but perhaps it has something to do with the order things are drawn in screen, I don't know...
???

Pumaman

QuoteA bug does remain: When the character passes through the tinted region he shows up properly tinted in 3d9, but not tinted in Directx5

This happens in your Buggy Test game because tinting is not supported on 8-bit sprites, and Roger is 8-bit.
But because Direct3D does not support 8-bit, AGS automatically converts all 8-bit sprites to 16-bit when you're running in D3D mode, when then means that the tinting does work after all. So this isn't a bug as such, more a limitation of using 8-bit graphics in hi-colour games.

QuoteYes I tried AdditiveOpacity. No difference.
You can see the problem here:

What colour are the alpha-transparent pixels on that sprite? If they're black, then although the alpha channel is being additively added, the black pixels from the sprite will be overwriting the blue pixels on the GUI and you'll end up with opaque black pixels.

QuoteAlso pixel-perfect click detection doesn't work on the fully transparent parts. Even if I use top-left pixel when importing.

Pixel-perfect click detection does not apply to GUIs, only to characters and objects. This is because generally you want the entire area of a button to be clickable, and not just the parts that happen to have non-transparent pixels.

However, optionally supporting this on GUIs would be an interesting suggestion for a future version.

QuoteI'll have to live with that, I suppose    But, this apply to GUIs too?

Yes, it does. It's a limitation of the AGS DirectDraw rendering engine (but applied to D3D too for consistency); and is just something that there hasn't been a particular call from people to improve, so it hasn't been changed yet.

QuoteAbout the flipping sprite disapearing, it's an issue with the THEORA plugin.
Sprites flipped don't render in screen if in the background there is a Theora video playing.
But this only happen with flipped sprites (weird) and with the Direct3D driver ON, not with DirectDraw5 driver...

Interesting, glad you found the cause.

QuoteWhen I export the character and reimport it, it creates a new sprite folder with only 160 sprites in it. (88 less!)
The loops of the main view have only 20 frames each (instead of 31)

Ahh that explains it. AGS exports the character into a file format that is compatible with AGS 2.x, which only allowed 20 frames per loop -- therefore it's not surprising that it's corrupting it.
I'll look into a fix.

visionastral

#98
Quote from: Pumaman on Wed 13/08/2008 21:40:50
Yes, it does. It's a limitation of the AGS DirectDraw rendering engine (but applied to D3D too for consistency); and is just something that there hasn't been a particular call from people to improve, so it hasn't been changed yet.
Well, it could be usefull for doing things like making the GUI appear smoothly over the screen by transparency or (like my case) making a shadow sistem wich allow lighter or harder shadows related to the light of the room. I just made a semi-transparent shadow and load it already done, but it doesn't let me control de amount of hardness. Well, it's not that important after all (as I can do more sprites for that) however it could be usefull for plenty of things.

Another bug I found (sorry for that  ;) ) is, reading the scaling level of a point directly (using GetScalingAt(character.x, character.y) ) often give back the good scaling level, but not always!
I have done a function wich constantly read the scaling level of the player position in order to change the character.z value to match the actual position of the sprites foots in the distance (because by default the character.z isn't afected by scaling level).
If I use the character.Scaling for that, it's ok, no problem aplying the same scale to character.z
But when I use GetScaling directly, sometimes (quite often) it aparently get the wrong value:

Code:


int HeightAdj=10; // in my code this is a global variable I use as a constant for the correct placement of sprites

player.z=0-((player.Scaling*HeightAdj)/100);    //this works

player.z=0-((GetScalingAt(player.x, player.y)*HeightAdj)/100);   //this don't always work  :P

(you only have to put this code in the function repeatedly_execute() to see the diference between them)

EDIT: this seem to happen in rooms with active walk-behind zones. Don't know if it happen in room without walk-behinds.

This is important because I am making a function for being able to use sprites at diferent scales in order to use high definition sprites for the main characters but poor definition sprites for other non player characters.
By default, if I let the engine scale the sprites by itself, a sprite with 200 pixels height will always be bigger than a 100 pixels height sprite, as the engine asume them being at the same scale.
So, in order to use diferent resolutions sprites to render at the same screen size, I have to do it manualy using a custom propertie defined in each character ("scale" of course  ;) ) wich let my function know if this character have to be drawn in screen bigger than the others or not at this distance.
And the only way for me to know is using GetScalingAt, wich actualy don't always get right values.


Pumaman

Quote from: visionastral on Wed 13/08/2008 22:40:59
Well, it could be usefull for doing things like making the GUI appear smoothly over the screen by transparency or (like my case) making a shadow sistem wich allow lighter or harder shadows related to the light of the room. I just made a semi-transparent shadow and load it already done, but it doesn't let me control de amount of hardness. Well, it's not that important after all (as I can do more sprites for that) however it could be usefull for plenty of things.

Yeah, I agree that it would certainly have its uses. Feel free to post in the Wishlist thread about it.

QuoteAnother bug I found (sorry for that  ;) ) is, reading the scaling level of a point directly (using GetScalingAt(character.x, character.y) ) often give back the good scaling level, but not always!

Are you getting a bad value when the character is walking along the edge of a walkable area? It is possible that while moving, the character can skim the edge of the walkable area, and thus GetScalingAt(player.x,player.y) would return 100 (or whatever walkable area 0 was set to). Does this seem to be the problem you are having?

Quote
This is important because I am making a function for being able to use sprites at diferent scales in order to use high definition sprites for the main characters but poor definition sprites for other non player characters.
By default, if I let the engine scale the sprites by itself, a sprite with 200 pixels height will always be bigger than a 100 pixels height sprite, as the engine asume them being at the same scale.

Have you considered using the "Resolution" property of the sprites in the editor? You could set the low-resolution sprites to the "320x200" setting which would then lead the engine to automatically double their size in-game.

visionastral

About geting bad scaling values, I think this could be the reason I'm having wrong values, I'll have to check, but I'm pretty sure it might be that after thinking of it. Thank you!
About the "resolution" property of the sprites, once again you're right, it's the easiest method to do so thank you!
I have an inherent tendency to make things complicated and use to forget simple solutions  ;)
Thank you for reminding me to check ten times before starting to code complicated things xD

TheMagician

Bug Report:

with beta6 I change a new game to 640x480 resolution.
I then import a room background of 1000x1000 pixels.

1) Importing a walkable area mask of 1000x1000 pixels results in streched walkable areas (looks like the mask is imported with half of the resolution).

2a) Importing a walkbehind area mask of 1000x1000 pixels gives an error:
"Mask can't be imported: File size: 1000x1000, Background Size: 2000x2000".

2b) Importing a walkbehind area mask of 2000x2000 pixels results in streched walkbehind areas (looks like the mask is imported with half of the resolution).

Shane 'ProgZmax' Stevens

I actually received this report from someone outside the forums and have replicated it so I'm posting it here with reference images.  D3D mode does not appear to stretch uniformly when in fullscreen mode, and the results are pretty horrible:

Note that the left side of the screen is suffering from random under and over-stretching, while the right text is normal.


Here is the same image in ddraw fullscreen (with and without filters) for comparison.



Here you can clearly see the left side of the mouse cursor has been stretched an extra two pixels and the rectangular port item on the hull has been shifted up one pixel, revealing what is underneath.




Here is the same image in ddraw fullscreen (again with/without filters) for comparison.



This uneven stretching effect creates some strange things, like shifting the screen itself left a pixel or two.

Hopefully this can be fixed.

Pumaman

Quote1) Importing a walkable area mask of 1000x1000 pixels results in streched walkable areas (looks like the mask is imported with half of the resolution).

2a) Importing a walkbehind area mask of 1000x1000 pixels gives an error:
"Mask can't be imported: File size: 1000x1000, Background Size: 2000x2000".

2b) Importing a walkbehind area mask of 2000x2000 pixels results in streched walkbehind areas (looks like the mask is imported with half of the resolution).

Thanks for the bug report, it should be fixed in beta 7.

QuoteI actually received this report from someone outside the forums and have replicated it so I'm posting it here with reference images.  D3D mode does not appear to stretch uniformly when in fullscreen mode, and the results are pretty horrible:

Hmm, this looks like the same problem someone else reported earlier in the thread. I haven't been able to reproduce it myself, which leads me to believe it might be some sort of graphics-card-specific problem.

Would you be able to upload a game where this happens so that I can double-check on my system?


Anyway, beta 7 is now up. It fixes a few things and adds a few other things.

Dusk

Something bad happens with baselines - building an AGS 3.0 game with the latest beta, I'm seeing some objects that should be behind the character but are in front of it.

I suppose this is related to the hi-res change, but in the room editor baselines appear correctly doubled...  ???

Do you need other info?

RickJ

Quote
* Fixed error trying to save a game to a network share
There still remains the same problem when creating a new game, or compiling, running, building a game that exists on a network share.  Everything in the Build menu does the same.  Save game now works fine so if the same could be done for these other commands/functions that would be super!  Thanks ;)

Laukku

Quote* Added String.Replace
Yay! Good work, this will be useful!  ;D
You are standing in an open field west of a white house, with a boarded front door.
>WIN GAME
Congratulations! You just won! You got 0 out of 500 points.

Dualnames

I checked what came and got out, and if it matters, new version owns. Good job CJ.
Worked on Strangeland, Primordia, Hob's Barrow, The Cat Lady, Mage's Initiation, Until I Have You, Downfall, Hunie Pop, and every game in the Wadjet Eye Games catalogue (porting)

RickJ

GameAbort() Couple of minor observations

1.  The manual seems to describe an earlier version of game abort.  It's a minor issue but I thought you would like to know anyway.   

2.  It's pretty slick how it now opens the editor on the line where AbortGame() is executed.   This is perfect when executed in a Room or Global script.  It would also be useful if AbortGame had an option to open the script where the call is made to the function containing the AbortGame statement.  A module designer could use this option to call attention to incorrect usage in the module's users room and/global scripts rather than to the module code that detected the problem.   It's perhaps something to think about though... 

Spyros

Greetings to all!!!!
There has been many years since my last visit and I'm glad that I see AGS is still alive.
I'm getting the latest release just out of curiosity to see all the new Chris' improvements.

Gilbert

Who the **** are you?







Just kidding! := Nice to see you back! How's life?

It's been a very long time and AGS has gone through a long way in its development.

What will be next? the revival of some clan called GAGS?

Spyros

Life is difficult
I prefer the college years  ;D

No revival possible but I may try some 1 room AGS games (Do the community still make 1 room funny games?)

TheMagician

#112
The default game template that comes with beta 7 gives me two warnings:

"This game contains data from a plugin or component which you do not have installed"

It asks for "AudioManager" and "SampleComponent".

_____

Also a small question regarding scrolling in the script panel. My mouse (Logitech MX 1000) features two so called "Cruise Control" buttons directly above and beneath the scroll wheel.

They allow to scroll through long documents or webpages faster. Unfortunately they don't work in AGS. However, I undestand this is really not an important request.

Dualnames

That's someone I'd never guessed to see back again here. Wb. Never met you when you were here, but anyways. Kalos irthes.(greek greeting).
Worked on Strangeland, Primordia, Hob's Barrow, The Cat Lady, Mage's Initiation, Until I Have You, Downfall, Hunie Pop, and every game in the Wadjet Eye Games catalogue (porting)

Pumaman

Quote from: ProgZmax on Sat 30/08/2008 13:14:58
I actually received this report from someone outside the forums and have replicated it so I'm posting it here with reference images.  D3D mode does not appear to stretch uniformly when in fullscreen mode, and the results are pretty horrible:

Thanks for posting the game. I have managed to reproduce the problem, and unfortunately it seems to be the standard Direct3D scaling algorithm. If AGS tries to run the game at double-size (because the player's PC doesn't support 320x200) then D3D's stretching does this very annoying effect.

The only way I seem to be able to stop it doing this is to enable full-screen anti-aliasing, but obviously that then gives an effect that a lot of people wouldn't want being applied to their pixel art.
Unfortunately this seems to scupper any possibility of running D3D games at higher resolutions, which leaves us in the rather awkward position where a 320x200 game could basically be unplayable full-screen on 99% of PCs...

QuoteSomething bad happens with baselines - building an AGS 3.0 game with the latest beta, I'm seeing some objects that should be behind the character but are in front of it.

Can you be more specific, or post an example of the problem?

QuoteThere still remains the same problem when creating a new game, or compiling, running, building a game that exists on a network share.  Everything in the Build menu does the same.  Save game now works fine so if the same could be done for these other commands/functions that would be super!

Well, it's a different problem. Saving the game to a network share was completely broken in Windows let alone other operating systems.

The problem you're reporting seems to be specific to running under WINE, and the only way for me to get around it seems to be to basically ignore any errors that occur when getting a directory listing. This isn't something I want to do, because potentially important errors could end up getting ignored as a result.

Quote1.  The manual seems to describe an earlier version of game abort.  It's a minor issue but I thought you would like to know anyway.   

What do you mean? It seems ok to me.

Quote2.  It's pretty slick how it now opens the editor on the line where AbortGame() is executed.   This is perfect when executed in a Room or Global script.  It would also be useful if AbortGame had an option to open the script where the call is made to the function containing the AbortGame statement.  A module designer could use this option to call attention to incorrect usage in the module's users room and/global scripts rather than to the module code that detected the problem.   It's perhaps something to think about though... 

Well, what I do want to do is add support for the editor to display the call stack and let you browse through it, which would address that. Not sure which version that might make it into, though.

QuoteGreetings to all!!!!
There has been many years since my last visit and I'm glad that I see AGS is still alive.

Spyros!! Good to see you, it has been a while!

QuoteThe default game template that comes with beta 7 gives me two warnings:
"This game contains data from a plugin or component which you do not have installed"

Hehe thanks for this, my mistake. I'll get it fixed.

QuoteAlso a small question regarding scrolling in the script panel. My mouse (Logitech MX 1000) features two so called "Cruise Control" buttons directly above and beneath the scroll wheel.

They allow to scroll through long documents or webpages faster. Unfortunately they don't work in AGS. However, I undestand this is really not an important request.

Without knowing exactly what these buttons do or how they work, it's not something I can really spend any time on unfortunately.


Dusk

Quote from: Pumaman on Fri 05/09/2008 18:05:11
QuoteSomething bad happens with baselines - building an AGS 3.0 game with the latest beta, I'm seeing some objects that should be behind the character but are in front of it.

Can you be more specific, or post an example of the problem?


Here you are an example... no changes done to the working room (left), just opened the game with the beta and compiled (right).


Pumaman

Hmm, what is the baseline of that object set to?

Would you be able to upload the game that has this problem and PM me a link to it so I can investigate?

Dusk

Quote from: Pumaman on Sat 06/09/2008 12:02:36
Hmm, what is the baseline of that object set to?

The baseline is around 110 and gets correctly doubled for hi-res coords when opening with the beta. If I remember well, I tried to adjust it of one pixel down and then back up, forcing the room to save, but it didn't work.

Quote
Would you be able to upload the game that has this problem and PM me a link to it so I can investigate?

Mmm unfortunately the SOTE source folder is... huge. If I get to remove all the rooms except the one of the screenshot, a 250 Mb spriteset remains... I should remove the unused sprites too and that is quite time consuming. If you want I can try, but maybe it's easier if I try some stuff locally first, like creating a copy of the room from scratch (same graphic, same objects with same properties) and seeing what happens, for example. Or if you have any ideas of where to look/what to try, just ask :)

Pumaman

Ahh I think I've reproduced the problem now... thanks for reporting this, I'll get it fixed.

Dusk

Quote from: Pumaman on Sat 06/09/2008 14:21:34
Ahh I think I've reproduced the problem now... thanks for reporting this, I'll get it fixed.


Great, no messing with the strip-unneeded-stuff-from-the-game for me :)
Thankyou in advance for the fix!

D.

Shane 'ProgZmax' Stevens

Quote
The only way I seem to be able to stop it doing this is to enable full-screen anti-aliasing, but obviously that then gives an effect that a lot of people wouldn't want being applied to their pixel art.
Unfortunately this seems to scupper any possibility of running D3D games at higher resolutions, which leaves us in the rather awkward position where a 320x200 game could basically be unplayable full-screen on 99% of PCs...

Hmm, that does rather suck, though it doesn't really harm any 2d ags games to stick with ddraw.

Thanks for giving it a look, anyway.

Dualnames

Quote from: ProgZmax on Sat 06/09/2008 14:32:35
Quote
The only way I seem to be able to stop it doing this is to enable full-screen anti-aliasing, but obviously that then gives an effect that a lot of people wouldn't want being applied to their pixel art.
Unfortunately this seems to scupper any possibility of running D3D games at higher resolutions, which leaves us in the rather awkward position where a 320x200 game could basically be unplayable full-screen on 99% of PCs...

Hmm, that does rather suck, though it doesn't really harm any 2d ags games to stick with ddraw.

Thanks for giving it a look, anyway.


It's a good thing to notice, I think this should be added as a note in the manual section of d3d. So authors can put it in the readme and/or know what to do if they recieve a pm/mail.
Worked on Strangeland, Primordia, Hob's Barrow, The Cat Lady, Mage's Initiation, Until I Have You, Downfall, Hunie Pop, and every game in the Wadjet Eye Games catalogue (porting)

RickJ

Quote
Quote
1.  The manual seems to describe an earlier version of game abort.  It's a minor issue but I thought you would like to know anyway.   
What do you mean? It seems ok to me.
I was referring to the bit about the call stack and no mention of the script editor opening on the offending line.  But since the stack dump is going to be added back then I guess what's there is fine as you say.

Quote
Quote
2.  It's pretty slick how it now opens the editor on the line where AbortGame() is executed.   This is perfect when executed in a Room or Global script.  It would also be useful if AbortGame had an option to open the script where the call is made to the function containing the AbortGame statement.  A module designer could use this option to call attention to incorrect usage in the module's users room and/global scripts rather than to the module code that detected the problem.   It's perhaps something to think about though...

Well, what I do want to do is add support for the editor to display the call stack and let you browse through it, which would address that. Not sure which version that might make it into, though.
That of course would be very useful and necessary.  I don't mean to belabor the point here but would like to take the opportunity to clarify my previous comments.   Suppose the example function given in the manual was part of a module and it was called from a room script as shown below.

Module Script
Code: ags

function SomeModule::MakeWider(int newWidth) {
  if (newWidth < 10)
    AbortGame("newWidth expects a width of at least 10!");
}


Room Script
Code: ags

function SomeFunction() {
   SomeModule.MakeWider(20);
}


If the same person wrote the module and the room script then having the module script open and a stack dump isn't really a problem since the author will immediately recognize the module's code, would have an idea of what just happened, and would be able easily follow the stack dump to where the problem actually is.   If the module is adequately complex and is written by someone other than the game author then receiving the abort message and being directed to the innards of a complicated module could be more confusing than helpful (depending upon the game author's level scripting ability and experience).

My only point is that it would really be slick and cool if the module author had the ability specify that that particular AbortGame() open the script where the function is called from rather than where the function is defined.  In this example the room script is where the problem is and where one needs to go to fix it. For this particular example this will always be the case.   I think this situation is more common than not.   Perhaps when you get around to implementing the stack dump you may discover an easy way of adding this feature as well, but I'll leave that up to your good judgment as always. ;)

RickJ

Problem using optional parameters??

I can't seem to set an optional int parameter value to less than -31999 or greater than 32000.  I get the following error
Code: ags

Failed to save room room0.crm; details below
Thread.ash(152): Error (line 152): default parameter out of range


Line 152:  import function ThreadVar(short vx, int value = -32000);

Is this normal or a bug?  There is  nothing in the manual mentioned about it? 

Gilbert


Pumaman

QuoteHmm, that does rather suck, though it doesn't really harm any 2d ags games to stick with ddraw.

I've been doing some more investigation of this and as it turns out it is actually possible to get it working properly, it's to do with the pixel-texel mapping in D3D. So hopefully I should be able to put in a fix after all.

QuoteThat of course would be very useful and necessary.  I don't mean to belabor the point here but would like to take the opportunity to clarify my previous comments.   Suppose the example function given in the manual was part of a module and it was called from a room script as shown below.

Your point seems quite reasonable, I'll have a think about it when I get around to implementing the call stack.

QuoteI can't seem to set an optional int parameter value to less than -31999 or greater than 32000.  I get the following error

As Gilbot says this is by design, it's because optional parameters are an unofficial feature that were never designed to be used in custom scripts; had they been then the range would have been 32-bit.

RickJ

#126
Quote
As Gilbot says this is by design, it's because optional parameters are an unofficial feature that were never designed to be used in custom scripts; had they been then the range would have been 32-bit.
Fair enough.  I have figured a way round ;)   and I'm sorry for mucking up this trhread with such twitter.

I had the same need as Monsieur OUXX in the thread Gilbot posted, a null value for an int/short to determine if the parameter was specifed or not rather than using it to get a default value that would actually be used for something..  Thanks Gilbot, CJ...

Quote
The problem you're reporting seems to be specific to running under WINE, and the only way for me to get around it seems to be to basically ignore any errors that occur when getting a directory listing. This isn't something I want to do, because potentially important errors could end up getting ignored as a result.
I'm actually running under Windows 2000 virtual machine in VirtualBox on Kubuntu 8.04.   The current beta works splendidly in this environment as long as I keep everything on the virtual c: drive. 

VirtualBox uses a network mapped drive as a means of sharing files between Linux and Windows.   Files stored on such drives are accessible to both linux and windows applications while files on the virtual C: drive are accessible only from the windows virtual machine.   The virtual c: drive is just one massive file that exists on the linux partition.  I am not comfortable  keeping all my source files on C: because if something should ever happen to the virtual machine or to virtualbox  it could mean curtains for my bits.   If everything were accessible from the linux side then it would be a simple to have linux periodically make secure backups of everything on other machines in the house and this is why I am so interested in getting this to somehow work. 

Anyway with regard to your comments about this,  do you suppose that these problems are the result of some code or library that is common to both  VirtualBox and Wine or to some quirks, differences, or compatibility issues between windows and linux.   If it's something that could be fixed on the virtualbox end perhaps it would be worth passing on a description of the problem to the virtualbox folks and asking them to fix it or to suggest an alternative solution.   

Is there any possibility of having an experimental build that would  dump the errors and any other useful info into a file or something?  I would be glad to run any such experiments on my machine and gather the resulting data if that would that would be helpful in any way?   What do you think?

Dusk

Quote from: RickJ on Tue 09/09/2008 08:37:31
I'm actually running under Windows 2000 virtual machine in VirtualBox on Kubuntu 8.04.   The current beta works splendidly in this environment as long as I keep everything on the virtual c: drive. 

VirtualBox uses a network mapped drive as a means of sharing files between Linux and Windows.   Files stored on such drives are accessible to both linux and windows applications while files on the virtual C: drive are accessible only from the windows virtual machine.   The virtual c: drive is just one massive file that exists on the linux partition.  I am not comfortable  keeping all my source files on C: because if something should ever happen to the virtual machine or to virtualbox  it could mean curtains for my bits.   If everything were accessible from the linux side then it would be a simple to have linux periodically make secure backups of everything on other machines in the house and this is why I am so interested in getting this to somehow work. 

Have you tried sharing the game folder on C: and accessing it through samba from Linux?
This is what I've been doing with VMware from a long time ago (now I think there's some automatic feature to share stuff with the host system, but I've never tried it).
Another interesting setup I use at work to backup stuff on the network involves rsync for windows and backuppc on a linux server that automatically, periodically, gets stuff from computers on the network (VMs too) and does full/incremental backups. You might be interested. :)
I suppose that as long as you don't use particular features of VirtualBox but the Windows file sharing or rsync, all should work.

GarageGothic

Quote from: Pumaman on Sun 07/09/2008 20:23:22
QuoteI can't seem to set an optional int parameter value to less than -31999 or greater than 32000.  I get the following error

As Gilbot says this is by design, it's because optional parameters are an unofficial feature that were never designed to be used in custom scripts; had they been then the range would have been 32-bit.

Related to this, I'm curious if there is a proper procedure for setting default values for optional floats? It seems that optional parameters can't have any decimals but must be provided as ints. When I put an int default value for a float, it seems to accept it. However, when I try to display the value of the float afterwards, all I get is garbage characters. I managed to get it working for a function with nine optional float parameters, but only because it sets a default value of 31999 and the function only checks whether the parameter value is smaller than this (if not, it's ignored). Can I count on this method working consistently, or is it just a fluke that it does? Is there truly no way to set a float parameter to, for instance, 1.0 if the player doesn't input one himself?


RickJ

Thanks Dusk.  I have already tried Samba as you suggest and haven't been able to get that to work with virtualbox.   The problem with your other suggestion is that the windows VM may not be running all the time and so any backups it is scheduled to do may not happen when they are supposed to. 

Just to clarify my point a bit more:  The AGS editor, itself,  is able to navigate to the network drive and get a directory listing when doing an open operation or importing resources.  I am able to get a directory listing from the windows command prompt and using the windows file manager.   The other windows applications I have installed seem able to use the network drive without any problems.   The previously encountered and insurmountable problems encountered using WINE would appear to not exist because WINE isn't being used (unless of course if there is a common library or code base).   If AGS were able to build/run games residing on a network drive then it would be fully integrated with linux and work just like any other application in linux, windows, or virtual os hosted on my machine.   I would be willing to help conduct tests so as to collect debug information so that we may have a better understanding of what is  actually going on.  I would be willing to try an experimental build that ignored some or all the directory listing errors to determine what the practical consequences are.   I am curious as to the nature of the directory listing errors and what code was executed to generate them.  Perhaps there is another way of performing a directory lookup without getting errors.   

Sorry for being long winded but just to be clear I haven't posted in this thread to ask for help creating a cumbersome and/or complicated workaround, although Dusk, your ideas and comments are greatly appreciated.   I am posting here to provide CJ with  a clear explanation of the problems I have encountered using AGS, why I think they are important, and what advantages/disadvantages they were fixed/not fixed, so that he is able to make intelligent decisions about he wants to take AGS.  Peace everyone ;) ...

monkey0506

I seemed to recall that you could have a member function which returned a dynamic array. Now I get an error. It works fine for normal functions. Was I hallucinating about this or has this behavior changed?

Dusk

Quote from: RickJ on Tue 09/09/2008 20:41:49
Sorry for being long winded but just to be clear I haven't posted in this thread to ask for help creating a cumbersome and/or complicated workaround, although Dusk, your ideas and comments are greatly appreciated.   I am posting here to provide CJ with  a clear explanation of the problems I have encountered using AGS, why I think they are important, and what advantages/disadvantages they were fixed/not fixed, so that he is able to make intelligent decisions about he wants to take AGS.  Peace everyone ;) ...

Oh sure (peace! :D), I totally agree with you that solving the issue at the basis (the AGS directory listing code) is the best thing. But I can see that this fix might be low priority for CJ, regarding just a few users that work in particular environments, so maybe finding (not too complex) workarounds would not be that bad. I'm recently using Windows more than Linux just for AGS, and that's why I'm particularly interested in your tests (unfortunately I haven't time to actively partecipate trying something myself in these days).
About the backup scheduling thing, you might find useful to know (also not referring to this particular issue), that backuppc is designed to work in environments where machines aren't always on: for example, you can configure it to check each hour if a machine is up and backup it only after its previous backup has exceeded the one day age. By the way, if you tried to access with plain samba a shared folder on C: and it didn't work, I suppose that the same would occur with rsync (some virtual network issues of virtualbox maybe... you might want to portscan the VM to check that samba/rsync are properly listening from connections from the host machine).

Just another two cents of mine, :D
D.

Pumaman

QuoteAnyway with regard to your comments about this,  do you suppose that these problems are the result of some code or library that is common to both  VirtualBox and Wine or to some quirks, differences, or compatibility issues between windows and linux.   If it's something that could be fixed on the virtualbox end perhaps it would be worth passing on a description of the problem to the virtualbox folks and asking them to fix it or to suggest an alternative solution

The problem is that it's hard to tell where the problem lies. The error thrown is an internal .NET Framework error so the problem could be:
1. A bug in the .NET Framework when running in VirtualBox
2. A bug in Windows when running on VirtualBox that returns an invalid error code
3. A bug in the VirtualBox network/mapped drive driver, that returns an unexpected error code
4. Any/all of the above

so it's pretty hard to try and track this down.

Quote
Related to this, I'm curious if there is a proper procedure for setting default values for optional floats?

No, optional floats are not supported. Floats are 32-bit, and because the optional parameter default values are stored as 16-bit numbers this won't map properly to a float and the results will be unpredictable.

When I finally get around to rewriting the script compiler, I'll make sure that features like optional parameters are properly built in from the start and supported, but until then you can always use the workaround of creating two functions:

function MyFunction(float someValue) {
...
}

function MyFunctionDefault()
{
  MyFunction( PUT DEFAULT VALUE HERE );
}

A bit messy but it works!!

GarageGothic

Quote from: Pumaman on Wed 10/09/2008 18:50:39No, optional floats are not supported. Floats are 32-bit, and because the optional parameter default values are stored as 16-bit numbers this won't map properly to a float and the results will be unpredictable.

Ok, thanks for clarifying. For now my code seems to work since it doesn't actually use the default for anything except checking whether the player has entered a value or not.

Quotebut until then you can always use the workaround of creating two functions [...]
A bit messy but it works!!

In my case a bit too messy, I'm afraid. My function returns the maximum value out of nine optional float parameters, so MaxFloatValue(float value1, float value2, float value3,  float value4, float value5, float value6, float value7, float value8, float value9) would have to be broken into 8 different functions. If I find that the optional floats cause problems, I'll just create an initial int parameter to specify how many floats to compare.

I also have a question: Is there any way to modify a String using an extender function? Whenever I try to set "this = "blablabla", I'm told that it's a static pointer. I ask because I'm writing a linebreaking function, which I would like to return the first line of the broken String and update the original String to contain the remaining text, but it doesn't seem to be possible.

monkey0506

Quote from: GarageGothic on Wed 10/09/2008 19:08:42My function returns the maximum value out of nine optional float parameters

You could use a dynamic array to do this:

Code: ags
float fmax(float farr[], int size) {
  if ((farr == null) || (size <= 0)) return 0.0; // or whatever you use as your "null" value for floats
  int i = 1;
  float fm = farr[0];
  while (i < size) {
    if (farr[i] > fm) fm = farr[i];
    i++;
  }
  return fm;
}

float farr[] = new float[5];
farr[0] = 1.8;
farr[1] = 9.76;
farr[2] = 3.14;
farr[3] = 5.0;
farr[4] = 4.52;
fm = fmax(farr, 5);

GarageGothic

Thanks for the suggestion, monkey. The point of the functions was mainly to reduce the number of lines in the rest of the script (mostly I never call it on more than two or three values at a time anyway), and initializing the array gets messy. If your function needs to know the size of the array anyway, I might as well just add the number of floats parameter to the beginning of my function to avoid trouble.

monkey0506

Well there's currently no way to get the size of a dynamic array. Other than that it's only one line more (in the caller function) to use an array versus regular float variables. Though you have a fair point. Sorry it didn't work out. Good luck with whatever you're doing. ;)

Pumaman

Quote from: GarageGothic on Wed 10/09/2008 19:08:42
I also have a question: Is there any way to modify a String using an extender function? Whenever I try to set "this = "blablabla", I'm told that it's a static pointer. I ask because I'm writing a linebreaking function, which I would like to return the first line of the broken String and update the original String to contain the remaining text, but it doesn't seem to be possible.

You should be able to use String extender functions, but remember that you can't modify the contents of a string. That's why all the built-in functions like Replace and LowerCase return a new copy of the string with the requested changes.

GarageGothic

Quoteremember that you can't modify the contents of a string

Thanks, this is what I wanted confirmed. I'll just have the linebreak function return the index position of the linebreak instead and perform the splitting of the String in the calling function.

Pumaman

Ok, beta 8 is now up. This fixes the stretched pixels with D3D, adds graphic filters for D3D and a script call stack.

I think this is about as much as I want to add to 3.1 now, so the next release will probably be RC1.
Please give the native co-ordinate stuff a go and let me know of any outstanding problems.

monkey0506

When I manually abort the game using AbortGame I get an error and the call stack, but the call stack pane at the bottom sits on top of the script making it impossible for me to see the line in question without closing the call stack pane (since it's one of the last lines in the script). IIRC the error pane used to shorten the length of the script pane didn't it?

Shane 'ProgZmax' Stevens

Nice work getting d3d to stretch properly, CJ!

GarageGothic

#142
I was playing around with the beta 8 editor and managed to crash it while testing my game. I'm not sure what exactly caused the crash, but I was dragging some lens effect objects (that use DynamicSprites created from the background) outside the screen limits. There does seems to be an error in my own SafeCreateFromBackground code, which is supposed to calculate sprite offsets to avoid invalid coordinates, because while trying to trigger the crash again I got an "Invalid coordinates" message from the debugger. But still, that shouldn't make the editor crash. I can't reproduce the bug consistently, but I've managed to do it three times now (out of ten or so attempts).

First, I get this message, twice:

QuoteError: Object reference not set to an instance of an object.
Version: AGS 3.1.0.55

System.NullReferenceException: Object reference not set to an instance of an object.
   at AGS.Editor.CallStackPanel.RefreshList()
   at AGS.Editor.CallStackPanel.set_CallStack(DebugCallStack value)
   at AGS.Editor.GUIController.ShowCallStack(DebugCallStack callStack)
   at AGS.Editor.AGSEditor._debugger_BreakAtLocation(DebugCallStack callStack)
   at AGS.Editor.DebugController._communicator_MessageReceived(XmlDocument doc)
   at AGS.Editor.EngineCommunication._watcher_Changed(Object sender, FileSystemEventArgs e)
   at System.IO.FileSystemWatcher.OnChanged(FileSystemEventArgs e)
   at System.IO.FileSystemWatcher.NotifyFileSystemEventArgs(Int32 action, String name)
   at System.IO.FileSystemWatcher.CompletionStatusChanged(UInt32 errorCode, UInt32 numBytes, NativeOverlapped* overlappedPointer)
   at System.Threading._IOCompletionCallback.PerformIOCompletionCallback(UInt32 errorCode, UInt32 numBytes, NativeOverlapped* pOVERLAP)

Then a normal Windows crash message shows up ("AGS Editor for windows has generated errors and will be closed"). The crash data that it offers to send to Microsoft are:

QuoteEventType : clr20r3     P1 : agseditor.exe     P2 : 3.1.0.55     P3 : 48c972db
P4 : agseditor     P5 : 3.1.0.55     P6 : 48c972db     P7 : 46a     P8 : 90
P9 : system.nullreferenceexception

(Not sure if you can use the latter for anything.)

Then the editor closes and leaves me with a frozen game window. Since the game itself doesn't crash, no CrashInfo.dmp is created.

Pumaman

Quote from: monkey_05_06 on Thu 11/09/2008 21:11:38
When I manually abort the game using AbortGame I get an error and the call stack, but the call stack pane at the bottom sits on top of the script making it impossible for me to see the line in question without closing the call stack pane (since it's one of the last lines in the script). IIRC the error pane used to shorten the length of the script pane didn't it?

Oops thanks, I'll fix that.

QuoteI was playing around with the beta 8 editor and managed to crash it while testing my game. I'm not sure what exactly caused the crash, but I was dragging some lens effect objects (that use DynamicSprites created from the background) outside the screen limits. There does seems to be an error in my own SafeCreateFromBackground code, which is supposed to calculate sprite offsets to avoid invalid coordinates, because while trying to trigger the crash again I got an "Invalid coordinates" message from the debugger. But still, that shouldn't make the editor crash. I can't reproduce the bug consistently, but I've managed to do it three times now (out of ten or so attempts).

Hmm I haven't managed to reproduce this yet. Can you run the game without the debugger (Ctrl+F5), and see what error you get?

GarageGothic

Quote from: Pumaman on Sat 13/09/2008 14:46:36Hmm I haven't managed to reproduce this yet. Can you run the game without the debugger (Ctrl+F5), and see what error you get?

I cannot reproduce it when the debugger is turned off. Instead, I consistently get the error message:

Quotein "GlobalUtilities.asc", line 174
from "RefractObjects.asc", line 421
from "RefractObjects.asc", line 684

Error: DynamicSprite.CreateFromBackground: invalid co-ordinates specified

Which is also what I get about half the time I try to reproduce it with the debugger turned on. I managed to track down the bug in my own code (it turned out that the area I was retrieving was one pixel too wide because I didn't take into consideration that the top left pixel is 0,0 and not 1,1) and no longer get the bug, so I can only think it's directly related to calling DynamicSprite.CreateFromBackground on an area that is outside the room edges.

I did keep the original code in case you want to see it, but my test room is pretty messy (I use a debug function to drag objects and characters around on the screen with the mouse) so I'm not sure if anybody else would be able to reproduce the error.


Lt. Smash

1 BUG: Importing a single sprite with any corner as transparent, changes all black pixels in the sprite to the color of the corner pixels.
1 SUGGESTION: When importing multiple sprites, I would like to be able to choose the transparency settings once for all of them.

Adamski

The new Direct 3D scaling options seem to do some weird things! In 'Nearest Neighbour' mode there's some crazy mix-resolution thing going on, and characters and objects are all blurred and horrible. In 'Anti-Alias' mode, you can see black outlines of the walk-behind areas everywhere. I can drop some screenshots in a PM if it's helpful?

Shane 'ProgZmax' Stevens

CJ, I get this error exclusively in D3d mode in my game after executing a series of Lockview animations. 
I have confirmed that this does not occur in ddraw mode, however.  It's strange because it had no problem with other animation sequences up to that point.


This is with D3d mode with the 2x filter windowed.

---------------------------
Illegal exception
---------------------------
An exception 0xC0000005 occurred in ACWIN.EXE at EIP = 0x00000A0D ; program pointer is +32, ACI version 3.10.1042, gtags (4,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.



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

An error file CrashInfo.dmp has been created. You may be asked to upload this file when reporting this problem on the AGS Forums. (code 0)
---------------------------
OK   
---------------------------

Pumaman

QuoteWhich is also what I get about half the time I try to reproduce it with the debugger turned on. I managed to track down the bug in my own code (it turned out that the area I was retrieving was one pixel too wide because I didn't take into consideration that the top left pixel is 0,0 and not 1,1) and no longer get the bug, so I can only think it's directly related to calling DynamicSprite.CreateFromBackground on an area that is outside the room edges.

I did keep the original code in case you want to see it, but my test room is pretty messy (I use a debug function to drag objects and characters around on the screen with the mouse) so I'm not sure if anybody else would be able to reproduce the error.

Hmm, it seems like the editor is having trouble parsing the call stack when the game quits with the error ... but I've tried this a few times myself and haven't been able to get it to crash.

Would you be able to upload the test game that caused this so that I can see if I can get it to crash too?

Quote1 BUG: Importing a single sprite with any corner as transparent, changes all black pixels in the sprite to the color of the corner pixels.
1 SUGGESTION: When importing multiple sprites, I would like to be able to choose the transparency settings once for all of them.

Can you post a sample image file that causes the bug?

As for multiple sprites, when you do a Quick Import Multiple Sprites it should use the transparency option that was last selected in the import window.

QuoteThe new Direct 3D scaling options seem to do some weird things! In 'Nearest Neighbour' mode there's some crazy mix-resolution thing going on, and characters and objects are all blurred and horrible. In 'Anti-Alias' mode, you can see black outlines of the walk-behind areas everywhere. I can drop some screenshots in a PM if it's helpful?

I can reproduce the anti-aliased mode black outlines, which I'll look into ... but I don't get any problems in Nearest Neighbour mode ... could you post a screenshot of that, and what resolution and colour depth is your game?

QuoteCJ, I get this error exclusively in D3d mode in my game after executing a series of Lockview animations. 
I have confirmed that this does not occur in ddraw mode, however.  It's strange because it had no problem with other animation sequences up to that point.

Any chance you could upload the CrashDump file, or post the game that this happens in for me to reproduce it?

Lt. Smash

Quote from: Pumaman on Sun 14/09/2008 15:03:45
Quote1 BUG: Importing a single sprite with any corner as transparent, changes all black pixels in the sprite to the color of the corner pixels.
1 SUGGESTION: When importing multiple sprites, I would like to be able to choose the transparency settings once for all of them.

Can you post a sample image file that causes the bug?
here:
normal sprite      sprite imported with top left pixel as transparent.

Quote
As for multiple sprites, when you do a Quick Import Multiple Sprites it should use the transparency option that was last selected in the import window.
I know that but its not very comfortable with many animations. Because I have some with alpha-transparency, some with blue/pink transparent areas, some with transparent pixels only on the bottom left/right. So I always have to import a single sprite first before I can import the rest? Not very easy/fast.

Pumaman

I just tried importing that image using top-left transparency and it seemed to import correctly.

Are you sure that PNG file is the exact same one you were trying to import?

Lt. Smash


subspark

Quote
* Added 4x Nearest Neighbour filter to allow 320x200 games to easily be run on widescreen monitors at 1280x800
* Fixed D3D causing stretched pixels if it ran a 320x200 game at 640x400


Thankful very much Chris. Your a brilliant programmer/designer/manager! Love your work on this version. It will allow sharp graphics at 2560x1600. I truly appreciate your support for these newer formats.
Cheers,
Sparx.

Pumaman

Quoteits this one

Ok thanks, I get the problem with that one; probably something to do with it being an 8-bit image. I'll look into it.

subspark, thanks, I'm glad you appreciate it :)

GarageGothic

#154
Quote from: Pumaman on Sun 14/09/2008 15:03:45Hmm, it seems like the editor is having trouble parsing the call stack when the game quits with the error ... but I've tried this a few times myself and haven't been able to get it to crash. Would you be able to upload the test game that caused this so that I can see if I can get it to crash too?

I managed to recreate the issue with a single line of code, but it behaves very inconsistently. In my game-in-progress, half the time it triggers a scripting error message from the debugger, half the time it simply crashes the editor. When I add the line to a newly created default game and run it with the debugger, the game may give the correct error a couple of times. But if I keep testing, the game starts locking up and must be ended through the task manager. If I run the same game without the debugger, the game always aborts with the correct error message (invalid coordinates).
For a long time I thought I couldn't replicate the editor crash with a newly created game, but it simply took one more step: After experiencing the frozen game, try opening another (or the same) game in the editor. The editor will crash with the "Error: Object reference not set to an instance of an object" message reported above.

The line causing the problems (in a 640x480 32-bit game) is:
Code: ags
DynamicSprite.CreateFromBackground(0, 600, 100, 41, 80);


Edit: Later in the evening I experienced the same type of engine crash after calling DynamicSprite.Resize with a zero width/height.

RickJ

#155
Quote
The problem is that it's hard to tell where the problem lies. The error thrown is an internal .NET Framework error so the problem could be:
1. A bug in the .NET Framework when running in VirtualBox
2. A bug in Windows when running on VirtualBox that returns an invalid error code
3. A bug in the VirtualBox network/mapped drive driver, that returns an unexpected error code
4. Any/all of the above
Thanks for the info.  I have done a little research and it would appear that the "No more files" exception is thrown when .net attempts to get a list of files from an empty network maped directory as illustrated in the code below.   I found this mentioned in this  MSDN Forum post describing the same problem.

Code: ags

String[] files = Directory.GetFiles("\\localhost\myfolder","abc*.exe", SearchOption.AllDirectories);


I have discussed this with smiley, who created the audio manager plug-in.  He and I ran a number of tests to confirm that this is indeed the behavior.   It would appear that ignoring the "No more files" exception on a network drive is, more likely than not, acceptable and would allow the .NET Directory.GetFiles function to work the same on both networked and local drives. 

I hope this info is useful to you.  I'll leave it up to your own good judgment as how to proceed from here.   I will be happy to volunteer as a tester or volunteer to create an old style C dll if you decide to pursue this issue further.  Thanks for all your hard work;  it's greatly appreciated.   

Rick

Pumaman

QuoteI managed to recreate the issue with a single line of code, but it behaves very inconsistently. In my game-in-progress, half the time it triggers a scripting error message from the debugger, half the time it simply crashes the editor

I didn't manage to reproduce this myself; but the debugger has been rather dodgy because of the way it was communicating between the editor and the engine.

For beta 9 I have rewritten this to use a different method, so can you let me know whether you still get the problem?

QuoteI have discussed this with smiley, who created the audio manager plug-in.  He and I ran a number of tests to confirm that this is indeed the behavior.   It would appear that ignoring the "No more files" exception on a network drive is, more likely than not, acceptable and would allow the .NET Directory.GetFiles function to work the same on both networked and local drives. 

The problem is that it's not possible to easily ignore this exception. The exception type is a "IOException" which is quite generic, and if it ignored that then real errors would not get picked up.

It's not possible to filter on the "No more files" message, because on non-English versions of Windows that message will be localized.

Therefore I'm not sure how to address this. Maybe I could add an "unofficial" registry setting or something which would allow the editor to ignore this exception, making it a "use at your own risk" type feature.



Anyway, beta 9 is now up. Originally this was going to be a Release Candidate, but I ended up doing two quite major things (custom dialog options, and rewriting the debugger communication) so I think it needs a bit longer to be tested.

monkey0506

I'm pretty excited about the new custom dialog system. It seems like it might be a bit complicated for the end-user (say if they want a scrolling dialog), but modules could be written to encapsulate and simplify the code...provided the dialog_options_* functions are available from scripts other than the global script (not yet tested).

Thanks for your hard work on this Chris!

Lt. Smash

wow the new custom dialog system is great.
Just a little grafical issue:

When a text is displayed in a textwindow (Display("asdf");) you can erase the dialog gui.

monkey0506

I think it's removing the dialog DrawingSurface from the screen but then displaying the text box before the screen is actually graphically updated.

Pumaman

QuoteI'm pretty excited about the new custom dialog system. It seems like it might be a bit complicated for the end-user (say if they want a scrolling dialog), but modules could be written to encapsulate and simplify the code...provided the dialog_options_* functions are available from scripts other than the global script (not yet tested).

Yeah, the scripting involved is relatively complex; but what it does is provides the ability for module authors to create an icon-based dialog system / scrollable dialog / etc, rather than having to wait months for me to get around to adding support into AGS itself.

QuoteWhen a text is displayed in a textwindow (Display("asdf");) you can erase the dialog gui.

I'll update the docs to mention this -- basically the four custom dialog functions all run on the rep_exec_always thread which means they shouldn't call any blocking commands. The mouse_click one for example should only really be used to update the way the options are displayed, not to try and do any game tasks.

That Display() call in the example is just a placeholder line that you'd replace with your own code.

GarageGothic

#161
I can confirm that the debugger related crashes no longer occur in beta 9. I also experience less of a framerate drop when running with the debugger than I did before, but perhaps that's just my imagination. Anyhow, great work, CJ!

Wow, the new dialog option display system looks great. Just the kind of customizability I've been hoping for almost since I started using AGS. Would it be too much to ask for a similar feature covering the actual execution of the dialog? Such as:

Code: ags
on_character_say(Character* Char, String dialog)


That would, for instance, let you display each dialog lines in any way you like, change talking views to reflect emotion (you would need some special functionality to play back the talking animation lipsynced though) or parse dialog to a conversation log - the main reason that I currently use my own Say function and don't benefit from the built-in dialog scripting, since every topic would just contain a dialog_request call anyway.

RickJ

Quote
It's not possible to filter on the "No more files" message, because on non-English versions of Windows that message will be localized.
Smiley sent me the following PM today likely in response to your comments ...

Quote from: smiley
since I think it's a WinAPI error, it might be possible to get an error code from GetLastError() and use this to filter it. Sorry for not thinking about that before.

http://ueberlicht.googlepages.com/test.exe
Same procedure: insert the path to the share into the textbox.

You should get a message box with an error code.
(I hope it's '18', because that's the error code for ERROR_NO_MORE_FILES.)
I tried his test and indeed it returned an error code of 18 as he expected it to do.  So perhaps this is the solution you seek?   

Again hope this is helpful...

Lt. Smash

#163
Here are two suggestion for AGS 3.1:
- Seperation of gui-, character- and global script. Only virtually for the user to be in an extra page. Actually the codes ARE in the global script but the user can't see them, as they are only shown in the EDIT GUI SCRIPT/EDIT CHARACTER SCRIPT panes. (more info here: link)
- To make translation easier there could be a table in the AGS editor (similar to General Settings). On the left side original language, to the right the translated version. Just as a simple replacement of the "Currently you cannot edit translations within the editor..."

RickJ

Quote
- Seperation of gui-, character- and global script. Only virtually for the user to be in an extra page. Actually the codes ARE in the global script but the user can't see them, as they are only shown in the EDIT GUI SCRIPT/EDIT CHARACTER SCRIPT panes. (more info here: link)
This was discussed in the following thread:
http://www.adventuregamestudio.co.uk/yabb/index.php?topic=35370.0

Dusk

Quote from: Lt. Smash on Mon 22/09/2008 19:06:39
- To make translation easier there could be a table in the AGS editor (similar to General Settings). On the left side original language, to the right the translated version.

Mmmm often who translates is not part of the development team of a game, so it's a good thing that he doesn't need AGS nor the source of the game to do the translation, but only a text editor.

A step forward regarding translations would be maybe changing the file format so that you could use some popular software internationalization tools to handle them.

Collaborative translation web-apps, for example, might speed up the translation of big games.

Just an idea, absolutely not a feature request :)

D.

Pumaman

QuoteI can confirm that the debugger related crashes no longer occur in beta 9. I also experience less of a framerate drop when running with the debugger than I did before, but perhaps that's just my imagination. Anyhow, great work, CJ!

Excellent, glad to hear it!

By the way, if anyone has any problems with the debugger in this beta, please do report them so I can make sure it's all working properly ;)

Quoteit be too much to ask for a similar feature covering the actual execution of the dialog? Such as:
on_character_say(Character* Char, String dialog)

Yeah, this is certainly a possibility for the future. It's more complicated though, and I'd have to plan out how to fit it into the system.

Quote(I hope it's '18', because that's the error code for ERROR_NO_MORE_FILES.)

I tried his test and indeed it returned an error code of 18 as he expected it to do.  So perhaps this is the solution you seek?   

Thanks, I'll look into that.

Quote- To make translation easier there could be a table in the AGS editor (similar to General Settings). On the left side original language, to the right the translated version. Just as a simple replacement of the "Currently you cannot edit translations within the editor..."

Well, as Dusk says it's not normally the game author who does the translating, but it could be useful just to use for reviewing the translated lines.

QuoteA step forward regarding translations would be maybe changing the file format so that you could use some popular software internationalization tools to handle them.

If you can point me towards what the most popular tool(s) are for this, I can investigate compatibility with them.

Dusk

Quote from: Pumaman link=topic=35028.msg467048#msg467048
QuoteA step forward regarding translations would be maybe changing the file format so that you could use some popular software internationalization tools to handle them.

If you can point me towards what the most popular tool(s) are for this, I can investigate compatibility with them.

I found an interesting list of tools here.
It seems that the most popular formats involved in software localization (and supported by most tools) are PO and the XML-based XLIFF.

bye :)

Rulaman

Look at
http://www.adventuregamestudio.co.uk/yabb/index.php?topic=33293.0

This is no automatic translation program, but you can get a good overview over the progress. ;D
Zak: Komm mit mir Sushi.
Zak: Come with me Sushi.

Dualnames

Ok, well, I found this weird thing. My resolution is 640x480.

However I'm using low-res coordinates(320x200).
When I imported the game from 3.02, all walk-behinds were disabled(not actually, but that was what you saw). Ok so i disabled low res, then walk behinds worked but GUI's and characters were placed in the wrong place.
So I went at the original (3.02) changed res to 320x200 and imported with beta 9. That worked.(low res coordinates true).

So why do I have to do that? Can't I just stick to 640x480? If I transpose the game to 320x200 it will not allow it to be played to windowscreen. And I want to upgrade to 3.1 because I want to use change translation feature. So any chance that I could still use 640x480? I'm thinking that some of those filters could do the trick..
Worked on Strangeland, Primordia, Hob's Barrow, The Cat Lady, Mage's Initiation, Until I Have You, Downfall, Hunie Pop, and every game in the Wadjet Eye Games catalogue (porting)

Pumaman

QuoteI found an interesting list of tools here.
It seems that the most popular formats involved in software localization (and supported by most tools) are PO and the XML-based XLIFF.

Thanks. Realistically, this probably isn't something I'll be adding to AGS with a high priority, however.

QuoteLook at
http://www.adventuregamestudio.co.uk/yabb/index.php?topic=33293.0

This is no automatic translation program, but you can get a good overview over the progress.

Good work there, looks like a really useful tool :)

QuoteHowever I'm using low-res coordinates(320x200).
When I imported the game from 3.02, all walk-behinds were disabled(not actually, but that was what you saw). Ok so i disabled low res, then walk behinds worked but GUI's and characters were placed in the wrong place.
So I went at the original (3.02) changed res to 320x200 and imported with beta 9. That worked.(low res coordinates true).

Can you explain that again, in more detail? I'm not sure what you mean.

What do you mean by "all walk-behinds were disabled(not actually, but that was what you saw)"?

QuoteSo why do I have to do that?

You shouldn't have to do anything, it should just work.
So, if there's a problem, I need to investigate it.
Therefore, please provide more details about the problem. If it's possible to upload a sample game that demonstrates the problem when imported into the beta, that'd be really useful.

Dualnames

Ok, well the game is using 640x480 resolution at AGS 3.02.

When I import at the beta all the walkbehinds change position.

This is happening, my guess, because almost all the game backgrounds and sprites use the 320x200.
So, when I change the value of -use low coordinates- to false, the GUI's mess up and the characters as well.

However if I change the original's reso to 320x200 and import to the AGS beta, everything is solved but sorta doesn;t make the game so easy to play on window mode.
Worked on Strangeland, Primordia, Hob's Barrow, The Cat Lady, Mage's Initiation, Until I Have You, Downfall, Hunie Pop, and every game in the Wadjet Eye Games catalogue (porting)

GarageGothic

Since there won't be a major overhaul of the translation feature any time soon, I have one small suggestion:

When I worked as a professional localization tester, we were constantly running into problems of strings not having unique IDs. For instance a simple adjective like "New" could be re-used multiple times in the English GUI text, but in French or Italian it would need different forms depending on what it's referring to (new game, new player profile etc.). Since AGS directly translates strings based on content, there's really no way of distinguishing between these. So, what I'd like to suggest would be a new - and fully documented - masking symbol that would allow you to insert comments/IDs into strings, which wouldn't be displayed in-game and would be ignored in String.Length and GetTextWidth calculations. For instance:

Code: ags
lblNewGame.Text = "New^MAINMENU^"


and

Code: ags
lblNewProfile.Text= "New^PLAYERPROFILE^"


would become two unique Strings in the translation source despite displaying the same text in-game.

Pumaman

QuoteOk, well the game is using 640x480 resolution at AGS 3.02.

When I import at the beta all the walkbehinds change position.

This is happening, my guess, because almost all the game backgrounds and sprites use the 320x200.

Ok, here's what I tried:
1. Created a new 320x200 game in 3.0.2
2. Imported a background and set up some walk-behinds in a new room.
3. Changed resolution to 640x480
4. Ran game (all fine)
5. Imported game into 3.1 beta 9
6. Opened the room
7. All walk-behinds look fine

Would you be able to upload the 3.0.2 version of the game that's causing the problem so that I can investigate it?

QuoteSo, when I change the value of -use low coordinates- to false, the GUI's mess up and the characters as well.

Yes, I would expect that to happen. If you change that setting, then obviously all the X/Y/Width/Height values will change their meaning, so you'd have to adjust all your scripts to compensate.

QuoteHowever if I change the original's reso to 320x200 and import to the AGS beta, everything is solved but sorta doesn;t make the game so easy to play on window mode.

If your game is designed for 320x200, then you should leave it set to 320x200 in AGS, and use the Graphic Filter option in Setup to play it in a larger window.

QuoteWhen I worked as a professional localization tester, we were constantly running into problems of strings not having unique IDs. For instance a simple adjective like "New" could be re-used multiple times in the English GUI text, but in French or Italian it would need different forms depending on what it's referring to (new game, new player profile etc.). Since AGS directly translates strings based on content, there's really no way of distinguishing between these. So, what I'd like to suggest would be a new - and fully documented - masking symbol that would allow you to insert comments/IDs into strings, which wouldn't be displayed in-game and would be ignored in String.Length and GetTextWidth calculations. For instance:

lblNewGame.Text = "New^MAINMENU^"

I don't think there's any need for a special feature here, really. You could use that script with the ^ characters in, and then create two translations, English and French.

In the English translation you'd simply translate that line to "New" and leave the rest of the lines blank.
In the French translation you'd translate all the lines into whatever they needed to be.

Dualnames

It seems that well, I'll just downgrade the reso to 320x200 whenever 3.1 becomes stable.. Thanks for taking time to answer my questions Chris. Well, for the feature of translation and other goodies it's definetely worth doing so.
Worked on Strangeland, Primordia, Hob's Barrow, The Cat Lady, Mage's Initiation, Until I Have You, Downfall, Hunie Pop, and every game in the Wadjet Eye Games catalogue (porting)

Pumaman

Well, the problem is that if problems are reported but I'm not able to solve them, then 3.1 will never become stable. So would you mind uploading the 3.0.2 version of the game so that I can investigate the problem?

RickJ

Nested While Loop Check
I don't know if this is known or not so I thought i would report it just in case.  I had situation where I called a function from within an infinite while loop (unintentionally of course  :=).   The function that was called also contained a while loop but this while loop worked just like it was supposed to and did not have any problems. 

The infinite loop (in MyFunction) caused a run-time exception as one would expect, however, the editor pointed me to the while loop, that was working correctly, an located in the called function (dosomething).   I stared at the dosomething() code for a long time thinking there must be something really obvious wrong  :(.

I finally took a break and went for a walk with my cat who told me that if there aren't any birds in the tree you may as well hunt somewhere else.   So that's exactly what I did when I got back to the computer.  I looked at the place from where dosomething() was called and lo and behold it was being called from within a sometimes infinite while loop.

There error message was correct but it pointed to the wrong place and was therefore confusing.   I should have known better I guess but I always suspect my self first and the compiler last.   Anyway here is an illustration of the situation. 

Code: ags

function dosomething() {
     int i = 0;
     while (i<SOMETHING)( {
          // Do something here
          i++;
     }   // Game aborts with infinite loop message and opens editor on this line
} 

function MyFunction() {
     int i = 0;
     while (i<SOMETHING)( {
          // Do something here    
     }
}


I'm one beta version behind so I didn't have the benefit of the call stack but I pretty much knew where dosomething() was being called from.   There is not much that can be done to makeup for programmer stupidity but perhaps this info will help you think of something.    ;D

Dualnames

Quote from: Pumaman on Tue 30/09/2008 19:25:59
Well, the problem is that if problems are reported but I'm not able to solve them, then 3.1 will never become stable. So would you mind uploading the 3.0.2 version of the game so that I can investigate the problem?


Referring to my condition, I'd like to say that concerning game backgrounds, everytime I imported one of them , I set the resolution at 320x200 and then changed to 640x480. And all sprites are 320x200. Does, that give any ideas? Try doing so. And if walkcycles are working fine on 3.1 I'll send you the version.
Worked on Strangeland, Primordia, Hob's Barrow, The Cat Lady, Mage's Initiation, Until I Have You, Downfall, Hunie Pop, and every game in the Wadjet Eye Games catalogue (porting)

monkey0506

Quote from: RickJ on Wed 01/10/2008 22:13:56Nested While Loop Check

I think that the real problem here is that AGS doesn't have an actual check for infinite loops, per se, it only checks that the game is allowed to update at least once every 150,000 loops. Generally this is a reasonable exception.

In your specific case, it would seem, the 150,000 loop without an update is actually occurring within the dosomething function which is where it crashes, as opposed to MyFunction which is the real culprit for what would otherwise run smoothly.

The only way that I can think of that might make it possible to detect the correct function would be for AGS to check that the condition of the while statement has changed since the last loop. However, that would make a loop such as this not work properly:

Code: ags
bool break = false;
while (!break) {
  // some complex conditions and things
  // if (blah) break = true;
}


The function may not have to use an integer index to run the internal conditions. For example, if I have a function set up to parse a String and each time it's called return some portion of the String until it reaches the end of the String. It's not necessarily the greatest example because I could set up the loop differently, but I have found cases where it is simplest to use a break flag as the condition of a while loop.

So, given that I would say the best solution is the call stack which we now have available... ;)

Pumaman

Quote from: RickJ on Wed 01/10/2008 22:13:56
The infinite loop (in MyFunction) caused a run-time exception as one would expect, however, the editor pointed me to the while loop, that was working correctly, an located in the called function (dosomething).   I stared at the dosomething() code for a long time thinking there must be something really obvious wrong  :(.

Interesting point. The way AGS checks for infinite loops is simply to count up the number of times a while loop jumps back to the start, resetting its counter when the screen is updated. Therefore if you had several nested while loops, the actual code location where it broke would just depend on where the script happened to be when the counter ticked over 150000.

Changing the way that this detection works would be a fair effort, and for now it doesn't seem worth the effort. Thanks for raising this though, it's something I'll consider when I update the scripting system.

RickJ

Thanks monkey, your explanation of the loop check helps make sense of what I observed.  I think the confusing part is that the error message seems so damn sure of itself and where the problem is.   

Perhaps, instead of implementing a more elaborate loopcheck, the error message could just include a disclaimer such as "inifinte loop may be in calling function, check call stack" and include some additional information in the manual under the :while" function, explaining how the loop check is done and how to disable it with the noloopcheck keyword etc.

Quote
... I have found cases where it is simplest to use a break flag as the condition of a while loop.
I usually just set the iterator to it's max value to break a loop, this however, usually requires that the value of the iterator first be copied another variable.   I prefer this method because I can  use/reuse single character  variables for iterators and meaningful intuitive names for specific iterator values.  It also makes for somewhat simpler conditional expressions.

I do agree  that the break keyword is sorely missed and I hope that it will be added to the language in some future version of AGS.   

Snarky

Quote from: monkey_05_06 on Thu 02/10/2008 19:48:19
I think that the real problem here is that AGS doesn't have an actual check for infinite loops, per se, it only checks that the game is allowed to update at least once every 150,000 loops. Generally this is a reasonable exception.

There's a fundamental theorem of computer science that proves that there's no general, surefire way to tell whether a program has gone into an infinite loop. So an "actual" check for infinite loops is probably not the right approach to the problem.

RickJ

Quote
There's a fundamental theorem of computer science that proves that there's no general, surefire way to tell whether a program has gone into an infinite loop.
I don't see what that has to do with what's being discussed here.   As a practical matter, for most all applications  it's possible to determine a time limit;  it's done all the time and is referred to as a Watchdog Timer.  The cited article talks mostly about hardware but the same techniques are also used in software, especially where multiple computers are communicating real-time data over a network.   

The AGS loop check, as I understand it uses a similar technique, substituting iterations for the time limit.   As you correctly point out someone may (and they have already) create a program that legitimately executes more than 150,000 iterations and so there is a noloopcheck keyword that can be used to surpress  the error. 

But all of this is completely irrelevant to the discussion because we were not talking about detecting infinite loops but instead were discussing how the current loopcheck rather authoritatively declares that there is a problem in a particular place in the code when in fact it is somewhere else.  It is entirely possible to determine which loop has exceeded the allocated time/iteration slot but it's apparently not easy to implement at this point in time. It's something that will be considered and possibly dealt with in the future.   It was suggested that additional information in the actual error message and in the description of the "while"keyword would be helpful and perhaps adequate.  :=



Snarky

I don't disagree with that. I was responding to a specific comment that implied that the ideal way to solve this problem would be a real and accurate test for infinite loops. Since that is impossible, improving the intuitiveness of the current approach is a completely reasonable strategy.

monkey0506

BUG: I appear to have inadvertently tricked the autocomplete calltip. By typing something such as this:

Code: ags
if (blah) {
  then this
}
else some_int = the_other;


While hovering the mouse over later instances of some_int the calltip shows, "else some_int". I also see some_int listed in the autocomplete twice, once with a blue box, and once with a green box.

Dualnames

Sorry, If someone has said about this or I'm wrong, but isn't there the ability to use noloopcheck to avoid that?
Worked on Strangeland, Primordia, Hob's Barrow, The Cat Lady, Mage's Initiation, Until I Have You, Downfall, Hunie Pop, and every game in the Wadjet Eye Games catalogue (porting)

monkey0506

If you're regarding the infinite loop issue Dualnames, you're correct that noloopcheck can be used to by-pass the 150k loop check (as noted). However that's not really what the issue was. The issue was that RickJ forgot to update his iterator for one of his while loops that he was using, but the loop check was flagging a different loop. Simply using noloopcheck would result in an infinite loop which is not what was intended, and would cause errors in the game (presumably forcing the user to manually abort from the OS).

naltimari

Infinite loop watchdogs are a good thing, IMO. Occasionally, when I'm coding, I forget to increment the loop index inside the loop, and then the watchdog bails me out.  ;)

The discussion seems to be around when there are nested while's, currently it appears that the watchdog binds to only one of them (the outermost?). I can't think of another solution than to implement a stack of watchdogs...  ::)

On a side note, I find 'noloopcheck' a very dangerous keyword to use. 150000 iterations without checking for user input is likely to be something that would freeze the interface, at least for a while (no pun intended). Instead of using 'noloopcheck', I prefer to 'WaitMouseKey(1)' inside the loop. This way, you don't freeze the interface and you can always interrupt the long operation should the user chose to cancel it.

Lt. Smash

Quote from: monkey_05_06 on Fri 03/10/2008 09:37:43
BUG: I appear to have inadvertently tricked the autocomplete calltip. By typing something such as this:

Code: ags
if (blah) {
  then this
}
else some_int = the_other;


While hovering the mouse over later instances of some_int the calltip shows, "else some_int". I also see some_int listed in the autocomplete twice, once with a blue box, and once with a green box.
something similar accoured when I wrote something like:
Code: ags
int i,j,k;
i = 10;
j = 20;

only i is shown by the calltip.

Pumaman

Quote from: Dualnames on Thu 02/10/2008 11:50:20
Referring to my condition, I'd like to say that concerning game backgrounds, everytime I imported one of them , I set the resolution at 320x200 and then changed to 640x480. And all sprites are 320x200. Does, that give any ideas? Try doing so. And if walkcycles are working fine on 3.1 I'll send you the version.

Hmm, that's basically what I tried, though I have to ask why you were doing that? Why not just have the game at 320x200? Still, it shouldn't cause corruptions in 3.1, so if you would be able to upload the 3.0.2 version of the game that would be appreciated.

QuotePerhaps, instead of implementing a more elaborate loopcheck, the error message could just include a disclaimer such as "inifinte loop may be in calling function, check call stack"

Sounds reasonable, I'll do this.

QuoteWhile hovering the mouse over later instances of some_int the calltip shows, "else some_int". I also see some_int listed in the autocomplete twice, once with a blue box, and once with a green box.

Well spotted thanks, I'll get it fixed.

Quotesomething similar accoured when I wrote something like:
int i,j,k;
i = 10;
j = 20;
only i is shown by the calltip.

I can't replicate this. I tried it, but it showed i, j and k in the autocomplete.

Lt. Smash

Quote from: Pumaman on Fri 03/10/2008 19:07:45
Quotesomething similar accoured when I wrote something like:
int i,j,k;
only i is shown by the calltip.
I can't replicate this. I tried it, but it showed i, j and k in the autocomplete.
ok, then this:
Code: ags
int i = 1,  ypos = 0;


edit: and I meant the calltip, not the autocomplete

Shane 'ProgZmax' Stevens

This isn't anything major, but after leaving ags open for about a week and then closing it, for some reason the help file stayed open.  This hasn't happened before, so it could be something you did for this version on purpose?  One thing that might have caused it is when I was closing ags reminded me I had not backed up my game and the confirmation box may have prevented it from closing the help file.

Dualnames

Quote from: Pumaman on Fri 03/10/2008 19:07:45
Quote from: Dualnames on Thu 02/10/2008 11:50:20
Referring to my condition, I'd like to say that concerning game backgrounds, everytime I imported one of them , I set the resolution at 320x200 and then changed to 640x480. And all sprites are 320x200. Does, that give any ideas? Try doing so. And if walkcycles are working fine on 3.1 I'll send you the version.

Hmm, that's basically what I tried, though I have to ask why you were doing that? Why not just have the game at 320x200? Still, it shouldn't cause corruptions in 3.1, so if you would be able to upload the 3.0.2 version of the game that would be appreciated.

Ok, I'll send it as soon as possible via PM, if it's no trouble.
Worked on Strangeland, Primordia, Hob's Barrow, The Cat Lady, Mage's Initiation, Until I Have You, Downfall, Hunie Pop, and every game in the Wadjet Eye Games catalogue (porting)

Pumaman

Quoteok, then this:
int i = 1,  ypos = 0;

edit: and I meant the calltip, not the autocomplete

What do you mean by "calltip"? The function calltips display the parameters to the function that you're calling, so I wouldn't expect it to display local variables in that anyway.

QuoteThis isn't anything major, but after leaving ags open for about a week and then closing it, for some reason the help file stayed open.  This hasn't happened before, so it could be something you did for this version on purpose?  One thing that might have caused it is when I was closing ags reminded me I had not backed up my game and the confirmation box may have prevented it from closing the help file.

Hehe, I hadn't even noticed that closing it normally shuts the help file. It's not a deliberate feature of AGS ... maybe this time you opened the help file from the Start Menu link rather than from within the editor?
Either way it's not something I plan on investigating in-depth! ;)

QuoteOk, I'll send it as soon as possible via PM, if it's no trouble.

Thanks!

monkey0506

Regarding opening the help file from within the editor, I do have one major annoyance but I understand if it's not something that can be easily fixed. When opening help from the editor, it apparently becomes impossible to switch back to the editor without first either manually minimizing the help file or closing it.

If this has to do with the way it's being opened and can't really be fixed that's fine, but I just wanted to put it out there that it has annoyed me for some time. :(

RickJ

While upgrading some things from V2.72 to the current beta I found an interesting behavior of the ListBox control.   The code snippet below  is contained within a function that implements a drop down list that is dynamically sized and positioned.   

This seemed to work just fine in V2.72 but in the current beta I get  an infinite loop error at  runtime.  The obvious next debugging step is to put a display statement inside the loop to look at ItemConut and RowCount.   With a display statement inside the loop or just before it, the problem does not occur.    Placing a Wait(1) statement just before the loop also prevents the problem from occurring.   

Code: ags

	MyListbox.Height = 0;
	while (MyListbox.ItemCount>MyListbox.RowCount) {
		MyListbox.Height = MyListbox.Height+5;
	}


A display statement just before the loop shows ItemCount=10 and RowCount=0 both of which which are correct.   The only thing seems to makes sense is that the RowCount is not being updated when the Height is changed in the current game cycle but is being updated in subsequent game cycles. 

My code is long and complicated so there are plenty of opportunities for this to be the result of some embarrassing bit of programming on my part.   Since I am almost always guilty of such things I am the first one I suspect.  I don't have any code running in any repeatedly_execute() handler anywhere so I don't think it's possible for there to be any kind of race condition in the script.   I can't think of any other way that I could have blundered.

I didn't like the looping algorithm for setting the height anyway and have replaced it with a calculation that works just fine and is a better solution.   So this behavior is no longer a problem for me but I  thought it may be of some interest as it may be an indicator of other more sinister things lurking about. 

Shane 'ProgZmax' Stevens

QuoteWhen opening help from the editor, it apparently becomes impossible to switch back to the editor without first either manually minimizing the help file or closing it.

This doesn't happen for me.  CJ seems to have the help file set to 'Always on top' when it's open.  It stays on the screen when I click back into the editor but I'm able to use the editor just fine.  I do this quite often when I'm checking ascii values, in fact.

Pumaman

Quote from: monkey_05_06 on Sun 05/10/2008 20:51:07
Regarding opening the help file from within the editor, I do have one major annoyance but I understand if it's not something that can be easily fixed. When opening help from the editor, it apparently becomes impossible to switch back to the editor without first either manually minimizing the help file or closing it.

I don't get this problem most of the time but there was a bit of wierdness going on, so I've changed the way it loads the help file for RC1 -- let me know if this fixes the problem.

QuoteThis seemed to work just fine in V2.72 but in the current beta I get  an infinite loop error at  runtime.  The obvious next debugging step is to put a display statement inside the loop to look at ItemConut and RowCount.   With a display statement inside the loop or just before it, the problem does not occur.    Placing a Wait(1) statement just before the loop also prevents the problem from occurring.   

Where is this code, is it in game_start? I don't think anythign around that area has changed since 2.72 so it's a bit strange, I'll see if I can reproduce the problem though.


Anyway, RC 1 is now up. This fixes various things in preparation for the final release.

Those of you out there who are still using 3.0.2 and haven't tried 3.1 yet, please give it a go because I want to make sure that the native hi-res co-ordinates hasn't got any issues remaining.

monkey0506

The fix for the help file is perfect. I didn't realize it wasn't something everyone was experiencing or I might've spoken up sooner. But it works great now so thanks Chris.

Also, I'm glad to see that Display will now work in games without any GUIs. That one's bothered me before... ;)

Pumaman

Glad to see that's working for you.

Now, one thing I forgot to mention was the new Tip Of The Day area. Currently it's only got three tips (well, two really) -- so any suggestions for tips to put in there would be appreciated.

Generally I think Tip Of The Day tips should be related to "hidden" AGS features, ie. things that aren't obvious and that people could easily miss and not realise that you could do -- so if anyone can think of any, please do post them!

RickJ

#200
Quote
Quote
This seemed to work just fine in V2.72 but in the current beta I get  an infinite loop error at  runtime.  The obvious next debugging step is to put a display statement inside the loop to look at ItemConut and RowCount.   With a display statement inside the loop or just before it, the problem does not occur.    Placing a Wait(1) statement just before the loop also prevents the problem from occurring.   

Where is this code, is it in game_start? I don't think anythigng around that area has changed since 2.72 so it's a bit strange, I'll see if I can reproduce the problem though.
Yeah, it doesn't appear to be related to startup.  There is a main GUI with some buttons, some of which activate a drop list when clicked.   The drop list is implemented using another GUI that only contains a ListBox.  When the button is clicked, the list is populated with the item associated with that specific button, the GUI containing the ListBox is positioned just under the button, the width of the GUI and ListBox are set to the width of the button and the GUI and ListBox heights are set so that all of the items in the list are displayed (height is limited so that the GUI and ListBox extents are within the viewport.   The problem occurs when setting the ListBox height, which occurs whenever the user clicks a button. 

The behavior suggests to me that perhaps after the button is clicked one or more  ListBox operations  are  performed, prior to the height adjustment, that prevent RowCount and/or ItemCount from being updated with the correct value untilk the subsequent game scan. 

The offending code is preserved and can be easily reconstituted.  I'll recreate and chase the problem a bit more to see if I can learn anything helpful.
[edit]

Analysis of the module's code shows that the following operations are performed on the GUI and Listbox prior to the execution of the while loop
Code: ags

gSubmenu.Visible = true;
gSubmenu.Height = nn;
gSubmenuList.Clickable = true;
gSubmenuList.Enabled = true;
gSubmenuList.Visible = true;
gSubmenuList.Clear();
gSubmenuList. = AddItem(...);
  :
gSubmenuList. = AddItem(...);

gSubmenuList.Height = 0
While (gSubmenuList.ItemCount>gSubmenuList.ItemCount) { // <==== Bug occurs here
     gSubmenuList.Height = gSubmenuList.Height + 5;     
}


I tried recreating the error with the newest version (RC1) and now there is no longer an infinite loop error but there is still a weird behavior.  Now it seems that the first time this code is executed it produces an incorrect result and the Listbox and Gui are sized so that the last two items in the list are cutoff from view.  Subsequent executions, however, produce correct results and all items in the list are visible.

[edit]
Help File
It no longer stays on top when launched form the editor.  I always found this to be a useful behavior as I could simultaneously view the help info while editing the script.  Now rhe help window disappears as soon as focus returns to the script file.

freshpaint

Any chance you can show the full size of the sprite in the character screen?  My sprite is 300 pixels tall and is chopping off.  I know you fixed the chopping off problem in the View menu, but it still chops here. (using 3.1.0 RC1, 800x600 res)


Dualnames

About that, maybe it would be better to add something similar to the Zoom thiny on backgrounds.
Worked on Strangeland, Primordia, Hob's Barrow, The Cat Lady, Mage's Initiation, Until I Have You, Downfall, Hunie Pop, and every game in the Wadjet Eye Games catalogue (porting)

Pumaman

QuoteThe behavior suggests to me that perhaps after the button is clicked one or more  ListBox operations  are  performed, prior to the height adjustment, that prevent RowCount and/or ItemCount from being updated with the correct value untilk the subsequent game scan. 

I've looked into this and it seems like RowCount doesn't update properly if you change the size when the GUI is not visible. However, as far as I can tell this would also have happened in 2.72. Anyway, I'll include a fix in the next release.

QuoteIt no longer stays on top when launched form the editor.  I always found this to be a useful behavior as I could simultaneously view the help info while editing the script.  Now rhe help window disappears as soon as focus returns to the script file.

Ahh interesting, I've always used the help window maximised, which is presumably what monkey_05_06 was doing too and why he had his reported problem with it. But if you're not using it maximised I can see why the old behaviour was better. I'll add a Preferences option to allow you to specify which way this should work.

QuoteAny chance you can show the full size of the sprite in the character screen?  My sprite is 300 pixels tall and is chopping off.  I know you fixed the chopping off problem in the View menu, but it still chops here. (using 3.1.0 RC1, 800x600 res)

Hmm, I don't get that problem ... looks like a 120 DPI issue, I'll look into it.

mikosworld

Pumaman, would it be possible to add a new feature in room editor, have the ability to add decorative elements/no objects animated (from VIEW) without interactions...
It'll be more handy ;) sorry for my english  :'(

Khris

Just set the object to not being clickable.

thezombiecow

Forgive me if this is already possible, and I've missed it, but it'd be really nice to have a checklist of types you'd like to be viewing in the room editor.

It'd be really useful to be able to see Walkable Areas, hotspots and Objects (and characters??) all at the same time in the room editor...

??

Lt. Smash

Quote from: thezombiecow on Thu 23/10/2008 10:15:28
It'd be really useful to be able to see Walkable Areas, hotspots and Objects (and characters??) all at the same time in the room editor...

??
a realtime character show indeed would be really useful. You choose a character drag it onto the background and it will be scaled depending on the scale level of the walkable area. It could also be used to show the region lights. Then you change scale and light levels until you think its perfect!

SSH

I noticed that in Lucasarts mode, the SpeechView gets used when talking even if you've done a LockView. Is that right? Has it always been that way?
12

NiksterG

I'm having problems drawing hotspots. It seems that whenever I click on my background to draw a line, it draws the line in a different place than where I want it to be. Hard to explain, here's a picture:



anyone else getting this? any solutions?
Check out my games! (Not all made with AGS)

Pumaman

QuoteForgive me if this is already possible, and I've missed it, but it'd be really nice to have a checklist of types you'd like to be viewing in the room editor.

It'd be really useful to be able to see Walkable Areas, hotspots and Objects (and characters??) all at the same time in the room editor...
Quotea realtime character show indeed would be really useful. You choose a character drag it onto the background and it will be scaled depending on the scale level of the walkable area. It could also be used to show the region lights. Then you change scale and light levels until you think its perfect!

Please can we keep this thread to discussion of the 3.1.0 release; if you'd like to make suggestions please create a new thread so that we can discuss them properly.

Quotei noticed that in Lucasarts mode, the SpeechView gets used when talking even if you've done a LockView. Is that right? Has it always been that way?

Yeah it's always been that way. All that LockView really does is stops AGS from using the walkable area-specific views and room-specific views. It's far too late to change it now :)

QuoteI'm having problems drawing hotspots. It seems that whenever I click on my background to draw a line, it draws the line in a different place than where I want it to be. Hard to explain, here's a picture:

What resolution is your game? Is the room background the same size? Is the game a resonable size that you might be able to upload it so that I can investigate?

NiksterG

#211
My game resolution is 640x480 and the room background is the same. I turned on low resolution coordinates, if that makes a difference, though I think not, since I turned them off again to test; no difference. I uploaded my entire game folder here, hope that helps. It's a brand new game file - I worked on this for maybe ten minutes before I ran into this problem.

edit: testing out the link on my computer, doesn't seem to work, so here's the url. Just copy and paste if link doesn't work:

http://www.freewebs.com/magicianxy/niksterg_game.zip
Check out my games! (Not all made with AGS)

Pumaman

Hmm, do you remember how you created that room? I tried creating a new room in your game and importing that background, and it worked fine.

However, I was able to replicate the problem by creating a 320x200 game, importing that background, then changing the game resolution to 640x480 and re-importing the background again. I'll fix this scenario.

For you to fix that room now, you can import a background of a different size and then import that one back again; or alternatively just delete the room and create a new one.

NiksterG

That seems to have fixed it, thanks.

Yes, what you did to replicate it was exactly what I did. Glad you figure that out so fast!
Check out my games! (Not all made with AGS)

Pumaman

Ok, RC 2 is now up. It's a minor release with a few things fixed, and if no bugs are found this will become the official 3.1 release.

For those of you who haven't tried 3.1 yet, please do so now -- especially if you have a hi-res game.
Past experience with 3.0.2 was that everybody avoided using the new version until it was made Final, at which point a few serious bugs were discovered. So, please try this now so that we can get the bugs fixed before you start to rely on it as an official release :)

Ghost

Quote from: Pumaman on Mon 27/10/2008 00:06:28
For those of you who haven't tried 3.1 yet, please do so now -- especially if you have a hi-res game.

A test game of mine (640x480) compiled without any problems, and overall I really like the way 3.1 works...

The Tip Of The Day however, useful as it is, got lost on me because I disabled the start page... would a popup-window not be more traditional? You know, one of those with the "don't show tips at startup" checkboxes?

Great work as always. 3.1 might well become the new 3.0!

Dualnames

Well, I was working on a game today, and I wanted to make a number absolute..
I created a small command that just gets an integer and removes the - if it is contained, so wouldn;t that be cool for those that can't script it? I can share the code, but I'd doubt you wouldn't figure it out yourself, Chris. Anyway, gonna check rc 2.
Worked on Strangeland, Primordia, Hob's Barrow, The Cat Lady, Mage's Initiation, Until I Have You, Downfall, Hunie Pop, and every game in the Wadjet Eye Games catalogue (porting)

GarageGothic

Like Dualnames, I also wrote my own AbsInt(int value) and AbsFloat(float value) utility functions. I don't really think people who can't work out to script something that simple will have much need for those functions. At least the stuff I use them for is pretty advanced (Bresenham's line drawing algorithm).
It seems to work fine, but I still worry that the rounding of float values could potentially cause problems - I use a simple "if (value < 0.0)" rather than the surefire square-root-of-the-squared-value approach, which I assumed would be more CPU intensive. So I agree, built-in functionality would be nice though not all that necessary.

monkey0506

#218
If I set the value of a new enum to the value of an existing one, autocomplete seems to be picking up both instances of the existing enum:

Code: ags
enum MyLocationType {
  eMyLocationCharacter = eLocationCharacter,
  eMyLocationHotspot = eLocationHotspot,
  eMyLocationNothing = eLocationNothing,
  eMyLocationObject = eLocationObject,
  eMyLocationInventoryItem
};

// ...
LocationType loc = eLoc...

Quote from: AutocompleteeLocationCharacter
eLocationCharacter
eLocationHotspot
eLocationHotspot
eLocationNothing
eLocationNothing
eLocationObject
eLocationObject

The existing values also appear as members of the new enum:

Code: ags
MyLocationType myloc = ...

Quote from: AutocompleteeLocationCharacter
eLocationHotspot
eLocationNothing
eLocationObject
eMyLocationCharacter
eMyLocationHotspot
eMyLocationInventoryItem
eMyLocationNothing
eMyLocationObject

subspark

QuoteFixed Characters pane chopping off bottom of view preview when run at 120 DPI
You ROCK Chris! := Some of these changes Makes a BIG difference here on my end. I've been waiting for this one ever since I alerted you to the 120 DPI bugs.

Cheers,
Sparx.

Trent R

Quote from: Pumaman on Mon 27/10/2008 00:06:28
For those of you who haven't tried 3.1 yet, please do so now -- especially if you have a hi-res game.
Past experience with 3.0.2 was that everybody avoided using the new version until it was made Final, at which point a few serious bugs were discovered. So, please try this now so that we can get the bugs fixed before you start to rely on it as an official release :)

Since you asked, I tried it out my game with 3.1 and it compiled fine. Granted however, that my game is very simple at this point(although 32-bit and 640x400). But it's one more feedback for you.

~Trent
To give back to the AGS community, I can get you free, full versions of commercial software. Recently, Paint Shop Pro X, and eXPert PDF Pro 6. Please PM me for details.


Current Project: The Wanderer
On Hold: Hero of the Rune

Pumaman

QuoteA test game of mine (640x480) compiled without any problems, and overall I really like the way 3.1 works...
QuoteSince you asked, I tried it out my game with 3.1 and it compiled fine. Granted however, that my game is very simple at this point(although 32-bit and 640x400). But it's one more feedback for you.

Thanks for the feedback.

QuoteThe Tip Of The Day however, useful as it is, got lost on me because I disabled the start page... would a popup-window not be more traditional? You know, one of those with the "don't show tips at startup" checkboxes?

I did think about that, but those Tip Of The Day popup windows are really annoying, and most people just close them straight away out of frustration. It seems more user-friendly to include the tip on the start page -- though in a future version perhaps I'll add a menu option to show the start page, if you've disabled it from startup.

QuoteI created a small command that just gets an integer and removes the - if it is contained

Some sort of Maths.Abs function is certainly a possibility for a future version of AGS, but as it's so easy to do by hand it's not a priority.

QuoteIf I set the value of a new enum to the value of an existing one, autocomplete seems to be picking up both instances of the existing enum:

Thanks, this should now be fixed.


Anyway, 3.1 Final is now up. It's the installer-based version since this is a final release. Please try it out and make sure there aren't any serious problems. Assuming all goes well and no bugs are found in the next few days, I'll make the RAR version and upload it all to the main website and make it official.

DoorKnobHandle

With 3.1 Final, when I load the demo game, run it and start a dialog, I can erase the black background with the mouse cursor!

Apart from that it seemed fine.

GarageGothic

Quote from: Pumaman on Fri 31/10/2008 12:18:52Some sort of Maths.Abs function is certainly a possibility for a future version of AGS, but as it's so easy to do by hand it's not a priority.

Could you please confirm if there is a chance that float rounding issues could make "if (value < 0.0)" return true for a positive float? 

Pumaman

QuoteWith 3.1 Final, when I load the demo game, run it and start a dialog, I can erase the black background with the mouse cursor!

Thanks, looks like there's a bug there with 8-bit games. I'll look into it.

QuoteCould you please confirm if there is a chance that float rounding issues could make "if (value < 0.0)" return true for a positive float?

Well, AGS uses standard IEEE 32-bit floating point numbers. There's a good page here that explains them:
http://www.cygnus-software.com/papers/comparingfloats/comparingfloats.htm
but basically the possible floating point values around zero are:

-1.4012985e-045
-0.0
+0.0
+1.4012985e-045

So the case you describe shouldn't be a problem. "if (value < 0.0)" should never return true for a positive number.

GarageGothic

Quote from: Pumaman on Fri 31/10/2008 14:01:40So the case you describe shouldn't be a problem. "if (value < 0.0)" should never return true for a positive number.

Excellent news, thank you very much for the explanation.

freshpaint

RC2 fixes the "chopping off in character screen" problem I had that seemed to be related to 120 DPI setting.  Thanks!  I can see my character's feet for the first time!

Haven't had a chance to do a complete run thru of my hi-res game demo yet. Darkdevil County will rise again soon, I promise.

Electroshokker

#227
using AGS 3.1.0 final:


I used to have 1 set of footstep sounds, tied to animating frames. Now, upon removing the footsteps sounds (all frames to sound 0), rebuilding all files and testing it out, I'm STILL hearing the footsteps?!?

EDIT:

after deleting all frames and re-importing the sprites to the view/loop, the footstep sounds finally were gone in the game;

OneDollar

I found a disastrous, horrific and game-breaking bug whereby the engine still displays "Winner: Best AGS of 2007" as one of the splash-screen messages. Other than that all seems to be working fine.

Dualnames

Okay, this might probably be me..or might not. I wasn't planning to post this because it just occured once. However, I've managed to reproduce it 3 times. Almost killed my pc. Anyway, I'm using 3.02 sp1 (RC 2 was just out)..so well, I opened my Starship Poseidon. I minimized it did a lot of things, photoshop, then maximized and pressed compile..blue screen something about driver ecc. Thing is I've never had this problem with HHGTG(3.02 sp1 as well), however I've been using media manager plugin..so is there a possibility that this causes the problem? My video card is fine, and I've never had a crash not even on Mass Effect...so just saying.
Worked on Strangeland, Primordia, Hob's Barrow, The Cat Lady, Mage's Initiation, Until I Have You, Downfall, Hunie Pop, and every game in the Wadjet Eye Games catalogue (porting)

Pumaman

QuoteI used to have 1 set of footstep sounds, tied to animating frames. Now, upon removing the footsteps sounds (all frames to sound 0), rebuilding all files and testing it out, I'm STILL hearing the footsteps?!?

after deleting all frames and re-importing the sprites to the view/loop, the footstep sounds finally were gone in the game;

Strange, has anyone else had a problem like this? I can't replicate it myself, do let me know if it happens again.

QuoteI found a disastrous, horrific and game-breaking bug whereby the engine still displays "Winner: Best AGS of 2007" as one of the splash-screen messages.

Why's that a bug ... has the award been withdrawn?  :'(

Quotewasn't planning to post this because it just occured once. However, I've managed to reproduce it 3 times. Almost killed my pc. Anyway, I'm using 3.02 sp1 (RC 2 was just out)..so well, I opened my Starship Poseidon. I minimized it did a lot of things, photoshop, then maximized and pressed compile..blue screen something about driver ecc.

I'm not really sure what you're saying, but if you're having a Windows Blue Screen Of Death then that sounds like a driver problem, it's not something AGS can cause. Potentially the Media Manager plugin might be loading some sort of dodgy sound/video driver which could be causing the issue.


Anyway, I'm now closing this thread and will be opening a new one for the formal 3.1 Release instead.

SMF spam blocked by CleanTalk