AGS 3.1.2 SP1 now released!

Started by Pumaman, Tue 03/02/2009 20:07:56

Previous topic - Next topic

SSH

Does QuitGame(0) quit immediately, or wait until the current script is finished? If the latter, it would make more sense that any other postponed tasks (like, e.g. a SaveGameSlot waiting to happen) would occur before the quit...
12

SpacePaw

I think the scripts are processed on one thread so it should wait for every command to end before going to the next one. It's just a guess though :)

SSH

Oh no, SpacePaw, its waaaaay more complicated than that!

Quote
SaveGameSlot (int slot, string description)

Saves the current game position to the save game number specified by SLOT, using DESCRIPTION as the textual description of the save position. Be careful using this function, because you could overwrite one of the player's save slots if you aren't careful.

The SaveGameDialog function uses slots numbered from 1 to 20, so if you don't want to interfere with the player's saves, I would recommend saving to slot numbers of 100 and above.

NOTE: The game will not be saved immediately; instead, it will be saved when the script function finishes executing.

And see also: http://www.adventuregamestudio.co.uk/manual/BlockingScripts.htm
12

SpacePaw

Quote from: SSH on Fri 27/03/2009 12:31:56
Oh no, SpacePaw, its waaaaay more complicated than that!

And see also: http://www.adventuregamestudio.co.uk/manual/BlockingScripts.htm

Oh! Sorry then, my bad :) AGS engine seems so proffessional. I wish I could get my hands on some sort of documentation :)

Electroshokker

Just noticed this:

when running 2 animation loops consecutively (with the checkbox: run the next loop after this one to make a long animation)

