Tilengine - 2D graphics engine with raster effects

Discussion in 'Game Development (Technical)' started by megamarc, Jul 29, 2015.

  1. megamarc

    megamarc New Member

    Joined:
    Jul 28, 2015
    Messages:
    12
    Likes Received:
    3
    Hello,

    I’ve released a freeware, cross-platform graphics engine specifically aimed to the creation of 2D retro/classic style games. It’s based on tilemaps, sprites and palettes. It supports rotation, scaling, different modes of transparency and animations (tiles, sprites and color cycling).

    Its unique feature is its rendering algorithm, that is scanline based in the same way as real 2D video chips worked: it renders complete scanlines sequentially, providing a callback for each line drawn (a kind of virtual h-interrupt) that allows changing all the rendering parameters at will for each scanline. This is the basis of raster effects, a key technique in many visual effects in classic hardware that no other engine offers.

    It’s currently available for Windows and Linux (more platforms to come) and requires C or Python programming (more languages to come). You can download from its webpage and watch some video samples in its youtube channel
     
    NO9 likes this.
  2. megamarc

    megamarc New Member

    Joined:
    Jul 28, 2015
    Messages:
    12
    Likes Received:
    3
    Version 1.4.0 released

    This new version is mainly focused on a new palette animation engine (color cycle), but it has other new features too:

    * Added functions for direct manipulation of data resources, to allow procedural generation and custom loaders
    * Added background static bitmap layer (TLN_SetBGBitmap and TLN_SetBGPalette) in addition to solid color
    * Made TLN_Bitmap interface public, required by previous features
    * New color cycle animation engine, with various zones and smooth color blending
    * Added TLN_SetPaletteAnimationSource and TLN_MixPalettes for smooth palette interpolation
    * Host: added horizontal blur effect (TLN_EnableBlur)
    * Host: added TLN_GetTicks function for time control
    * Fixed many situations where accessing an invalid resource caused access violation
    * Fixed palette loading bug in TLN_LoadPalette (red and blue components swapped)
    * Modified some samples with a sky color gradient and the new color cycle engine
     
    #2 megamarc, Aug 16, 2015
    Last edited: Aug 26, 2015
  3. megamarc

    megamarc New Member

    Joined:
    Jul 28, 2015
    Messages:
    12
    Likes Received:
    3
    Java support with JNI wrapper

    I've added Java support with a JNI wrapper (for Windows and Linux) so it's now possible to use Tilengine in Java applications. The download pack has been restructured to accomodate the new features, and the supplied Java samples show how to render tilengine inside an AWT JFrame instead of its default windowing.

    More info in http://www.tilengine.org
     
  4. wanbilucky

    wanbilucky New Member

    Joined:
    Aug 15, 2015
    Messages:
    4
    Likes Received:
    0
    This is actually a great idea if I understand it correctly: An engine built for modern platforms that emulates the limitations, gfx modes, emulates the sound engine of the NES/GBA, etc. without limiting CPU/video memory or CPU speed. I imagine it could be reimplemented as a subset of libSDL.
     
  5. megamarc

    megamarc New Member

    Joined:
    Jul 28, 2015
    Messages:
    12
    Likes Received:
    3
    It is similar to what you say, but not exactly the same. It's not a full game engine, only a graphics engine. No sound, IA, actor management... In general terms this engine replicates in software, for modern platforms, the inner working of 2D VDPs, but it's not an emulator of a particular platform but a new desingn from the ground up. It has the tiled backgrounds, sprites, palettes, scanline rendering with raster effects; the column offset mode of Sega Genesis, the scaling sprites of Sega SuperScaler and NeoGeo arcades, affine transformed layers of Super Nintendo and GBA... but there are important differences too:

    Real VDPs worked with 16-color source graphics, where each individual tile could be assigned one palette (which were hardware limited). Sprites were composed of tiles, so their sizes were limited and always multiple of 8 pixels. Tilemaps had to be streamed from the ROM to the video memory, which could hold only a small viewport, as the player moved. Transparencies were non-existent or very limited (SNES).

    Tilengine works with 256-color source graphics, each layer or sprite (but not individual tiles) can have a different palette, that aren't limited in number. Sprites aren't composed of tiles and can have any arbitrary size. Tilemaps don't need to be streamed, the full map is always accessible. Just tell Tilengine where the viewport is located at a given moment with 1 pixel precision. Transparency effects are much more sophisticated: mix, addition and modulation with 256 levels of adjust each one.

    For convenience and easy setup, the engine has a built-in windowing and user input that already uses SDL as its back-end. But this feature can be bypassed and you can supply your own host or framework, just give tilengine a writable memory array where to draw. For example, one of the supplied Java samples uses a MemoryImageSource to draw inside an AWT JFrame component instead of its own window.
     
  6. melight

    melight New Member

    Joined:
    Sep 15, 2015
    Messages:
    15
    Likes Received:
    4
    That's a pretty humongous piece of work you did there friend. Did you write for your own game? Or just for the kicks of it?
     
  7. higgipoker

    higgipoker New Member

    Joined:
    Sep 21, 2015
    Messages:
    58
    Likes Received:
    14
    I normally don't go in for gratuitous backslapping just for the sake of it but, oh my, I must indulge myself this time:

    [​IMG]

    Well done, sir.
     
    megamarc likes this.
  8. megamarc

    megamarc New Member

    Joined:
    Jul 28, 2015
    Messages:
    12
    Likes Received:
    3
    Thanks for your comment! I'm not developing any game. I created it because I think that those 2D chips were capable of some truly amazing effects, for what they were supposed to do, when used with creativity. Modern GPUs are much more powerful but aren't direct desdendants of them, so palette and raster effect trickery has been lost. So here are again for anybody interested! And I think it's fun too...
     
  9. megamarc

    megamarc New Member

    Joined:
    Jul 28, 2015
    Messages:
    12
    Likes Received:
    3
    Many thanks man! What else can I say? This kind of comments drive me to continue working hard on it :)
     
    DukeofRealms likes this.
  10. megamarc

    megamarc New Member

    Joined:
    Jul 28, 2015
    Messages:
    12
    Likes Received:
    3
    List of new features and updates since the last post here. Current release is 1.10
    • Project hosted on GiHub, with loaders and windowing modules released as open source: Github.com
    • Added 16 bpp RGB565 target surface in addition to the original 32 bpp XRGB
    • Raspbian platform: official OS in the Raspberry Pi
    • Android platform: partial support, it lacks the built-in windowing because it uses SDL on the other platforms. The application must provide the rendering surface and user input. For the ARMv7A architecture (hardware floating point)
    • Bindings for the following languages: Python, Java, C# .NET/Mono and Pascal
    • Implemented optional pixel-accurate sprite collision detection
    • Added error handling and recovery
    • Added blending to affine transformed layers
    • Added new active rendering API without using callbacks for the raster effects, to ease writing some bindings. The original method is supported too.
    • Added functions to modify tilesets and tilemaps at runtime
    • Better sprite-tilemap collision info
    • New formats supported by the Spriteset loader
    • New blending mode: modulation
    • New tileset-based animation sequencer
    • Graphic assets can be located in its own directory, they no longer need to be located in the same directory as the executable
    • More examples in different languages demonstrating the new features and bindings, like this one
    • Many bugfixes
     
  11. kaufenpreis

    kaufenpreis New Member

    Joined:
    Aug 1, 2014
    Messages:
    95
    Likes Received:
    3
    Where can I find your latest work on youtube channel?
     
  12. megamarc

    megamarc New Member

    Joined:
    Jul 28, 2015
    Messages:
    12
    Likes Received:
    3
  13. megamarc

    megamarc New Member

    Joined:
    Jul 28, 2015
    Messages:
    12
    Likes Received:
    3
    I've adhered to the FreeBSD license (equivalent to the BSD-2 and MIT) that guarantees free use on any kind of project as long as the copyright notice about the author is attached in both sources and binaries. Website and GitHub repository have been updated.
     
  14. megamarc

    megamarc New Member

    Joined:
    Jul 28, 2015
    Messages:
    12
    Likes Received:
    3
    I've released support for linux 64-bit (amd64). The GitHub project, webpage and download section are already updated

    tilengine_linux64.png
     
  15. megamarc

    megamarc New Member

    Joined:
    Jul 28, 2015
    Messages:
    12
    Likes Received:
    3
    Released v1.12 with many new features and improvements:
    • Added macOS 64-bit platform
    • Improved overall performance, specially with big tilesets, solid areas and blending
    • Reworked blending and added custom function callback for used-defined blending
    • Added SNES-style mosaic effect for layers
    • Added highly customizable CRT post-processing effect
    • Added palette manipulation functions to aid in creating fades, flashes, tinting...
    • New python wrapper that uses python-style functions for better IDE integration and introspection
    • The "Benchmark" sample now uses a real tsx/tmx pair instead of just random noise
    • New layer clipping feature: restrict background layers to a rectangular region
    For detailed info and downloads visit http://www.tilengine.org
     
    higgipoker likes this.
  16. megamarc

    megamarc New Member

    Joined:
    Jul 28, 2015
    Messages:
    12
    Likes Received:
    3
    Ive released several big updates since last post. The official news channel is the Facebook page , and the GitHub page hosts the latest version, examples, binaries, etc...
     
  17. higgipoker

    higgipoker New Member

    Joined:
    Sep 21, 2015
    Messages:
    58
    Likes Received:
    14
    Still keeping tabs on this. Great job, keep it ip! :)
     

Share This Page

  • About Indie Gamer

    When the original Dexterity Forums closed in 2004, Indie Gamer was born and a diverse community has grown out of a passion for creating great games. Here you will find over 10 years of in-depth discussion on game design, the business of game development, and marketing/sales. Indie Gamer also provides a friendly place to meet up with other Developers, Artists, Composers and Writers.
  • Buy us a beer!

    Indie Gamer is delicately held together by a single poor bastard who thankfully gets help from various community volunteers. If you frequent this site or have found value in something you've learned here, help keep the site running by donating a few dollars (for beer of course)!

    Sure, I'll Buy You a Beer