Adventure Game Studio | Forums

AGS Support => Advanced Technical Forum => Topic started by: Pumaman on Sat 28/02/2004 23:04:11

Title: AGS 2.61 Pre-final Edition
Post by: Pumaman on Sat 28/02/2004 23:04:11
This is the final release of 2.61. There will be no further changes unless a serious bug is found - otherwise, it will become the official 2.61 release in a few days time.

Changes since RC2:
* PlayAmbientSound now does not reset the sound if you play a sound that is already playing
* Fixed crash in PlayVideo if ambient sound was playing at the time.


Changes since RC1:
* Added character[].z variable, to allow you to make a character levitate into the air whilst still using the baseline, light levels and interactions of its Y co-ordinate.
* Skipping cutscene will now skip text boxes if No Auto Remove text is set, rather than hanging the game.
* Changed following characters so that if the player character is following another, and you call NewRoom, the follow will be aborted.
* Fixed repeatedly_execute_always causing random script errors occasionally.
* Fixed FollowCharacter crashing when you tried to stop a character following, which I broke in RC1.

Changes since beta 6:
* Added "Change colour depth" option to Game menu, to make it more intuitive than just being on the Palette pane.
* Added HasPlayerBeenInRoom script function.
* Added plugin API functions GetDirectSound, DisableSound, CanRunScriptFunctionNow, CallGameScriptFunction.
* Added system.viewport_width, system.viewport_height, system.version text script variables.
* Adjusted COM plugin support so that it works with .net COM-interop DLLs.
* Adjusted the way PlayVideo shuts down the AGS audio to try and correct a bug.
* Added ability to get a view frame's speed and sprite number from GetGameParameter.
* Changed the Object Pos display in the Objects pane of the editor to display the lower-left co-ordinate, as used in the game engine, rather than the top-left.
* Added error message if you call NewRoom while the player character is following another character.
* Fixed character walking on the spot at the end of a move occasionally.
* Fixed bug where characters could get stuck when using Adjust Speed with Scaling.
* Fixed Setup program not working if it was run from the command line.
* MoveCharacterToObject now allows an object number of -1, and just does nothing to allow MoveCharacterToObject(EGO, GetObjectAt(...));

What is COM plugin support?

This is a new type of plugin support, which allows the creation of editor-only plugins. These plugins appear as usual in the Plugin Manager, but rather than adding extra features to your game, they can enhance the editor. Therefore, you can use a COM plugin without making your game rely on any external DLL's.

Currently the AGS Editor provides a full implementation of interfaces to allow access to Dialogs, and not a lot else. If people find it useful, however, I can add further interfaces to the rest of the editor.

What are they useful for? Well, it enables plugins such as:
* globalints list
* sounds list
* export dialogs as text
* view dialogs as tree

For more information, see: http://www.adventuregamestudio.co.uk/accomplug.htm



Changes since beta 5:
* Added COM / OLE Automation support to editor, to allow plugins to interact with the editor, add menu options, new panes, and so forth. This includes support for editor-only plugins which are not included with the game at run-time. (see below for more info)
* Added AreThingsOverlapping function.
* Made the Cancel button in the InputBox optional.
* Expermintal MIDI fix to stop effects from one song carrying over into the next.
* Keypresses are now discarded rather than queued if a blocking script is running when you press the key.
* Fixed Sierra-style speech not supporting flipped view frames.
* Fixed SkipUntilCharacterStops stopping skipping when any character stopped moving, not just the specified one.
* Fixed Del key sometimes working when no items were selected.
* Fixed '@' character not being displayed in GUI labels.
* Fixed bug from beta 2 that sometimes ended speech on the wrong frame if the char had an idle anim.

Changes since beta 4:
* Added DisableGroundLevelAreas and EnableGroundLevelAreas commands.
* Added support for room repeatedly_execute_always function. Just put it in your room script the same way as you would with the global script.
* Added Cancel button to the InputBox (and the Debug Ctrl+X box).
* Added option to script editor Find dialog to start search from current location, rather than start of script.
* Default hotspot names (eg "Hotspot 1") are no longer output in the translation source file.
* Fixed font wierdness and crashing the first time you run a new game made from a template.
* Fixed inventory hotspot colours >32000 not working
* Fixed GUI slider image positioning in the editor with 320x200 games.
* Fixed function calltips popping up when in a comment or string.
* Fixed DisplaySpeech text not moving if the screen was scrolled in the background by repeatedly_execute_always
* Fixed config file "datadir" setting not working with root directories.
* Possibly fixed problem with characters getting stuck if "adjust speed with scaling" was enabled.
* Documented exported dialog file format.

Changes since beta 3:
* Added SetGUIObjectEnabled script function to explicitly disable a GUI button.
* While moving a GUI object, the X/Y co-ordinates update dynamically in the properties window.
* View preview window now uses sprite transparent colour as the background colour.
* Mouseover GUI button pics no longer work while in a blocking cutscene.
* Lucasarts-style speech now abides by the game.close_mouth_end_speech_time setting.
* Removed the low disk space check from the editor as it didnt work properly.
* Editor now remembers the settings of "Lock sprite to current room" and "Remap colours to game palette" between imports.
* GUI Slider now always draws at least one of its background image, even if the control is too small.
* CyclePalette now supports rotating the colours in both directions.
* Added low disk space check when saving a save game slot. (this one does work properly ;) )
* Removed the "Don't automatically lose inventory" option - it's now always on.
* FaceCharacter(EGO,EGO) now does nothing rather than facing left.
* Fixed QFG4-style speech not working.
* Fixed IsMusicPlaying always returning 0 while SkipUntilCharacterStops was in progress.
* Fixed compiler to allow string parameters to be returned by the function.
* Fixed character being moved to non-walkable area if you left a room that it was moving in.
* Fixed MoveToWalkableArea not working if the character was off the screen.
* Fixed character portrait remaining on screen when the parser-in-dialog was used.
* Fixed editor crash if you tried to preview a loop with no frames.
* Fixed GUI button text not being drawn backwards when Backwards Text was enabled.



FAQ: What are these "#sectionstart" things that are littering my script?

The new #sectionstart and #sectionends have been introduced to once and for all fix problems people have been having editing script functions. Basically, if there was a brace missing somewhere, the editor got all confused when parsing the script file and could screw up the script.
This way, it looks a bit messy, but it also means that there should no longer be any problems with editing script functions.

What's a LeftShift/RightShift/XOR operator?

If you don't know, you don't need to know. They're quite advanced operators that most people won't need.

What's a Remainder operator?

The new % operator (also known as Mod) calculates the remainder of a division. Suppose you have a raw time in seconds and you want to display it as Minutes:Seconds. you can do:

int minutes = raw_time / 60;
int seconds = raw_time % 60;


How does the new repeatedly_execute_always work?

You can add the new function to your global script, as follows:

function repeatedly_execute_always() {
}

It will be called once every game loop, just like repeatedly_execute. There are two main differences though:
* repeatedly_execute_always is always called - even when a blocking function is running
* repeatedly_execute_always cannot call blocking functions itself.

If you try to use a blocking (eg. Wait, MoveCharacterBlocking) or delayed-response (eg. NewRoom, RestoreGameSlot) function from within repeatedly_execute_always, the game will exit with an error.

There are several handy uses for this function, and you'll notice that you can also do tricks with it to interrupt blocking functions. If you call StopMoving, for example, then if the main script is currently blocked on MoveCharacterBlocking, it will resume.

Remember, repeatedly_execute_always is currently an experimental feature, so please let me know if it causes any problems or doens't seem to work properly - that's what beta versions are for :)


http://www.adventuregamestudio.co.uk/ags261final.zip
Title: Re:AGS 2.61 Beta 1 - 2004 XP Edition
Post by: strazer on Sat 28/02/2004 23:45:54
Quote* Added game.auto_use_walkto_points variable to allow you to stop the engine automatically moving the player to walk-to points.
* Custom inventory control now greys out like buttons do if "GUIs grey out when disabled" is set.
* Fixed Talk cursor flashing up briefly before dialog options turn back on during a conversation.
* Fixed GUIs sometimes not re-enabling themselves until the mouse moved over them.
* Fixed character view not always getting set back to normal view after talking but before dialog options are displayed.

Awesome, thank you so much! :)

Unfortunately I have to wait a week for my new graphics card to arrive before I can check it out...ARRGH!  :P
Title: Re:AGS 2.61 Beta 1 - 2004 XP Edition
Post by: Gregjazz on Sun 29/02/2004 00:14:04
Pumaman is back! The party may now continue. :)
Title: Re:AGS 2.61 Beta 1 - 2004 XP Edition
Post by: James Kay on Sun 29/02/2004 14:16:36
Quote* Fixed GUIs sometimes not re-enabling themselves until the mouse moved over them.

Fixed!

Except, when I now run my "new inventory item flashing on and off after first picked up" script
GUIOn(2);
AddInventiry(1);
Wait(10);
LoseInventory(1);
Wait(10);
AddInventiry(1);
Wait(10);
LoseInventory(1);
Wait(10);
AddInventiry(1);
Wait(10);
GUIOff(1);

the whole inventory GUI is greyed out. Not only the buttons but also the actual items box. The new items do flash on and off but underneath a grey-out grid.  ???
Title: Re:AGS 2.61 Beta 1 - 2004 XP Edition
Post by: Pumaman on Sun 29/02/2004 17:29:58
That would be:
Quote* Custom inventory control now greys out like buttons do if "GUIs grey out when disabled" is set.

which was requested by somebody else.

Did you want it to work like it used to? If so, I guess I can add an option to toggle it.
Title: Re:AGS 2.61 Beta 1 - 2004 XP Edition
Post by: James Kay on Mon 01/03/2004 01:11:05
Quote from: Pumaman on Sun 29/02/2004 17:29:58
That would be:
Quote* Custom inventory control now greys out like buttons do if "GUIs grey out when disabled" is set.

which was requested by somebody else.

Did you want it to work like it used to? If so, I guess I can add an option to toggle it.


Oh yes please. It's fine for the buttons to be greyed out during the "new inventory item flash" sequence, but it'd be nice to be able to have the window containing the items appear normal.

It's getting complicated, I guess. What about an option per GUI button/window to toggle grey out or not?
Just a thought.
Title: Re:AGS 2.61 Beta 1 - 2004 XP Edition
Post by: Pumaman on Mon 01/03/2004 22:17:16
Ok, I'll add that option.

A workaround would be to do
SetGameOption(OPT_WHENGUIDISABLED, 2);
at the start of your flashing routine, to stop anything greying out for the duration of it.
Title: further suggestions
Post by: on Tue 02/03/2004 00:34:47
I'm quite new to AGS, but one thing annoys me a lot, that everything (or a lot of things at least) is refered to by number.
Like the players can be given a script-name, also objects, sounds should share this ability. A workaround solution would be adding #define constants, so that you only need to remember and type the number once, and thereafter refer to it by name. Ok, to be honerest what i really am looking after is a more object oriented scripting language, while OO has some drawbacks, it suits very well indeed with adventure games (check out www.tads.org). A complete overhaul of the scripting language taking it in the direction of either Tads, Ruby or python would make scripting so much more fun, and less tedius bookkeeping with number-references.
Btw. I think incoorporating ruby as a scripting language, should be the caint of stuff it is made for, and thus not forcing anyone to reinvent the wheel to have an impressive scripting language.
P.S. Its really not to say that AGS is bad the way it is now, I just don't think a c-like language without oo is very well prepared for scripting.
Title: Re:further suggestions
Post by: Pumaman on Tue 02/03/2004 22:28:38
Quote from: sigurd on Tue 02/03/2004 00:34:47
I'm quite new to AGS, but one thing annoys me a lot, that everything (or a lot of things at least) is refered to by number.
what i really am looking after is a more object oriented scripting language, while OO has some drawbacks, it suits very well indeed with adventure games

This sort of thing has been discussed fairly recently. Basically, because of backwards compatibility such a major overhaul won't be considered for AGS v2, but it's a probability if and when AGS 3 is created:
http://www.adventuregamestudio.co.uk/yabb/index.php?board=2;action=display;threadid=11412

Title: Re:further suggestions
Post by: on Wed 03/03/2004 00:20:04
Sorry, hadn't seen the thread  :-X
Title: Re:AGS 2.61 Beta 1 - 2004 XP Edition
Post by: Bernie on Fri 05/03/2004 14:11:39
Yay, great - a new update! Everything seems to work great for me, haven't encountered any errors or bugs yet, and the idle animation starts immediately after talking now, thanks for fixing that! :D

Why is it called XP Edition, though? Does it only work on Win XP?
Title: Re:AGS 2.61 Beta 1 - 2004 XP Edition
Post by: Fabiano on Fri 05/03/2004 15:22:18
yep it works. So goood :)
Title: Re:AGS 2.61 Beta 1 - 2004 XP Edition
Post by: Phemar on Sun 07/03/2004 05:18:18
Hey great stuff, alot of things I really needed, like automayic outline ffor fonts etc.
There is just one thing I was sad to not have found:

(http://www.2dadventure.com/ags/stuff.gif)

A preview mode in the view editor!
Title: Re:AGS 2.61 Beta 1 - 2004 XP Edition
Post by: auhsor on Sun 07/03/2004 06:30:14
Yeah that preview wondow was in the DOS Roomedit. I don't know why it wasnt implemented in the windows version. I found it really useful.
Title: Re:AGS 2.61 Beta 1 - 2004 XP Edition
Post by: CB.. on Sun 07/03/2004 14:25:12
i'd love a non blocking Wait command
it would be so easy to set a

WaitEx(200);

to delay events without having to use the timers or special functions..

the preview animation window would be very handy as well as being just a really nice touch

more than  5 (perhaps 10?)  animated backgrounds would be extremely  too,
very good for creating high quality animated backgrounds and just really usefull for swopping the backgrounds with SetBackgroundFrame  in order to squeeze a huge amount of functionality out of a single room..all those   if GetBackgroundframe possibilitys give you the ability to simply set up variuos functions for/with the same room with the minimum of experience.anyhuw many thanks for AGS , yu given me the chance to have fun with computer code without having to have a brain transplant to do it..!!  cheers!!
Title: Re:AGS 2.61 Beta 1 - 2004 XP Edition
Post by: ZZjZmoz on Sun 07/03/2004 17:26:49
I downloaded the AGS 2.61 SP1, and now I can't get any of the AGS games I downloaded to work right. All I get is a blank screen. If there's music, it plays, but, other than that, it's not working. Is there something wrong with AGS 2.61 SP1?
Title: Re:AGS 2.61 Beta 1 - 2004 XP Edition
Post by: Pumaman on Sun 07/03/2004 19:30:02
Quote from: Bernhard on Fri 05/03/2004 14:11:39
Why is it called XP Edition, though? Does it only work on Win XP?

Nope, it's just a way of making the release look more exciting than it really is :P

QuoteA preview mode in the view editor!

Thanks for your suggestions, but this thread really isn't the appropriate place for them. This thread is for discussion and feedback of the beta version only.

QuoteI downloaded the AGS 2.61 SP1, and now I can't get any of the AGS games I downloaded to work right. All I get is a blank screen. If there's music, it plays, but, other than that, it's not working. Is there something wrong with AGS 2.61 SP1?

Downloading a new version shouldn't affect any compiled games you've downloaded. Have you tried restarting your computer?
Title: Re:AGS 2.61 Beta 2 - Hans Blix edition
Post by: Gregjazz on Sun 07/03/2004 19:39:02
Thank you for the useful updates, CJ.

Also, guys, remember that fixing bugs is just as important as new features. :) (though less exciting)
Title: Re:AGS 2.61 Beta 2 - Hans Blix edition
Post by: j-Hed on Sun 07/03/2004 23:35:13
Im always amazed how fast AGS is updated!

CJ, is there going to be "antialiased sprites"  working for *.PNG -sprites in this version?

CJ is the HE-MAN of programming ;D!
Title: Re:AGS 2.61 Beta 2 - Hans Blix edition
Post by: Phemar on Mon 08/03/2004 03:52:13

I was suprised when I heard that games made with lower versions af AGS could be edited in Notepad. Guess it never really occured to me. At least it's not in this version! And hooray for Chris Jones*woohoo!*
Title: Re:AGS 2.61 Beta 2 - Hans Blix edition
Post by: Robert Eric on Mon 08/03/2004 11:58:11
CJ, I put in a DisplayTopBar function for whenever the player talks to himself.  It shows, then if you click on the character multiple times, you get this error.

