Results 1 to 9 of 9

Thread: Developing a game - stuck at choosing a graphics library

  1. #1

    Developing a game - stuck at choosing a graphics library

    First of all, I want to say hi to all the members of PGD.

    In my school, we're all required to make a simple game for our Computers class at the end of our graduate year.
    The only bigger restriction is that it's developed in Free Pascal.
    Which is not a problem, as I have quite some experience with it.

    We're allowed to use any graphics and such libraries we want. So I'm kinda stuck at choosing one (I was thinking OpenAL for sound).

    The game would be a 2D sidescrolling (or not if it's too complicated) platformer OR a simple 2D shooter like Soldat, only not so advanced.
    That are my two ideas for now.

    So, basically, I'm looking for a graphics library that's not too complicated, but not too restrictive either. Savage recommended using SDL. What do you think? (just looking for different opinions )

    We have about a month to complete, so I think the platformer is a better idea, since it doesn't require advanced stuff like AI and such. But then again, I love a challenge, so I would LOVE to make a 2D FPS, but I just don't know if it is possible to finish it in such a short time...

  2. #2

    Developing a game - stuck at choosing a graphics library

    I'm going to agree with Savage here, SDL is the way to go. In fact, I'll even give myself a bit of a bump here and say that a good place to start would be with my SDL, LUA, and Freepascal Game Engine Demo. Its not a complete engine, but it is quite flexible and a decent starting point. I've made it work in Linux and Windows, never got around to the MAC port thanks to the difficulty of getting LUA to link on a MAC.

    Hope it helps.

  3. #3

    Developing a game - stuck at choosing a graphics library

    SDL,

    you will not have trouble to find help or demos
    From brazil (:

    Pascal pownz!

  4. #4
    Co-Founder / PGD Elder WILL's Avatar
    Join Date
    Apr 2003
    Location
    Canada
    Posts
    6,107
    Blog Entries
    25

    Developing a game - stuck at choosing a graphics library

    If you want to try a simple game with SDL you can have a look at my small tutorial series here: http://www.pascalgamedevelopment.com...18&p=1#article
    Jason McMillen
    Pascal Game Development
    Co-Founder





  5. #5

    Developing a game - stuck at choosing a graphics library

    Okay, so I downloaded SDL files...

    ... and I have a problem at the very beginning. When I write a simple program that initializes SDL, initializes Video and writes success, I CAN compile it... there's no error. But when I run the program, it stops responding and exits with exitcode 309.

    What am I doing wrong? :?

  6. #6

    Developing a game - stuck at choosing a graphics library

    Quote Originally Posted by Ixy
    Okay, so I downloaded SDL files...

    ... and I have a problem at the very beginning. When I write a simple program that initializes SDL, initializes Video and writes success, I CAN compile it... there's no error. But when I run the program, it stops responding and exits with exitcode 309.

    What am I doing wrong? :?
    post some code, so we can try to find out where is the problem
    From brazil (:

    Pascal pownz!

  7. #7

    Developing a game - stuck at choosing a graphics library

    Pure OpenGL will give you most better experience in graphic programming 8)

  8. #8

    Developing a game - stuck at choosing a graphics library

    Heh, I'm not sure if I'll even manage simple 2D SDL graphics in a month, let alone OpenGL.

    The code:

    Code:
    program sdltest;
    uses sdl;
    var scr: PSDL_Surface;
    
    begin
    SDL_Init (SDL_INIT_VIDEO);
    scr:= SDL_SetVideoMode (640, 480, 8, SDL_ANYFORMAT);
    SDL_Quit;
    end.

    Oh, and also - which compiler are the SDL tutorials (the ones that come with it) written for? There is end; instead of end. and some other differences.
    One more thing. I don't get the error checking code.
    Something like this...

    Code:
    if &#40; SDL_Init &#40;SDL_INIT_VIDEO&#41; < 0 &#41; then
    begin
    
    MessageBox &#40;0, PChar &#40;Format &#40;'Couldn't initialize SDL &#58; %s', &#91;SDL_GetError&#93;&#41;&#41;, 'Error', MB_OK or MB_ICONHAND&#41;;
    
    SDL_Quit;
    exit;
    end;
    Okay, the code itself is pretty straightforward and self explanatory. But this PChar and Format in the MessageBox part... I always get an error there. Using Windows and SDL. Am I forgetting something or what? :?

  9. #9

    Developing a game - stuck at choosing a graphics library

    AFAIK exitcode 309 means that your program can't find all dynamic libraries it wants to link to.

    Did you copy SDL.dll in your Bin folder?

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
  •