AGS 3.0.1 Final 2 - Queen's English Edition

Started by Pumaman, Wed 30/01/2008 21:55:37

Previous topic - Next topic

subspark

Thanks for the info, SSH. I'm stumped as to why a reasonable response like yours wasn't posted in the first place.

Paul.

Shane 'ProgZmax' Stevens

Another thing odd with the fade effects is that if you fade out and then in while in the same room the characters do not appear until AFTER the fade in finishes, so they are there during the fade out and then gone until it fades completely back in.

Pumaman

Is this definitely still the case with beta 4? I did some fixes around fade out/in in earlier betas.

Shane 'ProgZmax' Stevens

It wasn't working in beta 3a but it does work properly in beta 4, so good job!

GarageGothic

Quote from: Pumaman on Thu 20/03/2008 17:29:23
QuoteAs I explained in the linked thread, there are workarounds. Your solution avoids the cropping stage, which is a great idea. But still, since I need to perform the same operation 1-200 times every loop, I'd rather avoid copying/drawing the full sprite:

Ok, I'll look into it.

Thanks a bundle!

CJ, I have a question about how DrawingSurface.Release() works. I have several different visual effect scripts in my game which may need to draw to the same DynamicSprite (running multiple particle systems at the same time for instance). Back in AGS 2.72 when I used the background as a temporary drawing surface for DynamicSprites, I avoided using RawRestoreScreen() within the functions, but rather set a variable to mark the background as dirty and then RawRestored the screen in a script at the very bottom of the module list.
Now, as for 3.0, the manual states that DrawingSurface.Release() "[t]ells AGS that you have finished drawing onto this surface, and that AGS can now upload the changed image into video memory." Does this mean that the changed sprite is directly uploaded to video memory, or does the function rather - like my 2.72 script - mark the sprite as changed and update it at the end of the loop.

In other words, can I use DrawingSurface.Release() multiple times during a loop without any slowdown, or should I rather keep the DrawingSurface open throughout the game loop and only release it at the very end?

Rui 'Trovatore' Pires

GG, if it helps - if you call Release() and then have a Wait() function, the screen won't be updated until it's finished Waiting.

However, during that time, if you move the mouse over the screen, it leaves a trail of the image released.

Didn't want to talk about it, because I've never touched the RawDraw functions and have suddenly begun experimenting with the new Drawing functions, and half the time I had to figure out what the heck was supposed to happen and why stuff wasn't happening right and etc. But I did have the aforementioned issue - which might have been just a slip-up in my code, anyway. Still - does it help answer your question in any way?
Reach for the moon. Even if you miss, you'll land among the stars.

Kneel. Now.

Never throw chicken at a Leprechaun.

GarageGothic

Hmmm, yes I guess that means the sprite isn't uploaded to video memory until either the loop or a blocking command finishes. Sounds weird about the mouse trail though. Part of my html-like script uses Wait() commands in-between chunks of drawing code to avoid drops in framerate which lead to choppy audio. I wonder if the mouse issue would also happen if I don't Release() the DrawingSurface until the end of the process.

Thanks for the info, Rui. I hope CJ can clarify further.

Pumaman

QuoteNow, as for 3.0, the manual states that DrawingSurface.Release() "[t]ells AGS that you have finished drawing onto this surface, and that AGS can now upload the changed image into video memory." Does this mean that the changed sprite is directly uploaded to video memory, or does the function rather - like my 2.72 script - mark the sprite as changed and update it at the end of the loop

It is marked as changed and updated at the end of the loop, so if you have multiple calls to GetDrawingSurface and then Release for the same sprite, it should only actually get updated once.

QuoteGG, if it helps - if you call Release() and then have a Wait() function, the screen won't be updated until it's finished Waiting.

However, during that time, if you move the mouse over the screen, it leaves a trail of the image released.

That doesn't sound right at all, please can you be more specific about what you're trying to do and what is happening?

Rui 'Trovatore' Pires

Oh boy. Nevermind, I've just gone through my code and I've just described what happened when I DIDN'T release it before Wait. I tried that at some point because I didn't want to release it before I restored the backup. It's simple, I wanted to RawDraw text, wait and then erase it - and I knew if I called Release I wouldn't be able to restore the background (only later I found I could just declare a new Drawing Surface). And I just described what happened when I tried to Wait BEFORE Releasing. I do remember that NOT having a blocking function and NOT calling release also displayed it, which is why I tried this in the first place.

Another false alarm, sorry about that,
Reach for the moon. Even if you miss, you'll land among the stars.

Kneel. Now.

Never throw chicken at a Leprechaun.

GarageGothic

Quote from: Pumaman on Tue 25/03/2008 15:27:38It is marked as changed and updated at the end of the loop, so if you have multiple calls to GetDrawingSurface and then Release for the same sprite, it should only actually get updated once.

Great, just as I hoped. Thanks for clearing that up.

Rui 'Trovatore' Pires

CJ, I'm dreadfully sorry, please replace the Default Game with the following:

http://www.lumpcity.co.uk/~skimbleshanks/Default%20Game.agt

Reason is - if the player saves, say, a WINDOWED game, the GAMMA slider will be turned off, because in a windowed gamme gamma don't work. But if the player LOADS that game full-screen, gamma should be turned back on. That doesn't happen right now, sorry. I added a check to on_event eEventRestoreGame to ensure this happens.

AFAIK, the onlt games that suffer from this right now are The Book Unfinished and Lazytown.
Reach for the moon. Even if you miss, you'll land among the stars.

Kneel. Now.

Never throw chicken at a Leprechaun.

Pumaman

Rui -- thanks, I'll look into putting that new version into the next version.

For now, RC 1 is up. I don't want 3.0.1 to drag on forever, and there are already quite a few important fixes to AGS 3.0 contained in it, so I think I'd like to draw a line under 3.0.1 at this point and declare that it's time to stop adding new features and allow it to mature for an official release.

Rui 'Trovatore' Pires

Said maturing will include ability to left/center/or-right-align RawDrawn text, as mentioned earlier in this thread, won't it? ::)

Already there, nevermind. Sheesh. How come I keep doing these things.
Reach for the moon. Even if you miss, you'll land among the stars.

Kneel. Now.

Never throw chicken at a Leprechaun.

subspark

It gets the best of us my friend ;).

Paul.

lemmy101

Awesmoe stuff CJ! this version is as close as we've had to 100% perfect since the move to 3.0.x! :) (with the huge added bonus of DX9, of course!

One thing though: when you start betas for the next point release, would it be possible to get the new plugin event that triggers once per frame before all the frames are set up you mentioned a while back? no biggie for now, as we have a work around, but it has some quirks that makes Mia go into the moonwalk at some points that we can't get around. It's fine for development though and we can progress perfectly well without it for now... (Also it adds a lot of messy hacks to integrating AGX into a game once that's released for use)

cheers for all your help! :)

lemmy

bicilotti

I'm posting to report what it seems a little glitch.

In my code I have:

Code: ags
while (warner != '"')


When updating to 3.1.0 I got this error:

* Error (line 411): incorrectly terminated character constant

When I change " to its ASCII value, like:

Code: ags
while (warner != 34)


everything runs perfect. Not really a big problem, but I wanted to report it!



Gilbert

I'm not sure, but I think this is not really a bug.

Try
Code: ags
while (warner != '\"')
and see if that works.

But of course, it's no big deal as you can always use the ASCII code instead when checking for a character.

bicilotti

Quote from: Gilbot V7000a on Thu 27/03/2008 01:13:18
I'm not sure, but I think this is not really a bug.

Try
Code: ags
while (warner != '\"')
and see if that works.

That gives me exactly the same error.

Dualnames

I think instead of '/"' it was meant to be '/' but he mistyped, does that give the same error as well?
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)

bicilotti

Quote from: Dualnames on Thu 27/03/2008 14:27:00
I think instead of '/"' it was meant to be '/' but he mistyped, does that give the same error as well?

I think he meant what he wrote, as in c/c++ you use a similar syntax for the " and some other "special" characters.
Anyway, other symbols (like / or [) do not give errors.

SMF spam blocked by CleanTalk