Wrecked Games

Please login or register.

Login with username, password and session length
Advanced search  

News:

We're just that awesome.

Pages: 1 ... 3 4 [5] 6 7 ... 14

Author Topic: Wrecked Games Engine (WGE)  (Read 52574 times)

pjcast

  • Administrator
  • Veteran
  • *****
  • Karma: +1/-0
  • Posts: 2661
    • View Profile
    • http://www.wreckedgames.com
Wrecked Games Engine (WGE)
« Reply #60 on: April 09, 2006, 02:50:14 PM »

Awesome. I will update immediately.

Since, I am kinda tired of binding stuff, and need a break, I will begin working on the OggCodecs, TheoraCodec, VorbisCodec, StrOggCoded (need to finsish StrOgg first - will probably be done later).

Bascially, for an Ogg file (either video or audio), you pass it to
OggCodec::load(DataStreamptr)
It would create the TheoraCodec/VorbisCodec/StrOggCodec based on what streams are inside of the ogg file. If the video contained only video, than no sound class would be created. If it contained only audio, an audio class would be created.

We need a common Codec base class, that would have a load( datastreamptr ) and update().

The AvManager should contain the exposed play, seek, close, etc methods of SoundSystem. The end user should never see the SoundSystem pointer. makes things easier.The AvManager hides all the details, and treats all video/audio the same basically. Creates it, loops through it, and calls an Codec::update method (from a AvManager::update class). this allows the codec's to be threaded, and gives them a chance to syncronize with the main thread.

Anyway, i will code up the base class codec, and the ogg codecs.
Logged

mysterycoder

  • Administrator
  • Veteran
  • *****
  • Karma: +0/-0
  • Posts: 447
    • View Profile
Wrecked Games Engine (WGE)
« Reply #61 on: April 09, 2006, 03:36:51 PM »

Well now I'm using a combination of the two methods, it is working very well  :D
The only change you have to make is to make your function take in an int instead of an enum.
And then you bind the enum like this:

Code: [Select]

constant((int)OpenAl, "OpenAl").
constant((int)FMOD, "FMOD").
constant((int)Theora, "Theora").


Now in the script you can simply call:

Code: [Select]

::Av.initialiseSoundSystem(::Av.OpenAl);


Instead of:

Code: [Select]

::Av.initialiseSoundSystem(0);


which is much more error-prone, and less user friendly  :D
I've updated and commited this now.
Logged

pjcast

  • Administrator
  • Veteran
  • *****
  • Karma: +1/-0
  • Posts: 2661
    • View Profile
    • http://www.wreckedgames.com
Wrecked Games Engine (WGE)
« Reply #62 on: April 09, 2006, 03:40:07 PM »

Ok, good idea. Changing to enums is definately better in most cases.

Also, I modified the UML, to what I think is a little bit clearer on how it should be done. I am not very skilled with UML, so I may have used the wrong symbols. Also, I am not quite sure how AudioDriver fix in yet. Just, the Specific sound system (openal or fmod for example) would actually implement that class. For further clarification, the CEGUI_TheoraDemo is basically a simple version of this. Allowing sound plugins, and a unified base for the codecs to communicate (the codecs use the Audio Driver to signal seeks, or what not). But mostly, the Audio Driver uses the base codec class (or will, to grab PCM data out of a RingBuffer).
Logged

pjcast

  • Administrator
  • Veteran
  • *****
  • Karma: +1/-0
  • Posts: 2661
    • View Profile
    • http://www.wreckedgames.com
Wrecked Games Engine (WGE)
« Reply #63 on: April 09, 2006, 03:44:17 PM »

Perhaps you could jump onton IRC if you have time?
Logged

mysterycoder

  • Administrator
  • Veteran
  • *****
  • Karma: +0/-0
  • Posts: 447
    • View Profile
Wrecked Games Engine (WGE)
« Reply #64 on: April 09, 2006, 03:46:04 PM »

Thats much more clear  :shock:. I'm not very good at Uml  :wink:. Now that we can use enums, is the proxy class necsisary? I'm not quite sure what you do in the code, but the comment says something about it being necsisary because we can't bind enums.
Logged

mysterycoder

  • Administrator
  • Veteran
  • *****
  • Karma: +0/-0
  • Posts: 447
    • View Profile
Wrecked Games Engine (WGE)
« Reply #65 on: April 09, 2006, 03:47:16 PM »

Here, give me a couple of minutes to finish my homework, and I'll be able to be on irc most of the night. btw, know of any good irc clients?
Logged

pjcast

  • Administrator
  • Veteran
  • *****
  • Karma: +1/-0
  • Posts: 2661
    • View Profile
    • http://www.wreckedgames.com
Wrecked Games Engine (WGE)
« Reply #66 on: April 09, 2006, 03:48:04 PM »

The Proxy class is still useful, as, It is not really a proxy class anymore. It now has an added id memebr, and is just an event structure for Action Mapping. Check InputCfg on it's usage.

Did you see my post above?
Logged

pjcast

  • Administrator
  • Veteran
  • *****
  • Karma: +1/-0
  • Posts: 2661
    • View Profile
    • http://www.wreckedgames.com
Wrecked Games Engine (WGE)
« Reply #67 on: April 09, 2006, 03:48:51 PM »

hehe.. hard to chat in a forum, always missing posts. :)

I use VisualIRC, good, free, rock solid. mIRC is for chumps.

http://www.visualirc.net/download.php
Logged

mysterycoder

  • Administrator
  • Veteran
  • *****
  • Karma: +0/-0
  • Posts: 447
    • View Profile
Wrecked Games Engine (WGE)
« Reply #68 on: April 09, 2006, 03:51:11 PM »

Oh, and on the Uml, I think that the flac codec would also be created by the oggcodec, its a part of the vorbis technologies, and I think would fit in well. I would edit the xml, but I don't know how to use Creators that have the "Multiple" property set. And I don't want to screw up your pretty graph  :)
Logged

pjcast

  • Administrator
  • Veteran
  • *****
  • Karma: +1/-0
  • Posts: 2661
    • View Profile
    • http://www.wreckedgames.com
Wrecked Games Engine (WGE)
« Reply #69 on: April 09, 2006, 03:55:08 PM »

Hehe. Ok, no problem messing with the UML. I just used the toolbar and creates single to each item.

Ah, ok, if flac is in an ogg file, then the OggCodec can create it. One thing I noticed, The Various subcodecs (ie Vorbis/Theora/and Flac then I guess), do not need to inhierit from the Codec class (but they are still codecs). Becuase, the OggCodec master class will be decoding the ogg packets from the Ogre::DataStream and sending the subclasses OggPackets.
Logged

mysterycoder

  • Administrator
  • Veteran
  • *****
  • Karma: +0/-0
  • Posts: 447
    • View Profile
Wrecked Games Engine (WGE)
« Reply #70 on: April 09, 2006, 03:59:31 PM »

Well there's a problem  :(, a flac can either be in an ogg container or in the raw flac format. http://flac.sourceforge.net/ogg_mapping.html

btw, for Visual IRC which server do I choose?
Logged

pjcast

  • Administrator
  • Veteran
  • *****
  • Karma: +1/-0
  • Posts: 2661
    • View Profile
    • http://www.wreckedgames.com
Wrecked Games Engine (WGE)
« Reply #71 on: April 09, 2006, 04:02:39 PM »

Ok, I just read up on flac. Seems there are two versions of Flac.

One, "native" flac, is a single file that contains flac data - ie. it is not in any type of container (ie avi, ogg).

The other kind is "Ogg Flac", the Flac part is the same, only contained in an Ogg container file. This is mainly for use with multiplexing (multiple streams interweaved for video playing for example)

So, the way to deal with Flac would be two fold - Have One FlacCodec class. It will derive from the Codec class for native playing. And, implement the load(datastream) and update(). It will also implement the other method of giving it data - pumping in Oggpackets. not sure how to do this yet, but shouldn't be that difficult. Just two code paths that do almost the same thing.
Logged

mysterycoder

  • Administrator
  • Veteran
  • *****
  • Karma: +0/-0
  • Posts: 447
    • View Profile
Wrecked Games Engine (WGE)
« Reply #72 on: April 09, 2006, 04:10:18 PM »

Good idea  :D , maybe you missed that part of my post, but any info on the irc, server, channel, etc? I 'm done with my homework, so I should be able to work on it now.
Logged

pjcast

  • Administrator
  • Veteran
  • *****
  • Karma: +1/-0
  • Posts: 2661
    • View Profile
    • http://www.wreckedgames.com
Wrecked Games Engine (WGE)
« Reply #73 on: April 09, 2006, 04:11:55 PM »

irc.freenode.net #wge

I made a seperate thread earlier. gues you missed it :)
Logged

mysterycoder

  • Administrator
  • Veteran
  • *****
  • Karma: +0/-0
  • Posts: 447
    • View Profile
Wrecked Games Engine (WGE)
« Reply #74 on: April 09, 2006, 04:16:10 PM »

Yup I missed it, I'll go log on  :)
Logged
Pages: 1 ... 3 4 [5] 6 7 ... 14