megamarc
Posts: 12
Joined: Fri Nov 04, 2016 7:31 pm
Location: Barcelona (Spain)
Contact: Website

Tilengine - 2D retro graphics library with raster effects

Fri Nov 04, 2016 8:14 pm

Hello,

Tilengine is a free, cross-platform graphics library designed to follow the working principles of the 2D graphics chips found in video game systems of the 80s and 90s, known collectively as VDP (Video Display Processor). It works with a fixed set of background layers composed of tilesets and tilemaps, and a fixed set of sprites. Instead of drawing to a whole framebuffer and then blitting to screen, you control de properties of the layers and the sprites, and then the rendering algorithm draws sequentially full scanlines from top to bottom. With a callback that acts as a virtual horizontal blanking interrupt, you can modify the attributes of objetcs between scanlines, opening the door to a wide array of so-called raster effects. These effects were at the core of many high profile arcade and console games of the 16-bit era.

Tilengine has all the features found ond different VDPs: scaling sprites of Sega' SuperScaler arcade board, affine transformed backgrounds and blending effects of the Super Nintendo, and unlimited tilesets, tilemaps, map size and color palettes (which were quite limited on real hardware)

It is available for the Raspberry Pi (as well as Windows, Linux and android). The core API is C language, but has bindings for Python, C# (Mono 2.0) and Java. Performance in Pi 3 is quite good, but I haven't tested it on other models.

I've created Tilengine for two reasons: as an easy and fun way to program retro graphics on modern hardware, and as an educational tool: to show how 2D graphics systems work, how they were programmed, and how creative use of raster effects allowed for impressive graphics on seemingly limited hardware. Raspberry Pi is an educational tool and I think Tilengine suits its philosophy.

Please check the website and youtube channel

Enjoy!

megamarc
Posts: 12
Joined: Fri Nov 04, 2016 7:31 pm
Location: Barcelona (Spain)
Contact: Website

Tilengine tutorials for Python

Thu Nov 10, 2016 5:07 pm

I'm releasing a series of step-by-step tutorials on how to use tilengine in python. They're in a zip file that contains a PDF with the tutorials, source code and related assets. There's a lot to cover, but you can already learn about basic initialization, working with layers and sprites, and introduction to raster effects. More content is underway.
You can download them here: http://www.tilengine.org/downloads/PyTutorials.zip

User avatar
karrika
Posts: 952
Joined: Mon Oct 19, 2015 6:21 am
Location: Finland

Re: Tilengine - 2D retro graphics library with raster effect

Thu Nov 10, 2016 5:18 pm

Thank you for sharing. A brief look at the sources was very encouraging. Perhaps I will create something fun for the Pi using this.

fishbob
Posts: 11
Joined: Sun Nov 27, 2016 3:32 pm

Re: Tilengine - 2D retro graphics library with raster effect

Tue Nov 29, 2016 6:01 pm

Trying to make all the sample projects with "make all" and all I'm getting is .o files. Whats the next step?

They are in the bin directory, sorry.

megamarc
Posts: 12
Joined: Fri Nov 04, 2016 7:31 pm
Location: Barcelona (Spain)
Contact: Website

Re: Tilengine - 2D retro graphics library with raster effect

Wed Jan 04, 2017 5:45 am

Version 1.10 released:
* Improved animation engine with new tileset sequencer
* Improved spriteset loader with new csv format compatible with Leshy SpriteSheet Tool
* New blending mode: modulation
* Many small bugfixes and improvements
* New SuperMarioClone C sample that showcases many of the new features

Latest Raspbian package can be downloaded clicking here

For the complete list of changes, please visit GitHub project page:
https://github.com/megamarc/Tilengine

megamarc
Posts: 12
Joined: Fri Nov 04, 2016 7:31 pm
Location: Barcelona (Spain)
Contact: Website

Re: Tilengine - 2D retro graphics library with raster effect

Sat Jan 14, 2017 3:02 pm

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.

megamarc
Posts: 12
Joined: Fri Nov 04, 2016 7:31 pm
Location: Barcelona (Spain)
Contact: Website

Re: Tilengine - 2D retro graphics library with raster effect

Wed Jan 18, 2017 5:18 pm

I've released support for 64-bit linux (amd64). The GitHub project, webpage and download section are already updated.

Image

megamarc
Posts: 12
Joined: Fri Nov 04, 2016 7:31 pm
Location: Barcelona (Spain)
Contact: Website

Re: Tilengine - 2D retro graphics library with raster effect

Wed Apr 26, 2017 6:06 pm

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

megamarc
Posts: 12
Joined: Fri Nov 04, 2016 7:31 pm
Location: Barcelona (Spain)
Contact: Website

Tilengine - New Python binding

Wed May 03, 2017 9:51 pm

I've released a newer, much improved python binding for Tilengine. You can read the full info, examples and download link in the Facebook page:
https://www.facebook.com/notes/tilengin ... 446757099/

shapeshiftinglizard
Posts: 2
Joined: Mon May 15, 2017 7:59 pm

Re: Tilengine - 2D retro graphics library with raster effect

Mon May 15, 2017 8:26 pm

I also have a similar engine, it's called PixelPerfectEngine (repository found here, and it's still under development, and I still haven't tested it on Raspberry Pi as some of the drawing functions still don't have non-SSE2 implementations. It's written in D, but with the LDC compiler it should work with Raspberry Pi (well, after I write non-x86 implementations of the drawing functions).

Currently implemented features:
-Tile and sprite layers.
-Input polling.
-8 bit bitmaps for accessing a 256 color palette set somewhere in the memory (including the 65536 color master palette), 16 bit bitmaps for accessing any color of the master palette, 32 bit bitmaps for non-indexed bitmaps.
-Transparency support via alpha blending. Blitter is also available if transparencies are not needed (no real performance benefits on my AMD Athlon 64 x2 config).
-Built in AmigaOS/RiscOS influenced framework for various applications (eg: in-engine editor)

Planned in the future:
-Custom sound engine with sample-based synthesizer.
-Sprite scaling and rotation.
-GPU acceleration through either OpenCL, Cuda, or GPU assembly (which is required for the Broadcom Videocore IV).

megamarc
Posts: 12
Joined: Fri Nov 04, 2016 7:31 pm
Location: Barcelona (Spain)
Contact: Website

Re: Tilengine - 2D retro graphics library with raster effect

Tue May 16, 2017 8:00 am

Although the Tilengine library is written in C, since I released the new Python binding I'm focusing the development of demos and examples for Python. I've already ported the original demos to the new binding and released new ones, that can be viewed here:
https://github.com/megamarc/Tilengine/t ... ngs/python

Many of them make extensive use of raster effects and other visual tricks not available in other 2D engines, and have videos in youtube showing them in motion:
https://www.youtube.com/watch?v=aJPRxgE1Ins
https://www.youtube.com/watch?v=c9i1SLyuSEA
https://www.youtube.com/watch?v=gvLNXn37k78
https://www.youtube.com/watch?v=wLTK2Dmgrrc
https://www.youtube.com/watch?v=zPcUNLTq1Ho

All demos run at 60 fps in Raspberry Pi 3, I haven't tested older models but they should work too.

megamarc
Posts: 12
Joined: Fri Nov 04, 2016 7:31 pm
Location: Barcelona (Spain)
Contact: Website

Version 1.14 released

Tue Jun 06, 2017 8:26 pm

Ive released version 1.14, mainly focused on a much higher integration with the Tiled map editor. Full details disclosed in Facebook page with some examples and link to GitHub page

tvjon
Posts: 554
Joined: Mon Jan 07, 2013 9:11 am

Re: Tilengine - 2D retro graphics library with raster effect

Wed Jun 07, 2017 11:52 am

Hello megamarc.

Along with Raysan5, it looks like interesting software comes from Spain :-)

However, how did you manage to build it on RaspberryPi?

...
gcc -c -W -Wall -O2 -I"/usr/local/include" LoadTilemap.c -o LoadTilemap.o
LoadTilemap.c:52:21: fatal error: Palette.h: No such file or directory
#include "Palette.h"
^
compilation terminated.
Makefile:23: recipe for target 'LoadTilemap.o' failed
make: *** [LoadTilemap.o] Error 1

megamarc
Posts: 12
Joined: Fri Nov 04, 2016 7:31 pm
Location: Barcelona (Spain)
Contact: Website

Re: Tilengine - 2D retro graphics library with raster effect

Wed Jun 07, 2017 2:09 pm

tvjon wrote:Along with Raysan5, it looks like interesting software comes from Spain :-)
Thanks man :) I've had some chat with Raysan in the past, his Raylib framework is awesome.
tvjon wrote:However, how did you manage to build it on RaspberryPi?
I've just pushed an update that fixes the "Palette.h" dependency, you can grab the new source here: https://github.com/megamarc/Tilengine/b ... dTilemap.c
However you can't build the library from sources because some core parts are closed source, not publicly available. The public loaders and windowing parts don't have direct dependencies on the rendering kernel and they're open source to be used as a reference for implementing custom loaders or window managers. You can grab the binary release, tested on a Raspberry Pi 3: https://github.com/megamarc/Tilengine/b ... lengine.so

megamarc
Posts: 12
Joined: Fri Nov 04, 2016 7:31 pm
Location: Barcelona (Spain)
Contact: Website

Tilengine - The 2D retro graphics engine

Sun Aug 06, 2017 6:22 pm

Release 1.15 available
Read the full post in this facebook note

  • Minor bugfixes
  • GitHub: Rearranged project folders into a new tree
  • GitHub: Detailed info about install and first steps in README.md
  • Python wrapper: Complete docstrings documenting the full API
  • Python wrapper: new and updated examples
  • Downloads now hosted in itch.io project page

megamarc
Posts: 12
Joined: Fri Nov 04, 2016 7:31 pm
Location: Barcelona (Spain)
Contact: Website

Tilengine - Dedicated forun online

Sat Aug 19, 2017 9:04 pm

I've created a forum for answering questions and support about Tilengine. I'll continue posting news here.
http://www.tilengine.org/forum/index.php

Return to “Graphics programming”

Who is online

Users browsing this forum: No registered users and 2 guests