#### Archived

This topic is now archived and is closed to further replies.

# What API should I use...

This topic is 5901 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

with Linux. I recently made the jump from M$and have no intentions of ever going back. Up to this point I was using MSVC++ and DirectX. I am pretty sure DX isnt supported under Linux, right?!? Anyway, I am working on isometric games and really have no interest in 3D programming at this point. What would be a good API to use for this? Any help would be greatly appreciated. If you are the only one that can fix it, why are you complaining to me? #### Share this post ##### Link to post ##### Share on other sites Advertisement Although it''s not an API per say, but an interface to other APIs ... what about SDL? #### Share this post ##### Link to post ##### Share on other sites OpenGL (www.opengl.org) and SDL (www.libsdl.org) What is your opinion on Linux after switching from Windows? Edited by - Drizzt DoUrden on November 18, 2001 9:04:52 PM #### Share this post ##### Link to post ##### Share on other sites Using SDL implies that you have plans to go back to Windows at some point. Since it is a portability library. Linux has many features in sound and graphics that are limited in SDL, however if you want a easy transitioning stage you can write a few learning games with SDL then make the jump to X/OpenGL/etc... Note that OpenGL as an API under Linux requires that you use glX and Xlib. OpenGL can be used with conjuction with GLUT or SDL for *learning* purposes. But remember to take off yer training wheels at some point. #### Share this post ##### Link to post ##### Share on other sites May I suggest to start with SDL. Yes, it is limited, but it''s easy to learn and has various libraries for 2D graphics, sound, various input devices. I would compare it to DirectDraw + DirectSound + DirectInput, but without Direct3D. If you are not intereseted in 3D games, SDL should suit you nicely. When you''ll " Graduate " to 3D graphics, you''ll need OpenGL for both 2D and 3D graphics, but and here I have to disagree with LearFox, you''ll still need SDL for sounds and inputs. SDL can work in harmony with OpenGL. " Programming Linux Games" was a helpful book for me. Enjoy Linux. #### Share this post ##### Link to post ##### Share on other sites Thanks for the replys they were very helpfull. As for how I like Linux compared to Windows, it is a difficult question to answer. So far Linux has run circles around Windows in everything but gaming and I hope to help close that gap. I am with Linux to stay, XP was the last straw for me. And I will order that book tonight. Again thanks for the insight. I put up a group to talk about things like this, stop by if you like. http://groups.yahoo.com/group/games4linux If you are the only one that can fix it, why are you complaining to me? #### Share this post ##### Link to post ##### Share on other sites quote: Using SDL implies that you have plans to go back to Windows at some point. Since it is a portability library. Well, using SDL implies that you have plans to reach a broader audience. Really, I wouldn''t suggest using a Linux-only library for anyone (unless you really want to optimize the hell out of your games), simply because the Linux audience is smaller than the Windows audience. So why not reach both? Apart from that, you can compile SDL games on more platforms than Linux and Windows. cu, Prefect #### Share this post ##### Link to post ##### Share on other sites Hey Still no posting from Null and Void!, hope he''s alright Use SDL, thats what www.Lokigames.com uses to port games from Windows to Linux, you might want to check their development section, they have written a couple of programs/apis to help develop games, like OpenAL (Open Audio Library) a setup program, and some other things. There are other APIs, like Clanlib, and of course OpenGL, you might want to check em up, and if you want to make your life more confusing you might want to try directly xlib or ggi, but I really recomend SDL. #### Share this post ##### Link to post ##### Share on other sites Using OpenGL with SDL is definately looking good right now. You can use a trustworthy OS like Linux to develop your game, and then port it to MacOS, Windows, etc. I have been thinking about switching to Linux lately but I have not really had the time to think about it enough. Good luck. #### Share this post ##### Link to post ##### Share on other sites quote: Original post by Kwizatz Hey still no posting from Null and Void!, hope he''s alright I have been reading this thread, but Martee and Drizzt said everything I would have . [Resist Windows XP''s Invasive Production Activation Technology!] #### Share this post ##### Link to post ##### Share on other sites SDL ClanLib rm -rf /bin/laden #### Share this post ##### Link to post ##### Share on other sites Good for you switching to LINUX!!!! I did it last spring after getting a BSOD everytime I started windows. What distro are you using? I noticed everyone hyping SDL and had to say something. I compiled libsdl on my box last week and coded my first app yesterday. Its frightening how easy it is. I had used DX in windows, and SDL takes about one quarter of the code to get a window/fullscreen app going as direct-draw 6.0(i know thats old). I was fairly pleased with it, except it just seemed too easy. I kept thinking okay where''s the catch is my box gonna segfault or what? Its really nice, and though i have about 2 hrs experience with it I would recommend it as a starting place. laterz HEAD #### Share this post ##### Link to post ##### Share on other sites Wow, if I didnt know better, I would think you guys are really trying to help! Thanks for all the help. I think I will try the SDL to start with and work my way to a OpenGL/SDL mix. Now to get the SDL rpm installed. The hardest part of making the switch so far has been learning the new extentions. SDB - Whatever you do, dont press the red button! #### Share this post ##### Link to post ##### Share on other sites You should probably get this book: http://www.premierpressbooks.com/searchdetail.asp?ID=53255 It actually teachs SDL and OpenGL in one... I also plan on buying this book soon. I am pretty sure that my mind is made up and I am going to switch to Linux game development. I have one question though. If I develop my game on Linux, could I just send the executable file to a friend with an Windows operating system without making any changes or is there some minor change(s) I will need to make? ###### Artificial intelligence is the devil... resist intelligent NPC''s "He who fights with monsters should look to it that he himself does not become a monster... when you gaze long into the abyss, the abyss also gazes into you..."~Friedrich Nietzsche #### Share this post ##### Link to post ##### Share on other sites quote: Original post by Drizzt DoUrden I have one question though. If I develop my game on Linux, could I just send the executable file to a friend with an Windows operating system without making any changes or is there some minor change(s) I will need to make? No, you couldn''t do that. Linux uses ELF format executables and Windows uses PM format executables (if I messed up the names, someone correct me). You''ll either need to use a Windows cross compiler (a compiler in one OS that makes executables for another), or boot into Windows and compile it there. [Resist Windows XP''s Invasive Production Activation Technology!] #### Share this post ##### Link to post ##### Share on other sites quote: Original post by Null and Void Windows uses PM format executables PE #### Share this post ##### Link to post ##### Share on other sites Drizzt: Without a cross compiler, you can't send executables like that. What you'll want to do is give your code to the other person and let them compile (which with SDL is quite possible) it themselves. If you're distributing your programs over the internet, give out the source and/or distribute binaries for at least Windows and Linux. BTW, let me throw my hat into the ring and say that Allegro is also a good "API" to use for games. It's usually portable and rather easy to work with. Find it and other stuff for it at www.allegro.cc ED: Well, damn. It appears that Null and Void quite thoroughly beat me to the punch. Serves me right for being a slow typer. -Goku SANE Productions Homepage Edited by - Goku705 on November 19, 2001 9:21:46 PM #### Share this post ##### Link to post ##### Share on other sites I would have two computers, one with Linux one with Windows. The only compilers I have are Code Warrior and MSVC++ 6.0. Basically I know nothing about Linux, so I am looking into it for a few weeks to see its ups and downs and what I need to get/buy to use it. One other question I have is video cards. Can I just use my piece of crap Vodoo or do I need to buy a Linux-specific vid./sound card? Its the hardware part I am trying to figure out right now. Im assuming I could use my CPU and motherboard(and my RAM hopefully) Do you guys know a useful linux site I can get all this information from? ###### Artificial intelligence is the devil... resist intelligent NPC''s "He who fights with monsters should look to it that he himself does not become a monster... when you gaze long into the abyss, the abyss also gazes into you..."~Friedrich Nietzsche #### Share this post ##### Link to post ##### Share on other sites What sound card do you have? It might be installed by default by your distro. But, if it''s not you''ll need drivers for it. If it''s made by Creative, they have open source drivers you can download. I don''t know about other sound card companies. Your voodoo should work with X, but you may not get OpenGL hardware acceleration unless you can find Voodoo drivers for Linux (I haven''t looked, so I don''t know if they exist). You can try linuxnewbie.org for some information on setting up Linux, [Resist Windows XP''s Invasive Production Activation Technology!] #### Share this post ##### Link to post ##### Share on other sites I am sure one of the distributions will work for your system. I tried Red Hat first but couldnt get my Nvidia Geforce2 MX card to work with it. Probably due more to my inexperience with Linux. But I tried the Mandrake 8.1 and it found and configured all of my hardware including a cable connection. I havent tried slackware and from what I have read it is mostly manual configuration, correct me if I am wrong. There were a few more distributions out there but everything I read said either Red Hat or Mandrake would be the easiest switch from M$. So far I am without complaint. My system has been running continuosly for over 3 weeks now without a crash, reboot or any other typical problem I had with win 3.0, win 3.1, win 95, win 98, win 98se or win ME. Good luck and I hope you find one you like.

