Releases: oatmealine/uranium-template
Release list
2.0-a4
Uranium Template 2
Uranium Template vee 2
- uranium 2
Uranium 2
Versions 2.0-a1 through 2.0-a3 got eaten through in the middle of kusoge dev sorry
This release has been a long time coming, combining many of my personal gripeswith how the template has operated both for users and internally. The catalystfor it was the Mod Jam Kusoge lobby, during which I rewrote Uranium to use the actor235 library I made for the gimmick! theme. The design of that library came from working with Uranium's actors and getting used to a nice workflow with those, and Uranium v2 can be treated as an extension of that towards the rest of the template's design.
Right, so, uh, what changed
-
Uranium's actorgen now uses actor235
-
This version of the library significantly cuts down on a lot of features intentionally to be a minimal portable library insertable into other templates or even themes. Though, through working with it, I've realized most of these were not particularly necessary anyways. Here's what's been cut:
- All Uranium-specific actor shorthands have been removed.
-
setDrawFunctionis no longer necessary because passing arguments between DrawFunctions has been cut, and also because the original assertion that I made this template under I no longer believe to hold true (see further below..) -
setShaderandsetShaderfuckhave been removed in favour of manual proxy deferencing:local Proxy = require 'uranium.actors.proxy' actor:SetShader(Proxy.getRaw(shader))
-
clearShaderfuckwas removed because it only existed as a consistency function forsetShaderfuck's sake
-
- Resetting actors every frame, aswell as the
resetfunction, have been completely removed. This seemed useful to me during initial design, but there hasn't been a single instance of me enabling it since I made the template. It's a rather useless feature, since manually writing the resetting code yourself is not a big deal at all, and in fact is clearer if you're dealing with an actor you're going to redraw lots. - Uranium Template was initially designed with the assumption that drawing actors outside of their ActorFrames is undefined behavior. This drove a lot of rather strange design decisions; and these days I've confirmed with the devs that this is behavior I can rely on. Regardless, there are far too many other files that would be affected if this were to ever bepatched out.
- This technically means ActorFrame structuring is now entirely optional. You can in theory exclusively use ActorFrame as a transformation matrix class, applicable by drawing it and putting anything you'd like to apply the matrix to into its DrawFunction.
- Due to actor235 being portable into themes, the concept of a single actor context across a single run of the code became no longer applicable. As a consequence, every actor initializer is now stored under a Context class. This comes with the benefit of generally being cleaner, and no longer polluting globals with actor initializers.
The default Context is stored under the new
uraniummodule. Uranium does not necessarily allow creating more Contexts, but they're flexible enough that if any situation would require this, Contexts could support it.local uranium = require 'uranium' local ctx = uranium.ctx local Quad = ctx:Quad()
-
As a consequence,
addChildhas been removed and moved into Contexts aswell. Hey, speaking of which -
Context:addChildhas been deprecated frame-one in favor ofContext.getContext. Manually creating associations became tedious incredibly quickly when using ActorFrames for non-trivial purposes; so now you can create a sub-context from an ActorFrame, under which creating any actors puts them into the ActorFrame.local actors = require 'uranium.actors' local Context = actors.Context local af = ctx:ActorFrame() local subCtx = Context.getContext(af) local quad = subCtx:Quad()
- All Uranium-specific actor shorthands have been removed.
-
I think it should also be significantly faster now. I don't know I haven't tested it
-
You're free to take the version of actor235 in Uranium for any purpose you like. I haven't put a formal license on it or anything, but you can take my word for it that I won't be upset at it. This is undocumented and will probably stay this way, but should be pretty clear from looking at Uranium's code.
-
-
The standard library has been greatly culled
- Goodbye
vector2D,color,bitop,rng,profiler,noautoplay,uwuifyandeasablevector2D,color,rngandeasableare all my own hand-rolled generic gamedev libraries I kind of included just because it's what I like and am used to from Love2D dev. You can still get them at jadelibbitop,profiler,noautoplay,uwuifyall felt too specific and simple, so for the sake of reducing bloat those are gone too.
- I'll probably reduce the list a little more before a final release.
- The standard library is also the most unstable part of the template right now; a lot of it hasn't been updated to account for v2 changes, and a lot of it is additionally not up-to-date to how I'd rather like it today. Thus, I'm not documenting the changes done there yet to save my sanity until it stabilizes.
- Goodbye
-
Another recurring apperance from the gimmick! theme is the
EventHandlerclass, which entirely handles Uranium's events now. Its main benefit is giving you the ability to register your own handlers independent of Uranium's main handler.The full details of this are too long to document here, but the summary is callbacks now have to be written like this:
local events = require 'uranium.events' events:on('update', function(dt) -- ... end)
-
The
uraniumglobal has been removed and superceded with requiring individual modules:- Uranium's event handler is now in the
uranium.eventsmodule. - Configuration happens by requiring
uranium.config. - The release, previously the
_releaseglobal, is now held in theuraniummodule. The global Context also goes there. uranium.dir, an obscureGAMESTATE:GetCurrentSong():GetSongDir()shorthand, is now inpackage.base. Yes, this is off-spec and does not exist in regular Lua, but I'm allowed to do that
- Uranium's event handler is now in the
-
Alongside
uranium,bandthave also been removed.bcan be obtained by just callingGetSongBeat()tcan be obtained by doingt = t + dtin your update loop
-
Hey are you noticing a theme? Yeah Uranium now has no globals by default besides
_main(subject to change) and thesw/sh/scx/scy/dw/dhshorthands. I don't like globals. You're free to use them in your codebases; hell, I'm sure I will continue doing the same, but I don't think a template should be forcing them on you.- I will continue tweaking standard libraries and removing any globals there until I am satisfied.
utilwill be killed. Mark my words
- I will continue tweaking standard libraries and removing any globals there until I am satisfied.
-
There's probably more I'm missing. It's a whole different template now kind of. That's why I'm calling this v2. I feel like v2 isn't signficant enough. What if I called it... Uranium v235? Hm, I like the sound of that. no i fucking don't
The manual isn't up to date with most of these changes, which I'll be slowly working out. Really, the manual is the biggest thing that makes this currently incomplete - you can still follow the Lua comments for documentation, but that's rather unintuitive and beginner-unfriendly so I won't be happy until the manual gets a complete update too
Lots of this is battle-tested by the aforementioned Kusoge lobby, and lots of it isn't. This is an alpha for a reason. I wouldn't recommend against using it, in fact I'd encourage using it above v1, but please do report any issues you find with it.
Uranium Template 1.0-b5
This release fixes a regression with 1.0-b4:
stdlib.inputnow sends out event calls correctly
Uranium Template 1.0-b4
Hello! This is another beta release of the Uranium Template.
This release has mostly come as a result of internal refactors. What this means for you is you can hopefully be able to comprehend the code more! What this means for me is I'll be able to more easily add features.
-
The event system has been rewritten to be generally more convenient to use
-
⚠️ Instead of the old way (defining a function):function uranium.update(dt) -- ... end
This is simplified with
uranium.on:uranium.on(function(dt) -- ... end)
The original system was something I borrowed from Figura, because I noticed how extremely intuitive it was, despite being close to what Love2D does. I quickly realized that this doesn't work well (language servers will frequently complain about it, and priorities are impossible to implement well). so I've rewritten the system to be similar to what a conventional event system looks like. Sorry for the inconvenience!
-
uranium.callis still the same, albeit with a.instead of::uranium.call('update')
-
-
Configuration is now handled with
uranium.config-
⚠️ resetOnFrameStartandresetActorOnFrameStartare now handled with it:uranium.config.resetOnFrameStart(true)
-
hideThemeActors()can be used to keep theme actors displayed
-
-
stdlib.aftnow lets you quickly setup an AFTlocal aft, aftSprite = aftlib.aftSetup()
-
stdlib.easablehas been rewritten to be deltatime-agnostic⚠️ Additionally, updating is done with:update()instead, andtoaandahave been renamed totargetandeased
As always, bug testing and feedback is appreciated. Please don't hesitate to let me know if there's something you'd like to see or see changed in the template!
Uranium Template 1.0-b3
Hello! This is another beta release of the Uranium Template.
- Actors are no longer reset every single frame by default.
- You can toggle this behavior globally with
resetOnFrameStart(bool), or per-actor withresetActorOnFrameStart(actor, bool?).
- You can toggle this behavior globally with
As always, bug testing and feedback is appreciated. Please don't hesitate to let me know if there's something you'd like to see or see changed in the template!
Uranium Template 1.0-b2
Hello! This is another beta release of the Uranium Template. Everything should be stable now, but I'm not 100% certain, so I'm marking it as a beta release for now.
- DrawFunctions can now be used to pass through arguments:
setDrawFunction(af, function(x, y)
quad:xy(x, y)
quad:Draw()
end)
function uranium.update()
for x = 0, 3 do
for y = 0, 3 do
af:Draw(x, y)
end
end
end- Added
stdlib.players- this initializesP[1-8]andP<1-8>, letting you hide them or do whatever with them as needed stdlib.eternalfilenow deletes all notedata from every player, preventing them from hitting mines or similar on accident- Added more helpful errors to prevent running into errors inside of main.xml
- You can now use methods like
setShader,setDrawFunctionoutside ofuranium.init, queueing them up for later- This avoids bloating every file with
uranium.initfor no good reason
- This avoids bloating every file with
stdlib.profileris now documented- Release information is now embedded in the
_releaseglobal
As always, bug testing and feedback is appreciated. Please don't hesitate to let me know if there's something you'd like to see or see changed in the template!
Uranium Template 1.0-b1
Uranium Template is now out of closed beta! It's now entering public beta. You are completely free to use this for your files, but please expect bugs and various issues. Not enough testing has been done to ensure the template is ready for production use - but if you start making a file with this version, it should be extremely easy to upgrade to a stable release once one is out.
A recommended start to see what's currently possible is the examples section in the manual - it containts everything from a simple platformer to savedata to shader and AFT support.
All bug testing and feedback is appreciated! Whether you're making modfiles, games, minigame-modfile-hybrids or anything inbetween, I'd appreciate hearing any sort of feedback you have, whether it be in the project's issues or in private.