I notice a graphical glitch from time to time: the blue cup pops up now and again. (It doesn't happen all the time, just some of the time, but if you run the full animation in a contiguous loop it pops up waaay to much)

the animation itself is run with eRepeat & eNoBlock (the first loop is 37 frames, the second 20 frames)

(I could fix this by putting everything in one very long loop, but thought I'd better report it)

subspark

When running the 2x filters on 16:10 games (320x200/640x400) the aspect ratio falls short vertically, but when I run it under any other filter the graphics scale properly (1:1).

I'm running a native desktop resolution of 2560x1600 if that helps.

Cheers,
Sparky.

Gilbert

What would you expect? These modes were not using square pixel aspect in the first place anyway. They were supposed to look okay on a 4:3 display while fullscreen, so if you use the 2x filter (and any filters that displays the game area in exact multiples of the original resolution) on a desktop with square pixel aspect the image will be slightly squashed vertically (unless the graphics of your game were meant to use square pixel aspect to "fit" widescreens).

subspark

My game = 16:10
My screen = 16:10

The other multiples work fine. It's just the 2x that doesn't.
Hope that makes more sense.

Cheers,
Sparky.

Trent R

Quote from: SSH on Fri 27/03/2009 10:27:40
Does QuitGame(0) quit immediately, or wait until the current script is finished? If the latter, it would make more sense that any other postponed tasks (like, e.g. a SaveGameSlot waiting to happen) would occur before the quit...
SSH, this reminded me of Khris's suggestion for eEventQuitGame in the wishlist thread....


~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

QuoteI noticed that if you do F1 on System.ColorDepth you get a page not found in the help ... although you can find that entry manually...

Strange, I'm not sure why this is happening ... AGS is passing the right thing to Windows Help, but it doens't seem to be able to find the page for some reason.

QuoteWhat I hate is that I can't find any of the code for the room functions. It's just descriptions.

Can you clarify? I don't understand what you mean?

QuoteDoes QuitGame(0) quit immediately, or wait until the current script is finished? If the latter, it would make more sense that any other postponed tasks (like, e.g. a SaveGameSlot waiting to happen) would occur before the quit...

It occurrs immediately. And for backwards compatibility, I can't really change that now. :)

Quotewhen running 2 animation loops consecutively (with the checkbox: run the next loop after this one to make a long animation)

I notice a graphical glitch from time to time: the blue cup pops up now and again. (It doesn't happen all the time, just some of the time, but if you run the full animation in a contiguous loop it pops up waaay to much)

Strange, I'll see if I can replicate this.

QuoteWhen running the 2x filters on 16:10 games (320x200/640x400) the aspect ratio falls short vertically, but when I run it under any other filter the graphics scale properly (1:1).

Your monitor/graphics card probably doesn't support 640x400, thus forcing the game to run at 640x480. This is a particularly annoying feature when you have a widescreen monitor but the driver won't actually let you use a widescreen resolution like 640x400...

subspark

QuoteDoes QuitGame(0) quit immediately, or wait until the current script is finished? If the latter, it would make more sense that any other postponed tasks (like, e.g. a SaveGameSlot waiting to happen) would occur before the quit...
I'm sure you can code your game to quit after the player has saved his game. Just tell the Save Game GUI to popup when the user clicks quit or (Ctl+Q) and then after the save has been completed, run the QuitGame command.

QuoteWhat I hate is that I can't find any of the code for the room functions. It's just descriptions.
QuoteCan you clarify? I don't understand what you mean?
Well I try and look for the example code and its not there. I do a search for function room_AfterFadeIn() or function room_Load() and nothing turns up. Might be the same bug in windows help as previously discovered but admittedly I have looked for it manually.

QuoteYour monitor/graphics card probably doesn't support 640x400
Yeah the lowest it goes in display properties is 800x600 however I have discovered something pretty incredible. I can actually run 320x200 and 320x240 in Vista. I thought that was forbidden in DirectX 10!?

When I run 320x200 it also falls short, vertically. :-\

Cheers,
Sparky.

SSH

Quote from: subspark on Wed 01/04/2009 23:24:16
QuoteDoes QuitGame(0) quit immediately, or wait until the current script is finished? If the latter, it would make more sense that any other postponed tasks (like, e.g. a SaveGameSlot waiting to happen) would occur before the quit...
I'm sure you can code your game to quit after the player has saved his game. Just tell the Save Game GUI to popup when the user clicks quit or (Ctl+Q) and then after the save has been completed, run the QuitGame command.

Well, that's exactly the point: this script:

Code: ags

function Yes_Save_Before_Quitting_Please_OnClick(GUIControl *gc, Button butt) {
   SaveGameSlot(888);
   QuitGame(0);
}


doesn't work as you'd expect. You have to set a variable and then wait for the next repeatedly_execute to check the variable THEN quit (or something similar). I cannot imagine why someone would rely of the backwards compatibility of this behaviour.
12

GarageGothic

What if you put a Wait(1) before QuitGame(0)?

SSH

As I said in the original post, the manual says: "NOTE: The game will not be saved immediately; instead, it will be saved when the script function finishes executing. ". So a Wait doesn't work.
12

Gilbert

Quote from: subspark on Wed 01/04/2009 23:24:16
Yeah the lowest it goes in display properties is 800x600 however I have discovered something pretty incredible. I can actually run 320x200 and 320x240 in Vista. I thought that was forbidden in DirectX 10!?

That's probably just because AGS doesn't use DirectX10. DirectX9 and DirectX10 are two different things. You cannot run DirectX9 programmes with DirectX10. If you are running a DirectX9 programmes you still need to have DirectX9 installed. In fact, Vista came with DirectX10 and DirectX9, which was of a VERY old version for some unknown reasons, so sometimes you even need to update DirectX9 to run some newer programmes.

subspark

DOH! I've rushed my reply again. Sorry guys. I meant to say, it's not only impossible with DirectX 10 but also DirectX 9 in Vista Altogether.
I remember reading in another thread that to play 320x200/240 AGS games in Vista, you had to switch to 2x filter or the game would close with an error message.

Incredibly, this is NOT the case anymore and I'm as shocked as a black wildebeest on a cloud.
Hmm, I wonder if Chris has secretly slipped a workaround into AGS 3.1.2?

Cheers,
Sparky.

Dualnames

Quote from: Leon on Tue 07/04/2009 23:31:00
One thing I noticed while running h2g2 is I previously set up DirectDraw 5 with a 2x nearest neighbour filter to enlarge the game to 640x480. So far this is what the setup tells me and what always worked. But when I run the game it starts in a window (as requested) but covering almost my whole screen. And I work in a resolution of 1280x1024 ....  :o
It has never done that before.....

Leon asked me this. Thing is I haven't changed anything that would cause that.. is there a reason for that? I have the two beta versions (one that didn't show the problem and the last one that shows it)
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 notice a graphical glitch from time to time: the blue cup pops up now and again. (It doesn't happen all the time, just some of the time, but if you run the full animation in a contiguous loop it pops up waaay to much)

the animation itself is run with eRepeat & eNoBlock (the first loop is 37 frames, the second 20 frames)

I can't reproduce any problems with this, has anyone else had this problem?

QuoteWell I try and look for the example code and its not there. I do a search for function room_AfterFadeIn() or function room_Load() and nothing turns up.

Well, those are event handlers and don't have their own specific help pages, just like cEgo_Look and hHotspot_Interact don't either. Perhaps they should, though there wouldn't be much to say about them.

QuoteI can actually run 320x200 and 320x240 in Vista. I thought that was forbidden in DirectX 10!?

I don't think any resolutions are forbidden in DX10 -- it's just that since the manufacturers have to re-write their graphics drivers, most of them can't be bothered to implement support for 320x200 since it's seen as obsolete.

QuoteWhen I run 320x200 it also falls short, vertically.

Then you're probably not running in 320x200, it's probably actually running at 320x240 in letterbox mode instead.

QuoteWell, that's exactly the point: this script doesn't work as you'd expect. You have to set a variable and then wait for the next repeatedly_execute to check the variable THEN quit (or something similar). I cannot imagine why someone would rely of the backwards compatibility of this behaviour.

It's a fair point, and I can see why your request would be useful.

QuoteI remember reading in another thread that to play 320x200/240 AGS games in Vista, you had to switch to 2x filter or the game would close with an error message.

Incredibly, this is NOT the case anymore and I'm as shocked as a black wildebeest on a cloud.
Hmm, I wonder if Chris has secretly slipped a workaround into AGS 3.1.2?

Recent versions of AGS will automatically activate the 2x filter if 320x200 isn't supported.

QuoteLeon asked me this. Thing is I haven't changed anything that would cause that.. is there a reason for that? I have the two beta versions (one that didn't show the problem and the last one that shows it)

What resolution is the game set to in your General Settings pane in the editor?

QuoteLeon asked me this. Thing is I haven't changed anything that would cause that.. is there a reason for that? I have the two beta versions (one that didn't show the problem and the last one that shows it)

The acsetup.cfg file in your latest version is invalid, which is causing the problem. You might have deleted it by accident and then run WinSetup, which would have created an invalid one.

Go back into the editor and do a Build EXE, it should generate you a new acsetup.cfg file that should work properly.

SSH

Quote from: Pumaman on Fri 10/04/2009 15:04:13
QuoteI notice a graphical glitch from time to time: the blue cup pops up now and again. (It doesn't happen all the time, just some of the time, but if you run the full animation in a contiguous loop it pops up waaay to much)

the animation itself is run with eRepeat & eNoBlock (the first loop is 37 frames, the second 20 frames)

I can't reproduce any problems with this, has anyone else had this problem?

My guess is that the animation uses a loop number that isn't populated in the character's Normal view and the bluecup appears when the char briefly flips back to being in its normal view instead of the animation.
12

JpSoft

Things i noticed last days:

- BlockingHeight() and BlockingWidth() do not work properly.
- PauseGame() do not works with GUI buttons animations.
- If you place 2 characters in the same point at the same loop, the second one will become static (it minds, you will be unable to move him after that)

Jp

SMF spam blocked by CleanTalk