AGS 3.5.0 - alpha 13 - next WIP version

Started by Crimson Wizard, Wed 21/02/2018 13:52:21

Previous topic - Next topic

Crimson Wizard

AGS 3.5.0 - Alpha 13

Download 3.5.0 (Alpha 13) as a .zip archive
Download Dark UI Theme for the editor


ACHTUNG!
This is a development version of AGS 3.5.0.
Use at your own risk. Please back up any games before opening them in this version of AGS.
New settings in this version may make your project files unusable in previous versions after saving with this version.

Last updated: 17th of April, 2019
Has all content from AGS 3.4.3.1.

NOTE: this version was previously known as 3.4.2, but we decided to rename it to 3.5.0 to indicate the significance of some changes.


This release is brought to you by:

- Alan v. Drake
- BigMC (fixes to building on some Linux systems)
- ChamberOfFear
- Crimson Wizard
- John Steele Scott (OpenGL support on Linux)
- Martin Sedlak (new pathfinding)
- Matthew Gambrell (better threaded audio support and bug fixes)
- morganw
- rofl0r
- scottchiefbaker (fixes to building on some Linux systems)
- sonneveld
- tzachs (new navigation bar for the Room Editor)



What is new in 3.5.0

Common features:
- Support for large files: compiled game, sprite set, room files now may exceed 2 GB.
- Deprecated relative assets resolutions: now sprites, rooms and fonts are considered to match game's resolution by default and not resized, unless running in backwards-compatibility mode.
- Allow room size to be smaller than the game's resolution.
- Removed fonts count limit.
- Raised imported sprites count limit to 90000 and removed total sprite count limit (this means you may have around 2 billions of dynamic sprites).
- Removed length limit on the Button and TextBox text.

Editor:
- Editor requires .NET Framework 4.5 to run. Dropped Windows XP support.
- Editor preferences are now stored using .NET configuration model, instead of the Windows registry.
- Added support for custom UI color themes.
- Game and room templates are now by default saved in AppData/Local/AGS folder. Editor finds them in both program folder and AppData.
- Added "Allow relative asset resolutions" option to "Backwards Compatibility" section. Disabled by default, it makes game treat all sprites and rooms resolution as real one.
- New revamped sprite import window.
- Sprites that were created using tiled import can now be properly reimported from source.
- Added context menu command to open sprite's source file location.
- Using Magick.NET library as a GIF loader. This should fix faulty GIF imports.
- New sprite export dialog that lets you configure some export preferences, including remapping sprite source paths.
- Sprites have "Real" resolution type by default. "Low" and "High resolution" are kept for backwards compatibility only. When importing older games resolution type will be promoted to "Real" whenever it matches the game.
- New navigation bar in the room editor, which allows to select any room object or region for editing, show/hide and lock room objects and regions in any combination.
   These settings are saved in the special roomXXX.crm.user files.
- Improved how Room zoom slider works, now supports downscale.
- Added "Export mask to file" tool button to the Room Editor.
- Added MaskResolution property to Rooms. It ranges from 1:1 to 1:4 and lets you define the precision of Hotspot, Regions and Walkable Areas relative to room background.
- Added "Default room mask resolution" to General Settings, which value will be applied
   to any room opened for editing in this game for the first time.
- Removed Locked property from the Room Object, objects are now locked by the navbar.
- Split GUI's Visibility property into PopupStyle and Visible properties.
- Added Clickable, Enabled and Visible properties to GUI Controls.
- "Import over font" command now supports importing WFN fonts too.
- Removed "Fonts designed for high resolution" option from General Settings. Instead added individual SizeMultiplier property to Fonts.
- Display audio clip length on the preview pane without starting playback.
- Added "Always"choice to "Popup message on compile" preference. Successful compilation popup will only be displayed if "Always" choice is selected.
- Added shortcut key combination (Shift + F5) for stopping a game's debug run.
- Don't display missing games in the "recent games" list.
- Build autocomplete table a little faster.
- Corrected .NET version query for the anonymous statistics report.
- Fixed sprite folders collapsing after assigning sprite to a View frame or an object.
- Fixed view loops displayed with offset if the view panel area was scrolled horizontally prior to their creation.
- Fixed Audio folders were displaying internal "AllItemsFlat" property on property grid.
- Fixed MIDI audio preview was resetting all instruments to default (piano) after pausing and resuming playback.
- Fixed MIDI audio preview had wrong control states set when pausing a playback.
- Fixed script compiler could leave extra padding inside the compiled scripts filled with random garbage if script strings contained escaped sequences like "\n" (this was not good for source control).
- Fixed crash when editor was updating file version in compiled EXE but failed and tried to report about that.