---------------------------
Illegal exception
---------------------------
An exception 0xC0000005 occured in ACWIN.EXE at EIP = 0x77FCBD36 ; program pointer is +6, ACI version 2.61.716, gtags (0,32)

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.

(Global script line 83)
----------------------------

Of coarse, line 83 held the function DisplayTopBar.
Title: Re:AGS 2.61 Beta 2 - Hans Blix edition
Post by: Pumaman on Mon 08/03/2004 20:55:23
Hmm, strange. Unfortunately I can't trace anything from that error message.

How does it happen? Does the TopBar text display, then you click it away, then you talk to yourself again, and it displays again, and so forth, until finally it crashes?

Is the game small enough to upload for me to take a look at?
Title: Re:AGS 2.61 Beta 2 - Hans Blix edition
Post by: Robert Eric on Mon 08/03/2004 21:13:23
Quote
How does it happen? Does the TopBar text display, then you click it away, then you talk to yourself again, and it displays again, and so forth, until finally it crashes?

Yup

Yeah, you can take a took.  I uploaded a bare test program for you to look at that shares the same problem.  Here. (http://www.rain-day.com/test.zip)  Right click three times to get to the correct cursor mode.
Title: Re:AGS 2.61 Beta 2 - Hans Blix edition
Post by: Pumaman on Mon 08/03/2004 21:58:50
Thanks - with the help of your game I've found the bug, I'll get it fixed for the next beta. :)
Title: Re:AGS 2.61 Beta 2 - Hans Blix edition
Post by: Kinoko on Tue 09/03/2004 13:22:42
"Empty game" = Awesome ^_^ Thanks!!
Title: Re:AGS 2.61 Beta 2 - Hans Blix edition
Post by: evilspacefart on Wed 10/03/2004 07:53:50
Quote* Added SetGraphicalVariable script command.

w00t! easier for me now because i sometimes use it alot but didn't have a way of scripting it.
Title: Re:AGS 2.61 Beta 2 - Hans Blix edition
Post by: Radiant on Thu 18/03/2004 15:26:11
A few details I noticed that may have to be changed in a next version... none of this is really important though.

- Apparently, when deleting a GUI, its contents remain within the game. Its labels still show up when you do a text dump, and its sprites still cannot be deleted.

- When you try to delete a sprite that's in use on a GUI, you are told which button it is - but not on which GUI.

- If I (accidentally) use ctrl-F4 to get rid of the pop up window in the GUI section, clicking on any GUI item causes the editor to crash.

- Why can't I use RawDrawFrameTransparent with the current frame? There is a point to this. I wanted to implement a night mode with RawClearScreen (0); RawDrawFrameTransparent (0, 50);
Title: Re:AGS 2.61 Beta 2 - Hans Blix edition
Post by: Gilbert on Fri 19/03/2004 02:20:25
Quote from: Radiant on Thu 18/03/2004 15:26:11
- Why can't I use RawDrawFrameTransparent with the current frame? There is a point to this. I wanted to implement a night mode with RawClearScreen (0); RawDrawFrameTransparent (0, 50);
Well in that case, why don't you import a blank bg as a frame for this?
Title: Re:AGS 2.61 Beta 2 - Hans Blix edition
Post by: Radiant on Fri 19/03/2004 11:19:52
Well, that's what I'm doing now. But that requires adding a frame to each room where it's relevant (i.e. most of them); the RawDraw stuff could have been put in the global script with the on_event (ENTER_ROOM) function. So I thought I'd mention it.

Let's see, what else came up...
It would be nice if you could use a hotkey, say ^L or something, to edit the local (room) script (just as ^G and ^H edit the global one)

It would also be nice if the scriptnames of characters could be used in #defines, at least it seems intuitive to me (i.e. #define CallGuard character[GUARD].room = character[EGO].room )

Currently the right mouse button in the inventory triggers a 'look' action. I would like, as an alternative, to have it switch between the different icons available (look / touch / select) just like it does in the main screen.

Finally, when I load an invalid save game (i.e. from an earlier version of my game, or even an entirely different game) I get a critical error and the game crashes. Would it be possible for me to give a user-friendly error message instead, and have my game continue or restart rather than crash.
Title: Re:AGS 2.61 Beta 2 - Hans Blix edition
Post by: Pumaman on Fri 19/03/2004 17:58:50
Quote from: Radiant on Thu 18/03/2004 15:26:11
- Apparently, when deleting a GUI, its contents remain within the game. Its labels still show up when you do a text dump, and its sprites still cannot be deleted.

Hmm that's a bug - thanks for reporting it, I'll get it fixed.

Quote
- If I (accidentally) use ctrl-F4 to get rid of the pop up window in the GUI section, clicking on any GUI item causes the editor to crash.

Yeah, this is a known issue. There's no X button on the window but if you use Alt+F4 it will cause problems. It's a low priority fix for obvious reasons.

Quote- Why can't I use RawDrawFrameTransparent with the current frame? There is a point to this. I wanted to implement a night mode with RawClearScreen (0); RawDrawFrameTransparent (0, 50);

The reason you can't is due to the implementation of the command. It would be possible for me to allow it - but generally, to implement a night mode people will have an alternate night background that looks 'bluer' - just drawing the day background at 50% transparency won't tend to give a very good effect.

QuoteIt would also be nice if the scriptnames of characters could be used in #defines, at least it seems intuitive to me (i.e. #define CallGuard character[GUARD].room = character[EGO].room )

I tend to discourage using #defines for that sort of thing, because they're hard to debug and track down problems with. You can always just do:

function CallGuard() { character[GUARD].room = character[EGO].room; }

instead.

QuoteCurrently the right mouse button in the inventory triggers a 'look' action. I would like, as an alternative, to have it switch between the different icons available (look / touch / select) just like it does in the main screen.

Enable the "Handle inventory clicks in script" option in General Settings, and you can make the mouse clicks do whatever you want.

QuoteFinally, when I load an invalid save game (i.e. from an earlier version of my game, or even an entirely different game) I get a critical error and the game crashes. Would it be possible for me to give a user-friendly error message instead, and have my game continue or restart rather than crash.

It would be possible, but I don't think it's worth the hassle in all cases. Sometimes, the incompatibility may not be found until most of the save game has been loaded - in which case, the current game state has been overwritten. It's possible to fix, but not something I can really justify the time to do.
Title: Re:AGS 2.61 Beta 3 - Untitled Edition
Post by: Vel on Sun 21/03/2004 14:39:04
 :o

That view preview feature is really useful!
Title: Re:AGS 2.61 Beta 3 - Untitled Edition
Post by: Rui 'Trovatore' Pires on Sun 21/03/2004 15:53:29
There's an issue with SkipUntilCharacterStop - when it is called, any music that's playing will stop. I think.

Specifically, my case is - If the player presses ESC when Larry's walking, he SkipsUntilCharacterStops. Now, in some rooms (the room I played just before writing this), I've got a code that repeatedly checks for whether music is playing, and if it's not, play Random(etc, etc, etc. Now, the issue is, in this room I move Larry, press ESC - and lo and behold, he SkipsUntilCharacterStops AND a new song begins!
Title: Re:AGS 2.61 Beta 3 - Untitled Edition
Post by: Pumaman on Sun 21/03/2004 16:47:45
Ah, yes - that's probably because IsMusicPlaying returns 0 while skipping the character move. I'll change that behaviour.
Title: Re:AGS 2.61 Beta 3 - Untitled Edition
Post by: rtf on Sun 21/03/2004 17:14:02
Woo-Hoo!

I was like "No way am I gonna download this one.  I just downloaded BETA 2!"
Then I saw VEl's reply, and I rushed back to the first page and pressed ctr-F, saerched for view, and it turned out I missed the whole "View Preview" line.
I have been previeing views ever since I downloaded Beta3.  Horray!

Also, that Repeatedly Execute Always () command it extremely practical(For me at least).  I am sure I can find some use for it in my next game.

Great Work, Chris!
Title: Re:AGS 2.61 Beta 3 - Untitled Edition
Post by: Kweepa on Sun 21/03/2004 19:46:52
repeatedly_execute_always! Great! Thank you CJ. Now I can do particle effects and animate object positions.

You know what would also be great though? A room-based repeatedly_execute_always. To avoid the if {} else if {} else malarkey...

Speaking of which, it would be great if there was some alternative in dialogs to the run_script idiom. It's not pretty. Maybe a dialog could have a normal function (taking the selected option as parameter) as an alternative to the specialised script. That would facilitate expressive dialogs...

Cheers,
Steve
Title: Re:AGS 2.61 Beta 3 - Untitled Edition
Post by: Alynn on Sun 21/03/2004 20:34:49
So THATS why my game slowed down, and my midi's went haywire when a text box was showing... (I reported it a long time ago but the problem was never figured out)

Horray!

Hrm.. repeatedly execute always... probably the best place for my game total playtime counter....

Yes... I can see this coming in handy....
Title: Re:AGS 2.61 Beta 3 - Untitled Edition
Post by: SSH on Mon 22/03/2004 08:57:25
Yay for view preview and RawDrawImageResized. The two things I wanted most for a while! Now  I can complete my game (yeah, like laziness and lack of time wasn't a bigger factor...)
Title: Re:AGS 2.61 Beta 3 - Untitled Edition
Post by: Gilbert on Mon 22/03/2004 09:37:22
BTW, CJ, as we now have RawDrawImageResized() and RawDrawImageTransparent(), I think someone may like to raw draw a resized image with transparency. My thought was that you can actually have a RawDrawImageEx() function that handles both of them.

Just a thought, I won't need it anyway, as I probablly will stick to 256 colour graphics forever.
Title: Re:AGS 2.61 Beta 3 - Untitled Edition (feature request)
Post by: Radiant on Mon 22/03/2004 09:46:13
If it's not too much trouble I have two small feature requests.
I'd like to be able to set a background picture for a GUI slider, or at least change the color of its border (which now is always white and gray lines)
Also, it would be nice if you could set a background picture for a textbox GUI. This picture would have to be clipped or tiled to fit the textbox size.

Oh and I found one thing that may be a bug.
It appears that MoveToWalkableArea (EGO) doesn't work if EGO's coordinates are outside the screen. I have a script that moves EGO outside the screen when leaving a room (i.e. MoveCharacterStraight (EGO, 330, 100, 1); ) so this happens at times. Of course I can work around it with little problems but I thought I'd mention it.

By the way a fun quirk... in a largish game, check the usage for sprite #0 (the blue cup).

As to the nightmode I mentioned earlier, I'm currently using a 320x200 semi-transparent object that is blue. That works, of course, but I would still prefer RawClearScreen (bluish_color_number); RawDrawFrameTransparent (0, 50);

Anyway thanks for your time Pumaman! I love your work.
Title: Re:AGS 2.61 Beta 3 - Untitled Edition (feature request)
Post by: Gilbert on Mon 22/03/2004 10:30:23
Quote from: Radiant on Mon 22/03/2004 09:46:13
Oh and I found one thing that may be a bug.
It appears that MoveToWalkableArea (EGO) doesn't work if EGO's coordinates are outside the screen. I have a script that moves EGO outside the screen when leaving a room (i.e. MoveCharacterStraight (EGO, 330, 100, 1); ) so this happens at times. Of course I can work around it with little problems but I thought I'd mention it.

Hmmm, is your room a scrolling one (so (330,100) is indeed a point inside the room bg) ? If not, the character is standing outside the background, which is probably considered a nonwalkable area, so he may not be able to walk anywhere (I'm not sure if it really behaves like this though).
Title: Re:AGS 2.61 Beta 3 - Untitled Edition (feature request)
Post by: SSH on Mon 22/03/2004 10:43:13
Quote from: Radiant on Mon 22/03/2004 09:46:13
If it's not too much trouble I have two small feature requests.

See what happens when you just say "yadda, yadda", CJ... people start posting feature requests here if you don't tell them not to!
Quote
I'd like to be able to set a background picture for a GUI slider, or at least change the color of its border (which now is always white and gray lines)

You mean like CJ just added in beta 3?

Quote
Also, it would be nice if you could set a background picture for a textbox GUI. This picture would have to be clipped or tiled to fit the textbox size.

You mean like if you set the background picture of the GUI?

Quote
It appears that MoveToWalkableArea (EGO) doesn't work if EGO's coordinates are outside the screen. I have a script that moves EGO outside the screen when leaving a room (i.e. MoveCharacterStraight (EGO, 330, 100, 1); ) so this happens at times.

Gilbert: isn't the point of MoveToWalkableArea that you're NOT on a walkable area?
Title: Re:AGS 2.61 Beta 3 - Untitled Edition
Post by: Radiant on Mon 22/03/2004 11:41:21
Gilbot -> the point (330,100) is outside the room bg. I'm assuming it's unwalkable, yes.

SSH -> okay, point taken. I'll shut up now.
Title: Re:AGS 2.61 Beta 3 - Untitled Edition
Post by: Pumaman on Mon 22/03/2004 20:31:47
QuoteI'd like to be able to set a background picture for a GUI slider, or at least change the color of its border (which now is always white and gray lines)

Also, it would be nice if you could set a background picture for a textbox GUI. This picture would have to be clipped or tiled to fit the textbox size.

As SSH says, these are already implemented. If you're having trouble with them, feel free to ask for help.

QuoteIt appears that MoveToWalkableArea (EGO) doesn't work if EGO's coordinates are outside the screen. I have a script that moves EGO outside the screen when leaving a room (i.e. MoveCharacterStraight (EGO, 330, 100, 1); ) so this happens at times.

Well spotted - this is a bug, I'll get it fixed.
Title: Re:AGS 2.61 Beta 3 - Untitled Edition
Post by: Spyros on Mon 22/03/2004 20:55:27
A nice beta 3 version with a nice rep exec alw function !!!
Thanks CJ
Title: Re:AGS 2.61 Beta 3 - Untitled Edition
Post by: edmundito on Mon 22/03/2004 20:57:29
Oh, wow, with repeatedly_execute_always I can finally do smart scrolling a lot more clean without having a bunch of scripts that make the scroll wait to finish.

Also, that preview view thing is really nice. is there any way that it would ignore the transparent background while it previews the view (or at least make the rest of the background the transparent background color) so that we can see the animations a lot better :P
Title: Re:AGS 2.61 Beta 3 - Untitled Edition
Post by: Radiant on Tue 23/03/2004 15:08:10
Okay some more bug reports. All of these are of little importance but I just thought I'd mention them.

- the editor hot keys (^G and ^T for instance) don't work as long as the GUI information window is active (i.e. has its title bar blue)

- when displaying speech as 'sierra style with background', the text is displayed with a shadow / outline, even if it's on the textbox GUI. Kind of looks weird. However, this can be worked around by using a font without outline, or setting text_shadow_color to whatever your GUI background is.

- when loading a font file, AGS will (apparently) keep that file open, or at least locked, until AGS is quit. This means that it is not possible to rename or delete the file until AGS quits.

- reverting to default fonts does not remove all .WFN files from your directory (apparently it does remove some of them)

- dragging a GUI object does not update that object's X and Y positions as shown on the popup window, until you click on the GUI object once more

- when the 'write text backwards / hebrew' flag is set, text on GUI buttons is still written forwards. Labels are written backwards as they should. Also, I'm not really familiar with hebrew, but shouldn't numbers (1234) still be written forward?

- when 'handling inventory clicks in script' is on, the function on_mouse_click is not called when I click on a part of the inventory GUI that doesn't have a button, nor when I click on part of the inventory box that doesn't show an item. (however on_event does get called with GUI_MDOWN, which evades the problem)

- it would be nice if the value for 'lock GUI items in place' (and similar things) were stored in Editor.Dat so that they are kept for the next session

I'm right now downloading the newest beta so my apologies if any of the above are already fixed, but I did read the changelog at the beginning of this thread and didn't see it mentioned anywhere.

By the way I have a two-room demo game that works fine, except it crashes nastily if 1) I compile it in DOS rather than windows, or 2) I set speech to 'qfg4 full screen' (neither of which I actually need but it just came up when I was fiddling around). Would you like me to send it to you for checking?
Title: Re:AGS 2.61 Beta 3 - Untitled Edition
Post by: Fekix on Tue 23/03/2004 19:31:09
ok, this is really an unimportant bug:

if you use the empty game template and go to the predifined view number 2 and press the preview view button the editor crashes.
Title: Re:AGS 2.61 Beta 3 - Untitled Edition
Post by: Pumaman on Tue 23/03/2004 21:43:36
Quote from: Radiant on Tue 23/03/2004 15:08:10
- the editor hot keys (^G and ^T for instance) don't work as long as the GUI information window is active (i.e. has its title bar blue)

Thanks for the report - not a lot I can do about this one though (well, not one that's worth the time to implement).

Quote
- when displaying speech as 'sierra style with background', the text is displayed with a shadow / outline, even if it's on the textbox GUI. Kind of looks weird. However, this can be worked around by using a font without outline, or setting text_shadow_color to whatever your GUI background is.

Well, it uses the Speech Font. In a Sierra-style game, this allows you to use a different font for speech boxes to normal narrator message boxes. You can always use SetSpeechFont(0); to make it use the normal font.

Quote- when loading a font file, AGS will (apparently) keep that file open, or at least locked, until AGS is quit. This means that it is not possible to rename or delete the file until AGS quits.

Bit of an odd one, I can't see why it would do that - but not too important as you say.

Quote
- reverting to default fonts does not remove all .WFN files from your directory (apparently it does remove some of them)

Hmm strange, it does seem to work for me. I'll test further.

Quote
- dragging a GUI object does not update that object's X and Y positions as shown on the popup window, until you click on the GUI object once more

Good point, I'll get it fixed.

Quote- when the 'write text backwards / hebrew' flag is set, text on GUI buttons is still written forwards. Labels are written backwards as they should. Also, I'm not really familiar with hebrew, but shouldn't numbers (1234) still be written forward?

Good point about the GUI buttons, I'll fix it. As for numbers, I really don't know, but I haven't had any complaints about it so far.

Quote
- when 'handling inventory clicks in script' is on, the function on_mouse_click is not called when I click on a part of the inventory GUI that doesn't have a button, nor when I click on part of the inventory box that doesn't show an item. (however on_event does get called with GUI_MDOWN, which evades the problem)

This is by design. GUI_MDOWN should probably be more obvious in the manual though.

Quote
- it would be nice if the value for 'lock GUI items in place' (and similar things) were stored in Editor.Dat so that they are kept for the next session

I guess this could be added as an option, yes.

QuoteBy the way I have a two-room demo game that works fine, except it crashes nastily if 1) I compile it in DOS rather than windows

The DOS engine is unstable on Windows 2000 and XP - it's likely just that which is the problem.

QuoteI set speech to 'qfg4 full screen' (neither of which I actually need but it just came up when I was fiddling around).

Well spotted, QFG4-style speech no longer works. Heh, I'm surprised nobody has noticed that, I guess no-one is actually using it at the moment ;) I'll get it fixed.

Quoteif you use the empty game template and go to the predifined view number 2 and press the preview view button the editor crashes.

Oooh nasty - thanks, I'll fix it.
Title: Re:AGS 2.61 Beta 3 - Untitled Edition
Post by: Radiant on Wed 24/03/2004 11:45:22
Okay another bunch of tiny bugs. Hope this doesn't bother you. Again most of them are not very important, but a couple actually are this time. And thanks for the efforts put into the new beta, esp. repeatedly_exec_always.

- adding a background graphic to a slider doesn't seem to work well. If I add one the exact size of the control, it doesn't appear. If I add a (much) smaller one, it is tiled but starts roughly ten pixels to the left of the actual control. If I use a blue cup or similarly sized image, I don't get a screenful of blue cups, I get only a couple and they're spaced five to ten pixels apart. Sorry if this sounds confusing.

- the image offset for slider controls works fine while viewing a GUI from the editor; however in the game the offset works from the center of the slider rather than its left edge. Can be worked around easily of course, but slightly confusing.

- maybe the background image for a textbox GUI should be tiled, just as one for a slider control? After all you never know how large it's going to be. Currently I have a 320x200 image just to make sure.

- would it be possible to add a background pic for the topbar in DisplayTopBar?

- currently the global (and local) messages are encrypted by the engine, but the strings used within scripts are not. I tend to put most of the information in scripts so if it isn't too much trouble I'd really appreciate encryption there, too.

- the character view preview is cool. However, when I check 'skip frame 0', the preview does pause for a short while whenever frame 0 would have been displayed.

- in the character view preview, the sprites are drawn without transparency, thus gaining a permanent pink border.

- when searching the help file, most tutorial pages ('getting started with ags, part X') have no title and are thus displayed as 'nameless' in the search result listing.

- Search function in the text editor always starts at the beginning of the script, rather than current cursor location

- Pressing ^G then ^Z in the text editor displays a 'BEL' character. Of course that's not important, just a bit weird.

- Pressing ^T in the text editor swaps the current line with the previous. Also not important at all but I was wondering if this was intentional, and if so, for what.

- FaceCharacter (EGO, EGO) always turns EGO to the left. For that matter, so does FaceLocation if EGO is standing on that location.

- repeatedly_execute_always does not execute when text is being Displayed, but will execute during a DisplaySpeech. However, in the latter case, IsGUIOn(MY_TEXTBOX_GUI) doesn't detect the presence of the textbox used during speech. In other words, how do I detect if speech is active?

- it could be me but it seems that the generated executable suddenly is a lot larger. Upon inspection it was found to contain a number of help texts for the scripting editor (?) and a whole range of names for extended ASCII characters. My ac2game.ags file is still roughly 900 kb, but the executable has leapt up to 2 Mb. Again, not really important.

Thanks for your time!


Title: Re:AGS 2.61 Beta 3 - Untitled Edition
Post by: strazer on Wed 24/03/2004 12:10:32
At this opportunity I want to remind about

Quote* mouseover GUI button pics shouldn't display while game is in Wait state

:)
Title: Re:AGS 2.61 Beta 3 - Untitled Edition
Post by: on Fri 26/03/2004 09:47:22
i would find very useful if it is possible to open more than one scripting window at the same time....

just an idea

cisco
Title: Re:AGS 2.61 Beta 3 - Untitled Edition
Post by: on Fri 26/03/2004 09:50:04
i forgot this:
is it possible to add a tab on the left "global vars" to easily acces them?

thx

Cisco
Title: Re:AGS 2.61 Beta 3 - Untitled Edition
Post by: Gilbert on Fri 26/03/2004 11:21:21
You know, as a registered member you can actually edit your own post and add things to it.
Title: Re:AGS 2.61 Beta 3 - Untitled Edition
Post by: Pumaman on Fri 26/03/2004 17:47:57
Quote from: Radiant on Wed 24/03/2004 11:45:22
- adding a background graphic to a slider doesn't seem to work well. If I add one the exact size of the control, it doesn't appear.

You might need to increase the height of the slider by 1 or 2 pixels in order to get it to show. I'll change this so that it always draws at least one of the image.

QuoteIf I add a (much) smaller one, it is tiled but starts roughly ten pixels to the left of the actual control.

The image is horizontally centred within the slider. Check that you haven't got transparent empty space on the right of the image.

QuoteIf I use a blue cup or similarly sized image, I don't get a screenful of blue cups, I get only a couple and they're spaced five to ten pixels apart.

I haven't been able to replicate this. What game resolution are you using?

Quote- the image offset for slider controls works fine while viewing a GUI from the editor; however in the game the offset works from the center of the slider rather than its left edge. Can be worked around easily of course, but slightly confusing.

I don't know what you mean here - the offset simply adds a fixed amount to the X co-ordinate of the handle. It has the same effect in the editor and engine.

Quote
- maybe the background image for a textbox GUI should be tiled, just as one for a slider control? After all you never know how large it's going to be. Currently I have a 320x200 image just to make sure.

That would be possible, yeah. Standard practice as you say is just to import a large enough image that it won't be a problem.

Quote- would it be possible to add a background pic for the topbar in DisplayTopBar?

It would, I'll add it to my list.

Quote
- currently the global (and local) messages are encrypted by the engine, but the strings used within scripts are not. I tend to put most of the information in scripts so if it isn't too much trouble I'd really appreciate encryption there, too.

This is more complicated due to the way the scripting engine works, but I'll make sure it's on my list so I get round to it at some point.

Quote
- the character view preview is cool. However, when I check 'skip frame 0', the preview does pause for a short while whenever frame 0 would have been displayed.

I can't replicate this problem, the animation flows smoothly for me. Does it only happen with specific views or loops?

Quote
- in the character view preview, the sprites are drawn without transparency, thus gaining a permanent pink border.

Indeed, I never really thought of this as a problem. However, netmonkey has also requested that this be changed, so I'll do so.

Quote
- when searching the help file, most tutorial pages ('getting started with ags, part X') have no title and are thus displayed as 'nameless' in the search result listing.

Yeah this is a bit messy, it's to do with the way that I generate the help file. It would be more trouble than it's worth to fix, though I appreciate it's a bit unfriendly.

Quote
- Search function in the text editor always starts at the beginning of the script, rather than current cursor location

Again, this isn't something I'd consider as a bug; more just how it works. An option in the Find dialog to "start search from top" or something could be useful though, good point.

Quote
- Pressing ^G then ^Z in the text editor displays a 'BEL' character. Of course that's not important, just a bit weird.
- Pressing ^T in the text editor swaps the current line with the previous. Also not important at all but I was wondering if this was intentional, and if so, for what.

The script editor uses an external text editor component - these features are built into it. See http://www.scintilla.org for other key combinations that it might support.

Quote
- FaceCharacter (EGO, EGO) always turns EGO to the left. For that matter, so does FaceLocation if EGO is standing on that location.

Hehe I guess it should really leave the direction unchanged if you do this. Quite why you would use  FaceCharacter(EGO, EGO); is beyond me though :P

Quote
- repeatedly_execute_always does not execute when text is being Displayed, but will execute during a DisplaySpeech. However, in the latter case, IsGUIOn(MY_TEXTBOX_GUI) doesn't detect the presence of the textbox used during speech. In other words, how do I detect if speech is active?

You can use the IsInterfaceEnabled function to detect whether the game is currently in a Blocked state (which includes speech).

The reason that repeatedly_execute_always does not run during a Display is because the game is totally paused - no game cycles are executing. With speech however, the game continues to run in the background (and therefore so does repeatedly_execute_always).

Quote
- it could be me but it seems that the generated executable suddenly is a lot larger. Upon inspection it was found to contain a number of help texts for the scripting editor (?) and a whole range of names for extended ASCII characters. My ac2game.ags file is still roughly 900 kb, but the executable has leapt up to 2 Mb. Again, not really important.

Beta versions of the engine are larger, because they don't have all the debug code stripped out, and aren't compressed.

Thanks for your detailed input :)


Anyway, sorry guys, but can we please stop this turning into a big request thread. This thread is supposed to be for discussion of, and bug reports in, the beta.
Title: Re:AGS 2.61 Beta 3 - Untitled Edition
Post by: Kweepa on Sat 27/03/2004 12:33:33
Sorry about my feature requests earlier...

Ok, here's a bug report.
261b3 - I've got 8.00Gb free (8,591,187,968 bytes according to the command prompt) and when I press Crtl-T a dialog pops up saying

"There is less than 1 MB free on your disk. [Scary warning...] Do you want to continue?"

Rebooting didn't help.

I opened up 2.56 but it didn't happen there.

(I notice that my free disk space is > 1Mb above exactly 8Gb - it's 8Gb + 1253376 bytes - so my plan to track down the problem failed. Anyway, I think I'll just backup the game and continue.)
Title: Re:AGS 2.61 Beta 3 - Untitled Edition
Post by: j-Hed on Sat 27/03/2004 16:17:34
Is the anti-aliasing feature (anti-aliasing when scaling) going to work with *.PNG's soon?

I remember you told me it was on your to-do list CJ. ;)

Anyway thanks for another great new version :D
Title: Re:AGS 2.61 Beta 3 - Untitled Edition
Post by: Pumaman on Sat 27/03/2004 21:35:34
Quote from: SteveMcCrea on Sat 27/03/2004 12:33:33
Ok, here's a bug report.
261b3 - I've got 8.00Gb free (8,591,187,968 bytes according to the command prompt) and when I press Crtl-T a dialog pops up saying
"There is less than 1 MB free on your disk. [Scary warning...] Do you want to continue?"

Sorry about this, I'm going to remove the check for the next version. Theres a bug in the Windows API which returns the free space wrongly, so I'll just take the free space check out.
Title: Re:AGS 2.61 Beta 4 - Hamway edition
Post by: Vel on Sun 28/03/2004 19:51:24
Great update, CJ!
Something that has probably been asked before, but I will inquire about nevertheless. How about the wait command to disable the mouse, not just hide it if the wiat cursor is blank?
Title: Re:AGS 2.61 Beta 4 - Hamway edition
Post by: edmundito on Mon 29/03/2004 03:43:18
why would you want that, vel?  ???
Title: Re:AGS 2.61 Beta 3 - Untitled Edition
Post by: Radiant on Mon 29/03/2004 16:49:43
Wow, another quick update! Cool!


Quote from: Pumaman on Fri 26/03/2004 17:47:57
Quote from: Radiant on Wed 24/03/2004 11:45:22

QuoteIf I use a blue cup or similarly sized image, I don't get a screenful of blue cups, I get only a couple and they're spaced five to ten pixels apart.
I haven't been able to replicate this. What game resolution are you using?
320x200. My point is that AGS seems to put a certain border between any two instances of the background image. So you get (cup)(space)(cup) instead of (cup)(cup)

Quote
Quote- the image offset for slider controls works fine while viewing a GUI from the editor; however in the game the offset works from the center of the slider rather than its left edge. Can be worked around easily of course, but slightly confusing.
I don't know what you mean here - the offset simply adds a fixed amount to the X co-ordinate of the handle. It has the same effect in the editor and engine.
Strange. Whichever way I set a GUI slider image in the editor, it appears roughly ten pixels more to the left within the game itself. So I have to put it too far to the right in the editor to make it appear correctly in the game.

Quote
Quote
- FaceCharacter (EGO, EGO) always turns EGO to the left. For that matter, so does FaceLocation if EGO is standing on that location.

Hehe I guess it should really leave the direction unchanged if you do this. Quite why you would use  FaceCharacter(EGO, EGO); is beyond me though :P
I was testing the unhandled_event() function, and coded it so that whenever you click on a character, EGO turns to face that character. So if you click on EGO himself...

Oh and one more detail I noticed. When I set a character's speed to zero, the game crashes. I figured it would have been a nice way of stopping that character from moving, and am now using another workaround.
Title: Re:AGS 2.61 Beta 4 - Hamway edition
Post by: Vel on Mon 29/03/2004 17:44:45
Net, it's just something top-notch that isn't very important in my opinion.
Title: Re:AGS 2.61 Beta 3 - Untitled Edition
Post by: SSH on Mon 29/03/2004 17:48:22
Quote from: Radiant on Mon 29/03/2004 16:49:43
Oh and one more detail I noticed. When I set a character's speed to zero, the game crashes. I figured it would have been a nice way of stopping that character from moving, and am now using another workaround.

Shame that CJ didn't implement a function called StopMoving()... oh hang on...  :P

Spoiler

Since no-one seems to get irony these days, there IS a function called StopMoving
[close]

EDIT:
I hope I don't come across as agressive to Radiant, btw... I'm just trying to solve his problems... albeit in a sardonic way.

And Vel... that just doesn't make any sense, sorry. It's not important: so why ask, eh? And disabling the mouse is top-notch? Anyway, I'm sure you can check for the cursor being off at the start of on_mouse_click...
Title: Re:AGS 2.61 Beta 4 - Hamway edition
Post by: Kweepa on Mon 29/03/2004 18:13:16
I think it's a Segway for hamsters.
But it could be a hamster powered Segway.
Title: Re:AGS 2.61 Beta 3 - Untitled Edition
Post by: Pumaman on Mon 29/03/2004 20:01:37
Quote from: Radiant on Mon 29/03/2004 16:49:43
320x200. My point is that AGS seems to put a certain border between any two instances of the background image. So you get (cup)(space)(cup) instead of (cup)(cup)

My apologies - it is indeed a bug, that affects 320x200 only. I'll get it fixed.

Quote
Oh and one more detail I noticed. When I set a character's speed to zero, the game crashes. I figured it would have been a nice way of stopping that character from moving, and am now using another workaround.

Interesting idea - so by setting the speed to 0, any future MoveCharacter calls would simply do nothing. That's quite a good feature request, I'll add it to my list.

QuoteAnd CJ, what's a Hamway?

ABOUT TWO AND A HALF POUNDS!!!!!


Sorry.


http://www.public.iastate.edu/~dnguyen/henway.htm
Title: Re:AGS 2.61 Beta 4 - Hamway edition
Post by: rtf on Tue 30/03/2004 19:14:30
Awww, man!

Another version of AGS!
This time, no way am I downloading it.  I must resist the urge to download.
.....
.....
aaaarrrghh!

The Hen triumphs over frog (well, stork.)
Title: Re:AGS 2.61 Beta 4 - Hamway edition
Post by: Bernie on Tue 30/03/2004 20:15:59
There's a small layering quirk (z-buffer I think it's called) when a few characters stand on the same y coordinate and the main character walks past them (up/down). The layering order seems to change and a different character suddenly is at the front. It happens when the main character passes the y position of the other characters.

and... thank you for the new beta! :D
Title: Re:AGS 2.61 Beta 4 - Hamway edition
Post by: Pumaman on Tue 30/03/2004 21:33:37
Well, if two characters have the same Y co-ordinate then no guarantees are made about their order.

If you're relying on a specific order, you can change the baselines (or use FollowCharacterEx with FOLLOW_EXACTLY, depending on what you're trying to do).
Title: Re:AGS 2.61 Beta 4 - Hamway edition
Post by: Radiant on Wed 31/03/2004 13:16:23
Okay, more small bugs with varying (but generally low) degrees of importance. Thanks for your support!

- while it is true that two characters cannot directly walk through one another, this collision check doesn't seem to take the width of the characters into account. I.e. if both characters are 20 pixels wide, and they pass within ten pixels of each other, they will still appear to be walking through each other.

- nasty trick with operator precedence...
 in C and C++,    6 - 3 - 2 = (6 - 3) - 2  = 3 - 2 = 1
 In AGS, however, 6 - 3 - 2 =  6 - (3 - 2) = 6 - 1 = 5
And the same principle applies to division. You probably don't want to change this because of backwards compatibility, but maybe a compiler warning is in order.

- why isn't there a setinvproperty() function? I wanted to give each item a score_when_picked_up property, which is set to zero after being used the first time. [note to SSH, I'm using an array now so it's not a problem]

- I'm not sure what the #sectionstart/end lines do, but when selecting a script subsection from the Script menu, the editor still opens the entire script and goes to the first line of that function (rather than the line after #sectionstart); was that your intention?

- when inside a comment, the word completion for function names no longer pops up. However, the function parameter information does still pop up (i.e. if you type 'NewRoom (' a box with 'int' appears)

- would it be possible to keep the (global) script editor window open while testing the game? This would make script debugging a lot easier (as long as the user remembers to save before he tests).

- My middle mouse button is not detected as such by AGS, it instead triggers a left click. This may be a windows problem, however, I recall having the same problem with a game I wrote in Visual Studio.

- on_key_press and most other functions on that function's help page do not appear in the manual's index

- it isn't stated in the manual, but am I correct to assume that StrFormat (buf, format_string, buf, var1, var2) works correctly? (the point is using the same string 'buf' in both input and output)

- the debug box for 'teleport' should list the current room number, and should be cancelled if the user presses escape.

- question: if I put 'if (game.debug_mode)' around a block of code, will this code still be included in the non-debug version of the game? In theory this would allow a simple memory or exe patch to give access to the debug mode.

- if Display() is called with a single argument, the argument should be printed as it is, rather than treated as a format string. Reason I'm saying it is that if the string happens to contain a %s or %d, the game will crash with an unclear error message about unprintable characters.

- this is kind of obscure, but sometimes an active gui text box prevents the escape key from reaching on_key_press; it seems to occur when music initialization fails at the game startup
Title: Re:AGS 2.61 Beta 4 - Hamway edition
Post by: SSH on Wed 31/03/2004 13:54:53
Quote from: Radiant on Wed 31/03/2004 13:16:23
- nasty trick with operator precedence...
 in C and C++,    6 - 3 - 2 = (6 - 3) - 2  = 3 - 2 = 1
 In AGS, however, 6 - 3 - 2 =  6 - (3 - 2) = 6 - 1 = 5
And the same principle applies to division. You probably don't want to change this because of backwards compatibility, but maybe a compiler warning is in order.

I generally make no assumptions about operator precedence or evaluation order and always use loads of brackets to guarantee things go the way I want.

Quote
- why isn't there a setinvproperty() function? I wanted to give each item a score_when_picked_up property, which is set to zero after being used the first time. [note to SSH, I'm using an array now so it's not a problem]
I would also like to see writeable properties: I think it's on the todo list, though.

Having maybe come across as having a strop at Radiant in the past, I'd like to apologise for being grumpy. Some of these little things he points out are things I've noticed but worked around and forgot to mention, but all would be nice to see fixed. Its good to have someone new come to AGS who obviously knows his way around  programming in general and point out all those little idiosyncracies that we've got used to. If only all "n00bs" were like this... a gentleman and a scholar!

Oh, and Leylines looks like it rocks from what I've had a chance to look at so far, although I wish I could run it windowed...
Title: Re:AGS 2.61 Beta 4 - Hamway edition
Post by: Pumaman on Wed 31/03/2004 20:50:38
Quote from: Radiant on Wed 31/03/2004 13:16:23
- while it is true that two characters cannot directly walk through one another, this collision check doesn't seem to take the width of the characters into account. I.e. if both characters are 20 pixels wide, and they pass within ten pixels of each other, they will still appear to be walking through each other.

You're right - it effectively creates a walkable area around one character, but the other one's centre point can then walk around it, giving the effect you describe. I'll look into it.

Quote
- nasty trick with operator precedence...
 in C and C++,    6 - 3 - 2 = (6 - 3) - 2  = 3 - 2 = 1
 In AGS, however, 6 - 3 - 2 =  6 - (3 - 2) = 6 - 1 = 5

Yeah, this has been reported quite a few times. I really need to add a note to a prominent place in the manual, I'm just not really sure where the best place would be.

Quote
- why isn't there a setinvproperty() function? I wanted to give each item a score_when_picked_up property, which is set to zero after being used the first time. [note to SSH, I'm using an array now so it's not a problem]

Custom properties are read-only at runtime because of the hassles involved in updating the save game system to cope with saving the properties. It's not impossible, just something I haven't found the time to do yet.

Quote
- I'm not sure what the #sectionstart/end lines do, but when selecting a script subsection from the Script menu, the editor still opens the entire script and goes to the first line of that function (rather than the line after #sectionstart); was that your intention?

Yes, that's how it should work. To the user, it looks the same as before the #sectionstart lines were added.
The purpose of the #sectionstart/end is as follows: previously, the editor parsed the script by counting { and } to determine where the function ended. However, if you made a mistake in your script where you had too many or too few { or }, it would confuse the editor and it could mess up the script.
Therefore, the #sectionstart/end have been added to provide a safe, easy way for the editor to determine where each function starts and ends.

Quote
- when inside a comment, the word completion for function names no longer pops up. However, the function parameter information does still pop up (i.e. if you type 'NewRoom (' a box with 'int' appears)

Well spotted, thanks, I'll get it fixed.

Quote
- would it be possible to keep the (global) script editor window open while testing the game? This would make script debugging a lot easier (as long as the user remembers to save before he tests).

Interesting idea - I'll see what impact it would have.

Quote
- My middle mouse button is not detected as such by AGS, it instead triggers a left click. This may be a windows problem, however, I recall having the same problem with a game I wrote in Visual Studio.

Probably not much I can do about this, I'm afraid - AGS simply asks DirectX for mouse clicks.

Quote
- on_key_press and most other functions on that function's help page do not appear in the manual's index

Good point, I'll fix it.

Quote
- it isn't stated in the manual, but am I correct to assume that StrFormat (buf, format_string, buf, var1, var2) works correctly? (the point is using the same string 'buf' in both input and output)

That's not advisable, and will probably cause some undesirable results. In fact, StrFormat is a pass-through to the C sprintf function, whose documentation says "If the strings overlap, the behavior is undefined."
I'll add a note to the manual.

Quote
- the debug box for 'teleport' should list the current room number, and should be cancelled if the user presses escape.

Fair enough, I can't remember why I never did this, actually.

Quote
- question: if I put 'if (game.debug_mode)' around a block of code, will this code still be included in the non-debug version of the game? In theory this would allow a simple memory or exe patch to give access to the debug mode.

The code will be included, yes. It might be possible to add some form of #if..#endif support to the scripts for conditional compilation; but at the end of the day, if the player is determined to cheat, they will manage it somehow, and the only person they're cheating will be themselves.

Quote
- if Display() is called with a single argument, the argument should be printed as it is, rather than treated as a format string. Reason I'm saying it is that if the string happens to contain a %s or %d, the game will crash with an unclear error message about unprintable characters.

That's a good idea, I'll look into how difficult it would be to implement.

Quote
- this is kind of obscure, but sometimes an active gui text box prevents the escape key from reaching on_key_press; it seems to occur when music initialization fails at the game startup

Strange - I can't see anything in the code that would cause that; and I've never had any other reports of it. Is it just the ESC key, or other keys as well?
Title: Re:AGS 2.61 Beta 4 - Hamway edition
Post by: Gilbert on Thu 01/04/2004 02:52:15
Quote from: Pumaman on Wed 31/03/2004 20:50:38
Quote
- it isn't stated in the manual, but am I correct to assume that StrFormat (buf, format_string, buf, var1, var2) works correctly? (the point is using the same string 'buf' in both input and output)

That's not advisable, and will probably cause some undesirable results. In fact, StrFormat is a pass-through to the C sprintf function, whose documentation says "If the strings overlap, the behavior is undefined."
I'll add a note to the manual.

What? Now you tell me it may not work? I had been using this kind of things A LOT and it never failed for me, does thatr mean I have to change all of my codes?

/me is having headaches...
Title: Re:AGS 2.61 Beta 4 - Hamway edition
Post by: Radiant on Fri 02/04/2004 10:38:25
SSH -> thanks!!

Gilbot -> I've never had problems myself so far. Maybe windows has implemented a safer sprintf?

Pumaman -> as to the obscure music / escape key thingy, it was only the escape key. But since it doesn't seem to reproduce, I'll wager it's actually a windows problem.
As to the middle mouse button, in my experience several windows versions simply don't send the WM_MIDDLEBUTTONDOWN and -UP messages to applications. I've hacked this in the past by setting the middle button to 'double left click' in windows setup, then making double left click behave like middle button in my app. Obviously this is a really ugly hack so I wouldn't recommend it.
By the way kudos on the lovely new webpage design that appeared yesterday!
Title: Re:AGS 2.61 Beta 4 - Hamway edition
Post by: TerranRich on Fri 02/04/2004 15:03:43
Quote* Fixed compiler to allow string parameters to be returned by the function.

So...basically I can define a function RandomLetter(int num) to return a random letter in string? I don't have to use a second parameter as a buffer anymore? :)
Title: Re:AGS 2.61 Beta 4 - Hamway edition
Post by: Pumaman on Sat 03/04/2004 18:50:04
QuoteWhat? Now you tell me it may not work? I had been using this kind of things A LOT and it never failed for me, does thatr mean I have to change all of my codes?

Actually I just checked the code and you're ok - StrFormat writes to a temporary buffer, then copies it into the destination string. So in fact, you can get away with it.

QuoteSo...basically I can define a function RandomLetter(int num) to return a random letter in string? I don't have to use a second parameter as a buffer anymore?  

No, this fixes something else - if you had a function like this:

function whatever(string buffer) {
 return buffer;
}

it didn't work. It does now - but only if the string is passed as a parameter. Doing this:

function whatever() {
 string buffer;
 return buffer;
}

will not work, because the string's memory gets destroyed at the end of the function.
Title: Re:AGS 2.61 Beta 4 - Hamway edition
Post by: Gilbert on Tue 06/04/2004 04:25:43
Quote from: Pumaman on Sat 03/04/2004 18:50:04
Actually I just checked the code and you're ok - StrFormat writes to a temporary buffer, then copies it into the destination string. So in fact, you can get away with it.

Too bad I'd changed my code already, but as it makes no difference, I won't care about it anymore.
Title: Re:AGS 2.61 Beta 4 - Hamway edition
Post by: Radiant on Tue 06/04/2004 10:40:31
Quote
- nasty trick with operator precedence...
in C and C++, 6 - 3 - 2 = (6 - 3) - 2 = 3 - 2 = 1
In AGS, however, 6 - 3 - 2 = 6 - (3 - 2) = 6 - 1 = 5

Yeah, this has been reported quite a few times. I really need to add a note to a prominent place in the manual, I'm just not really sure where the best place would be.

Maybe an error is the best place. People tend not to use this syntax much anyway, but if they do it might not be what they expect either way.
Title: Re:AGS 2.61 Beta 4 - Hamway edition
Post by: Gilbert on Tue 06/04/2004 10:49:54
Just use ()'s, the text script engine has been using that syntax for versions, and it's unfriendly to generate an error, all we just need is clarification in CAPS in the manual.
Title: Re:AGS 2.61 Beta 4 - Hamway edition
Post by: Kweepa on Tue 06/04/2004 13:06:02
I think the best thing would be radio buttons in the general settings that say

Arithmetic precedence
[ ] AGS historical
[ ] Standard
[ ] Error if ambiguous (default)

The error should say something along the lines of "Ambiguous arithmetic operation. Add brackets or split over several lines to indicate your intention. See the manual [ref] for details."

A note in the manual is never going to be enough - people do not know to look for that sort of thing.
Title: Re:AGS 2.61 Beta 4 - Hamway edition
Post by: TerranRich on Tue 06/04/2004 17:53:51
Programming has taught me never to assume and to always use parentheses, but you're right, at the very least add something to the manual. Steve's idea sounds neat, but might be damn near impossible to implement...that would mean changing the way the entire engine works, fundamentally.
Title: Re:AGS 2.61 Beta 4 - Hamway edition
Post by: Scorpiorus on Tue 06/04/2004 19:20:50
I've just noticed that...

struct STR {
 string text;
};

...is compiled with no errors. Is it a bug or a new unofficial string-within-struct feature we have now? :)

~Cheers
Title: Re:AGS 2.61 Beta 4 - Hamway edition
Post by: Pumaman on Tue 06/04/2004 21:06:18
SteveMcCrea: I like that suggestion - I'll take a look at how easy it would be to detect the ambiguous situation.

In terms of adding to the manual, where would you guys recommend? Which is a scripting-related page that most people will actually read?


Scorpiorus: that always would compile with no errors. It won't work though, because no memory is allocated for the string, so what you actually get is basically the equivalent of this in C:

struct STR {
 char *text;
};

If you try to use the string, the unassigned pointer will likely cause a crash.

This is yet another reason why structs are an unofficial unsupported feature :)
Title: Re:AGS 2.61 Beta 4 - Hamway edition
Post by: Scorpiorus on Tue 06/04/2004 21:14:02
QuoteScorpiorus: that always would compile with no errors.
hehe, so it was always that way? I could have sworn I saw that strings are not allowed within struct error message somewhere.
Thanks for clarifying :)
Title: Re:AGS 2.61 Beta 4 - Hamway edition
Post by: on Wed 07/04/2004 09:50:55
So many new features! - Do anybody know, when 2.6SP2 or even 2.7 is realesed? This or next month?
And please a new demo game, too, because its from 18 July 2002!!!
Thx
Title: Re:AGS 2.61 Beta 4 - Hamway edition
Post by: Scummbuddy on Wed 07/04/2004 15:47:28
Oh, great, you had to ask, didnt you. Now, he'll delay the release, just because.  He said you should never ask when release dates are. Its done when it is.

Some forum members are "working" on the new demo game.
Title: Re:AGS 2.61 Beta 4 - Hamway edition
Post by: on Wed 07/04/2004 17:09:04
Oh thanks, I didn't know that, now I know it! Its like Duke Nukem: When it's done! ;-)
Title: Re:AGS 2.61 Beta 4 - Hamway edition
Post by: Vel on Wed 07/04/2004 18:09:53
Hmmm.... I  think I found a bug.

First, I added an object to the room, changed its image, and made sure it was visible. But when I tested the game, it was not. Then I restarted AGS and all changes I had made the last time had disappeared, including the object and some script. Hope this description is clear enough.
Title: Re:AGS 2.61 Beta 4 - Hamway edition
Post by: Pumaman on Wed 07/04/2004 21:41:28
Did you definitely save the room as well as the game?
Title: Re:AGS 2.61 Beta 4 - Hamway edition
Post by: Vel on Wed 07/04/2004 21:43:37
Most certainly. I follow Al Lowe's golden rule - save early, save often.
Title: Re:AGS 2.61 Beta 5 - Spring edition
Post by: Radiant on Tue 13/04/2004 10:56:29
- when importing multiple sprites simultaneously, I cannot specify the resolution for which to import them, or the transparent color; instead I have to manually input all of them if I want non-default values.

- in the sprite manager, when no sprite is selected and you press delete, the 'are you sure' box pops up and AGS seems to delete something if I click on 'yes', I'm just not sure what.

- a search and replace option in editor would be nice

- when importing a font fails ('not a SCI font file'), a temporary file remains in the directory

- when a string contains characters not printable in a certain font, it would be nicer to just ignore those characters rather than crashing the game. Or print blanks. Along the same line, if I do 'Display ("error %s")', apparently the '%s' gets replaced by a null-character since there is no string specified, so it crashes the game. It would be nicer to display a blank or question mark.

- when using a SCI font, character 127 remains unusable even if it is present
Title: Re:AGS 2.61 Beta 5 - Spring edition
Post by: Vel on Tue 13/04/2004 15:00:19
Is the addition of a cancel button on the input box really necessary? I used it as a passwrod for a database, and if you didn't type the correct one, it ran quitgame(0).
Title: Re:AGS 2.61 Beta 5 - Spring edition
Post by: Pumaman on Tue 13/04/2004 19:23:30
Quote from: Radiant on Tue 13/04/2004 10:56:29
- when importing multiple sprites simultaneously, I cannot specify the resolution for which to import them, or the transparent color; instead I have to manually input all of them if I want non-default values.

It's designed as a "Quick import", so the resolution is chosen automatically as the game resolution; the transparent corner is whatever was last selected in the Sprite Import window. I appreciate this isn't really made clear anywhere.

Quote- in the sprite manager, when no sprite is selected and you press delete, the 'are you sure' box pops up and AGS seems to delete something if I click on 'yes', I'm just not sure what.

Well spotted - in this case it doesn't actually delete anything, but the message really shouldn't appear. I'll fix it.

Quote- a search and replace option in editor would be nice

Aye, I'll think about it.

Quote- when importing a font fails ('not a SCI font file'), a temporary file remains in the directory

Well spotted, I'll get it fixed.

Quote- when a string contains characters not printable in a certain font, it would be nicer to just ignore those characters rather than crashing the game. Or print blanks.

I'm not sure about this one - then we'd get questions from people asking why their text wasn't appearing. At least the current way they get a message to explain what they're doing wrong.

Quote- when using a SCI font, character 127 remains unusable even if it is present

I'm not sure why that would be, but it's not really a high priority issue. I'll look into it at some point.

QuoteIs the addition of a cancel button on the input box really necessary? I used it as a passwrod for a database, and if you didn't type the correct one, it ran quitgame(0).

Good point - I'll make the Cancel button optional.
Title: Re:AGS 2.61 Beta 5 - Spring edition
Post by: Vel on Wed 14/04/2004 10:27:41
Thanks, CJ!
Title: Re:AGS 2.61 Beta 5 - Spring edition
Post by: strazer on Wed 14/04/2004 10:34:50
Quote- when a string contains characters not printable in a certain font, it would be nicer to just ignore those characters rather than crashing the game. Or print blanks.

Agreed. Especially when translations come into play. I wouldn't want my finished game to crash/quit because some translator used a special character that is not allowed.

At least make it an option. Maybe a checkbox in the editor or at least a function we could call at game_start?
Title: Re:AGS 2.61 Beta 5 - Spring edition
Post by: Radiant on Wed 14/04/2004 16:41:36
Quote from: Pumaman on Tue 13/04/2004 19:23:30
Quote- when a string contains characters not printable in a certain font, it would be nicer to just ignore those characters rather than crashing the game. Or print blanks.

I'm not sure about this one - then we'd get questions from people asking why their text wasn't appearing. At least the current way they get a message to explain what they're doing wrong.
Not really, you get a message stating you're displaying illegal characters, whereas what they're actually doing wrong is not supplying enough parameters to the Display() function. If I ask the user to enter a string, then display the string later, the game will crash if the string happens to contain '%s'. Of course there is an easy workaround but the error message isn't exactly clear.

Quote
Quote- when using a SCI font, character 127 remains unusable even if it is present

I'm not sure why that would be, but it's not really a high priority issue. I'll look into it at some point.
It's not really important, but I wanted to create a SCI font containing extended ASCII (in particular, accented vowels). I suppose I could overwrite the brackets and other seldom-used characters instead.
Title: Re:AGS 2.61 Beta 5 - Spring edition
Post by: Pumaman on Wed 14/04/2004 21:18:22
Quote from: strazer on Wed 14/04/2004 10:34:50
At least make it an option. Maybe a checkbox in the editor or at least a function we could call at game_start?

Ok, I'll add it as a "game." variable - that way, it's hidden enough for n00bs not to use it by accident and wonder why their text isn't working; but it's available for those who want it.

QuoteNot really, you get a message stating you're displaying illegal characters, whereas what they're actually doing wrong is not supplying enough parameters to the Display() function. If I ask the user to enter a string, then display the string later, the game will crash if the string happens to contain '%s'. Of course there is an easy workaround but the error message isn't exactly clear.

Ah ok, well this is a different situation to the one in which the user does actually type extended characters into their message. Display() should really check the number of arguments passed to it, but that's a seperate request which is already on my list. If you don't supply it enough parameters, the results can be unpredicatable.

The workaround for displaying player-entered strings, in case anyone wants to know, is simply to do this:

Display("%s", playerString);

since that way, the player string will not be parsed for special tokens.
Title: Re:AGS 2.61 Beta 5 - Spring edition
Post by: Kweepa on Sun 18/04/2004 11:15:18
Room repeatedly_execute_always!
Thank you!
Title: Re:AGS 2.61 Beta 5 - Spring edition
Post by: Radiant on Mon 19/04/2004 13:50:36
- in the script editor, the ALT-codes for special characters (i.e. ALT-130 = e-aigu) work, but also move the cursor around erraticly. This seems to be a bug?

- when the small window comes up that lets you select a value in the GUI editor, AGS no longer shows up in ALT-TAB (but it is still in the taskbar)

- would it be possible to add some more hot keys to the editor for hotspot areas etc? I.e. +/- to select hotspot number, and I,P,S,R for the interact, property, set/remove hotspot buttons
Title: Re:AGS 2.61 Beta 5 - Spring edition
Post by: Isegrim on Mon 19/04/2004 14:33:39
Very tiny mini bug: RawDrawImageResized crashes the game if the size parameters are zero.
Funny thing that it only happens when this is tried several times, when calling it once with zero size, nothing happens...
Code:

 // script for room: Player enters screen (after fadein)
int i,j;
while (i<320)
{
 i++; j++;
 RawDrawImageResized(0,0,5,0,0);
 Wait(1);
}



But huge thanks for that, I NEEDED that function!
Title: Re:AGS 2.61 Beta 5 - Spring edition
Post by: Pumaman on Mon 19/04/2004 21:21:02
Quote from: Radiant on Mon 19/04/2004 13:50:36
- in the script editor, the ALT-codes for special characters (i.e. ALT-130 = e-aigu) work, but also move the cursor around erraticly. This seems to be a bug?

I just tried it out but I didn't get any erratic cursor movement. What version of Windows are you using?

Quote- when the small window comes up that lets you select a value in the GUI editor, AGS no longer shows up in ALT-TAB (but it is still in the taskbar)

Hehe thanks for the report, I'm not sure that this is worth the time to fix.

Quote- would it be possible to add some more hot keys to the editor for hotspot areas etc? I.e. +/- to select hotspot number, and I,P,S,R for the interact, property, set/remove hotspot buttons

Sounds reasonable enough, I'll add it to my list.

QuoteVery tiny mini bug: RawDrawImageResized crashes the game if the size parameters are zero.

Thanks for the report, I'll get it fixed.
Title: Re:AGS 2.61 Beta 5 - Spring edition
Post by: Radiant on Tue 20/04/2004 13:11:13
Quote
Quote
- in the script editor, the ALT-codes for special characters (i.e. ALT-130 = e-aigu) work, but also move the cursor around erraticly. This seems to be a bug?
I just tried it out but I didn't get any erratic cursor movement. What version of Windows are you using?
ME. I believe on looking closer that Alt-4 moves the cursor to the far left, etc. I am using the numeric keypad though, it hadn't occured to me yet to use the keys above the letter keys.

Two more tiny bugs that aren't really important
- it is not possible to display the '@' symbol on a GUI. If you do, it appears fine in the editor, but in the game it disappears along with the rest of the line. Maybe @@ or \@ could be used?

- would it be possible to add a TAB character for using in dialogs? So you can display a list in a neat way with the Display () command.

This one however has some importance...
- if a GUI is set to Z-order 0 or 1, it still appears over Sierra-style speech dialog boxes. Maybe you could let the editor set a Z-order for the textboxes?
Title: Re:AGS 2.61 Beta 5 - Spring edition
Post by: Pumaman on Tue 20/04/2004 23:24:36
Quote from: Radiant on Tue 20/04/2004 13:11:13
ME. I believe on looking closer that Alt-4 moves the cursor to the far left, etc. I am using the numeric keypad though, it hadn't occured to me yet to use the keys above the letter keys.

This is because you have numlock off, so what you are actually getting is Alt+Left, or skip word left. Turn num lock on if you want to be able to type alt codes in - but note that the script editor won't display them.

Quote
Two more tiny bugs that aren't really important
- it is not possible to display the '@' symbol on a GUI. If you do, it appears fine in the editor, but in the game it disappears along with the rest of the line. Maybe @@ or \@ could be used?

Strange, I'll look into it.

Quote
- would it be possible to add a TAB character for using in dialogs? So you can display a list in a neat way with the Display () command.

could you clarify what you mean? Do you mean some sort of '\t' escape character to insert a tab in a message?

QuoteThis one however has some importance...
- if a GUI is set to Z-order 0 or 1, it still appears over Sierra-style speech dialog boxes. Maybe you could let the editor set a Z-order for the textboxes?

This is a feature request, and is already on my to-do list. Currently GUIs are always on top of everything else on the screen.
Title: Re:AGS 2.61 Beta 5 - Spring edition
Post by: Radiant on Wed 21/04/2004 17:20:29
Quote from: Pumaman on Tue 20/04/2004 23:24:36
Quote
- would it be possible to add a TAB character for using in dialogs? So you can display a list in a neat way with the Display () command.
could you clarify what you mean? Do you mean some sort of '\t' escape character to insert a tab in a message?
Exactly. I was writing a help function for my game, and basically it goes
Display ("F5\tsave game[F7\trestore game[F9\trestart game");
Title: Re:AGS 2.61 Beta 5 - Spring edition
Post by: Radiant on Fri 23/04/2004 12:44:59
And another bunch of buglike reports of high obscurity and low importance...

- if in the global header, I import a function and specify a different number (or type) of parameters from the function definition in the global script, no compiler error is gnerated; instead the game tends to crash when the function is used.

- if I select 'recompile all rooms' and one of the rooms generates a compiler error, then that particular room will not be recompiled and an error message is displayed that doesn't actually show the room's number. If I then test the game, it will have one or more rooms that aren't recompiled.

- trivial detail: if you declare 'function thingy (void)', per C customs, any calls to the function are expected to pass one integer parameter. I figured 'void' might be treated as a parameter name instead, but a really weird compiler error is generated if I add 'if (void==0)...' to the function. :)

- am I correct to assume that any variables are initialized to zero? If so you might mention this in tha manual. If not, they should be as this tends to be what newbie programmers expect.

- MoveCharacterToObject (EGO, -1) moves the character to the top left corner of the screen, instead of doing nothing as I would expect (e.g. MoveCharacterToObject (EGO, GetObjectAt (mouse.x, mouse.y)) )

- if in the GUI editor, the first word of a label's text is too wide for the label (easily possible with @TOTALSCORE@), the label appears entirely blank (one would expect '@TOTA' or a similar fraction) (maybe in the GUI editor, @SCORE@ and @TOTALSCORE@ should be replaced by numbers so you can see what they actually look like; then in the
 pop-up window that edits individual controls, they should still show as the @SCORE@ string)

- the error message for SetGUIPosition() coordinates being out of range is incorrect, because the coordinates can in fact be set to negative values (which is a good thing, it allows you to scroll a GUI off-screen). However coordinates greater than screen height or width are not allowed (which is slightly inconsistent)

- if I import a sprite and select a file, then change the transparency setting afterwards (i.e. to lower right pixel), I must re-import the file for the change to take effect. Bug?

- why doesn't a Textbox GUI have a 'font' line in its edit popup window? It seems more intuitive than SetTextBoxFont()

- how about having the cursor arrows nudge the GUI object that is currently selected one pixel to the left/right/etc
Title: Re:AGS 2.61 Beta 5 - Spring edition
Post by: SSH on Fri 23/04/2004 12:58:45
Quote from: Radiant on Fri 23/04/2004 12:44:59
- if in the GUI editor, the first word of a label's text is too wide for the label (easily possible with @TOTALSCORE@), the label appears entirely blank (one would expect '@TOTA' or a similar fraction) (maybe in the GUI editor, @SCORE@ and @TOTALSCORE@ should be replaced by numbers so you can see what they actually look like; then in the
 pop-up window that edits individual controls, they should still show as the @SCORE@ string)

A general "preview  GUI" button would be great, as it would also show if you'd forgotten to position it correctly (which I often do) and how the fonts would actually be displayed with AA and colours.

Quote
- how about having the cursor arrows nudge the GUI object that is currently selected one pixel to the left/right/etc

And ditto for objects in the room editor
Title: Re:AGS 2.61 Beta 5 - Spring edition
Post by: Pumaman on Sat 24/04/2004 18:05:00
Quote from: Radiant on Fri 23/04/2004 12:44:59
- if in the global header, I import a function and specify a different number (or type) of parameters from the function definition in the global script, no compiler error is gnerated; instead the game tends to crash when the function is used.

Aye, I appreciate this should be picked up by the compiler, it's on my to-do list.

Quote- if I select 'recompile all rooms' and one of the rooms generates a compiler error, then that particular room will not be recompiled and an error message is displayed that doesn't actually show the room's number. If I then test the game, it will have one or more rooms that aren't recompiled.

Good point ... I think you might be able to see the room number in the progress bar dialog behind the error message, but that's really not intuitive.

Quote- trivial detail: if you declare 'function thingy (void)', per C customs, any calls to the function are expected to pass one integer parameter. I figured 'void' might be treated as a parameter name instead, but a really weird compiler error is generated if I add 'if (void==0)...' to the function. :)

Hehe yes I remember someone reporting this before - I'll make a "void" parameter give a compile error.

Quote- am I correct to assume that any variables are initialized to zero? If so you might mention this in tha manual. If not, they should be as this tends to be what newbie programmers expect.

Global variables are, local variables are not, much like 'C'. However, I'll see how much work it would be to initialize local variables to 0 as well.

Quote- MoveCharacterToObject (EGO, -1) moves the character to the top left corner of the screen, instead of doing nothing as I would expect (e.g. MoveCharacterToObject (EGO, GetObjectAt (mouse.x, mouse.y)) )

Fair enough, I'll get it fixed.

Quote- if in the GUI editor, the first word of a label's text is too wide for the label (easily possible with @TOTALSCORE@), the label appears entirely blank (one would expect '@TOTA' or a similar fraction) (maybe in the GUI editor, @SCORE@ and @TOTALSCORE@ should be replaced by numbers so you can see what they actually look like; then in the pop-up window that edits individual controls, they should still show as the @SCORE@ string)

Yeah, this is something I keep meaning to fix - I'll add it to my list again.

Quote- the error message for SetGUIPosition() coordinates being out of range is incorrect, because the coordinates can in fact be set to negative values (which is a good thing, it allows you to scroll a GUI off-screen). However coordinates greater than screen height or width are not allowed (which is slightly inconsistent)

This behaviour is by design - negative values are allowed so you can scroll a GUI in, but values over the max width/height are not (you can still scroll a GUI in since they specify the top left corner) to stop people getting confused by the 320 vs 640 co-ordinates.

Quote- if I import a sprite and select a file, then change the transparency setting afterwards (i.e. to lower right pixel), I must re-import the file for the change to take effect. Bug?

The top of the Import Image window says "After selecting your settings, you must import the source again". Perhaps it needs to be more obvious, though.

Quote- why doesn't a Textbox GUI have a 'font' line in its edit popup window? It seems more intuitive than SetTextBoxFont()

It does; I'm not entirely sure what you're trying to say?

Quote- how about having the cursor arrows nudge the GUI object that is currently selected one pixel to the left/right/etc
And ditto for objects in the room editor

Good ideas, they've been suggested before, I'll make sure they're on my to-do list.

Anyway, thanks for all your comments - people can tend to ignore all these little things that don't seem important, but it's good to get them fixed :)
Title: Re:AGS 2.61 Beta 6 - Automation edition
Post by: Scummbuddy on Sat 24/04/2004 21:39:52
Uh oh.

When I was copying over copys of my old version games, from beta 3, i loaded one game, saved it, loaded a second, saved it, and when i loaded the third game, I got the message:
-------------
(Exception 0xC0000005 at EIP=0x0142308A, AGSE v2.61.488)
-------------

Plus, I was not able to Ctrl-C this message, I had to copy it the old fashion way.

Any ideas?
(edit* i loaded up that third game, and it ran with no problems. I suppose it just has to do with me loading up games, instead of shutting down the editor)
Title: Re:AGS 2.61 Beta 6 - Automation edition
Post by: strazer on Sat 24/04/2004 22:32:21
I've found another problem.
Because it worked so nice last time, I've put together this demo game (http://www.strazer.net/ags/newroombug.zip).

Basically, if you have region that is supposed to take the player to a new room when walked onto, but the player is currently following another character, the new room gets loaded but EGO is nowhere to be seen.
A few seconds later the game quits with
"Error: MoveCharacter: character not in current room".
Title: Re:AGS 2.61 Beta 6 - Automation edition
Post by: Pumaman on Sun 25/04/2004 15:16:14
Scummbuddy: I tried loading some differnet games into the editor one after each other but I couldn't reproduce the problem. HAs it happened again since?


strazer: thanks for the bug report. The question is, what should happen in this situation? If you move the player to a different room, but they're following another character, what would be the sensible thing to happen? Should they automatically be moved back to the previous room in order to continue following?
Title: Re:AGS 2.61 Beta 6 - Automation edition
Post by: strazer on Sun 25/04/2004 15:50:20
That's an excellent idea. Yes, I think that would be the best way.
Title: Re:AGS 2.61 Beta 6 - Automation edition
Post by: Pumaman on Sun 25/04/2004 20:18:32
Actually that could get a bit messy - how about if NewRoom just doesn't do anything if the player character is currently following another?
Title: Re:AGS 2.61 Beta 6 - Automation edition
Post by: strazer on Mon 26/04/2004 05:42:00
Is it possible to ignore NewRoom commands only if they are issued from regions?
All other NewRooms would abort the following and take the player to the new room?
Title: Re:AGS 2.61 Beta 6 - Automation edition
Post by: Radiant on Mon 26/04/2004 13:02:34
Quote
Quote
- if I import a sprite and select a file, then change the transparency setting afterwards (i.e. to lower right pixel), I must re-import the file for the change to take effect. Bug?
The top of the Import Image window says "After selecting your settings, you must import the source again". Perhaps it needs to be more obvious, though.
Could you make it so that clicking a different type of 'transparent pixel' just immediately re-imports the source? That wuold be most intuitive I think.

Quote
Quote
- why doesn't a Textbox GUI have a 'font' line in its edit popup window? It seems more intuitive than SetTextBoxFont()
It does; I'm not entirely sure what you're trying to say?

I meant a GUI marked as 'textbox', not a label on any GUI. I'll double check but I believe it only has an Xsize and Ysize parameter.

Oh wait, there's another upgrade! Cool!

Title: Re:AGS 2.61 Beta 6 - Automation edition
Post by: strazer on Mon 26/04/2004 13:16:24
QuoteCould you make it so that clicking a different type of 'transparent pixel' just immediately re-imports the source? That wuold be most intuitive I think.

I second that.

And yes, a "Font" setting for Text windows would be nice.
Because if, for example, you want the dialog options to look like speech lines and you change the normal font with SetNormalFont, the Text windows look different too, since they use that font as well.
Title: Re:AGS 2.61 Beta 6 - Automation edition
Post by: Pumaman on Mon 26/04/2004 21:18:18
Quote from: strazer on Mon 26/04/2004 05:42:00
Is it possible to ignore NewRoom commands only if they are issued from regions?
All other NewRooms would abort the following and take the player to the new room?

Hmm, it's an interesting idea but I don't really like adding inconsistent behaviour like that - it tends to confuse people and lead to problems that can be hard to track down.

Is the best option for the game to exit with an error message in this situation, so that the game author has to decide whether to stop following or ignore the NewRoom?

QuoteCould you make it so that clicking a different type of 'transparent pixel' just immediately re-imports the source? That wuold be most intuitive I think.

Yeah, that's a good idea. Or at least pop up a message box asking the user what to do.

QuoteI meant a GUI marked as 'textbox', not a label on any GUI. I'll double check but I believe it only has an Xsize and Ysize parameter.

Ah I see yes, sorry I misunderstood. I'll add it to my list.
Title: Re:AGS 2.61 Beta 6 - Automation edition
Post by: Robert Eric on Mon 26/04/2004 21:24:01
Chris, do you have anywhere in your to-do list a simple sprite editor that can be activated by right-clicking on the sprite, clicking Edit, and having a nice little window that lets you edit the sprite right there with simple features like color selection, plotting a single pixel, flood filling, then saving it, loading another in it's place to be edited there, or saving it to disk?
Title: Re:AGS 2.61 Beta 6 - Automation edition
Post by: Pumaman on Mon 26/04/2004 21:45:58
No, sorry but I'm not planning anything like that. It's almost as easy just to right-click, Copy To Clipboard, then paste into a graphics package and edit it there.
Title: Re:AGS 2.61 Beta 6 - Automation edition
Post by: SSH on Tue 27/04/2004 09:09:27
No-one seems to have noticed the editor plug=in new feature! This looks great. Finally we can do all those things that CJ is too lazy busy to implement...!

EDIT:

Quote
"Next, still with the class selected, look down the properties list for "Instancing". This is initially set to "2 - PublicNotCreatable", which means that other applications can't create the object. We need to change it to "5 - MultiUse", so that the AGS Editor can load the plugin."

This step of the tutorial is impossible with the free VB5 download... any ideas anyone?

Also, any plans to add more than the dialog system to this API, CJ?

Title: Re:AGS 2.61 Beta 6 - Automation edition
Post by: Kinoko on Tue 27/04/2004 16:17:32
Nothing terribly constructive to say, except -thankyou- for the view preview, and repeatedly_execute_always functions! This solves a lot of problems for me in future game making.
Title: Re:AGS 2.61 Beta 6 - Automation edition
Post by: Scorpiorus on Tue 27/04/2004 23:32:00
Quote from: SSH on Tue 27/04/2004 09:09:27No-one seems to have noticed the editor plug=in new feature! This looks great.
Indeed, that's great feature to have. Now editor addons will be much easier to implement. Also high thanks for extra operators and all that useful plugin API functions. :)

~Cheers
Title: Re:AGS 2.61 Beta 6 - Automation edition
Post by: ca0mgr on Wed 28/04/2004 00:15:04
I'm so rusty with VB. Could you give me a hand with this. It should be along these lines:

   Dim a As AGSDialogTopic
         
   a = editor.Dialogs.NewTopic()
   a.newOption ("option 1")

which doesn't work. The following does:

call editor.Dialogs.NewTopic.newOptions("Option 1")

What am I doing wrong?
Title: Re:AGS 2.61 Beta 6 - Automation edition
Post by: edmundito on Wed 28/04/2004 07:00:04
Quote from: SSH on Tue 27/04/2004 09:09:27
No-one seems to have noticed the editor plug=in new feature! This looks great. Finally we can do all those things that CJ is too lazy busy to implement...!

EDIT:

Quote
"Next, still with the class selected, look down the properties list for "Instancing". This is initially set to "2 - PublicNotCreatable", which means that other applications can't create the object. We need to change it to "5 - MultiUse", so that the AGS Editor can load the plugin."

This step of the tutorial is impossible with the free VB5 download... any ideas anyone?

Also, any plans to add more than the dialog system to this API, CJ?



If I could figure where this is with visual studio.net 2002 you could actually make stuff with C#... AGS would truly become AGS.net! OMG OMG OMG.... :P

Edit: Oh! It's Public!  :o

Edit 2:
I actually figured out how to code it with C#, even though I don't know C# nor remember much of visual basic. But the code actually compiles, and I'm sure I did it partially right because C# is as picky as Java (we all know why)

Anyway, here's what I get:

---------------------------
AGS Editor Warning
---------------------------
A plugin 'AGS_TestPluginCS.dll' was found in the editor folder, but it did not support the required interfaces.
---------------------------
OK  
---------------------------

I think it may have to do with the whole multiuse thing. I should look into it some more, but maybe I should sleep! Sleep it is :P

Edit 3: I found the problem:
"Visual Basic 6.0 ActiveX documents are not supported in Visual Basic .NET. You can still interoperate with ActiveX documents from your Visual Basic .NET Web applications, but development should be maintained in Visual Basic 6.0."

Meaning it won't work for the others like C#/J#...bah!
Title: Re:AGS 2.61 Beta 6 - Automation edition
Post by: Isegrim on Wed 28/04/2004 16:46:05
Got a bug record (or maybe I'm just too stupid):

Can it be that RawDrawImageResized works only with 256col sprites? when I try it with a true col one, it's all weird, whereas the 256col attempt looks fine... (no matter what color depth the actual game has!)
If this is intentional, it should be documented in the manual, I think...
Title: Re:AGS 2.61 Beta 6 - Automation edition
Post by: strazer on Wed 28/04/2004 16:55:28
What do you mean, it's all weird? Like, it's not displaying at all or it looks strange?
I've tested it an hour ago and it worked fine with my true color sprites.
Title: Re:AGS 2.61 Beta 6 - Automation edition
Post by: Phemar on Wed 28/04/2004 20:12:42

I think this is a bug, but not sure: I'm using sierra style speech. Sometimes it displays the speech at the top of the screen, and sometimes it don't, instead it display it like Lucas-Arts style...

...Uhh...
Title: Re:AGS 2.61 Beta 6 - Automation edition
Post by: Scorpiorus on Wed 28/04/2004 21:54:49
If the character doesn't have a talking view assigned then the lucas-arts speech style will be used.
Title: Re:AGS 2.61 Beta 6 - Automation edition
Post by: Phemar on Thu 29/04/2004 05:47:14

Nay, of course it has a talking view...thay all got talking views, don't you know? Well, you probably didn't...I think it only does that with DisplaySpeechBackground, but not sure...
Title: Re:AGS 2.61 Beta 6 - Automation edition
Post by: Rui 'Trovatore' Pires on Thu 29/04/2004 06:20:03
From the manual -

QuoteDisplaySpeechBackground
DisplaySpeechBackground (CHARID, string message)

Similar to DisplaySpeech, except that this function returns immediately and the game continues while the character is talking. This allows you to have characters talking in the background while the player does other things. Note that the character's talking animation is not played if this function is used.
Title: Re:AGS 2.61 Beta 6 - Automation edition
Post by: Isegrim on Thu 29/04/2004 14:15:09
About my "Bug report": I tried the RawDrawing before a completely blank background. No BG image, no RawClearScreen. That gave a stange color-inversed and interlaced look.
Clearing the screen or using a BG image solves the problem...
Title: Re:AGS 2.61 Beta 6 - Automation edition
Post by: Pumaman on Thu 29/04/2004 21:19:02
Quote from: SSH on Tue 27/04/2004 09:09:27
This step of the tutorial is impossible with the free VB5 download... any ideas anyone?

Hmm I didn't realise that. Try using a UserControl rather than a Class Module, and put all the code in there instead. Though this gives you an unwanted GUI component, I believe the User Controls automatically have the correct Instancing.

QuoteAlso, any plans to add more than the dialog system to this API, CJ?

As I said in the original post, if people find this useful then I'd be happy to add more. It takes a fair bit of time to add the interfaces, so I'd rather only do it if people are going to use it. :)

QuoteI'm so rusty with VB. Could you give me a hand with this. It should be along these lines:

Dim a As AGSDialogTopic

a = editor.Dialogs.NewTopic()
a.newOption ("option 1")

which doesn't work. The following does:

With VB, you have to use "Set" for objects. If it's not an object and you use Set it crashes; if it is an object and you don't use Set it crashes.
This is one of the stupidist and least intuitive things ever about VB - it knows whether the variable is an object or not, so why not take care of it automatically? Sigh.

And talking of stupid VB syntax, you can only use brackets in a function call if it returns a value. If it doesn't and you use brackets, it will usually crash.

Anyway, to make your code work:

Dim a As AGSDialogTopic

Set a = editor.Dialogs.NewTopic()
a.NewOption "option 1"

QuoteCan it be that RawDrawImageResized works only with 256col sprites? when I try it with a true col one, it's all weird, whereas the 256col attempt looks fine... (no matter what color depth the actual game has!)

This is probably a colour depth mismatch. RawDrawImageResized only works if the source image and the destination are the same colour depth. From your later post, I presume the cause was that the empty room you were using initially had a blank 256-col background.
Title: Re:AGS 2.61 Beta 6 - Automation edition
Post by: ca0mgr on Thu 29/04/2004 23:08:24
Ahhh, the set command. Uch. Thanks. I've tried but failed. The syntax is soooo... uch. it's counterproductive. I spend more time trying to figure out syntax that should be straightforward with any other language. How is VB still here?

Any examples of file handling would be a great help. I want to load strings and integers and such. I have a preliminary version, but it's hard and slow to test.

Is this the right way?

dim value as string
Open "file.txt" For Input As #1
input #1,value
close #1
Title: Re:AGS 2.61 Beta 6 - Automation edition
Post by: Pumaman on Fri 30/04/2004 17:06:42
Hehe, agreed about the VB syntax. Fortunately they have sorted most of it out with VB .NET (eg. the Set thing is gone, the brackets thing is gone - it's a lot better), but that doesn't help us here much :)

Anyway, binary file read is slightly different:

Dim i as Integer
Dim l as Long

Open "filename.dat" for Binary As #1
Get #1, , i   ' read 2 bytes into i
Get #1, , l   ' read 4 bytes into l
Close #1

Basically, "Get" reads as many bytes as the length of the data type you read in (Integer=16-bit, Long=32-bit). You can also create a custom Type (ie. struct/class) and read that in in one go.
Title: Re:AGS 2.61 Beta 6 - Automation edition
Post by: edmundito on Fri 30/04/2004 21:00:15
Yo,

If anyone is experienced enough with VB.net and wants to convert the code given by Pumaman to that, send me  a message because I'm unable to figure that out.

Love,

netmonkey
Title: Re:AGS 2.61 Beta 6 - Automation edition
Post by: Pumaman on Fri 30/04/2004 21:46:17
I just had a play with VB .net and I have managed to create a working AGS plugin with it.

The only snag is, it won't work with the beta 6 AGS Editor (I've had to modify the editor a bit so that it recognises .net plugins). Therefore, in the next beta you should be able to do it.
Title: Re:AGS 2.61 Beta 6 - Automation edition
Post by: edmundito on Sat 01/05/2004 00:59:04
Quote from: Pumaman on Fri 30/04/2004 21:46:17
I just had a play with VB .net and I have managed to create a working AGS plugin with it.

The only snag is, it won't work with the beta 6 AGS Editor (I've had to modify the editor a bit so that it recognises .net plugins). Therefore, in the next beta you should be able to do it.

Yay! *makes out with Pumaman*
Title: Re: AGS 2.61 Beta 6 - Automation edition
Post by: Robert Eric on Sun 02/05/2004 22:41:07
Quote
Dim i as Integer
Dim l as Long

Open "filename.dat" for Binary As #1
Get #1, , iÃ,  Ã, ' read 2 bytes into i
Get #1, , lÃ,  Ã, ' read 4 bytes into l
Close #1

Dim i as Integer
Dim l as Long

FileOpen(1, "blargh.txt", OpenMode.Binary, OpenAccess.Read)
FileGet(1, i)
FileGet(1, l)
FileClose(1)

There is also the streamreader/writer way.Ã,  VB.Net has a bunch of new features that you should check out if you don't want to end up doing QuickBasic style programming.

And I'm pretty sure that an integer holds 4 bytes, while a long holds 8.Ã,  A short (word) holds 2 bytes.

Or maybe it's just in VB.Net.

Edit: I'm a pretty good VB.Net programmer, if anyone needs me.
Title: Re: AGS 2.61 RC 1 - Jaffa edition
Post by: Pumaman on Mon 03/05/2004 16:59:08
Robert Eric: yep, it's different in .net. In VB6, Integer = 2 bytes and Long = 4 bytes; in VB .net, Integer = 4 bytes and Long = 8 bytes.

Anyway, RC1 is now up which supports .net plugins. It's messy though, and I really wouldn't recommend using them. If you have a copy of VB6, use that instead.

Anyway, I've added a note to the bottom of the COM Plugins page (http://www.adventuregamestudio.co.uk/accomplug.htm) on how to make a .net plugin work.
Title: Re: AGS 2.61 RC 1 - Jaffa edition
Post by: strazer on Mon 03/05/2004 17:55:13
In my game, there is a mouse in the room and when the player clicks on it, EGO tries to catch it, but the mouse gets away all the time. If you click anywhere else, EGO stops chasing the mouse. After 4 tries he stops himself and says, "It's too quick for me.".

With the new RC 1, if I tell my player character stop following the mouse with FollowCharacter(EGO, -1);, the game quits with the error message:

(Room 1 script line 25)
Error: FollowCharacterEx: you cannot tell the player character to follow a character in another room

Additionally, if, during the chase, EGO happens to step on a region requesting a room change, the game now quits with

Error: A room change has been requested, but the player character is currently following another character who is not in the new room. Either stop the player from following before he leaves the room, or move the shepherd character to the new room as well.

as you wrote in your release note. However, I really think that's inappropriate.

I'd rather have EGO either ignore the NewRoom command completely or perform the room change and quit following the mouse automatically.
I don't think it's necessary to quit the game with an error message?

Edit: Oh yeah, and the additions rock, GP_FRAMEIMAGE especially. Thank you!
Any chance I could check for and RawDraw flipped frames?
Title: Re: AGS 2.61 RC 1 - Jaffa edition
Post by: Pumaman on Mon 03/05/2004 18:53:26
Quote from: strazer on Mon 03/05/2004 17:55:13
With the new RC 1, if I tell my player character stop following the mouse with FollowCharacter(EGO, -1);, the game quits with the error message:

Er oops, sorry about that. I'll fix it for the next version.

QuoteI really think that's inappropriate.

I'd rather have EGO either ignore the NewRoom command completely or perform the room change and quit following the mouse automatically.
I don't think it's necessary to quit the game with an error message?

Well, if he ignored the NewRoom command we'd get people posting "BUG!!! NEWROOM IS BROKEN!!" so I thought that wasn't a good idea. Stopping the following automatically is another possibility - but I think the error message is the best way, since then you are alerted to the problem, and you have to decide what action you want to take. If it just stopped the following I can imagine there'd be people wondering why their following had suddenly broken.

QuoteAny chance I could check for and RawDraw flipped frames?

Well, that'd need some sort of GP_ISFRAMEFLIPPED as well as a RawDrawImageFlipped, so I'll add them to my list. Or would a RawDrawViewFrame(x,y,view,loop,frame) be better?
Title: Re: AGS 2.61 RC 1 - Jaffa edition
Post by: strazer on Mon 03/05/2004 19:19:29
But imagine my mouse could be in any of the rooms, then I would have to check before EVERY NewRoom(EGO, x) command in my game if my character is following the mouse or not (is that even possible?), and only then transport the mouse to the new room in advance.

To me, it makes perfect sense that the following is aborted if the sheperd is not put in the new room in advance.
Well, it's your call.

Edit:

QuoteWell, that'd need some sort of GP_ISFRAMEFLIPPED as well as a RawDrawImageFlipped, so I'll add them to my list. Or would a RawDrawViewFrame(x,y,view,loop,frame) be better?

RawDrawViewFrame is a great idea, that would solve all my problems and is future-proof if you decide to implement vertical flips someday (I'm not asking for it here!).
Personally I wouldn't need the other functions then. Thank you! :)
Title: Re: AGS 2.61 RC 1 - Jaffa edition
Post by: SSH on Mon 03/05/2004 19:37:05
strazer: So make a function called NewRoomF that does the check and just find/replace!

Here's the two possible actions, of course, there would probably need to be "Ex" versions of each. It would be a bit simpler if CJ made the following state visible via global var or function

int following; // would need array if we have m,ulitple player chars

function MyFollowChar (int lamb, int chartofollow) {
  following = chartofollow;
  FollowCharacter(lamb, chartofollow);
}

function NewRoomF (int room) {
  if (following>=0) {
    if (stop_on_newroom) {
      following = -1;
      FollowCharacter(GetP{layerCharacter(), -1);
    } else {
      character[following].room = room;
      NewRoom(room);
    }
  } else {
    NewRoom(room);
  }
}


and just so Pumaman knows what I'd like to see in the editor plugin API:


probably a bunch more...
Title: Re: AGS 2.61 RC 1 - Jaffa edition
Post by: strazer on Mon 03/05/2004 19:52:37
Thanks, SSH, that would do.
For some reason, I always think of using custom functions last... :P

Still, I'd rather avoid all that script just to remedy such an obscure error.
IMHO, it would be better if he just stopped following. But maybe that's just me...
Title: Re: AGS 2.61 RC 1 - Jaffa edition
Post by: edmundito on Mon 03/05/2004 20:18:44
Quote from: Pumaman on Mon 03/05/2004 16:59:08
Robert Eric: yep, it's different in .net. In VB6, Integer = 2 bytes and Long = 4 bytes; in VB .net, Integer = 4 bytes and Long = 8 bytes.

Anyway, RC1 is now up which supports .net plugins. It's messy though, and I really wouldn't recommend using them. If you have a copy of VB6, use that instead.

Anyway, I've added a note to the bottom of the COM Plugins page (http://www.adventuregamestudio.co.uk/accomplug.htm) on how to make a .net plugin work.

Victory has been acquired with C#. Here's the deal, tho.. I guess the Interop.AGSEditor.dll is compatible with all .NET-based plugins, right?

Basically, my main issue was that I didn't want to program it with visual basic, and it seems that microsoft is giving a big push to C#, which is apparently faster than VB. Now, there's also J#, which has the same syntax as Java, and that's what I know... but I read that it was slower than VB.net. I also don't have Visual Basic 6.. only VC++ 6.0 and VS.net 2002. All in all, now you have 3 options with .net: VB, C#, or J#... and they all have a good level of simplicity compared to programming it with C, specially if you can add forms and so forth.

I have an idea for a plugin, but I could also make some simple example with VB.net, C#, and J#....
Title: Re: AGS 2.61 RC 1 - Jaffa edition
Post by: Scorpiorus on Mon 03/05/2004 21:44:44
Quote from: Pumaman on Sat 28/02/2004 23:04:11CanRunScriptFunctionNow, CallGameScriptFunction.
Superb!! I just want to suggest that thing but that's already in. So, it's now possible to write callback functions in the AGS script. Thanks CJ! :)


Title: Re: AGS 2.61 RC 1 - Jaffa edition
Post by: Pumaman on Mon 03/05/2004 21:53:41
QuoteTo me, it makes perfect sense that the following is aborted if the sheperd is not put in the new room in advance.

Hehe ok I'm persuaded, I'll change it for the next version.

Quoteand just so Pumaman knows what I'd like to see in the editor plugin API:

Noted, I'll see what I can do.

QuoteVictory has been acquired with C#. Here's the deal, tho.. I guess the Interop.AGSEditor.dll is compatible with all .NET-based plugins, right?

Presumably, yeah. I think with .net, they have finally made it so VB, C#, J# and C++ all output compatible object code so they should all work together.

I presume you've managed to make a basic plugin with C# judging by what you said, so that's cool :)

Bear in mind though, don't go mad with .net plugins, because most people don't have the necessary runtime installed to use .net DLLs.
Title: Re: AGS 2.61 RC 1 - Jaffa edition
Post by: edmundito on Mon 03/05/2004 23:48:21
Here's a performance test I did with J#, C#, and VB on Visual Studio.net 2002:

Procedure Tested (Pseudo-Code):
========================
fibo(n)
{
    if (n < 0) return 0
    else if (n = 1) return 1
    else return fibo(n-1) + fibo(n-2)
}
Results for fibo(40)
==============
C# - roughly 5.2 seconds
J# - roughly 6.4 seconds
VB - roughly 8.4 seconds

However, if you write the procedure with a while loop and no recursion, the total runtime is actually 0 seconds for all three programs!  :o Even if you do like fibo(1 million), which would take a long time to calculate with recursion, it still gives out an answer in less than a millisecond.

----

Wow, in the past few hours I've learned a lot of at least designing the forms... they look great on AGS. However, I keep running into this thing where the panel background color in the editor is white, where in the IDE it has the default control (since it's windows xp, it's that creamish color). Anyway, I can even change the color of the background and it works, but it looks like the default color is white instead of the actual window color. Is this a bug?
Title: Re: AGS 2.61 RC 1 - Jaffa edition
Post by: Pumaman on Tue 04/05/2004 20:53:38
Interesting about the performance there, I would have thought VB.net would be more equal with the other languages.

As for the background, AGS places the panes onto the standard grey background colour, so if they're coming out white it's probably some strange incompatibility issue with .net.
Title: Re: AGS 2.61 RC 2 - Special Edition
Post by: Gregjazz on Sat 08/05/2004 20:37:10
There's some great potential now available with that "Z" coordinate. Thanks!
Title: Re: AGS 2.61 RC 2 - Special Edition
Post by: Scorpiorus on Sat 08/05/2004 20:55:58
Quote from: Geoffkhan on Sat 08/05/2004 20:37:10
There's some great potential now available with that "Z" coordinate. Thanks!
Indeed. For instance, characters' jumping can be implemented with ease.

Thanks!
Title: Re: AGS 2.61 RC 2 - Special Edition
Post by: strazer on Sat 08/05/2004 21:04:44
When I try to play any video (mpg or avi) with PlayVideo("video.mpg",1,1), my game crashes when the video ends (by itself or via skip):

An exception 0xC0000005 occured in ACWIN.EXE at EIP = 0x00416E6F ; program pointer is +7, ACI version 2.61.744, gtags (6,0)

This doesn't happen in all rooms.
I have tried several combinations of skip and flag settings and disabled all rep_ex functions but I wasn't able to narrow it down to what could be causing this.
Any ideas?

Edit: Yep, that was it.
Title: Re: AGS 2.61 RC 2 - Special Edition
Post by: Pumaman on Sat 08/05/2004 21:50:52
Well spotted, that happens if there's an ambient sound playing when you use PlayVideo. I'll get it fixed.
Title: Re: AGS 2.61 RC 2 - Special Edition
Post by: strazer on Mon 10/05/2004 01:18:58
First of all, thanks for the updates! :)

But I've found another problem:

It seems character coordinates don't stay within (curve-shaped) walkable areas.
For example, if you use the GetScalingAt function with player.x and player.y in rep_ex to report the current scaling, sometimes it doesn't work if you walk along the edge of the walkable area.

I've whipped up another demo game here (http://www.strazer.net/ags/coordbug.zip) (62kb).

Btw, I've always wondered what the "Edit this .AGSGame" file is for?
Title: Re: AGS 2.61 RC 2 - Special Edition
Post by: MrColossal on Mon 10/05/2004 06:19:15
I believe I found a little bug:

when importing an image if I click and drag to select all but the bottom pixel when zoomed in and I move the cursor off of the image area even by 1 pixel it shifts the entire box down and if I keep moving the cursor off the edge of the image the box jumps around wildly

I was able to get it by zooming out all the way after reselecting the image i wanted to import, but that's not ideal for every circumstance obviously
Title: Re: AGS 2.61 RC 2 - Special Edition
Post by: TheMagician on Mon 10/05/2004 07:52:24
I spotted a small problem with the editor:

my Windows task bar is not on the lower edge of the screen (as usual) but on the upper edge.
This works fine with the editor.
Only the Popup window which opens if you click "preview this view" in the view editor  is opened in the top left corner of the screen. This hides its "Close"-button exactly below my Windows task bar.
When it first happened I moved my task bar to the bottom and the moved the "Prieview View" Window to the middle of the screen. Then I closed it.
However,  opening it the next time it reappears in the top left corner again ... and so on.
Is it possible to save the coordinates of the window?
Title: Re: AGS 2.61 RC 2 - Special Edition
Post by: Radiant on Mon 10/05/2004 12:44:34
Just a bunch of small bugs...

- the ^E 'edit local script' hotkey doesn't always work, even
  if the ^G and ^H keys do. Maybe it depends on the top panel?
- If I do a TintScreen (10,0,0) the screen gets less red,
  instead of more so.
- you might want to mention in the manual that Overlays are
  numbered 101 - 110, and that various common functions such
  as Display() also create overlays [and thus crash the game if
  ten exist already]
- StrGetCharAt() returns a negative value for characters > 127
- it would be nice if the empty game had a 'pointer' cursor

objects
- changing an object's name does not cause the room to be
  marked as 'dirty' for saving
- is it possible within a script to detect the amount of objects
  in a room?
- GetObjectY() actually returns a value one pixel below the
  lowest pixel of the object
- MergeObject places the object in front of all walkbehinds
  even if it has a baseline that should place it behind one
- after you Merge an object, it is still a valid object for
[psimoons@pc305l 13:41 ~/public_html/new] > more question.txt
misc
- the ^E 'edit local script' hotkey doesn't always work, even
  if the ^G and ^H keys do. Maybe it depends on the top panel?
- If I do a TintScreen (10,0,0) the screen gets less red,
  instead of more so.
- you might want to mention in the manual that Overlays are
  numbered 101 - 110, and that various common functions such
  as Display() also create overlays [and thus crash the game if
  ten exist already]
- StrGetCharAt() returns a negative value for characters > 127
- it would be nice if the empty game had a 'pointer' cursor

objects
- changing an object's name does not cause the room to be
  marked as 'dirty' for saving
- is it possible within a script to detect the amount of objects
  in a room?
- GetObjectY() actually returns a value one pixel below the
  lowest pixel of the object
- MergeObject places the object in front of all walkbehinds
  even if it has a baseline that should place it behind one
- after you Merge an object, it is still a valid object for
  subsequent calls to SetObjectPosition, -Graphic etc, only
  the object won't be displayed any more. MergeObject can be
  called again to draw the object once more!

dialogs
- in the dialog editor, 'run-script 0' gives a compiler error
- on_key_press and rep_ex_always won't run while a dialog is
  running (the idea was to have ESC automatically select the
  last dialog obtion, which tends to be 'goodbye')
- why can't I delete a dialog topic?
Title: Re: AGS 2.61 RC 2 - Special Edition
Post by: TerranRich on Mon 10/05/2004 14:04:50
You repeated a bunch of bugs there, Radiant.

Also, thanks CJ, the new character[].z feature looks great!
Title: Re: AGS 2.61 RC 2 - Special Edition
Post by: Radiant on Mon 10/05/2004 15:41:56
Oh, sorry about that. Didn't get much sleep this weekend.
Looking forward to 2.62 very much!
(real ultimate power!!!)
Title: Re: AGS 2.61 RC 2 - Special Edition
Post by: Pumaman on Mon 10/05/2004 21:54:42
Quote from: strazer on Mon 10/05/2004 01:18:58
It seems character coordinates don't stay within (curve-shaped) walkable areas.
For example, if you use the GetScalingAt function with player.x and player.y in rep_ex to report the current scaling, sometimes it doesn't work if you walk along the edge of the walkable area.

