API Independance -> outside graphics

Started by
9 comments, last by Drath 21 years, 1 month ago
I have just about got my Graphical independance running. Okay, so I haven''t implanted any OpenGL support further than instalization or any further than setting matricies, rendering index buffers and texturing in Direct3D, but I feel as if I at least have a usable interface. I now want to try out some new things. Looking at the DirectX API there is DirectInput, DirectPlay, DirectSetup, DirectMusic, DirectSound and DirectShow. I can''t care less about Setup but I am trying to find good alternatives to the other componants, in particular DirectInput currently. What else is there? Thanks.
Advertisement
The only real alternative is using the standard Windows API. There''s no real second option as there is with graphics - most input libraries you find will just be wrappers around DirectInput.
So what happens on other platforms? Do they use their own API stuff as well?
WHAT? other platforms you say?! Wow, someone else actually taking interest in operating systems other than windows.
Makes me happy.

you want to look at this.
www.libsdl.org

It has been used for Quake2 (and 3?) and UT2003 to make them run on linux. It is a commercial free, highly portable API that can handle your input, sound, and window systems, on just about ALL major operating systems. This is what I use, don''t really even need to know directX ;D it "wraps" it for you so programs run on windows just fine.
if you do get it, make sure you get SDL_Mixer and SDL_Image, these are addon libraries to load more sounds and image types, and there are a ton of other libraries like these on their site..
peace!
this place is lame
Yes, other platforms will have their own native API similar to DirectInput or the Windows API.

Anyway my point wasn''t that you can''t have API independence, it''s that for subsystems other than graphics it''s not quite the same. You can use OpenGL instead of DirectX just fine, but what subsititute is there for DirectInput? The Windows API is a poor one at best, I''m not sure if it has real support for joysticks for example.
Though this may sound strange, I am more interested in the fact that I''ll be able to program a portable application rather than the fact it will work on alternative systems. The closest I have ever come to platforms other than windows is writing a mail on a mac with os 9 or something.
Anyway, I certainly believe Linux has a place in the future but for now, all I really care about is learning to actually be able to code properly rather than learning some functionality then making a pong or other simple game clone.

PS)
Looking through SDL it seems rather simplistic, though I''m not saying that as a bad thing. I''d rather actually do something. Would something like 3D sound have to be individually implanted? I have not seen anything about that.
Dobbs... the Win32 API has excellent, highly reliable support for joysticks... well... if there is only one joystick, and it is plugged into a game port, and it has no more than 8 buttons and 4 axes...

Beyond that, you need DirectInput under Windows. Even just adding a second joystick requires driver-specific fixes to work under the Win32 API solution.
RIP GameDev.net: launched 2 unusably-broken forum engines in as many years, and now has ceased operating as a forum at all, happy to remain naught but an advertising platform with an attached social media presense, headed by a staff who by their own admission have no idea what their userbase wants or expects.Here's to the good times; shame they exist in the past.
What is the problem with DirectInput?? What are you trying to do that it can''t handle?
Only that it is only for windows and I was thinking abstractng each interface would help my skills.
Ok you''re confusing two issues here, platform independence and API independence. Which do you want?

This topic is closed to new replies.

Advertisement