Page 1 of 3 123 LastLast
Results 1 to 10 of 21

Thread: TBGL possible project ?

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

    TBGL possible project ?

    I found the attached project made with PureBasic and a Irrlicht engine wrapper.
    It seems very doable also in TBGL. What do your think?

    Eros
    Attached Images Attached Images
    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

  2. #2

    Re: TBGL possible project ?

    Hi, why do it in TBGL, you only need to add the dll-call wrapper functions "define... alias..." then you can use the exact same irrlicht calls. .no need to reinvent it in TBGL (which itself is only a wrapper to real gl-functions and therefore quite similar to irrlicht in terms of architecture).

    Thanks for the example, i visited the irrlicht website some days ago and didnt understand how to use their language-wrappers. but as this comes with a dll+wrapperfunctions its as easy as using gdi.dll or opengl.dll.

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

    Re: TBGL possible project ?

    Hi Eros,

    nice game, I like especially the "aaargh" sound

    The visual style and controls are very nice, I think definitely doable in TBGL ( or as Holomind likes, the Roberto Irrlich wrapper could serve too ).

    no need to reinvent it in TBGL (which itself is only a wrapper to real gl-functions and therefore quite similar to irrlicht in terms of architecture)
    When I read this I had tears in my eyes ;D
    TBGL is not just wrapper... and in fact it goes more low level than Irrlicht.
    I am sorry you feel that way, but I understand you, as you joined forum in time in which I am not in best coding shape to spark out the best of TBGL Reinventing wheels is sometimes good for learning.

    Irrlicht makes lot of things easier, but for such a simple project as arkanoid is, I think TBGL would be perfectly enough ( entity/normal system could be used ).
    Give me few days


    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

  4. #4

    Re: TBGL possible project ?

    Petr, keep up the spirit. You are doing an awesome job on TBGL and for me it is the number one choice for thinBasic.
    I also prefer to have the creator of an engine working with the same language I use.

    Holomind, are you sure that it just needs some defined dll functions to use Irrlicht, or is there more involved to it?
    My guess is that you have to fight with C++ to use the Irrlicht classes and then create a wrapper DLL just like Robeto did.

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

    Re: TBGL possible project ?

    Petr, keep up the spirit. You are doing an awesome job on TBGL and for me it is the number one choice for thinBasic.
    Thanks for the nice words Mike


    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

  6. #6

    Re: TBGL possible project ?

    Quote Originally Posted by Psch
    When I read this I had tears in my eyes ;D
    TBGL is not just wrapper... and in fact it goes more low level than Irrlicht.
    i didnt mean to offend you, but for me they seem to be similar architectures/techniqes. Also i need to understand what the benefit of using TBGL instead of pure opengl/wgl/glu/glut etc. calls is.
    Helper-functions to make programing easier and more highlevel is not bad.

    One very important Point of TBGL is, that it was the first "language" for me to get some Opengl examples running in an easy way, also the syntax of thinbasic is better readable than c++.

    Functions like TBGL_LoadTexture() makes it much easier for a Opengl-Beginner. But sometimes i am confused as some functions in TBGL really seem to only reflect the original opengl or glu/glut function but uses a different name.

    For example "TBGL_BeginPoly" equals "gl_begin()". But i guess the Sligty modification of Functionnames makes more sense (as this is used to draw polygons) maybe the tbgl-function-names are more descriptive. (it could be helpful to write in the documentation if this equals some pure opengl or glu/glut call. ) because there are more opengl-tutorials than TBGL-Tutorials. which means the gl_* function-names are more common to somebody learning "real" opengl. But without looking under the hood of the gl_engine. using TBGL is more easy to do gl-programming.



  7. #7

    Re: TBGL possible project ?

    Quote Originally Posted by Michael Hartlef
    Holomind, are you sure that it just needs some defined dll functions to use Irrlicht, or is there more involved to it?
    My guess is that you have to fight with C++ to use the Irrlicht classes and then create a wrapper DLL just like Robeto did.
    But the irrlicht.dll is already in the sample project that eros posted, a dll is "generic" and can be used from within each languages that supports dll-calls. (i even can use this dll within AHK). the only work to do is to write the Wrapper-Definitions inside thinbasic. The only obstacles could be that you get wrong datatypes back from the dllcalls or you need to pass parameters as structs/complex values instead of integer or strings.

    you only need to add the declare function to your thinbasic script and then can use this functions directly. (thats the way it would work in AHK, and i guess the same for thinbasic , or also VBasic which uses a similar syntax) you also need to define some contstants which are Irrlicht specific.
    [code=thinbasic]

    DECLARE FUNCTION IrrlichtFunction1 LIB "Irrlicht.DLL" ALIAS "IrrlichtFunction1" (BYVAL hWnd AS DWORD, lpRect AS RECT) AS LONG


    [/code]

    No C++ Programming involved at all. (Correct me if i am wrong, but thats the way i use GDI and opengl in AHK).

    like here: http://community.thinbasic.com/index...12337#msg12337

    P.S. it seams it is not so easy because there are hundreds of functions inside irrlicht.dll and you need to find the functionnames to use them with "Declare Function". (irrlicht.h : instead of defining the main irrlicht functions directly its only a file which includes lots of other functions. )
    http://irrlicht.sourceforge.net/docu...8h-source.html



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

    Re: TBGL possible project ?

    TBGL is the choice for thinBasic. Irrlicht is good but it is not thinBasic module, we do not have the sources, we cannot implement. TBGL is here with us
    Just for the record Irrlicht is implemented in pure C++ so no way to use other than creating a C or C++ wrapper that exports functions. Making a personalized wrapper is possible, there is alraady a FreeBasic version that can be quite easily portable to thinBasic. But this is not what I want.

    I posted this example because I feel that this game can be a good example for a new common project developed together in forum like what happened for TopDow. We now have entities in TBGL and also other moduels (TBEM module for example) that can be usefull. I see the possibility to develop a general game engine able to load some data files containing game levels developed as data info. Just ideas just in case there is some spare time available. Sounds, big nice graphics, candies can be a secondary. Importand is to have an arena and the main functionalities as general as possible and able to load game levels from external files that must be easy to be created.

    Just sparse ideas.

    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

  9. #9
    thinBasic MVPs kryton9's Avatar
    Join Date
    Nov 2006
    Location
    Naples, Florida & Duluth, Georgia
    Age
    67
    Posts
    3,869
    Rep Power
    404

    Re: TBGL possible project ?

    I am always confused about wrappers and what can and can't be done.
    For instance, how come we can write something as Holomind wrote to use Windows functions in dll's, but for other dll's a module has to be written?
    I don't understand what makes the difference?


    Irrlicht is very nice. I am learning c++ and irrlicht and think it is a very nice combo and a good reason to learn c++.

    TBGL can do so much. I just wrote earlier to Petr that I found some more projects of his I never saw in the bonus pack.
    He as a guru and mastermind of tbgl can do so much, it boggles the mind as many of those examples show.

    About taking time to develop a game right now... I guess we sort of decided to give Petr time to finish school and then to add more to tbgl over the summer.
    Once he has all he has planned finished, something like this should be very easy to do. Probably could be done even now. But better for Petr
    to spend time adding features I think.

    We still have topdown to finish in the future, so many games will spawn once we get that going I would think
    Acer Notebook: Win 10 Home 64 Bit, Core i7-4702MQ @ 2.2Ghz, 12 GB RAM, nVidia GTX 760M and Intel HD 4600
    Raspberry Pi 3: Raspbian OS use for Home Samba Server and Test HTTP Server

  10. #10

    Re: TBGL possible project ?

    Quote Originally Posted by holomind

    No C++ Programming involved at all. (Correct me if i am wrong, but thats the way i use GDI and opengl in AHK).
    As long as you don't need to interface functions inside a CLASS definition, then you can do that. Can you post a link to this wrapper file for freebasic? The zip file of the game Eros posted doesn't inlcude it.

Page 1 of 3 123 LastLast

Similar Threads

  1. tbgl cityfog project
    By christianssen in forum TBGL General
    Replies: 9
    Last Post: 12-03-2010, 09:57

Members who have read this thread: 1

Posting Permissions

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