Please login or register.

Login with username, password and session length
Advanced search  

News:

This forum provides RSS feed. To query recent posts use this url. More...


Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - metamorphium

Pages: 1 ... 96 97 [98] 99 100 ... 102
1456
Technical forum / Re: music crossfader
« on: February 03, 2005, 02:08:56 PM »
It doesn't look good to me at all :)

You are feeding always 1st channel. To crossfade efficiently, you have to feed two different channels and then crossfade them.

Like:
Code: [Select]
Game.PlayMusicChannel(1, "muziek\bibliotheek.wav", true);
Game.PlayMusicChannel(2, "muziek\bibliotheek.wav", true);
Game.MusicCrossfade(1,2,10000);

This is untested, I don't have WME here, but you get the idea. :)

1457
Technické fórum / Re: zvuk v mistnosti
« on: January 30, 2005, 06:54:06 PM »
Do scene_init.script u konkretni sceny dej neco jako:

Code: [Select]
if (!Game.IsMusicPlaying())
{
  Game.PlayMusic("hudba.ogg",true,0);
}


jde to spoustou ruznych cest, ale tohle Ti do zacatku bude stacit...

Jinak si prostuduj v helpu Game objekt. Je tam vsechno krasne popsane.  ::beer

1458
Technical forum / Re: Hiding the inventory
« on: January 26, 2005, 06:27:11 PM »
Checkout this in data/scripts/game_daemon.script

Code: [Select]
// display the inventory window
  if(Game.Interactive && Game.MouseY < 45 && !Game.ResponsesVisible && !WinMenu.Visible) Game.InventoryVisible = true;
  else if(Game.MouseY > 100 || Game.ResponsesVisible || !Game.Interactive) Game.InventoryVisible = false;


1459
Technical forum / Re: Compiled project only works in Debug mode?
« on: January 22, 2005, 06:20:42 PM »
This is most probably problem with pathes.

Check the following:

1, if you have all images and graphics in your project folder and not referencing outside. Usually you should have everything in Data folder unless you choose promote to package of another.
2, check that you use pathes relatively to data folder structure.  So to access screne folder inside of datas you use "scene/room" not "data/scene/room".

Let me know if that helps.

Debug mode is more *forgiving* in some ways.

1460
But if I added VP3 codec to my game installation package, I can obviously use PlayVideo of WME. So there's not reason to use mplayer anymore. Or am I missing something? The only reason I went with mplayer was the lagal issue. Our problem was different though. You can use those codecs commercially OUTSIDE US. So this way our lawyer was right because our product never crossed US borders...

This should work just fine. The only minor issue I'm thinking is that some people might not want to install another DirectShow filter... Not important imo.

I'm not so sure about the legality of using those codecs inside europe... I don't know anything about this matter but the fact that many servers in europe refuse to store such executables might say something (or not). There are different laws in each country.

PS. It seems like you think I'm from US (maybe it's just my opinion). Well, I'm not. Europe is my home-land.  ;)

 ;D Funny, but I know where are you from. Where did you get this impression from?  :) DShow filter will be installed by installer automatically. I was speaking about US because the patent madness is there unlike in Europe in full range. We here in Europe (especially in EU) will unfortunately soon keep in line with this. This is the main reason why even in Europe some servers refuse to store datas like this. Anyway since my problem is somehow solved for now with VP3, I can safely erase my dll library with this ugly hack from my computer.

 ::beer and one for odnorf:  ::beer
 ;D

1461
Well, I am not a lawyer and this was, what I've been told. But from what I've just read it seems that you're right and I have finally some reason to hate you. ;D On the other hand this issue is problem only in USA now. I wonder when our sweet EU copies this though.

So I am now pretty depressed and will do just this:  ::beer ::beer ::beer ::beer ::beer ::beer ::beer

Hey and what about VP3? http://www.theora.org/theorafaq.html#24

Oops... I'm sorry about that  ;)
If you don't plan to release your game in the next months then you can still wait for theora to reach v1.0 and release some libraries that could make the job of adding theora support to wme much easier.

It's perfectly legal to use the VP3 codec in any application you want, even if you plan to sell it. Thank the xiph.org guys for this  ;)

But... there is an obvious solution for your mplayer method. Just use theora and remove ALL the other codecs.  ;D ;D ;D

But if I added VP3 codec to my game installation package, I can obviously use PlayVideo of WME. So there's not reason to use mplayer anymore. Or am I missing something? The only reason I went with mplayer was the lagal issue. Our problem was different though. You can use those codecs commercially OUTSIDE US. So this way our lawyer was right because our product never crossed US borders...

1462
Again you are not completely correct. :) Mplayer has its own MPEG4 codec which is not under patents. I forgot to mention though that you must recompile mplayer WITHOUT all licensed codecs. (So put away DivX and MPEG 2) And also you need to add your modified source of mplayer to your product so you won't violate GPL. I have this confirmed by lawyers so I trust them in this issue. Otherwise I won't even bother with writing that dll. We used this codec for our software which ran during World Ice Hockey Championship in Sazka Arena and therefore we have confirmed its legality of usage.

I hope you are right but... as far as I know you can't develop a MPEG4 codec without using patents. That's why you won't find any executables at the xvid site. It's like trying to write an MP3 codec without using patents. Impossible. Is the lawyer you ask specialized in the patent area? Because the problem here is not about licenced codecs BUT the patents. Has your laywers run a patent search on the specific codecs you want to use?

Well, I am not a lawyer and this was, what I've been told. But from what I've just read it seems that you're right and I have finally some reason to hate you. ;D On the other hand this issue is problem only in USA now. I wonder when our sweet EU copies this though.

So I am now pretty depressed and will do just this:  ::beer ::beer ::beer ::beer ::beer ::beer ::beer

Hey and what about VP3? http://www.theora.org/theorafaq.html#24

1463
I disagree with odnorf though - it was the only solution without paying $2000 for commercial codecs. If Microsoft ever fix this (looks like DirectX issue to me) I am going to use it, because it gives many posibilities including multi language subtitles and whatever. And dll itself was very elegant. It is sufficient to call one function with video file as a parameter. That's all.

Good to know it's working now. But the most serious problem is that it is actually illegal to distribute an executable of mplayer, especially if you want to sell your game. Mplayer's code is covered by MANY patents (mpeg ones for example) and you can't really use it except for personnal use.

But ... of course any better solutions would be greatly appreciated. *wink* at odnorf...

I'm afraid that the only solution right now that is elegant and 100% legal is to wait for theora codec to reach status 1.0 so that Mnemonic can add it to the wme just like he did with vorbis.

Again you are not completely correct. :) Mplayer has its own MPEG4 codec which is not under patents. I forgot to mention though that you must recompile mplayer WITHOUT all licensed codecs. (So put away DivX and MPEG 2) And also you need to add your modified source of mplayer to your product so you won't violate GPL. I have this confirmed by lawyers so I trust them in this issue. Otherwise I won't even bother with writing that dll. We used this codec for our software which ran during World Ice Hockey Championship in Sazka Arena and therefore we have confirmed its legality of usage.

1464
Software and games / Re: Bad Brain to publish Project Joe
« on: January 13, 2005, 04:35:01 PM »
Whoops, got a bit too excited there... :-X

something starts to smell there. Where are they going to take money apart of all those promised releases? *woowoo* claxon starts to ring in my ear. :)

1465
but what about the ugly hack for mplayer ???? what does it and why ???

Metamorphium did this. He calls mplayer.exe (it's a movie player) from inside wme to play a movie. It's not really elegant and I wouldn't suggest it to anyone.

There is no ugly hack anymore. It doesn't work even with it. Problem is that if you run your game in the same resolution as your desktop is (including bpp) sometimes WME is not able to minimize itself. Unless Microsoft repairs it, I don't suggest this to anyone.

I disagree with odnorf though - it was the only solution without paying $2000 for commercial codecs. If Microsoft ever fix this (looks like DirectX issue to me) I am going to use it, because it gives many posibilities including multi language subtitles and whatever. And dll itself was very elegant. It is sufficient to call one function with video file as a parameter. That's all.

Also my brother wrote a mplayer patch which makes it decode data into network socket, so maybe this would be the way how to get this directly into WME without need of minimalization.

But ... of course any better solutions would be greatly appreciated. *wink* at odnorf...

1466
Mnemonic, please explain :)
If your game references for example "filename.wav", the engine first looks if "filename.ogg" exists, and if it does, it's used instead. So, you have to use an extension, but if you always use .wav, you can replace the files later with Ogg compressed ones and you don't need to modify your code.
In other words, you are right the file type parameter is not necessary.

Oh. I haven't known that. Thanks for info. I think everyone should be able to put away the Filetype parameter from code though. :)


1467
Scripts, plugins, utilities, goodies / Dynamic background sounds in WME
« on: January 11, 2005, 10:33:07 PM »
Ever wanted to have random background sound effects in your game? Here's something to get you started.

First some concept:

Make in your sounds directory some subdirectory (mine is called animals) and fill it with group of filenames like this for example:
snd1.ogg
snd2.ogg
snd3.ogg
etc.

then create file Sound_daemon.script (in scripts) which will read following:

Code: WME Script
  1. method Initialize(group,range,minfreq,maxfreq,volume)
  2. {
  3.  
  4.                 //sound group is the path+filename without number
  5.                 this.SD_sound_group = group;
  6.        
  7.                 //How many sounds are in the group?          
  8.                 this.SD_range = range;
  9.                
  10.                 // Minimum time which should pass from the last occurence
  11.                 this.SD_minfreq = minfreq;
  12.                
  13.                 // Maximum time which should pass from the last occurence
  14.                 this.SD_maxfreq = maxfreq;
  15.                 // Group volume
  16.                 this.SD_volume = volume;
  17.  
  18.                 this.infinite = true;
  19. }
  20.  
  21. method Done()
  22. {
  23.         this.infinite = false;
  24. }
  25.  
  26. method RunDaemon()
  27. {
  28.   this.AttachScript("scripts/sound_daemon_body.script");
  29. }
  30.  

and also create file scripts/sound_daemon_body.script

Code: WME Script
  1.         this.entity = Game.CreateEntity();
  2.         while(this.infinite)    {
  3.  
  4.                 // First wait for the random ammount of time from range
  5.         var wait = Random(this.SD_minfreq,this.SD_maxfreq);
  6.         Sleep(wait);
  7.  
  8.                 var ent = this.entity;
  9.                
  10.                 if (!ent.IsSoundPlaying()) // better sound not playing now.
  11.                 {       
  12.                         ent.SetSoundVolume(this.SD_volume);
  13.  
  14.                         var t = Random(1,this.SD_range); //grab random sound
  15.                         var fname= "sounds/" + this.SD_sound_group + t+ ".wav";
  16.                         ent.PlaySound(fname, false);
  17.                 }
  18.        
  19.                 Sleep(20);
  20.         }
  21.  
  22.   Game.DestroyEntity(this.entity); // destroy our entity so we won't mess our memory.
  23.  
  24.  

then make some global variables and assign objects to them. I put it into game.script this:

Code: WME Script
  1. SD_layer1 = new Object("scripts\sound_daemon.script");
  2. SD_layer2 = new Object("scripts\sound_daemon.script");
  3. SD_layer3 = new Object("scripts\sound_daemon.script");
  4.  

note that you can have as much background sound layers as you want.

Last step is to put into scene_init.script

Code: WME Script
  1. SD_layer1.Initialize("animals/snd",7,6000,12000,40);
  2. SD_layer1.RunDaemon();
  3.  

what does it mean?
 
"animals/snd" is the group filename. (snd1, snd2 ... snd7 in my case)
7 is number of group members (7 files)
6000 is minimum time needed for Random (it's in miliseconds)
12000 is maximum time needed for Random (it's in miliseconds)
(those two parameters are specifying borders in which sound can happen)
40 is volume


When you want to stop sound_daemon, just send
Code: WME Script
  1. SD_layer1.Done();
  2.  

In my test run I had three layers created this way. I have background crickets with pretty often occurence.
second layer are 7 different chirping birds more rarely.
and last layer is faint whispering hearing very rarely.

I think you will find your own application for this simple object.

Huge thanks goes to Mnemonic and Jerrot!


EDITED: for my stupid and silly mistake I made...
EDITED: put away filetype. See below.


1468
Technical forum / Re: Subtitles && localization problems
« on: January 09, 2005, 12:27:01 PM »
Use the SubtitlesWidth attribute to set the desired width. By default WME uses quarter of the screen width (I think..).

*sigh* It's of course in documentation. Sorry for stupid question, I'll try to be more careful next time.  :-[

But thanks!

1469
Technical forum / Re: Subtitles && localization problems
« on: January 08, 2005, 11:20:14 PM »
Okay,

second issue resolved. There must be [tab] between ID_String and Text used as a separator.

Second is still uclear though.

1470
Technical forum / Subtitles && localization problems
« on: January 08, 2005, 11:09:20 PM »
Hi muters,

I ran into two problems. First one:

I have 1024x76 resolution with following settings:

actor.SubtitlesPosRelative = false;
actor.SubtitlesPosY = 750;
actor.SubtitlesPosX = 512;
actor.SubtitlesPosXCenter = true;

This should center my subtitles to lower part which it does. But it uses lots of multiline. Is there a posibility to use much wider part of the screen for subtitles?


Second one:

I am using translator capabilities of WME. Strangely enough it works only half way:

I have this:

GAME001001  At least there are lots of windows and glass here.
GAME002007  To je ale pekna blbost!

In the first case calling
actor.Talk("/game001001/Cokoliv."); Works
In the second case calling
actor.Talk("/game002007/Cokoliv.");
still prints "Cokoliv.".

Is there something I'm missing here?

Thanks a lot for help

Jan

Pages: 1 ... 96 97 [98] 99 100 ... 102

Page created in 0.098 seconds with 24 queries.