Thanks for the demo game. Yes, this will sometimes happen while a character is moving, as for performance reasons the pathfinder can give slightly inaccurate results.

I can see how this is a problem if your code is relying on GetScalingAt (since internally AGS compensates for this pathfinder error by checking the scaling a couple of pixels around the character).

Perhaps the best solution is to add a GetCharacterScaling function to return the character's current scaling level, I'll have a think about it.

Quote
Btw, I've always wondered what the "Edit this .AGSGame" file is for?

In the version of AGS that was distributed as a windows installer, it created an association for ".AGSGame" files so that you could double-click the "Edit this AGSGame" file to open the game in the editor.

You can create this association manually if you like, just set up .AGSGame files so that their association is:

c:\path\to\ags\agsedit.exe -shelllaunch "%1"

Quotewhen importing an image if I click and drag to select all but the bottom pixel when zoomed in and I move the cursor off of the image area even by 1 pixel it shifts the entire box down and if I keep moving the cursor off the edge of the image the box jumps around wildly

Hmm yeah I can see what you mean here, I'll look into it.

QuoteWhen it first happened I moved my task bar to the bottom and the moved the "Prieview View" Window to the middle of the screen. Then I closed it.
Is it possible to save the coordinates of the window?

Sounds reasonable to me, I'll add it to my list.

Quote
- the ^E 'edit local script' hotkey doesn't always work, even
  if the ^G and ^H keys do. Maybe it depends on the top panel?

Yeah, you have to click in the right hand pane before the accelerator keys there will work, it's a bit annoying but I haven't really got time to fix it.

Quote
- If I do a TintScreen (10,0,0) the screen gets less red,
  instead of more so.

Hehe yeah, the TintScreen command is a bit dodgy. I think (50,50,50) should leave the screen unchanged, then numbers either side increase and decrese the components. It's not a true tint though - a combination of RawDrawFrameTransparent and SetAmbientTint is recommended to get a proper tint effect.

Quoteyou might want to mention in the manual that Overlays are
  numbered 101 - 110,

Well, this is arbitrary and could change at any time, it's not something I want to document

Quoteand that various common functions such
  as Display() also create overlays [and thus crash the game if
  ten exist already]

Good point, will do.

Quote- StrGetCharAt() returns a negative value for characters > 127

Well spotted, I'll get it fixed.

Quote- it would be nice if the empty game had a 'pointer' cursor

I'm not sure about that - other people would complain if it did. The empty game is just that - empty  :P

Quote- changing an object's name does not cause the room to be
  marked as 'dirty' for saving

Aye, this is an oldie, I really must get round to fixing it.

Quote- is it possible within a script to detect the amount of objects  in a room?

No, but I'll add it to my to-do list.

Quote- GetObjectY() actually returns a value one pixel below the lowest pixel of the object

the bug is really the other way round - the object is drawn 1 pixel too high. The co-ordinate you get with GetObjectY is the correct one that is used by the pathfinder, baselines, etc.
In terms of fixing the other issue, I can't really for backwards compatibility reasons - people will have aligned animations and so on to look right with the current way it works. It's just a little oddity we'll have to live with ;)

Quote- MergeObject places the object in front of all walkbehinds
  even if it has a baseline that should place it behind one

MergeObject is effectively RawDrawObject followed by ObjectOff; therefore this will happen. It should probably be better documented though.

Quote- after you Merge an object, it is still a valid object for
  subsequent calls to SetObjectPosition, -Graphic etc, only
  the object won't be displayed any more. MergeObject can be
  called again to draw the object once more!

Hehe this is rather nifty really, I'll leave it as is for now ;)

Quote- in the dialog editor, 'run-script 0' gives a compiler error

The dialog script compiler tends to treat 0 as no parameter, so yeah this will happen. It's not a big enough problem for me to fix, though.

Quote- on_key_press and rep_ex_always won't run while a dialog is
  running (the idea was to have ESC automatically select the
  last dialog obtion, which tends to be 'goodbye')

The game is blocked while dialog options are displayed - and script functions only run while the game is running. This should probably be changed since it would be handy to be able to do stuff while the options are displayed.

Quote- why can't I delete a dialog topic?

Because they're referred to by number, and deleting one would mess up the numbering of the others. Deleting the last one is a possibility though (and other workarounds such as leaving an empty placeholder are possible too).


Thanks for all your comments, guys :)
Title: Re: AGS 2.61 RC 2 - Special Edition
Post by: Scummbuddy on Tue 11/05/2004 20:34:06
Hmm, I'm using beta 6, and using 3 regions to moveobjectdirect to get a parralax feeling to a scene. I understood it as moveobjectdirect ignored all walkable areas, but when i step onto the first region, the object zooms up towards the closest region, then continues to move 'somewhat' correctly, but still, along the closest walkable area. I hope you understand. Im basically asking, is there something wrong with the MoveObjectDirect command?

Edit* I have since, added a walkable area for it to move along for itself, but it still wants to move up to the other walkable area to move along...

okay, nevermind, i was using what the editor sais was the objects position as the bottom line to do the moving object along, but thats probably what caused the movement of the object up, since the object is said to be at (508, 93), but its bottom middle pixel is at like (555, 142). Sorry.
Title: Re: AGS 2.61 RC 2 - Special Edition
Post by: Pumaman on Tue 11/05/2004 20:54:16
Scummbuddy: upgrade - RC 1 fixed that so that the editor displays the correct bottom-left co-ordinate for objects.
Title: Re: AGS 2.61 Pre-final Edition
Post by: Snake on Mon 17/05/2004 03:22:11
Not sure if this is a bug, or just my own fault, but I've noticed this came up with the 2.61 beta:

I've got a GUI with a label that displays text messeges. It's quite simple really. But for some reason when I updated to this version, the text doesn't show up, yet I never messed with any code. I updated then immediately tested the game.
What am I missing?

Thanks in advance,


--Snake
Title: Re: AGS 2.61 Pre-final Edition
Post by: Pumaman on Mon 17/05/2004 22:08:00
Quote from: Snake on Mon 17/05/2004 03:22:11
I've got a GUI with a label that displays text messeges. It's quite simple really. But for some reason when I updated to this version, the text doesn't show up, yet I never messed with any code. I updated then immediately tested the game.

Is the label definitely big enough to hold the text? I think there's been a change in how it deals with text in a label if the label is too small (in order to constrain the text within the label boundaries).
Title: Re: AGS 2.61 Pre-final Edition
Post by: strazer on Tue 18/05/2004 01:52:49
The new system.viewport_height variable returns non-letterbox values only when used in the game_start function.
In fact, SetGUIPosition doesn't work beyond the non-letterbox area either.

Isn't the screen fully initialized when the game_start function runs?
Title: Re: AGS 2.61 Pre-final Edition
Post by: Snake on Tue 18/05/2004 03:57:48
I changed it to the size of the GUI width(320) height(42). I only changed it by a couple pixels, before it was 318/40. The text still doesn't show up. The GUI is located at (0,199).


--Snake
Title: Re: AGS 2.61 Pre-final Edition
Post by: Gilbert on Tue 18/05/2004 04:01:17
Hmmm did you check the colour of the text?
Title: Re: AGS 2.61 Pre-final Edition
Post by: Pumaman on Tue 18/05/2004 21:24:29
Quote from: strazer on Tue 18/05/2004 01:52:49
The new system.viewport_height variable returns non-letterbox values only when used in the game_start function.
In fact, SetGUIPosition doesn't work beyond the non-letterbox area either.

If a 320x200/640x400 game is running in letter-box mode, the viewport is still that size. Since you cannot write anything to the letterbox area, it doesn't count as part of the viewport.

QuoteI changed it to the size of the GUI width(320) height(42). I only changed it by a couple pixels, before it was 318/40. The text still doesn't show up. The GUI is located at (0,199).

Does the text show up in the editor, but just not in the game? Is the game small enough to upload for us to take a look?
Title: Re: AGS 2.61 Pre-final Edition
Post by: strazer on Tue 18/05/2004 21:28:15
QuoteIf a 320x200/640x400 game is running in letter-box mode, the viewport is still that size. Since you cannot write anything to the letterbox area, it doesn't count as part of the viewport.

I'm sorry, I may have said it wrong. For some reason I thought 640x480 is 640x400 in letterbox mode.
This happens in my 640x480 game!
Title: Re: AGS 2.61 Pre-final Edition
Post by: Scorpiorus on Tue 18/05/2004 22:37:08
Yeah, for 640x480 game the system.viewport_height variable returns 200 if checked within the game_start function. And yep, it does return 240 after the room has been loaded.

I also noticed that mouse over hotspot interaction isn't triggered for hotspot 0 (no hotspot). It works fine with 2.6 SP1.

EDIT: to correct 200/240
Title: Re: AGS 2.61 Pre-final Edition
Post by: Pumaman on Wed 19/05/2004 22:05:18
QuoteI'm sorry, I may have said it wrong. For some reason I thought 640x480 is 640x400 in letterbox mode.
This happens in my 640x480 game!

Ah yes, this will happen in game_start. Because 640x400-letterboxed and 640x480 are the same mode, it's not until a room is loaded that the current viewport size is known.

QuoteI also noticed that mouse over hotspot interaction isn't triggered for hotspot 0 (no hotspot). It works fine with 2.6 SP1.

Are you sure this worked in 2.6? As far as I can see, the related code hasn't changed since then.
Title: Re: AGS 2.61 Pre-final Edition
Post by: Scorpiorus on Wed 19/05/2004 22:32:17
Quote from: Pumaman on Wed 19/05/2004 22:05:18
QuoteI also noticed that mouse over hotspot interaction isn't triggered for hotspot 0 (no hotspot). It works fine with 2.6 SP1.
Are you sure this worked in 2.6? As far as I can see, the related code hasn't changed since then.
Yes. I've just rechecked it by making a game with 2.6sp1 and then testing it with 2.61prefinal. The last doesn't call move mouse over hotspot 0 event function. I looked into changelist and noticed that in the current version there is a bug was fixed:Ã, 
- Fixed "Mouse moves over hotspot" running even if the mouse was
Ã,  Ã, actually moving over a GUI on top of the hotspot.

Could it be somehow related?
Title: Re: AGS 2.61 Pre-final Edition
Post by: Pumaman on Wed 19/05/2004 22:44:30
Ahhh you're right, thanks - I added a GetLocationType call so it only runs Mouse Moves Over HOtspot if it returns 1.

I'll get it fixed - is this a serious enough problem for anyone that 2.61 should be delayed to fix it?
Title: Re: AGS 2.61 Pre-final Edition
Post by: Snake on Thu 20/05/2004 03:12:38
Gilb: Yeah I checked, it's still light grey over black  8)

QuoteDoes the text show up in the editor, but just not in the game?
Correct. I've got the label displaying all my messeges.
For example, this is all that I'm doing:
SetLabelText(2,0,"-Another silence blankets over them-");
The only thing that's different from 2.56.413 is the z-order option that is added. Other than that everything is exactly the same. I didn't change anything, just loaded it up and tested.


--Snake
Title: Re: AGS 2.61 Pre-final Edition
Post by: Pumaman on Fri 21/05/2004 20:04:46
Is the game small enough to upload for us to take a look?
Title: Re: AGS 2.61 Pre-final Edition
Post by: Scorpiorus on Mon 24/05/2004 16:24:50
Quote from: Pumaman on Wed 19/05/2004 22:05:18
QuoteI'm sorry, I may have said it wrong. For some reason I thought 640x480 is 640x400 in letterbox mode.
This happens in my 640x480 game!

Ah yes, this will happen in game_start. Because 640x400-letterboxed and 640x480 are the same mode, it's not until a room is loaded that the current viewport size is known.
By the way, does it also mean that the CentreGUI() function may do not align GUI's y-coordinate if the function is called from within the game_start() event?
Title: Re: AGS 2.61 Pre-final Edition
Post by: Pumaman on Mon 24/05/2004 21:01:31
Quite possibly, yes. To be safe, put that sort of code in the Player Enters Screen for the first room.
Title: Re: AGS 2.61 Pre-final Edition
Post by: SSH on Mon 24/05/2004 21:08:59
Is this why the preload screen always displays in letter box, even though the game is 640x480? But if setup can workout the resolution of the game, why can't the game itself?
Title: Re: AGS 2.61 Pre-final Edition
Post by: MrColossal on Thu 27/05/2004 03:21:18
hey CJ, dunno if you got my message about this but repeatedly_execute_always doesn't repeatedly execute always

as in during dialogs it stops. Is this on purpose or impossible to change?
Title: Re: AGS 2.61 Pre-final Edition
Post by: edmundito on Sat 29/05/2004 21:50:06
repeatedly_execute_always is missing from the Script menu in the editor, so when I click on repeatedly_execute it goes to repeatedly_execute_always because I added that to the top of my script!  :o
Title: Re: AGS 2.61 Pre-final Edition
Post by: strazer on Sun 30/05/2004 07:21:06
When you animate a character with a non-repeating animation, then leave the room while the animation is running, then re-enter the room, the animation is restarted from the beginning.
Is this intended?

When I tried to see if the same happens with objects (it does not!), it resulted in:

An exception 0xC0000005 occured in ACWIN.EXE at EIP = 0x0042A0D8 ; program pointer is -42, ACI version 2.61.745, gtags (2039,18)

All I did was

  SetObjectView(0, 2); // <- Fatal exception
  AnimateObject(0, 0, 10, 0);

If I use SetObjectView(0, 1) it works fine. Am I missing something?

Check out this demo (http://www.strazer.net/ags/animbug.zip) for both problems.
Title: Re: AGS 2.61 Pre-final Edition
Post by: Scorpiorus on Sun 30/05/2004 15:26:17
Regarding to characters, I believe that was all the time. If I remember it right, the engine restarts the current loop rather than the whole animation (when animation consists of several loops). I don't know if it is intentional but I'd like it to behave that way rather than stop the animation. On the other hand, making it continue animation from the exact frame it was left at on leaving the room could be a good idea. But then again someone's script may be relied on restarting the loop.
Title: Re: AGS 2.61 Pre-final Edition
Post by: strazer on Sun 30/05/2004 15:31:37
Quotemaking it continue animation from the exact frame it was left at on leaving the room could be a good idea.

Agreed. Especially since it works this way for objects.
Title: Re: AGS 2.61 Pre-final Edition
Post by: Pumaman on Sun 30/05/2004 19:12:43
Quote from: SSH on Mon 24/05/2004 21:08:59
Is this why the preload screen always displays in letter box, even though the game is 640x480? But if setup can workout the resolution of the game, why can't the game itself?

Correct. The game could, I just haven't got round to fixing it yet. ;)

Quotehey CJ, dunno if you got my message about this but repeatedly_execute_always doesn't repeatedly execute always

as in during dialogs it stops. Is this on purpose or impossible to change?

While a character is talking, it should run. When the dialog options are dispalyed it won't run, because the game is completely paused at that point.

Quoterepeatedly_execute_always is missing from the Script menu in the editor, so when I click on repeatedly_execute it goes to repeatedly_execute_always because I added that to the top of my script!

Hehe well spotted, I'll get it fixed.

QuoteWhen you animate a character with a non-repeating animation, then leave the room while the animation is running, then re-enter the room, the animation is restarted from the beginning.
Is this intended?

Ah, this is a side effect of the fact that the engine calls StopMoving on all characteres when the room changes, and that StopMoving resets the frame to 0 even if the character wasnt moving. I'll get it fixed.

As for your second issue - I un-commented those two lines and it didn't crash for me. Does it crash every time for you?
Title: Re: AGS 2.61 Pre-final Edition
Post by: strazer on Mon 31/05/2004 04:05:09
QuoteAs for your second issue - I un-commented those two lines and it didn't crash for me. Does it crash every time for you?

No, not anymore. It works now.
I didn't do anything, no PC restart, nothing. Strange.
Title: Re: AGS 2.61 Pre-final Edition
Post by: Pumaman on Mon 31/05/2004 13:32:05
Odd, I'm a bit concerned about that. Do let me know if it happens again.

Anyway, now that the 2.61 Final is out, I'm going to lock this thread.