AGS 3.0 is now released!

Started by Pumaman, Sat 26/01/2008 12:14:04

Previous topic - Next topic

Pumaman

Well, it's been a long time coming, but AGS 3.0 is finally here!

It features the following changes over 2.72:

* Rewritten editor from scratch; includes various new features such as ability to have more than one script open at a time
* Hardware accelerated graphics driver in game engine, which speeds up rooms with lots of sprites, alpha blended objects, and more.
* Full support for 256-character ASCII, so European languages like French and Spanish are now supported if you use a TTF font.
* Added script debugger
* Added integration with Windows Vista's Game Explorer and Enhanced Save Games
* Added support for script extender functions.
* Added support for dynamic arrays in script
* Added source control integration
* Added crash dump file when engine crashes, to enable faster fixing of bugs
* New .NET-based editor plugin API.
* Added Game.DoOnceOnly, Character.ChangeRoomAutoPosition, Game.FontCount,  Game.MouseCursorCount, DynamicSprite.GetDrawingSurface, DrawingSurface.*, DynamicSprite.Create script functions/properties.
* Added syntax highlighting for struct types
* Overhaul of RawDrawing functions, including ability to draw onto dynamic sprites and various new features.
* Removed limit on number of views, GUIs and characters
* Removed limits on number of frames per loop and loops per view
* Increased max objects per room to 40 and max hotspots to 50.
* Fonts have a script enum eFontXXX rather than having to use a number.
* Engine will now automatically try 640x400 for 320x200 games if the player's PC doesn't support 320x200 (since this is becoming more common)
* Improved performance of Character.PlaceOnWalkableArea in large rooms.
* Workaround for teleportation problem in scrolling rooms with right edge incorrectly set.
* Fixed String.Format crashing if the string length was more than 1200 characters.
* Fixed engine crashing on startup if it was unable to load a plugin.
* Fixed issue when combining CreateXXXOverlay and Overlay.CreateXXXX
* Fixed changes to ViewFrame.Graphic not always being persisted in save games
* Improved script garbage collection, so that calling String.Append in rep_exec doesn't keep eating up more and more memory until you save the game.

Head over to the download page and get yourself a copy!

Ghost

Congratulations! And a zip too, just like the old days! A toast to CJ!

Groogokk

Three cheers for Pumaman!

