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

Thread: 2D Library

  1. #1

    2D Library

    Greetings and Happy New Year to thinBasic staff and users. There's been alot of updates to thin basic since I last logged on. Great : )
    Keep up the good work. I was just wondering if there are any 2D libraries that work with thinBasic. (i.e SDL, Allegro etc.) ;D

    Thanks,
    Pipes
    Contempt Prior to Investigation = Everlasting Ignorance

  2. #2
    thinBasic MVPs
    Join Date
    May 2007
    Location
    UK
    Posts
    1,427
    Rep Power
    159

    Re: 2D Library

    simple answer yes.

    Look at Jose Roca forum

    http://www.jose.it-berater.org/smffo...hp?board=316.0

    I would confirm with Jose what header are compatible with Thinbasic.

    Home Desktop : Windows 7 - Intel Pentium (D) - 3.0 Ghz - 2GB - Geforce 6800GS
    Home Laptop : WinXP Pro SP3 - Intel Centrino Duo - 1.73 Ghz - 2 GB - Intel GMA 950
    Home Laptop : Windows 10 - Intel(R) Core(TM) i5-4210U CPU @ 1.70GHz, 2401 Mhz, 2 Core(s), 4 Logical Processor(s) - 4 GB - Intel HD 4400
    Work Desktop : Windows 10 - Intel I7 - 4 Ghz - 8GB - Quadro Fx 370

  3. #3

    Re: 2D Library

    Hi Pipes,

    what functionalities do you need? Petr and me are starting to work together on our modules soon.

    I have personally a great interest in more 2D functionalies for thinBasic, game related. So please let us know what you need and we can see what we can come up with. Depending on the features you need it might be possible with TBGL allready.

    In the meanwhile I suggest to follow the link Michael Clease gave you.

  4. #4

    Re: 2D Library

    Hi Michael,
    Sorry for not responding quickly. In answer to your questions, there are several functionalities I'd like in a 2D library. Here are a few:

    Load Image - Load an image into an image buffer (bmp, jpg, png, etc.)
    Copy Image - Copy a loaded image into another image in which the copy creates the image buffer
    Create Image - create a blank image buffer (bmp, jpg, png, etc.) user designated size
    Load Animated Image - Load a series of animated images for playback & a function to playback the animation
    Free Image - free an image buffer from system resources
    Save Image - save an image buffer to disk
    Grab Image - grab a portion of an image and copy it to another image buffer, screen or disk
    Draw Image - draw an image to screen or image buffer
    Display an Image buffer - Draw any buffer to screen
    Mask Image - choose an RGB color as a transparent color
    Change Image Handle - Grab image to mouse and designate the handle (i.e. Top left corner, middle, bottom right corner etc.)
    Scale Image - Scale an image and store it in a buffer
    Resize Image - (self explanatory)
    Rotate Image - (self explanatory)
    Image Width - return image width
    Image Height - return image height
    Images Overlap - check if images overlap
    Images Collide - pixel collision detection
    Rectangles Overlap - image captured to mouse overlaps with image on screen
    Rectangles Collide - image pixels captured to mouse collide with image on screen
    Flip buffers - Flip a series of image buffers (whole Screen size) onto the screen

    These are a few that I can think of for now. Oh yeah... one more simple request... keep it simple for BASIC programmers and not windows gurus.
    Contempt Prior to Investigation = Everlasting Ignorance

  5. #5

    Re: 2D Library

    Hi Pipes,

    are you talking about image functionalities acting inside regualr windows/dialogs or inside a TBGL/OpenGL window?

    It sounds more like image handling stuff for regular windows/dialogs. Eros introduced an image component recently. Maybe thta is something what you are looking for. Eros!?!? What do you think?


  6. #6
    thinBasic author ErosOlmi's Avatar
    Join Date
    Sep 2004
    Location
    Milan - Italy
    Age
    57
    Posts
    8,779
    Rep Power
    10

    Re: 2D Library

    I think Pipes is referring here to "Image" as "sprite" or something like that. So something more close to gaming than drawing.

    CANVAS control can be used to develop many of the requests but it would be limited to BMP.
    For sure CANVAS will be improved in next thinBasic release but more on the drawing side not on the gaming direction.

    Ciao
    Eros

    PS: @Michael, TBGL included in current thinBasic 1.7.6.0 has been compiled using SVN repository so it has all the new stuff you have developed on 2D side
    www.thinbasic.com | www.thinbasic.com/community/ | help.thinbasic.com
    Windows 10 Pro for Workstations 64bit - 32 GB - Intel(R) Xeon(R) W-10855M CPU @ 2.80GHz - NVIDIA Quadro RTX 3000

  7. #7
    Super Moderator Petr Schreiber's Avatar
    Join Date
    Aug 2005
    Location
    Brno - Czech Republic
    Posts
    7,129
    Rep Power
    732

    Re: 2D Library

    Hi,

    yes, Michael is helping a ton with TBGL now, once ready and documented, 2D people from here will have big power in their hands. Stay tuned


    Petr
    Learn 3D graphics with ThinBASIC, learn TBGL!
    Windows 10 64bit - Intel Core i5-3350P @ 3.1GHz - 16 GB RAM - NVIDIA GeForce GTX 1050 Ti 4GB

  8. #8

    Re: 2D Library

    Wow! You guys jumped all over my post quickly. I've only been logged off for about 30 minutes and came back on to inquired about call backs. That's what I like about thinbasic and it's community. Quick responses... I appreciate the quick replies.

    are you talking about image functionalities acting inside regualr windows/dialogs or inside a TBGL/OpenGL window?

    Yes... either one.

    I think Pipes is referring here to "Image" as "sprite" or something like that. So something more close to gaming than drawing.

    Yes... I meant image as any pic (sprites are just small images)

    Yes... These functionalities would be for gaming... what else is there

    Yes... some drawing primitives would be cool also... i.e. lines, rectangles, squares, filled and non-filled on a window canvas and tgbl screens

    I've only observed the example scripts in action for TGBL. It looks good. I havn't had time to try any programming with it yet.

    Thanks for the responses...
    Contempt Prior to Investigation = Everlasting Ignorance

  9. #9
    thinBasic author ErosOlmi's Avatar
    Join Date
    Sep 2004
    Location
    Milan - Italy
    Age
    57
    Posts
    8,779
    Rep Power
    10

    Re: 2D Library

    Pipes,

    to have a look at what Michael was referring as new Canvas control, install thinBasic 1.7.6.0 (current latest one) and have a look at script in directory \thinBasic\SampleScripts\UI\Canvas\
    It is a new User Interface control just introduced. This is just a basic drawing control that will be further developed in future thinBasic release.

    I think for gaming and 3D/2D, TBGL module is the perfect place where to work. It already has great great power and adding some native 2D will further improve its credibility (already very high) and potential user base.

    Ciao
    Eros
    www.thinbasic.com | www.thinbasic.com/community/ | help.thinbasic.com
    Windows 10 Pro for Workstations 64bit - 32 GB - Intel(R) Xeon(R) W-10855M CPU @ 2.80GHz - NVIDIA Quadro RTX 3000

  10. #10
    thinBasic MVPs
    Join Date
    May 2007
    Location
    UK
    Posts
    1,427
    Rep Power
    159

    Re: 2D Library

    Quote Originally Posted by Pipes

    Yes... I meant image as any pic (sprites are just small images)

    very simple build a square and bind a texture (your image)


    Yes... some drawing primitives would be cool also... i.e. lines, rectangles, squares, filled and non-filled on a window canvas and tgbl screens

    same method as above, look at Polygonal modelling and texture setup. I wont bother posting a simple example when I get time.
    Home Desktop : Windows 7 - Intel Pentium (D) - 3.0 Ghz - 2GB - Geforce 6800GS
    Home Laptop : WinXP Pro SP3 - Intel Centrino Duo - 1.73 Ghz - 2 GB - Intel GMA 950
    Home Laptop : Windows 10 - Intel(R) Core(TM) i5-4210U CPU @ 1.70GHz, 2401 Mhz, 2 Core(s), 4 Logical Processor(s) - 4 GB - Intel HD 4400
    Work Desktop : Windows 10 - Intel I7 - 4 Ghz - 8GB - Quadro Fx 370

Page 1 of 2 12 LastLast

Similar Threads

  1. GMP library: free library for arbitrary precision arithmetic
    By ErosOlmi in forum thinBasic vaporware
    Replies: 24
    Last Post: 03-01-2009, 01:01

Members who have read this thread: 0

There are no members to list at the moment.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •