Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags
0

RetroBlit - A Retro Game Framework

A topic by dafu created Jan 11, 2018 Views: 1,160 Replies: 10
Viewing posts 1 to 10
(7 edits)

Hello all,

I'd like to introduce you all to RetroBlit Retro Game Framework:

https://pixeltrollgames.itch.io/retroblit

RetroBlit - A Retro Game Framework is a different take at retro game development in Unity. RetroBlit aims to provide a simple hassle-free API for a frictionless pixel perfect environment in which to develop 1990s era true retro games. What makes RetroBlit different is that it does away with the Unity IDE almost entirely, opting out instead for a code-only classic game-loop based environment. There is no scene management, no game objects, no fiddling with camera and asset importing. With RetroBlit you don't need to worry about how to cram that perfect retro feel into Unity, retro is what RetroBlit does. RetroBlit has its own rendering pipeline, and its own audio and input APIs.

Here are some of RetroBlit features:

  • Pixel perfect rendering
  • Primitive shape rendering, lines, rectangles, triangles, ellipses, pixels
  • Multi-layered tilemaps with extensive TMX file support which includes support for infinite maps, objects, and custom properties
  • Rendering to and from sprite sheets
  • Unicode text rendering, with text alignment, overflow settings, and custom pixel font support
  • Sprite packing support
  • A set of 30 tweening/interpolation functions
  • Clipping
  • Custom shader support
  • Sound and music APIs
  • Simplified input handling
  • Optional wide and tall pixel support (think 1980s computer games)
  • Post processing and transition effects, such as scanlines, screen wipes, screen shake, fade, pixelate and more
  • Garbage Collection aware code, for smooth play without hiccups!

Here is what a simple "Hello World" app looks like in RetroBlit:

public class HelloWorld : RB.IRetroBlitGame
{
    public RB.HardwareSettings QueryHardware()
    {
        var hw = new RB.HardwareSettings();
        hw.DisplaySize = new Size2i(320, 180); 
        return hw;
    }
 
    public bool Initialize()
    {
        return true;
    }
 
    public void Update()
    {
    }
 
    public void Render()
    {
        RB.Clear(new Color32(128, 128, 128, 255));
        RB.Print(new Vector2i(137, 80), Color.white, "Hello World");
    }
}

If you're interested in developing Retro games then RetroBlit may be for you. If you think fantasy consoles are great but wish they were more commercially viable and portable then RetroBlit is definitely for you!

Never used Unity, don't want climb that Unity learning curve? No worries, you only need the very bare minimum Unity knowledge to create a RetroBlit project, and I've got you covered with this guide: http://www.pixeltrollgames.com/RetroBlit/docs/unity.html

But that's just words, have a look at the link above for a live WebGL demo, and a number of stand-alone builds for various platforms!





Admin

This looks really cool.  I haven't really used unity but if I do in the future I'd definitely want to check this out.

(1 edit)

thanks! It's really not like using Unity at all, it's just piggy backing on Unity but the work flow is code only and completely different. It's a very simple no-nonsense api akin to what you can see in Fantasy Consoles.

Just added a basic Unity guide for those who have never used Unity before. You only need bare minimum knowledge of Unity to create a FES project. The guide is at: http://www.pixeltrollgames.com/fes/docs/unity.html

v1.4 was just released! It brings custom shader support and ability to specify which and when post-processing effects are applied.

v1.4 February 5th 2018:
New:

  • Added custom shader support! Shaders can now be applied in pixel-perfect space when drawing sprites/primitives/fonts, and also at post-process effect time. See FES.ShaderSetup(), FES.ShaderSet(), FES.EffectShader()
  • Added FES.EffectApplyNow() API which specifies when post-processing effects should be applied. This is very useful if you want some drawing (eg GUI) to be affected by different post-processing effects (or none at all)
  • Added FES.PaletteColorSet() overload that allows for setting colors directly from another palette file, rather than manually one at a time
  • Added FES.SpriteIndex() overload that takes sprite sheet index as a parameter, previously FES.SpriteIndex() only worked for current sprite sheet
  • Added Unity Crash Course to the Documentation to help new Unity developers get started with FES

Bug Fixes:

  • Fix incorrect clipping region on Offscreen surface of different size than FES.DisplaySize
  • Fix Tilemap cell not updating when only the Tint Color or Flags are changed
  • Fix some Tilemap chunks becoming invalid and unsuable if all tiles set manually set to empty/invalid with FES.MapSpriteSet()
  • Fix some Tilemap chunks not rendering on Offscreen surface of different size than FES.DisplaySize
  • Fix Tilemap rendering when using the Offset parameter, some chunks were not rendered
  • Fix Tilemaps leaking Meshes
  • Fix built-in font not rendering properly if there is no sprite sheets loaded

v1.4.1 is now out. This is a small bug fix release.

New:

  • Added FES.BatchDebugEnable and FES.BatchDebugDisable which shows how many batch/flush operations are being performed and why

Bug Fixes:

  • Fix tilemap chunks not being clipped at an early stage in the pipeline if they are completely out of clip bounds. This should improve tilemap rendering performance in some scenarios

Check out FES at: https://pixeltrollgames.itch.io/fes
Have a look at a FES game in the works, Merl: https://pixeltrollgames.itch.io/merl

FES is now at v1.4.2. It has seen a whole slew of improvements since the original release, but not as many adoptions as I would like to see! Today I'm putting it on a 100% sale (free) for a week only, in hopes of spurring some new interest! I hope you give it a try and find something in it to love!

(1 edit)

FES 1.5.0 is out now. This release includes fully commented source code to a new demo game, BrickBust:

Try BrickBust out at: https://pixeltrollgames.itch.io/brickbust
Or free on Google Play: https://play.google.com/store/apps/details?id=com.mcietwie.brick_bust


New:

  • Added BrickBust complete brick-breaker demo game!
  • Added FES.Ticks and FES.TicksReset APIs

Bug Fixes:

  • Fix game FES.Effect.Slide not clipping to FES.Display bounds corrects.
  • Fix FES.PaletteSwapGet not return the same value as set by FES.PaletteSwapSet!
  • Fix Tilemap rendering issues when -FES.HardwareSettings.MapSize is not a multiple of the internal chunk size (16)

Version 2.0 is now available! FES is also renamed to RetroBlit!

This major version update is significantly bigger than previous updates.

New:

  • FES is now named RetroBlit! See http://www.pixeltrollgames.com/RetroBlit/docs/namechange.html
  • Tiled TMX support reworked!
  • TMX files are automatically converted into a RetroBlit binary format for faster access.
  • Added support for TMX map, layer, object, and tile properties.
  • Added support for TMX objects, with support for object templates.
  • Added support for TMX infinite maps, and chunk by chunk loading.
  • All TMX compression formats are now supported.
  • Significant performance improvements, sprite benchmarks are up to 2-3x faster.
  • Allocation garabage generated in RetroBlit from frame to frame is reduced from 500-2000 bytes down to 40 bytes. No Garbage Collection hiccups.
  • Added FastString class, a zero-garbage replacement for strings.
  • Added a set of 30 easing functions for interpolating values, vectors, colors and more!
  • Added ability to render into any sprite sheet, as well as creating blank sprite sheets which now replace offscreen surfaces.
  • Added new Clear(color, rect) method for clearing only a section of the display or sprite sheet
  • Added DrawTriangle and DrawTriangleFill primitives.
  • Added new Wavy and Shaky text effects
  • Added ability to change text font inline
  • Added a flag for ignoring inline text color changes (you can use this to render drop shadows behind text with inline color changes)
  • Added ability to retrieve RetroBlit rendering surface so that you can render it manually, see the new OldDays demo scene!
  • Added OldDays demo
  • RetroBlit can now be reinitialized at any time by subsequent calls to RB.Initialize and should no longer cause trouble if the Scene is reloaded. It's also possible to switch between different RetroBlit games by calling RB.Initialize for a different game.
  • Removed Indexed Color Mode support and all related APIs. See rationale here: http://www.pixeltrollgames.com/RetroBlit/docs/indexmode_removal.html
  • Removed Size2i, now Vector2i also has width and height members (which are aliases for x, and y)
  • Removed ColorRGBA, use Color32 or Color instead
  • Removed HelloWorld demo, improved MyGame template instead

Bug Fixes:

  • Fix SpriteSheetSize() returning wrong values
  • Fix sprite sheet not loading if only tilemaps are being rendered
  • Fix rendering of primitives on some old hardware
  • Fix bad default audio compression on audio import

RetroBlit 2.1 is out now! This update adds support for Sprite Packs! You now have the option of storing folders full of individual sprite images and then letting RetroBlit stitch them together into Sprite Packs for you.

If you're considering using RetroBlit but would like to evaluate it first then please send me a private message.

RetroBlit v2.2 is out!

This version has re-written documentation with now over 9000 lines of API docs alone!

NEW:

  • Added Unicode support to built-in and custom fonts!
  • Added Multitouch support, up to 4 touch points can be tracked with RB.PointerPos.
  • RB.BTN_POINTER_ABC renamed to RB.BTN_POINTER_ANY, RB.BTN_POINTER_D added.
  • Added RB.NativeScreenToDisplayPos for translating native screen coordinates to RetroBlit display coordinates.
  • Added RB.NO_ESCAPE_CODES flag for Print to ignore RetroBlit string escape codes and print the raw string.
  • Rewrote and vastly improved documentation, including over 9000 lines of API documentation!

BUG FIXES:

  • Fix music not stopping and audio not cleaning up when switching games with RB.Initialize.
  • Don't let sprite sizes be bigger than sprite sheet size.
  • Fix sprite clipping when using RB.ROT_90_CW.