Thanks a lot, Chris! This is a great achievement. (Also, I'm happy about the zip as well).

ShiverMeSideways

Brilliant, I was just about to start a new project, perfect timing, CJ.

Also, good job and hip-hip-hooray!

OneDollar

I'm not sure if I should post this here or not, but I've found a very, very small bug. If you make a new string without assigning any text to it, then set, say, a GUI label's text to that string the game compiles then when that code is run crashes with "Error: Null string supplied to CheckForTranslations". Something to keep in mind for 3.01?

I've not found any other problems, but keep coming across stuff I really like. The new editor's fantastic CJ!

TheJBurger

Just a quick question:

In the old editor I used *.pcx files for everything, but that appears to be obsolete now? Would *.png be the preferred extension of choice?

Mortis

Quote from: Ghost on Sat 26/01/2008 12:17:23
Congratulations! And a zip too, just like the old days! A toast to CJ!

Seconded to the highest degree! This is fantastic news. I'll get me some toast to go with CJ's Big Blue Cup of hot smoking goodness.
The Slowdown - A video game blog for those who spend more time thinking about gaming than gaming

Radiant


twin-moon

                                    The Grey Zone

Ubel

I love the new editor, it's wonderful that it's finally complete! You've done a great job! :)

Also...

Quote from: OneDollar on Sat 26/01/2008 19:11:07
I'm not sure if I should post this here or not, but I've found a very, very small bug. If you make a new string without assigning any text to it, then set, say, a GUI label's text to that string the game compiles then when that code is run crashes with "Error: Null string supplied to CheckForTranslations". Something to keep in mind for 3.01?

I doubt that's a bug in the engine itself. Assigning a null value to anything, whether it's a string or an integer, would make the game crash, I believe. If you wish to assign an empty string to a label, give the string the value of "".

OneDollar

No, you missed my point. I understand where the crash comes from and how to fix it, it's the actual error message that's the problem:
Quote from: OneDollar on Sat 26/01/2008 19:11:07
"Error: Null string supplied to CheckForTranslations"
What I'm doing has nothing to do with checking for a translation file

Ghost

But still a check for translations would be made, wouldn't it, if only to check that there *are* no translations? And then the report of a null string is very careful, but still would make sense.

Ponch

CJ,

Downloaded it and played around with it a bit. It left me feeling tingly all over. Once all my ongoing (i.e. "old" AGS engines) projects are finished, I look forward to plunging into 3.0.

Thanks for all the hard work!  :D

- Ponch

OneDollar

Quote from: Ghost on Sat 26/01/2008 22:21:29
But still a check for translations would be made, wouldn't it, if only to check that there *are* no translations? And then the report of a null string is very careful, but still would make sense.
So you're saying AGS goes through all my text to see if a translation is available, regardless of whether I have any translation files or requests for translation, and having a null string upsets that and not the label I'm passing the text to? This is all I'm doing...
Code: ags

String somestring;
somelabel.text=somestring;  //just a label on a GUI

If its not a bug then that's fine. As I said its not really a problem either way.

Pumaman

QuoteI'm not sure if I should post this here or not, but I've found a very, very small bug. If you make a new string without assigning any text to it, then set, say, a GUI label's text to that string the game compiles then when that code is run crashes with "Error: Null string supplied to CheckForTranslations". Something to keep in mind for 3.01?

Well, the message might be slightly misleading but the alternative would be to add an explicit null check and error message to every property/method that you can pass a string into. This would take a while to do and probably not be worth the hassle.

For information, the reason that you get this message is because when you attempt to display any text (for example, setting the text on a GUI label), AGS passes it through the translation system to see if it needs to be translated. If there is no active translation then this will just return a "no" response very quickly -- but it also happens to ensure that the string is not null first. This is a good thing, because if it didn't do this check, you'd have probably got an Illegal Exception error instead, which would be a Bad Thing.

Anyway, this is not specific to 3.0 and so if you'd like to continue this discussion, please start a separate thread about it.

mchammer

I got this when I typed wrong brace to an enum and tried to save.
Code: ags

enum CharacterIcons [
};



Error: Index was outside the bounds of the array.
Version: AGS 3.0.0.23

System.IndexOutOfRangeException: Index was outside the bounds of the array.
   at AGS.Editor.FastString.StartsWith(String text)
   at AGS.Editor.AutoComplete.ConstructCache(Script scriptToCache, Boolean isBackgroundThread)
   at AGS.Editor.ScriptEditor.SaveChanges()
   at AGS.Editor.Components.ScriptsComponent.BeforeSaveGame()
   at AGS.Editor.ComponentController.NotifyAboutToSaveGame()
   at AGS.Editor.ApplicationController._agsEditor_PreSaveGame(PreSaveGameEventArgs evArgs)
   at AGS.Editor.AGSEditor.PreSaveGameHandler.Invoke(PreSaveGameEventArgs evArgs)
   at AGS.Editor.AGSEditor.SaveGameFiles()
   at AGS.Editor.Components.FileCommandsComponent.CommandClick(String controlID)
   at AGS.Editor.ToolBarManager.ToolbarEventHandler(Object sender, EventArgs e)
   at System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs e)
   at System.Windows.Forms.ToolStripButton.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.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.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)


Ps. Great job with 3.0  :)
My 40 bullets - An action/war game.

Pumaman

Hmm, I pasted that script into a script editor and saved the game, but I didn't get any errors. What were the lines of code before where you put that, and can you replicate the crash?

mchammer

Did you paste it into a script header? I get the error by putting that code anywhere into a script header. It doesnt crash if I put the code into a main script.
My 40 bullets - An action/war game.

naltimari

Quote from: Pumaman on Sat 26/01/2008 12:14:04
Well, it's been a long time coming, but AGS 3.0 is finally here!

Has anyone tried the new 3.0 editor on Linux+Mono? Is it worthwhile?

Ali

The new editor looks great, very inspiring.

Running the demo game I noticed something odd, which I don't think has been mentioned elsewhere. Black areas on the Save/Load GUI became invisible and during conversations, the mouse cursor 'painted' transparency onto the black of the dialogue GUI. This was using DX5.

I hope that's useful and not a waste of time!

magichuck

Congratulations, now to get time to actually work on something.

fovmester

Downloaded version 3.0 and like the new editor a lot. One problem I found out though:

What happened to the tga support? I only use tga-files for graphics, since I've got the alpha-blending to work with both photoshop and ags for those files only. But now it seems I can no longer import tga-files into AGS!? Why the hell not, I must ask?

Rui 'Trovatore' Pires

Ali - I kept meaning to mention it, but I plain forgot each time... I always get that, with the demo and with the default template (kept forgetting to report it!).
Reach for the moon. Even if you miss, you'll land among the stars.

Kneel. Now.

Never throw chicken at a Leprechaun.

Cinfa

Quote from: fovmester on Mon 28/01/2008 21:20:56
Downloaded version 3.0 and like the new editor a lot. One problem I found out though:

What happened to the tga support? I only use tga-files for graphics, since I've got the alpha-blending to work with both photoshop and ags for those files only. But now it seems I can no longer import tga-files into AGS!? Why the hell not, I must ask?
Use PNGs, are smaller and have alpha channel.

Pumaman

QuoteDid you paste it into a script header? I get the error by putting that code anywhere into a script header. It doesnt crash if I put the code into a main script.

Thanks, I've replicated the crash now. I'll get it fixed.

QuoteRunning the demo game I noticed something odd, which I don't think has been mentioned elsewhere. Black areas on the Save/Load GUI became invisible and during conversations, the mouse cursor 'painted' transparency onto the black of the dialogue GUI. This was using DX5.

Hmm yeah, well spotted -- that looks rather crap. It's probably an 8-bit specific problem, I'll look into it.

QuoteWhat happened to the tga support? I only use tga-files for graphics, since I've got the alpha-blending to work with both photoshop and ags for those files only. But now it seems I can no longer import tga-files into AGS!? Why the hell not, I must ask?

It's not a matter of removing formats, because the editor has been re-written from scratch. It was more a question of which formats to add. PCX and TGA have gone, and JPG and TIF have been added.

Can you batch convert your images to PNG, which should preserve the alpha channels?

fovmester

batch convert from tga to png? Should be possible I guess. I think I've got a handy software for a thing like that lying around somewhere... Anyway, thanks for the great job in putting together ags 3, CJ!

Snarky


Cinfa

Quote from: Snarky on Mon 28/01/2008 22:34:25
Err, Photoshop?  ;)
PNGOUT is more efficient.
If you have some basic scripting abilities, you can make a batch to convert multiple images at once.

Kweepa

Photoshop has batch conversion. It's called "Automation" or "Process multiple images" depending on the version.
Still waiting for Purity of the Surf II

edmundito

Awesome!  I saw the news on this blog:

http://www.indiegames.com/blog/2008/01/indie_news_january_29th_1.html

Maybe I should make a game with it?  :=
The Tween Module now supports AGS 3.6.0!

alisa_tana

I like the new editor, mostly.

One thing that I'm not fond of, however, is when you were setting up interactions in the old version, there were some preset commands, now it looks like it's entirely all scripting.  Which for a non-scripter makes things a little more challenging.

Especially when I can't seem to get the Any Click on Object function to do anything.

Staale

Congrats on the big 3.0!

Maybe I have to pull my finger out of my butt and start working on some games now. :D

.M.M.

#32
AGS 3.0 is interesting, but I have a problem. I had Graphicals variables and now, AGS told me it does not exist! :o
[EDIT] What happened with hints (if progamator wrote  player.Animate  it helped him and said how continue)     ?

Pumaman

QuoteOne thing that I'm not fond of, however, is when you were setting up interactions in the old version, there were some preset commands, now it looks like it's entirely all scripting.  Which for a non-scripter makes things a little more challenging.

I appreciate this, but a lot of the preset commands weren't very easy to use anyway. Having to select "Display message" and then go off and create a global message and put the number in was a bit of a faff, and hopefully by introducing people to scripting earlier on they'll see that it's really not that complicated.

QuoteAGS 3.0 is interesting, but I have a problem. I had Graphicals variables and now, AGS told me it does not exist!
[EDIT] What happened with hints (if progamator wrote  player.Animate  it helped him and said how continue)     ?

Your graphical variables should automatically be converted to variables in the script. As for the hints, they should still work as before. Are you having problems with them?

Radiant

#34
I believe the AGS download page could use a link to this site.

That's because AGS 3.0 won't work without that dotnet plugin, and the dotnet plugin will refuse to install unless you have the "microsoft installer installer" first, AND downloading said installer from the official site is not possible if you're running an older version of windows.

As I'm running that I see that installing the installer installer from that patch site is also not possible unless you have the proper service packs installed first, which I'm sure will first require me to download an installer service installer pack service installer.

In other words, thanks to Mr. Bill Gates, upgrading from 2.72 to 3.0 is more complex than it sounds unless you're (apparently) running the latest versions of windows. And I'm sure most people interested in retro gaming have the exact latest version of everything. Yay.

edmundito

The Tween Module now supports AGS 3.6.0!

Baron

Ah, I've created an error!

I've only changed the colour (to 16 bit), the resolution (to 640x480), imported 30 or so sprites, put them into two views, created two characters, imported one room background and flooded the entire room with a walkable area (for testing).  I have not scripted anything.  I downloaded the latest version two days ago, so I think I'm up to date:

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

System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
   at GetRelativeSpriteWidth(Int32 )
   at AGS.Native.NativeMethods.GetRelativeSpriteWidth(Int32 spriteSlot)
   at AGS.Editor.ViewPreview.previewPanel_Paint(Object sender, PaintEventArgs e)
   at System.Windows.Forms.Control.OnPaint(PaintEventArgs e)
   at System.Windows.Forms.Control.PaintWithErrorHandling(PaintEventArgs e, Int16 layer, Boolean disposeEventArgs)
   at System.Windows.Forms.Control.WmPaint(Message& m)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.ScrollableControl.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)

The error occurred when I hit CTRL S.  I had saved the game about an hour previous, with no problems.  Since then I had imported 10 character sprites, set up four loops in a view, named the view, created a new character (selecting the named view using browse), and made that new character the player character.  The game still works, except the new view will not be previewed for the character -instead a giant red X appears.  The view previews fine for the other character, and works when I test the game with the problem character.

Khris

Try reinstalling the .NET framework. That did it for Cinfa.

Pumaman

QuoteI believe the AGS download page could use a link to this site.

That's because AGS 3.0 won't work without that dotnet plugin, and the dotnet plugin will refuse to install unless you have the "microsoft installer installer" first, AND downloading said installer from the official site is not possible if you're running an older version of windows.

Which version of Windows are you using? The Windows Installer should work on all platforms that .NET supports.

QuoteAh, I've created an error!

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

Hmm, interesting. If you restart the editor does that view still refuse to display in the preview and do you get the crash again?

Baron

Strange.....
         I left the editor on and let my computer hibernate while I was at work, and when I returned I tried to save again and it saved fine (!).  So I did close the editor and started it back up again, and everything is fine and where it should be.  Er.....  thanks!

Baron

Pumaman

Hmm, I have a suspicion at what might have caused it, so I'll put a fix into the next version to hopefully prevent it from happening again. However, this particular crash shouldn't have caused any damage to your game.

Sektor 13

Hey

I have 3 problems:

1. Using a sprite with alpha channel for inventory item still doesn't work as it should (in PNG), i can se picture background.

2. Even if you work at 640x480, gui controls are still for 320x240 (you must devide by 2, to get correct coordinates)

3. How can i use special ČŠĆ and other letters, even if i import TTF font (like ARIAL with central europe support - default in windows) it shows incorrect letters.

Thanks

SSH

Quote from: Sektor 13 on Sat 09/02/2008 15:07:05
2. Even if you work at 640x480, gui controls are still for 320x240 (you must devide by 2, to get correct coordinates)

That's how its always been...

12

Sektor 13

Yes i know, but i hoped that would be different in 3.0 :'(

Pumaman

Quote from: Sektor 13 on Sat 09/02/2008 15:07:05
1. Using a sprite with alpha channel for inventory item still doesn't work as it should (in PNG), i can se picture background.

What do you mean by this? Is the problem in the inventory window, or when the item is being used as the mouse cursor?

Quote3. How can i use special ČÅ Â Ć and other letters, even if i import TTF font (like ARIAL with central europe support - default in windows) it shows incorrect letters.

Can you elaborate on this? If the TTF font has the same character set as you're running Windows with, then the letters should match.

Sektor 13

Quote from: Pumaman on Sun 10/02/2008 18:51:37
Quote from: Sektor 13 on Sat 09/02/2008 15:07:05
1. Using a sprite with alpha channel for inventory item still doesn't work as it should (in PNG), i can se picture background.

