AGS 3.4.1 - RC 3 (new release candidate)

Started by Crimson Wizard, Sun 09/04/2017 22:02:10

Previous topic - Next topic

Dave Gilbert

Heh. I ran into this problem a LOT in Puzzle Bots. Large levels with lots and lots of room objects. I'd find myself re-purposing older objects from earlier in the scene that weren't in use anymore. A drawbridge object that got blown up at the beginning of a level was then giving a new graphic and became a haystack that you found at the end. Fun times.

Anyway. Yeah. What Francisco said.

Crimson Wizard

Too late for this release! I am not adding anything else. I hoped to finish this six months ago.

Grundislav

Fair enough! Could it maybe be fixed in a patch or the next update?

Snarky

#183
It'd probably be fairly easy, though quite tedious, to make a module for unlimited pseudo-objects (using Drawing Surfaces onto either the background or a holder object) with most/all of the same capabilities as real objects. The only thing that might be a bit challenging is the Z-order/baseline, but if all your objects have the same depth (or if depth doesn't matter, which it probably doesn't on a map screen) that won't be necessary.

Obviously if the limit is going to be lifted in the near future, this would be totally wasted effort.

If you don't have characters moving on your map screen, another alternative would be to use a GUI with buttons instead of a room with objects (since GUI controls are now unlimited), like in this thread. The main drawback is probably having to recreate what you've already done from scratch.

Edit: Fixed fucked-up formatting.

Grundislav

Nah, for now Dave's workaround is fine. Since not all the icons are visible at the same time, it's not a problem to just re-position them and change their graphics.

I doubt it'll be very common for anyone to have 40 objects in a room, so this isn't a high priority issue, but it might be something to consider for the future (and I'm glad it's no longer a 25 object limit like it was in the old days!)

Meystari F

#185
Click on this link > Error in fonts

As you can the little font "w" looks very weird in the speech fonts. 
I hope this will be fixed in the the update.


Crimson Wizard

Quote from: Fribbi on Thu 14/09/2017 09:04:56
Click on this link > Error in fonts

As you can the little font "w" looks very weird in the speech fonts. 
I hope this will be fixed in the the update.

Can you give the link to the font so that I could check it?

Meystari F

#187
The fonts are included with the latest AGS

Crimson Wizard

#188
Quote from: Fribbi on Thu 14/09/2017 18:39:15
The fonts are included with the latest AGS

Does this happen to every font, or particular font in some template? Are you using fonts exactly as they come with template, or reimported it, for example - to change the font size?
Do you have this issue in the editor only, or in game too?

I checked every template included with AGS. Font on your pic looks most like font0 from 9-verb template, but I do not experience same issue. Have anyone else seen something like that before?
E: Also, looking more at the screenshot above, I notice other letters drawn little distorted too.

Crimson Wizard

Someone (I forgot who) told me that VSync does not work with OpenGL, so I implemented that.
Here is a test build: http://www.mediafire.com/file/md36vkorpigl4g2/acwin-opengl-vsync.zip

Is there anyone who has an opportunity to test this out? I do not have any prepared test game for such issue.

NicolaGs

#190
Quote from: Crimson Wizard on Sat 16/09/2017 19:45:16
Someone (I forgot who) told me that VSync does not work with OpenGL, so I implemented that.
Here is a test build: http://www.mediafire.com/file/md36vkorpigl4g2/acwin-opengl-vsync.zip

Is there anyone who has an opportunity to test this out? I do not have any prepared test game for such issue.
Yep, that would be me. I test that asap.

Edit : test... And sorry, but it doesn't change anything.
My first game : I Want Out!

Crimson Wizard

Quote from: NicolaGs on Sun 17/09/2017 10:57:01
Edit : test... And sorry, but it doesn't change anything.

Do you run it windowed or fullscreen?

NicolaGs

#192
Quote from: Crimson Wizard on Sun 17/09/2017 13:03:48
Do you run it windowed or fullscreen?
I tested both.

I tested beta 6 for reference (with v-sync ON and v-sync OFF) both fullscreen (at screen resolution : 1920x1080) and windowed
I tested beta 7 v-sync test version (with v-sync ON and v-sync OFF) both fullscreen and windowed

I got the same result in both cases (beta 6 / beta + vsync test version).

The behaviour/appearance is slightly different between windowed mode and fullscreen:
- in windowed mode : the scrolling is a bit stuttering
- in fullscreen : there's a strong tearing effect

With D3D, both fullscreen and windowed mode, the scrollings are perfectly smooth.


Edit : If you want to test it, I made a simple room with a vertical scrolling (it's a part of the intro of my current project) : compiled.zip
It's 60 fps (and maybe it increases the effect). I included both Windows compiled and the "raw" data. (compiled in beta 7 + acwin with v-sync test)
My first game : I Want Out!

Crimson Wizard

#193
Quote from: NicolaGs on Sun 17/09/2017 14:18:14
Edit : If you want to test it, I made a simple room with a vertical scrolling (it's a part of the intro of my current project) : compiled.zip
It's 60 fps (and maybe it increases the effect). I included both Windows compiled and the "raw" data. (compiled in beta 7 + acwin with v-sync test)

This is interesting, I tried both D3D and OpenGL and they have similar results: strong tearing effect without vsync and barely noticeable occasional tearing (could me my imagination) with vsync.

Since OpenGL perfomance largely depends on installed libraries and video drivers, it is possible that your system does not support required extensions. I've made another build, which logs out warnings if some extensions are not found. Could you write "log=1" line under "[misc]" in acsetup.cfg and test game again? Log should appear in the common AGS save games place, in ".ags" subdirectory (%USERPROFILE%/Saved Games/.ags).
https://www.dropbox.com/s/i5en4586vnr03yg/acwin-opengl-vsync2.zip?dl=0

Also, could someone else test this game on their machines?

NicolaGs

#194
Here are two lines from the log :

Code: ags
Running OpenGL: 4.0.0 - Build 9.17.10.2932
WARNING: OpenGL extension 'WGL_EXT_swap_control' not supported, vertical sync will be disabled.


So you guessed right...
My PC is not an oldie... but maybe not up to date either...

Full log if necessary :
Spoiler
Code: ags
Adventure Game Studio v3.4 Interpreter
Copyright (c) 1999-2011 Chris Jones and 2011-2017 others
ACI version 3.4.1.7

Installing exception handler
Initializing allegro
Reading configuration
Looking for game data file
Located game data file: d:/Temp/Compiled/Windows/V-SYNC~1.EXE

Opened game data file: game28.dta
Game data version: 49
Compiled with: 3.4.1.7
Setting up window
Initializing TTF renderer
Initializing mouse: number of buttons reported is 5
Checking memory
Data directory: d:/Temp/Compiled/Windows
Initializing keyboard
Install timer
Initialize sound drivers
Sound settings: digital driver ID: 'AXA ' (0x41584120), MIDI driver ID: 'Auto' (0xffffffff)
Installed digital driver ID: 'AXA ' (0x41584120), MIDI driver ID: 'W32M' (0x5733324d)
Install exit handler
Initialize path finder library
Load game data
Game GUI version: 118
Requested script API: v3.4.1 (5), compat level: v3.4.0 (4)
Game title: 'V-Sync test'
Checking for disk space
Initializing MOD/XM player
Initializing resolution settings
Game native resolution: 320 x 200 (32 bit)
Device display resolution: 1920 x 1080
Game settings: windowed = no, screen def: explicit, screen size: 1920 x 1080, match device ratio: ignore, game scale: max_round
Using graphics factory: OGL
Created graphics driver: OpenGL
Supported gfx modes (32-bit): 
	320x200;320x240;400x300;512x384;640x400;640x480;800x600;1024x768;
	1152x864;1280x600;1280x720;1280x768;1280x800;1280x960;1280x1024;1360x768;
	1366x768;1400x1050;1440x900;1600x900;1600x1200;1680x1050;1920x1080;
Attempting to find nearest supported resolution for screen size 1920 x 1080 (32-bit) fullscreen
Attempt to switch gfx mode to 1920 x 1080 (32-bit) fullscreen
Running OpenGL: 4.0.0 - Build 9.17.10.2932
WARNING: OpenGL extension 'WGL_EXT_swap_control' not supported, vertical sync will be disabled.
Succeeded. Using gfx mode 1920 x 1080 (32-bit) fullscreen
Render frame set, render dest (160, 40, 1759, 1039 : 1600 x 1000)
Requested gfx filter: StdScale
Graphics filter set: 'StdScale', filter dest (160, 40, 1759, 1039 : 1600 x 1000)
Using gfx filter: StdScale
Mouse control: on, base: 1.000000, speed: 1.000000
Mouse confined: (160,40)-(1759,1039) (1600x1000)
Check for preload image
Initialize sprites
Initialize game settings
Prepare to start game
Audio is processed on the main thread
Checking replay status
Engine initialization complete
Starting game
***** ENGINE HAS SHUTDOWN
[close]

Edit : v-sync works in OpenGL mode in other games (e.g Doom with GZDoom) on the same PC. Maybe is there another way to "call" a v-sync function ?
My first game : I Want Out!

Crimson Wizard

#195
Something that I just found, it appears that vsync is toggled on by default on my machine. It works always if I "emulate" failure to register the necessary extension.
So, actually, what I implemented was not vsync on its own but rather means to enable and disable it from game setup.

Also this is what I found in OpenGL documentation:
QuoteVideo drivers can override these values, forcing a swap interval of 1 or 0 depending on settings the user provided in the video card's control panel.



EDIT:
Quote from: NicolaGs on Sun 17/09/2017 16:49:44
Edit : v-sync works in OpenGL mode in other games (e.g Doom with GZDoom) on the same PC. Maybe is there another way to "call" a v-sync function ?

Maybe, this is something to research, I guess. I also remember suggestion to test for extension differently, I may try that first.


EDIT2:
I also found one worrying thing, that OpenGL has two types of extension functions, one tagged as EXT and another ARB. ARB are extensions that are generically supported (as standard, just not yet in the list of core functionality) and EXT are extensions that are supported only by few GPU vendors (kind of early experiments). And our OpenGL implementation imports only EXT functionality, while it should probably use ARB one...
Although, not sure how much difference that makes. I noticed that some functions are only declared as EXT ones, even though they could already be reported as ARB extension... This all is completely new field of science for me, where I have no knowledge whatsoever.

NicolaGs

Following this, I searched for settings in my nVidia control panel.
I was able to force v-sync for this specific AGS program or by default for all applications. And it works !

The problem here is that I use a laptop which has (as often) an integrated video card and a 3D accelerated chip.
I can choose to either :
- force nVidia "high perf GPU"
- force Intel "low perf GPU" (for lowest power consumption, I assume)
- leave the choice to the system

What I see :
- forcing nVidia let me use V-Sync. The ON/OFF toggle in Winsetup works fine.
- forcing Intel does not allow me to use V-Sync (either it is ON or OFF).
- leaving in auto seems to use the Intel chip.

With nVidia, the log now reports :
Code: ags
Running OpenGL: 4.5.0 NVIDIA 355.60



Conclusion :
V-Sync implementation seems to work, but you've got to be sure to use the correct chip on a laptop, that is the one with the correct OpenGL libraries...

Edit : I'll test on other systems if I can...
My first game : I Want Out!

Crimson Wizard

#197
Could you run one more test with the logging on? This build searches for extension ID using 3 available methods and writes down 3 results. I am curious to know if particular method may report extension even if other do not.
https://www.dropbox.com/s/0axbgd20t3bqlaw/acwin-opengl-vsync3.zip?dl=0

morganw

It looks like you can force applications to default to the higher performance options by exporting a flag that the driver looks for.

NicolaGs

Guess you had a hit !

Here is the OpenGL part of the log when I use the Intel "low spec" video card or the "Auto setting":
Code: ags
Running OpenGL: 4.0.0 - Build 9.17.10.2932
OpenGL: WGL_EXT_swap_control NOT found in GL_EXTENSIONS
OpenGL: WGL_EXT_swap_control found in WGL_EXTENSIONS
OpenGL: WGL_EXT_swap_control found in WGL_EXTENSIONS (ARB)
OpenGL: wglSwapIntervalEXT imported successfully


Here with the nVidia video card either with video card setting "V-Sync forced" or "Let the 3D application decide":
Code: ags
Running OpenGL: 4.5.0 NVIDIA 355.60
OpenGL: WGL_EXT_swap_control found in GL_EXTENSIONS
OpenGL: WGL_EXT_swap_control found in WGL_EXTENSIONS
OpenGL: WGL_EXT_swap_control found in WGL_EXTENSIONS (ARB)
OpenGL: wglSwapIntervalEXT imported successfully



Enabling V-Sync in Winsetup now works whatever is my setting in the video card control panel. It works with the nVidia AND the Intel card. Great !
My first game : I Want Out!

SMF spam blocked by CleanTalk