mirror of
https://github.com/Reuh/ubiquitousse.git
synced 2025-10-27 09:09:30 +00:00
abstract is ded
This commit is contained in:
parent
07cc7216a1
commit
42738cc7c9
8 changed files with 219 additions and 135 deletions
34
init.lua
34
init.lua
|
|
@ -1,33 +1,33 @@
|
|||
-- ubiquitousse
|
||||
|
||||
--- Abstract Engine.
|
||||
-- Main module, containing the abstract things.
|
||||
-- The API exposed here is the Abstract API.
|
||||
-- It is as the name imply abstract, and must be implemented in a backend, such as abstract.love.
|
||||
--- Ubiquitousse Game Engine.
|
||||
-- Main module, containing the main things.
|
||||
-- The API exposed here is the Ubiquitousse API.
|
||||
-- It is as the name does not imply anymore abstract, and must be implemented in a backend, such as ubiquitousse.love.
|
||||
-- When required, this file will try to autodetect the engine it is running on, and load a correct backend.
|
||||
--
|
||||
-- abstract may or may not be used as a full game engine. You can delete the modules files you don't need and abstract
|
||||
-- Ubiquitousse may or may not be used as a full game engine. You can delete the modules files you don't need and Ubiquitousse
|
||||
-- should adapt accordingly.
|
||||
--
|
||||
-- For backend writers:
|
||||
-- If a function defined here already contains some code, this means this code is mandatory and you must put/call
|
||||
-- it in your implementation.
|
||||
-- Also, a backend file shouldn't redefine the abstract table itself but only redefine the backend-dependant fields.
|
||||
-- Also, a backend file shouldn't redefine the ubiquitousse table itself but only redefine the backend-dependant fields.
|
||||
-- The API doesn't make the difference between numbers and integers, so convert to integers when needed.
|
||||
--
|
||||
-- Abstract's goal is to run everywhere with the least porting effort possible.
|
||||
-- Ubiquitousse's goal is to run everywhere with the least porting effort possible.
|
||||
-- To achieve this, the engine needs to stay simple, and only provide features that are almost sure to be
|
||||
-- available everywhere, so writing a backend should be straighforward.
|
||||
-- However, Abstract still make some small assumptions about the engine:
|
||||
-- However, Ubiquitousse still make some small assumptions about the engine:
|
||||
-- * The engine has some kind of main loop, or at least a function called very often (may or may not be the
|
||||
-- same as the redraw screen callback).
|
||||
-- * 32bit color depth.
|
||||
--
|
||||
-- Regarding data formats, Abstract reference implemtations expect and recommend:
|
||||
-- Regarding data formats, Ubiquitousse reference implemtations expect and recommend:
|
||||
-- * For images, PNG support is expected.
|
||||
-- * For audio files, OGG Vorbis support is expected.
|
||||
-- * For fonts, TTF support is expected.
|
||||
-- Theses formats are respected for the reference implementations, but Abstract may provide a script to
|
||||
-- Theses formats are respected for the reference implementations, but Ubiquitousse may provide a script to
|
||||
-- automatically convert data formats from a project at some point.
|
||||
--
|
||||
-- Units used in the API:
|
||||
|
|
@ -42,19 +42,19 @@
|
|||
-- * lowerCamelCase is expected for everything else.
|
||||
--
|
||||
-- Implementation levels:
|
||||
-- * backend: nothing defined in abstract, must be implemented in backend
|
||||
-- * mixed: partly implemented in abstract but must be complemeted in backend
|
||||
-- * abstract: fully-working version in abstract, may or may not be redefined in backend
|
||||
-- * backend: nothing defined in Ubiquitousse, must be implemented in backend
|
||||
-- * mixed: partly implemented in Ubiquitousse but must be complemeted in backend
|
||||
-- * ubiquitousse: fully-working version in Ubiquitousse, may or may not be redefined in backend
|
||||
-- The implementation level is indicated using the "@impl level" annotation.
|
||||
--
|
||||
-- @usage local abstract = require("abstract")
|
||||
-- @usage local ubiquitousse = require("ubiquitousse")
|
||||
|
||||
local p = ... -- require path
|
||||
local ubiquitousse
|
||||
|
||||
ubiquitousse = {
|
||||
--- Abstract version.
|
||||
-- @impl abstract
|
||||
--- Ubiquitousse version.
|
||||
-- @impl ubiquitousse
|
||||
version = "0.0.1",
|
||||
|
||||
--- Backend name.
|
||||
|
|
@ -63,7 +63,7 @@ ubiquitousse = {
|
|||
backend = "unknown"
|
||||
}
|
||||
|
||||
-- We're going to require modules requiring abstract, so to avoid stack overflows we already register the abstract package
|
||||
-- We're going to require modules requiring Ubiquitousse, so to avoid stack overflows we already register the ubiquitousse package
|
||||
package.loaded[p] = ubiquitousse
|
||||
|
||||
-- Require external submodules
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue