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

Thread: Simple 2D library

  1. #1
    Legendary Member cairnswm's Avatar
    Join Date
    Nov 2002
    Location
    Randburg, South Africa
    Posts
    1,537

    Simple 2D library

    Version 1 of my new Simple 2D Library has been released

    (Ok not really ops: - just new game development engines always sound cool).

    http://www.cairnsgames.co.za/downloads/S2DLv100.zip

    Currently the folloing units exist
    :arrow: S2DLDraws - sets up the screen - automatic dont try to do it yourself
    :arrow: S2DLImages - Image and Image List unit
    :arrow: S2DLText - Text Writter
    Also includes a Template or example application - (you need to add your own images)

    It will stay version 1 for a while.

    Have fun and let me know what you think.

    PS. If anyone has the time I'd appreciate it if you could
    :arrow: Test it on linux :shock:
    :arrow: Tell me why it wont compile in Delphi :shock:
    :arrow: Why the heck are the Exes so large! Over 2MB - this bloat is about 3times Delphi Bloat :roll:

    :twisted:
    William Cairns
    My Games: http://www.cairnsgames.co.za (Currently very inactive)
    MyOnline Games: http://TheGameDeveloper.co.za (Currently very inactive)

  2. #2

    Simple 2D library

    Why the heck are the Exes so large! Over 2MB - this bloat is about 3times Delphi Bloat :roll:
    All I know is if you make it with Lazarus ... It's bloated. I'll check the library out, it may be what I need.

  3. #3

    Re: Simple 2D library

    Quote Originally Posted by cairnswm
    PS. If anyone has the time I'd appreciate it if you could
    :arrow: Test it on linux :shock:
    :arrow: Tell me why it wont compile in Delphi :shock:
    :arrow: Why the heck are the Exes so large! Over 2MB - this bloat is about 3times Delphi Bloat :roll:
    :twisted:
    I've tryed it under Kylix and Linux.
    First, i've renamed the units to dpr/pas for compatibility.

    It firstly didn't compiled becouse in linux unit importing cares of case.
    You should import "sdl" instead of "SDL" and "sdl_ttf" instead of "SDL_ttf". That sux, i know, but kylix works that way (AFAIK)

    Another thing, you used local variable initialization, that is not supported in Kylix.

    procedure XXX();
    var y : integer = 3;
    begin
    ....
    end;

    should be:

    procedure XXX();
    var y : integer;
    begin
    y:=3;
    ....
    end;


    That said i was able to compile. But then i was missing "libSDL_ttf.so" and i wasn't able to run it..
    I'll try and find that lib
    If you save your data in a proprietary format, the owner of the format owns your data.
    <br /><A href="http://msx80.blogspot.com">http://msx80.blogspot.com</A>

  4. #4
    Legendary Member cairnswm's Avatar
    Join Date
    Nov 2002
    Location
    Randburg, South Africa
    Posts
    1,537

    Simple 2D library

    Cool!

    Robert - I make nice simple games - basically 2D puzzle games mostly though I would like to make an isometric game soon (probably an Isometric puzzle game).

    I'll try compile with the command line compiler and see if I can get the size down - I was expecting something really small based on the other FreePAscal stuff I've done.

    MSX - Thanks - great to know that it is (almost) cross platform I'll remove the initializations and make more small letter stuff

    The SDL_TTF stuff came with JEDI-SDL. Does linux use True type fonts? If not I'll go back to bmp fonts and write my own font object.

    Thanks for your help guys. If this works we could have a very easy to use Simple 2D Library.
    William Cairns
    My Games: http://www.cairnsgames.co.za (Currently very inactive)
    MyOnline Games: http://TheGameDeveloper.co.za (Currently very inactive)

  5. #5

    Simple 2D library

    Quote Originally Posted by cairnswm
    The SDL_TTF stuff came with JEDI-SDL. Does linux use True type fonts? If not I'll go back to bmp fonts and write my own font object.
    Well it's not a problem of supporting true type (which it does) but i just was missing the ".so" file (equivalent to .dll in windows). I'll try to find it around (on www.libsdl.org maybe).
    If someone has the direct link, please post it
    If you save your data in a proprietary format, the owner of the format owns your data.
    <br /><A href="http://msx80.blogspot.com">http://msx80.blogspot.com</A>

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

    Simple 2D library

    For Linux you just have to install the SDL package. It's called devsdllib0 or something like that. Only the Win32 copies of your game require the .DLL with your main executable.
    Jason McMillen
    Pascal Game Development
    Co-Founder





  7. #7
    Legendary Member cairnswm's Avatar
    Join Date
    Nov 2002
    Location
    Randburg, South Africa
    Posts
    1,537

    Simple 2D library

    Version 1.01 of the Simple 2D library has been released:

    http://www.cairnsgames.co.za/downloads/S2DLv101.zip

    [pascal]// Simple 2D Library
    // version 1.01
    //
    // This file is part of the Free Pascal Simple 2D Libraries
    // Copyright (c) 2004 by William Cairns (CairnsGames) and
    // the Delphi Game Development (DGDev) Site
    //
    // This program is distributed in the hope that it will be useful,
    // but WITHOUT ANY WARRANTY; without even the implied warranty of
    // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
    // (I got this from the JEDI-SDL files and it sounds Cool!)
    //
    // By using this work you have immediatly agreed with the above.
    //
    // The work can be used for any purpose. You may sell it, use it in a game
    // delete it or change it as you wish with no reward to the the original
    // developers.
    //
    // We do however ask that if this work is used that some mention of it be made
    // on the DGDev or PGDev web sites.
    //
    //** With FreePascal the files must be compiled with the -Sd switch on as
    //** Delphi language conventions are used.
    //
    // Units:
    // S2DLDraws - Sets up screen automatically - Change code directly for
    // other screen resolutions.
    // (Requires SDL.dll)
    // S2DLImages -
    // TS2DLImage : Manages image in memory. Enables Drawing and Transparancy
    // TS2DLImageList : Maintains list of images. Enables searching of images.
    // (Requires SDL.dll and SDL_image.dll)
    // S2DLText -
    // TS2DLFont : Manages a TTF font. Loads and Draws.
    // TS2DLFontList : Maintains a list of Fonts. Enabled Search for Fonts
    // (Requires SDL.dll and SDL_ttf.dll)
    // S2DLSound -
    // TS2DLSound : Loads and Manages a Wav file in memory. Enables playing
    // and simple volume control
    // TS2DLSoundEngine : Controls and manages Sounds.
    // (Requires SDL.dll, SDL_mixer.dll and smeg.dll)
    // S2DLTemplate - A basic template that enables a screen and manages images.
    // Balls - an example game utilizing all the available units
    //
    //
    [/pascal]

    Changes since version 1.00
    - TGameImage renamed to TS2DLImage
    - TS2DLFontList created to manage fonts
    - TS2DLSound and TS2DLSoundEngine have been added.
    - TGameImage.SetPallette has been removed as it wasn't doing anything.
    - Memory leak (BIG one) in TS2DLFont removed.
    - I've tried making it more linux friendly - cant really check though
    - DEMO of everything included in a complete game called BALLS - based on jawbreaker for Pocket PC.

    Once again I'm quite keen to hear any feedback
    William Cairns
    My Games: http://www.cairnsgames.co.za (Currently very inactive)
    MyOnline Games: http://TheGameDeveloper.co.za (Currently very inactive)

  8. #8
    Legendary Member cairnswm's Avatar
    Join Date
    Nov 2002
    Location
    Randburg, South Africa
    Posts
    1,537

    Simple 2D library

    Version 1.03 has been released

    http://www.cairnsgames.co.za/downloa...s/s2dlv103.zip

    Added a simple sprite engine.
    Move flip functionality into the S2DLDraw object so that the class can calculate FPS with each flip.
    Minor changes made to some other code as well.

    This has some of the additional code created for the 72hour GDC contest. More code will be added to the library after I've cleaned it up a bit.

    PS: No demos included. 3 demos will be released later, balls (no code changes), shooter (2d up scrolling shooter) and the full code for the Foogs game released for 72hour GDC. I just need to make sure I have the right files in the right places for the demos to work.
    William Cairns
    My Games: http://www.cairnsgames.co.za (Currently very inactive)
    MyOnline Games: http://TheGameDeveloper.co.za (Currently very inactive)

  9. #9

    Simple 2D library

    I had forgotten you did this. Got the version 1 and it slipped my mind. ops:

    Looks like you've come a really long way. I will try this out, and maybe even release what I make .... I'm a perfectionist and it's really hard for me to release alpha/beta/unfinished stuff.

  10. #10
    Legendary Member cairnswm's Avatar
    Join Date
    Nov 2002
    Location
    Randburg, South Africa
    Posts
    1,537

    Simple 2D library

    The goal of S2DL is to make 2D game development simple. To the point where not knowing object orientated development will not be a problem. The libraries do as much as possible in the background (creation, initialization etc).

    S2DL is free, not open source, GPL or anything like that - its free. Your own add ons to the library can have whatever license you want to add.
    William Cairns
    My Games: http://www.cairnsgames.co.za (Currently very inactive)
    MyOnline Games: http://TheGameDeveloper.co.za (Currently very inactive)

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
  •