MAC problems (setfont and mp3 as sample)

Report any Hollywood bugs here
Bugala
Posts: 1178
Joined: Sun Feb 14, 2010 7:11 pm

MAC problems (setfont and mp3 as sample)

Post by Bugala »

I am using Hollywood 5.3

I dont know if these are bugs or not, but:

setfont("times", 40) was the line that failed in my MAC exe. it worked fine on PC.

Similarly @SAMPLE "file.mp3" worked fine on PC.exe, but MAC.exe failed.

Is this supposed to be so, and is there way around it, the setfont issue mainly. Its not difficult to change samples into AIFF or something instead, but what about the font issue?
User avatar
airsoftsoftwair
Posts: 5446
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: MAC problems (setfont and mp3 as sample)

Post by airsoftsoftwair »

Is "Times" supposed to be a bitmap font or TrueType font?

Have you tried the MP3 with the avcodec.hwp plugin?
Bugala
Posts: 1178
Joined: Sun Feb 14, 2010 7:11 pm

Re: MAC problems (setfont and mp3 as sample)

Post by Bugala »

"times", no idea. I just once used your example code from manual, and have been using it since.

And no plugins were used. I specifically avoided that since i wanted one big exe file.
User avatar
airsoftsoftwair
Posts: 5446
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: MAC problems (setfont and mp3 as sample)

Post by airsoftsoftwair »

Have you checked that your Mac OS installation actually has a font named "Times" installed?
Bugala
Posts: 1178
Joined: Sun Feb 14, 2010 7:11 pm

Re: MAC problems (setfont and mp3 as sample)

Post by Bugala »

No idea, I actually thought that was one of the Hollywoods includes as it was on that example.

But i guess, that is the problem. But what about the cant play MP3s as samples? It did accept them as musics, but not as samples? Is this supposed to be so?
User avatar
airsoftsoftwair
Posts: 5446
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: MAC problems (setfont and mp3 as sample)

Post by airsoftsoftwair »

No, Times font isn't included with Hollywood. Only the Bitstream fonts.

It should be possible to load MP3s as samples but keep in mind that samples are loaded entirely in memory, so you wouldn't want to load anything longer than a few seconds into memory. If you try to load a 4 minute MP3 into memory as a sample, it can easily eat up 50 megabyte. The rule of thumb is that musics should be used for background music while samples should be used for short sounds (e.g. sound effects when a sprite hits something, dies etc.)
Bugala
Posts: 1178
Joined: Sun Feb 14, 2010 7:11 pm

Re: MAC problems (setfont and mp3 as sample)

Post by Bugala »

To be more clear about this.

So if i use @SAMPLE command at beginning, they wont be laoded when needed, but they will be taking memory right from beginning of executing the program?

While using @MUSIC they will occupy the space only when they are being played?


I am also having one specific question regarding this. For I have this short game I am about to release. It has speech samples and background music. Most of time they are not played at same time, but there are couple of places.

So should i perhaps load them all as music instead and play them as music, and is it possible to play two musics at same time?

My main question about this is because I am planning to have special version for Classic Amigas in which I am using Wavs, and as MP3s the total size was about 25 Mbs, but with Wavs I think ti iws closing 150 Mb, and if it laods all those samples in memory, I guess demand might be closing 128 Mb then, maybe even passing it, and that would be bit of a problem for classics i think. I was hoping more of closer to 8 Mb memory need so far.
User avatar
airsoftsoftwair
Posts: 5446
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: MAC problems (setfont and mp3 as sample)

Post by airsoftsoftwair »

Bugala wrote:To be more clear about this.

So if i use @SAMPLE command at beginning, they wont be laoded when needed, but they will be taking memory right from beginning of executing the program?
Yes, this is generally the case with things loaded at preprocessor time. The exception being @MUSIC, @VIDEO, and @ANIM if "FromDisk" is set to TRUE.
While using @MUSIC they will occupy the space only when they are being played?
Yup.
So should i perhaps load them all as music instead and play them as music
Depends on how long they are. I'd say that everything longer than 5 seconds is better played as a music. Samples are best used as short sound effects that need to be played instantly, e.g. in a shoot em up. There's almost no lag when playing samples because they have been completely prebuffered in memory. When playing musics, there might be a small delay between PlayMusic() and the time the music will play.
and is it possible to play two musics at same time?
Yes, but this requires Hollywood 6.0.
Bugala
Posts: 1178
Joined: Sun Feb 14, 2010 7:11 pm

Re: MAC problems (setfont and mp3 as sample)

Post by Bugala »

Oh, and all this time I had thought everything is loaded to memory as needed and was aiming for a one single big .exe file.

But i guess if i make an exe file size of 1 Gb, that basically means it requires 1 Gb of memory to run.

Okay, have to change that filosophy and check which way it is best to do. Also have to check that FromDisk=true thing.
Bugala
Posts: 1178
Joined: Sun Feb 14, 2010 7:11 pm

Re: MAC problems (setfont and mp3 as sample)

Post by Bugala »

is this "FromDisk" setting only available from Hollywood 6 on?

For I see in documentation this option mentioned only in @ANIM, and when i tried adding {fromdisk=true} after using @MUSIC, it says: "...Unknown tag "fromdisk"!"
Post Reply