I am still looking into this scaling bug reported above, but there are two major features completed recently, and we needed to post a new update to let people test them.
AGS 3.5.0 - Alpha 8This update include two new major features:
1) New revamped sprite import dialog. We would really like to have a feedback on this.
2) Custom room viewport & camera script commands that let you configure position and scaling of your room on game screen.
Zip archive:
http://www.mediafire.com/file/6bak3fncw1dg3ef/AGS-3.5.0-alpha8.zip/fileEditor:- Game and room templates are now by default saved in AppData/Local/AGS folder. Editor finds them in both program folder and AppData.
- New revamped sprite import window.
- Sprites that were created using tiled import can now be properly reimported from source.
- Allow room size to be smaller than the game's resolution.
- Fixed wrong game may be loaded from Recent Games list if one of them was deleted in the past.
- Fixed crash when creating room template after doing full game rebuild or just after creating new game.
- Fixed room editor working very slow after new zooming slider was introduced (should be about as fast as before now).
- Fixed room sprites did not draw scaled down with zoom < 100%.
- Fixed GUI or Room editors sometimes allowed to scroll beyond necessary limits.
- Fixed translations were not available for the test run if game was not fully rebuilt yet.
- Fixed Windows Explorer was sometimes locking the game files during compilation.
- (Probably) fixed crash on Editor shutdown.
ScriptAPI:- Implemented Viewport and Camera script classes which control how room is displayed on screen.
- Added properties Game.AutoSizeViewportOnRoomLoad, Game.RoomViewport, Room.Camera.
Engine:- Fixed new pathfinder was crashing if target location lies beyond room borders.
- Fixed old-style string functions like StrCopy could crash the game if user managed object's member is passed as an argument into them.
- Fixed 8-bit sprites could have broken colours if game is run using Direct3D or OpenGL.
- Fixed broken colours during fade-in and fade-out in 16-bit games.
KNOWN ISSUES:- Some weird sprite scaling bug in the room editor, described in the posts above. According to user reports it may be fixed by restarting the editor.
How to use room viewport commands in script.
This requires proper documentation, but for a short explanation:
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. Camera size may be determined in two ways:
a) explicitly setting Width and Height, which tells actual rectangle in the room;
b) setting ScaleX and ScaleY properties to automatically adjust displayed room relative to the viewport's size.
For example, if you set ScaleX/Y to 2.0, then room will appear zoomed in twice as large as the viewport's size. If you set ScaleX/Y to 0.5, it will appear twice as small (zoomed out).
NOTE: you cannot set camera size larger than the room's background.
To access viewport and camera use new properties: Game.RoomViewport and Room.Camera.
Game.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.
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:
* SetViewport(x, y); ===> Room.Camera.X = x; Room.Camera.Y = y; Room.Camera.AutoTracking = false;
* ReleaseViewport(); ===> Room.Camera.AutoTracking = true;
* GetViewportX(); ===> Room.Camera.X;
* GetViewportY(); ===> Room.Camera.Y;
Basically, as you may see, what was known as "viewport" earlier is now called "camera", and "new viewport" is something that was never supported before.