Page 2 of 6 FirstFirst 1234 ... LastLast
Results 11 to 20 of 51

Thread: PJPlib - 2D Game Library

  1. #11

    Re: PJPlib - 2D Game Library

    I recently commited the first bits of source to the project's CVS repository. You can go check it out at http://pjplib.cvs.sourceforge.net/pjplib

    The current version of the source still needs a lot of work.
    • Implement the sound system (OpenAL)
    • Develop the sprite engine


    These are key features that must be implemented before the first release.

    Also you should check out the SVN repository http://pjplib.svn.sourceforge.net/viewvc/pjplib and get yourself a tarball.

  2. #12

    Re: PJPlib - 2D Game Library

    I've just taken a quick look at it.
    The test demo won't run on my comp It opens a console and a window and then freezes.

    Otherwise I like the way you inherit from TPJPApp. I would probably also add a setup or initialize method that's called before loadcontent. It gives a place to for instance create objects like imagelist and spriteengine.

    And btw. I would personally write
    Code:
    if not Fullscreen then
    instead of
    Code:
    if Fullscreen <> true then
    It's more readible imo.


    Edit:
    The current version of the source still needs a lot of work.
    Implement the sound system (OpenAL)
    Develop the sprite engine
    I think you need to add at least add timing on that list.
    Imagine I've written something clever here inspiring you to make something awesome. If that happens give me credits

  3. #13

    Re: PJPlib - 2D Game Library

    Quote Originally Posted by pstudio
    I've just taken a quick look at it.
    The test demo won't run on my comp It opens a console and a window and then freezes.
    I get a Windows error... I'm still trying to figure that one out. It happens when the draw routine takes place. I might have to add a bit of "debug" code in order to find the cause of the error, using SDL_GetError. I think thats where the problem lies.

    Quote Originally Posted by pstudio
    And btw. I would personally write
    Code:
    if not Fullscreen then
    instead of
    Code:
    if Fullscreen <> true then
    It's more readible imo.
    Bad habits die hard...

    Quote Originally Posted by pstudio
    The current version of the source still needs a lot of work.
    Implement the sound system (OpenAL)
    Develop the sprite engine
    I think you need to add at least add timing on that list.
    Oops... Slipped my mind!!! Thats also one of the top priorities.

    This is getting somewhere... Yippee Kai Yay Mother

  4. #14

    Re: PJPlib - 2D Game Library

    Quote Originally Posted by PJP Dev
    I recently commited the first bits of source to the project's CVS repository. You can go check it out at http://pjplib.cvs.sourceforge.net/pjplib

    The current version of the source still needs a lot of work.
    • Implement the sound system (OpenAL)
    • Develop the sprite engine


    These are key features that must be implemented before the first release.

    Also you should check out the SVN repository http://pjplib.svn.sourceforge.net/viewvc/pjplib and get yourself a tarball.
    Hi
    I had a look at the source code and it is very similar to what I do myself in my projects!

    I have a SDL 'app' class that I inherit from too...just that mine has only one update method where you do all rendering and updating instead of separate ones.

    I do like the thought of separate update and render methods like you have

    Nice job :-)

    cheers,
    Paul

  5. #15

    Re: PJPlib - 2D Game Library

    Got the problem with the test app sorted out. I've made a stupid error in the test app...

    [pascal]
    procedure TMyApp1.LoadContent();
    begin
    image := TImage.Create(MyApp1); //This is where I made an error...
    end;
    [/pascal]

    That should look like this:
    [pascal]
    procedure TMyApp1.LoadContent();
    begin
    image := TImage.Create(Self); //That's better...
    end;
    [/pascal]

    A simple slip of mind and it all bombs out!!!

    It's all updated in the CVS here

    Now whats left? A lot!!!

    • Finish the Sprite Engine (It still does nothing!!!)
    • Get the sound system up and running (I should really stop sleeping on this)
    • Sort out timing... (Should I make it run at the same speed on all machines? If so... How?
    • Input handling
    • Physics (Newton? ODE? Both?)
    • GUI System
    • Compression for sound and graphics archives

  6. #16

    Re: PJPlib - 2D Game Library

    thats how i do on my engine,

    i want the game running with 100fps, so 1 gamelogic every 10ms

    Code:
    # tickcount() acts like Windows.GetTickCount()
    ac = 0.0 # this is the acumulator
    old = tickcount()
    while running:
      new = tickcount()
      ac += (old - new) / 10.0
      loops = trunc(ac)
      if loops > 0:
        ac -= loops
        for i = 1 to loops:
          update()
        draw()
        old = new
      else
        sleep(1)
    From brazil (:

    Pascal pownz!

  7. #17

    Re: PJPlib - 2D Game Library

    Thanks for the example. I will definitely have a try at it. While I'm figuring out timing on the sideline, the next things to do is finalising the sprite engine and implementing the sound.

    This lib is slowly reaching it's first release. PJPlib's first release will happen when the following things have been done:

    • Completion of Sprite Engine
    • Implementation of sound system
    • Timing
    • Input handling
    • A few tech demos
    • Documentation


    Then I can add other fancy stuff like physics, video playback, gui system, etc...

    Remember to keep an eye on the CVS to see how things are going.

  8. #18

    Re: PJPlib - 2D Game Library

    Recruitment Time!!!!

    Yes, I'm looking for some folks to help me out on PJPlib. So if you want to get involved get yourself a SourceForge.net account if you don't already have one and send me a PM or e-mail with your SF.net username. This will give you full access to the CVS, documentation system and everything else.

    Brainer already volunteered but I haven't heard from him in a while.

    Thanks guys...

  9. #19

    Re: PJPlib - 2D Game Library

    I have a little issue about timing for the lib...

    I want the developer to be able to set a desired FPS for his game and that the game will run at the same speed on all systems.

    [pascal]
    //Desired FPS eg. 100 FPS
    DoTimer(100);
    [/pascal]

    Could someone please help me with this... How should I do it?

  10. #20

    Re: PJPlib - 2D Game Library

    adapting my code

    Code:
    # tickcount() acts like Windows.GetTickCount()
    #frameduration is 1000.0 / desired fps
    ac = 0.0 # this is the acumulator
    old = tickcount()
    while running:
      new = tickcount()
      ac += (old - new) / frameduration
      loops = trunc(ac)
      if loops > 0:
        ac -= loops
        for i = 1 to loops:
          update()
        draw()
        old = new
      else
        sleep(1)
    From brazil (:

    Pascal pownz!

Page 2 of 6 FirstFirst 1234 ... 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
  •