[03 Oct 2008] Some questions...

Contains all messages from the Hollywood mailing list between 01/2006 and 08/2012
Locked
User avatar
Allanon
Posts: 742
Joined: Sun Feb 14, 2010 7:53 pm
Location: Italy
Contact:

[03 Oct 2008] Some questions...

Post by Allanon »

Note: This is an archived post that was originally sent to the Hollywood mailing list on Fri, 03 Oct 2008 15:04:15 -0000

Hello Andreas, I've some questions for you ^^

- An user with OS4 has reported that after quitting HFinder launched from RAM: the ram device results locked, I've no idea how to check this issue, but maybe is something related with the Hollywood VM since it should release all resources before exiting.

- I'm coding a simple puzzle game and sometimes pop up a message saying that there are no more sound channels to play the sample (or something similar :) ), I'm wondering if I have to free the channel manually with StopSample() or the channel is freed by the system after it has been played. When the error occurs there are only a module playing and some effects played when the user click some areas.

- I've not understood well how aplha channel works with brushes, I was used to have functions with an alpha value that control the global transparency of the brush, but how can I do this in Hollywood? For example, if I have a brush and I want to fade in or out manually, without the pre-made transition fx, how can I do? Can you post a simple example?

Thank you in advance Fabio
----------------------------
[Allanon] Fabio Falcucci | GitHub (leaving) | Gitea (my new house) | My Patreon page | All my links
User avatar
airsoftsoftwair
Posts: 5834
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

[03 Oct 2008] Re: Some questions...

Post by airsoftsoftwair »

Note: This is an archived post that was originally sent to the Hollywood mailing list on Fri, 03 Oct 2008 22:13:31 +0200
Hello Andreas, I've some questions for you ^^

- An user with OS4 has reported that after quitting HFinder launched from RAM: the ram device results locked, I've no idea how to check this issue, but maybe is something related with the Hollywood VM since it should release all resources before exiting.
Hmm, weird. Back in April, Zoltan reported a similar issue but I was not able reproduce it and didn't mention it again. Can you ask the user for a complete bug report? I need to know what he's doing *exactly* - step by step. It's definitely a Hollywood issue because nothing should be left locked when Hollywood exists but I need to be able to reproduce it here, otherwise I don't know where to start looking.

Maybe Lazi could also comment on this issue? Did you resolve the problem you reported to me in April 2008?
- I'm coding a simple puzzle game and sometimes pop up a message saying that there are no more sound channels to play the sample (or something similar :) ), I'm wondering if I have to free the channel manually with StopSample() or the channel is freed by the system after it has been played. When the error occurs there are only a module playing and some effects played when the user click some areas.
No, you don't have to call StopSample(). Hollywood will automatically the sample's channel once it has finished.

Under AHI, however, there is a limit of 7 samples at the same time. But I suppose you don't have so many samples playing, so it's weird that you get this error. What version are you on? MorphOS? OS3?
- I've not understood well how aplha channel works with brushes, I was used to have functions with an alpha value that control the global transparency of the brush, but how can I do this in Hollywood? For example, if I have a brush and I want to fade in or out manually, without the pre-made transition fx, how can I do? Can you post a simple example?
There are lots of different way to do this. If layers are on, you can simply call SetLayerTransparency() a number of times to fade in/out.

If you're working without layers, you could create a second brush that contains the background and then mix the background brush with the foreground brush a number of times using MixBrush().

If the background is a static color, you do not have to use MixBrush() at all. You could simply use TintBrush() in that case.

If you want to use alpha channels, you can call SelectAlphaChannel() on your brush and then use Cls() a number of times to set a global alpha value.

The basic idea behind fading is to increase the visibility of the brush. Just iterate over a loop from 0 to 255 and make the brush more and more visible (0 = invisible, 255 = visible).
User avatar
Allanon
Posts: 742
Joined: Sun Feb 14, 2010 7:53 pm
Location: Italy
Contact:

[09 Oct 2008] Re: Some questions...

Post by Allanon »

Note: This is an archived post that was originally sent to the Hollywood mailing list on Thu, 09 Oct 2008 15:07:18 -0000
Hmm, weird. Back in April, Zoltan reported a similar issue but I was not able reproduce it and didn't mention it again. Can you ask the user for a complete bug report? I need to know what he's doing *exactly* - step by step. It's definitely a Hollywood issue because nothing should be left locked when Hollywood exists but I need to be able to reproduce it here, otherwise I don't know where to start looking.

Maybe Lazi could also comment on this issue? Did you resolve the problem you reported to me in April 2008?
I've asked the user a complete bug report.
No, you don't have to call StopSample(). Hollywood will automatically the sample's channel once it has finished.

Under AHI, however, there is a limit of 7 samples at the same time. But I suppose you don't have so many samples playing, so it's weird that you get this error. What version are you on? MorphOS? OS3?
I'm developing and testing under OS3 and not, I ahouldn't have 7 samples at the same time playing, but there is a module playing during the game. About the sample playing I'm assuming that Hollywood allocate dinamically the channels to use, if so, if I play the same sample 4 consecutive times Hollywood should allocate 4 channels 1 for each "PlaySample" execution... Maybe you can improve the "PlaySample" command adding one more parameter to specify manually the channel to use, in this way the programmer has more control and can handle channels better, for example in my case I can assign the sound used for the left mouse click to the channel 1, so if the player clicks like a crazy the LMB don't launch a thousand of samples at the same time but only one at a time, so in this case only the last one "PlaySample" execution will play the sample entirely.

Another suggestion for a future Hollywood release is related to the mouse pointer: can you give the ability to link the mouse pointer with a Sprite? In this way we can use custom mouse pointer with alpha channels and more colorfull than the standard 4 colors pointer. I've tried to make some routines to do this task but is very CPU intensive keep updated a sprite with the mouse coordinates, especially during FX transitions.

Regards, Fabio
----------------------------
[Allanon] Fabio Falcucci | GitHub (leaving) | Gitea (my new house) | My Patreon page | All my links
User avatar
airsoftsoftwair
Posts: 5834
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

[10 Oct 2008] Re: Re: Some questions...

Post by airsoftsoftwair »

Note: This is an archived post that was originally sent to the Hollywood mailing list on Fri, 10 Oct 2008 00:22:43 +0200
I've asked the user a complete bug report.
Ok. Are you using WAVE files in HFinder? This would explain everything because I've just discovered a bug in Hollywood 3.1 which left open WAVE streams. This was what caused the issue reported by Zoltan some months ago.

So if you're using WAVE files in HFinder consider the bug fixed. If you are not using WAVE files, then we still have to find out what's wrong there.
I'm developing and testing under OS3 and not, I ahouldn't have 7 samples at the same time playing, but there is a module playing during the game. About the sample playing I'm assuming that Hollywood allocate dinamically the channels to use, if so, if I play the same sample 4 consecutive times Hollywood should allocate 4 channels 1 for each "PlaySample" execution... Maybe you can improve the "PlaySample" command adding one more parameter to specify manually the channel to use, in this way the programmer has more control and can handle channels better, for example in my case I can assign the sound used for the left mouse click to the channel 1, so if the player clicks like a crazy the LMB don't launch a thousand of samples at the same time but only one at a time, so in this case only the last one "PlaySample" execution will play the sample entirely.
Sounds reasonable. I'll see what I can do.
Another suggestion for a future Hollywood release is related to the mouse pointer: can you give the ability to link the mouse pointer with a Sprite? In this way we can use custom mouse pointer with alpha channels and more colorfull than the standard 4 colors pointer. I've tried to make some routines to do this task but is very CPU intensive keep updated a sprite with the mouse coordinates, especially during FX transitions.
This is planned.
User avatar
Allanon
Posts: 742
Joined: Sun Feb 14, 2010 7:53 pm
Location: Italy
Contact:

[10 Oct 2008] Re: Some questions...

Post by Allanon »

Note: This is an archived post that was originally sent to the Hollywood mailing list on Fri, 10 Oct 2008 07:39:18 -0000
Ok. Are you using WAVE files in HFinder? This would explain everything because I've just discovered a bug in Hollywood 3.1 which left open WAVE streams. This was what caused the issue reported by Zoltan some months ago.

So if you're using WAVE files in HFinder consider the bug fixed. If you are not using WAVE files, then we still have to find out what's wrong there.
Nope, I don't use sounds in HFinder at all.
Sounds reasonable. I'll see what I can do.
Thank you :)
This is planned.
Great, thanks again!

Fabio
----------------------------
[Allanon] Fabio Falcucci | GitHub (leaving) | Gitea (my new house) | My Patreon page | All my links
User avatar
airsoftsoftwair
Posts: 5834
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

[10 Oct 2008] Re: Re: Some questions...

Post by airsoftsoftwair »

Note: This is an archived post that was originally sent to the Hollywood mailing list on Fri, 10 Oct 2008 21:40:06 +0200
Nope, I don't use sounds in HFinder at all.
Ok, then please ask your user for a detailed bug report so we can track this down. Hollywood must leave some resource open but it is impossible to track this down without some hints :)
Locked