SDB - Whatever you do, dont press the red button!

##### Share on other sites
I actually just made the switch to Linux as well. I also was tired of windows. I am currently running Red Hat 7.2 Enigma and I am very very pleased with it.

I have an Geforce2 32 meg DDR card and a X-Gamer Live, both run beautifully. Although I haven''t got any new drivers for any of the fancier things you can do with the card, the default drivers worked perfect right outta the box. Also the Red Hat installation in ver7.2 is great, they have come a long way with it

I am just getting started programming with OpenGL/SDL as well also. Not had much time to get started on it atm. But I hope to soon, Also want to restart an old Level Editor project I was working on, building it with GTK+ this time.

Nice to see more people making the switch. Actually Glib is a pretty cool little library as well, GTK+ is built using it. Linus is a wonderful OS that provides much greater stability/security and I have no idea why I didn''t switch earlier. The open source was a big draw for me as well.

Hope you guys that are thinking bout switching do, and I hope it goes as well as it did for me.

Good Luck

##### Share on other sites
quote:
Original post by SDB

I havent tried slackware and from what I have read it is mostly manual configuration, correct me if I am wrong.

Well, it is a lot more manual than other distro''s . I still like Slackware . Although it isn''t hard, I wouldn''t suggest it to a Unix newbie. You do have to know what you''re doing a lot more than with RedHat or Mandrake (which I''ve also tried).

[Resist Windows XP''s Invasive Production Activation Technology!]