Page 2 of 3 FirstFirst 123 LastLast
Results 11 to 20 of 30

Thread: Which libs to use ?

  1. #11

    Which libs to use ?

    Quote Originally Posted by savage
    I think OpenGL works well with JEDI-SDL, but then I am probably biased about that. For sound you could use OpenAL, though SDL_Mixer ( also part of JEDI-SDL ) is another alternative.
    For graphics and input I would recommend SDL for crossplatform, maybe even with OpenGL support... For audio however I would stay far far away from SDL_Mixer... We used SDL_Mixer in the very first version of the Audio part of the Basilisk Engine and we ran into a lot of problems, especially considering the music playback, the SoundFX itself (as far as I can remember) was quite okay. After trying out a lot of libraries we ended up with OpenAL and I must admit we are very happy with it.

    OpenAL works with (as far as there are sound drivers present) all soundcards as far as I am aware of. You can see OpenAL more or less as a wrapper library than a library itself, it wraps different sound libraries for different platforms into one standardized library. In Windows you have the choice between the default windows sound drivers (WinMM) or the DirectSound drivers and I noticed on the OpenAL website that there are even a few more drivers in Windows that are supported, in Linux you have the choice between a lot of the more popular sound drivers like ALSA and OSS and it supports many more platforms, for a list of platforms go to:

    http://www.openal.org/platforms.html

    for the OpenAL website visit:
    http://www.openal.org/

    There is one thing however I should mention about OpenAL, it's an SoundFX library only, so it doesn't come with any music support which you will have to write yourself for example by using streaming and the OGG Vorbis libraries. On Linux I think OpenAL supports MP3 if the right extension is installed, they are working on a Vorbis extension for Windows/Linux and MacOS but that is still in the beta stage... On Windows however EAX is supported...

    Quote Originally Posted by Lightning
    Quote Originally Posted by Sly
    Ahh. Don't use messages. Handle the TApplication.OnIdle event, set the Done parameter to False and do updates and draws in there. Now you have no speed difference between a VCL app and a Win32 API app that do the same thing.
    NO, the time it takes to paint is the same but CPU power is wasted wich reduces it's overall performance because of the high temperature, i used messages with good performance and a low CPU power, this might not be usual for games but if you can't detect movement you could put a timer message and get the same CPU hungry behaviour like the IDLE event.
    Though i'm pretty sure you can always detect movement and paint only when necessary this will ensure that you don't use 100% CPU all the time and lower it's temperature. The 100% CPU philosophy is a DOS feature and i don't agree with it
    I had to go into this, you talk about a timer event to detect movement, you are aware that the Timer event is the worst timer out there? I once tried to get a timer event to return ever 3 ms it returned ever 10 ms and the accuracy is different for each machine and the amount of workload running in the back, for collision detection this can be a disaster! In Windows it's more or less impossible to get 100% CPU time since there is no true multi-tasking, with the OnIdle you just request as much time-slices as you can when your application does not get any messages... If you want to handle messages just call Sleep(0) or Sleep(1) at the end of your OnIdle and it will make sure other applications in the waiting queue will get their time slices, I have written applications this way and the Task Manager mostly shows 0 - 1% CPU usage this way (depending on how much you do in the loop)... However if you don't make a fast-paced game there is no reason not to use the timer event and of course it will always be your own choice, but if you want to make a fast-paced game I would strongely advice against it ...
    Do it by the book, but be the author!
    <br />
    <br />Visit the Lion Productions website at:
    <br />http://lionprod.f2o.org

  2. #12

    Which libs to use ?

    Thanx,
    Is EAX the Creative library ?
    I'm still not sure if SDL is the right way for OpenGL wrapping.
    I think OpenAL is good for the audio part.
    About the timer you're right, i use high accuracy timers.
    I meant the movement should generate an event(call a procedure), but if this is not possible you can always send a message if you don't want that speed, messages get quickly to the application you could use a windows timer but even windows has multimedia timers for fast stuff.
    The future must be... Fast and OpenSource so...
    <br />Think Open and Lightning Fast!

  3. #13

    Which libs to use ?

    Both the OpenAL distributions have EAX I think but yeah it's the Creative EAX 1.0 and EAX 2.0.
    Do it by the book, but be the author!
    <br />
    <br />Visit the Lion Productions website at:
    <br />http://lionprod.f2o.org

  4. #14

    Which libs to use ?

    It seems all of you use SDL, i don't like it because it's too big so i will try with GLFW on Linux or GLScene if they get it to work, until then i'll stick to GLUT wich is included by default in the OS and i don't have to distribute it.
    OpenAL seems a good choice for the audio part, i think i can convert mp3, wav to ogg so i don't have any pattent issues.
    The future must be... Fast and OpenSource so...
    <br />Think Open and Lightning Fast!

  5. #15

    Which libs to use ?

    Quote Originally Posted by Lightning
    It seems all of you use SDL, i don't like it because it's too big so i will try with GLFW on Linux or GLScene if they get it to work, until then i'll stick to GLUT wich is included by default in the OS and i don't have to distribute it.
    OpenAL seems a good choice for the audio part, i think i can convert mp3, wav to ogg so i don't have any pattent issues.
    I'm not sure but I think when it comes to the patents of MP3 and games you only have to buy a license if you distribute over 5.000 copies of your game... question of course is what do they mean with distribute, freeware downloads as well or only sales!

    more info here:
    http://www.mp3licensing.com/

    however OGG is quite nice, and 100% free to use!
    Do it by the book, but be the author!
    <br />
    <br />Visit the Lion Productions website at:
    <br />http://lionprod.f2o.org

  6. #16

    Which libs to use ?

    Lion, Could you please point out what issues you had with SDL_Mixer, the only playback issue I am aware of is that on Win32 you need to drop the sampling rate down to 22050. If you leave it at 44100 it will sound horrible and crackly. 22050 and it should sound fine. On Linux, 44100 works and sounds fine.
    <br /><br />There are a lot of people who are dead while they are still alive. I want to be alive until the day I die.<br />-= Paulo Coelho =-

  7. #17

    Which libs to use ?

    pfff, that has been a while and it was with an older version of SDL_Mixer so it might be that they fixed some of them, I remember that the MP3 playback was not too good, most of my MP3 collection didn't get played back correctly (okay that is SMPEG but still)... I remember that MIDI playback had some issues, not entirely sure what issues anymore, we also needed 44100 Sample rate, however I cannot remember the problem you speak of but it could be that it occured, which would also have been a reason to drop the library... I also remember being annoyed by the fact that there is a volume setting for MIDI which doesn't appear to work in Win32 (it's an empty function ... at least it was back then), but there was nothing about that in the manual.

    However It's hard to remember exactly what problems occured since it's been about 2 years ago and I've seen quite a few libraries pass by. I remember we wrote some work-arounds for some of the bugs but in the end there where a few very stubbern bugs we just couldn't work-around and so we decided to steer away from it... I wanted to inform the JEDI-SDL group back then and we even talked about providing you guys with the sound engine code, however I had to start working on a new sound engine back then and we had to start looking for a new sound library that due to some weird reason I totally forgot to notify you guys and now I only vaguely remember some of the problems we had back then... :-/ I think I can still find and send you the sound engine code, however I think it's a bit outdated now with the new SDL versions...

    I must admit though that the CD Playback functions of SDL itself where quite good... I have never used SDLs own sound features but I do know that I won't touch SDL_Mixer anymore unless I don't have any other choice!
    Do it by the book, but be the author!
    <br />
    <br />Visit the Lion Productions website at:
    <br />http://lionprod.f2o.org

  8. #18

    Which libs to use ?

    A little off-topic but if you guys are interested OGG is one of the best audio formats, why use MP3s then ?

    http://www.litexmedia.com/article/tests.html
    http://www.litexmedia.com/article/comparison.html

    You can search the web and many say OGG is comparable to MP3PRO and WMA
    I found many converters on the web and i'm thinking i might convert my music files too but this format is great for anything
    The future must be... Fast and OpenSource so...
    <br />Think Open and Lightning Fast!

  9. #19

    Which libs to use ?

    Quote Originally Posted by Lightning
    GLScene should be good but it's Windows only AFAIK (maybe i'm wrong?).
    You are
    Ops :king: :cherry: :joker: :clown:
    If you save your data in a proprietary format, the owner of the format owns your data.
    <br /><A href="http://msx80.blogspot.com">http://msx80.blogspot.com</A>

  10. #20

    Which libs to use ?

    I use OpenGL, but I had a bad, *very* bad experience with GLUT. It crashed very often, locking up my Windows 98 (at the time), and the Linux version of GLUT just plain refused to start.

    So I decided "to hell with it", and wrote my own window manager. Two window managers in fact - one for Windows, other for Linux. It was a pain, and the functionality is still very limited (for example, you cannot hide mouse pointer in current version yet, and the typing isn't implemented for Linux) - but its pluses are that
    a). It's entirely in FreePascal.
    b). The code size is infinitesimal (my program with the built-in window manager is only 100K in size - and that includes full OpenGL interaction, fullscreen mode switching, etc.)
    c). It really doesn't require anything except gl/glu, which, you may presume, are already installed on any machine. Thus your entire installation package can be as small as 100k.

    I know of one other man who built his own window manager - Michalis Kamburelis with his KambiLib. I used his code as a reference when I was researching the video mode switching under Linux.

    My library
    Michalis Kamburelis' Page

Page 2 of 3 FirstFirst 123 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •