Hi,
Absolutely right. I didn't think about that, but it is none the less
true. I can use a similar example just in comparing say DirectX to
another multimedia API such as SFML.
Even though you might be programming in a language like C++ not all
APIs, (libraries,) are the same. Some are infinitely easier than
others to learn and use. That's why for argument sake I'll quickly
compare DirectX to SFML.
With Microsoft DirectX there is quite a bit you have to do to get it
fully initialized, setup, and ready to use. In DirectSound, for
example,  there is no default sound manager you can use to load wav
files into buffers. Instead you pretty much have to create your own
sound manager probably using the CSoundManager class found in the
DXUtils directory as a starting point for a sound manager that loads
and prepares a sound buffer for playback. Anyone new to programming,
and some old programmers, would agree this isn't the most user
friendly way to introduce someone to DirectSound by any means. If that
wasn't bad enough all of the DirectX examples are tied specifically to
the Win32 API which means you have to have a general working knoledge
of Windows Win32 based programs to begin with. That's ok for an old
C++ programmer like me, but it is not ok when trying to teach totally
new programmers how to use an API like DirectX.
Fortunately, there are multimedia libraries such as SFML that are much
easier to program and use. What the developer of SFML did is he made a
simple interface to various other high end APIs such as OpenGL,
OpenAL, and created a window library that creates a basic window using
the operating systems default GUI. Instead of writing several lines of
code to create a Window with the Win32 API you can do it in one line
using the sf::Window::Create() function. Similarly if you want to
create a new audio buffer just call the sf::SoundBuffer::Load()
function. The basic idea here is that the author of the SFML API
understood that something like DirectSound and OpenAL by themselves
would be confusing and complicated to a new programmer, and simplified
it as best as he could. That is why SFML stands for the Simple and
Fast Multimedia Layer.
So as Philip was saying there are vastly different levels of
programming complexity. SFML is pretty user friendly where DirectX is
a vastly more complex API to learn and use. I could probably teach
someone how to use SFML pretty easily, but I couldn't do the same for
DirectX without getting into a bunch of Windos specific WIN32 API
stuff.

HTH

On 2/16/10, Philip Bennefall <phi...@blastbay.com> wrote:
> Hi again Claudio,
>
> Thomas is absolutely right here. However, I should also mention that there
> are vastly different levels of programming complexity that one could use. If
> you used C++, for instance, you would really have to know exactly what is
> happening at every single point in your program or else you would find that
> errors were cropping up everywhere. You would need to manage memory, you
> would need to think about synchronizing different operations that are taking
> place simultaneously in what is called threads, etc etc. In short, the
> learning curve is rather steap. If you used a simplified scripting language
> like Bgt, for example, you'd be able to accomplish pretty much the same
> thing but a lot faster. You would not have quite as much control over
> exactly what is happening and would have to entrust the more difficult work
> to the engine in question. If we take Bgt as an example, it automatically
> creates several threads (e.g several tasks that are executed at once) and
> then makes sure that they synchronize with your script. This is done in
> order to take advantage of the fact that more and more computer's ship with
> multiple cores or even multiple processors. In practical terms, this means
> for example that it is updating the master timer that the entire game is
> based around even while your script might be sitting with a message box on
> the screen waiting for the user to click OK. If you used C++, you would have
> to do all of these things yourself. Then if we get into the field of sound
> playback, keyboard input etc, then we reach a point where the differences
> between a lower level language such as C++ and a high level one such as Bgt
> become even more apparent. In C++ you would need to manually take care of
> initializing the input system, getting a hold of the keyboard device,
> constantly ask it for new data so that you can react to things that are
> changing, and so on and so forth. In Bgt on the other hand, all of this
> functionality is wrapped up into two simple functions called key_down and
> key_pressed.
>
> I know that this sounds like a rather lengthy and not so subtle advertising
> attempt for Bgt, but what I'm trying to convey holds true for any high level
> scripting language; I just used Bgt as an example since you were refering to
> audio games specifically.
>
> I hope that this made some kind of sense.
>
> Kind regards,
>
> Philip Bennefall

---
Gamers mailing list __ Gamers@audyssey.org
If you want to leave the list, send E-mail to gamers-unsubscr...@audyssey.org.
You can make changes or update your subscription via the web, at
http://audyssey.org/mailman/listinfo/gamers_audyssey.org.
All messages are archived and can be searched and read at
http://www.mail-archive.com/gam...@audyssey.org.
If you have any questions or concerns regarding the management of the list,
please send E-mail to gamers-ow...@audyssey.org.

Reply via email to