Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

1411512 Posts in 69376 Topics- by 58430 Members - Latest Member: Jesse Webb

April 26, 2024, 03:51:06 PM

Need hosting? Check out Digital Ocean
(more details in this thread)
TIGSource ForumsDeveloperTechnical (Moderator: ThemsAllTook)RetroBlit - A fantasy console inspired game framework
Pages: 1 [2]
Print
Author Topic: RetroBlit - A fantasy console inspired game framework  (Read 11211 times)
dafu
Level 0
**



View Profile
« Reply #20 on: December 04, 2018, 06:27:56 AM »

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
Logged
cykboy
Level 2
**

ye


View Profile
« Reply #21 on: December 04, 2018, 02:11:29 PM »

i'd be impressed if it wasn't in unity Sad
Logged
dafu
Level 0
**



View Profile
« Reply #22 on: December 04, 2018, 05:55:47 PM »

i'd be impressed if it wasn't in unity Sad

I can understand that sentiment. However, RetroBlit only ties into Unity at a very low level, to push vertices to the GPU and then draw them. RetroBlit is a code only C# API and does not use the Unity editor beyond the point of pressing the "play" button to run your game. RetroBlit workflow is nothing like a standard Unity project. You can also attach to your game using Visual Studio Debugger so debugging is very nice.

The reason I picked Unity as the base is simply because it takes care of deployment to all platforms from PC to Mobile to Console, it has more complete cross platform support out of the box than any other solution I'm aware of.

Logged
cykboy
Level 2
**

ye


View Profile
« Reply #23 on: December 05, 2018, 06:06:45 PM »

i'd be impressed if it wasn't in unity Sad

I can understand that sentiment. However, RetroBlit only ties into Unity at a very low level, to push vertices to the GPU and then draw them. RetroBlit is a code only C# API and does not use the Unity editor beyond the point of pressing the "play" button to run your game. RetroBlit workflow is nothing like a standard Unity project. You can also attach to your game using Visual Studio Debugger so debugging is very nice.

The reason I picked Unity as the base is simply because it takes care of deployment to all platforms from PC to Mobile to Console, it has more complete cross platform support out of the box than any other solution I'm aware of.



do you think there is a native possibility? cross-platform dev is pretty easy these days, the only thing imo that unity does better is console integration (switch, ps etc) since they arent really open to the public.
Logged
dafu
Level 0
**



View Profile
« Reply #24 on: December 05, 2018, 06:52:08 PM »

Quote
do you think there is a native possibility? cross-platform dev is pretty easy these days, the only thing imo that unity does better is console integration (switch, ps etc) since they arent really open to the public.

Console is a big deal, vast majority of other engines don't provide console support due to the various console dev kit requirements. But besides that, on Unity it is just one click to compile for any of those platforms, on some other solutions there are makefiles, libraries, and make tools to maintain for each platform.

Anyhow, native as in C/C++ is not likely to happen for RetroBlit as it would be a large rewrite. I was considering however putting a platform separation layer between RetroBlit and Unity, and adding the ability to then re-implement the minimal Unity APIs in a different framework, like SDL on C#. I haven't scoped out the work enough to make sure I can do this cleanly yet, so I'm not making any promises, but in theory it's doable. Personally what I would want out of this approach would be RetroBlit on SDL C# for development due to better integration with Visual Studio and therefore a nicer workflow and debugging experience, but in the end I would still deploy/release using Unity for the cross-platform support, and some other free features like monetization implementations on Unity.
Logged
InfiniteStateMachine
Level 10
*****



View Profile
« Reply #25 on: December 21, 2018, 07:28:21 PM »

Have you investigated monogame? I've had a lot of luck with multi-targetting on it. It has its pain points but these days it's a lot more mature.
Logged

dafu
Level 0
**



View Profile
« Reply #26 on: December 22, 2018, 03:29:00 PM »

Have you investigated monogame? I've had a lot of luck with multi-targetting on it. It has its pain points but these days it's a lot more mature.

You mean Monogame as a base for RetroBlit? Yeah that's a possibility, but it's not as cross-platform friendly as Unity. Also Unity upcoming ECS and Project Tiny will align quite well with RetroBlit I think. These are available already in preview form but I haven't had the time to dive into them yet.
Logged
darkhog
Level 7
**


Dragon Agent


View Profile
« Reply #27 on: December 25, 2018, 10:45:57 PM »

Great work mate. Seems to be worth the price!
Logged


Be a computer virus!


I cannot C well, so I stick with simpler languages.

There are no impossible things, there is only lack of skill.
dafu
Level 0
**



View Profile
« Reply #28 on: March 15, 2019, 02:58:18 PM »

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.
Logged
dafu
Level 0
**



View Profile
« Reply #29 on: June 19, 2019, 05:35:29 AM »

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.
Logged
dafu
Level 0
**



View Profile
« Reply #30 on: November 18, 2019, 04:17:32 PM »

RetroBlit v2.3 is out!

NEW:
  • Added "any key" support through new APIs RB.AnyKeyDown, RB.AnyKeyPressed, RB.AnyKeyReleased.
  • Improved ellipse drawing performance, line quality, and perfect symmetry.
  • Added new APIs to FastString for finding substrings, trimming, padding, and more.
  • Added equality operator to PackedSpriteID and PackedSprite.
  • Added Retro Dungeoneer, a roguelike demo game.


BUG FIXES:
  • Fix bug in Rect2i.Intersect.

Check it out at: https://assetstore.unity.com/packages/templates/systems/retroblit-102064

And fancy new cover art image I cooked up in Blender!:
Logged
dafu
Level 0
**



View Profile
« Reply #31 on: March 02, 2021, 07:08:28 AM »

RetroBlit 3.0 is out!

This is a major release with a redesigned asset loading system and a number of other fancy features!

NEW:
  • Refactored assets, instead of "asset slots" there are now asset classes for each asset type, SpriteSheetAsset, AudioAsset, ShaderAsset, TMXMapAsset, FontAsset
  • Added support for asynchronous asset loading from Resources, WWW, and Addressable Assets!
  • Added support for making RetroBlit assets out of existing Unity resources such as Texture2D or AudioClip. This allows for custom asset loading.
  • Added RB.DrawPixelBuffer for drawing a pixel buffer to display
  • Added 2D spatial audio support
  • Added audio priority support
  • Drawing performance improvements, and even more performance gain in Unity 2019.3+
  • Added SpriteGrid, which replaces SpriteSize and allows for setting up a sprite grid anywhere within a spritesheet image
  • RetroBlit garbage generation from frame-to-frame is reduced from 40 bytes to 0

BUG FIXES:
  • Fixed bug where music would get stuck while cross fading if user was changing music volume at the same time
  • Fixed some non-power of two textures being resized to nearest power of two
  • Fixed RB.DrawRect rotating in the wrong direction
  • Fixed RB.DrawLine pivot point to be the middle of the line

Check it out at: https://assetstore.unity.com/packages/templates/systems/retroblit-102064

Logged
dafu
Level 0
**



View Profile
« Reply #32 on: August 16, 2021, 06:05:30 PM »

RetroBlit 3.1 is out!

This is a minor release with a focus on new textured line rendering.

NEW:
  • Add support for textured lines with RB.DrawLineTextured
  • Add support for solid lines of specified thickness
  • UVs in shader are now in sprite space (0,0) to (1,1) rather than spritesheet space. Please rebase any custom shaders against new RetroBlit shaders
  • Added Chromatic Aberration post-processing effect
  • Desaturation post-processing effect now renamed Saturation and ranges from -1.0 Desaturated, to 1.0 Over-saturated
  • Slightly improved Scanline and Noise effects
  • Add IEquatable to Vector2i, Rect2i, PackedSpriteID to avoid GC when used in containers like List or Dictionary
  • RetroBlit now requires Unity version 2019.3+

BUG FIXES:
  • Fixed TMXProperties loading when using SpritePack lookup
  • Fix text measurement and alignment when using shaky font effect
  • Fix inline inline font switching when switching multiple times in a single print
  • Fix FastString formatting of negative floats with 0 whole number
  • Fixed pixel alignment on Noise and Fizzle post-processing effects

Logged
retroblitayy
Level 0
*


View Profile
« Reply #33 on: October 09, 2021, 10:15:47 PM »

hey i bought your asset and i was wondering on the superflagrun example, if you make a list and spawn >=500 player entities (I just used playerone copies), they all run and jump as normal, BUT for some reason the FPS starts to degrade over time and stay that way, its very odd, when stopping the update function for the entities the FPS returns to 60 FPS/normal.

so even tests with 10,000+ seem to run ok for 10-20 seconds but then it just kills fps ... and its tied to update function, not sure why it would do this but i think its due to physics collision checks, but its SUPER strange and it only happens when theres 500 or more (need further testing), I know for sure 50 of them doesnt produce this,

any thoughts on what would slow them down?
Logged
dafu
Level 0
**



View Profile
« Reply #34 on: October 19, 2021, 05:21:51 PM »

Quote
any thoughts on what would slow them down?

Hard to say, I'd have to see your changes. It is likely that it is SuperFlagRun physics code related, this demo was never optimized for this particular use case. You could also try investigating in the Unity profiler.

RetroBlit itself can render 10s of thousands of sprites at 60fps+, so this is highly unlikely to have anything to do with rendering that many characters or the RetroBlit framework itself.

Thanks for reaching out!
Logged
retroblitayy
Level 0
*


View Profile
« Reply #35 on: October 27, 2021, 10:15:26 AM »

Quote
any thoughts on what would slow them down?

Hard to say, I'd have to see your changes. It is likely that it is SuperFlagRun physics code related, this demo was never optimized for this particular use case. You could also try investigating in the Unity profiler.