What do you mean by this? Is the problem in the inventory window, or when the item is being used as the mouse cursor?

Quote3. How can i use special ČŠĆ and other letters, even if i import TTF font (like ARIAL with central europe support - default in windows) it shows incorrect letters.

Can you elaborate on this? If the TTF font has the same character set as you're running Windows with, then the letters should match.


1. I can see a background in inventory window. The strangest part is that i edited an bigger image and cut the wanted part (without the background) to a new image and than save it as PNG with a transparent background.
So the new image couldn't even have any background at all, but it shows background from first, original image :S .

2. If I import ARIAL font, AGS shows me normal characters (!,?,ABC,123...¨(10by10 grid)) (exactly the same as in original fonts), they look like ARIAL but no special fonts are visible (like ČŠŽ) that goes for CE.

If i work in WORD you can select text and than below you can select a region like ARABIC, CENTRAL EUROPE ..., you can't do that in AGS. !?

Am i missing something ?




Pumaman

1. I'm not really sure what you mean, can you post a screenshot?

2. The preview in the Fonts pane of the editor always just shows the basic 0-9 A-Z letters, but if your TTF font has 256 characters then you should be able to use them in the game.
In other words, you should be able to type characters like these:  áéíôñù  into your scripts / messages, and they should display correctly.
What exactly is going wrong?

Sektor 13

1. i will try to add it some day

2. Slovenina language uses ŠČŽ letters, so if i used them in my game, none of them are displayed correctly!
I get "square" instead of Č Š or Ž(aka no font) if i used them.

Gilbert

2. Are you sure these characters' code are within the 256 range in the font? If not they can't be displayed.

Sektor 13

IS there any possible way to find that out ?

SSH

#50
If its a unicode font, they will NOT be, it its ISO-8859-2, they will be, I think..

http://friends.s5.net/mazzini/tabela04.html

The fonts here worked for me: ftp://ftp.arnes.si/software/Latin-2-fonts/latin2.zip
12

Elessar

I made a game in AGS 2.72 which had a portrait loop of 24 sprites, so it used loops 0 & 1 of the view. However, if I had the character say a decent sized sentence, the whole animation cycled through, and the blue cup showed up before repeating the loop. Running only loop 0 made the problem disappear, so I imported it into 3.0 where there is no limit on the number of frames in a loop.

Before changing the loop, I decided to run the program as is to see the results, and AGS 3.0 gave the following error when the cup usually showed up:

Code: ags
---------------------------
Illegal exception
---------------------------
An exception 0xC0000005 occurred in ACWIN.EXE at EIP = 0x004FAC13 ; program pointer is +24, ACI version 3.00.1000, gtags (22,70)

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   
---------------------------


Putting all the sprites into one loop in AGS 3.0 eliminated the problem, but I thought that I should post the error anyway.

Pumaman

Are you using sierra-style speech, and do you have a blinking view for that character? If so I think I've identified the cause of the problem, and will get it fixed.

Vince Twelve

I've just taken my main WiP into 3.0 for the first time (Ivy's new game was my test subject :P ) and everything seems to be working fine except for one instance where I'm using a sprite (actually a series of sprites in an improvised animation by incrementing the gui background graphic in the repeatedly execute script) with alpha channel (imported from a .png) as the background image on a gui.  The transparency doesn't work correctly, and instead, I just see a big white blob where there should be semi-transparency.  Running the same game (I hadn't modified the code at all) compiled through 2.7 shows the gui with proper transparency.

I tried reimporting the sprites and the problem was still there.  So, I tried displaying the sprites on a different gui and they worked perfectly.  But on the original gui, they still don't show correctly for some reason.  The gui's transparency is never messed with, so I can't understand what would cause this.  Especially since it worked fine in 2.7.

I also tested it in 3.0.1 just in case, and it was the same as 3.0.  Also, I'm only testing this in Direct Draw 5 because my computer apparently doesn't support Direct 3D at these resolutions for some reason.

Is there a reason that the transparency for these sprites would suddenly stop working on certain GUIs, but not on others?

Vince Twelve

Not to bump, but I've got a separate issue.  When importing some sprites from animated gifs, I found something very strange happening.



Progz believes that having the last palette location (255) set as transparent causes the issue.  The same animated gif imports fine into 2.7.

Gilbert

Hmmm. Since the data in each frame in an animated GIF could contain just the changes from the last frame (in order to reduce file size) I think the editor probably has a bug that it just imports the content of individual frames saved in the file directly and not taking the previous frames into account. Most "more advanced" graphics packages (e.g. PS, I think) would only save the differences like this by default. Until the bug is fixed, I think one workaround is to "unoptimise" the GIF by forcing each frame to have all the pixel data while saving it (this can be done by selecting
filters -> animation -> unoptimise
in GIMP say for example).

Elessar

Quote from: Pumaman on Thu 21/02/2008 20:03:26
Are you using sierra-style speech, and do you have a blinking view for that character? If so I think I've identified the cause of the problem, and will get it fixed.
Yeah, I've got a blinking view (three sprites) and I'm using Sierra with background.

Shane 'ProgZmax' Stevens

QuoteHmmm. Since the data in each frame in an animated GIF could contain just the changes from the last frame (in order to reduce file size) I think the editor probably has a bug that it just imports the content of individual frames saved in the file directly and not taking the previous frames into account. Most "more advanced" graphics packages (e.g. PS, I think) would only save the differences like this by default. Until the bug is fixed, I think one workaround is to "unoptimise" the GIF by forcing each frame to have all the pixel data while saving it (this can be done by selecting
filters -> animation -> unoptimise
in GIMP say for example).

I've tested and verified that the use of palette position 0 as transparent allows all my gifs to import properly; however, using palette position 255 as transparent does not, which could also mean that any color used other than index 0 will also break it (though I have not checked).  It is clear that palette position 255 is the start of the trouble, though.

Pumaman

QuoteI've just taken my main WiP into 3.0 for the first time (Ivy's new game was my test subject  ) and everything seems to be working fine except for one instance where I'm using a sprite (actually a series of sprites in an improvised animation by incrementing the gui background graphic in the repeatedly execute script) with alpha channel (imported from a .png) as the background image on a gui.  The transparency doesn't work correctly, and instead, I just see a big white blob where there should be semi-transparency.  Running the same game (I hadn't modified the code at all) compiled through 2.7 shows the gui with proper transparency.

Can you post a game that demonstrates the problem?

QuoteNot to bump, but I've got a separate issue.  When importing some sprites from animated gifs, I found something very strange happening.

Can you post a sample GIF that causes this?

QuoteYeah, I've got a blinking view (three sprites) and I'm using Sierra with background.

Ok thanks, this should be fixed in the next version.

Vince Twelve

#59
PMed that image to you.

Regarding the GUI that wouldn't properly display alpha-channels, I played around a bit and fixed it.  But I don't understand why what I was doing before worked in 2.7 but not 3.0.

Since this GUI was on screen the entire game except for small periods, I was just setting the background graphic to slot 0, which is just a single transparent pixel, instead of changing the visibility.  This was also useful before because, to animate the GUI, I was using repeatedly_execute_always to increment or decrement the background graphic, and giving it 0 when I wanted it to be invisible. 

So, I took all the places where it would set the background graphic for the GUI to 0 (including in the game_start script) and changed it to setting the visibility to false.  Now everything works correctly.

Does assigning the background graphic of a GUI to a single transparent pixel somehow stop the GUI from later displaying alpha transparency?  Because it didn't in 2.72, but seems to do so now...

Pumaman

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

Quote
Does assigning the background graphic of a GUI to a single transparent pixel somehow stop the GUI from later displaying alpha transparency?  Because it didn't in 2.72, but seems to do so now...

Does the single transparent pixel image have an alpha channel? Because in AGS 3, the GUI background image is used to determine whether to draw the GUI with an alpha channel or not. I think this was the same in 2.72 but I'm not 100% certain.

Vince Twelve

I played with my solution a bit.  Basically all I had to do was change the line CursorBlip.BackgroundGraphic=0; in game_start() to gCursorBlip.Visible=false; and everything works.

Full (probably unnecessary) explanation:

In the GUI editor I had the background graphic is set to 125 which is one of the alpha-channeled frames used in the animation.  Sprite slot 0 is a single transparent pixel (not alpha-channel) that I use occasionally to make things invisible rather than using the .visible property.  This is just a preference that I have sometimes when I'm using some function to come up with a frame number to set something to.  I'll just pass 0 to make it invisible.

In 2.72 I used this line twice: gCursorBlip.BackgroundGraphic=0;

Once in the game_start() function to make the GUI invisible on startup and once in the repeatedly_execute_always() function to make it invisible at the end of the animation.  The only other times that I do anything to gCursorBlip are when I set certain alpha-transparent frames to the background graphic and different x and y values in the rep_ex_always().

In 3.0 this shows all of the partially transparent pixels as a non-transparent white blob.  Changing the line gCursorBlip.BackgroundGraphic=0; to gCursorBlip.Visible=false; in the game_start() function (but leaving it as it was in rep_ex_always) fixes the problem.

So it seems that setting the GUI to frame 0 (a single, transparent, no-alpha-channel pixel) in the game_start() function somehow renders the GUI unable to display alpha transparency for the rest of the game.  Does that make sense?

Pumaman

Ah, this is because having a background image sprite of 0 can be treated as "no background image", which would lead alpha transparency not to be enabled. However, it should become enabled when you change the background image to something else.

What's the colour depth of your Sprite 0 reported as? One possibility I can think of is that if Sprite 0 is 16-bit, then the GUI would be created on startup as a 16-bit image, which would then be unable to display an alpha channel. If this is the case I can look into a fix for it.

Vince Twelve

Indeed.  The sprite depth of my Sprite 0 is 8 bit.  That's likely the issue.  It just through me for a loop because it worked fine before the jump to 3.0

Pumaman

That's not so surprising, a lot of graphics rendering changes were made to 3.0 to allow the D3D integration. I'll look into a fix for this.

Dualnames

AGS 3.0 pawns. Really. I finally upgraded to 3.0.. I get a message though when using SCI font. Extended characters something. I can't figure it out. It has nothing to do with the length of the display msg. I created the font using SCi studio. I got the error whilst having the exact msg in two dif hotspots. On the one it was working and on the other no.Other than that the version is way better than 2.72 good job
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)

