separate input and events; pull camera out of render
This commit is contained in:
@@ -5,7 +5,12 @@ With Javascript's C-like syntax, it makes it easy to make classic style games li
|
||||
# API usage
|
||||
A lot of the API usage is informed from 'duck typing'. If something "looks" like a camera - it can be used like one! If something "looks" like a sprite, it can be used like one! There are fast paths on nearly everything for well defined objects
|
||||
|
||||
Uniformity is prioritized.
|
||||
Uniformity is prioritized. Javascript allows for a powerful abstraction - the object - which Prosperon makes much use of. It allows for another - the arraybuffer - which makes it simple to plug different parts of the engine into each other.
|
||||
|
||||
The object is the lingua franca of the API. For example, json.encode and json.decode converts objects to and fromt json strings; nota.encode and nota.decode converts objects to and from nota bytes, represented as a javascript arraybuffer. To convert a json string to a nota buffer, one would do:
|
||||
nota.encode(json.decode(str))
|
||||
|
||||
Most functions take objects just like this, increasing flexibility for what you can send into functions.
|
||||
|
||||
# Gradual performance
|
||||
Prosperon makes it easy to make something quickly, and if it runs well, you're golden! But if it's slow, there are a plethora of options to make it faster. Plus, with native C plugins, there is nothing that can't be figured out.
|
||||
@@ -14,42 +19,64 @@ Prosperon makes it easy to make something quickly, and if it runs well, you're g
|
||||
~~prosperon master
|
||||
Here are the modules that can be included via 'use'.
|
||||
|
||||
// extensions
|
||||
Object.id - get a unique id for the given javascript object
|
||||
|
||||
// global syntax level things
|
||||
Globals have been kept to a minimum to ensure game objects are as flexible as possible in what they can call their state. The vast majority of access to prosperon is done through the 'use' statement.
|
||||
use - import a module
|
||||
on actors: /* look to web windows for a comparison */
|
||||
- spawn: create a new actor
|
||||
- delay: execute a function after seconds
|
||||
-
|
||||
|
||||
prosperon global object; information about the engine; process related (ie, if there are multiple threads running, prosperon will be different in each, os will be the same)
|
||||
- version: 0.6.1
|
||||
- revision: git revision
|
||||
- argv: the string of arguments passed to the process
|
||||
- semver: functions to compare use
|
||||
|
||||
// core
|
||||
prosperon
|
||||
input
|
||||
json
|
||||
layout
|
||||
resources
|
||||
sound
|
||||
os - sys calls; information about the underlying hardware
|
||||
js - information about the scripting language; gc functions; etc
|
||||
|
||||
// mixed in
|
||||
base
|
||||
std
|
||||
time
|
||||
search
|
||||
color
|
||||
tween
|
||||
util
|
||||
io
|
||||
os
|
||||
|
||||
// core use fns
|
||||
input - user input settings
|
||||
json - json encoding and decoding
|
||||
resources - access resources
|
||||
sound - play sounds
|
||||
time - time access
|
||||
actor - actor helpers
|
||||
color - color constants
|
||||
tween - helper to tween
|
||||
util - random helpers
|
||||
io - file system access, mounting, unmounting
|
||||
event - system events
|
||||
|
||||
math - math help
|
||||
geometry - geometry help
|
||||
|
||||
// rendering
|
||||
draw2d
|
||||
render
|
||||
graphics
|
||||
|
||||
// game components
|
||||
emitter
|
||||
sprite
|
||||
transform
|
||||
|
||||
// math
|
||||
pmath
|
||||
vector
|
||||
geometry
|
||||
draw2d - immediate mode draw 2d stuff functions
|
||||
render - render configuration and use; shaders, pipelines, render state.
|
||||
graphics - create graphics objects (textures, fonts, etc); memory usage of fonts, textures, etc.
|
||||
|
||||
// game component modules
|
||||
emitter - particle drawing helper
|
||||
sprite - sprite drawing helper
|
||||
transform - helper to turn programs into transforms
|
||||
layout - a gui layout helper
|
||||
imgui - add for imgui calls
|
||||
controller - higher level controller based on events
|
||||
|
||||
~~prosperon dev
|
||||
nota
|
||||
dmon
|
||||
enet
|
||||
|
||||
convert
|
||||
debug
|
||||
diff
|
||||
@@ -69,4 +96,5 @@ yaml
|
||||
spline
|
||||
profile
|
||||
sim
|
||||
dmon
|
||||
|
||||
noise // using stb perlin
|
||||
Reference in New Issue
Block a user