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

Thread: Tilengine 2D Pascal Wrapper!

  1. #1

    Tilengine 2D Pascal Wrapper!

    Hi pascals,

    I'm here to promote my little Pascal wrapper for Tilengine Library.

    Tilengine is a Retro Raster based library to develop 2D complete games.

    The engine library is coded in C++ and has most language language wrappers (C#, Phyton...) and now Pascal.

    You can find here : http://www.tilengine.org

    You can find the source here : https://github.com/megamarc/Tilengine

    Pascal Wrapper only works with Delphi and FPC under windows from the moment but will be tested on linux ASAP.

    Enjoy!

  2. #2
    Looks very interesting.

    Does it include other stuff as user input and sound, or is it just graphics?

    [edit] I've read the documentation intro. Seems to include some user input but no sound. I wonder if it is worth to use it along with Allegro or SDL.
    Last edited by Ñuño Martínez; 01-08-2016 at 10:46 AM.
    No signature provided yet.

  3. #3
    Hello folks!

    I'm the author of Tilengine. It is entirely written in C (not C++). Currently it's available for Windows x86 and x64, Linux, Raspberry Pi (Raspbian) and Android. Besides its native C interface, it has wrappers for Java, Python, C# and Pascal.

    It's not a complete game development kit, it's specifically a graphics-only library. Think of it as a kind of virtual 2D graphics chip that must be paired with other components.

    It was originally designed without any windowing system, you must provide an external surface for rendering in a compatible pixel format. In this way you can use Tilengine in a SDL application, an OpenGL texture, a Java applet, or whatever framework of your choice. Although very flexible, this approach makes initial steps difficult, because you have to setup an external environment first. For this reason I added a simple built-in windowing with user input, mimicking the controls of a basic arcade cabinet. This windowing system is built on top of SDL for portability and ease of implementation, and it's now easier to setup samples and tests. However this windowing is not intended to be very complete or used in big projects. The initial approach of integrating inside an external environment/framework is still preferred.

    As for its suitability for being used in game development despite of its lack of sound or elaborated input, yes of course! It's like discarding OpenGL, FMOD Ex or Box2D for being graphics-only, sound-only or physics-only.

    Please feel free to ask any other question.
    Enjoy!

  4. #4
    Quote Originally Posted by turrican View Post
    Hi pascals,

    I'm here to promote my little Pascal wrapper for Tilengine Library.

    Tilengine is a Retro Raster based library to develop 2D complete games.

    The engine library is coded in C++ and has most language language wrappers (C#, Phyton...) and now Pascal.

    You can find here : http://www.tilengine.org

    You can find the source here : https://github.com/megamarc/Tilengine

    Pascal Wrapper only works with Delphi and FPC under windows from the moment but will be tested on linux ASAP.

    Enjoy!
    Great work!

    Can you provide a Super Mario clone with pascal source code?

    You've a world editor to create the Super Mario Levels?

    See ya!

  5. #5
    Quote Originally Posted by ironquark View Post
    Great work!

    Can you provide a Super Mario clone with pascal source code?

    You've a world editor to create the Super Mario Levels?

    See ya!
    The SuperMarioClone sample was written in C# to showcase the wrapper for this language, which is very different than the pascal wrapper. Having a version of SMC in Pascal would require a full rewrite of the sample. However, anybody is encouraged to do the work, of course! I'll be glad to include it in the official package citating the author.

    To edit the maps of all the samples (including super mario clone) I use the open source Tiled Map Editor, Tilengine reads its file format natively.

    Regards!

  6. #6
    Quote Originally Posted by megamarc79 View Post
    The SuperMarioClone sample was written in C# to showcase the wrapper for this language, which is very different than the pascal wrapper. Having a version of SMC in Pascal would require a full rewrite of the sample. However, anybody is encouraged to do the work, of course! I'll be glad to include it in the official package citating the author.

    To edit the maps of all the samples (including super mario clone) I use the open source Tiled Map Editor, Tilengine reads its file format natively.

    Regards!
    I'm glad to know about Map Editor thank you very much!

  7. #7
    Quote Originally Posted by megamarc79 View Post
    Hello folks!

    (...) you must provide an external surface for rendering in a compatible pixel format. (..)
    I see. That's the hard thing.

    This works also in the other direction? I mean, loading/creating bitmaps with an external library (SDL, for example) and use them as tiles and sprites.
    No signature provided yet.

  8. #8
    Both in SDL1 and SDL2, when you create surfaces, you can specify the pixel format - when you create an RGB texture, you need to specify the R,G,B,A-masks. You can have RGBA, ABGR or whatever you really want (although with some pixel formats, SDL's "draw line" / "fill rect" functions seem buggy and may draw a blue rectangle instead of a red one). So I guess you could try creating a Tilengine-compatible surface that way.

  9. #9
    Quote Originally Posted by Super Vegeta View Post
    Both in SDL1 and SDL2, when you create surfaces, you can specify the pixel format - when you create an RGB texture, you need to specify the R,G,B,A-masks. You can have RGBA, ABGR or whatever you really want (although with some pixel formats, SDL's "draw line" / "fill rect" functions seem buggy and may draw a blue rectangle instead of a red one). So I guess you could try creating a Tilengine-compatible surface that way.
    Tilengine uses an ARGB pixel format for 32 bpp, and packed 565 RGB for 16 bpp. Both formats are broadly supported almost anywhere.

  10. #10
    Quote Originally Posted by Ñuño Martínez View Post
    This works also in the other direction? I mean, loading/creating bitmaps with an external library (SDL, for example) and use them as tiles and sprites.
    Yes! I wrote the loaders to support Tiled file formats (based on xml and png), but you can implement your own. The API has several functions to build the assets at runtime in memory, actually my standard loaders use those functions internally. Please check the GitHub project, the modules LoadTileset.c and LoadTilemap.c for example. Using them as a reference, you can build yours. Source is C language, but the pascal wrapper is a very thin direct translation of the API, you'll get the point easily.

    The website and GitHub project are a bit outdated, but I'm working to push the current updates and download links. Tilengine has now builds for Raspberry Pi and Android, and the new 16 bpp format for mobile GPUs that don't handle well 32 bpp textures. Managing so much target platforms, language wrappers and examples is becoming increasingly difficult!

Page 1 of 3 123 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
  •