AGS v2.7 Final: Yet Another Edition

Started by Pumaman, Sat 13/11/2004 21:02:00

Previous topic - Next topic

RickJ

#440
Has something changed in the last beta regarding the vertical position of button text?  The text is at the very top edge, touching the button ouline almost.  Perhaps it is just my perception but I could have sworn that previously there was a margin at the top of the button.   Is it my perception or has something changed?

Also don't you think the text should be centered vertically as is currently done horizontally?  I suppose something like that is in the tracker somewhere?   

I also had a crash when importing a particular TTF font file.  Other TTF fonts work just fine.  If there is any interest I can post the TTF file that caused the problem, otherwise I'll just dispatch it to the bit bucket and move on.   Just let me know.   

Cheers

*** Edit ***
Ok, I found out what changed.  When I crashed the editor importing a new TTF font into slot 4, slot 4 then containd the messed up font.  After that AGS crashed whenever I selected that font, so I couldn't import over it.  I ended up having to revert back to the default fonts to get rid of it.   That operation changed the font I was using for the buttons.  So here is the conclusion:  Default font-0 when used on a GUI button ends up touching the top border.   Using an imported TTF Arial 12pt on the button leaves an acceptable margin at the top of the button.  So I wasn't imagining things after all.    I guess you can pretty much disregard most of the above but still let me know if you would like a copy of the TTF that cause the original problem.


SSH

#441
At the risk of embarrasing myself, I seem to be having problems with the "Walk off screen edge" interactions: they don't seem to be running at all for me. Now, I haven't got this game in an older version and I never used them before, so I wonder if someone else could double-check this, please...


EDIT: I foudn the problem. I wanted to walk on an area that was also a hotspot, but the hotspot's walkto was set outside the hotspot (and outside the Top of Screen marker). Everytime I clicked walkto on the hotspot, it walked to the walkto point rather than where I clicked. This is DESPITE me NOT having "Don't automatically move char in walk mode" set in game options, which according to the tooltip thereof should mean that it behaved how I wanted. Something is wrong here , eithr in the documentation or the behaviour. I worked around it by putting

if (mouse.Mode==eModeWalkto) player.Walk(mouse.x, mouse.y) else ProcessClick...

in on_mouse_click

12

strazer

QuoteAlso don't you think the text should be centered vertically as is currently done horizontally?  I suppose something like that is in the tracker somewhere?

Indeed: http://www.adventuregamestudio.co.uk/tracker.php?action=detail&id=180

Pumaman

QuoteHas something changed in the last beta regarding the vertical position of button text?  The text is at the very top edge, touching the button ouline almost.

This could well be related to using a TTF, where the font can draw upwards whereas a SCI font cannot.

QuoteI also had a crash when importing a particular TTF font file.  Other TTF fonts work just fine.  If there is any interest I can post the TTF file that caused the problem, otherwise I'll just dispatch it to the bit bucket and move on.   Just let me know.   

Coudl you upload the TTF, please -- t'would be handy for me to check the problem.

QuoteI wanted to walk on an area that was also a hotspot, but the hotspot's walkto was set outside the hotspot (and outside the Top of Screen marker). Everytime I clicked walkto on the hotspot, it walked to the walkto point rather than where I clicked.

This is by design, the hotspot walk-to points are used in all cursor modes (except Look if you choose its appropriate option).

If you don't want this behaviour, the workaround is as you scripted it.


strazer

Quote from: Pumaman on Sun 13/02/2005 16:20:37If there's anything else that needs to be done and I've forgotten, please do say so.

Quote from: Pumaman on Thu 27/01/2005 20:39:39
Quote
Display room info on "Areas" pane
Should be an easy one and results in one less tracker entry.

These two sound reasonable, and I agree it would be a good time to clean them up.

RickJ

QuoteThis could well be related to using a TTF, where the font can draw upwards whereas a SCI font cannot.
Yeah, I think that's exactly what happened.

Quote
Coudl you upload the TTF, please -- t'would be handy for me to check the problem.
I just tried to duplicate the problem using a new game and it seemed to work OK.  However the game I am currently working on has a problem importing it.  The problematic font is in the main game directory.  I have  imported it to slot-4 so now if you open the game and select slot-4 in the fonts tab AGS crahes. 

http://www.gaia-spa.com/project/ags/IniFileGame_V002.zip

Quote
If there's anything else that needs to be done and I've forgotten, please do say so.
Just an observation regarding the previous lazy evaluation discussion ... Having a "break" instruction would be helpful in avoiding many of the difficulties previously discussed.   For example ....
// Instead of doing this, which produces a bounds check exception
while ((i<SIZE)&&( (buff!=0))) {
   // do something ....
   i++;
}

// One could do this instead
while (i<SIZE) {
   if (buff==0) break;
   // do something ....
   i++;
}

Setting i=SIZE is not quite adequate because many times it is desireable to retain the value of i (to operate on the next token for example).  The workaround is to use another flag of course; it's just not as clean as break.    Since adding "break" is possibly easier than implementing "lazy eval"and could possibly get done sooner, I thought I would add this little bit to the previous discussion and leave the rest to your good judgement. 

Oh and I liked my Valentime spalsh!!!  Maybe next year AGS could pour me a beer  instead of giving me a picture?  8)  I think this should get a higher priority than that "Make My Game" button everyone always talks about.  ;) 


SSH

#446
Just thinking:

Wouldn't UpdateInventory be better arranged as a method of each InvWindow, or of each character?

Also it might be nice if GUI buttons had a ProcessClick method to simualte them being pressed, but from a script (to allow keyboard shortcuts)

Also, if you miss a semicolon from the end of a module header (in this case the last line of the header) you can get the strange error "Cannot declare body of imported function" or something like that...

edit:
Also, if you do CTRL-E after you just closed the interaction editor in a room, the room script does NOT come up. If you then change room screen and back again it works OK

edit 2:

if I access player.Room in the script, I sometimes get the error "(null) is not a public member of character"...

edit 3:

It would be nice if the debug console and single-step stuff mentioned if you are in a module script

edit 4:

Also, it would be nice if we could find out if the current room had the "Hide player" checkbox set
12

strazer

QuoteAlso, it would be nice if we could find out if the current room had the "Hide player" checkbox set

if (player.on == 0) {

SSH

Quote from: strazer on Thu 17/02/2005 12:44:19
QuoteAlso, it would be nice if we could find out if the current room had the "Hide player" checkbox set

if (player.on == 0) {

Is that in the manual? I can't find it and it isn't in the autocomplete, either...

It DOES compile, though!
12

strazer

Right, it's not in the manual and is hidden from the autocomplete.

It's just one of those things you pick up along the way. Check the link in my sig for more.

SSH

Cor, I never realised how much good stuff you've got in there, Strazer. Can't it be made an appendix to the CHM manual?  ;D
12

strazer

Since I update it regularly, I'd prefer it to be a link or a Wiki-style part of the online manual.

Pumaman

Quotejust tried to duplicate the problem using a new game and it seemed to work OK.  However the game I am currently working on has a problem importing it.  The problematic font is in the main game directory.  I have  imported it to slot-4 so now if you open the game and select slot-4 in the fonts tab AGS crahes. 

Thanks, I'll look into it.

QuoteJust an observation regarding the previous lazy evaluation discussion ... Having a "break" instruction would be helpful in avoiding many of the difficulties previously discussed.

Good point -- "break" or lazy evaluation would be handy, but I'm not convinced they're necessary for 2.7.

QuoteWouldn't UpdateInventory be better arranged as a method of each InvWindow, or of each character?

Perhaps it should be per-character, but ideally you shouldn't need to use it since Add/LoseInventory deal with it for you, so I'm not too concerned about it.

QuoteAlso it might be nice if GUI buttons had a ProcessClick method to simualte them being pressed, but from a script (to allow keyboard shortcuts)

You could always just call their handler method directly...

QuoteAlso, if you miss a semicolon from the end of a module header (in this case the last line of the header) you can get the strange error "Cannot declare body of imported function" or something like that...

I'll check the error message when this happens

QuoteAlso, if you do CTRL-E after you just closed the interaction editor in a room, the room script does NOT come up. If you then change room screen and back again it works OK

This is because Ctrl+E is mapped to Freehand drawing tool and overrides the global menu if you're in the Areas screen. I guess it needs to be remapped.

Quoteif I access player.Room in the script, I sometimes get the error "(null) is not a public member of character"...

Can you provide an example, I can't replicate this.

QuoteIt would be nice if the debug console and single-step stuff mentioned if you are in a module script

Yeah, I guess that would be handy, I'll think about it.

QuoteCor, I never realised how much good stuff you've got in there, Strazer. Can't it be made an appendix to the CHM manual?

strazer, I just realised, there's no link to your page from the AGS Resources page. Mind if I add one?

strazer

Quotestrazer, I just realised, there's no link to your page from the AGS Resources page. Mind if I add one?

Sure, go ahead.

SSH

Quote from: Pumaman on Thu 17/02/2005 20:10:40
QuoteWouldn't UpdateInventory be better arranged as a method of each InvWindow, or of each character?

Perhaps it should be per-character, but ideally you shouldn't need to use it since Add/LoseInventory deal with it for you, so I'm not too concerned about it.

It doesn't really bother me as I'm suing only 1 inventory anyway, but I use a loop to drop all inv at one point and use Update after that: it was then I noticed it wasnt really consistent with the rest of inv handling

Quote
QuoteAlso it might be nice if GUI buttons had a ProcessClick method to simualte them being pressed, but from a script (to allow keyboard shortcuts)

You could always just call their handler method directly...

Not if you're in a module you can't, becuase handlers have to be in the global script, and thus come AFTER modules are compiled.  Maybe the generic solution is to have the global script as just another (albeit default) module, and then you can manually place modules before or after the global script...

Quote
Quoteif I access player.Room in the script, I sometimes get the error "(null) is not a public member of character"...

Can you provide an example, I can't replicate this.

I'll see if I can knock up a simple example tomorrow

12

Scorpiorus

#455
I have just chanced on a certain similarity between struct and its instances names where the members list doesn't pop up:

script header:

struct TYPE_NAME {
int x;
};

struct TActor {
int x;
};

global script:

Ã,  TYPE_NAME name;
Ã,  or
Ã,  TYPE_NAME name[10];

Ã,  TActor Actor;
Ã,  or
Ã,  TActor Actor[10];


The members list doesn't pop up:

name.
name[1].
Actor.
Actor[1].


EDIT:
I don't want to start a separate thread for this but I have just noticed that when a game is restored the engine informs run-time plugins with AGSE_RESTOREGAME (that's ok) but it also triggers AGSE_ENTERROOM afterwards. And it becomes a problem when AGSE_ENTERROOM is used for purging objects left from the previous room as it would also purge everything just after the game is restored.

SSH

Quote from: SSH on Thu 17/02/2005 23:00:10
Quote
Quoteif I access player.Room in the script, I sometimes get the error "(null) is not a public member of character"...

Can you provide an example, I can't replicate this.

I'll see if I can knock up a simple example tomorrow

I can't reproduce the problem at all. Strangely enough, it was happening in a similar way to the .PreviousRoom thign I mentioned earlier: and as soon as I quit AGS and restarted it, the problem went away.... I think there is actually a bug in there: not on any specific method, but rather having AGS open editing a long time somehow screws up the room script compilation!!!

At least the workaround is save the game, restart AGS and reload, but I guess its a pretty hard bug to track down!
12

RickJ

Quote from: SSH
I can't reproduce the problem at all. Strangely enough, it was happening in a similar way to the .PreviousRoom thign I mentioned earlier: and as soon as I quit AGS and restarted it, the problem went away.... I think there is actually a bug in there: not on any specific method, but rather having AGS open editing a long time somehow screws up the room script compilation!!!

Quote from: RickJ
I have been heavily using the module manager and it works great.   I experienced a couple of crashes using beta-15 but haven't seen any with beta-16.   The crashes occured during long AGS Editor sessions when doing " close module script => close module manager => test game".   

This sounds a lot like the crash I experienced a a while back.  I also had the editor open for a long time but haven't had a problem since.

Pumaman

QuoteSure, go ahead.

Thanks, have done.

QuoteNot if you're in a module you can't, becuase handlers have to be in the global script, and thus come AFTER modules are compiled.  Maybe the generic solution is to have the global script as just another (albeit default) module, and then you can manually place modules before or after the global script...

Ah yeah I see your point. This needs further consideration.

QuoteI have just chanced on a certain similarity between struct and its instances names where the members list doesn't pop up:

Ah, well spotted, I'll get it fixed.

At least, the Actor problem can be fixed easily, the "name" problem is more tricky and I may leave fixing it on the backburner for now.

QuoteI don't want to start a separate thread for this but I have just noticed that when a game is restored the engine informs run-time plugins with AGSE_RESTOREGAME (that's ok) but it also triggers AGSE_ENTERROOM afterwards. And it becomes a problem when AGSE_ENTERROOM is used for purging objects left from the previous room as it would also purge everything just after the game is restored.

Well, AGSE_LEAVEROOM allows you to purge things when leaving the room.

ENTERROOM will indeed be called after restoring a game, because the game does switch to another room, and plugins may need to be notified of this, depending on what they're doing.

QuoteI can't reproduce the problem at all. Strangely enough, it was happening in a similar way to the .PreviousRoom thign I mentioned earlier: and as soon as I quit AGS and restarted it, the problem went away....

Hmm, that is strange .. has anyone else experienced a problem like this?


Pumaman

Well, beta 18 is now up. This really should be the last beta -- the next release will be RC1 unless there's a very good reason why not.

SMF spam blocked by CleanTalk