RetroBlit itself can render 10s of thousands of sprites at 60fps+, so this is highly unlikely to have anything to do with rendering that many characters or the RetroBlit framework itself.

Thanks for reaching out!


yes thank you for your response, its not a big issue as I would have to create my own physics system (sorter, optimizer, etc) for my use case, and the renderer is not the problem.

i have another use case issue, Im running some rendering tests, and I am trying to create a mini-map system in a corner of my screen, how would I go about rendering out a copy of my screen, scaling it down, and rendering the entire copy in a mini-map of sorts (smaller box?)

thanks again for this asset, its still miles away from any system in-built unity can provide without working directly with something like openGL.


edit:

also, do you know the best way to que print commands or set draw layer, such as choosing to print information within a for loop on top of other images, but at the end of frame, without storing them in an array? I'm trying to render info in separate layers from within for loops that contain render commands. But I think I'll have to use arrays to store the strings, I am trying to figure out what other ways I could solve this using your asset. thanks you
« Last Edit: October 27, 2021, 09:52:49 PM by retroblitayy » Logged
dafu
Level 0
**



View Profile
« Reply #36 on: October 29, 2021, 02:40:03 PM »

Quote
i have another use case issue, Im running some rendering tests, and I am trying to create a mini-map system in a corner of my screen, how would I go about rendering out a copy of my screen, scaling it down, and rendering the entire copy in a mini-map of sorts (smaller box?)

Use RB.Offscreen api to draw into an offscreen/spritesheet, and then render that on the display scaled down using normal RB.DrawCopy api.

See here:
http://www.pixeltrollgames.com/RetroBlit/docs/doc/features.html#drawing_into_a_sprite_sheet

Quote
also, do you know the best way to que print commands or set draw layer, such as choosing to print information within a for loop on top of other images, but at the end of frame, without storing them in an array? I'm trying to render info in separate layers from within for loops that contain render commands. But I think I'll have to use arrays to store the strings, I am trying to figure out what other ways I could solve this using your asset. thanks you

RetroBlit uses painters algorithm (back-to-front) for all rendering, whatever is rendered last is on top, there is no depth buffer/layering. Using RB.Offscreen() api I mentioned above you could render your text into an offscreen surface, and then at the end of the frame render this offscreen surface to display. But if possible the best approach would be to organize all your drawing so that it happens in back-to-front order, eg:

Render() {
   render_tilemap();
   render_objects();
   render_characters();
   render_ui();
}

Alternatively with a little more work you could create your own per-layer queues of draw commands during the frame construction, and only at the end of the frame call RB.Draw*() for the queued commands in the order you need. If you take this approach you'll want to be careful not to create Garbage Collector work on every frame due to building/dumping these queues on every frame. I think this is what you were implying already.

Logged
retroblitayy
Level 0
*


View Profile
« Reply #37 on: October 31, 2021, 12:53:32 AM »

Quote
i have another use case issue, Im running some rendering tests, and I am trying to create a mini-map system in a corner of my screen, how would I go about rendering out a copy of my screen, scaling it down, and rendering the entire copy in a mini-map of sorts (smaller box?)

Use RB.Offscreen api to draw into an offscreen/spritesheet, and then render that on the display scaled down using normal RB.DrawCopy api.

See here:
http://www.pixeltrollgames.com/RetroBlit/docs/doc/features.html#drawing_into_a_sprite_sheet

Quote
also, do you know the best way to que print commands or set draw layer, such as choosing to print information within a for loop on top of other images, but at the end of frame, without storing them in an array? I'm trying to render info in separate layers from within for loops that contain render commands. But I think I'll have to use arrays to store the strings, I am trying to figure out what other ways I could solve this using your asset. thanks you

RetroBlit uses painters algorithm (back-to-front) for all rendering, whatever is rendered last is on top, there is no depth buffer/layering. Using RB.Offscreen() api I mentioned above you could render your text into an offscreen surface, and then at the end of the frame render this offscreen surface to display. But if possible the best approach would be to organize all your drawing so that it happens in back-to-front order, eg:

Render() {
   render_tilemap();
   render_objects();
   render_characters();
   render_ui();
}

Alternatively with a little more work you could create your own per-layer queues of draw commands during the frame construction, and only at the end of the frame call RB.Draw*() for the queued commands in the order you need. If you take this approach you'll want to be careful not to create Garbage Collector work on every frame due to building/dumping these queues on every frame. I think this is what you were implying already.



Thank you i'll start working on that system
and yes I am in the process of figuring out a queue system for most of my drawing, right now i'm making use of lists but I need to figure out the most efficient storage in C# for these types of commands, not sure if I should make use of unity.collections.

thanks again for the information, I need to make sure to use more offscreen rendering techniques as they are very useful for controlling drawing
Logged
Pages: 1 [2]
Print
Jump to:  

Theme orange-lt created by panic