Gilbert

Unless the error was reported incorrectly, that error means that there's a character in the text that's having ASCII code > 127. AGS didn't support characters with codes > 127 when using SCI fonts. Did you add the message after upgrading to 3.00? In that case, chances are it would also happen with older versions and this is not a bug.

Dualnames

I scripted all the game on 3.0
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)

Gilbert

So, check your messages for those characters first.

SSH

Did you cut-and-paste anything out of a word document? It turns dashes and quotes into funny wierd non-ASCII versions
12

Ali

I was thrilled to discover that D3D allows for smooth scaling with alpha transparency. Huzzah!

However, I can't seem to get vertical sync when using D3D. Even if it is set on in game and my graphics card is set to 'force vsync' for all applications, I still get tearing, in a window and full screen. I couldn't find anything mentioning this and wondered if there's something I've missed.

Another point I noticed is, I don't seem to be able to downgrade 32bit games to 16bit. When I check the box and run the game it still runs at 32bit. Then when I run setup again the box has been unchecked.

I hope these points haven't already been dealt with, and that I'm not just being really dim. Thanks again for 3.0!

Pumaman

QuoteI was thrilled to discover that D3D allows for smooth scaling with alpha transparency. Huzzah!

It does indeed! :)

QuoteI can't seem to get vertical sync when using D3D.

The problem is that D3D doesn't allow you to change the VSync setting mid-game like you can with DirectDraw. You have to set the vsync on or off at game startup and leave it that way, so currently AGS always turns it off.

Perhaps we need a new option in Setup to control vsync for D3D?

QuoteAnother point I noticed is, I don't seem to be able to downgrade 32bit games to 16bit. When I check the box and run the game it still runs at 32bit. Then when I run setup again the box has been unchecked.

Well spotted, thanks -- looks like I broke this while adding the graphics driver option to 3.0. I'll get it fixed.

Dualnames

Actually Chris and the rest sorry to have mislead you... the actual problem was that copying this ' symbol from word to AGS isn;t compatible and since sci fonts have 127 there's isn;t that extra character that gets his place when an identified symbol comes up. All working good. Best AGS version ever. Really. Really really.
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)

Ali

Quote from: Pumaman on Fri 29/02/2008 21:10:02
Well spotted, thanks -- looks like I broke this while adding the graphics driver option to 3.0. I'll get it fixed.

Thanks for the response Mr J, I'm glad all those things can be dealt with! I think a way to set vsync on for D3D would be great, as long as it's possible for the game author to set its default state. I guess that's just a matter of checking a box before distributing though!

Also I noticed a small point which I haven't seen mentioned: Right-clicking in the script when I have text selected rarely offers me the opportunity to 'cut'. I can use Ctr-X, but for some reason the 'cut' option is greyed out.

Thanks again!


Shane 'ProgZmax' Stevens

QuoteAlso I noticed a small point which I haven't seen mentioned: Right-clicking in the script when I have text selected rarely offers me the opportunity to 'cut'. I can use Ctr-X, but for some reason the 'cut' option is greyed out.

This is a problem I mentioned several builds ago that randomly persists.  If you go to the AGS main menu and choose cut it will then be available in the script editor.  I currently use this as a workaround until it's finally fixed.  Note:  this happens with copy as well.

Pumaman

QuoteActually Chris and the rest sorry to have mislead you... the actual problem was that copying this ' symbol from word to AGS isn;t compatible and since sci fonts have 127 there's isn;t that extra character that gets his place when an identified symbol comes up.

Glad you sorted it :)

QuoteAlso I noticed a small point which I haven't seen mentioned: Right-clicking in the script when I have text selected rarely offers me the opportunity to 'cut'. I can use Ctr-X, but for some reason the 'cut' option is greyed out.

This should be resolved by the new right-click menu in the 3.0.1 beta. Do let me know if it still happens in that version.

Dualnames

Chris one suggestion for the next version, it's not much that troubles me but it's the last thing that bother me in AGS, all sprites can be have their import resolution changed, which is way useful.. why can't background have so? Everytime I import a background I have to change to 320x200 then import and back to 640x480.
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

Why would you need to do that? Are you drawing your backgrounds at a different resolution to the game resolution?

Dualnames

Nope... but they seem to pixelate when they;re on 320x200. At least did on 2.72 and I have some function based on 640x480 so it would be a pain tranfering the game to 320x200. Anyway , whilst i was working with AGS 3.0 Some things have been bugging me...
1)The way walk behind area is drawn always leaves a stupid pixel or more that I wanted to be in or out of the area so I was wondering can you put some transparency to the areas? about 20%. That would help us guys draw better.

2)I've been having more weird problems around... for example: I forgot to put on a line of dialog the cDent.Say(" in front of it and instead of getting a return msg like unidentified symbol Are (that's the way the sentence started) I got EOF error(not a dialog) that only appeared in the output. It took me half an hour to find my mistake..(it was a long 1200 line room script). I've been getting those weird msgs a lot. I tend to forget to put include the const string msg in my code the appropriate way.. It's not important but bugs me a lot that is.
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)

The Bedminster Incident

Just one bug I think I've found--I downloaded the BASS Template from http://www.americangirlscouts.org/agsresources/Templates.html, which was created with an old version of AGS (i.e. before 2.7, don't know which, though); hence it's demo game can't be imported properly (it does the backup and everything, but when trying to actually load it it comes up with the genuine AGS.Types.AGSEditorException "This game was saved by an old version of AGS [...]" at load_old_dta_file). When I click on "OK" there and then select "Start New Game", the templates won't show in the template selection screen anymore (i.e. there's just a plain white area). It doesn't affect the "recently edited games" list, and when restarting the editor the templates are visible again, but I can recreate this error. Due to a crash of my hdd, I haven't got any other "old" games to check if this always happens with games created by versions before 2.7, but I'd consider it likely.

Other than that, great work. Kudos!

/Blodvarg
A la fin, il y aura seulement de la beauté.

Pumaman

I wouldn't say that's a bug -- it's a limitation of AGS 3.0 that it can't import games made with versions before 2.72. This is mentioned on the Download page.

The Bedminster Incident

Uh, that's not what I meant though. What I was trying to point out is that if you try to start a new game (in the "Welcome to AGS!" dialog box) after trying to import an old game and receiving said error message, you won't be able to select a template anymore, because they're not there (screen shot: http://www.mathematik.uni-marburg.de/~pfeiffef/notemp.png). This persists until you restart AGS.

/Blodvarg
A la fin, il y aura seulement de la beauté.

Pumaman

Ah ok sorry, I didn't read your post properly -- I'll look into this problem.

yarooze

#83
Already solved. It works with ags301. thnx!  ;D

Boyz, I have a problem with new AGS...  :'(
I tryed to load the AGS272 game and then:


I have only 4 items in the game and the all have different names.  :'(

My Blog

SMF spam blocked by CleanTalk