Page 1 of 2 12 LastLast
Results 1 to 10 of 16

Thread: What libraries (native or libs with headers) do you use for game development and why?

  1. #1
    PGD Staff / News Reporter phibermon's Avatar
    Join Date
    Sep 2009
    Location
    England
    Posts
    524

    What libraries (native or libs with headers) do you use for game development and why?

    Hi all, I wanted to get some idea of what people are using for their game projects and why they have chosen as such, be it features, ease of use, user base or just simple personal preference.

    It seems to me that there are precious few of us working on game orientated projects in pascal.

    The learning curve to creating a game is as steep as the learning curve of programming itself, it's compounded by the fact that C/C++ dominates in terms of userbase, public libs, variety and by far the least, tutorials.

    This means that unless you have a good understanding of C/C++, there are many tutorials that become of little use to us and many programmers rely on those more familiar with C/C++ to provide headers for libraries, or for those few that set out to write native pascal solutions for the commonly used systems in games.

    So I thought it may be useful for those looking for 'frameworks' within which to create their games to see what their options are.

    Hopefully we'll discover some commonly used libs and reasons they are good for certain tasks.

    Maybe this will encourage people to follow suit and use the more popular libs, increasing the shared knowledge of the community as a whole, allowing more people to provide support (because they use it too) and hopefully making the learning curve that bit much easier for everyone.
    When the moon hits your eye like a big pizza pie - that's an extinction level impact event.

  2. #2
    PGD Staff / News Reporter phibermon's Avatar
    Join Date
    Sep 2009
    Location
    England
    Posts
    524
    For my compiler and IDE I use Freepascal (http://www.freepascal.org/) and Lazarus (http://www.lazarus.freepascal.org/) respectively.

    I use these because currently, they are the best solution for writing cross-platform code. Something that I wish to do because I use Linux as well as Windows. (there is also the GNU Pascal Compiler that offer as such, but in benchmarks, Freepascal out-performs it in key areas)

    I don't use the VCL or create forms in Lazarus, I use it as an IDE for my code and nothing more. It's tight intergration with the Freepascal compiler plus it's code exploring/completion features makes it a good choice for me.

    So I create my own windows but I still want to do this in a cross platform way. so I use SDL (http://www.libsdl.org/) along with the JEDI-SDL pascal headers (http://sourceforge.net/projects/jedi-sdl/) which provide me with a way to create Windows in a uniform way that works on the operating systems I want it to, without having to write different code for each OS.

    I want to be able to do hardware accelerated 3D as well as 2D so for cross platform, OpenGL is the only option. DirectX and in turn Direct3D are arguably have much better designs and are easier and faster to use (when you know how). So if you're not bothered about Linux or the Mac, that's what I'd have recommend. Although personally because I know OpenGL better, I'll always use it as long as it's still supported.

    SDL does a few other nice things for me, it provides sound, mouse/keyboard/joystick input as well as simple texture loading. That coupled with the fact that it supports easy creation of an OpenGL context (what you need to render) it's a big win.

    SDLs texture loading doesn't support many formats, so I use the Vampyre Imaging Library (http://imaginglib.sourceforge.net/) for loading my images. it's a native, cross platform delphi/freepascal library that supports many different formats as well as offering various helper functions, image effects and also primative drawing, bitmap blitting etc. These features and the fact it's cross platform make it a no brainer for me.

    For loading 3D Models I use my own code. There are a few model loaders out there which offer various features, but none offered all I wanted. I need bone animation, tangent/binormal data for lighting shaders as well stored quaternion data so I didn't have to calculate it after loading. I wrote a blender export script and a hardware skinning model loader for that format. it doesn't support any known model format except my own. I would reccomend using GLscene (http://glscene.sourceforge.net/wikka/HomePage get it from CVS! it's still quite active) or model 3D (somewhere on these forums) both offer 3DS loading (a common 3D format) and milkshape (able to do animation)

    For networking I use customized chunks of lnet (http://wiki.lazarus.freepascal.org/lNet) because it offers a non-blocking, cross platform solution. I like to code with threads so for me non-blocking offers better performance for certain things. (I have customized and built a message passing library on top of this) so I'd reccomend lnet but Synapse and Indy are probably a lot easier for beginners with their non-blocking modes.

    and that's me for now.
    When the moon hits your eye like a big pizza pie - that's an extinction level impact event.

  3. #3
    PGDCE Developer de_jean_7777's Avatar
    Join Date
    Nov 2006
    Location
    Bosnia and Herzegovina (Herzegovina)
    Posts
    287
    I use FPC and Lazarus. For libraries I use OpenGL and OpenAL, as well as Ogg Vorbis for music files. I have my own reader for wave(.wav) files. That's pretty much it. As far as loading images, creating windows, UI and other stuff goes I have written my own code(a lot of code), to depend on as little libraries as possible, though I do use JPEG functionality that comes with FPC (pasjpeg). All headers are included with FPC. My code works on Windows and Linux, though with some lack of functionality under Linux (X11 is a slight pain).
    Existence is pain

  4. #4
    I have used DirectX for a couple of years, but now I'm using OpenGL. This is mainly because I would like to get into cross-platform development.

    There is much similarity between the libraries I use and the ones mentioned in the two previous posts. Allthough my winning TubeRunner game didn't use SDL, the new version will use a SDL + OpenGL based engine. I think SDL is a beautifull library that just offers the functionality you need at the right level. Because the graphics capabilities are not that great yet, I am using it in conjunction with OpenGL.
    For audio I am using OpenAL because, just like OpenGL, it offers those extra features that make it more interesting than say SDL_Mixer. 3D-sound is probably the most important example.

    I often use TGA for my textures. There is a snippet floating arround that allows you to easily load TGA's (I believe it is from Jan Horn's site). However, I've decided to use the Vampyre Imaging Lib in order to support more formats and have better portable code.

    Fontstudio is the tool I use to create bitmap font's. I don't actually use the program often. I just have some generated TGA's (with extra font meta-data included) floating on my drive. I only fire up the program if I need something special.

    I'm still not sure what the best 3d model format is to use. Until now, I often used the DXS format generated by DeleD (a nice modeller written in pascal). But that format is XML based, which is mega-bloated for 3d data. So I would like to switch to something better. I will probably use *.obj until I either find a great format, or develop my own which suits my needs.

    My sound is usually .wav for sound effects and .ogg for music. I wrote an ogg player with OpenGL (Thanks to Noeska for the tutorial ). This works great. I could also support MP3 streaming with the mpg123 library, but converting all my audio to ogg is just as easy.

    I didn't have the time to look into networking. So I'm not sure what to use for that. I did notice some fairly good libraries. If I need it, I'll go and try some.

    That's basicly it!
    Coders rule nr 1: Face ur bugz.. dont cage them with code, kill'em with ur cursor.

  5. #5
    Co-Founder / PGD Elder WILL's Avatar
    Join Date
    Apr 2003
    Location
    Canada
    Posts
    6,107
    Blog Entries
    25
    I use the latest version of Lazarus on Windows currently. I'd love to start with Lazarus on a Mac, but setting it up is still really messy. Hopefully one day rather soon someone will make a nice installer for Lazarus on the Mac.

    As for libraries, I really only use JEDI-SDL for the most part. I do make use of OpenAL when I finally get to audio, but I usually leave sound effects and music for last. I take advantage of OpenGL inside the JEDI-SDL package for 3D hardware acceleration. Makes a world of difference in performance. Everything else is all SDL usage such as input controls and window management. I create my own functionality layer and resource management on top of what SDL provides, but that's mostly because I'm a glutton for making most of my games' engines as resource light as I can. And I like to know how most of everything works so coding it myself helps with that. Not always the best way and some of it slows me down in areas, but I'm usually happy with the end results.
    Jason McMillen
    Pascal Game Development
    Co-Founder





  6. #6
    The ones i used most were Vampyre imaging and Opengl
    Last edited by arthurprs; 10-10-2010 at 02:04 AM.
    From brazil (:

    Pascal pownz!

  7. #7
    For windows i use Delphi7 personal so old but so good...
    For linux and Mac i use the last snapshot of the Lazarus and Freepascal Compiler....
    The libs i use are for windows OpenGL for graphics in my current project and BASS for audio and audio effects but for some projects i develop paraller with the main project i use the Asphyre extreme is so easy and good.
    For linux OpenGL and OpenAL.
    For Mac OpenGL and OpenAL.

    The OpenGL header is the dglOpenGL from the http://www.delphigl.com/

    That's it

  8. #8
    PGD Staff / News Reporter phibermon's Avatar
    Join Date
    Sep 2009
    Location
    England
    Posts
    524
    (I think I smell a PGD GL Base code...)
    When the moon hits your eye like a big pizza pie - that's an extinction level impact event.

  9. #9
    Co-Founder / PGD Elder WILL's Avatar
    Join Date
    Apr 2003
    Location
    Canada
    Posts
    6,107
    Blog Entries
    25
    Quote Originally Posted by phibermon View Post
    (I think I smell a PGD GL Base code...)
    Maybe, OpenGL is the best for cross-platform development, however DirectX and Windows development is still popular. Many games are made with Asphyre for example.
    Jason McMillen
    Pascal Game Development
    Co-Founder





  10. #10
    Quote Originally Posted by phibermon View Post
    (I think I smell a PGD GL Base code...)
    Interesting. If people feel like building such a base, count me in!

    It would also be great if one or more people could write an OpenGL tutorial series covering the basics from rendering cubes to advanced things like shading and post-effects.
    Coders rule nr 1: Face ur bugz.. dont cage them with code, kill'em with ur cursor.

Page 1 of 2 12 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
  •