Show Posts

You can view here all posts made by this member. Note that you can only see posts made in areas to which you currently have access.

Messages - Crimson Wizard

Pages: [1] 2 3 ... 379
AGS 3.4.1 RC3
(also updated first post)

Few last-minute changes had to be made to improve usability of this release.

Changes since RC 2:

 - Fixed TRS files could not be compiled if Compiled/Data folder is not present.
 - Fixed some incorrectly written values in default config.
 - Fixed script API options were not properly initialized when upgrading old games, which caused warnings appear on game launch.

 - Now supports separate scaling options for fullscreen and windowed modes.

* Linux build pack (

I think one of possible solutions to prevent audio locking in a loop is to set multitasking mode on, but then you better pause your game when its alt+tabbed.
Note, that you cannot detect alt+tab unless you set multitasking mode, because game script is literally suspended otherwise.

Code: Adventure Game Studio
  1. SetMultitaskingMode(1); // this way the game will run in background

Warning, dumb example:
Code: Adventure Game Studio
  1. function repeatedly_execute()
  2. {
  3.   if (!System.HasInputFocus && IsGamePaused() == 0) {
  4.     PauseGame();
  5.   } else if (System.HasInputFocus && IsGamePaused() == 1) {
  6.     UnPauseGame();
  7.   }
  8. }

I am not comfortable without adding it either.

Made fix:

Well, that's because I did not code the main functionality, that was first reason of this change. I don't know how this happened, probably I do not understand what I am doing anymore.

This was previously reported and fixed in 3.4.1.

It seems that fixed multipliers in windowed mode do not work.
If you set up your game with windowed mode and e.g. x2, the game runs at its original size...
If you set up your game with fullscreen with e.g. x2 for windowed mode, when swithcing from fullscreen to windowed mode, you get a max multiplier...

The old code that I was fixing is back, I did mistake when merging changes to repository.

Yes, I know it. But my means is another things. I want to switch between two rooms and player get the last coordinate automatically and appear in new room in same coordinate. For example with press "F" in keyboard it changes room and stand in same previous room coordinate but in new room.
I hope was clear this time.

Sorry, this is rather confusing. Your first sentence sounds like one thing, but second sentence sound like another thing.
What do you call "previous room" and "new room" exactly?

Could you mean, maybe, that for each room X last character coordinates should be remembered, and when you return to room X these saved coordinates should be applied again?

For that case:
Code: Adventure Game Studio
  1. #define MAX_ROOM_NUMBER Put max room number here
  2. struct RoomPosition
  3. {
  4.     int x;
  5.     int y;
  6.     // you can add more here, like character's facing direction
  7. }
  8. RoomPosition LastRoomPos[MAX_ROOM_NUMBER + 1];
  10. function on_event(EventType event, int data)
  11. {
  12.     if (event == eEventLeaveRoom)
  13.     {
  14.         LastRoomPos[player.Room].x = player.x;
  15.         LastRoomPos[player.Room].y = player.y;
  16.     }
  17.     else if (event == eEventEnterRoomBeforeFadein)
  18.     {
  19.         player.x = LastRoomPos[player.Room].x;
  20.         player.y = LastRoomPos[player.Room].y;
  21.     }
  22. }

The code above will apply the last coordinates all the time. If you want them applied only under certain conditions, like key press, then remove last part of the function above (under "if (event == eEventEnterRoomBeforeFadein)") and add this instead:
Code: Adventure Game Studio
  1. function ReturnToLastPosInRoom(int room)
  2. {
  3.     player.ChangeRoom(room, LastRoomPos[room].x, LastRoomPos[room].y);
  4. }
Then you can call this function whenever you need to.

If this is still not what you want, then try breaking the task into steps, like -
1) When leaving room X, store player's coordinates.
2) ...

If you mean same position in room coordinates, that's simply like:
Code: Adventure Game Studio
  1. player.ChangeRoom(roomnumber, player.x, player.y);

EDIT: lol, I actually forgot that, as Khris pointed out below, you do not have to pass x,y arguments if you want them to stay same in the new room, so it's really just
Code: Adventure Game Studio
  1. player.ChangeRoom(roomnumber); // it will keep same coords

The .cfg in"saved games" only store "windowed=" and not the scaling mode... could it be the source of the issue?
No, these scaling modes can be read from default config too.

All these issues are because the system was not originally designed to switch at runtime. So now it saves only one variable when exits game (windowed or fullscreen mode) but does not save actual window size.

This build contains fixes

Updated again (will probably release RC3 on this weekend):

I think it goes away if you do "Rebuild all files", but that's not confirmed.
Sadly, it does not. I even renamed the compiled folder and rebuilt all, but I still get that message box.

Ok, I got it. Workaround is: go to General Settings, Backwards compatibility, open "Script API version" drop-down list and just close it (leave value unchanged), then compile again.
There is a value that does not initialize correctly until this setting is set to something.

Ahhh, that's one weird bug I was planning to fix, but kept forgetting to. I will try again in following days.
Is there a quick workaround for this? Is there a version number hidden in one of the game files that I can edit manually to fix it?

I think it goes away if you do "Rebuild all files", but that's not confirmed.
The warning itself is related to the variable in compiled data that cannot be fixed by hand (well, technically can be, but you'd need to know exact offset).

1) I opened and compiled an old game and get the following warning when running the game:
"Warning: this game requests a higher version of AGS script API, it may not run correctly or run at all.
The game itself works just fine, but the message box is annoying.

Ahhh, that's one weird bug I was planning to fix, but kept forgetting to. I will try again in following days.

2) What is the best default graphic driver? Software, D3D, OGL? D3D is default now, but should I choose OGL instead for best compability?

I guess this question is for commercial game developers, since they get most feedback on this topic. The only difference I personally noticed is that OpenGL initializes a little slower on my system.
In regards to software driver opinions seem to divide, personally I try not to use it because it runs badly with newest video card/drivers I have. But it is still the only renderer that is 100% compatible with 8-bit games.

Site & Forum Reports / Re: Wiki manual pages out of date
« on: 08 Dec 2017, 16:34 »
So, there is no current version online? Is the chm file somewhere downloadable? Shall we link there? Or just add a note to use the manual that was shipped with AGS?

CHM is not the best way to distribute or link to, because it is only (officially) supported by Windows.
But when creating CHM the intermediate output is HTML files, which probably may be uploaded somewhere. Maybe that was the way online manual created?

Site & Forum Reports / Re: Wiki manual pages out of date
« on: 08 Dec 2017, 16:17 »
It links to which, of course, doesn't work anymore. Is there an online version of the current manual somewhere?
There's one linked on the AGS home page:
It is also outdated and corresponds to 3.2.1.

Oh, could you maybe split this discussion into a new thread? It is not related to the original topic anymore.

Site & Forum Reports / Re: Wiki manual pages out of date
« on: 08 Dec 2017, 14:57 »
Actually, all of the wiki pages that cite manual are outdated, and probably relate to AGS 3.1.*.
Are they in a common category so they are easy to find? I really think we should mark them as outdated, so people know what they are dealing with.

Can't say if category is consistent (I hope so), there is one called "Manual entries".
There seem to be a plain copy of whole manual starting of the root page.

BTW, there is already a small message at the top of each page:
This page was last modified 19 August 2012, and could be out of date with the current AGS version.
Maybe people don't notice it?

Site & Forum Reports / Re: Wiki manual pages out of date
« on: 08 Dec 2017, 14:38 »
Maybe we should mark those wiki pages on the top of the page? We could make a banner that says "This article is outdated and only applies to old versions of AGS"
Actually, all of the wiki pages that cite manual are outdated, and probably relate to AGS 3.1.*.
The separate online manual is corresponding to AGS 3.2.1.
IMO actual solution is in configuring a repository for documentation source, which anyone can edit, and which automatically builds online and offline version of the manual.

Another quick update, now fixed "maximize" button appearing after switching from fullscreen to windowed mode:

EDIT: forgot to add separate scaling options to Editor's default setup pane.

Actually, I found (and fixed) that AGS does unnecessary manipulations in winsetup too... the gfx renderer classes are initialized there under hood to read some properties from them, and when they are destroyed they try to "restore" setup window style (thinking it's the game's window) and system's display mode, even though it was never changed.

Engine Development / Re: TRA compile problem in 3.4.1
« on: 07 Dec 2017, 22:31 »
Hi, this was reported recently, supposedly fixed with the temp build:

Basically, this is because intermediate output is now stored in the "Compiled/Data" contrary to just "Compiled", but "Data" subfolder was created a bit late.

I want to give up and release this version.
It's not even an important issue. This shouldn't indeed prevent you to release a new version.

I think it is, because OpenGL and switching modes is part of this release.
I hope it will work for most people for the time being, then someone will find a way to fix remaining problems.

Pages: [1] 2 3 ... 379