The Quick Questions Thread

Started by Laura Hunt, Thu 11/07/2019 14:03:46

Previous topic - Next topic

Laura Hunt

Have you ever had a question about AGS itself, or a small doubt that just crossed your mind, or a moment of "huh, I wonder why that is" but you didn't think it was worth opening a new topic for and you don't have any BFFs (Best Forum Friends) you can DM (i.e., pester) about it? If so, this is your thread! Hopefully!

The idea would be to post your quick, maybe obvious, maybe not super-complex questions that you think probably have a short and simple answer, in the hopes that you will learn something new -- and of course, give someone the chance to show off their AGS knowledge :-D (And if it does prove useful, maybe it'll be worth sticky-ing?)

Here are a couple that I had this week:

- What is "better"? 40 fps or 60 fps? Is there really a whole lot of difference when it comes to resource use?

- Are sound clip and audiochannel volumes always relative to the global volume? In other words, if I have my global volume set at 70 and I do Audiochannel.Volume = 40, will the volume of Audiochannel be 40, in absolute terms, or 40% of 70%?

Hope somebody finds this idea useful!

Crimson Wizard

#1
Quote from: notarobotyet on Thu 11/07/2019 14:03:46
Have you ever had a question about AGS itself, or a small doubt that just crossed your mind, or a moment of "huh, I wonder why that is" but you didn't think it was worth opening a new topic for and you don't have any BFFs (Best Forum Friends) you can DM (i.e., pester) about it?

There's also a AGS Discord server where you may ask quick questions in chat: https://discordapp.com/channels/221047797292597249

Quote from: notarobotyet on Thu 11/07/2019 14:03:46
Are sound clip and audiochannel volumes always relative to the global volume? In other words, if I have my global volume set at 70 and I do Audiochannel.Volume = 40, will the volume of Audiochannel be 40, in absolute terms, or 40% of 70%

Unfortunately this is silly, but they all are absolute values. If you want relative values you'd have to script this on your own, keep track of master volume and adjusting channels accordingly.

Privateer Puddin'

Quote from: notarobotyet on Thu 11/07/2019 14:03:46

- What is "better"? 40 fps or 60 fps? Is there really a whole lot of difference when it comes to resource use?


30 or 60. 40 is a bad default.

Laura Hunt

#3
Quote from: Crimson Wizard on Thu 11/07/2019 15:33:32
Quote from: notarobotyet on Thu 11/07/2019 14:03:46
Have you ever had a question about AGS itself, or a small doubt that just crossed your mind, or a moment of "huh, I wonder why that is" but you didn't think it was worth opening a new topic for and you don't have any BFFs (Best Forum Friends) you can DM (i.e., pester) about it?

There's also a AGS Discord server where you may ask quick questions in chat: https://discordapp.com/channels/221047797292597249

I don't really like chat though (the main reason I don't have a Discord account). Asynchronous communication ftw.


Quote from: Crimson Wizard on Thu 11/07/2019 15:33:32
Quote from: notarobotyet on Thu 11/07/2019 14:03:46
Are sound clip and audiochannel volumes always relative to the global volume? In other words, if I have my global volume set at 70 and I do Audiochannel.Volume = 40, will the volume of Audiochannel be 40, in absolute terms, or 40% of 70%

Unfortunately this is silly, but they all are absolute values. If you want relative values you'd have to script this on your own, keep track of master volume and adjusting channels accordingly.

Oh crap  :(

Well, glad I asked, I guess. I always thought they would be relative. This complicates things for me pretty badly though... So just to be sure, what you're saying is that if the player chooses to set the master/global volume at, say, 50, and I trigger a sound with volume 80, this sound with be MUCH louder than everything else, right? (this doesn't make a lot of sense to me, because how can you have sounds that are louder than the master volume?  ???)

Edit: ok, this doesn't seem to be the case. If I set the Global.Volume of my game to something ridiculous like 10 and then I trigger a sound at 60 volume, it does not play at the level I would expect an "absolute" 60 to. So it does look like clip/channel volumes are at the very least kept in check by the system volume.

Quote from: Privateer Puddin' on Thu 11/07/2019 15:44:30
Quote from: notarobotyet on Thu 11/07/2019 14:03:46
- What is "better"? 40 fps or 60 fps? Is there really a whole lot of difference when it comes to resource use?

30 or 60. 40 is a bad default.

Oh ok! Then I guess I should switch my game to 60 fps now while I still don't have too many animations. Thanks!

Crimson Wizard

#4
Quote from: notarobotyet on Thu 11/07/2019 14:03:46
- What is "better"? 40 fps or 60 fps? Is there really a whole lot of difference when it comes to resource use?

Because in AGS game and object speeds are strictly bound to FPS having higher FPS gives more precision when adjusting delays, would be walking, animation or timers.

There's no way to know beforehand how this will affect perfomance. I am not a game developer myself, but guess I would try to make 60 fps game and then provide "easy mode" for devices that cannot run that fast (if that's a problem).

morganw

Quote from: Crimson Wizard on Thu 11/07/2019 15:33:32
Quote from: notarobotyet on Thu 11/07/2019 14:03:46
Are sound clip and audiochannel volumes always relative to the global volume? In other words, if I have my global volume set at 70 and I do Audiochannel.Volume = 40, will the volume of Audiochannel be 40, in absolute terms, or 40% of 70%

Unfortunately this is silly, but they all are absolute values. If you want relative values you'd have to script this on your own, keep track of master volume and adjusting channels accordingly.

The manual implies that it is 40% of 70%:
https://adventuregamestudio.github.io/ags-manual/System.html#volume

Surely if they were absolute then the volume wouldn't change at all when this value was adjusted?

Laura Hunt

Quote from: morganw on Thu 11/07/2019 21:41:18
Quote from: Crimson Wizard on Thu 11/07/2019 15:33:32
Quote from: notarobotyet on Thu 11/07/2019 14:03:46
Are sound clip and audiochannel volumes always relative to the global volume? In other words, if I have my global volume set at 70 and I do Audiochannel.Volume = 40, will the volume of Audiochannel be 40, in absolute terms, or 40% of 70%

Unfortunately this is silly, but they all are absolute values. If you want relative values you'd have to script this on your own, keep track of master volume and adjusting channels accordingly.

The manual implies that it is 40% of 70%:
https://adventuregamestudio.github.io/ags-manual/System.html#volume

Surely if they were absolute then the volume wouldn't change at all when this value was adjusted?


It certainly seems to make more sense this way. And my (very informal) testing seems to confirm it too. This is a huge relief!

Crimson Wizard

Quote from: morganw on Thu 11/07/2019 21:41:18

The manual implies that it is 40% of 70%:
https://adventuregamestudio.github.io/ags-manual/System.html#volume

TBH I think this article does not make it fully clear.

But now I think I confused this with Game.SetAudioTypeVolume which changes actual volume of playing or future clips rather than adjust them by relative factor.

Laura Hunt

Another quick question for the thread:

Can I use dialog commands in the middle of scripted sections in a dialogue?

As in...

Code: ags
// Dialog script file
@S  
   if (boolean variable) {
   anothervariable = 1;
player: I am very confused!
   player.Walk(somewhere);
option-on 1
option-on 2 
   }

   else {
   anothervariable = 2;
player: I am even more confused!
   player.Walk(somewhere else);
option-on 3
option-on 4
   }

return


...or would I have to call run-script / dialog_request for this kind of stuff?

eri0o

Yes, you can use script in the middle of dialogs as long as they are not starting at the beginning of the line (precede with space to use scripting).

Ok, question, what's the integer limit? Can it go to 100000 (one hundred thousand)?

Laura Hunt

Quote from: eri0o on Fri 12/07/2019 13:13:20
Yes, you can use script in the middle of dialogs as long as they are not starting at the beginning of the line (precede with space to use scripting).

My question was actually the other way around :-D If I have a "scripted" section in a dialog, I want to know if I can throw those "option-on" commands inside the "if" statement / curly brackets of my scripted section.

Crimson Wizard

#11
Quote from: eri0o on Fri 12/07/2019 13:13:20
Ok, question, what's the integer limit? Can it go to 100000 (one hundred thousand)?

In AGS integers and floats are 32-bit.

Integers can be from -2147483648 to +2147483647
Floats are more complicated because it depends on precision and I could never remember how it works.


Quote from: notarobotyet on Fri 12/07/2019 13:22:41
Quote from: eri0o on Fri 12/07/2019 13:13:20
Yes, you can use script in the middle of dialogs as long as they are not starting at the beginning of the line (precede with space to use scripting).

My question was actually the other way around :-D If I have a "scripted" section in a dialog, I want to know if I can throw those "option-on" commands inside the "if" statement / curly brackets of my scripted section.

Yes, you can. All special dialog commands are actually converted into real AGS script before compiling into game.


eri0o

Thanks CW!  :-D

(I did a quirk way with enums to separate my dialogs from script, but I am way below the integer limit, so this cool :D)

Laura Hunt

#14
There goes another one!

Using VSync in fullscreen mode with Direct3D makes my characters walk and animate in general noticeably slower than when I'm not using it. Is this normal? Is VSync good for anything anyway if my game runs at 60 fps? (From what I gather, VSync limits fps to 60, so using it should not change anything... but apparently it does.)

For context, I am using large scrolling rooms (game resolution 320x200, rooms around 400x350 pixels or so) but this happens even when I move the character to a regular 320x200 room.

Edit: And since I'm here asking basic questions about graphics drivers, which is "better"? Direct3D or OpenGL? (I understand that "better" depends on context, but overall and for most average cases, which one tends to work better and give fewer issues?)

Crimson Wizard

Quote from: notarobotyet on Mon 15/07/2019 14:04:26
Edit: And since I'm here asking basic questions about graphics drivers, which is "better"? Direct3D or OpenGL? (I understand that "better" depends on context, but overall and for most average cases, which one tends to work better and give fewer issues?)

This depends on system, and I think you should ask people who publish commercial games and get lot of feedback from users.
Also this is strictly Windows question, because for example on Linux you have only OpenGL (or slower software renderer).

Laura Hunt

Quote from: Crimson Wizard on Tue 16/07/2019 00:15:32
Quote from: notarobotyet on Mon 15/07/2019 14:04:26
Edit: And since I'm here asking basic questions about graphics drivers, which is "better"? Direct3D or OpenGL? (I understand that "better" depends on context, but overall and for most average cases, which one tends to work better and give fewer issues?)

This depends on system, and I think you should ask people who publish commercial games and get lot of feedback from users.

Then I hope one of those people will stop by this thread :)

Cassiebsg

Just default it to the one you prefer, cause users will change it to fit their system/preference anyway.
In the end, just make sure your game plays nicely independently of the GD chosen.
There are those who believe that life here began out there...

Laura Hunt

#18
Is there a way to display line numbers in the Dialog editor? Sometimes when running/compiling my game after scripting or modifying something, I'll get an error like "Dialog 1(92): Error (line 92): Undefined token 'patrick' " but since dialogue lines are not numbered in the editor, it can sometimes be a challenge to find where the problem lies.

morganw

I don't think there is. Maybe this is because this editor component doesn't support line numbers (or doesn't support them without also enabling breakpoint controls - perhaps this is a separate problem), or just because no-one ever turned the line numbers on. Dialog scripts preserve leading and trailing whitespace, but maybe when dialog commands are substitued for actual script commands there is a risk of line numbers changing.

SMF spam blocked by CleanTalk