Script API:
- Introduced new managed struct Point describing (x,y) coordinates.
- Implemented Dictionary and Set script classes supporting storage and lookup of strings and key/value pairs in sorted or unsorted way.
- Implemented Viewport and Camera script classes which control how room is displayed on screen.
- Implemented Screen struct with a number of static functions and properties, which notably features a reference to the primary Viewport. Deprecated System's ScreenWidth, ScreenHeight, ViewportWidth and ViewportHeight in favor of Screen's properties.
- Added Room.Camera property that references primary room camera.
- All functions that find room objects under screen coordinates are now being clipped by the viewport (fail if there's no room viewport at these coordinates).
   This refers to: GetLocationName, GetLocationType, IsInteractionAvailable, Room.ProcessClick, GetWalkableAreaAt and all of the GetAtScreenXY functions (and corresponding deprecated functions).
- Added Character.GetAtRoomXY, Hotspot.GetAtRoomXY, Object.GetAtRoomXY, Region.GetAtScreenXY, replaced GetWalkableAreaAt with GetWalkableAreaAtScreen and added GetWalkableAreaAtRoom.
- Replaced Alignment enum with a new one which has eight values from TopLeft to BottomRight.
- Renamed old Alignment enum to HorizontalAlignment, intended for parameters that are only allowed to be Left, Center or Right.
- Added new script class TextWindowGUI, which extends GUI class and is meant to access text-window specific properties: TextColor and TextPadding.
- Added new properties to GUI class: AsTextWindow (readonly), BackgroundColor, BorderColor, PopupStyle (readonly), PopupYPos.
- Added Button.TextAlignment and Label.TextAlignment.
- Added missing properties for ListBox: SelectedBackColor, SelectedTextColor, TextAlignment, TextColor.
- Replaced ListBox.HideBorder and HideArrows with ShowBorder and ShowArrows.
- Added TextBox.ShowBorder.
- Added Game.PlayVoiceClip() for playing non-blocking voice.
- Added SkipCutscene() and eSkipScriptOnly cutscene mode.
- Deprecated DrawingSurface.UseHighResCoordinates. Also, assigning it will be ignored if game's "Allow relative asset resolutions" option is disabled.

Engine:
- New pathfinder based on the A* jump point search.
- Implemented new savegame format. Much cleaner than the old one, and easier to extend, it should also reduce the size of the save files.
   The engine is still capable of loading older saves, temporarily.
- Implemented support for sprite batch transformations.
- Implemented custom room viewport and camera.
- Removed 200 chars limit for DoOnceOnly token length.
- Reimplemented threaded audio, should now work correctly on all platforms.
- Improved performance of hardware-accelerated renderers by not preparing a stage bitmap for plugins unless any plugin hooked for the particular drawing events.
- Reimplemented FRead and FWrite plugin API functions, should now work in 64-bit mode too.
- Made fps display more stable and timing correct when framerate is maxed out for test purposes.
- Completely removed old and unsupported record/replay functionality.
- Replaced number of fatal errors reported for incorrectly called script functions with a warning to the warnings.log instead. This is done either when arguments may be fixed automatically, or script command simply cannot be executed under current circumstances.
- Expanded some of the error messages providing more information to end-user and developers.
- Fixed engine could not locate game data if relative path was passed in command line.
- Fixed potential bug which could cause DoOnceOnly tokens to be read incorrectly from a savedgame.
- Fixed DynamicSprite.SaveToFile() not appending ".bmp" if no extension was specified.
- Fixed IsMusicVoxAvailable() not working correctly in old games which use 'music.vox'.
- Fixed a bug in mp3/ogg decoder where it assumed creating an audiostream succeeded without actually testing one.
- Added Scavenger's palgorithms plugin to the list of builtins, for ports that use ones.

Linux:
- Support for OpenGL renderer.
- Use same FreeType library sources as Windows version, which suppose to fix TTF font glitches.
- Re-enabled threaded audio setting.
- Improved CPU yield function, this supposedly may reduce CPU usage.

Windows:
- Windows version of AGS is now built with MSVS 2015 and higher.


KNOWN ISSUES:

- Reported by Snarky: need to find out which components need to be added to use AGS 3.5.0 on fresh Windows installation.
- Some weird sprite scaling bug in the room editor described in the posts below. According to user reports it may be fixed by restarting the editor. Unfortunately I was still unable to reproduce it on my own...
- Custom Viewport and Camera properties are not remembered in savegame. Temporary workaround is to save these in variables and restore custom camera in eEventRestoreGame event.
And of course the ones noted at github issue tracker: https://github.com/adventuregamestudio/ags/issues?q=is%3Aissue+is%3Aopen+label%3Abug



On color themes

After launching the Editor, go to File - Preferences. In the "Editor Appearance" group box you will find "Color Theme" setting. If you haven't installed any themes yet the selection list will be empty. Press "Import Color Theme" and select appropriate JSON file, containing theme configuration.
Sample color theme: Dark UI Theme.

There is no specification on theme creation yet, but I hope there will be one at some point. For now you may copy and modify existing one. Themes are in JSON format, which you may edit in most simple text editors. If the theme is broken, the editor will report an error and reset to Default theme on startup.
ChamberOfFear also suggested creating a repository for the themes to let people upload their own and improve existing ones, which we may do in a future.



On new navigation bar in the room editor

This was made by tzachs back in 2014, but got into the editor only now. The feature is working, but may need polishing.

Screenshots (warning - big size):
Spoiler




[close]

Quoting tzachs (from his old thread) -

- Room Layers

This feature allows you to view (and edit) walkable areas/walk-behinds/hotspots/regions/characters/objects/edges in the same time (as opposed to only seeing one of them at a time, like we've seen before).
Well, not entirely though: walkable areas/walk-behinds/hotspots/regions still can't be seen together (as they use masks and is part of the natives dll so I skipped it for now) but they can be seen along objects, characters, and edges.

- Visibility

Each layer can be made visible/hidden by the push of a button. In addition, for the objects/characters/edges layers each item in the layer can also be made visible/hidden by the push of a button. This will only affect the editor, not the actual game.

- Locking

Each layer can be locked/unlocked by the push of a button. In addition, for each layer, each item in the layer can also be locked/unlocked by the push of a button.
A locked item cannot be moved until it is unlocked, useful to prevent mistakes when designing the room. This will only affect the editor, not the actual game.



On new room viewport and camera commands

This release changes the way AGS handles room viewport. Originally room view was covering whole screen and always drawn 1:1. 3.5.0 separates old viewport into viewport and camera, also changing the meaning of viewport term.

In 3.5.0:
Viewport is a place on screen where room is drawn, defined in game coordinates (e.g. 0,0 - 320x200).
Camera is a place in room which is being drawn, defined in room coordinates

The part of the room "seen" by camera is being copied to the viewport on screen, scaled up or down if necessary.
For example, if you set camera's size twice as small than the viewport, then room will appear zoomed in x2. If you set camera's size twice as big than the viewport, room will appear zoomed out x2.
NOTE: you cannot set camera size larger than the room's background.

To access viewport and camera use new properties: Screen.Viewport and Room.Camera.
Screen.AutoSizeViewportOnLoad boolean value turns automatic viewport adjustment on room load. It is ON by default which corresponds to normal room view you are used to.

Since the relation between screen and room is now more complicated new functions were added to help convert between screen and room coordinates: Screen.ScreenToRoomPoint(), Viewport.ScreenToRoomPoint() and Viewport.RoomToScreenPoint(). These functions return an object of Point type containing (x,y) coordinates.
Screen.ScreenToRoomPoint() returns null if there is no Viewport on screen under these coordinates. This is because if there will be multiple viewports supported in the future then engine simply won't know which to choose having none under these coords.
Both Viewport.ScreenToRoomPoint() and Viewport.RoomToScreenPoint() have 'clipViewport' parameter which tells whether they should return null if the coordinates lie outside of the visible part of the room.


Old viewport functions are now deprecated, they may still be enabled if you set "Script compatibility level" to v3.4.1 or lower.
Here's correspondence between old and new functions:




Old commandNew commad(s)
SetViewport(x, y);Room.Camera.SetAt(x, y);
ReleaseViewport();Room.Camera.AutoTracking = true;
GetViewportX();Room.Camera.X;
GetViewportY();Room.Camera.Y;

As you may see, what was known as "viewport" earlier is now called "camera", and "new viewport" is something that was never supported before.


On savegame format

AGS 3.5.0 introduces new savegame format. This had to be done for several reasons, mostly internal ones, because existing format was too difficult to maintain and expand.
From the user's perspective, the notable change is that save file will be somewhat smaller, because redundant data is no longer written there (I did some tests in the past, and iirc depending on circumstances the size reduction was about 20-40%, but this awaits confirmation).

The new format is completely non-compatible with the old one. This means that if you run some existing game with the new engine, and save a game, that save can't be loaded by previous engine.
On the other hand, new engine can still load old saves. Old saves support is temporarily and may be removed in future.
Keep these two points in mind if you plan on upgrading existing game to AGS 3.5.0.

Cassiebsg

Ohh... can't wait to try this version, so many goodies I have long longer for! (nod)

Great work everyone and big big thanks!
There are those who believe that life here began out there...

eri0o

I can't wait until I come home to try this! Awesome release! :O

Joseph DiPerla

Joseph DiPerla--- http://www.adventurestockpile.com
Play my Star Wars MMORPG: http://sw-bfs.com
See my Fiverr page for translation and other services: https://www.fiverr.com/josephdiperla
Google Plus Adventure Community: https://plus.google.com/communities/116504865864458899575

Crimson Wizard

So... does it at least run? Still waiting for confirmation (lol).
I have a suspicion that we will need to make some adjustments to make it run on Windows XP, or even maybe make a separate build for Windows XP. Did not try myself yet.

Cassiebsg

I can confirm it runs (on win7 64bit) and reads the dark theme just fine. (nod)
There are those who believe that life here began out there...

eri0o

#6
Hey CW! It worked great here!

Steps for Linux using Play On Linux (I use Ubuntu 16.04):
- Create a new Play On Linux drive, I used wine x86 3.1 .
- On Play On Linux, go to the virtual drive, and under Install Components, install Microsoft Core Fonts.
- After, still under Install Components, install dotnet40
- I created a folder in Program Files called Adventure Game Studio 3.4.2
- Copy the downloaded AGS files and extract the content in the Adventure Game Studio 3.4.2 folder.
- I placed the VisualStudioDark.json theme there too.
- On Play On Linux interface, click create shortcut from this virtual drive, select AGSEditor.exe, I named the shortcut AGS342.
- done! Just run the previously created shortcut! 8-)

I added a spoiler tag in the image below because it's big.
Spoiler

342 default theme


with dark theme

[close]

(my Wine is emulating Windows XP environment!)

m0rph84

I'm testing it with my current game, installed the dark theme and running it on Win 10 64bit.
So far so good!

Cassiebsg

Uhm... was trying this, but I got an issue, not sure if it's just me.

I started a new project using the BASS template, change res, color depth, proper alpha blending, imported some sprites, created a few views, created 2 new characters, added them to room 1, change the BG in room 1... thus I now have 3 characters in room yet. Yet in the editor I can only see the original character. 8-0
And yes the characters are on the screen and I added a walkable area. If I run F5 I can move my new character and see the other two.

Edit: Okay, I closed the editor and opened it again. Now the characters are shown in the editor. Using the "rebuild all files" doesn't solve it either. Seems like only restarting the editor does. :~(
There are those who believe that life here began out there...

Crimson Wizard

Quote from: Cassiebsg on Sat 24/02/2018 21:49:44
Edit: Okay, I closed the editor and opened it again. Now the characters are shown in the editor. Using the "rebuild all files" doesn't solve it either. Seems like only restarting the editor does. :~(

"Rebuild all files" compiles the game and does not affect what you see in the editor, so it's natural that it does not fix anything.

To clarify: in the editor you do not see the characters that you have added to the room until you restart the editor? What about closing and reopening room tab?

Cassiebsg

To clarify: Closing and opening the room tab doesn't help. so far only restarting the editor has solved the problem.
Maybe some others could try this just to see if it's just me or a bug?
There are those who believe that life here began out there...

Privateer Puddin'

My test on it:

Open Room X
Change Character to Room X
Character is not seen on Room X, but you can pick it from the list of characters in Properties for that room
Closing and opening the room tab doesn't show the character

Opening another room and then going back to Room X will now show the character (don't need to restart the editor)

Cassiebsg

Funny, I can't choose the character from list either (using the dark theme, if that makes a difference).
But can confirm that opening a new room and then returning will fix the character showing. (nod)
There are those who believe that life here began out there...

Crimson Wizard

Quote from: Cassiebsg on Sun 25/02/2018 01:09:22
Funny, I can't choose the character from list either (using the dark theme, if that makes a difference).
But can confirm that opening a new room and then returning will fix the character showing. (nod)

Do you mean the list in the upper bar? Does it get shown there after changing rooms?

Cassiebsg

I mean the bar where it shows Room > Characters > cName
If I add a new character to the room and open the room, the character will neither be seen nor be available in that drop down list (is there another place to see which characters are in the room?). opening a new room and then returning will show the character in the room and in the list. Removing the character from the room (or moving it to another room) will remove it from the editor show but still show it on the drop down list. Again these are fixed with opening another room and returning.
There are those who believe that life here began out there...

Privateer Puddin'



cMarket moved to Room 1. I can select them from Properties on the right (and their dotted line box is shown on the background) but I can't see them or select them from the Edit this room's > Room > Characters bit that I can once I reload the room

Lord Vetinari

Quote from: Crimson Wizard on Wed 21/02/2018 13:52:21
Editor:
- Editor uses (and requires) .NET 4.0 and C# 6.0.

Does this means that in the new version we'll be scripting in C#? Nice.

ChamberOfFear

Quote from: Lord Vetinari on Thu 01/03/2018 09:09:18
Does this means that in the new version we'll be scripting in C#? Nice.

Sorry to disappoint but that's not what that means. It's probably a little open to interpretation since Crimson Wizard mentioned C# version which isn't relevant to the end user. Anyway, the Editor is made in C# .NET, and we recently upgraded the .NET version, so now users need to make sure they have the corresponding .NET version, that's all.

Snarky

I just installed AGS on a fresh Win10 machine, and had to go through an extra step of tracking down and installing .NET 2.0 (which is actually part of the 3.5 package) first. That's the bit that should no longer be needed, since newer versions of Windows cone with newer versions of .NET.

Crimson Wizard


Quote from: Snarky on Thu 01/03/2018 10:56:25
I just installed AGS on a fresh Win10 machine, and had to go through an extra step of tracking down and installing .NET 2.0 (which is actually part of the 3.5 package) first. That's the bit that should no longer be needed, since newer versions of Windows cone with newer versions of .NET.

Which version of AGS did you install?
This new version should not be requiring .NET 2.0 anymore, at least not supposed to.
.NET 2.0 is included in 3.5, I think, but it is not included into the higher versions of .NET (4.0+).


Quote from: ChamberOfFear on Thu 01/03/2018 10:11:44
Quote from: Lord Vetinari on Thu 01/03/2018 09:09:18
Does this means that in the new version we'll be scripting in C#? Nice.

Sorry to disappoint but that's not what that means. It's probably a little open to interpretation since Crimson Wizard mentioned C# version which isn't relevant to the end user. Anyway, the Editor is made in C# .NET, and we recently upgraded the .NET version, so now users need to make sure they have the corresponding .NET version, that's all.

I will rephrase this line in the changes.txt to make it clear we are talking about .NET requirements.

As for scripting in C#, there was a plugin for that once.

SMF spam blocked by CleanTalk