AGS 2.71 Final 2 - Politically Correct Edition

Started by Pumaman, Sun 05/06/2005 23:32:14

Previous topic - Next topic

Radiant

#60
If you declare a variable in a module header, and have an export from that module, AND export the same variable from the global script, you don't get an error message, but the references from room script to the variable won't match those from the module (did that make sense? :) )

If you hit 'recompile all room files' while the current room is dirty, you are asked if you want to save it - but it's still dirty after recompiling everything.

(edit) I find the new syntax replacement system too intrusive. When I type "int a, b;" it automatically adds an extra space after the comma. I understand that some people may find this useful but could you please add an option to turn it off, for those people who find it annoying that what you type is not what you get?

Pumaman

Quote from: Radiant on Sat 02/07/2005 14:12:17
If you declare a variable in a module header, and have an export from that module, AND export the same variable from the global script, you don't get an error message, but the references from room script to the variable won't match those from the module (did that make sense? :) )

This is a problem, but the issue is scripts can legitamately export the same thing as each other -- for example, repeatedly_execute can be in multiple scripts but that's fine. I'll have a think if there's a clean way to catch this.

Quote
If you hit 'recompile all room files' while the current room is dirty, you are asked if you want to save it - but it's still dirty after recompiling everything.

I just tried this but it seemed fine -- did you choose "Yes" or "No" when it asked to save it?

Quote
(edit) I find the new syntax replacement system too intrusive. When I type "int a, b;" it automatically adds an extra space after the comma. I understand that some people may find this useful but could you please add an option to turn it off, for those people who find it annoying that what you type is not what you get?

There already is one, use the File, Preferences option in the script editor and untick "Automatically add space after comma".

Radiant

Quote from: Pumaman link=topic=21373.msg264473#msg264473
This is a problem, but the issue is scripts can legitamately export the same thing as each other -- for example, repeatedly_execute can be in multiple scripts but that's fine. I'll have a think if there's a clean way to catch this.
The way I understand it, if a function is present in multiple scripts, then all of them will be called (is that correct? Or only for a system function such as rep_ex?) However, I can't think of a good application for having a variable in multiple scripts.

Quote
Quote
If you hit 'recompile all room files' while the current room is dirty, you are asked if you want to save it - but it's still dirty after recompiling everything.
I just tried this but it seemed fine -- did you choose "Yes" or "No" when it asked to save it?
Yes. And it was saved again in the process of recompiling :)

Quote
There already is one, use the File, Preferences option in the script editor and untick "Automatically add space after comma".
Way cool!

Ghost

There's one thing on my wishing list:

some games (including my own) seem to use the highest possible colour
depth, instead of 16k, in order to get "finest gradients" right.
Now each time I start AGS there's a warning message "Your game is in 32k.
But your desktop is in 16k. The colours..." etc. It would be great to have a
"Don't show this warning again" option- because, strangely, the game looks slightly gritty in the editor but perfect when I run it, even though the desktop col. depth is 16k.

Would be nice to have that option.

And I still think it would be a nice touch to show, in the Dialog Editor, the text of an option instead of only its number...

Kweepa

Quote from: Ghost on Wed 06/07/2005 11:11:17
strangely, the game looks slightly gritty in the editor but perfect when I run it, even though the desktop col. depth is 16k.

Are you running it full screen? It will switch to 24 or 32 bit colour in that case.
Still waiting for Purity of the Surf II

Pumaman

Quote from: Radiant on Mon 04/07/2005 22:58:22
Yes. And it was saved again in the process of recompiling :)

Strange, I just tried that and it wasn't dirty afterwards.

Quotesome games (including my own) seem to use the highest possible colour
depth, instead of 16k, in order to get "finest gradients" right.
Now each time I start AGS there's a warning message "Your game is in 32k.
But your desktop is in 16k. The colours..." etc.

Is there any reason that you don't just run Windows at 32-bit? Since virtually everyone uses 32-bit desktops these days, I can't really justify adding in a "don't remind me again" option for such a rare message.

strazer

#66
Quote from: Pumaman link=topic=21373.msg264868#msg264868Is there any reason that you don't just run Windows at 32-bit? Since virtually everyone uses 32-bit desktops these days, I can't really justify adding in a "don't remind me again" option for such a rare message.

I run the editor on Linux via WINE and I always get this message with 32-bit games since Linux desktops are 24-bit for some technical reason. So I would use it but I don't really care since it's just a click away.

Edit:

Can we have "repeatedly_execute" in room scripts please?
It would save a lot of time not having to explain to users how and where to paste room rep_ex code.

Ghost

i always refused to use 32k because, well, i have quite an old pc (P450) and it actually slows down (a bit. or maybe I'm just paranoid  ;)

I would like having the option to disable that warning, but of course I see that it is a minor, rare message, and it's really just a mouse click.

but can I have the first few words of a dialogue option in the script? That's something that should please quite a lot of people!

strazer

Quote from: Ghost on Thu 07/07/2005 18:00:57
but can I have the first few words of a dialogue option in the script? That's something that should please quite a lot of people!

What do you mean? GetDialogOptionText?

Gilbert

Also, I just noticed he wrote 16k, 24k and 32k colours.

It should be 16bit, 24bit and 32bit.
32k (or 64k) is actually just hicolour (i.e. 15/16bit).

Just a small correction, nothing special.

GarageGothic

#70
I have a small suggestion for the DynamicSprite.CreateFromExistingSprite function, although I don't know if it's even technically possible.

My primary use for the function is to create "effect sprites" (reflections etc.) from character sprites. Most of these effects use transparency settings. However, if you're using alpha channel for the characters, object transparency won't work for the copied sprite. So, I was wondering, would it be possible to add an option to remove the alpha channel when creating the dynamic sprite (thus downgrading it from 32 to 24 bit)?

Edit: And another thing. Regarding this suggestion, I had a crazy idea:

Quote from: Pumaman on Sat 11/06/2005 18:32:01
QuoteThis can actually be very useful, even better, if CreateFromBackground() can accept 4 more optional parameters:
DynamicSprite.CreateFromBackground(int frame, int x1, int y1, int x2, int y2)
Which clips the sprite in a rectangular area.

I can see the uses for that, I'll certainly consider it.

I was thinking whether it'd be possible to apply the transparent pixels from a similarly sized sprite as a mask when cropping the dynamic sprite from the background. I suppose it would actually work by copying the "pink pixels" from the existing sprite onto the dynamic one.
If the CreateFromBackground function would work on other background frames than the visible one, this could be used for all kinds of interesting "see through" effects, where part of the background was replaced by a different version of the same screen. This would even allow for semi-dynamic lighting of scenes (much better than the flashlight plugin).

Edit2: considering these wild ideas, a triangular cutout instead of a square would be an interesting option as well.

Fribbi AGDI joker

I have a idea. Could you add a click and drag option for the interaction editor for the next updated version. Lets say if I added a interaction in a wrong place by mistake I can then correct that by clicking on it with the mouse and drag it onto where it belongs instead writing the interaction or make the same commands code again.Ã,  It will speed for allÃ,  games programmer alot.


Ghost

Quote from: strazer on Thu 07/07/2005 18:21:57
Quote from: Ghost on Thu 07/07/2005 18:00:57
but can I have the first few words of a dialogue option in the script? That's something that should please quite a lot of people!

What do you mean? GetDialogOptionText?

No, nothing that's about the scripting commands- just something like this:
I have a topic "Hi, how are you"

and in the dialog script editor I'd then have

[Topic Number] // "Hi, how..."

just to hace a small reminder what a topic is about, because a large dialogue is usually a messy session of switching between the screens.

I have asked for this some time ago, and someone said this feature was in one of the older versions, so I'd LOVE to see a comeback.

strazer

I guess the feature has been removed because if you changed the dialog option text, the dialog script comment would have to be updated too. In fact, there's still an outstanding tracker entry for that.
Perhaps CJ decided it just wasn't worth the trouble and removed them entirely?

Radiant

As an avid keyboard user, could I please ask that all menu options have a different hotkey? E.g. alt-U, D refers to both GUI/Delete and GUI/eDit interface_click, and alt-R, B is doubly mapped (and also, the room menu has some hotkeys missing, and 'S' would be more logical for 'Save room').

Also, could you please add hotkeys to the Module Manager Menu, and especially make 'escape' exit that menu? Thanks!

Finally, I'm not sure if I mentioned this before, but it would be useful to be able to name dialogs, rather than having a list of numbers. This would have no relevance for scripting, but would simply make the 'dialogs' list more clear just like the 'rooms' list is more clear with naming

Pumaman

QuoteCan we have "repeatedly_execute" in room scripts please?
It would save a lot of time not having to explain to users how and where to paste room rep_ex code

Sounds sensible yes, I'll try and do it for this version.

Quotebut can I have the first few words of a dialogue option in the script? That's something that should please quite a lot of people!

This was originally in but then was taken out because it wasn't kept up to date if you renamed a dialog option. It has been on the to-do list for ages to put it back in and keep it up to date, but it's just one of those features that seems to keep getting left behind, for which I apologise.

QuoteSo, I was wondering, would it be possible to add an option to remove the alpha channel when creating the dynamic sprite (thus downgrading it from 32 to 24 bit)?

Sounds reasonable to me.

QuoteI was thinking whether it'd be possible to apply the transparent pixels from a similarly sized sprite as a mask when cropping the dynamic sprite from the background. I suppose it would actually work by copying the "pink pixels" from the existing sprite onto the dynamic one.

Can you clarify what you mean -- using the non-transparent area of another sprite as a mask to decide which pixels are copied from the background onto the new sprite?

QuoteI have a idea. Could you add a click and drag option for the interaction editor for the next updated version.

This has been on the to-do list for ages, but because the vast majority of people use scripting rather than the interaction editor it just hasn't been high priority I'm afraid, and it's quite technically difficult to implement considering the benefits it would provide.

QuoteAs an avid keyboard user, could I please ask that all menu options have a different hotkey? E.g. alt-U, D refers to both GUI/Delete and GUI/eDit interface_click, and alt-R, B is doubly mapped (and also, the room menu has some hotkeys missing, and 'S' would be more logical for 'Save room').

Well spotted, I hadn't noticed those double-mappings, I'll get them fixed.

QuoteFinally, I'm not sure if I mentioned this before, but it would be useful to be able to name dialogs, rather than having a list of numbers. This would have no relevance for scripting, but would simply make the 'dialogs' list more clear just like the 'rooms' list is more clear with naming

I can appreciate this yes, in fact I think it's already on the tracker.



Anyway, beta 3 is now up. This includes new string support, please read the description in the updated first post of how to use it. Feedback would be appreciated here on whether it works, this new string support is still considered experimental.

Rui 'Trovatore' Pires

#77
I'm liking it. But:

Here's what I had.

string buffer;
(etc... then in a function: )
if (car!=null) StrCopy(buffer, car.name);

"car" is a character pointer, or whatever you call it. The property "name" is undocumented, so I assume unnoficcial, but I couldn't figure out any other way to get the character's name.

Now with:

String buffer;
(etc... then in a function: )
if (car!=null) StrCopy(buffer, car.name);

...it told me it couldn't convert String* to string, or the other way around. Makes sense, I thought, and saw my mistake, so I edited it such:

String buffer;
(etc... then in a function: )
if (car!=null) buffer=car.name;

...and I got:
Error (line 264): Type mismatch: cannot convert 'char*' to 'String*'

I don't understand the nature of the error, so I don't know how I misread the correct use of thing. This is as much to let you know a problem I'm having, as a user, as to ask for more information as to why this happened. Accourse I can imagine that car.name would be a string and not a String, but that's the only thing I can think of. And if that's the problem, I don't understand the error message.

EDIT - Also, how do I update the following:

else if (obj!=null) obj.GetName(buffer);

...since buffer is now a String?
Reach for the moon. Even if you miss, you'll land among the stars.

Kneel. Now.

Never throw chicken at a Leprechaun.

Pumaman

QuoteString buffer;
(etc... then in a function: )
if (car!=null) buffer=car.name;

...and I got:
Error (line 264): Type mismatch: cannot convert 'char*' to 'String*'

Because car.name is actually a char[] rather than a string, it's not automatically converted. This will be replaced wiht a proper Name property for the characters in due course.

QuoteEDIT - Also, how do I update the following:

else if (obj!=null) obj.GetName(buffer);

Sorry, I probably didn't make this clear. For the final version, all the GetXXX(string buffer) functions will be replaced with properties that return a String. For now I've just done the GUI label, textbox and button so you can't convert code using other ones yet. As I say, it's a pilot version.

Rui 'Trovatore' Pires

Arright, 's clear now. Makes not much difference - everything still works dandy if I keep the "strings" as is. Congratulations, too - these'll make for much nicer, user-friendly code and no mistake (I was getting really tired of being able to do stuff like "if (sldSlider.Value==number)" and THEN being forced to go "string buffer; lblLabel.GetText(buffer); if (StrComp(buffer, "whatnot")==0)"...).
Reach for the moon. Even if you miss, you'll land among the stars.

Kneel. Now.

Never throw chicken at a Leprechaun.

SMF spam blocked by CleanTalk