diff --git a/audio.lua b/audio.lua index c580ae0..439b82b 100644 --- a/audio.lua +++ b/audio.lua @@ -5,5 +5,8 @@ return { --- Loads an audio file and returns the corresponding audio object. -- TODO: audio object doc & API -- @impl backend - load = function(filepath) end + load = function(filepath) end, + + -- TODO: doc + available = false } diff --git a/backend/ctrulua.lua b/backend/ctrulua.lua index 13334df..3700043 100644 --- a/backend/ctrulua.lua +++ b/backend/ctrulua.lua @@ -51,10 +51,19 @@ end uqt.backend = "ctrulua" -- uqt.event: TODO +if uqt.event then + error("uqt.event: NYI") +end -- uqt.draw: TODO +if uqt.draw then + error("uqt.draw: NYI") +end -- uqt.audio: TODO +if uqt.audio then + error("uqt.audio: NYI") +end -- uqt.time if uqt.time then diff --git a/backend/love.lua b/backend/love.lua index 3149674..9b095b8 100644 --- a/backend/love.lua +++ b/backend/love.lua @@ -105,6 +105,9 @@ add(uqt.draw, { love.graphics.setFont(defaultFont) love.graphics.print(text, x, y) end, + point = function(x, y, ...) + love.graphics.points(x, y, ...) + end, lineWidth = function(width) love.graphics.setLineWidth(width) end, diff --git a/draw.lua b/draw.lua index f668bbe..36d3cf1 100644 --- a/draw.lua +++ b/draw.lua @@ -68,6 +68,13 @@ draw = { -- @impl backend text = function(x, y, text) end, + --- Draws a point. + -- @tparam number x point x coordinate + -- @tparam number y point y coordinate + -- @tparam number ... other vertices to draw other points + -- @impl backend + point = function(x, y, ...) end, + --- Sets the width. -- @tparam number width the line width -- @impl backend @@ -154,4 +161,8 @@ draw = { image = function(filename) end, } +-- TODO: canvas stuff ; also make everything here actually be shortcut to draw to the game's framebuffer. +-- TODO: add software implementations of everything. +-- TODO: add function to draw a message (used eg for the error message when there is a version mismatch) + return draw diff --git a/init.lua b/init.lua index a95e1b8..90ff923 100644 --- a/init.lua +++ b/init.lua @@ -31,7 +31,7 @@ -- * Inputs which match ubiquitousse.input.default (a pointing/4 direction input, a confirm button, and a cancel button). -- * Some way of measuring time with millisecond-precision. -- * Some kind of filesystem. --- * An available audio output would be preferable. +-- * An available audio output would be preferable but optional. -- * Lua 5.1, 5.2, 5.3 or LuaJit. -- -- Regarding data formats, Ubiquitousse implementations expect and recommend: @@ -92,6 +92,8 @@ if love then require(p..".backend.love") elseif package.loaded["ctr"] then require(p..".backend.ctrulua") +elseif package.loaded["libretro"] then + error("NYI") end return ubiquitousse diff --git a/input.lua b/input.lua index 6cc97cb..6832589 100644 --- a/input.lua +++ b/input.lua @@ -480,4 +480,10 @@ input.default.pointer = input.pointer() input.default.confirm = input.button() input.default.cancel = input.button() +-- TODO: some key selection helper? Will be backend-implemented, to account for all the possible input methods. +-- TODO: some way to list all possible input / outputs, or make the *inUse make some separation between inputs indiscutitably in use and those who are incertain. +-- TODO: outputs ! (rumble, lights, I don't know) +-- TODO: other, optional, default/generic inputs, and a way to know if they are binded. +-- TODO: multiplayer input helpers? something like getting the same input for different players, or default inputs for different players + return input diff --git a/scene.lua b/scene.lua index d1260f8..6892117 100644 --- a/scene.lua +++ b/scene.lua @@ -45,10 +45,11 @@ scene = { prefix = "", --- Creates and returns a new Scene object. + -- @tparam[opt="unamed"] string name the new scene name -- @impl ubiquitousse - new = function() + new = function(name) return { - name = "loading scene", -- The scene name. + name = name or "unamed", -- The scene name. time = time.new(), -- Scene-specific TimerRegistry. diff --git a/todo.txt b/todo.txt new file mode 100644 index 0000000..0677194 --- /dev/null +++ b/todo.txt @@ -0,0 +1,17 @@ +Ubiquitousse, also known as "The World's Best Video Game Engine Of All Time", despite its perfectness, is still not perfect. +More specifically, what is lacking to officially turn Ubiquitousse into a sacred text, is: +- An i18n API. While some languages are clearly superior to others, the general consensus seems to think otherwise. Ubiquitousse + should be able to get an ordered list of prefered languages and provide translation helpers. +- Some API are still lacking an API and/or implementation. Search "TODO" for more information. +- A filesystem API, to access the game's filesystem. May also rewrite Lua's io functions, see the next item. +- A sandboxing system. Ubiquitousse should be able to run in a Ubiquitousse game safely. Since Ubiquitousse can run itself, it will + then seems reasonable to claim Ubiquitousse run the universe. See World Domination for Dummies. +- A libretro backend, so Ubiquitousse really become ubiquitous. If you didn't know, it's the goal. +- Maybe some compatibilty layer for different Lua versions. +- Some network access. Ubiquitousse needs to spread. +- Weird APIs to allow the backend to manipulate more efficiently the game: + - Memory / environment access. + - State saving / Time travel API. Real world Time Travel is optional but preferable. +- Test suite. Ubiquitousse should run perfectly. Including pixel-perfect image output. "Namého". +- At least a million followers and their souls. +- Sacrifices. A lot of them.