diff --git a/doc/Makefile b/doc/Makefile deleted file mode 100644 index aecd98b9..00000000 --- a/doc/Makefile +++ /dev/null @@ -1,5 +0,0 @@ -html: prosperon.org - emacs prosperon.org -f org-html-export-to-html --kill - mv prosperon.html index.html - mkdir html - cp index.html orb.gif dos.ttf org-info.js style.css prosperon_orb_horizontal.gif html diff --git a/doc/mkdocs.yml b/doc/mkdocs.yml deleted file mode 100644 index b8d7c0d0..00000000 --- a/doc/mkdocs.yml +++ /dev/null @@ -1,11 +0,0 @@ -site_name: Prosperon Documentation -repo_url: https://forge.pockle.world/john/prosperon -theme: - name: material - -plugins: - - search - -markdown_extensions: - - admonition - - tables \ No newline at end of file diff --git a/doc/prosperon_orb_horizontal.gif b/doc/prosperon_orb_horizontal.gif deleted file mode 100644 index f585db7a..00000000 Binary files a/doc/prosperon_orb_horizontal.gif and /dev/null differ diff --git a/doc/dos.ttf b/docs/dos.ttf similarity index 100% rename from doc/dos.ttf rename to docs/dos.ttf diff --git a/doc/docs/index.md b/docs/index.md similarity index 96% rename from doc/docs/index.md rename to docs/index.md index 6ff3412f..a6478dbc 100644 --- a/doc/docs/index.md +++ b/docs/index.md @@ -81,7 +81,7 @@ When an actor dies, all of the actors that have it as their master will die as w Actors get fragments of time called a *turn*. Actors which belong to different systems can have different lengths of turns. ### Actor files -Actor files end with the extension *.jso*[fn::"Javascript object".]. They list a series of functions to call on a newly formed actor. Actors have a number of useful functions which are called as defined. +Actor files end with the extension *.jso*. They list a series of functions to call on a newly formed actor. Actors have a number of useful functions which are called as defined. | function | call time | |----------|----------------------------------------------------------| @@ -137,7 +137,7 @@ Actors can be created using an optional configuration file. A configuration file ## Entities -Game worlds are made of entities. Entities are a type of actor with a number of useful properties. Entities can only be created on the actor named *Primum*[fn::See the Primum Mobile]. The Primum is the outermost actor with a physical space. While Actors are more abstract, Entities exist in a definite space, with a position, rotation, and so on. Entities can respond to physics and play sounds. Anything which can be thought of as having a position in space should be an entitiy. +Game worlds are made of entities. Entities are a type of actor with a number of useful properties. Entities can only be created on the actor named *Primum*. The Primum is the outermost actor with a physical space. While Actors are more abstract, Entities exist in a definite space, with a position, rotation, and so on. Entities can respond to physics and play sounds. Anything which can be thought of as having a position in space should be an entitiy. !!! scholium The first and most masterful entity is the Primum. The Primum has no components, and its rotation and position are zero. It defines the center of the game. @@ -168,8 +168,6 @@ Components only work in the context of an entity. They have no meaning outside o While components can be added via scripting, it is easier to add them via the editor, as we will later see. ### Ur system -The ur[fn::A German prefix meaning primitive, original, or earliest.] system is a prototypical inheritence system used by the actor files. When actor files are loaded, they are stored as an ur. An *ur* holds a list of (text, config) required to create an entity. - When prosperon starts, it searches for urs by name. Any file ending in ".jso" or ".json" will be interpereted as an ur, with same named jso and json being applied as (text, config) for an ur. A jso or json alone also constitute an ur. An ur can also be defined by a json file. If an ur is found, it takes predecent over auto generated urs. The json of an ur looks like this: @@ -273,7 +271,7 @@ If the asset is not found, it is searched for until the project root is reached. !!! caution Because the path is resolved during object load, you will need to fresh the bumper's ur or spawn a new bumper for it to use the newly placed /score.wav/. -###* Links +#### Links Links can be specified using the "#" sign. These are shortcuts you can specify for large projects. Specify them in the array `Resources.links`. An example is of the form `trees:/world/assets/nature/trees`. Links are called with `#`, so you can now make a "fern" with `Primum.spawn("#trees/fern.jso")`. @@ -379,7 +377,7 @@ Basic use of the editor involves spawning new entities, or ones from already mad Assign the entity's *gizmo* property to a function to have that function called each gui rendering frame. -## The REPL[fn::Read-eval-print loop] +## The REPL The REPL lets you poke around in the game. It makes iteration and experimentation fast, fun, and easy. The symbol `$` references the current REPL entity. If no entity is selected, the REPL entity is the currently edited one. Otherwise, it is the selected entity, or group of entities, as an array. @@ -428,7 +426,7 @@ Prosperon is a multiplatform engine. Bundling your game for these platforms esse - Baking static content - Conversion of assets -- Packing into a CDB[fn::Constant database] +- Packing into a CDB To distribute your game for a given platform, run `prosperon build {platform}`. @@ -459,7 +457,7 @@ You can create your game's cdb by running `prosperon -b`. You will find a *game. * Modding & Patching When an asset is requested in Prosperon, it is searched for in the following manner. -1. The cwd[fn::current working directory] +1. The cwd 2. The game cdb (not necessarily present) 3. The core cdb diff --git a/doc/orb.gif b/docs/orb.gif similarity index 100% rename from doc/orb.gif rename to docs/orb.gif diff --git a/doc/docs/start.md b/docs/start.md similarity index 100% rename from doc/docs/start.md rename to docs/start.md diff --git a/doc/style.css b/docs/style.css similarity index 82% rename from doc/style.css rename to docs/style.css index 887ccba8..00bf5123 100644 --- a/doc/style.css +++ b/docs/style.css @@ -1,3 +1,8 @@ +[data-md-color-scheme="youtube"] { + --md-primary-fg-color: #3876AD; + --md-accent-fg-color: #94DBE8 +} + a:link a:visited a:hover a:active { color: green; } @@ -10,6 +15,10 @@ html { scroll-padding-top:50px; } +h1 { + color: red +} + #text-table-of-contents { background-color: #ffffec; border: solid; @@ -79,9 +88,6 @@ code { } .example { - background-color: #FFFFEC; - border-width: 2px; - border-color: #61bcd7; margin: 10px 20px; padding: 20px; font-family: code; @@ -90,6 +96,15 @@ code { display: inline-block; } +.code { + padding: 2px 5px; + background-color: rgba(var(--bs-body-bg-rgb), 0.75); + border: solid 1px var(--bs-border-color); + color: var(--bs-body-color); + white-space: pre-wrap; + word-wrap: break-word; +} + .title { font-family: arial; } diff --git a/mkdocs.yml b/mkdocs.yml new file mode 100644 index 00000000..fe945b39 --- /dev/null +++ b/mkdocs.yml @@ -0,0 +1,36 @@ +site_name: Prosperon Documentation +repo_url: https://forge.pockle.world/john/prosperon +repo_name: john/prosperon +edit_uri: edit/master/doc/docs + +plugins: + - search + - git-revision-date-localized: + +extra_css: + - style.css + +theme: + name: material + navigation_depth: 3 + logo: prosperon.gif + favicon: orb.gif + features: + - content.action.view + - navigation.prune + icon: + view: material/eye + palette: + scheme: youtube + + +extra: + social: + - icon: fontawesome/brands/x-twitter + link: https://x.com/@pockleworld + - icon: fontawesome/brands/github + link: https://github.com/johnalanbrook + +markdown_extensions: + - admonition + - tables diff --git a/doc/requirements.txt b/requirements.txt similarity index 79% rename from doc/requirements.txt rename to requirements.txt index 8e86e7c0..44b3d01a 100644 --- a/doc/requirements.txt +++ b/requirements.txt @@ -1,9 +1,14 @@ Babel==2.15.0 beautifulsoup4==4.12.3 +cairocffi==1.7.1 +CairoSVG==2.7.1 certifi==2024.6.2 +cffi==1.16.0 charset-normalizer==3.3.2 click==8.1.7 colorama==0.4.6 +cssselect2==0.7.0 +defusedxml==0.7.1 EditorConfig==0.12.4 ghp-import==2.1.0 gitdb==4.0.11 @@ -17,6 +22,7 @@ mergedeep==1.3.4 mkdocs==1.6.0 mkdocs-custommill==1.3.0 mkdocs-get-deps==0.2.0 +mkdocs-git-revision-date-localized-plugin==1.2.6 mkdocs-git-revision-date-plugin==0.3.2 mkdocs-material==9.5.28 mkdocs-material-extensions==1.3.1 @@ -27,10 +33,13 @@ natsort==8.4.0 packaging==23.2 paginate==0.5.6 pathspec==0.12.1 +pillow==10.4.0 platformdirs==4.2.0 +pycparser==2.22 Pygments==2.17.2 pymdown-extensions==10.7 python-dateutil==2.8.2 +pytz==2024.1 PyYAML==6.0.1 pyyaml_env_tag==0.1 regex==2023.12.25 @@ -39,5 +48,7 @@ six==1.16.0 smmap==5.0.1 soupsieve==2.5 termcolor==2.4.0 +tinycss2==1.3.0 urllib3==2.2.1 watchdog==4.0.0 +webencodings==0.5.1