diff --git a/exts/__pycache__/collapse.cpython-310.pyc b/exts/__pycache__/collapse.cpython-310.pyc deleted file mode 100644 index 3eb76980..00000000 Binary files a/exts/__pycache__/collapse.cpython-310.pyc and /dev/null differ diff --git a/exts/collapse.py b/exts/collapse.py deleted file mode 100644 index b1123f46..00000000 --- a/exts/collapse.py +++ /dev/null @@ -1,210 +0,0 @@ -#!/usr/bin/env python3 -# -# collapse.py -r""" -Adds a collapsible section to an HTML page using a details_ element. - -.. _details: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/details - -.. versionadded:: 2.5.0 -.. extensions:: sphinx_toolbox.collapse - - -Usage ------- - -.. rst:directive:: .. collapse:: [label] - - Adds a collapsible section to an HTML page using a details_ element. - - .. _details: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/details - - With non-HTML builders, the content will be added as-is. - - .. rest-example:: - - .. collapse:: Details - - Something small enough to escape casual notice. - - - .. collapse:: A Different Label - :class: custom-summary - :name: summary0 - - Something else that might escape notice. - - .. collapse:: A long code block - - .. code-block:: python - - print("Not really") - - - .. rst:directive:option:: open - :type: flag - - The ``:open:`` option can be used to have the section open by default. - - .. versionadded:: 3.0.0 - - .. rest-example:: - - .. collapse:: Open - :open: - - This section is open by default. - - -API Reference ----------------- - -""" -# -# Copyright © 2021 Dominic Davis-Foster -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in all -# copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -# DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -# OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE -# OR OTHER DEALINGS IN THE SOFTWARE. -# - -# stdlib -from typing import Optional, Sequence - -# 3rd party -from docutils import nodes -from docutils.parsers.rst import directives -from docutils.parsers.rst.roles import set_classes -from domdf_python_tools.stringlist import DelimitedList -from sphinx.application import Sphinx -from sphinx.util.docutils import SphinxDirective -from sphinx.writers.html import HTMLTranslator - -# this package -from sphinx_toolbox.utils import SphinxExtMetadata, flag, metadata_add_version - -__all__ = ("CollapseDirective", "CollapseNode", "visit_collapse_node", "depart_collapse_node", "setup") - - -class CollapseDirective(SphinxDirective): - r""" - A Sphinx directive to add a collapsible section to an HTML page using a details_ element. - - .. _details: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/details - """ - - final_argument_whitespace: bool = True - has_content: bool = True - - # The label - required_arguments: int = 1 - - option_spec = { - "class": directives.class_option, - "name": directives.unchanged, - "open": flag, - } - - def run(self) -> Sequence[nodes.Node]: # type: ignore[override] - """ - Process the content of the directive. - """ - - set_classes(self.options) - self.assert_has_content() - - text = '\n'.join(self.content) - label = self.arguments[0] - - collapse_node = CollapseNode(text, label, **self.options) - - self.add_name(collapse_node) - - collapse_node["classes"].append(f"summary-{nodes.make_id(label)}") - - self.state.nested_parse(self.content, self.content_offset, collapse_node) - - return [collapse_node] - - -class CollapseNode(nodes.Body, nodes.Element): - """ - Node that represents a collapsible section. - - :param rawsource: - :param label: - """ - - def __init__(self, rawsource: str = '', label: Optional[str] = None, *children, **attributes): - super().__init__(rawsource, *children, **attributes) - self.label = label - - -def visit_collapse_node(translator: HTMLTranslator, node: CollapseNode) -> None: - """ - Visit a :class:`~.CollapseNode`. - - :param translator: - :param node: The node being visited. - """ - - tag_parts = DelimitedList(["details"]) - - if node.get("names", None): - names = DelimitedList(node["names"]) - tag_parts.append(f'name="{names: }"') - - if node.get("classes", None): - classes = DelimitedList(node["classes"]) - tag_parts.append(f'class="{classes: }"') - - if node.attributes.get("open", False): - tag_parts.append("open") - - translator.body.append(f"<{tag_parts: }>\n{node.label}") - translator.context.append("") - - -def depart_collapse_node(translator: HTMLTranslator, node: CollapseNode) -> None: - """ - Depart a :class:`~.CollapseNode`. - - :param translator: - :param node: The node being visited. - """ - - translator.body.append(translator.context.pop()) - - -@metadata_add_version -def setup(app: Sphinx) -> SphinxExtMetadata: - """ - Setup :mod:`sphinx_toolbox.collapse`. - - :param app: The Sphinx application. - """ - - app.add_directive("collapse", CollapseDirective) - app.add_node( - CollapseNode, - html=(visit_collapse_node, depart_collapse_node), - latex=(lambda *args, **kwargs: None, lambda *args, **kwargs: None) - ) - - return { - "parallel_read_safe": True, - } diff --git a/resources/theme/css/rtd_dark.css b/resources/theme/css/rtd_dark.css index 06f6c54e..0b401a70 100644 --- a/resources/theme/css/rtd_dark.css +++ b/resources/theme/css/rtd_dark.css @@ -10,16 +10,29 @@ * Modified by Erik Kalkoken: 20220615 */ +/* aum added */ @media (prefers-color-scheme: dark) { - /* aum added */ + + .caption-text { + color: rgb(200, 200, 200); + } + + a.reference.internal { + color: rgb(240, 240, 240) !important; + background-color: rgb(30, 30, 30) !important; + } + + a.reference.internal.current { + color: rgb(200, 200, 200) !important; + background-color: rgb(50, 50, 50) !important; + } .admonition { - /* .admonition, .note { */ background-color: #2d2d2d !important; } .admonition-title { - color: rgba(40, 40, 40, 1.0) !important; + color: rgb(40, 40, 40) !important; } .important .admonition-title { @@ -31,7 +44,7 @@ } .seealso .admonition-title { - background-color: rgba(100, 100, 100, 1.0) !important; + background-color: rgb(100, 100, 100) !important; } .nt, .nf { @@ -43,139 +56,135 @@ .menuselection, .kbd.docutils.literal { font-size: 90%; font-weight: normal; - background-color: rgba(50, 50, 50, 0.65) !important; - color: white !important; - border: solid #E1E4E5 1px; - white-space: nowrap; - padding: 2px 5px; - } - -/* 'kbd' role. */ + background-color: rgba(50, 50, 50, 0.65) !important; + color: white !important; + border: solid #E1E4E5 1px; + white-space: nowrap; + padding: 2px 5px; + } + + /* 'kbd' role. */ .kbd.docutils.literal { - font-family: "Lato", "proxima-nova", + font-family: "Lato", "proxima-nova", "Helvetica Neue", Arial, sans-serif; - font-size: 85%; - font-weight: normal; - color: white !important; + font-size: 85%; + font-weight: normal; + color: white !important; } - + figcaption { - margin-top: 15px; + margin-top: 10px !important; } - body { - text-align: justify; - background-color: rgba(40, 40, 40, 1.0) !important; + figure { + margin-bottom: 5px !important; + } + + .wy-body-for-nav { + text-align: justify; + background-color: rgb(40, 40, 40) !important; } h3 { margin-top: 5px !important; } - figure { - margin-bottom: 10px !important; - } - /* aum added end*/ - a:visited { - color: #bf84d8; - } + /* .wy-menu-vertical li code { */ + /* color: rgba(200, 200, 200, 1.0) !important; */ + /* } */ + + /* .wy-menu-vertical .xref { */ + /* color: #2980B9 !important; */ + /* } */ + + a:visited { + color: #bf84d8; + } .rst-content .refbox .admonition-title{ - background-color: rgba(255, 90, 00, 1.0) !important; + background-color: rgb(255, 90, 00) !important; color: yellow; } - pre, .gh, .docutils.literal.notranslate { - background-color: rgba(40, 40, 40, 1.0) !important; + pre, .gh, .docutils.literal.notranslate { + background-color: rgb(40, 40, 40) !important; color: white !important; - } - - .wy-nav-content { - background: rgba(30, 30, 30, 1.0) !important; - color: aliceblue; - } - - .method dt, .class dt, .data dt, .attribute dt, .function dt, - .descclassname, .descname { - background-color: #525252 !important; - color: white !important; - /*border: 0, 0, 0, 0;*/ - } - - .toc-backref { - color: grey !important; - } + } - code.literal { - background-color: #2d2d2d !important; - border: 1px solid #6d6d6d !important; - } + .wy-nav-content { + background-color: rgb(30, 30, 30) !important; + color: rgb(240, 240, 240) !important; + } - .wy-nav-content-wrap { - background-color: rgba(0, 0, 0, 0.6) !important; - } + .method dt, .class dt, .data dt, .attribute dt, .function dt, + .descclassname, .descname { + background-color: #525252 !important; + color: white !important; + } - .sidebar { - background-color: #191919 !important; - } + /* .toc-backref { */ + /* background-color: blue !important; */ + /* /* color: grey !important; */ + /* } */ - .sidebar-title { - background-color: #2b2b2b !important; - } + code.literal { + background-color: #2d2d2d !important; + border: 1px solid #6d6d6d !important; + } - .xref, .py-meth { - color: #7ec3e6 !important; - } + /* .wy-nav-content-wrap { */ + /* background-color: rgba(0, 0, 0, 1.0) !important; */ + /* } */ - .wy-side-nav-search { - background-color: inherit; - border-bottom: 1px solid #fcfcfc; - } + /* .sidebar { */ + /* background-color: #191919 !important; */ + /* } */ - .wy-table thead, .rst-content table.docutils thead, .rst-content table.field-list thead { - background-color: #b9b9b9; - } + /* .sidebar-title { */ + /* background-color: #2b2b2b !important; */ + /* } */ - .wy-table thead th, .rst-content table.docutils thead th, .rst-content table.field-list thead th { - border: solid 2px #e1e4e5; - } + .xref, .py-meth { + color: #7ec3e6 !important; + } - .wy-table thead p, .rst-content table.docutils thead p, .rst-content table.field-list thead p { - margin: 0; - } + /* .wy-side-nav-search { */ + /* background-color: rgb(80, 80, 80) !important; */ + /* /* background-color: inherit; */ + /* /* border-bottom: 1px solid #fcfcfc; */ + /* } */ - .wy-table-odd td, .wy-table-striped tr:nth-child(2n-1) td, .rst-content table.docutils:not(.field-list) tr:nth-child(2n-1) td { - background-color: #343131; - } + .wy-table thead, .rst-content table.docutils thead, .rst-content table.field-list thead { + background-color: #b9b9b9; + } - .highlight .m { - color: inherit - } + .wy-table thead th, .rst-content table.docutils thead th, .rst-content table.field-list thead th { + color: rgb(200, 200, 200); + border: solid 2px #e1e4e5; + } - /* Literal.Number */ - .highlight .nv { - color: #3a7ca8 - } + .wy-table thead p, .rst-content table.docutils thead p, .rst-content table.field-list thead p { + margin: 0; + } - /* Name.Variable */ + .wy-table-odd td, .wy-table-striped tr:nth-child(2n-1) td, .rst-content table.docutils:not(.field-list) tr:nth-child(2n-1) td { + background-color: #343131; + } - .rst-content .section .admonition ul { - margin-bottom: 0; - } + .highlight .m { + color: inherit + } - li.toctree-l1 { - margin-top: 5px; - margin-bottom: 5px; - } + /* Literal.Number */ + .highlight .nv { + color: #3a7ca8 + } - .wy-menu-vertical li code { - color: rgba(200, 200, 200, 1.0) !important; - /*color: #E74C3C;*/ - } + /* Name.Variable */ + .rst-content .section .admonition ul { + margin-bottom: 0; + } - .wy-menu-vertical .xref { - color: #2980B9 !important; - } } diff --git a/resources/theme/css/theme_overrides.css b/resources/theme/css/theme_overrides.css index 1935d7c0..85015c01 100644 --- a/resources/theme/css/theme_overrides.css +++ b/resources/theme/css/theme_overrides.css @@ -3,44 +3,169 @@ * and thus any overrides or additions can be added here. * * More info: - * https://www.sphinx-doc.org/en/master/extdev/appapi.html#sphinx.application.Sphinx.add_css_file + * https://www.sphinx-doc.org/en/master/extdev/appapi.html#sphinx.application.Sphinx.add_css_file */ /* aum added */ -.rst-content { text-align: justify } -/*.rst-content .admonition {overflow: auto}*/ - -/* below code not working -.rst-content .figure .caption { - display: block; - margin-left: auto; - margin-right: auto; - text-align: center; - }*/ -/* want colored admonition icons */ -rst-content .admonition-title { background-color: #404040 }/* -.rst-content .important .admonition-title {background-color: #ddca3b} -.rst-content .important {background-color: #f6f3a5} - }*/ - -/* refbox =, seealso ( > ), note ( i ), tip i , hint (+), warn / ! \ */ -.refbox .admonition-title::before {content:"\f00b"} -.seealso .admonition-title::before{content:"\f138"} -.note .admonition-title::before{content:"\f05a"} -.tip .admonition-title::before{content:"\f129"; width: 0.75em; text-align: center} -.hint .admonition-title::before{content:"\f055"} -.warning .admonition-title::before{content:"\f071"} - -/* aum end */ - -/* aum added */ - -/* justify text */ -.rst-content { text-align: justify } - -/* aum end */ - +/* --- aum dark ------------------------------------------------------------- */ +@media (prefers-color-scheme: dark) { +/* Draws a box around menuselection & kbd & code & logic node role. */ + .socket { + line-height: 4em !important; + } + .center { text-align: center; } + .menuselection, + .kbd.docutils.literal.notranslate, + code.docutils.literal.notranslate, + .ln, + .py { + font-family: "Lato", "proxima-nova", "Helvetica Neue", Arial, sans-serif !important; + font-size: 90% !important; + font-weight: normal !important; + background-color: #101010 !important; + color: white !important; + white-space: normal !important; + /* white-space: nowrap !important; */ + padding: 2px 4px !important; + border: 1px solid #40a6e5 !important; + border-radius: 4px !important; + } + .kbd.docutils.literal.notranslate { + border: 1px solid #529952 !important; + box-shadow: none !important; + font-size: 90% !important; + } + .kbd.compound .docutils.notranslate { + border: none !important; + margin: -2px !important; + font-size: 100% !important; + } + code.docutils.literal.notranslate { + border: 1px solid #b97e4d !important; + font-size: 90% !important; + } +/* --- aum : custom '.. role:: ln' --------------------------------------- */ + .ln { + border: 1px solid #83314a !important; + background-color: transparent !important; + font-size: 90% !important; + } +/* --- aum : custom '.. role:: py' --------------------------------------- */ + .py { + border: 1px solid #ffcf3f !important; + background-color: transparent !important; + font-size: 90% !important; + } +/* --- aum : custom '.. role:: py' end ----------------------------------- */ + a.reference.internal:visited { + color: #999999 !important; + } + a.reference.internal:hover { + color: #40a6e5 !important; + } + code.xref.docutils.literal.notranslate:hover { + color: #40a6e5 !important; + } + a.reference.internal { + color: #9f61b9 !important; + background-color: #1e1e1e !important; + } + a.reference.internal.current { + color: rgb(200, 200, 200) !important; + background-color: rgb(50, 50, 50) !important; + } + .caption-text { + color: rgb(200, 200, 200); + } + .admonition { + background-color: #2d2d2d !important; + } + .admonition a.reference.internal { + background-color: transparent !important; + } + .admonition-title { + color: rgb(40, 40, 40) !important; + } + .important .admonition-title { + background-color: #FF5A00 !important; + } + .warning .admonition-title { + background-color: #FF302A !important; + } + .seealso .admonition-title { + background-color: rgb(100, 100, 100) !important; + } + .nt, .nf { + color: lightblue !important; + } + figcaption { + margin-bottom: -10px !important; + margin-top: 7px !important; + padding-left: 10px !important; + padding-right: 10px !important; + } + figure { + margin-bottom: -10px !important; + margin-top: 10px !important; + /*border: 1px solid #606060;*/ + /*padding: 5px;*/ + } + .wy-body-for-nav { + text-align: justify; + background-color: rgb(40, 40, 40) !important; + } + h3 { + margin-top: 5px !important; + } + .rst-content .refbox .admonition-title{ + background-color: rgb(255, 90, 00) !important; + color: yellow; + } + pre, .gh, .docutils.literal.notranslate { + background-color: rgb(40, 40, 40) !important; + color: white !important; + } + .wy-nav-content { + background-color: rgb(30, 30, 30) !important; + color: rgb(240, 240, 240) !important; + } + .method dt, .class dt, .data dt, .attribute dt, .function dt, + .descclassname, .descname { + background-color: #525252 !important; + color: white !important; + } + .xref, .py-meth { + color: #7ec3e6 !important; + } + .wy-table thead, .rst-content table.docutils thead, .rst-content table.field-list thead { + background-color: #b9b9b9; + } + .wy-table thead th, .rst-content table.docutils thead th, .rst-content table.field-list thead th { + color: #404040; + border: solid 2px #e1e4e5; + } + .wy-table thead p, .rst-content table.docutils thead p, .rst-content table.field-list thead p { + margin: 0; + } + .wy-table-odd td, .wy-table-striped tr:nth-child(2n-1) td, .rst-content table.docutils:not(.field-list) tr:nth-child(2n-1) td { + background-color: #343131; + } + td a.reference.internal { + background-color: transparent !important; + } + .highlight .m { + color: inherit + } + /* Literal.Number */ + .highlight .nv { + color: #3a7ca8 + } + /* Name.Variable */ + .rst-content .section .admonition ul { + margin-bottom: 0; + } +} +/* --- aum dark mode end --------------------------------------------------------------------------------- */ h5 {margin-bottom: 5px} - /* Sidebar menu links. */ .wy-menu-vertical li.toctree-l2.current li.toctree-l3 > a:hover {background: #c0c0c0} .wy-menu-vertical li.toctree-l3.current li.toctree-l4 > a:hover {background: #b5b5b5} @@ -48,41 +173,45 @@ h5 {margin-bottom: 5px} .wy-menu-vertical li.current a {border: 0} .wy-side-nav-search > a:hover {background: none; opacity: 0.9} .wy-side-nav-search > a.icon::before {content: none} - /* 'kbd' role. */ .kbd.docutils.literal { - font-family: "Lato", "proxima-nova", "Helvetica Neue", Arial, sans-serif; - font-size: 85%; - font-weight: normal; - color: #404040; + font-family: "Lato", "proxima-nova", "Helvetica Neue", Arial, sans-serif; + font-size: 85%; + font-weight: normal; + color: #404040; } - /* Ensure background of input fields is light color even when a local theme wants it to be dark. */ -input[type="text"], input[type="search"], input[type="password"], -input[type="email"], input[type="url"], -input[type="date"], input[type="month"], input[type="week"], input[type="time"], -input[type="datetime"], input[type="datetime-local"], -input[type="number"], input[type="tel"], input[type="color"] { - background-color:#FCFCFC; -} - +input[type="text"], +input[type="search"], +input[type="password"], +input[type="email"], +input[type="url"], +input[type="date"], +input[type="month"], +input[type="week"], +input[type="time"], +input[type="datetime"], +input[type="datetime-local"], +input[type="number"], +input[type="tel"], +input[type="color"] { + background-color:#FCFCFC; +} /* Fixes overlay of "align-right" images on block. */ -/* aum : does not work as expected */ +/* aum : does not work as expected ; workaround - move admonitions to the bottom of text */ .rst-content .admonition {overflow: auto} - /* Boxed paragraphs. */ .rst-content .refbox .admonition-title {background-color: #bbb} .rst-content .refbox { - -webkit-font-smoothing: antialiased; - background-color: #e3e3e3; - line-height: 24px; - margin-bottom: 24px; padding: 12px; + -webkit-font-smoothing: antialiased; + background-color: #e3e3e3; + line-height: 24px; + margin-bottom: 24px; padding: 12px; } .rst-content .seealso .admonition-title {background-color: #7a87e6} .rst-content .seealso {background-color: #e7ebfa} .rst-content .important .admonition-title {background-color: #ddca3b} .rst-content .important {background-color: #f6f3a5} - /* refbox =, seealso ( > ), note ( i ), tip i , hint (+), warn / ! \ */ .refbox .admonition-title::before {content:"\f00b"} .seealso .admonition-title::before{content:"\f138"} @@ -90,300 +219,262 @@ input[type="number"], input[type="tel"], input[type="color"] { .tip .admonition-title::before{content:"\f129"; width: 0.75em; text-align: center} .hint .admonition-title::before{content:"\f055"} .warning .admonition-title::before{content:"\f071"} - /* 'refbox' field. */ .refbox .field-list .field-name, .refbox .field-list .field-body { - padding: 0px; + padding: 0px; } .refbox dl dt {font-weight: normal} - /* Ugly 'red' literals. */ .rst-content tt.literal, .rst-content tt.literal, .rst-content code.literal { - color:#404040; + color:#606060; } - /* Literal blocks that use too much padding, make them look like regular literals. */ /* .rst-content pre.literal-block { - font-size: 75%; - margin:0; - padding:2px 4px; - color:#404040; - background: #ffffff; - white-space: normal; - display: inline; -}*/ - + font-size: 75%; + margin:0; + padding:2px 4px; + color:#404040; + background: #ffffff; + white-space: normal; + display: inline; +} */ /* Fix definitions with different ids. */ .rst-content dl.simple { - margin-bottom: 0px; + margin-bottom: 0px; } - /* Fix nested block spacing. */ .rst-content .document dl dt, .rst-content dd dl, .rst-content dl.field-list dd > p { - margin: 0; + margin: 0; } - /* Dont indent field lists */ .rst-content dl.field-list dt { - padding-left: 0 !important; + padding-left: 0 !important; } - /* Fix padding for normal definitions nested in field lists */ .rst-content dl.field-list dd > dl.simple { - padding-top: 12px; + padding-top: 12px; } - /* Without this, paragraphs in bullet points within definition lists have too much vertical padding. */ .rst-content li > p { - margin-bottom: 0px !important; + margin-bottom: 0px !important; } - /* TABLE & FIGURE */ - /* Moves captions to bottom. */ table {caption-side: bottom} - /* captions text style */ .rst-content .figure .caption, .rst-content table.docutils caption, .rst-content table.field-list caption { - font: italic 90%/18px Lato, proxima-nova, 'Helvetica Neue', Arial, sans-serif; - color: #808080; + font: italic 90%/18px Lato, proxima-nova, 'Helvetica Neue', Arial, sans-serif; + color: #808080; } - /* Captions top padding. */ .rst-content .figure .caption { margin: 4px; } .rst-content table.docutils caption { padding: 0.5em; } - /* Text word wrap. */ .wy-table-responsive table td, .wy-table-responsive table th { white-space: normal; } - /* Cell's vertical align. */ /* use "valign" class for middle align. */ .rst-content table.docutils:not(.valign) td { vertical-align: baseline; } - /* Field list align. */ .rst-content table.field-list td { padding-top: 8px; } - /* Perma-link to table, hide until hover. */ .rst-content table.docutils caption .headerlink { visibility: hidden; } .rst-content table.docutils caption:hover .headerlink { visibility: visible; } - /* Table header cells border color. */ .rst-content table.docutils th { border-color: #e1e4e5; } - /* Figure in table margin. */ .rst-content td div.figure { - margin-top: 4px; margin-bottom: 0; + margin-top: 4px; margin-bottom: 0; } - /* Figure legend. */ .legend { - font-size: 90%; - color: #484848; - margin-top: -20px; + font-size: 90%; + color: #484848; + margin-top: -20px; } .rst-content dl .legend { margin-top: -10px; } - @media screen and (max-width: 768px){ - - .wy-table-responsive table:not(.footnote) { min-width: 520px; } - .rst-content table.docutils caption { text-align: left; } - img { width: auto; } - + .wy-table-responsive table:not(.footnote) { min-width: 520px; } + .rst-content table.docutils caption { text-align: left; } + img { width: auto; } } - /* End TABLE & FIGURE. */ - /* Video center. */ iframe { - display: block; - margin: 0 auto 24px auto; + display: block; + margin: 0 auto 24px auto; } - /* Copyright font scale down. */ footer p{ font-size: smaller} - .footer-contribute { - display: block; - font-size: smaller; - margin-top: -12px + display: block; + font-size: smaller; + margin-top: -12px } - .footer-contribute li { - display: inline; - list-style-type: none; - padding-right: 20px; + display: inline; + list-style-type: none; + padding-right: 20px; } - /* Breadcrumbs "Docs" to icon. */ .wy-breadcrumbs-aside a { - position: absolute; - top: 2px; - right: 0; + position: absolute; + top: 2px; + right: 0; } .wy-breadcrumbs li:first-child a { - line-height: 0; - font-size: 0; + line-height: 0; + font-size: 0; } .wy-breadcrumbs li:first-child a::before { - content: "\f015"; - font: 16px/1 FontAwesome; + content: "\f015"; + font: 16px/1 FontAwesome; } - /* Spacing bugfix. */ -.wy-breadcrumbs li a:first-child{padding:5px} -.wy-breadcrumbs li:first-child a{padding-left:0} -.wy-breadcrumbs li:nth-last-child(2){padding-left:5px} - +.wy-breadcrumbs li a:first-child{padding: 5px} +.wy-breadcrumbs li:first-child a{padding-left: 0} +.wy-breadcrumbs li:nth-last-child(2){padding-left: 5px} /* Block-quote > dl bugfix. */ .rst-content dl{line-height:normal} /* multi-paragraph dl bugfix */ .rst-content dl p{line-height:inherit} - /* Quotes for Fig. "link". */ a[href^="#fig-"]::before {content: "\201c";} a[href^="#fig-"]::after {content: "\201d";} - /* Intermediate headline. */ .rubric {font-family: "Roboto Slab","ff-tisa-web-pro","Georgia",Arial,sans-serif} - /* ".. container::" lead, block text float around image. */ .lead { - clear: both; width: 100%; + clear: both; width: 100%; } - /* Mark external links. */ a.external {color:#656AE0;} /* List blender.org as internal. */ .external[href^="https://www.blender.org"], .external[href^="https://docs.blender.org"], .external[href^="https://wiki.blender.org"] { - color:#2980B9; + color:#2980B9; } - /* Draws a box around menuselection role. */ /* Temporary fix for "theme(0.2.5b2)" bug: no box around 'kbd' role. */ .menuselection, .kbd.docutils.literal { - font-size: 90%; - font-weight: normal; - background-color: rgba(255, 255, 255, 0.65); - border: solid #E1E4E5 1px; - white-space: nowrap; - padding: 2px 5px; + font-size: 90%; + font-weight: normal; + background-color: rgba(255, 255, 255, 0.65); + border: solid #E1E4E5 1px; + white-space: nowrap; + padding: 2px 5px; } @media screen and (max-width: 420px) { - .menuselection {white-space: normal} + .menuselection {white-space: normal} } .caption .menuselection { - background-color: transparent; - border: none; + background-color: transparent; + border: none; } .caption .kbd {background-color: transparent} - /* Remove indent on line break. */ -.rst-content .line-block {margin-left:0px} - +.rst-content .line-block {margin-left: 0px} /* Applied on main index:sections. */ /* Start section description. */ @media screen and (min-width: 450px){ - .tocdescr { - display: flex; display: -webkit-flex; - flex-flow: row wrap; -webkit-flex-flow: row wrap; - justify-content: space-between; -webkit-justify-content: space-between; - align-items: flex-start; -webkit-align-items: flex-start; - align-content: flex-start; -webkit-align-content: flex-start; - list-style-type: none; - margin-bottom: 10px; - } - /* Dan Andreasson on Stack Overflow. */ - .tocdescr:after { - content: ""; - flex: 1 0 33.3%; -webkit-flex: 1 0 33.3%; - margin-left: 45px; - align-self: stretch; -webkit-align-self: stretch; - } + .tocdescr { + display: flex; display: -webkit-flex; + flex-flow: row wrap; -webkit-flex-flow: row wrap; + justify-content: space-between; -webkit-justify-content: space-between; + align-items: flex-start; -webkit-align-items: flex-start; + align-content: flex-start; -webkit-align-content: flex-start; + list-style-type: none; + margin-bottom: 10px; + } + /* Dan Andreasson on Stack Overflow. */ + .tocdescr:after { + content: ""; + flex: 1 0 33.3%; -webkit-flex: 1 0 33.3%; + margin-left: 45px; + align-self: stretch; -webkit-align-self: stretch; + } } @media screen and (max-width: 450px) { - .tocdescr { - display: flex; display: -webkit-flex; - flex-flow: column wrap; -webkit-flex-flow: column wrap; - justify-content: space-between; -webkit-justify-content: space-between; - align-items: flex-start; -webkit-align-items: flex-start; - align-content: flex-start; -webkit-align-content: flex-start; - list-style-type: none; - margin-bottom: 10px; - } - .tocdescr:after { - content: ""; - flex: none; -webkit-flex: none; - } + .tocdescr { + display: flex; display: -webkit-flex; + flex-flow: column wrap; -webkit-flex-flow: column wrap; + justify-content: space-between; -webkit-justify-content: space-between; + align-items: flex-start; -webkit-align-items: flex-start; + align-content: flex-start; -webkit-align-content: flex-start; + list-style-type: none; + margin-bottom: 10px; + } + .tocdescr:after { + content: ""; + flex: none; -webkit-flex: none; + } } .descr { - flex: 2 0 33.3%; -webkit-flex: 2 0 33.3%; - margin: 10px 15px; - border-radius: .3em; - user-select: none; + flex: 2 0 33.3%; -webkit-flex: 2 0 33.3%; + margin: 10px 15px; + border-radius: .3em; + user-select: none; } .descr div.figure { - margin-bottom: 0px; - display: block; + margin-bottom: 0px; + display: block; } .descr img { - border-top-left-radius: .3em; - border-top-right-radius: .3em; + border-top-left-radius: .3em; + border-top-right-radius: .3em; } .descr dl {margin-bottom: 10px} .descr dl dt > a { - display: block; - width: 100%; - margin-bottom: 10px; + display: block; + width: 100%; + margin-bottom: 10px; } .descr dl dt a em, .descr dl dt a span{ - font-weight: bold; - font-style: normal; - font-size: 1.3em; + font-weight: bold; + font-style: normal; + font-size: 1.3em; } .descr dl dt{padding: 18px 15px 0px!important} .descr dl dd{ - padding: 0px 15px; - font-style: normal; - margin: 0px; - color: #808080; - font-size: 90%; + padding: 0px 15px; + font-style: normal; + margin: 0px; + color: #808080; + font-size: 90%; } .descr { - box-shadow: rgba(0,0,0,0.05) 0px 1px 4px 0px, - rgba(211,216,223,0.33) 0px 15px 20px -1px; + box-shadow: + rgba(0,0,0,0.05) 0px 1px 4px 0px, + rgba(211,216,223,0.33) 0px 15px 20px -1px; } #getting-started .descr { - box-shadow: none; + box-shadow: none; } /* End section description. */ - /* Start custom toctree. */ .toctree-wrapper .toctree-l1 > a {margin-bottom: 0.15em} /* Indent all lines following the first. */ .toctree-wrapper * a { - display: block; - width: 90%; - text-indent: -1em; - margin-left: 1em;/*invert indent*/ - padding-top: 0.25em; - line-height: 1.25em; -} - + display: block; + width: 90%; + text-indent: -1em; + margin-left: 1em;/*invert indent*/ + padding-top: 0.25em; + line-height: 1.25em; +} /* Underline provided by nested ul (not li). */ .toctree-wrapper * ul { - padding-left: 2em; - border-top: solid #ececec 1px; + padding-left: 2em; + border-top: solid #ececec 1px; } .toctree-wrapper > ul {margin-left: 1em} .rst-content .toctree-wrapper ul li ul { - margin-bottom: 0.75em; - padding-top: 0.5em; + margin-bottom: 0.75em; + padding-top: 0.5em; } .rst-content .toctree-wrapper ul li a:hover {color: #25afef} .rst-content .toctree-wrapper ul li a:visited:hover {color: #C961DA} @@ -395,11 +486,10 @@ a.external {color:#656AE0;} .toctree-wrapper .toctree-l3 > ul{border-color: #ececec} /* Remove list styling, css rule hierarchy. */ .rst-content .toctree-wrapper ul li, .rst-content .toctree-wrapper ul li li , .rst-content .toctree-wrapper ul li li li { - list-style-type: none; - margin-left: 0px; + list-style-type: none; + margin-left: 0px; } /* End custom toctree. */ - /* Start genindex consistency. */ .genindextable * strong {font-weight: normal} .genindex-jumpbox {margin-bottom: 1.245em} diff --git a/resources/theme/css/theme_overrides_blender.css b/resources/theme/css/theme_overrides_blender.css new file mode 100644 index 00000000..563732e0 --- /dev/null +++ b/resources/theme/css/theme_overrides_blender.css @@ -0,0 +1,508 @@ +/* + * This stylesheet is applied after the theme's default one, + * and thus any overrides or additions can be added here. + * + * More info: + * https://www.sphinx-doc.org/en/master/extdev/appapi.html#sphinx.application.Sphinx.add_css_file + */ + +h5 { + margin-bottom: 5px +} + +/* Sidebar menu links. */ +.wy-menu-vertical li.toctree-l2.current li.toctree-l3>a:hover { + background: #c0c0c0 +} + +.wy-menu-vertical li.toctree-l3.current li.toctree-l4>a:hover { + background: #b5b5b5 +} + +.wy-menu-vertical li.toctree-l4 { + font-size: 1em +} + +.wy-menu-vertical li.current a { + border: 0 +} + +.wy-side-nav-search>a:hover { + background: none; + opacity: 0.9 +} + +.wy-side-nav-search>a.icon::before { + content: none +} + +.wy-menu-vertical p.caption { + color: #e6e6e6; +} + +/* Ensure background of input fields is light color even when a local theme wants it to be dark. */ +input[type="text"], +input[type="search"], +input[type="password"], +input[type="email"], +input[type="url"], +input[type="date"], +input[type="month"], +input[type="week"], +input[type="time"], +input[type="datetime"], +input[type="datetime-local"], +input[type="number"], +input[type="tel"], +input[type="color"] { + background-color: #FCFCFC; +} + +/* Boxed paragraphs. */ +.rst-content .refbox .admonition-title { + background-color: #bbb +} + +.rst-content .refbox { + background-color: #e3e3e3 +} + +.rst-content .seealso .admonition-title { + background-color: #7a87e6 +} + +.rst-content .seealso { + background-color: #e7ebfa +} + +.rst-content .important .admonition-title { + background-color: #ddca3b +} + +.rst-content .important { + background-color: #f6f3a5 +} + +/* refbox =, seealso ( > ), note ( i ), tip i , hint (+), warn / ! \ */ +.refbox .admonition-title::before { + content: "\f00b" +} + +.seealso .admonition-title::before { + content: "\f138" +} + +.note .admonition-title::before { + content: "\f05a" +} + +.tip .admonition-title::before { + content: "\f129"; + width: 0.75em; + text-align: center +} + +.hint .admonition-title::before { + content: "\f055" +} + +.warning .admonition-title::before { + content: "\f071" +} + +/* 'refbox' field. */ +.refbox .field-list .field-name, +.refbox .field-list .field-body { + padding: 0px; +} + +.refbox dl dt { + font-weight: normal +} + +/* Ugly 'red' literals. */ +.rst-content tt.literal, +.rst-content tt.literal, +.rst-content code.literal { + color: #404040; + border-radius: .4em; +} + +/* Literal blocks that use too much padding, make them look like regular literals. */ +.rst-content pre.literal-block { + font-size: 75%; + margin: 0; + padding: 2px 4px; + color: #404040; + background: #ffffff; + white-space: normal; + display: inline; + border-radius: .4em; +} + +/* Fix definisions with different ids. */ +.rst-content dl.simple { + margin-bottom: 0px; +} + +/* Fix nested block spacing. */ +.rst-content .document dl dt, +.rst-content dd dl, +.rst-content dl.field-list dd>p { + margin: 0; +} + +/* Dont indent field lists */ +.rst-content dl.field-list dt { + padding-left: 0 !important; +} + +/* Fix padding for normal definitions nested in field lists */ +.rst-content dl.field-list dd>dl.simple { + padding-top: 12px; +} + +/* Without this, paragraphs in bullet points within definition lists have too much vertical padding. */ +.rst-content li>p { + margin-bottom: 0px !important; +} + +/* TABLE & FIGURE */ + +/* captions text style */ +.rst-content .figure .caption, +.rst-content figure figcaption>p, +.rst-content table.docutils caption, +.rst-content table.field-list caption { + font: italic 90%/18px Lato, proxima-nova, 'Helvetica Neue', Arial, sans-serif; + color: #808080; +} + +/* Captions top padding. */ +.rst-content .figure .caption, +.rst-content figure figcaption { + margin-top: 4px; +} + +.rst-content table.docutils caption { + padding: 0.5em; +} + +/* Text word wrap. */ +.wy-table-responsive table td, +.wy-table-responsive table th { + white-space: normal; +} + +/* Cell's vertical align. */ +/* use "valign" class for middle align. */ +.rst-content table.docutils:not(.valign) td { + vertical-align: baseline; +} + +/* Field list align. */ +.rst-content table.field-list td { + padding-top: 8px; +} + +/* Table header cells border color. */ +.rst-content table.docutils th { + border-color: #e1e4e5; +} + +/* Figure in table margin. */ +.rst-content td div.figure, +.rst-content td figure { + margin-top: 4px; + margin-bottom: 0; +} + +/* Figure legend. */ +.legend { + font-size: 90%; + color: #484848; + margin-top: -20px; +} + +.rst-content dl .legend { + margin-top: -10px; +} + +@media screen and (max-width: 768px) { + + .wy-table-responsive table:not(.footnote) { + min-width: 520px; + } + + .rst-content table.docutils caption { + text-align: left; + } + + img { + width: auto; + } + +} + +/* End TABLE & FIGURE. */ + +/* Video center. */ +iframe { + display: block; + margin: 0 auto 24px auto; + border: 0; + max-width: 100%; +} + +/* Copyright font scale down. */ +footer p { + font-size: smaller +} + +.footer-contribute { + display: block; + font-size: smaller; + margin-top: -12px +} + +.footer-contribute li { + display: inline; + list-style-type: none; + padding-right: 20px; +} + +/* Quotes for Fig. "link". */ +a[href^="#fig-"]::before { + content: "\201c"; +} + +a[href^="#fig-"]::after { + content: "\201d"; +} + +/* Intermediate headline. */ +.rubric { + font-family: "Roboto Slab", "ff-tisa-web-pro", "Georgia", Arial, sans-serif +} + +/* ".. container::" lead, block text float around image. */ +.lead { + clear: both; + width: 100%; +} + +/* Mark external links. */ +a.external { + color: #656AE0; +} + +/* List blender.org as internal. */ +.external[href^="https://www.blender.org"], +.external[href^="https://docs.blender.org"], +.external[href^="https://wiki.blender.org"] { + color: #2980B9; +} + +/* Draws a box around menuselection role. */ +.menuselection { + font-family: "Lato", "proxima-nova", "Helvetica Neue", Arial, sans-serif; + font-size: 90%; + font-weight: normal; + background-color: rgba(255, 255, 255, 0.65); + border: solid #E1E4E5 1px; + padding: 2px 5px; + border-radius: .4em; +} + +@media screen and (max-width: 420px) { + .menuselection { + white-space: normal + } +} + +.caption .menuselection { + background-color: transparent; + border: none; +} + +/* Remove indent on line break. */ +.rst-content .line-block { + margin-left: 0px +} + +/* Applied on main index:sections. */ + +.global-index-toc { + display: none; +} + +/* Start section cards. */ +.toc-cards { + display: grid; + grid-template-columns: repeat(auto-fit, minmax(225px, 1fr)); + grid-gap: 20px; + list-style-type: none; + margin-bottom: 24px; +} + +.card { + border-radius: .3em; + user-select: none; +} + +.card div.figure, +.card figure { + margin-bottom: 0px; + display: block; +} + +.card img { + border-top-left-radius: .3em; + border-top-right-radius: .3em; +} + +.card dl { + margin-bottom: 10px +} + +.card dl dt>a { + display: block; + width: 100%; + margin-bottom: 10px; +} + +.card dl dt a em, +.card dl dt a span { + font-weight: bold; + font-style: normal; + font-size: 1.3em; +} + +.card dl dt { + padding: 18px 15px 0px !important +} + +.card dl dd { + padding: 0px 15px 5px 15px; + font-style: normal; + margin: 0px; + color: #808080; + font-size: 90%; +} + +.card { + box-shadow: rgba(0, 0, 0, 0.05) 0px 1px 4px 0px, + rgba(211, 216, 223, 0.33) 0px 15px 20px -1px; +} + +#getting-started .card { + box-shadow: none; +} + +/* End section cards. */ + +/* Start custom toctree. */ +.toctree-wrapper .toctree-l1>a { + margin-bottom: 0.15em +} + +/* Indent all lines following the first. */ +.toctree-wrapper * a { + display: block; + width: 90%; + text-indent: -1em; + margin-left: 1em; + /*invert indent*/ + padding-top: 0.25em; + line-height: 1.25em; +} + +/* Underline provided by nested ul (not li). */ +.toctree-wrapper * ul { + padding-left: 2em; + border-top: solid #ececec 1px; +} + +.toctree-wrapper>ul { + margin-left: 1em +} + +.rst-content .toctree-wrapper ul li ul { + margin-bottom: 0.75em; + padding-top: 0.5em; +} + +.rst-content .toctree-wrapper ul li a:hover { + color: #25afef +} + +.rst-content .toctree-wrapper ul li a:visited:hover { + color: #C961DA +} + +.toctree-wrapper .toctree-l1>a { + font-size: 104% +} + +.toctree-wrapper .toctree-l2>a { + font-size: 102% +} + +.toctree-wrapper .toctree-l3>a { + font-size: 100% +} + +.toctree-wrapper .toctree-l1>ul { + border-color: #bfbfbf +} + +.toctree-wrapper .toctree-l2>ul { + border-color: #e1e0e0 +} + +.toctree-wrapper .toctree-l3>ul { + border-color: #ececec +} + +/* Remove list styling, css rule hierarchy. */ +.rst-content .toctree-wrapper ul li, +.rst-content .toctree-wrapper ul li li, +.rst-content .toctree-wrapper ul li li li { + list-style-type: none; + margin-left: 0px; +} + +/* End custom toctree. */ + +/* Start genindex consistency. */ +.genindextable * strong { + font-weight: normal +} + +.genindex-jumpbox { + margin-bottom: 1.245em +} + +.indextable { + margin-bottom: 1.245em +} + +/* End genindex consistency. */ + +/* Correctly display keyboard shortcuts inside definition lists (theme.css explicitly excludes this case for some reason) */ +dt>kbd { + font-weight: normal; + font-size: 80%; + background-color: #fff; + border: 1px solid #a6a6a6; + border-radius: 4px; + box-shadow: 0 2px grey; + padding: 2.4px 6px; + margin: auto 0; +} + +/* Fixes to field list, see #104636 */ + +.field-list { + grid-template-columns: fit-content(24px) auto !important; +} \ No newline at end of file diff --git a/source/blends/logic_nodes/2d_scroller_ln_tutorial.blend b/source/blends/logic_nodes/2d_scroller_ln_tutorial.blend new file mode 100644 index 00000000..840e7d32 Binary files /dev/null and b/source/blends/logic_nodes/2d_scroller_ln_tutorial.blend differ diff --git a/source/blends/logic_nodes/fps_ln_tutorial.blend b/source/blends/logic_nodes/fps_ln_tutorial.blend new file mode 100644 index 00000000..a037b9b3 Binary files /dev/null and b/source/blends/logic_nodes/fps_ln_tutorial.blend differ diff --git a/source/blends/Python_Scripting/001_reloadme/001_reloadme.zip b/source/blends/python_scripting/001_reloadme/001_reloadme.zip similarity index 100% rename from source/blends/Python_Scripting/001_reloadme/001_reloadme.zip rename to source/blends/python_scripting/001_reloadme/001_reloadme.zip diff --git a/source/blends/Python_Scripting/002_oop/002_oop.zip b/source/blends/python_scripting/002_oop/002_oop.zip similarity index 100% rename from source/blends/Python_Scripting/002_oop/002_oop.zip rename to source/blends/python_scripting/002_oop/002_oop.zip diff --git a/source/blends/Python_Scripting/003_template/003_template.zip b/source/blends/python_scripting/003_template/003_template.zip similarity index 100% rename from source/blends/Python_Scripting/003_template/003_template.zip rename to source/blends/python_scripting/003_template/003_template.zip diff --git a/source/conf.py b/source/conf.py index a53b6f70..28fcef10 100644 --- a/source/conf.py +++ b/source/conf.py @@ -49,7 +49,7 @@ #'sphinx.ext.intersphinx', #'sphinx.ext.todo', ] - +# autosectionlabel_maxdepth = 1 # Display todos todo_include_todos = False @@ -89,7 +89,7 @@ # The theme to use for HTML and HTML Help pages. See the documentation for # a list of builtin themes. -import sphinx_rtd_theme +# import sphinx_rtd_theme html_theme = 'sphinx_rtd_theme' @@ -113,11 +113,18 @@ # so a file named "default.css" will overwrite the builtin "default.css". html_static_path = ["../resources/theme"] # _static +# for production, switch to theme_overrides.css if html_theme == "sphinx_rtd_theme": html_css_files = ["css/theme_overrides.css"] -# for production, switch to above theme_overrides.css + # html_css_files = ["css/theme_overrides_blender.css"] # html_css_files = ["css/rtd_dark.css"] - +# --- aum : custom logic node 'role' ------------------ +rst_prolog = ''' + .. role:: ln + .. role:: py + .. role:: socket + ''' +# --- aum : custom 'role' end -------------- # Custom sidebar templates, must be a dictionary that maps document names # to template names. # diff --git a/source/images/Tutorials/Introducing_Logic_Nodes/tutorials_introducing-logic-nodes_00_linux-terminal-run.png b/source/images/Tutorials/Introducing_Logic_Nodes/tutorials_introducing-logic-nodes_00_linux-terminal-run.png deleted file mode 100644 index cd65dbb3..00000000 Binary files a/source/images/Tutorials/Introducing_Logic_Nodes/tutorials_introducing-logic-nodes_00_linux-terminal-run.png and /dev/null differ diff --git a/source/images/Tutorials/Introducing_Logic_Nodes/tutorials_introducing-logic-nodes_01_edit-menu_preferences.png b/source/images/Tutorials/Introducing_Logic_Nodes/tutorials_introducing-logic-nodes_01_edit-menu_preferences.png deleted file mode 100644 index 3aa6e207..00000000 Binary files a/source/images/Tutorials/Introducing_Logic_Nodes/tutorials_introducing-logic-nodes_01_edit-menu_preferences.png and /dev/null differ diff --git a/source/images/Tutorials/Introducing_Logic_Nodes/tutorials_introducing-logic-nodes_02_preferences_filter_logic.png b/source/images/Tutorials/Introducing_Logic_Nodes/tutorials_introducing-logic-nodes_02_preferences_filter_logic.png deleted file mode 100644 index a47c1bb4..00000000 Binary files a/source/images/Tutorials/Introducing_Logic_Nodes/tutorials_introducing-logic-nodes_02_preferences_filter_logic.png and /dev/null differ diff --git a/source/images/Tutorials/Introducing_Logic_Nodes/tutorials_introducing-logic-nodes_03_preferences_addons_logic-nodes-unfold.png b/source/images/Tutorials/Introducing_Logic_Nodes/tutorials_introducing-logic-nodes_03_preferences_addons_logic-nodes-unfold.png deleted file mode 100644 index 97c5cc9b..00000000 Binary files a/source/images/Tutorials/Introducing_Logic_Nodes/tutorials_introducing-logic-nodes_03_preferences_addons_logic-nodes-unfold.png and /dev/null differ diff --git a/source/images/Tutorials/Introducing_Logic_Nodes/tutorials_introducing-logic-nodes_04_editor.png b/source/images/Tutorials/Introducing_Logic_Nodes/tutorials_introducing-logic-nodes_04_editor.png deleted file mode 100644 index c4c796f2..00000000 Binary files a/source/images/Tutorials/Introducing_Logic_Nodes/tutorials_introducing-logic-nodes_04_editor.png and /dev/null differ diff --git a/source/images/Tutorials/Introducing_Logic_Nodes/tutorials_introducing-logic-nodes_05_new-logic-node-tree.png b/source/images/Tutorials/Introducing_Logic_Nodes/tutorials_introducing-logic-nodes_05_new-logic-node-tree.png deleted file mode 100644 index abc86e87..00000000 Binary files a/source/images/Tutorials/Introducing_Logic_Nodes/tutorials_introducing-logic-nodes_05_new-logic-node-tree.png and /dev/null differ diff --git a/source/images/Tutorials/Introducing_Logic_Nodes/tutorials_introducing-logic-nodes_06_n-panel-dashboard.png b/source/images/Tutorials/Introducing_Logic_Nodes/tutorials_introducing-logic-nodes_06_n-panel-dashboard.png deleted file mode 100644 index bbd6c6aa..00000000 Binary files a/source/images/Tutorials/Introducing_Logic_Nodes/tutorials_introducing-logic-nodes_06_n-panel-dashboard.png and /dev/null differ diff --git a/source/images/Tutorials/Introducing_Logic_Nodes/tutorials_introducing-logic-nodes_07_add-key-node.png b/source/images/Tutorials/Introducing_Logic_Nodes/tutorials_introducing-logic-nodes_07_add-key-node.png deleted file mode 100644 index d38cea67..00000000 Binary files a/source/images/Tutorials/Introducing_Logic_Nodes/tutorials_introducing-logic-nodes_07_add-key-node.png and /dev/null differ diff --git a/source/images/Tutorials/Introducing_Logic_Nodes/tutorials_introducing-logic-nodes_08_shift-a-search-print-node.png b/source/images/Tutorials/Introducing_Logic_Nodes/tutorials_introducing-logic-nodes_08_shift-a-search-print-node.png deleted file mode 100644 index 2b8d77ad..00000000 Binary files a/source/images/Tutorials/Introducing_Logic_Nodes/tutorials_introducing-logic-nodes_08_shift-a-search-print-node.png and /dev/null differ diff --git a/source/images/Tutorials/Introducing_Logic_Nodes/tutorials_introducing-logic-nodes_09_nodes-added-connected.png b/source/images/Tutorials/Introducing_Logic_Nodes/tutorials_introducing-logic-nodes_09_nodes-added-connected.png deleted file mode 100644 index 6e494e55..00000000 Binary files a/source/images/Tutorials/Introducing_Logic_Nodes/tutorials_introducing-logic-nodes_09_nodes-added-connected.png and /dev/null differ diff --git a/source/images/Tutorials/Introducing_Logic_Nodes/tutorials_introducing-logic-nodes_10_dashboard_tree-apply-to-selected.png b/source/images/Tutorials/Introducing_Logic_Nodes/tutorials_introducing-logic-nodes_10_dashboard_tree-apply-to-selected.png deleted file mode 100644 index c513e039..00000000 Binary files a/source/images/Tutorials/Introducing_Logic_Nodes/tutorials_introducing-logic-nodes_10_dashboard_tree-apply-to-selected.png and /dev/null differ diff --git a/source/images/Tutorials/Introducing_Logic_Nodes/tutorials_introducing-logic-nodes_11_dashboard_tree-applied-to.png b/source/images/Tutorials/Introducing_Logic_Nodes/tutorials_introducing-logic-nodes_11_dashboard_tree-applied-to.png deleted file mode 100644 index 51fdf7c2..00000000 Binary files a/source/images/Tutorials/Introducing_Logic_Nodes/tutorials_introducing-logic-nodes_11_dashboard_tree-applied-to.png and /dev/null differ diff --git a/source/images/Tutorials/Introducing_Logic_Nodes/tutorials_introducing-logic-nodes_12_rearange-n-sub-panel.png b/source/images/Tutorials/Introducing_Logic_Nodes/tutorials_introducing-logic-nodes_12_rearange-n-sub-panel.png deleted file mode 100644 index 89e9aa45..00000000 Binary files a/source/images/Tutorials/Introducing_Logic_Nodes/tutorials_introducing-logic-nodes_12_rearange-n-sub-panel.png and /dev/null differ diff --git a/source/images/Tutorials/Introducing_Logic_Nodes/tutorials_introducing-logic-nodes_13_render-properties_embedded-start.png b/source/images/Tutorials/Introducing_Logic_Nodes/tutorials_introducing-logic-nodes_13_render-properties_embedded-start.png deleted file mode 100644 index 6a43e561..00000000 Binary files a/source/images/Tutorials/Introducing_Logic_Nodes/tutorials_introducing-logic-nodes_13_render-properties_embedded-start.png and /dev/null differ diff --git a/source/images/Tutorials/Introducing_Logic_Nodes/tutorials_introducing-logic-nodes_14_terminal_print-output.png b/source/images/Tutorials/Introducing_Logic_Nodes/tutorials_introducing-logic-nodes_14_terminal_print-output.png deleted file mode 100644 index afd3c97b..00000000 Binary files a/source/images/Tutorials/Introducing_Logic_Nodes/tutorials_introducing-logic-nodes_14_terminal_print-output.png and /dev/null differ diff --git a/source/images/Tutorials/introducing_logic_bricks/_06-play_animation-rotate_scale.png b/source/images/Tutorials/introducing_logic_bricks/_06-play_animation-rotate_scale.png deleted file mode 100644 index 78ffae5b..00000000 Binary files a/source/images/Tutorials/introducing_logic_bricks/_06-play_animation-rotate_scale.png and /dev/null differ diff --git a/source/images/datablocks/dbl-outliner-blender_file_mode.png b/source/images/datablocks/dbl-outliner-blender_file_mode.png new file mode 100644 index 00000000..cc8a046c Binary files /dev/null and b/source/images/datablocks/dbl-outliner-blender_file_mode.png differ diff --git a/source/images/datablocks/dbl-types-icons.png b/source/images/datablocks/dbl-types-icons.png new file mode 100644 index 00000000..129a5b9f Binary files /dev/null and b/source/images/datablocks/dbl-types-icons.png differ diff --git a/source/images/datablocks/dbl-zero_fake_user.png b/source/images/datablocks/dbl-zero_fake_user.png new file mode 100644 index 00000000..ea52b2e2 Binary files /dev/null and b/source/images/datablocks/dbl-zero_fake_user.png differ diff --git a/source/images/Release/standalone_player-personalize01.png b/source/images/deployment/deploy-personalize_icon.png similarity index 100% rename from source/images/Release/standalone_player-personalize01.png rename to source/images/deployment/deploy-personalize_icon.png diff --git a/source/images/Editors/editors-logic_editor-logic_editor.png b/source/images/editors/editors-logic_editor-logic_editor.png similarity index 100% rename from source/images/Editors/editors-logic_editor-logic_editor.png rename to source/images/editors/editors-logic_editor-logic_editor.png diff --git a/source/images/editors-properties-constraints-rigid_body_joint-cone_twist.png b/source/images/editors/editors-properties-constraints-rigid_body_joint-cone_twist.png similarity index 100% rename from source/images/editors-properties-constraints-rigid_body_joint-cone_twist.png rename to source/images/editors/editors-properties-constraints-rigid_body_joint-cone_twist.png diff --git a/source/images/editors-properties-constraints-rigid_body_joint-generic_6_dof.png b/source/images/editors/editors-properties-constraints-rigid_body_joint-generic_6_dof.png similarity index 100% rename from source/images/editors-properties-constraints-rigid_body_joint-generic_6_dof.png rename to source/images/editors/editors-properties-constraints-rigid_body_joint-generic_6_dof.png diff --git a/source/images/editors-properties-constraints-rigid_body_joint-hinge.png b/source/images/editors/editors-properties-constraints-rigid_body_joint-hinge.png similarity index 100% rename from source/images/editors-properties-constraints-rigid_body_joint-hinge.png rename to source/images/editors/editors-properties-constraints-rigid_body_joint-hinge.png diff --git a/source/images/editors-properties-constraints-rigid_body_joint.png b/source/images/editors/editors-properties-constraints-rigid_body_joint.png similarity index 100% rename from source/images/editors-properties-constraints-rigid_body_joint.png rename to source/images/editors/editors-properties-constraints-rigid_body_joint.png diff --git a/source/images/editors-properties-materials-game_settings.png b/source/images/editors/editors-properties-materials-game_settings.png similarity index 100% rename from source/images/editors-properties-materials-game_settings.png rename to source/images/editors/editors-properties-materials-game_settings.png diff --git a/source/images/editors-properties-materials-physics_panel.png b/source/images/editors/editors-properties-materials-physics_panel.png similarity index 100% rename from source/images/editors-properties-materials-physics_panel.png rename to source/images/editors/editors-properties-materials-physics_panel.png diff --git a/source/images/editors-properties-object-display.png b/source/images/editors/editors-properties-object-display.png similarity index 100% rename from source/images/editors-properties-object-display.png rename to source/images/editors/editors-properties-object-display.png diff --git a/source/images/editors-properties-object-duplication.png b/source/images/editors/editors-properties-object-duplication.png similarity index 100% rename from source/images/editors-properties-object-duplication.png rename to source/images/editors/editors-properties-object-duplication.png diff --git a/source/images/editors-properties-object-groups.png b/source/images/editors/editors-properties-object-groups.png similarity index 100% rename from source/images/editors-properties-object-groups.png rename to source/images/editors/editors-properties-object-groups.png diff --git a/source/images/editors-properties-object-levels_of_detail-generation.png b/source/images/editors/editors-properties-object-levels_of_detail-generation.png similarity index 100% rename from source/images/editors-properties-object-levels_of_detail-generation.png rename to source/images/editors/editors-properties-object-levels_of_detail-generation.png diff --git a/source/images/editors-properties-object-levels_of_detail-settings.png b/source/images/editors/editors-properties-object-levels_of_detail-settings.png similarity index 100% rename from source/images/editors-properties-object-levels_of_detail-settings.png rename to source/images/editors/editors-properties-object-levels_of_detail-settings.png diff --git a/source/images/editors-properties-object-levels_of_detail-tools.png b/source/images/editors/editors-properties-object-levels_of_detail-tools.png similarity index 100% rename from source/images/editors-properties-object-levels_of_detail-tools.png rename to source/images/editors/editors-properties-object-levels_of_detail-tools.png diff --git a/source/images/editors-properties-object-levels_of_detail.png b/source/images/editors/editors-properties-object-levels_of_detail.png similarity index 100% rename from source/images/editors-properties-object-levels_of_detail.png rename to source/images/editors/editors-properties-object-levels_of_detail.png diff --git a/source/images/editors-properties-object-name.png b/source/images/editors/editors-properties-object-name.png similarity index 100% rename from source/images/editors-properties-object-name.png rename to source/images/editors/editors-properties-object-name.png diff --git a/source/images/editors-properties-object-relations.png b/source/images/editors/editors-properties-object-relations.png similarity index 100% rename from source/images/editors-properties-object-relations.png rename to source/images/editors/editors-properties-object-relations.png diff --git a/source/images/editors-properties-object-relations_extras.png b/source/images/editors/editors-properties-object-relations_extras.png similarity index 100% rename from source/images/editors-properties-object-relations_extras.png rename to source/images/editors/editors-properties-object-relations_extras.png diff --git a/source/images/editors-properties-object-transforms.png b/source/images/editors/editors-properties-object-transforms.png similarity index 100% rename from source/images/editors-properties-object-transforms.png rename to source/images/editors/editors-properties-object-transforms.png diff --git a/source/images/editors-properties-object.png b/source/images/editors/editors-properties-object.png similarity index 100% rename from source/images/editors-properties-object.png rename to source/images/editors/editors-properties-object.png diff --git a/source/images/editors-properties-physics-collision_bounds.png b/source/images/editors/editors-properties-physics-collision_bounds.png similarity index 100% rename from source/images/editors-properties-physics-collision_bounds.png rename to source/images/editors/editors-properties-physics-collision_bounds.png diff --git a/source/images/editors-properties-physics-create_obstacle.png b/source/images/editors/editors-properties-physics-create_obstacle.png similarity index 100% rename from source/images/editors-properties-physics-create_obstacle.png rename to source/images/editors/editors-properties-physics-create_obstacle.png diff --git a/source/images/editors-properties-physics-physics.png b/source/images/editors/editors-properties-physics-physics.png similarity index 100% rename from source/images/editors-properties-physics-physics.png rename to source/images/editors/editors-properties-physics-physics.png diff --git a/source/images/editors-properties-physics-rigid_body-bounding_box.png b/source/images/editors/editors-properties-physics-rigid_body-bounding_box.png similarity index 100% rename from source/images/editors-properties-physics-rigid_body-bounding_box.png rename to source/images/editors/editors-properties-physics-rigid_body-bounding_box.png diff --git a/source/images/editors-properties-physics-rigid_body-convex_hull.png b/source/images/editors/editors-properties-physics-rigid_body-convex_hull.png similarity index 100% rename from source/images/editors-properties-physics-rigid_body-convex_hull.png rename to source/images/editors/editors-properties-physics-rigid_body-convex_hull.png diff --git a/source/images/editors-properties-physics-rigid_body-manual_hull.png b/source/images/editors/editors-properties-physics-rigid_body-manual_hull.png similarity index 100% rename from source/images/editors-properties-physics-rigid_body-manual_hull.png rename to source/images/editors/editors-properties-physics-rigid_body-manual_hull.png diff --git a/source/images/editors-properties-physics-rigid_body-origin_to_box_bounds.png b/source/images/editors/editors-properties-physics-rigid_body-origin_to_box_bounds.png similarity index 100% rename from source/images/editors-properties-physics-rigid_body-origin_to_box_bounds.png rename to source/images/editors/editors-properties-physics-rigid_body-origin_to_box_bounds.png diff --git a/source/images/editors-properties-physics-rigid_body.png b/source/images/editors/editors-properties-physics-rigid_body.png similarity index 100% rename from source/images/editors-properties-physics-rigid_body.png rename to source/images/editors/editors-properties-physics-rigid_body.png diff --git a/source/images/editors-properties-render-animations.png b/source/images/editors/editors-properties-render-animations.png similarity index 100% rename from source/images/editors-properties-render-animations.png rename to source/images/editors/editors-properties-render-animations.png diff --git a/source/images/editors-properties-render-bake.png b/source/images/editors/editors-properties-render-bake.png similarity index 100% rename from source/images/editors-properties-render-bake.png rename to source/images/editors/editors-properties-render-bake.png diff --git a/source/images/editors-properties-render-debug.png b/source/images/editors/editors-properties-render-debug.png similarity index 100% rename from source/images/editors-properties-render-debug.png rename to source/images/editors/editors-properties-render-debug.png diff --git a/source/images/editors-properties-render-display.png b/source/images/editors/editors-properties-render-display.png similarity index 100% rename from source/images/editors-properties-render-display.png rename to source/images/editors/editors-properties-render-display.png diff --git a/source/images/editors-properties-render-embedded_player.png b/source/images/editors/editors-properties-render-embedded_player.png similarity index 100% rename from source/images/editors-properties-render-embedded_player.png rename to source/images/editors/editors-properties-render-embedded_player.png diff --git a/source/images/editors-properties-render-shading.png b/source/images/editors/editors-properties-render-shading.png similarity index 100% rename from source/images/editors-properties-render-shading.png rename to source/images/editors/editors-properties-render-shading.png diff --git a/source/images/editors-properties-render-standalone_player.png b/source/images/editors/editors-properties-render-standalone_player.png similarity index 100% rename from source/images/editors-properties-render-standalone_player.png rename to source/images/editors/editors-properties-render-standalone_player.png diff --git a/source/images/editors-properties-render-stereo.png b/source/images/editors/editors-properties-render-stereo.png similarity index 100% rename from source/images/editors-properties-render-stereo.png rename to source/images/editors/editors-properties-render-stereo.png diff --git a/source/images/editors-properties-render-system.png b/source/images/editors/editors-properties-render-system.png similarity index 100% rename from source/images/editors-properties-render-system.png rename to source/images/editors/editors-properties-render-system.png diff --git a/source/images/editors-properties-scene-level_of_detail.png b/source/images/editors/editors-properties-scene-level_of_detail.png similarity index 100% rename from source/images/editors-properties-scene-level_of_detail.png rename to source/images/editors/editors-properties-scene-level_of_detail.png diff --git a/source/images/editors-properties-scene-navigation_mesh.png b/source/images/editors/editors-properties-scene-navigation_mesh.png similarity index 100% rename from source/images/editors-properties-scene-navigation_mesh.png rename to source/images/editors/editors-properties-scene-navigation_mesh.png diff --git a/source/images/editors-properties-scene-obstacle_simulation.png b/source/images/editors/editors-properties-scene-obstacle_simulation.png similarity index 100% rename from source/images/editors-properties-scene-obstacle_simulation.png rename to source/images/editors/editors-properties-scene-obstacle_simulation.png diff --git a/source/images/editors-properties-scene-physics.png b/source/images/editors/editors-properties-scene-physics.png similarity index 100% rename from source/images/editors-properties-scene-physics.png rename to source/images/editors/editors-properties-scene-physics.png diff --git a/source/images/editors-properties-scene-python_console.png b/source/images/editors/editors-properties-scene-python_console.png similarity index 100% rename from source/images/editors-properties-scene-python_console.png rename to source/images/editors/editors-properties-scene-python_console.png diff --git a/source/images/editors-properties-scene-scene.png b/source/images/editors/editors-properties-scene-scene.png similarity index 100% rename from source/images/editors-properties-scene-scene.png rename to source/images/editors/editors-properties-scene-scene.png diff --git a/source/images/editors-properties-scene-units.png b/source/images/editors/editors-properties-scene-units.png similarity index 100% rename from source/images/editors-properties-scene-units.png rename to source/images/editors/editors-properties-scene-units.png diff --git a/source/images/editors-properties-tabs.png b/source/images/editors/editors-properties-tabs.png similarity index 100% rename from source/images/editors-properties-tabs.png rename to source/images/editors/editors-properties-tabs.png diff --git a/source/images/editors-properties-world-env_lighting.png b/source/images/editors/editors-properties-world-env_lighting.png similarity index 100% rename from source/images/editors-properties-world-env_lighting.png rename to source/images/editors/editors-properties-world-env_lighting.png diff --git a/source/images/editors-properties-world-mist.png b/source/images/editors/editors-properties-world-mist.png similarity index 100% rename from source/images/editors-properties-world-mist.png rename to source/images/editors/editors-properties-world-mist.png diff --git a/source/images/editors-properties-world-world.png b/source/images/editors/editors-properties-world-world.png similarity index 100% rename from source/images/editors-properties-world-world.png rename to source/images/editors/editors-properties-world-world.png diff --git a/source/images/Editors/editors-text_editor-header.png b/source/images/editors/editors-text_editor-header.png similarity index 100% rename from source/images/Editors/editors-text_editor-header.png rename to source/images/editors/editors-text_editor-header.png diff --git a/source/images/Editors/editors-text_editor-header_loaded.png b/source/images/editors/editors-text_editor-header_loaded.png similarity index 100% rename from source/images/Editors/editors-text_editor-header_loaded.png rename to source/images/editors/editors-text_editor-header_loaded.png diff --git a/source/images/Editors/editors-text_editor-template_files.png b/source/images/editors/editors-text_editor-template_files.png similarity index 100% rename from source/images/Editors/editors-text_editor-template_files.png rename to source/images/editors/editors-text_editor-template_files.png diff --git a/source/images/Editors/editors-text_editor-text_editor.png b/source/images/editors/editors-text_editor-text_editor.png similarity index 100% rename from source/images/Editors/editors-text_editor-text_editor.png rename to source/images/editors/editors-text_editor-text_editor.png diff --git a/source/images/editors/edt-embedded_standalone.png b/source/images/editors/edt-embedded_standalone.png new file mode 100644 index 00000000..e33cb1a7 Binary files /dev/null and b/source/images/editors/edt-embedded_standalone.png differ diff --git a/source/images/editors/edt-properties_editor_tabs.png b/source/images/editors/edt-properties_editor_tabs.png new file mode 100644 index 00000000..4debbc04 Binary files /dev/null and b/source/images/editors/edt-properties_editor_tabs.png differ diff --git a/source/images/Tutorials/introducing_logic_nodes/00_terminal_run.png b/source/images/editors/logic_nodes/00_terminal_run.png similarity index 100% rename from source/images/Tutorials/introducing_logic_nodes/00_terminal_run.png rename to source/images/editors/logic_nodes/00_terminal_run.png diff --git a/source/images/Tutorials/introducing_logic_nodes/01_edit_menu_prefs.png b/source/images/editors/logic_nodes/01_edit_menu_prefs.png similarity index 100% rename from source/images/Tutorials/introducing_logic_nodes/01_edit_menu_prefs.png rename to source/images/editors/logic_nodes/01_edit_menu_prefs.png diff --git a/source/images/Tutorials/introducing_logic_nodes/02_prefs_filter_logic.png b/source/images/editors/logic_nodes/02_prefs_filter_logic.png similarity index 100% rename from source/images/Tutorials/introducing_logic_nodes/02_prefs_filter_logic.png rename to source/images/editors/logic_nodes/02_prefs_filter_logic.png diff --git a/source/images/Tutorials/introducing_logic_nodes/03_prefs_addons_ln_unfold.png b/source/images/editors/logic_nodes/03_prefs_addons_ln_unfold.png similarity index 100% rename from source/images/Tutorials/introducing_logic_nodes/03_prefs_addons_ln_unfold.png rename to source/images/editors/logic_nodes/03_prefs_addons_ln_unfold.png diff --git a/source/images/Tutorials/introducing_logic_nodes/04_editor.png b/source/images/editors/logic_nodes/04_editor.png similarity index 100% rename from source/images/Tutorials/introducing_logic_nodes/04_editor.png rename to source/images/editors/logic_nodes/04_editor.png diff --git a/source/images/Tutorials/introducing_logic_nodes/05_new_ln_tree.png b/source/images/editors/logic_nodes/05_new_ln_tree.png similarity index 100% rename from source/images/Tutorials/introducing_logic_nodes/05_new_ln_tree.png rename to source/images/editors/logic_nodes/05_new_ln_tree.png diff --git a/source/images/Tutorials/introducing_logic_nodes/06_n_panel_dashboard.png b/source/images/editors/logic_nodes/06_n_panel_dashboard.png similarity index 100% rename from source/images/Tutorials/introducing_logic_nodes/06_n_panel_dashboard.png rename to source/images/editors/logic_nodes/06_n_panel_dashboard.png diff --git a/source/images/Tutorials/introducing_logic_nodes/07_add_key_node.png b/source/images/editors/logic_nodes/07_add_key_node.png similarity index 100% rename from source/images/Tutorials/introducing_logic_nodes/07_add_key_node.png rename to source/images/editors/logic_nodes/07_add_key_node.png diff --git a/source/images/Tutorials/introducing_logic_nodes/08_search_print_node.png b/source/images/editors/logic_nodes/08_search_print_node.png similarity index 100% rename from source/images/Tutorials/introducing_logic_nodes/08_search_print_node.png rename to source/images/editors/logic_nodes/08_search_print_node.png diff --git a/source/images/Tutorials/introducing_logic_nodes/09_nodes_connected.png b/source/images/editors/logic_nodes/09_nodes_connected.png similarity index 100% rename from source/images/Tutorials/introducing_logic_nodes/09_nodes_connected.png rename to source/images/editors/logic_nodes/09_nodes_connected.png diff --git a/source/images/Tutorials/introducing_logic_nodes/10_apply_to_selected.png b/source/images/editors/logic_nodes/10_apply_to_selected.png similarity index 100% rename from source/images/Tutorials/introducing_logic_nodes/10_apply_to_selected.png rename to source/images/editors/logic_nodes/10_apply_to_selected.png diff --git a/source/images/Tutorials/introducing_logic_nodes/11_tree_applied_to.png b/source/images/editors/logic_nodes/11_tree_applied_to.png similarity index 100% rename from source/images/Tutorials/introducing_logic_nodes/11_tree_applied_to.png rename to source/images/editors/logic_nodes/11_tree_applied_to.png diff --git a/source/images/Tutorials/introducing_logic_nodes/12_rearange_n_sub_panel.png b/source/images/editors/logic_nodes/12_rearange_n_sub_panel.png similarity index 100% rename from source/images/Tutorials/introducing_logic_nodes/12_rearange_n_sub_panel.png rename to source/images/editors/logic_nodes/12_rearange_n_sub_panel.png diff --git a/source/images/Tutorials/introducing_logic_nodes/13_embedded_start.png b/source/images/editors/logic_nodes/13_embedded_start.png similarity index 100% rename from source/images/Tutorials/introducing_logic_nodes/13_embedded_start.png rename to source/images/editors/logic_nodes/13_embedded_start.png diff --git a/source/images/Tutorials/introducing_logic_nodes/14_terminal_output.png b/source/images/editors/logic_nodes/14_terminal_output.png similarity index 100% rename from source/images/Tutorials/introducing_logic_nodes/14_terminal_output.png rename to source/images/editors/logic_nodes/14_terminal_output.png diff --git a/source/images/editors/logic_nodes/15-rmb_no_selection.png b/source/images/editors/logic_nodes/15-rmb_no_selection.png new file mode 100644 index 00000000..89ff39f6 Binary files /dev/null and b/source/images/editors/logic_nodes/15-rmb_no_selection.png differ diff --git a/source/images/editors/logic_nodes/16-rmb_node_selected.png b/source/images/editors/logic_nodes/16-rmb_node_selected.png new file mode 100644 index 00000000..3fef5637 Binary files /dev/null and b/source/images/editors/logic_nodes/16-rmb_node_selected.png differ diff --git a/source/images/editors/logic_nodes/lne-socket-bool.png b/source/images/editors/logic_nodes/lne-socket-bool.png new file mode 100644 index 00000000..53ac7104 Binary files /dev/null and b/source/images/editors/logic_nodes/lne-socket-bool.png differ diff --git a/source/images/editors/logic_nodes/lne-socket-dict.png b/source/images/editors/logic_nodes/lne-socket-dict.png new file mode 100644 index 00000000..3df5b484 Binary files /dev/null and b/source/images/editors/logic_nodes/lne-socket-dict.png differ diff --git a/source/images/editors/logic_nodes/lne-socket-file.png b/source/images/editors/logic_nodes/lne-socket-file.png new file mode 100644 index 00000000..c411c457 Binary files /dev/null and b/source/images/editors/logic_nodes/lne-socket-file.png differ diff --git a/source/images/editors/logic_nodes/lne-socket-float.png b/source/images/editors/logic_nodes/lne-socket-float.png new file mode 100644 index 00000000..732964e8 Binary files /dev/null and b/source/images/editors/logic_nodes/lne-socket-float.png differ diff --git a/source/images/editors/logic_nodes/lne-socket-geometry.png b/source/images/editors/logic_nodes/lne-socket-geometry.png new file mode 100644 index 00000000..c14fc282 Binary files /dev/null and b/source/images/editors/logic_nodes/lne-socket-geometry.png differ diff --git a/source/images/editors/logic_nodes/lne-socket-integer.png b/source/images/editors/logic_nodes/lne-socket-integer.png new file mode 100644 index 00000000..29284c86 Binary files /dev/null and b/source/images/editors/logic_nodes/lne-socket-integer.png differ diff --git a/source/images/editors/logic_nodes/lne-socket-list.png b/source/images/editors/logic_nodes/lne-socket-list.png new file mode 100644 index 00000000..c858bb26 Binary files /dev/null and b/source/images/editors/logic_nodes/lne-socket-list.png differ diff --git a/source/images/editors/logic_nodes/lne-socket-material.png b/source/images/editors/logic_nodes/lne-socket-material.png new file mode 100644 index 00000000..e9b814ee Binary files /dev/null and b/source/images/editors/logic_nodes/lne-socket-material.png differ diff --git a/source/images/editors/logic_nodes/lne-socket-multi.png b/source/images/editors/logic_nodes/lne-socket-multi.png new file mode 100644 index 00000000..dc9ecb7d Binary files /dev/null and b/source/images/editors/logic_nodes/lne-socket-multi.png differ diff --git a/source/images/editors/logic_nodes/lne-socket-object.png b/source/images/editors/logic_nodes/lne-socket-object.png new file mode 100644 index 00000000..05d17ce4 Binary files /dev/null and b/source/images/editors/logic_nodes/lne-socket-object.png differ diff --git a/source/images/editors/logic_nodes/lne-socket-sound.png b/source/images/editors/logic_nodes/lne-socket-sound.png new file mode 100644 index 00000000..21d61c8e Binary files /dev/null and b/source/images/editors/logic_nodes/lne-socket-sound.png differ diff --git a/source/images/editors/logic_nodes/lne-socket-string.png b/source/images/editors/logic_nodes/lne-socket-string.png new file mode 100644 index 00000000..d6b155f6 Binary files /dev/null and b/source/images/editors/logic_nodes/lne-socket-string.png differ diff --git a/source/images/editors/logic_nodes/lne-socket-vector.png b/source/images/editors/logic_nodes/lne-socket-vector.png new file mode 100644 index 00000000..e1c1ae01 Binary files /dev/null and b/source/images/editors/logic_nodes/lne-socket-vector.png differ diff --git a/source/images/game_engine-physics-world-panel.png b/source/images/game_engine-physics-world_panel.png similarity index 100% rename from source/images/game_engine-physics-world-panel.png rename to source/images/game_engine-physics-world_panel.png diff --git a/source/images/Logic/Actuators/logic-actuators-common_options-column.png b/source/images/logic_bricks/actuators/logic-actuators-common_options-column.png similarity index 100% rename from source/images/Logic/Actuators/logic-actuators-common_options-column.png rename to source/images/logic_bricks/actuators/logic-actuators-common_options-column.png diff --git a/source/images/Logic/Actuators/logic-actuators-editing-column.png b/source/images/logic_bricks/actuators/logic-actuators-editing-column.png similarity index 100% rename from source/images/Logic/Actuators/logic-actuators-editing-column.png rename to source/images/logic_bricks/actuators/logic-actuators-editing-column.png diff --git a/source/images/Logic/Actuators/logic-actuators-editing-column1.png b/source/images/logic_bricks/actuators/logic-actuators-editing-column1.png similarity index 100% rename from source/images/Logic/Actuators/logic-actuators-editing-column1.png rename to source/images/logic_bricks/actuators/logic-actuators-editing-column1.png diff --git a/source/images/Logic/Actuators/logic-actuators-editing-column2.png b/source/images/logic_bricks/actuators/logic-actuators-editing-column2.png similarity index 100% rename from source/images/Logic/Actuators/logic-actuators-editing-column2.png rename to source/images/logic_bricks/actuators/logic-actuators-editing-column2.png diff --git a/source/images/Logic/Actuators/logic-actuators-types-action-action.png b/source/images/logic_bricks/actuators/logic-actuators-types-action-action.png similarity index 100% rename from source/images/Logic/Actuators/logic-actuators-types-action-action.png rename to source/images/logic_bricks/actuators/logic-actuators-types-action-action.png diff --git a/source/images/Logic/Actuators/logic-actuators-types-armature-armature.png b/source/images/logic_bricks/actuators/logic-actuators-types-armature-armature.png similarity index 100% rename from source/images/Logic/Actuators/logic-actuators-types-armature-armature.png rename to source/images/logic_bricks/actuators/logic-actuators-types-armature-armature.png diff --git a/source/images/Logic/Actuators/logic-actuators-types-camera-camera.png b/source/images/logic_bricks/actuators/logic-actuators-types-camera-camera.png similarity index 100% rename from source/images/Logic/Actuators/logic-actuators-types-camera-camera.png rename to source/images/logic_bricks/actuators/logic-actuators-types-camera-camera.png diff --git a/source/images/Logic/Actuators/logic-actuators-types-collection-add_overlay_collection.png b/source/images/logic_bricks/actuators/logic-actuators-types-collection-add_overlay_collection.png similarity index 100% rename from source/images/Logic/Actuators/logic-actuators-types-collection-add_overlay_collection.png rename to source/images/logic_bricks/actuators/logic-actuators-types-collection-add_overlay_collection.png diff --git a/source/images/Logic/Actuators/logic-actuators-types-collection-collection.png b/source/images/logic_bricks/actuators/logic-actuators-types-collection-collection.png similarity index 100% rename from source/images/Logic/Actuators/logic-actuators-types-collection-collection.png rename to source/images/logic_bricks/actuators/logic-actuators-types-collection-collection.png diff --git a/source/images/Logic/Actuators/logic-actuators-types-collection-remove_overlay_collection.png b/source/images/logic_bricks/actuators/logic-actuators-types-collection-remove_overlay_collection.png similarity index 100% rename from source/images/Logic/Actuators/logic-actuators-types-collection-remove_overlay_collection.png rename to source/images/logic_bricks/actuators/logic-actuators-types-collection-remove_overlay_collection.png diff --git a/source/images/Logic/Actuators/logic-actuators-types-collection-resume_collection.png b/source/images/logic_bricks/actuators/logic-actuators-types-collection-resume_collection.png similarity index 100% rename from source/images/Logic/Actuators/logic-actuators-types-collection-resume_collection.png rename to source/images/logic_bricks/actuators/logic-actuators-types-collection-resume_collection.png diff --git a/source/images/Logic/Actuators/logic-actuators-types-collection-suspend_collection.png b/source/images/logic_bricks/actuators/logic-actuators-types-collection-suspend_collection.png similarity index 100% rename from source/images/Logic/Actuators/logic-actuators-types-collection-suspend_collection.png rename to source/images/logic_bricks/actuators/logic-actuators-types-collection-suspend_collection.png diff --git a/source/images/Logic/Actuators/logic-actuators-types-constraint-constraint.png b/source/images/logic_bricks/actuators/logic-actuators-types-constraint-constraint.png similarity index 100% rename from source/images/Logic/Actuators/logic-actuators-types-constraint-constraint.png rename to source/images/logic_bricks/actuators/logic-actuators-types-constraint-constraint.png diff --git a/source/images/Logic/Actuators/logic-actuators-types-constraint-distance.png b/source/images/logic_bricks/actuators/logic-actuators-types-constraint-distance.png similarity index 100% rename from source/images/Logic/Actuators/logic-actuators-types-constraint-distance.png rename to source/images/logic_bricks/actuators/logic-actuators-types-constraint-distance.png diff --git a/source/images/Logic/Actuators/logic-actuators-types-constraint-forcefield.png b/source/images/logic_bricks/actuators/logic-actuators-types-constraint-forcefield.png similarity index 100% rename from source/images/Logic/Actuators/logic-actuators-types-constraint-forcefield.png rename to source/images/logic_bricks/actuators/logic-actuators-types-constraint-forcefield.png diff --git a/source/images/Logic/Actuators/logic-actuators-types-constraint-location.png b/source/images/logic_bricks/actuators/logic-actuators-types-constraint-location.png similarity index 100% rename from source/images/Logic/Actuators/logic-actuators-types-constraint-location.png rename to source/images/logic_bricks/actuators/logic-actuators-types-constraint-location.png diff --git a/source/images/Logic/Actuators/logic-actuators-types-constraint-orientation.png b/source/images/logic_bricks/actuators/logic-actuators-types-constraint-orientation.png similarity index 100% rename from source/images/Logic/Actuators/logic-actuators-types-constraint-orientation.png rename to source/images/logic_bricks/actuators/logic-actuators-types-constraint-orientation.png diff --git a/source/images/Logic/Actuators/logic-actuators-types-edit_object-add_object.png b/source/images/logic_bricks/actuators/logic-actuators-types-edit_object-add_object.png similarity index 100% rename from source/images/Logic/Actuators/logic-actuators-types-edit_object-add_object.png rename to source/images/logic_bricks/actuators/logic-actuators-types-edit_object-add_object.png diff --git a/source/images/Logic/Actuators/logic-actuators-types-edit_object-dynamics.png b/source/images/logic_bricks/actuators/logic-actuators-types-edit_object-dynamics.png similarity index 100% rename from source/images/Logic/Actuators/logic-actuators-types-edit_object-dynamics.png rename to source/images/logic_bricks/actuators/logic-actuators-types-edit_object-dynamics.png diff --git a/source/images/Logic/Actuators/logic-actuators-types-edit_object-edit_object.png b/source/images/logic_bricks/actuators/logic-actuators-types-edit_object-edit_object.png similarity index 100% rename from source/images/Logic/Actuators/logic-actuators-types-edit_object-edit_object.png rename to source/images/logic_bricks/actuators/logic-actuators-types-edit_object-edit_object.png diff --git a/source/images/Logic/Actuators/logic-actuators-types-edit_object-end_object.png b/source/images/logic_bricks/actuators/logic-actuators-types-edit_object-end_object.png similarity index 100% rename from source/images/Logic/Actuators/logic-actuators-types-edit_object-end_object.png rename to source/images/logic_bricks/actuators/logic-actuators-types-edit_object-end_object.png diff --git a/source/images/Logic/Actuators/logic-actuators-types-edit_object-replace_mesh.png b/source/images/logic_bricks/actuators/logic-actuators-types-edit_object-replace_mesh.png similarity index 100% rename from source/images/Logic/Actuators/logic-actuators-types-edit_object-replace_mesh.png rename to source/images/logic_bricks/actuators/logic-actuators-types-edit_object-replace_mesh.png diff --git a/source/images/Logic/Actuators/logic-actuators-types-edit_object-track_to.png b/source/images/logic_bricks/actuators/logic-actuators-types-edit_object-track_to.png similarity index 100% rename from source/images/Logic/Actuators/logic-actuators-types-edit_object-track_to.png rename to source/images/logic_bricks/actuators/logic-actuators-types-edit_object-track_to.png diff --git a/source/images/Logic/Actuators/logic-actuators-types-filter_2d-built_in_filters.png b/source/images/logic_bricks/actuators/logic-actuators-types-filter_2d-built_in_filters.png similarity index 100% rename from source/images/Logic/Actuators/logic-actuators-types-filter_2d-built_in_filters.png rename to source/images/logic_bricks/actuators/logic-actuators-types-filter_2d-built_in_filters.png diff --git a/source/images/Logic/Actuators/logic-actuators-types-filter_2d-custom_filter.png b/source/images/logic_bricks/actuators/logic-actuators-types-filter_2d-custom_filter.png similarity index 100% rename from source/images/Logic/Actuators/logic-actuators-types-filter_2d-custom_filter.png rename to source/images/logic_bricks/actuators/logic-actuators-types-filter_2d-custom_filter.png diff --git a/source/images/Logic/Actuators/logic-actuators-types-filter_2d-custom_filter1.png b/source/images/logic_bricks/actuators/logic-actuators-types-filter_2d-custom_filter1.png similarity index 100% rename from source/images/Logic/Actuators/logic-actuators-types-filter_2d-custom_filter1.png rename to source/images/logic_bricks/actuators/logic-actuators-types-filter_2d-custom_filter1.png diff --git a/source/images/Logic/Actuators/logic-actuators-types-filter_2d-filter_2d.png b/source/images/logic_bricks/actuators/logic-actuators-types-filter_2d-filter_2d.png similarity index 100% rename from source/images/Logic/Actuators/logic-actuators-types-filter_2d-filter_2d.png rename to source/images/logic_bricks/actuators/logic-actuators-types-filter_2d-filter_2d.png diff --git a/source/images/Logic/Actuators/logic-actuators-types-filter_2d-motionblur_render_full.jpg b/source/images/logic_bricks/actuators/logic-actuators-types-filter_2d-motionblur_render_full.jpg similarity index 100% rename from source/images/Logic/Actuators/logic-actuators-types-filter_2d-motionblur_render_full.jpg rename to source/images/logic_bricks/actuators/logic-actuators-types-filter_2d-motionblur_render_full.jpg diff --git a/source/images/Logic/Actuators/logic-actuators-types-filter_2d-sepia_render_full.jpg b/source/images/logic_bricks/actuators/logic-actuators-types-filter_2d-sepia_render_full.jpg similarity index 100% rename from source/images/Logic/Actuators/logic-actuators-types-filter_2d-sepia_render_full.jpg rename to source/images/logic_bricks/actuators/logic-actuators-types-filter_2d-sepia_render_full.jpg diff --git a/source/images/Logic/Actuators/logic-actuators-types-filter_2d-sobel_render_full.jpg b/source/images/logic_bricks/actuators/logic-actuators-types-filter_2d-sobel_render_full.jpg similarity index 100% rename from source/images/Logic/Actuators/logic-actuators-types-filter_2d-sobel_render_full.jpg rename to source/images/logic_bricks/actuators/logic-actuators-types-filter_2d-sobel_render_full.jpg diff --git a/source/images/Logic/Actuators/logic-actuators-types-game-game.png b/source/images/logic_bricks/actuators/logic-actuators-types-game-game.png similarity index 100% rename from source/images/Logic/Actuators/logic-actuators-types-game-game.png rename to source/images/logic_bricks/actuators/logic-actuators-types-game-game.png diff --git a/source/images/Logic/Actuators/logic-actuators-types-message-message.png b/source/images/logic_bricks/actuators/logic-actuators-types-message-message.png similarity index 100% rename from source/images/Logic/Actuators/logic-actuators-types-message-message.png rename to source/images/logic_bricks/actuators/logic-actuators-types-message-message.png diff --git a/source/images/Logic/Actuators/logic-actuators-types-motion-character.png b/source/images/logic_bricks/actuators/logic-actuators-types-motion-character.png similarity index 100% rename from source/images/Logic/Actuators/logic-actuators-types-motion-character.png rename to source/images/logic_bricks/actuators/logic-actuators-types-motion-character.png diff --git a/source/images/Logic/Actuators/logic-actuators-types-motion-motion.png b/source/images/logic_bricks/actuators/logic-actuators-types-motion-motion.png similarity index 100% rename from source/images/Logic/Actuators/logic-actuators-types-motion-motion.png rename to source/images/logic_bricks/actuators/logic-actuators-types-motion-motion.png diff --git a/source/images/Logic/Actuators/logic-actuators-types-motion-servo.png b/source/images/logic_bricks/actuators/logic-actuators-types-motion-servo.png similarity index 100% rename from source/images/Logic/Actuators/logic-actuators-types-motion-servo.png rename to source/images/logic_bricks/actuators/logic-actuators-types-motion-servo.png diff --git a/source/images/Logic/Actuators/logic-actuators-types-motion-simple.png b/source/images/logic_bricks/actuators/logic-actuators-types-motion-simple.png similarity index 100% rename from source/images/Logic/Actuators/logic-actuators-types-motion-simple.png rename to source/images/logic_bricks/actuators/logic-actuators-types-motion-simple.png diff --git a/source/images/Logic/Actuators/logic-actuators-types-motion-simple1.png b/source/images/logic_bricks/actuators/logic-actuators-types-motion-simple1.png similarity index 100% rename from source/images/Logic/Actuators/logic-actuators-types-motion-simple1.png rename to source/images/logic_bricks/actuators/logic-actuators-types-motion-simple1.png diff --git a/source/images/Logic/Actuators/logic-actuators-types-mouse-look.png b/source/images/logic_bricks/actuators/logic-actuators-types-mouse-look.png similarity index 100% rename from source/images/Logic/Actuators/logic-actuators-types-mouse-look.png rename to source/images/logic_bricks/actuators/logic-actuators-types-mouse-look.png diff --git a/source/images/Logic/Actuators/logic-actuators-types-mouse-mouse.png b/source/images/logic_bricks/actuators/logic-actuators-types-mouse-mouse.png similarity index 100% rename from source/images/Logic/Actuators/logic-actuators-types-mouse-mouse.png rename to source/images/logic_bricks/actuators/logic-actuators-types-mouse-mouse.png diff --git a/source/images/Logic/Actuators/logic-actuators-types-mouse-visibility.png b/source/images/logic_bricks/actuators/logic-actuators-types-mouse-visibility.png similarity index 100% rename from source/images/Logic/Actuators/logic-actuators-types-mouse-visibility.png rename to source/images/logic_bricks/actuators/logic-actuators-types-mouse-visibility.png diff --git a/source/images/Logic/Actuators/logic-actuators-types-parent-parent.png b/source/images/logic_bricks/actuators/logic-actuators-types-parent-parent.png similarity index 100% rename from source/images/Logic/Actuators/logic-actuators-types-parent-parent.png rename to source/images/logic_bricks/actuators/logic-actuators-types-parent-parent.png diff --git a/source/images/Logic/Actuators/logic-actuators-types-parent-remove.png b/source/images/logic_bricks/actuators/logic-actuators-types-parent-remove.png similarity index 100% rename from source/images/Logic/Actuators/logic-actuators-types-parent-remove.png rename to source/images/logic_bricks/actuators/logic-actuators-types-parent-remove.png diff --git a/source/images/Logic/Actuators/logic-actuators-types-parent-set.png b/source/images/logic_bricks/actuators/logic-actuators-types-parent-set.png similarity index 100% rename from source/images/Logic/Actuators/logic-actuators-types-parent-set.png rename to source/images/logic_bricks/actuators/logic-actuators-types-parent-set.png diff --git a/source/images/Logic/Actuators/logic-actuators-types-property-example.png b/source/images/logic_bricks/actuators/logic-actuators-types-property-example.png similarity index 100% rename from source/images/Logic/Actuators/logic-actuators-types-property-example.png rename to source/images/logic_bricks/actuators/logic-actuators-types-property-example.png diff --git a/source/images/Logic/Actuators/logic-actuators-types-property-example1.png b/source/images/logic_bricks/actuators/logic-actuators-types-property-example1.png similarity index 100% rename from source/images/Logic/Actuators/logic-actuators-types-property-example1.png rename to source/images/logic_bricks/actuators/logic-actuators-types-property-example1.png diff --git a/source/images/Logic/Actuators/logic-actuators-types-property-property.png b/source/images/logic_bricks/actuators/logic-actuators-types-property-property.png similarity index 100% rename from source/images/Logic/Actuators/logic-actuators-types-property-property.png rename to source/images/logic_bricks/actuators/logic-actuators-types-property-property.png diff --git a/source/images/Logic/Actuators/logic-actuators-types-random-bool_bernoulli.png b/source/images/logic_bricks/actuators/logic-actuators-types-random-bool_bernoulli.png similarity index 100% rename from source/images/Logic/Actuators/logic-actuators-types-random-bool_bernoulli.png rename to source/images/logic_bricks/actuators/logic-actuators-types-random-bool_bernoulli.png diff --git a/source/images/Logic/Actuators/logic-actuators-types-random-bool_constant.png b/source/images/logic_bricks/actuators/logic-actuators-types-random-bool_constant.png similarity index 100% rename from source/images/Logic/Actuators/logic-actuators-types-random-bool_constant.png rename to source/images/logic_bricks/actuators/logic-actuators-types-random-bool_constant.png diff --git a/source/images/Logic/Actuators/logic-actuators-types-random-bool_uniform.png b/source/images/logic_bricks/actuators/logic-actuators-types-random-bool_uniform.png similarity index 100% rename from source/images/Logic/Actuators/logic-actuators-types-random-bool_uniform.png rename to source/images/logic_bricks/actuators/logic-actuators-types-random-bool_uniform.png diff --git a/source/images/Logic/Actuators/logic-actuators-types-random-float_constant.png b/source/images/logic_bricks/actuators/logic-actuators-types-random-float_constant.png similarity index 100% rename from source/images/Logic/Actuators/logic-actuators-types-random-float_constant.png rename to source/images/logic_bricks/actuators/logic-actuators-types-random-float_constant.png diff --git a/source/images/Logic/Actuators/logic-actuators-types-random-float_neg_exp.png b/source/images/logic_bricks/actuators/logic-actuators-types-random-float_neg_exp.png similarity index 100% rename from source/images/Logic/Actuators/logic-actuators-types-random-float_neg_exp.png rename to source/images/logic_bricks/actuators/logic-actuators-types-random-float_neg_exp.png diff --git a/source/images/Logic/Actuators/logic-actuators-types-random-float_normal.png b/source/images/logic_bricks/actuators/logic-actuators-types-random-float_normal.png similarity index 100% rename from source/images/Logic/Actuators/logic-actuators-types-random-float_normal.png rename to source/images/logic_bricks/actuators/logic-actuators-types-random-float_normal.png diff --git a/source/images/Logic/Actuators/logic-actuators-types-random-float_uniform.png b/source/images/logic_bricks/actuators/logic-actuators-types-random-float_uniform.png similarity index 100% rename from source/images/Logic/Actuators/logic-actuators-types-random-float_uniform.png rename to source/images/logic_bricks/actuators/logic-actuators-types-random-float_uniform.png diff --git a/source/images/Logic/Actuators/logic-actuators-types-random-int_constant.png b/source/images/logic_bricks/actuators/logic-actuators-types-random-int_constant.png similarity index 100% rename from source/images/Logic/Actuators/logic-actuators-types-random-int_constant.png rename to source/images/logic_bricks/actuators/logic-actuators-types-random-int_constant.png diff --git a/source/images/Logic/Actuators/logic-actuators-types-random-int_poisson.png b/source/images/logic_bricks/actuators/logic-actuators-types-random-int_poisson.png similarity index 100% rename from source/images/Logic/Actuators/logic-actuators-types-random-int_poisson.png rename to source/images/logic_bricks/actuators/logic-actuators-types-random-int_poisson.png diff --git a/source/images/Logic/Actuators/logic-actuators-types-random-int_uniform.png b/source/images/logic_bricks/actuators/logic-actuators-types-random-int_uniform.png similarity index 100% rename from source/images/Logic/Actuators/logic-actuators-types-random-int_uniform.png rename to source/images/logic_bricks/actuators/logic-actuators-types-random-int_uniform.png diff --git a/source/images/Logic/Actuators/logic-actuators-types-random-random.png b/source/images/logic_bricks/actuators/logic-actuators-types-random-random.png similarity index 100% rename from source/images/Logic/Actuators/logic-actuators-types-random-random.png rename to source/images/logic_bricks/actuators/logic-actuators-types-random-random.png diff --git a/source/images/Logic/Actuators/logic-actuators-types-scene-scene.png b/source/images/logic_bricks/actuators/logic-actuators-types-scene-scene.png similarity index 100% rename from source/images/Logic/Actuators/logic-actuators-types-scene-scene.png rename to source/images/logic_bricks/actuators/logic-actuators-types-scene-scene.png diff --git a/source/images/Logic/Actuators/logic-actuators-types-sound-cone.jpg b/source/images/logic_bricks/actuators/logic-actuators-types-sound-cone.jpg similarity index 100% rename from source/images/Logic/Actuators/logic-actuators-types-sound-cone.jpg rename to source/images/logic_bricks/actuators/logic-actuators-types-sound-cone.jpg diff --git a/source/images/Logic/Actuators/logic-actuators-types-sound-sound.png b/source/images/logic_bricks/actuators/logic-actuators-types-sound-sound.png similarity index 100% rename from source/images/Logic/Actuators/logic-actuators-types-sound-sound.png rename to source/images/logic_bricks/actuators/logic-actuators-types-sound-sound.png diff --git a/source/images/Logic/Actuators/logic-actuators-types-sound-sound1.png b/source/images/logic_bricks/actuators/logic-actuators-types-sound-sound1.png similarity index 100% rename from source/images/Logic/Actuators/logic-actuators-types-sound-sound1.png rename to source/images/logic_bricks/actuators/logic-actuators-types-sound-sound1.png diff --git a/source/images/Logic/Actuators/logic-actuators-types-state-state.png b/source/images/logic_bricks/actuators/logic-actuators-types-state-state.png similarity index 100% rename from source/images/Logic/Actuators/logic-actuators-types-state-state.png rename to source/images/logic_bricks/actuators/logic-actuators-types-state-state.png diff --git a/source/images/Logic/Actuators/logic-actuators-types-steering-steering.png b/source/images/logic_bricks/actuators/logic-actuators-types-steering-steering.png similarity index 100% rename from source/images/Logic/Actuators/logic-actuators-types-steering-steering.png rename to source/images/logic_bricks/actuators/logic-actuators-types-steering-steering.png diff --git a/source/images/Logic/Actuators/logic-actuators-types-vibration-vibration.png b/source/images/logic_bricks/actuators/logic-actuators-types-vibration-vibration.png similarity index 100% rename from source/images/Logic/Actuators/logic-actuators-types-vibration-vibration.png rename to source/images/logic_bricks/actuators/logic-actuators-types-vibration-vibration.png diff --git a/source/images/Logic/Actuators/logic-actuators-types-visibility-visibility.png b/source/images/logic_bricks/actuators/logic-actuators-types-visibility-visibility.png similarity index 100% rename from source/images/Logic/Actuators/logic-actuators-types-visibility-visibility.png rename to source/images/logic_bricks/actuators/logic-actuators-types-visibility-visibility.png diff --git a/source/images/Logic/Controllers/logic-controllers-editing-column.png b/source/images/logic_bricks/controllers/logic-controllers-editing-column.png similarity index 100% rename from source/images/Logic/Controllers/logic-controllers-editing-column.png rename to source/images/logic_bricks/controllers/logic-controllers-editing-column.png diff --git a/source/images/Logic/Controllers/logic-controllers-editing-column1.png b/source/images/logic_bricks/controllers/logic-controllers-editing-column1.png similarity index 100% rename from source/images/Logic/Controllers/logic-controllers-editing-column1.png rename to source/images/logic_bricks/controllers/logic-controllers-editing-column1.png diff --git a/source/images/Logic/Controllers/logic-controllers-editing-column2.png b/source/images/logic_bricks/controllers/logic-controllers-editing-column2.png similarity index 100% rename from source/images/Logic/Controllers/logic-controllers-editing-column2.png rename to source/images/logic_bricks/controllers/logic-controllers-editing-column2.png diff --git a/source/images/Logic/Controllers/logic-controllers-editing-column3.png b/source/images/logic_bricks/controllers/logic-controllers-editing-column3.png similarity index 100% rename from source/images/Logic/Controllers/logic-controllers-editing-column3.png rename to source/images/logic_bricks/controllers/logic-controllers-editing-column3.png diff --git a/source/images/Logic/Controllers/logic-controllers-editing-column4.png b/source/images/logic_bricks/controllers/logic-controllers-editing-column4.png similarity index 100% rename from source/images/Logic/Controllers/logic-controllers-editing-column4.png rename to source/images/logic_bricks/controllers/logic-controllers-editing-column4.png diff --git a/source/images/Logic/Controllers/logic-controllers-types-and-and.png b/source/images/logic_bricks/controllers/logic-controllers-types-and-and.png similarity index 100% rename from source/images/Logic/Controllers/logic-controllers-types-and-and.png rename to source/images/logic_bricks/controllers/logic-controllers-types-and-and.png diff --git a/source/images/Logic/Controllers/logic-controllers-types-expression-expression.png b/source/images/logic_bricks/controllers/logic-controllers-types-expression-expression.png similarity index 100% rename from source/images/Logic/Controllers/logic-controllers-types-expression-expression.png rename to source/images/logic_bricks/controllers/logic-controllers-types-expression-expression.png diff --git a/source/images/Logic/Controllers/logic-controllers-types-expression-part.png b/source/images/logic_bricks/controllers/logic-controllers-types-expression-part.png similarity index 100% rename from source/images/Logic/Controllers/logic-controllers-types-expression-part.png rename to source/images/logic_bricks/controllers/logic-controllers-types-expression-part.png diff --git a/source/images/Logic/Controllers/logic-controllers-types-nand-nand.png b/source/images/logic_bricks/controllers/logic-controllers-types-nand-nand.png similarity index 100% rename from source/images/Logic/Controllers/logic-controllers-types-nand-nand.png rename to source/images/logic_bricks/controllers/logic-controllers-types-nand-nand.png diff --git a/source/images/Logic/Controllers/logic-controllers-types-nor-nor.png b/source/images/logic_bricks/controllers/logic-controllers-types-nor-nor.png similarity index 100% rename from source/images/Logic/Controllers/logic-controllers-types-nor-nor.png rename to source/images/logic_bricks/controllers/logic-controllers-types-nor-nor.png diff --git a/source/images/Logic/Controllers/logic-controllers-types-or-or.png b/source/images/logic_bricks/controllers/logic-controllers-types-or-or.png similarity index 100% rename from source/images/Logic/Controllers/logic-controllers-types-or-or.png rename to source/images/logic_bricks/controllers/logic-controllers-types-or-or.png diff --git a/source/images/Logic/Controllers/logic-controllers-types-python-python.png b/source/images/logic_bricks/controllers/logic-controllers-types-python-python.png similarity index 100% rename from source/images/Logic/Controllers/logic-controllers-types-python-python.png rename to source/images/logic_bricks/controllers/logic-controllers-types-python-python.png diff --git a/source/images/Logic/Controllers/logic-controllers-types-xnor-xnor.png b/source/images/logic_bricks/controllers/logic-controllers-types-xnor-xnor.png similarity index 100% rename from source/images/Logic/Controllers/logic-controllers-types-xnor-xnor.png rename to source/images/logic_bricks/controllers/logic-controllers-types-xnor-xnor.png diff --git a/source/images/Logic/Controllers/logic-controllers-types-xor-xor.png b/source/images/logic_bricks/controllers/logic-controllers-types-xor-xor.png similarity index 100% rename from source/images/Logic/Controllers/logic-controllers-types-xor-xor.png rename to source/images/logic_bricks/controllers/logic-controllers-types-xor-xor.png diff --git a/source/images/Logic/logic-common-options-icons-down.png b/source/images/logic_bricks/logic-common-options-icons-down.png similarity index 100% rename from source/images/Logic/logic-common-options-icons-down.png rename to source/images/logic_bricks/logic-common-options-icons-down.png diff --git a/source/images/Logic/logic-common-options-icons-false.png b/source/images/logic_bricks/logic-common-options-icons-false.png similarity index 100% rename from source/images/Logic/logic-common-options-icons-false.png rename to source/images/logic_bricks/logic-common-options-icons-false.png diff --git a/source/images/Logic/logic-common-options-icons-info.png b/source/images/logic_bricks/logic-common-options-icons-info.png similarity index 100% rename from source/images/Logic/logic-common-options-icons-info.png rename to source/images/logic_bricks/logic-common-options-icons-info.png diff --git a/source/images/Logic/logic-common-options-icons-movement.png b/source/images/logic_bricks/logic-common-options-icons-movement.png similarity index 100% rename from source/images/Logic/logic-common-options-icons-movement.png rename to source/images/logic_bricks/logic-common-options-icons-movement.png diff --git a/source/images/Logic/logic-common-options-icons-pin.png b/source/images/logic_bricks/logic-common-options-icons-pin.png similarity index 100% rename from source/images/Logic/logic-common-options-icons-pin.png rename to source/images/logic_bricks/logic-common-options-icons-pin.png diff --git a/source/images/Logic/logic-common-options-icons-preference.png b/source/images/logic_bricks/logic-common-options-icons-preference.png similarity index 100% rename from source/images/Logic/logic-common-options-icons-preference.png rename to source/images/logic_bricks/logic-common-options-icons-preference.png diff --git a/source/images/Logic/logic-common-options-icons-true.png b/source/images/logic_bricks/logic-common-options-icons-true.png similarity index 100% rename from source/images/Logic/logic-common-options-icons-true.png rename to source/images/logic_bricks/logic-common-options-icons-true.png diff --git a/source/images/Logic/logic-logic-bricks-editor.png b/source/images/logic_bricks/logic-logic-bricks-editor.png similarity index 100% rename from source/images/Logic/logic-logic-bricks-editor.png rename to source/images/logic_bricks/logic-logic-bricks-editor.png diff --git a/source/images/Logic/logic-logic_properties-panel.png b/source/images/logic_bricks/logic-logic_properties-panel.png similarity index 100% rename from source/images/Logic/logic-logic_properties-panel.png rename to source/images/logic_bricks/logic-logic_properties-panel.png diff --git a/source/images/Logic/logic-states-panel.png b/source/images/logic_bricks/logic-states-panel.png similarity index 100% rename from source/images/Logic/logic-states-panel.png rename to source/images/logic_bricks/logic-states-panel.png diff --git a/source/images/Logic/logic-states-panel1.png b/source/images/logic_bricks/logic-states-panel1.png similarity index 100% rename from source/images/Logic/logic-states-panel1.png rename to source/images/logic_bricks/logic-states-panel1.png diff --git a/source/images/Logic/logic-states-panel2.png b/source/images/logic_bricks/logic-states-panel2.png similarity index 100% rename from source/images/Logic/logic-states-panel2.png rename to source/images/logic_bricks/logic-states-panel2.png diff --git a/source/images/Logic/Sensors/logic-sensors-common-options.png b/source/images/logic_bricks/sensors/logic-sensors-common-options.png similarity index 100% rename from source/images/Logic/Sensors/logic-sensors-common-options.png rename to source/images/logic_bricks/sensors/logic-sensors-common-options.png diff --git a/source/images/Logic/Sensors/logic-sensors-editing-column.png b/source/images/logic_bricks/sensors/logic-sensors-editing-column.png similarity index 100% rename from source/images/Logic/Sensors/logic-sensors-editing-column.png rename to source/images/logic_bricks/sensors/logic-sensors-editing-column.png diff --git a/source/images/Logic/Sensors/logic-sensors-editing-column1.png b/source/images/logic_bricks/sensors/logic-sensors-editing-column1.png similarity index 100% rename from source/images/Logic/Sensors/logic-sensors-editing-column1.png rename to source/images/logic_bricks/sensors/logic-sensors-editing-column1.png diff --git a/source/images/Logic/Sensors/logic-sensors-editing-column2.png b/source/images/logic_bricks/sensors/logic-sensors-editing-column2.png similarity index 100% rename from source/images/Logic/Sensors/logic-sensors-editing-column2.png rename to source/images/logic_bricks/sensors/logic-sensors-editing-column2.png diff --git a/source/images/Logic/Sensors/logic-sensors-types-actuator-actuator.png b/source/images/logic_bricks/sensors/logic-sensors-types-actuator-actuator.png similarity index 100% rename from source/images/Logic/Sensors/logic-sensors-types-actuator-actuator.png rename to source/images/logic_bricks/sensors/logic-sensors-types-actuator-actuator.png diff --git a/source/images/Logic/Sensors/logic-sensors-types-always-always.png b/source/images/logic_bricks/sensors/logic-sensors-types-always-always.png similarity index 100% rename from source/images/Logic/Sensors/logic-sensors-types-always-always.png rename to source/images/logic_bricks/sensors/logic-sensors-types-always-always.png diff --git a/source/images/Logic/Sensors/logic-sensors-types-armature-armature.png b/source/images/logic_bricks/sensors/logic-sensors-types-armature-armature.png similarity index 100% rename from source/images/Logic/Sensors/logic-sensors-types-armature-armature.png rename to source/images/logic_bricks/sensors/logic-sensors-types-armature-armature.png diff --git a/source/images/Logic/Sensors/logic-sensors-types-collision-collision.png b/source/images/logic_bricks/sensors/logic-sensors-types-collision-collision.png similarity index 100% rename from source/images/Logic/Sensors/logic-sensors-types-collision-collision.png rename to source/images/logic_bricks/sensors/logic-sensors-types-collision-collision.png diff --git a/source/images/Logic/Sensors/logic-sensors-types-delay-delay.png b/source/images/logic_bricks/sensors/logic-sensors-types-delay-delay.png similarity index 100% rename from source/images/Logic/Sensors/logic-sensors-types-delay-delay.png rename to source/images/logic_bricks/sensors/logic-sensors-types-delay-delay.png diff --git a/source/images/Logic/Sensors/logic-sensors-types-joystick-button.png b/source/images/logic_bricks/sensors/logic-sensors-types-joystick-button.png similarity index 100% rename from source/images/Logic/Sensors/logic-sensors-types-joystick-button.png rename to source/images/logic_bricks/sensors/logic-sensors-types-joystick-button.png diff --git a/source/images/Logic/Sensors/logic-sensors-types-joystick-shoulder-triggers.png b/source/images/logic_bricks/sensors/logic-sensors-types-joystick-shoulder-triggers.png similarity index 100% rename from source/images/Logic/Sensors/logic-sensors-types-joystick-shoulder-triggers.png rename to source/images/logic_bricks/sensors/logic-sensors-types-joystick-shoulder-triggers.png diff --git a/source/images/Logic/Sensors/logic-sensors-types-joystick-stick-axis.png b/source/images/logic_bricks/sensors/logic-sensors-types-joystick-stick-axis.png similarity index 100% rename from source/images/Logic/Sensors/logic-sensors-types-joystick-stick-axis.png rename to source/images/logic_bricks/sensors/logic-sensors-types-joystick-stick-axis.png diff --git a/source/images/Logic/Sensors/logic-sensors-types-joystick-stick-directions.png b/source/images/logic_bricks/sensors/logic-sensors-types-joystick-stick-directions.png similarity index 100% rename from source/images/Logic/Sensors/logic-sensors-types-joystick-stick-directions.png rename to source/images/logic_bricks/sensors/logic-sensors-types-joystick-stick-directions.png diff --git a/source/images/Logic/Sensors/logic-sensors-types-keyboard-keyboard.png b/source/images/logic_bricks/sensors/logic-sensors-types-keyboard-keyboard.png similarity index 100% rename from source/images/Logic/Sensors/logic-sensors-types-keyboard-keyboard.png rename to source/images/logic_bricks/sensors/logic-sensors-types-keyboard-keyboard.png diff --git a/source/images/Logic/Sensors/logic-sensors-types-message-message.png b/source/images/logic_bricks/sensors/logic-sensors-types-message-message.png similarity index 100% rename from source/images/Logic/Sensors/logic-sensors-types-message-message.png rename to source/images/logic_bricks/sensors/logic-sensors-types-message-message.png diff --git a/source/images/Logic/Sensors/logic-sensors-types-mouse-mouse.png b/source/images/logic_bricks/sensors/logic-sensors-types-mouse-mouse.png similarity index 100% rename from source/images/Logic/Sensors/logic-sensors-types-mouse-mouse.png rename to source/images/logic_bricks/sensors/logic-sensors-types-mouse-mouse.png diff --git a/source/images/Logic/Sensors/logic-sensors-types-movement-movement.png b/source/images/logic_bricks/sensors/logic-sensors-types-movement-movement.png similarity index 100% rename from source/images/Logic/Sensors/logic-sensors-types-movement-movement.png rename to source/images/logic_bricks/sensors/logic-sensors-types-movement-movement.png diff --git a/source/images/Logic/Sensors/logic-sensors-types-near-near.png b/source/images/logic_bricks/sensors/logic-sensors-types-near-near.png similarity index 100% rename from source/images/Logic/Sensors/logic-sensors-types-near-near.png rename to source/images/logic_bricks/sensors/logic-sensors-types-near-near.png diff --git a/source/images/Logic/Sensors/logic-sensors-types-property-note.png b/source/images/logic_bricks/sensors/logic-sensors-types-property-note.png similarity index 100% rename from source/images/Logic/Sensors/logic-sensors-types-property-note.png rename to source/images/logic_bricks/sensors/logic-sensors-types-property-note.png diff --git a/source/images/Logic/Sensors/logic-sensors-types-property-property.png b/source/images/logic_bricks/sensors/logic-sensors-types-property-property.png similarity index 100% rename from source/images/Logic/Sensors/logic-sensors-types-property-property.png rename to source/images/logic_bricks/sensors/logic-sensors-types-property-property.png diff --git a/source/images/Logic/Sensors/logic-sensors-types-radar-cone-angle.png b/source/images/logic_bricks/sensors/logic-sensors-types-radar-cone-angle.png similarity index 100% rename from source/images/Logic/Sensors/logic-sensors-types-radar-cone-angle.png rename to source/images/logic_bricks/sensors/logic-sensors-types-radar-cone-angle.png diff --git a/source/images/Logic/Sensors/logic-sensors-types-radar-radar.png b/source/images/logic_bricks/sensors/logic-sensors-types-radar-radar.png similarity index 100% rename from source/images/Logic/Sensors/logic-sensors-types-radar-radar.png rename to source/images/logic_bricks/sensors/logic-sensors-types-radar-radar.png diff --git a/source/images/Logic/Sensors/logic-sensors-types-random-random.png b/source/images/logic_bricks/sensors/logic-sensors-types-random-random.png similarity index 100% rename from source/images/Logic/Sensors/logic-sensors-types-random-random.png rename to source/images/logic_bricks/sensors/logic-sensors-types-random-random.png diff --git a/source/images/Logic/Sensors/logic-sensors-types-ray-ray.png b/source/images/logic_bricks/sensors/logic-sensors-types-ray-ray.png similarity index 100% rename from source/images/Logic/Sensors/logic-sensors-types-ray-ray.png rename to source/images/logic_bricks/sensors/logic-sensors-types-ray-ray.png diff --git a/source/images/logic_nodes/ln-fps-jetpacking.png b/source/images/logic_nodes/ln-fps-jetpacking.png new file mode 100644 index 00000000..48a88770 Binary files /dev/null and b/source/images/logic_nodes/ln-fps-jetpacking.png differ diff --git a/source/images/logic_nodes/ln-guinness_world_record.png b/source/images/logic_nodes/ln-guinness_world_record.png new file mode 100644 index 00000000..a5a417c9 Binary files /dev/null and b/source/images/logic_nodes/ln-guinness_world_record.png differ diff --git a/source/images/logic_nodes/logic/bricks/ln-controller_status.png b/source/images/logic_nodes/logic/bricks/ln-controller_status.png index 7f46777a..fae2d91e 100644 Binary files a/source/images/logic_nodes/logic/bricks/ln-controller_status.png and b/source/images/logic_nodes/logic/bricks/ln-controller_status.png differ diff --git a/source/images/logic_nodes/math/ln-curve_interpolation.png b/source/images/logic_nodes/math/ln-curve_interpolation.png new file mode 100644 index 00000000..5adc7351 Binary files /dev/null and b/source/images/logic_nodes/math/ln-curve_interpolation.png differ diff --git a/source/images/logic_nodes/math/ln-math-example.png b/source/images/logic_nodes/math/ln-math-example.png new file mode 100644 index 00000000..9eff2605 Binary files /dev/null and b/source/images/logic_nodes/math/ln-math-example.png differ diff --git a/source/images/logic_nodes/math/ln-tween_value.png b/source/images/logic_nodes/math/ln-tween_value.png new file mode 100644 index 00000000..740b4cef Binary files /dev/null and b/source/images/logic_nodes/math/ln-tween_value.png differ diff --git a/source/images/logic_nodes/math/ln-vector_math-example.png b/source/images/logic_nodes/math/ln-vector_math-example.png new file mode 100644 index 00000000..c1a20639 Binary files /dev/null and b/source/images/logic_nodes/math/ln-vector_math-example.png differ diff --git a/source/images/logic_nodes/objects/get_attribute/ln-color.png b/source/images/logic_nodes/objects/get_attribute/ln-get_color.png similarity index 100% rename from source/images/logic_nodes/objects/get_attribute/ln-color.png rename to source/images/logic_nodes/objects/get_attribute/ln-get_color.png diff --git a/source/images/logic_nodes/objects/get_attribute/ln-local_angular_velocity.png b/source/images/logic_nodes/objects/get_attribute/ln-get_local_angular_velocity.png similarity index 100% rename from source/images/logic_nodes/objects/get_attribute/ln-local_angular_velocity.png rename to source/images/logic_nodes/objects/get_attribute/ln-get_local_angular_velocity.png diff --git a/source/images/logic_nodes/objects/get_attribute/ln-local_linear_velocity.png b/source/images/logic_nodes/objects/get_attribute/ln-get_local_linear_velocity.png similarity index 100% rename from source/images/logic_nodes/objects/get_attribute/ln-local_linear_velocity.png rename to source/images/logic_nodes/objects/get_attribute/ln-get_local_linear_velocity.png diff --git a/source/images/logic_nodes/objects/get_attribute/ln-local_orientation.png b/source/images/logic_nodes/objects/get_attribute/ln-get_local_orientation.png similarity index 100% rename from source/images/logic_nodes/objects/get_attribute/ln-local_orientation.png rename to source/images/logic_nodes/objects/get_attribute/ln-get_local_orientation.png diff --git a/source/images/logic_nodes/objects/get_attribute/ln-local_position.png b/source/images/logic_nodes/objects/get_attribute/ln-get_local_position.png similarity index 100% rename from source/images/logic_nodes/objects/get_attribute/ln-local_position.png rename to source/images/logic_nodes/objects/get_attribute/ln-get_local_position.png diff --git a/source/images/logic_nodes/objects/get_attribute/ln-local_scale.png b/source/images/logic_nodes/objects/get_attribute/ln-get_local_scale.png similarity index 100% rename from source/images/logic_nodes/objects/get_attribute/ln-local_scale.png rename to source/images/logic_nodes/objects/get_attribute/ln-get_local_scale.png diff --git a/source/images/logic_nodes/objects/get_attribute/ln-local_transform.png b/source/images/logic_nodes/objects/get_attribute/ln-get_local_transform.png similarity index 100% rename from source/images/logic_nodes/objects/get_attribute/ln-local_transform.png rename to source/images/logic_nodes/objects/get_attribute/ln-get_local_transform.png diff --git a/source/images/logic_nodes/objects/get_attribute/ln-name.png b/source/images/logic_nodes/objects/get_attribute/ln-get_name.png similarity index 100% rename from source/images/logic_nodes/objects/get_attribute/ln-name.png rename to source/images/logic_nodes/objects/get_attribute/ln-get_name.png diff --git a/source/images/logic_nodes/objects/get_attribute/ln-visibility.png b/source/images/logic_nodes/objects/get_attribute/ln-get_visibility.png similarity index 100% rename from source/images/logic_nodes/objects/get_attribute/ln-visibility.png rename to source/images/logic_nodes/objects/get_attribute/ln-get_visibility.png diff --git a/source/images/logic_nodes/objects/get_attribute/ln-world_angular_velocity.png b/source/images/logic_nodes/objects/get_attribute/ln-get_world_angular_velocity.png similarity index 100% rename from source/images/logic_nodes/objects/get_attribute/ln-world_angular_velocity.png rename to source/images/logic_nodes/objects/get_attribute/ln-get_world_angular_velocity.png diff --git a/source/images/logic_nodes/objects/get_attribute/ln-world_linear_velocity.png b/source/images/logic_nodes/objects/get_attribute/ln-get_world_linear_velocity.png similarity index 100% rename from source/images/logic_nodes/objects/get_attribute/ln-world_linear_velocity.png rename to source/images/logic_nodes/objects/get_attribute/ln-get_world_linear_velocity.png diff --git a/source/images/logic_nodes/objects/get_attribute/ln-world_orientation.png b/source/images/logic_nodes/objects/get_attribute/ln-get_world_orientation.png similarity index 100% rename from source/images/logic_nodes/objects/get_attribute/ln-world_orientation.png rename to source/images/logic_nodes/objects/get_attribute/ln-get_world_orientation.png diff --git a/source/images/logic_nodes/objects/get_attribute/ln-world_position.png b/source/images/logic_nodes/objects/get_attribute/ln-get_world_position.png similarity index 100% rename from source/images/logic_nodes/objects/get_attribute/ln-world_position.png rename to source/images/logic_nodes/objects/get_attribute/ln-get_world_position.png diff --git a/source/images/logic_nodes/objects/get_attribute/ln-world_scale.png b/source/images/logic_nodes/objects/get_attribute/ln-get_world_scale.png similarity index 100% rename from source/images/logic_nodes/objects/get_attribute/ln-world_scale.png rename to source/images/logic_nodes/objects/get_attribute/ln-get_world_scale.png diff --git a/source/images/logic_nodes/objects/get_attribute/ln-world_transform.png b/source/images/logic_nodes/objects/get_attribute/ln-get_world_transform.png similarity index 100% rename from source/images/logic_nodes/objects/get_attribute/ln-world_transform.png rename to source/images/logic_nodes/objects/get_attribute/ln-get_world_transform.png diff --git a/source/images/logic_nodes/objects/get_attribute/logic_nodes-08-objects-get_attribute-93-get_attribute.png b/source/images/logic_nodes/objects/get_attribute/logic_nodes-08-objects-get_attribute-93-get_attribute.png deleted file mode 100644 index 25738c06..00000000 Binary files a/source/images/logic_nodes/objects/get_attribute/logic_nodes-08-objects-get_attribute-93-get_attribute.png and /dev/null differ diff --git a/source/images/logic_nodes/objects/get_attribute/logic_nodes-08-objects-get_attribute-93.1-get_attribute_dd.png b/source/images/logic_nodes/objects/get_attribute/logic_nodes-08-objects-get_attribute-93.1-get_attribute_dd.png deleted file mode 100644 index aad31d59..00000000 Binary files a/source/images/logic_nodes/objects/get_attribute/logic_nodes-08-objects-get_attribute-93.1-get_attribute_dd.png and /dev/null differ diff --git a/source/images/logic_nodes/objects/set_attribute/ln-color.png b/source/images/logic_nodes/objects/set_attribute/ln-set_color.png similarity index 100% rename from source/images/logic_nodes/objects/set_attribute/ln-color.png rename to source/images/logic_nodes/objects/set_attribute/ln-set_color.png diff --git a/source/images/logic_nodes/objects/set_attribute/ln-local_angular_velocity.png b/source/images/logic_nodes/objects/set_attribute/ln-set_local_angular_velocity.png similarity index 100% rename from source/images/logic_nodes/objects/set_attribute/ln-local_angular_velocity.png rename to source/images/logic_nodes/objects/set_attribute/ln-set_local_angular_velocity.png diff --git a/source/images/logic_nodes/objects/set_attribute/ln-local_linear_velocity.png b/source/images/logic_nodes/objects/set_attribute/ln-set_local_linear_velocity.png similarity index 100% rename from source/images/logic_nodes/objects/set_attribute/ln-local_linear_velocity.png rename to source/images/logic_nodes/objects/set_attribute/ln-set_local_linear_velocity.png diff --git a/source/images/logic_nodes/objects/set_attribute/ln-local_orientation.png b/source/images/logic_nodes/objects/set_attribute/ln-set_local_orientation.png similarity index 100% rename from source/images/logic_nodes/objects/set_attribute/ln-local_orientation.png rename to source/images/logic_nodes/objects/set_attribute/ln-set_local_orientation.png diff --git a/source/images/logic_nodes/objects/set_attribute/ln-local_position.png b/source/images/logic_nodes/objects/set_attribute/ln-set_local_position.png similarity index 100% rename from source/images/logic_nodes/objects/set_attribute/ln-local_position.png rename to source/images/logic_nodes/objects/set_attribute/ln-set_local_position.png diff --git a/source/images/logic_nodes/objects/set_attribute/ln-local_transform.png b/source/images/logic_nodes/objects/set_attribute/ln-set_local_transform.png similarity index 100% rename from source/images/logic_nodes/objects/set_attribute/ln-local_transform.png rename to source/images/logic_nodes/objects/set_attribute/ln-set_local_transform.png diff --git a/source/images/logic_nodes/objects/set_attribute/ln-world_angular_velocity.png b/source/images/logic_nodes/objects/set_attribute/ln-set_world_angular_velocity.png similarity index 100% rename from source/images/logic_nodes/objects/set_attribute/ln-world_angular_velocity.png rename to source/images/logic_nodes/objects/set_attribute/ln-set_world_angular_velocity.png diff --git a/source/images/logic_nodes/objects/set_attribute/ln-world_linear_velocity.png b/source/images/logic_nodes/objects/set_attribute/ln-set_world_linear_velocity.png similarity index 100% rename from source/images/logic_nodes/objects/set_attribute/ln-world_linear_velocity.png rename to source/images/logic_nodes/objects/set_attribute/ln-set_world_linear_velocity.png diff --git a/source/images/logic_nodes/objects/set_attribute/ln-world_orientation.png b/source/images/logic_nodes/objects/set_attribute/ln-set_world_orientation.png similarity index 100% rename from source/images/logic_nodes/objects/set_attribute/ln-world_orientation.png rename to source/images/logic_nodes/objects/set_attribute/ln-set_world_orientation.png diff --git a/source/images/logic_nodes/objects/set_attribute/ln-world_position.png b/source/images/logic_nodes/objects/set_attribute/ln-set_world_position.png similarity index 100% rename from source/images/logic_nodes/objects/set_attribute/ln-world_position.png rename to source/images/logic_nodes/objects/set_attribute/ln-set_world_position.png diff --git a/source/images/logic_nodes/objects/set_attribute/ln-world_scale.png b/source/images/logic_nodes/objects/set_attribute/ln-set_world_scale.png similarity index 100% rename from source/images/logic_nodes/objects/set_attribute/ln-world_scale.png rename to source/images/logic_nodes/objects/set_attribute/ln-set_world_scale.png diff --git a/source/images/logic_nodes/objects/set_attribute/ln-world_transform.png b/source/images/logic_nodes/objects/set_attribute/ln-set_world_transform.png similarity index 100% rename from source/images/logic_nodes/objects/set_attribute/ln-world_transform.png rename to source/images/logic_nodes/objects/set_attribute/ln-set_world_transform.png diff --git a/source/images/logic_nodes/objects/set_attribute/logic_nodes-08-objects-set_attribute-94-set_attribute.png b/source/images/logic_nodes/objects/set_attribute/logic_nodes-08-objects-set_attribute-94-set_attribute.png deleted file mode 100644 index 1150eb14..00000000 Binary files a/source/images/logic_nodes/objects/set_attribute/logic_nodes-08-objects-set_attribute-94-set_attribute.png and /dev/null differ diff --git a/source/images/logic_nodes/objects/set_attribute/logic_nodes-08-objects-set_attribute-94.1-set_attribute_dd.png b/source/images/logic_nodes/objects/set_attribute/logic_nodes-08-objects-set_attribute-94.1-set_attribute_dd.png deleted file mode 100644 index 3378f2fb..00000000 Binary files a/source/images/logic_nodes/objects/set_attribute/logic_nodes-08-objects-set_attribute-94.1-set_attribute_dd.png and /dev/null differ diff --git a/source/images/logic_nodes/objects/set_attribute/logic_nodes-08-objects-set_attribute-95-set_color.png b/source/images/logic_nodes/objects/set_attribute/logic_nodes-08-objects-set_attribute-95-set_color.png deleted file mode 100644 index e23d549a..00000000 Binary files a/source/images/logic_nodes/objects/set_attribute/logic_nodes-08-objects-set_attribute-95-set_color.png and /dev/null differ diff --git a/source/images/logic_nodes/physics/character/ln-walk-example.png b/source/images/logic_nodes/physics/character/ln-walk-example.png new file mode 100644 index 00000000..24ef6769 Binary files /dev/null and b/source/images/logic_nodes/physics/character/ln-walk-example.png differ diff --git a/source/images/logic_nodes/physics/ln-set_gravity.png b/source/images/logic_nodes/physics/ln-set_character_gravity.png similarity index 100% rename from source/images/logic_nodes/physics/ln-set_gravity.png rename to source/images/logic_nodes/physics/ln-set_character_gravity.png diff --git a/source/images/logic_nodes/scene/ln-get_gravity.png b/source/images/logic_nodes/scene/ln-get_gravity.png deleted file mode 100644 index d82ce2ba..00000000 Binary files a/source/images/logic_nodes/scene/ln-get_gravity.png and /dev/null differ diff --git a/source/images/logic_nodes/scene/ln-get_world_gravity.png b/source/images/logic_nodes/scene/ln-get_world_gravity.png new file mode 100644 index 00000000..2a34459b Binary files /dev/null and b/source/images/logic_nodes/scene/ln-get_world_gravity.png differ diff --git a/source/images/logic_nodes/scene/ln-set_gravity.png b/source/images/logic_nodes/scene/ln-set_gravity.png deleted file mode 100644 index d21fca25..00000000 Binary files a/source/images/logic_nodes/scene/ln-set_gravity.png and /dev/null differ diff --git a/source/images/logic_nodes/scene/ln-set_scene.png b/source/images/logic_nodes/scene/ln-set_scene.png index d15f5e62..2a4067fe 100644 Binary files a/source/images/logic_nodes/scene/ln-set_scene.png and b/source/images/logic_nodes/scene/ln-set_scene.png differ diff --git a/source/images/logic_nodes/scene/ln-set_world_gravity.png b/source/images/logic_nodes/scene/ln-set_world_gravity.png new file mode 100644 index 00000000..3df7506b Binary files /dev/null and b/source/images/logic_nodes/scene/ln-set_world_gravity.png differ diff --git a/source/images/logic_nodes/values/ln-value_switch-example.png b/source/images/logic_nodes/values/ln-value_switch-example.png new file mode 100644 index 00000000..6bb423e0 Binary files /dev/null and b/source/images/logic_nodes/values/ln-value_switch-example.png differ diff --git a/source/images/logic_nodes/values/properties/ln-get_object_property-example.png b/source/images/logic_nodes/values/properties/ln-get_object_property-example.png new file mode 100644 index 00000000..7e15472a Binary files /dev/null and b/source/images/logic_nodes/values/properties/ln-get_object_property-example.png differ diff --git a/source/images/Python_Components/Fig-01.png b/source/images/python_components/Fig-01.png similarity index 100% rename from source/images/Python_Components/Fig-01.png rename to source/images/python_components/Fig-01.png diff --git a/source/images/Python_Components/Fig-02.png b/source/images/python_components/Fig-02.png similarity index 100% rename from source/images/Python_Components/Fig-02.png rename to source/images/python_components/Fig-02.png diff --git a/source/images/Python_Components/Fig-03.png b/source/images/python_components/Fig-03.png similarity index 100% rename from source/images/Python_Components/Fig-03.png rename to source/images/python_components/Fig-03.png diff --git a/source/images/Python_Components/Fig-04.png b/source/images/python_components/Fig-04.png similarity index 100% rename from source/images/Python_Components/Fig-04.png rename to source/images/python_components/Fig-04.png diff --git a/source/images/Python_Components/Fig-05.png b/source/images/python_components/Fig-05.png similarity index 100% rename from source/images/Python_Components/Fig-05.png rename to source/images/python_components/Fig-05.png diff --git a/source/images/Python_Components/Fig-06.png b/source/images/python_components/Fig-06.png similarity index 100% rename from source/images/Python_Components/Fig-06.png rename to source/images/python_components/Fig-06.png diff --git a/source/images/Python_Components/Fig-07.png b/source/images/python_components/Fig-07.png similarity index 100% rename from source/images/Python_Components/Fig-07.png rename to source/images/python_components/Fig-07.png diff --git a/source/images/Python_Components/Fig-08.png b/source/images/python_components/Fig-08.png similarity index 100% rename from source/images/Python_Components/Fig-08.png rename to source/images/python_components/Fig-08.png diff --git a/source/images/Python_Components/Fig-09.png b/source/images/python_components/Fig-09.png similarity index 100% rename from source/images/Python_Components/Fig-09.png rename to source/images/python_components/Fig-09.png diff --git a/source/images/Python_Components/Fig-10.png b/source/images/python_components/Fig-10.png similarity index 100% rename from source/images/Python_Components/Fig-10.png rename to source/images/python_components/Fig-10.png diff --git a/source/images/Python_Components/Fig-11.png b/source/images/python_components/Fig-11.png similarity index 100% rename from source/images/Python_Components/Fig-11.png rename to source/images/python_components/Fig-11.png diff --git a/source/images/Python_Components/Fig-12.png b/source/images/python_components/Fig-12.png similarity index 100% rename from source/images/Python_Components/Fig-12.png rename to source/images/python_components/Fig-12.png diff --git a/source/images/Python_Components/Fig-13.png b/source/images/python_components/Fig-13.png similarity index 100% rename from source/images/Python_Components/Fig-13.png rename to source/images/python_components/Fig-13.png diff --git a/source/images/Python_Components/Fig-14.png b/source/images/python_components/Fig-14.png similarity index 100% rename from source/images/Python_Components/Fig-14.png rename to source/images/python_components/Fig-14.png diff --git a/source/images/Python_Components/Fig-15.png b/source/images/python_components/Fig-15.png similarity index 100% rename from source/images/Python_Components/Fig-15.png rename to source/images/python_components/Fig-15.png diff --git a/source/images/Python_Components/Fig-16.png b/source/images/python_components/Fig-16.png similarity index 100% rename from source/images/Python_Components/Fig-16.png rename to source/images/python_components/Fig-16.png diff --git a/source/images/Python_Components/Fig-18.png b/source/images/python_components/Fig-18.png similarity index 100% rename from source/images/Python_Components/Fig-18.png rename to source/images/python_components/Fig-18.png diff --git a/source/images/Python_Components/Fig-19.png b/source/images/python_components/Fig-19.png similarity index 100% rename from source/images/Python_Components/Fig-19.png rename to source/images/python_components/Fig-19.png diff --git a/source/images/Python_Components/Fig-20.png b/source/images/python_components/Fig-20.png similarity index 100% rename from source/images/Python_Components/Fig-20.png rename to source/images/python_components/Fig-20.png diff --git a/source/images/Python_Scripting/python-scripting-introduction-to-scripting-01.png b/source/images/python_scripting/introduction_to_scripting_01.png similarity index 100% rename from source/images/Python_Scripting/python-scripting-introduction-to-scripting-01.png rename to source/images/python_scripting/introduction_to_scripting_01.png diff --git a/source/images/Python_Scripting/python-scripting-introduction-to-scripting-02.png b/source/images/python_scripting/introduction_to_scripting_02.png similarity index 100% rename from source/images/Python_Scripting/python-scripting-introduction-to-scripting-02.png rename to source/images/python_scripting/introduction_to_scripting_02.png diff --git a/source/images/Python_Scripting/python-scripting-introduction-to-scripting-03.png b/source/images/python_scripting/introduction_to_scripting_03.png similarity index 100% rename from source/images/Python_Scripting/python-scripting-introduction-to-scripting-03.png rename to source/images/python_scripting/introduction_to_scripting_03.png diff --git a/source/images/Python_Scripting/python-scripting-introduction-to-scripting-04.png b/source/images/python_scripting/introduction_to_scripting_04.png similarity index 100% rename from source/images/Python_Scripting/python-scripting-introduction-to-scripting-04.png rename to source/images/python_scripting/introduction_to_scripting_04.png diff --git a/source/images/Python_Scripting/python-scripting-introduction-to-scripting-05.png b/source/images/python_scripting/introduction_to_scripting_05.png similarity index 100% rename from source/images/Python_Scripting/python-scripting-introduction-to-scripting-05.png rename to source/images/python_scripting/introduction_to_scripting_05.png diff --git a/source/images/Python_Scripting/python-scripting-introduction-to-scripting-06.png b/source/images/python_scripting/introduction_to_scripting_06.png similarity index 100% rename from source/images/Python_Scripting/python-scripting-introduction-to-scripting-06.png rename to source/images/python_scripting/introduction_to_scripting_06.png diff --git a/source/images/Python_Scripting/python-scripting-introduction-to-scripting-07.png b/source/images/python_scripting/introduction_to_scripting_07.png similarity index 100% rename from source/images/Python_Scripting/python-scripting-introduction-to-scripting-07.png rename to source/images/python_scripting/introduction_to_scripting_07.png diff --git a/source/images/Python_Scripting/python-scripting-introduction-to-scripting-08.png b/source/images/python_scripting/introduction_to_scripting_08.png similarity index 100% rename from source/images/Python_Scripting/python-scripting-introduction-to-scripting-08.png rename to source/images/python_scripting/introduction_to_scripting_08.png diff --git a/source/images/Python_Scripting/python-scripting-introduction-to-scripting-09.png b/source/images/python_scripting/introduction_to_scripting_09.png similarity index 100% rename from source/images/Python_Scripting/python-scripting-introduction-to-scripting-09.png rename to source/images/python_scripting/introduction_to_scripting_09.png diff --git a/source/images/Python_Scripting/python-scripting-introduction-to-scripting-10.png b/source/images/python_scripting/introduction_to_scripting_10.png similarity index 100% rename from source/images/Python_Scripting/python-scripting-introduction-to-scripting-10.png rename to source/images/python_scripting/introduction_to_scripting_10.png diff --git a/source/images/Python_Scripting/python-scripting-introduction-to-scripting-11.png b/source/images/python_scripting/introduction_to_scripting_11.png similarity index 100% rename from source/images/Python_Scripting/python-scripting-introduction-to-scripting-11.png rename to source/images/python_scripting/introduction_to_scripting_11.png diff --git a/source/images/Tools/tools-examples-01.png b/source/images/tools/tools-examples_1.png similarity index 100% rename from source/images/Tools/tools-examples-01.png rename to source/images/tools/tools-examples_1.png diff --git a/source/images/Tools/tools-examples-02.png b/source/images/tools/tools-examples_2.png similarity index 100% rename from source/images/Tools/tools-examples-02.png rename to source/images/tools/tools-examples_2.png diff --git a/source/images/Tutorials/getting_started/01-coordinate_system.png b/source/images/tutorials/getting_started/01-coordinate_system.png similarity index 100% rename from source/images/Tutorials/getting_started/01-coordinate_system.png rename to source/images/tutorials/getting_started/01-coordinate_system.png diff --git a/source/images/Tutorials/getting_started/02-teapot_cube.jpg b/source/images/tutorials/getting_started/02-teapot_cube.jpg similarity index 100% rename from source/images/Tutorials/getting_started/02-teapot_cube.jpg rename to source/images/tutorials/getting_started/02-teapot_cube.jpg diff --git a/source/images/Tutorials/getting_started/03-cylinder_cap.jpg b/source/images/tutorials/getting_started/03-cylinder_cap.jpg similarity index 100% rename from source/images/Tutorials/getting_started/03-cylinder_cap.jpg rename to source/images/tutorials/getting_started/03-cylinder_cap.jpg diff --git a/source/images/Tutorials/getting_started/04-normals.jpg b/source/images/tutorials/getting_started/04-normals.jpg similarity index 100% rename from source/images/Tutorials/getting_started/04-normals.jpg rename to source/images/tutorials/getting_started/04-normals.jpg diff --git a/source/images/Tutorials/getting_started/05-translation.jpg b/source/images/tutorials/getting_started/05-translation.jpg similarity index 100% rename from source/images/Tutorials/getting_started/05-translation.jpg rename to source/images/tutorials/getting_started/05-translation.jpg diff --git a/source/images/Tutorials/getting_started/06-mesh_with_texture.jpg b/source/images/tutorials/getting_started/06-mesh_with_texture.jpg similarity index 100% rename from source/images/Tutorials/getting_started/06-mesh_with_texture.jpg rename to source/images/tutorials/getting_started/06-mesh_with_texture.jpg diff --git a/source/images/Tutorials/getting_started/07-diffuse_map.jpg b/source/images/tutorials/getting_started/07-diffuse_map.jpg similarity index 100% rename from source/images/Tutorials/getting_started/07-diffuse_map.jpg rename to source/images/tutorials/getting_started/07-diffuse_map.jpg diff --git a/source/images/Tutorials/getting_started/08-lamp_sun.png b/source/images/tutorials/getting_started/08-lamp_sun.png similarity index 100% rename from source/images/Tutorials/getting_started/08-lamp_sun.png rename to source/images/tutorials/getting_started/08-lamp_sun.png diff --git a/source/images/tutorials/getting_started/08-lights.png b/source/images/tutorials/getting_started/08-lights.png new file mode 100644 index 00000000..1926d94c Binary files /dev/null and b/source/images/tutorials/getting_started/08-lights.png differ diff --git a/source/images/Tutorials/getting_started/09-camera_object.png b/source/images/tutorials/getting_started/09-camera_object.png similarity index 100% rename from source/images/Tutorials/getting_started/09-camera_object.png rename to source/images/tutorials/getting_started/09-camera_object.png diff --git a/source/images/Tutorials/getting_started/10-dopesheet.png b/source/images/tutorials/getting_started/10-dopesheet.png similarity index 100% rename from source/images/Tutorials/getting_started/10-dopesheet.png rename to source/images/tutorials/getting_started/10-dopesheet.png diff --git a/source/images/Tutorials/getting_started/11-bounce_animation.png b/source/images/tutorials/getting_started/11-bounce_animation.png similarity index 100% rename from source/images/Tutorials/getting_started/11-bounce_animation.png rename to source/images/tutorials/getting_started/11-bounce_animation.png diff --git a/source/images/Tutorials/getting_started/12-armature.png b/source/images/tutorials/getting_started/12-armature.png similarity index 100% rename from source/images/Tutorials/getting_started/12-armature.png rename to source/images/tutorials/getting_started/12-armature.png diff --git a/source/images/Tutorials/getting_started/13-shape_keys.jpg b/source/images/tutorials/getting_started/13-shape_keys.jpg similarity index 100% rename from source/images/Tutorials/getting_started/13-shape_keys.jpg rename to source/images/tutorials/getting_started/13-shape_keys.jpg diff --git a/source/images/Tutorials/getting_started/14-physics_motion.jpg b/source/images/tutorials/getting_started/14-physics_motion.jpg similarity index 100% rename from source/images/Tutorials/getting_started/14-physics_motion.jpg rename to source/images/tutorials/getting_started/14-physics_motion.jpg diff --git a/source/images/Tutorials/getting_started/15-object_logic_game.jpg b/source/images/tutorials/getting_started/15-object_logic_game.jpg similarity index 100% rename from source/images/Tutorials/getting_started/15-object_logic_game.jpg rename to source/images/tutorials/getting_started/15-object_logic_game.jpg diff --git a/source/images/Tutorials/getting_started/16-game_loop.png b/source/images/tutorials/getting_started/16-game_loop.png similarity index 100% rename from source/images/Tutorials/getting_started/16-game_loop.png rename to source/images/tutorials/getting_started/16-game_loop.png diff --git a/source/images/Tutorials/getting_started/17-scene_loop.png b/source/images/tutorials/getting_started/17-scene_loop.png similarity index 100% rename from source/images/Tutorials/getting_started/17-scene_loop.png rename to source/images/tutorials/getting_started/17-scene_loop.png diff --git a/source/images/Tutorials/getting_started/18-logic_tick_skipping.png b/source/images/tutorials/getting_started/18-logic_tick_skipping.png similarity index 100% rename from source/images/Tutorials/getting_started/18-logic_tick_skipping.png rename to source/images/tutorials/getting_started/18-logic_tick_skipping.png diff --git a/source/images/Tutorials/getting_started/18-logic_tick_skipping_dark.png b/source/images/tutorials/getting_started/18-logic_tick_skipping_dark.png similarity index 100% rename from source/images/Tutorials/getting_started/18-logic_tick_skipping_dark.png rename to source/images/tutorials/getting_started/18-logic_tick_skipping_dark.png diff --git a/source/images/Tutorials/getting_started/19-default_workspace.png b/source/images/tutorials/getting_started/19-default_workspace.png similarity index 100% rename from source/images/Tutorials/getting_started/19-default_workspace.png rename to source/images/tutorials/getting_started/19-default_workspace.png diff --git a/source/images/Tutorials/getting_started/20-game_engine.png b/source/images/tutorials/getting_started/20-game_engine.png similarity index 100% rename from source/images/Tutorials/getting_started/20-game_engine.png rename to source/images/tutorials/getting_started/20-game_engine.png diff --git a/source/images/Tutorials/getting_started/21-numpad.png b/source/images/tutorials/getting_started/21-numpad.png similarity index 100% rename from source/images/Tutorials/getting_started/21-numpad.png rename to source/images/tutorials/getting_started/21-numpad.png diff --git a/source/images/Tutorials/getting_started/22-editor_outliner.png b/source/images/tutorials/getting_started/22-editor_outliner.png similarity index 100% rename from source/images/Tutorials/getting_started/22-editor_outliner.png rename to source/images/tutorials/getting_started/22-editor_outliner.png diff --git a/source/images/Tutorials/getting_started/23-editor_properties.png b/source/images/tutorials/getting_started/23-editor_properties.png similarity index 100% rename from source/images/Tutorials/getting_started/23-editor_properties.png rename to source/images/tutorials/getting_started/23-editor_properties.png diff --git a/source/images/Tutorials/getting_started/24-editor_timeline.png b/source/images/tutorials/getting_started/24-editor_timeline.png similarity index 100% rename from source/images/Tutorials/getting_started/24-editor_timeline.png rename to source/images/tutorials/getting_started/24-editor_timeline.png diff --git a/source/images/Tutorials/getting_started/25-area_split.png b/source/images/tutorials/getting_started/25-area_split.png similarity index 100% rename from source/images/Tutorials/getting_started/25-area_split.png rename to source/images/tutorials/getting_started/25-area_split.png diff --git a/source/images/Tutorials/getting_started/26-editor_selection.png b/source/images/tutorials/getting_started/26-editor_selection.png similarity index 100% rename from source/images/Tutorials/getting_started/26-editor_selection.png rename to source/images/tutorials/getting_started/26-editor_selection.png diff --git a/source/images/Tutorials/getting_started/27-dopsheet_image_brick.png b/source/images/tutorials/getting_started/27-dopsheet_image_brick.png similarity index 100% rename from source/images/Tutorials/getting_started/27-dopsheet_image_brick.png rename to source/images/tutorials/getting_started/27-dopsheet_image_brick.png diff --git a/source/images/Tutorials/getting_started/27-image.png b/source/images/tutorials/getting_started/27-image.png similarity index 100% rename from source/images/Tutorials/getting_started/27-image.png rename to source/images/tutorials/getting_started/27-image.png diff --git a/source/images/Tutorials/getting_started/28-viewport_shading.png b/source/images/tutorials/getting_started/28-viewport_shading.png similarity index 100% rename from source/images/Tutorials/getting_started/28-viewport_shading.png rename to source/images/tutorials/getting_started/28-viewport_shading.png diff --git a/source/images/Tutorials/getting_started/29-search_pupup.png b/source/images/tutorials/getting_started/29-search_pupup.png similarity index 100% rename from source/images/Tutorials/getting_started/29-search_pupup.png rename to source/images/tutorials/getting_started/29-search_pupup.png diff --git a/source/images/Tutorials/getting_started/30-3d_navigation.png b/source/images/tutorials/getting_started/30-3d_navigation.png similarity index 100% rename from source/images/Tutorials/getting_started/30-3d_navigation.png rename to source/images/tutorials/getting_started/30-3d_navigation.png diff --git a/source/images/Tutorials/getting_started/31-datablock_hierarchy.png b/source/images/tutorials/getting_started/31-datablock_hierarchy.png similarity index 100% rename from source/images/Tutorials/getting_started/31-datablock_hierarchy.png rename to source/images/tutorials/getting_started/31-datablock_hierarchy.png diff --git a/source/images/Tutorials/getting_started/original_images/Fig01-14.png b/source/images/tutorials/getting_started/original_images/Fig01-14.png similarity index 100% rename from source/images/Tutorials/getting_started/original_images/Fig01-14.png rename to source/images/tutorials/getting_started/original_images/Fig01-14.png diff --git a/source/images/Tutorials/getting_started/original_images/Fig01-15.png b/source/images/tutorials/getting_started/original_images/Fig01-15.png similarity index 100% rename from source/images/Tutorials/getting_started/original_images/Fig01-15.png rename to source/images/tutorials/getting_started/original_images/Fig01-15.png diff --git a/source/images/Tutorials/getting_started/original_images/Fig01-20.jpg b/source/images/tutorials/getting_started/original_images/Fig01-20.jpg similarity index 100% rename from source/images/Tutorials/getting_started/original_images/Fig01-20.jpg rename to source/images/tutorials/getting_started/original_images/Fig01-20.jpg diff --git a/source/images/Tutorials/getting_started/original_images/Fig01-20b.png b/source/images/tutorials/getting_started/original_images/Fig01-20b.png similarity index 100% rename from source/images/Tutorials/getting_started/original_images/Fig01-20b.png rename to source/images/tutorials/getting_started/original_images/Fig01-20b.png diff --git a/source/images/Tutorials/getting_started/original_images/Fig01-20c.png b/source/images/tutorials/getting_started/original_images/Fig01-20c.png similarity index 100% rename from source/images/Tutorials/getting_started/original_images/Fig01-20c.png rename to source/images/tutorials/getting_started/original_images/Fig01-20c.png diff --git a/source/images/Tutorials/getting_started/original_images/Fig01-21.png b/source/images/tutorials/getting_started/original_images/Fig01-21.png similarity index 100% rename from source/images/Tutorials/getting_started/original_images/Fig01-21.png rename to source/images/tutorials/getting_started/original_images/Fig01-21.png diff --git a/source/images/Tutorials/getting_started/original_images/Fig01-22.jpg b/source/images/tutorials/getting_started/original_images/Fig01-22.jpg similarity index 100% rename from source/images/Tutorials/getting_started/original_images/Fig01-22.jpg rename to source/images/tutorials/getting_started/original_images/Fig01-22.jpg diff --git a/source/images/Tutorials/getting_started/original_images/Fig01-23.png b/source/images/tutorials/getting_started/original_images/Fig01-23.png similarity index 100% rename from source/images/Tutorials/getting_started/original_images/Fig01-23.png rename to source/images/tutorials/getting_started/original_images/Fig01-23.png diff --git a/source/images/Tutorials/getting_started/original_images/Fig01-24.png b/source/images/tutorials/getting_started/original_images/Fig01-24.png similarity index 100% rename from source/images/Tutorials/getting_started/original_images/Fig01-24.png rename to source/images/tutorials/getting_started/original_images/Fig01-24.png diff --git a/source/images/Tutorials/getting_started/original_images/Fig01-25.png b/source/images/tutorials/getting_started/original_images/Fig01-25.png similarity index 100% rename from source/images/Tutorials/getting_started/original_images/Fig01-25.png rename to source/images/tutorials/getting_started/original_images/Fig01-25.png diff --git a/source/images/Tutorials/getting_started/original_images/Fig01-26.png b/source/images/tutorials/getting_started/original_images/Fig01-26.png similarity index 100% rename from source/images/Tutorials/getting_started/original_images/Fig01-26.png rename to source/images/tutorials/getting_started/original_images/Fig01-26.png diff --git a/source/images/Tutorials/getting_started/original_images/Fig01-27.png b/source/images/tutorials/getting_started/original_images/Fig01-27.png similarity index 100% rename from source/images/Tutorials/getting_started/original_images/Fig01-27.png rename to source/images/tutorials/getting_started/original_images/Fig01-27.png diff --git a/source/images/Tutorials/getting_started/original_images/Fig01-28.png b/source/images/tutorials/getting_started/original_images/Fig01-28.png similarity index 100% rename from source/images/Tutorials/getting_started/original_images/Fig01-28.png rename to source/images/tutorials/getting_started/original_images/Fig01-28.png diff --git a/source/images/Tutorials/getting_started/original_images/Fig01-29.png b/source/images/tutorials/getting_started/original_images/Fig01-29.png similarity index 100% rename from source/images/Tutorials/getting_started/original_images/Fig01-29.png rename to source/images/tutorials/getting_started/original_images/Fig01-29.png diff --git a/source/images/Tutorials/getting_started/original_images/Fig01-30-1.png b/source/images/tutorials/getting_started/original_images/Fig01-30-1.png similarity index 100% rename from source/images/Tutorials/getting_started/original_images/Fig01-30-1.png rename to source/images/tutorials/getting_started/original_images/Fig01-30-1.png diff --git a/source/images/Tutorials/getting_started/original_images/Fig01-30.png b/source/images/tutorials/getting_started/original_images/Fig01-30.png similarity index 100% rename from source/images/Tutorials/getting_started/original_images/Fig01-30.png rename to source/images/tutorials/getting_started/original_images/Fig01-30.png diff --git a/source/images/Tutorials/getting_started/original_images/Fig01-31.png b/source/images/tutorials/getting_started/original_images/Fig01-31.png similarity index 100% rename from source/images/Tutorials/getting_started/original_images/Fig01-31.png rename to source/images/tutorials/getting_started/original_images/Fig01-31.png diff --git a/source/images/Tutorials/getting_started/original_images/Fig01-32.png b/source/images/tutorials/getting_started/original_images/Fig01-32.png similarity index 100% rename from source/images/Tutorials/getting_started/original_images/Fig01-32.png rename to source/images/tutorials/getting_started/original_images/Fig01-32.png diff --git a/source/images/Tutorials/getting_started/original_images/Fig01-33.png b/source/images/tutorials/getting_started/original_images/Fig01-33.png similarity index 100% rename from source/images/Tutorials/getting_started/original_images/Fig01-33.png rename to source/images/tutorials/getting_started/original_images/Fig01-33.png diff --git a/source/images/Tutorials/getting_started/original_images/xx-armature_animation.png b/source/images/tutorials/getting_started/original_images/xx-armature_animation.png similarity index 100% rename from source/images/Tutorials/getting_started/original_images/xx-armature_animation.png rename to source/images/tutorials/getting_started/original_images/xx-armature_animation.png diff --git a/source/images/Tutorials/introducing_logic_bricks/01-move_object-initial_scene.png b/source/images/tutorials/introducing_logic_bricks/01-move_object-initial_scene.png similarity index 100% rename from source/images/Tutorials/introducing_logic_bricks/01-move_object-initial_scene.png rename to source/images/tutorials/introducing_logic_bricks/01-move_object-initial_scene.png diff --git a/source/images/Tutorials/introducing_logic_bricks/02-move_object-logic_editor.png b/source/images/tutorials/introducing_logic_bricks/02-move_object-logic_editor.png similarity index 100% rename from source/images/Tutorials/introducing_logic_bricks/02-move_object-logic_editor.png rename to source/images/tutorials/introducing_logic_bricks/02-move_object-logic_editor.png diff --git a/source/images/Tutorials/introducing_logic_bricks/03-move_object-property_2x.png b/source/images/tutorials/introducing_logic_bricks/03-move_object-property_2x.png similarity index 100% rename from source/images/Tutorials/introducing_logic_bricks/03-move_object-property_2x.png rename to source/images/tutorials/introducing_logic_bricks/03-move_object-property_2x.png diff --git a/source/images/Tutorials/introducing_logic_bricks/04-move_object-fuel_consumption.png b/source/images/tutorials/introducing_logic_bricks/04-move_object-fuel_consumption.png similarity index 100% rename from source/images/Tutorials/introducing_logic_bricks/04-move_object-fuel_consumption.png rename to source/images/tutorials/introducing_logic_bricks/04-move_object-fuel_consumption.png diff --git a/source/images/Tutorials/introducing_logic_bricks/05-move_object-debug.png b/source/images/tutorials/introducing_logic_bricks/05-move_object-debug.png similarity index 100% rename from source/images/Tutorials/introducing_logic_bricks/05-move_object-debug.png rename to source/images/tutorials/introducing_logic_bricks/05-move_object-debug.png diff --git a/source/images/Tutorials/introducing_logic_bricks/06-play_animation-rotate_scale.png b/source/images/tutorials/introducing_logic_bricks/06-play_animation-rotate_scale.png similarity index 100% rename from source/images/Tutorials/introducing_logic_bricks/06-play_animation-rotate_scale.png rename to source/images/tutorials/introducing_logic_bricks/06-play_animation-rotate_scale.png diff --git a/source/images/Tutorials/introducing_logic_bricks/07-play_animation-editor_setup.png b/source/images/tutorials/introducing_logic_bricks/07-play_animation-editor_setup.png similarity index 100% rename from source/images/Tutorials/introducing_logic_bricks/07-play_animation-editor_setup.png rename to source/images/tutorials/introducing_logic_bricks/07-play_animation-editor_setup.png diff --git a/source/images/Tutorials/introducing_logic_bricks/08-linked_libraries.png b/source/images/tutorials/introducing_logic_bricks/08-linked_libraries.png similarity index 100% rename from source/images/Tutorials/introducing_logic_bricks/08-linked_libraries.png rename to source/images/tutorials/introducing_logic_bricks/08-linked_libraries.png diff --git a/source/images/Tutorials/introducing_logic_bricks/09-linked_libraries-linking.png b/source/images/tutorials/introducing_logic_bricks/09-linked_libraries-linking.png similarity index 100% rename from source/images/Tutorials/introducing_logic_bricks/09-linked_libraries-linking.png rename to source/images/tutorials/introducing_logic_bricks/09-linked_libraries-linking.png diff --git a/source/images/Tutorials/introducing_logic_bricks/10-linked_libraries-linked.png b/source/images/tutorials/introducing_logic_bricks/10-linked_libraries-linked.png similarity index 100% rename from source/images/Tutorials/introducing_logic_bricks/10-linked_libraries-linked.png rename to source/images/tutorials/introducing_logic_bricks/10-linked_libraries-linked.png diff --git a/source/images/Tutorials/introducing_logic_bricks/11-linked_libraries-broken_links.png b/source/images/tutorials/introducing_logic_bricks/11-linked_libraries-broken_links.png similarity index 100% rename from source/images/Tutorials/introducing_logic_bricks/11-linked_libraries-broken_links.png rename to source/images/tutorials/introducing_logic_bricks/11-linked_libraries-broken_links.png diff --git a/source/images/Tutorials/introducing_logic_bricks/12-linked_libraries-outliner.png b/source/images/tutorials/introducing_logic_bricks/12-linked_libraries-outliner.png similarity index 100% rename from source/images/Tutorials/introducing_logic_bricks/12-linked_libraries-outliner.png rename to source/images/tutorials/introducing_logic_bricks/12-linked_libraries-outliner.png diff --git a/source/images/Tutorials/introducing_logic_bricks/13-linked_libraries-relocate_broken.png b/source/images/tutorials/introducing_logic_bricks/13-linked_libraries-relocate_broken.png similarity index 100% rename from source/images/Tutorials/introducing_logic_bricks/13-linked_libraries-relocate_broken.png rename to source/images/tutorials/introducing_logic_bricks/13-linked_libraries-relocate_broken.png diff --git a/source/images/Tutorials/introducing_logic_bricks/original_images/tutorials-linked_libraries-base_files_1.png b/source/images/tutorials/introducing_logic_bricks/original_images/tutorials-linked_libraries-base_files_1.png similarity index 100% rename from source/images/Tutorials/introducing_logic_bricks/original_images/tutorials-linked_libraries-base_files_1.png rename to source/images/tutorials/introducing_logic_bricks/original_images/tutorials-linked_libraries-base_files_1.png diff --git a/source/images/Tutorials/introducing_logic_bricks/original_images/tutorials-linked_libraries-linking_1.png b/source/images/tutorials/introducing_logic_bricks/original_images/tutorials-linked_libraries-linking_1.png similarity index 100% rename from source/images/Tutorials/introducing_logic_bricks/original_images/tutorials-linked_libraries-linking_1.png rename to source/images/tutorials/introducing_logic_bricks/original_images/tutorials-linked_libraries-linking_1.png diff --git a/source/images/Tutorials/introducing_logic_bricks/original_images/tutorials-linked_libraries-linking_2.png b/source/images/tutorials/introducing_logic_bricks/original_images/tutorials-linked_libraries-linking_2.png similarity index 100% rename from source/images/Tutorials/introducing_logic_bricks/original_images/tutorials-linked_libraries-linking_2.png rename to source/images/tutorials/introducing_logic_bricks/original_images/tutorials-linked_libraries-linking_2.png diff --git a/source/images/Tutorials/introducing_logic_bricks/original_images/tutorials-linked_libraries-managing_1.png b/source/images/tutorials/introducing_logic_bricks/original_images/tutorials-linked_libraries-managing_1.png similarity index 100% rename from source/images/Tutorials/introducing_logic_bricks/original_images/tutorials-linked_libraries-managing_1.png rename to source/images/tutorials/introducing_logic_bricks/original_images/tutorials-linked_libraries-managing_1.png diff --git a/source/images/Tutorials/introducing_logic_bricks/original_images/tutorials-linked_libraries-managing_2.png b/source/images/tutorials/introducing_logic_bricks/original_images/tutorials-linked_libraries-managing_2.png similarity index 100% rename from source/images/Tutorials/introducing_logic_bricks/original_images/tutorials-linked_libraries-managing_2.png rename to source/images/tutorials/introducing_logic_bricks/original_images/tutorials-linked_libraries-managing_2.png diff --git a/source/images/Tutorials/introducing_logic_bricks/original_images/tutorials-linked_libraries-managing_3.png b/source/images/tutorials/introducing_logic_bricks/original_images/tutorials-linked_libraries-managing_3.png similarity index 100% rename from source/images/Tutorials/introducing_logic_bricks/original_images/tutorials-linked_libraries-managing_3.png rename to source/images/tutorials/introducing_logic_bricks/original_images/tutorials-linked_libraries-managing_3.png diff --git a/source/images/Tutorials/introducing_logic_bricks/original_images/tutorials-linked_libraries-managing_4.png b/source/images/tutorials/introducing_logic_bricks/original_images/tutorials-linked_libraries-managing_4.png similarity index 100% rename from source/images/Tutorials/introducing_logic_bricks/original_images/tutorials-linked_libraries-managing_4.png rename to source/images/tutorials/introducing_logic_bricks/original_images/tutorials-linked_libraries-managing_4.png diff --git a/source/images/Tutorials/introducing_logic_bricks/original_images/tutorials-move_object-debug_properties.png b/source/images/tutorials/introducing_logic_bricks/original_images/tutorials-move_object-debug_properties.png similarity index 100% rename from source/images/Tutorials/introducing_logic_bricks/original_images/tutorials-move_object-debug_properties.png rename to source/images/tutorials/introducing_logic_bricks/original_images/tutorials-move_object-debug_properties.png diff --git a/source/images/Tutorials/introducing_logic_bricks/original_images/tutorials-move_object-initial_scene.png b/source/images/tutorials/introducing_logic_bricks/original_images/tutorials-move_object-initial_scene.png similarity index 100% rename from source/images/Tutorials/introducing_logic_bricks/original_images/tutorials-move_object-initial_scene.png rename to source/images/tutorials/introducing_logic_bricks/original_images/tutorials-move_object-initial_scene.png diff --git a/source/images/Tutorials/introducing_logic_bricks/original_images/tutorials-move_object-logic_editor_1.png b/source/images/tutorials/introducing_logic_bricks/original_images/tutorials-move_object-logic_editor_1.png similarity index 100% rename from source/images/Tutorials/introducing_logic_bricks/original_images/tutorials-move_object-logic_editor_1.png rename to source/images/tutorials/introducing_logic_bricks/original_images/tutorials-move_object-logic_editor_1.png diff --git a/source/images/Tutorials/introducing_logic_bricks/original_images/tutorials-move_object-logic_editor_2.png b/source/images/tutorials/introducing_logic_bricks/original_images/tutorials-move_object-logic_editor_2.png similarity index 100% rename from source/images/Tutorials/introducing_logic_bricks/original_images/tutorials-move_object-logic_editor_2.png rename to source/images/tutorials/introducing_logic_bricks/original_images/tutorials-move_object-logic_editor_2.png diff --git a/source/images/Tutorials/introducing_logic_bricks/original_images/tutorials-move_object-logic_editor_3.png b/source/images/tutorials/introducing_logic_bricks/original_images/tutorials-move_object-logic_editor_3.png similarity index 100% rename from source/images/Tutorials/introducing_logic_bricks/original_images/tutorials-move_object-logic_editor_3.png rename to source/images/tutorials/introducing_logic_bricks/original_images/tutorials-move_object-logic_editor_3.png diff --git a/source/images/Tutorials/introducing_logic_bricks/original_images/tutorials-play_animation-action_editor.png b/source/images/tutorials/introducing_logic_bricks/original_images/tutorials-play_animation-action_editor.png similarity index 100% rename from source/images/Tutorials/introducing_logic_bricks/original_images/tutorials-play_animation-action_editor.png rename to source/images/tutorials/introducing_logic_bricks/original_images/tutorials-play_animation-action_editor.png diff --git a/source/images/Tutorials/introducing_logic_bricks/original_images/tutorials-play_animation-logic_editor_1.png b/source/images/tutorials/introducing_logic_bricks/original_images/tutorials-play_animation-logic_editor_1.png similarity index 100% rename from source/images/Tutorials/introducing_logic_bricks/original_images/tutorials-play_animation-logic_editor_1.png rename to source/images/tutorials/introducing_logic_bricks/original_images/tutorials-play_animation-logic_editor_1.png diff --git a/source/images/Tutorials/introducing_logic_nodes/15_move_object.png b/source/images/tutorials/introducing_logic_nodes/15_move_object.png similarity index 100% rename from source/images/Tutorials/introducing_logic_nodes/15_move_object.png rename to source/images/tutorials/introducing_logic_nodes/15_move_object.png diff --git a/source/images/tutorials/introducing_logic_nodes/2d_side_scroller/ln-2d-batch_rename.png b/source/images/tutorials/introducing_logic_nodes/2d_side_scroller/ln-2d-batch_rename.png new file mode 100644 index 00000000..6e213575 Binary files /dev/null and b/source/images/tutorials/introducing_logic_nodes/2d_side_scroller/ln-2d-batch_rename.png differ diff --git a/source/images/tutorials/introducing_logic_nodes/2d_side_scroller/ln-2d-bedrock.png b/source/images/tutorials/introducing_logic_nodes/2d_side_scroller/ln-2d-bedrock.png new file mode 100644 index 00000000..012d7ec9 Binary files /dev/null and b/source/images/tutorials/introducing_logic_nodes/2d_side_scroller/ln-2d-bedrock.png differ diff --git a/source/images/tutorials/introducing_logic_nodes/2d_side_scroller/ln-2d-player_camera.png b/source/images/tutorials/introducing_logic_nodes/2d_side_scroller/ln-2d-player_camera.png new file mode 100644 index 00000000..17d2099b Binary files /dev/null and b/source/images/tutorials/introducing_logic_nodes/2d_side_scroller/ln-2d-player_camera.png differ diff --git a/source/images/tutorials/introducing_logic_nodes/2d_side_scroller/ln-2d-player_movement-1.png b/source/images/tutorials/introducing_logic_nodes/2d_side_scroller/ln-2d-player_movement-1.png new file mode 100644 index 00000000..275e86f3 Binary files /dev/null and b/source/images/tutorials/introducing_logic_nodes/2d_side_scroller/ln-2d-player_movement-1.png differ diff --git a/source/images/tutorials/introducing_logic_nodes/2d_side_scroller/ln-2d-player_movement-2.png b/source/images/tutorials/introducing_logic_nodes/2d_side_scroller/ln-2d-player_movement-2.png new file mode 100644 index 00000000..6df3b976 Binary files /dev/null and b/source/images/tutorials/introducing_logic_nodes/2d_side_scroller/ln-2d-player_movement-2.png differ diff --git a/source/images/tutorials/introducing_logic_nodes/2d_side_scroller/ln-2d-player_properties-1.png b/source/images/tutorials/introducing_logic_nodes/2d_side_scroller/ln-2d-player_properties-1.png new file mode 100644 index 00000000..62348ed7 Binary files /dev/null and b/source/images/tutorials/introducing_logic_nodes/2d_side_scroller/ln-2d-player_properties-1.png differ diff --git a/source/images/tutorials/introducing_logic_nodes/2d_side_scroller/ln-2d-player_properties-2.png b/source/images/tutorials/introducing_logic_nodes/2d_side_scroller/ln-2d-player_properties-2.png new file mode 100644 index 00000000..7d48ab15 Binary files /dev/null and b/source/images/tutorials/introducing_logic_nodes/2d_side_scroller/ln-2d-player_properties-2.png differ diff --git a/source/images/tutorials/introducing_logic_nodes/2d_side_scroller/ln-2d-player_properties-3.png b/source/images/tutorials/introducing_logic_nodes/2d_side_scroller/ln-2d-player_properties-3.png new file mode 100644 index 00000000..edc7363b Binary files /dev/null and b/source/images/tutorials/introducing_logic_nodes/2d_side_scroller/ln-2d-player_properties-3.png differ diff --git a/source/images/tutorials/introducing_logic_nodes/2d_side_scroller/ln-2d-player_properties-4.png b/source/images/tutorials/introducing_logic_nodes/2d_side_scroller/ln-2d-player_properties-4.png new file mode 100644 index 00000000..a92b2ff0 Binary files /dev/null and b/source/images/tutorials/introducing_logic_nodes/2d_side_scroller/ln-2d-player_properties-4.png differ diff --git a/source/images/tutorials/introducing_logic_nodes/2d_side_scroller/ln-2d-player_properties-added_properties.png b/source/images/tutorials/introducing_logic_nodes/2d_side_scroller/ln-2d-player_properties-added_properties.png new file mode 100644 index 00000000..84987a5a Binary files /dev/null and b/source/images/tutorials/introducing_logic_nodes/2d_side_scroller/ln-2d-player_properties-added_properties.png differ diff --git a/source/images/tutorials/introducing_logic_nodes/ln-fps-action_editor.png b/source/images/tutorials/introducing_logic_nodes/ln-fps-action_editor.png new file mode 100644 index 00000000..2039133e Binary files /dev/null and b/source/images/tutorials/introducing_logic_nodes/ln-fps-action_editor.png differ diff --git a/source/images/tutorials/introducing_logic_nodes/ln-fps-add_game_property.png b/source/images/tutorials/introducing_logic_nodes/ln-fps-add_game_property.png new file mode 100644 index 00000000..945e7ca0 Binary files /dev/null and b/source/images/tutorials/introducing_logic_nodes/ln-fps-add_game_property.png differ diff --git a/source/images/tutorials/introducing_logic_nodes/ln-fps-annotations.png b/source/images/tutorials/introducing_logic_nodes/ln-fps-annotations.png new file mode 100644 index 00000000..db4c9187 Binary files /dev/null and b/source/images/tutorials/introducing_logic_nodes/ln-fps-annotations.png differ diff --git a/source/images/tutorials/introducing_logic_nodes/ln-fps-gun_action.png b/source/images/tutorials/introducing_logic_nodes/ln-fps-gun_action.png new file mode 100644 index 00000000..a6862d0e Binary files /dev/null and b/source/images/tutorials/introducing_logic_nodes/ln-fps-gun_action.png differ diff --git a/source/images/tutorials/introducing_logic_nodes/ln-fps-mouse_moves_head.png b/source/images/tutorials/introducing_logic_nodes/ln-fps-mouse_moves_head.png new file mode 100644 index 00000000..4b93b698 Binary files /dev/null and b/source/images/tutorials/introducing_logic_nodes/ln-fps-mouse_moves_head.png differ diff --git a/source/images/tutorials/introducing_logic_nodes/ln-fps-player_hierarchy.png b/source/images/tutorials/introducing_logic_nodes/ln-fps-player_hierarchy.png new file mode 100644 index 00000000..c2eefc56 Binary files /dev/null and b/source/images/tutorials/introducing_logic_nodes/ln-fps-player_hierarchy.png differ diff --git a/source/images/tutorials/introducing_logic_nodes/ln-fps-quick_favorites.png b/source/images/tutorials/introducing_logic_nodes/ln-fps-quick_favorites.png new file mode 100644 index 00000000..5c75b444 Binary files /dev/null and b/source/images/tutorials/introducing_logic_nodes/ln-fps-quick_favorites.png differ diff --git a/source/images/tutorials/introducing_logic_nodes/ln-fps-setup_so_far.png b/source/images/tutorials/introducing_logic_nodes/ln-fps-setup_so_far.png new file mode 100644 index 00000000..8f691867 Binary files /dev/null and b/source/images/tutorials/introducing_logic_nodes/ln-fps-setup_so_far.png differ diff --git a/source/images/tutorials/introducing_logic_nodes/ln-fps-shoot_nodes.png b/source/images/tutorials/introducing_logic_nodes/ln-fps-shoot_nodes.png new file mode 100644 index 00000000..d8e9c600 Binary files /dev/null and b/source/images/tutorials/introducing_logic_nodes/ln-fps-shoot_nodes.png differ diff --git a/source/images/tutorials/introducing_logic_nodes/ln-fps-shot_sound.png b/source/images/tutorials/introducing_logic_nodes/ln-fps-shot_sound.png new file mode 100644 index 00000000..c095c242 Binary files /dev/null and b/source/images/tutorials/introducing_logic_nodes/ln-fps-shot_sound.png differ diff --git a/source/images/tutorials/introducing_logic_nodes/ln-fps-speed_property-apply_tree.png b/source/images/tutorials/introducing_logic_nodes/ln-fps-speed_property-apply_tree.png new file mode 100644 index 00000000..2ac21196 Binary files /dev/null and b/source/images/tutorials/introducing_logic_nodes/ln-fps-speed_property-apply_tree.png differ diff --git a/source/images/tutorials/introducing_logic_nodes/ln-fps-value_switch.png b/source/images/tutorials/introducing_logic_nodes/ln-fps-value_switch.png new file mode 100644 index 00000000..cf142d0c Binary files /dev/null and b/source/images/tutorials/introducing_logic_nodes/ln-fps-value_switch.png differ diff --git a/source/images/Tutorials/Introducing_Python/tutorials-introducing-python-01.png b/source/images/tutorials/introducing_python_scripting/introducing_python_1.png similarity index 100% rename from source/images/Tutorials/Introducing_Python/tutorials-introducing-python-01.png rename to source/images/tutorials/introducing_python_scripting/introducing_python_1.png diff --git a/source/images/Tutorials/Introducing_Python/tutorials-introducing-python-02.png b/source/images/tutorials/introducing_python_scripting/introducing_python_2.png similarity index 100% rename from source/images/Tutorials/Introducing_Python/tutorials-introducing-python-02.png rename to source/images/tutorials/introducing_python_scripting/introducing_python_2.png diff --git a/source/index.rst b/source/index.rst index f7e928fc..b550c702 100644 --- a/source/index.rst +++ b/source/index.rst @@ -2,9 +2,9 @@ sphinx-quickstart on Sun Jul 8 18:28:15 2018. You can adapt this file completely to your liking, but it should at least contain the root `toctree` directive. -============ +============================== UPBGE Manual -============ +============================== Welcome to UPBGE's documentation! Here you will find definitions of the available tools and features in UPBGE, step-by-step tutorials to certain tasks and a lot of examples for game logic programming with detailed information. @@ -12,10 +12,11 @@ Visit the `UPBGE's website `__ or `contribute `__. -.. tip:: **Site navigation** +.. tip:: + Site Navigation Keyboard navigation is supported - use arrow keys :kbd:`left/right` for previous/next page, and :kbd:`up/down` to scroll the page up/down. - Press :kbd:`Alt-left/right` to go back/forward by browser history. To focus the *Search* field, press :kbd:`/` (slash) key, :kbd:`Tab` to unfocus, :kbd:`Enter` to search. + Press :kbd:`Alt-left/right` to go back/forward by browser history. To focus the *Search* field, press :kbd:`/` (slash) key, :kbd:`Enter` to search, :kbd:`Tab` to unfocus. .. note:: See :ref:`contribute-about` for a cheatsheet of most common abbreviations used in this manual. @@ -27,13 +28,13 @@ Also, if you want to read the whole manual offline you can download it from `thi manual/introduction/index manual/tutorials/index manual/editors/index - manual/logic/index + manual/logic_bricks/index manual/logic_nodes/index - manual/python/index + manual/python_scripting/index manual/python_components/index manual/physics/index manual/datablocks/index - manual/release/index + manual/deployment/index manual/tools/index manual/glossary/index diff --git a/source/manual/contribute/about.rst b/source/manual/contribute/about.rst index ed644184..ea4d4b40 100644 --- a/source/manual/contribute/about.rst +++ b/source/manual/contribute/about.rst @@ -14,6 +14,8 @@ Conventions .. note:: These conventions are for people reading the manual. We have a more detailed list of conventions for authors under the :doc:`Writing Style ` section. +.. _about-keyboard: + Keyboard -------- @@ -30,6 +32,8 @@ Hotkey letters are shown in this manual like they appear on a keyboard; for exam Other keys are referred to by their names, such as :kbd:`Esc`, :kbd:`Tab`, :kbd:`F1` to :kbd:`F12`. Of special note are the arrow keys, :kbd:`Left`, :kbd:`Right` and so on. +.. _about-mouse: + Mouse ----- diff --git a/source/manual/datablocks/action.rst b/source/manual/datablocks/action.rst deleted file mode 100644 index 738f7c86..00000000 --- a/source/manual/datablocks/action.rst +++ /dev/null @@ -1,10 +0,0 @@ -.. _datablock-action: - -.. _datablock-shapekey: - -====== -Action -====== - -TODO - diff --git a/source/manual/datablocks/armature.rst b/source/manual/datablocks/armature.rst deleted file mode 100644 index 68203c6b..00000000 --- a/source/manual/datablocks/armature.rst +++ /dev/null @@ -1,11 +0,0 @@ -.. _datablock-armature: - -======== -Armature -======== - -.. seealso:: - See the Python reference of this object in :class:`KX_GameObject` or :class:`BL_ArmatureObject`. - -TODO - diff --git a/source/manual/datablocks/camera.rst b/source/manual/datablocks/camera.rst deleted file mode 100644 index f5599088..00000000 --- a/source/manual/datablocks/camera.rst +++ /dev/null @@ -1,11 +0,0 @@ -.. _datablock-camera: - -====== -Camera -====== - -.. seealso:: - See the Python reference of this object in :class:`KX_GameObject` or :class:`KX_CameraObject`. - -TODO - diff --git a/source/manual/datablocks/collection.rst b/source/manual/datablocks/collection.rst deleted file mode 100644 index 960082d4..00000000 --- a/source/manual/datablocks/collection.rst +++ /dev/null @@ -1,7 +0,0 @@ -.. _datablock-collection: - -========== -Collection -========== - -TODO diff --git a/source/manual/datablocks/empty.rst b/source/manual/datablocks/empty.rst deleted file mode 100644 index e0df3f98..00000000 --- a/source/manual/datablocks/empty.rst +++ /dev/null @@ -1,12 +0,0 @@ -.. _datablock-empty: - -.. _datablock-collection_instance: - -===== -Empty -===== - -.. seealso:: - See the Python reference of this object in :class:`KX_GameObject`. - -TODO diff --git a/source/manual/datablocks/image.rst b/source/manual/datablocks/image.rst deleted file mode 100644 index 7df888fb..00000000 --- a/source/manual/datablocks/image.rst +++ /dev/null @@ -1,7 +0,0 @@ -.. _datablock-image: - -===== -Image -===== - -TODO diff --git a/source/manual/datablocks/index.rst b/source/manual/datablocks/index.rst index 319a4d23..99e8a0ee 100644 --- a/source/manual/datablocks/index.rst +++ b/source/manual/datablocks/index.rst @@ -1,36 +1,230 @@ -.. _datablock-index: - -========== -Datablocks -========== - -.. toctree:: - :maxdepth: 1 - :caption: Object-Related Datablocks - - armature.rst - camera.rst - collection.rst - empty.rst - light.rst - mesh.rst - object.rst - text.rst - -.. toctree:: - :maxdepth: 1 - :caption: File-Related Datablocks - - image.rst - library.rst - sound.rst - -.. toctree:: - :maxdepth: 1 - :caption: Other Datablocks - - action.rst - material.rst - scene.rst - texture.rst - world.rst +.. _dbl-data_blocks-index: + +============================== +Data-Blocks +============================== + +This page is based on Blender Manual `Data-blocks `__. Please see the link for additional details. + +---- + +The base unit for any Blender project is the data-block. Examples of data-blocks include *mesh*, *object*, *material*, *texture*, *node tree*, *scene*, *text*, *brush*, and even *workspaces*. + +.. figure:: /images/datablocks/dbl-outliner-blender_file_mode.png + :figwidth: 35% + :align: right + + Blender File mode in Outliner + +A data-block is a generic abstraction of very different kinds of data, which features a common set of basic features, properties and behaviors. + +Some common characteristics: + +- They are the primary contents of the blend-file. +- They can reference each other, for reuse and instancing (child/parent, object/object-data, materials/images, in modifiers or constraints too ...). +- Their names are unique within a blend-file, for a given type. +- They can be added/removed/edited/duplicated. +- They can be linked between files (only enabled for a limited set of data-blocks). +- They can have their own animation data. +- They can have custom properties. + +User will typically interact with the higher level data types (objects, meshes etc.). When doing more complex projects, managing data-blocks becomes more important, especially when inter-linking blend-files. The main editor for that is the :ref:`gs-outliner_editor`. + +.. figure:: /images/datablocks/dbl-types-icons.png + :figwidth: 35% + :align: right + + Data-block types with their icons + +Not all data in Blender is a data-block; i.e. bones, sequence strips or vertex groups are not - they belong to armature, scene and mesh types respectively. + +.. _dbl-data_block_types: + +Data-Block Types +++++++++++++++++++++++++++++++ + +For reference, here is a table of data-block types stored in blend-files. + +Link + Library Linking, supports being linked into other blend-files. +Pack + File Packing, supports file contents being packed into the blend-file (**not** applicable for most data-blocks which have no file reference). + +.. container:: lead + + .. clear + +.. |tick| unicode:: U+2713 +.. |cross| unicode:: U+2717 +.. |none| unicode:: U+2014 + +A table-representation of data-blocks supported in UPBGE. + +.. tip:: + :kbd:`Shift-scroll` over the table if text is cut/hidden. + +Object-related Datablocks +------------------------------ + +.. list-table:: + :header-rows: 1 + :class: valign + :widths: 18 4 4 40 + + * - Type + - Link + - Pack + - Description + * - Armature + - |tick| + - |none| + - Skeleton used to deform meshes; used as data of armature objects, and by the Armature Modifier + * - Camera + - |tick| + - |none| + - Used as data by camera objects + * - Collection + - |tick| + - |none| + - Group and organize objects in scenes; used to instance objects, and in library linking + * - Empty + - |none| + - |none| + - + * - Light + - |tick| + - |none| + - Used as object data by light objects + * - Mesh + - |tick| + - |none| + - Geometry made of vertices/edges/faces; used as data of mesh objects + * - Object + - |tick| + - |none| + - An entity in the scene with location, scale, rotation; used by scenes & collections + * - Text + - |tick| + - |cross| + - Text data; used by Python scripts and OSL shaders + +File-related Datablocks +------------------------------ + +.. list-table:: + :header-rows: 1 + :class: valign + :widths: 18 4 4 40 + + * - Type + - Link + - Pack + - Description + * - Image + - |tick| + - |tick| + - Image files; used by shader nodes and textures + * - Library + - |cross| + - |tick| + - References to an external blend-file; access from the Outliner's *Blender File* view + * - Sounds + - |tick| + - |tick| + - Reference to sound files; used as data of speaker objects + +Other Datablocks +------------------------------ + +.. list-table:: + :header-rows: 1 + :class: valign + :widths: 18 4 4 40 + + * - Type + - Link + - Pack + - Description + * - Action + - |tick| + - |none| + - Stores animation F-Curves; used as data-block animation data, and the Nonlinear Animation editor + * - Material + - |tick| + - |none| + - Set shading and texturing render properties; used by objects, meshes & curves + * - Scene + - |tick| + - |none| + - Primary store of all data displayed and animated; used as top-level storage for objects & animation + * - Texture + - |tick| + - |none| + - 2D/3D textures; used by brushes and modifiers + * - World + - |tick| + - |none| + - Define global render environment settings + +.. _dbl-life_time: + +Life Time +++++++++++++++++++++++++++++++ + +Every data-block has its usage counted (reference count) - when there is more than one, you can see the number of current users of a data-block to the right of its name in the interface. Blender follows the general rule that unused data is eventually removed. + +Since it is common to add and remove a lot of data while working, this has the advantage of not having to manually manage every single data-block. This works by skipping zero user data-blocks when writing blend-files. + +.. figure:: /images/datablocks/dbl-zero_fake_user.png + :figwidth: 50% + :align: right + + Protected (blue shield) data-block + +.. _dbl-protected: + +Protected +------------------------------ + +Since zero user data-blocks are not saved, there are times when you want to force the data to be kept irrespective of its users. + +If you are building a blend-file to serve as a library of assets that you intend to link to and from other files, you will need to make sure that they do not accidentally get deleted from the library file. + +To protect a data-block, use the button with the shield icon next to its name. The data-block will then never be silently deleted by Blender, but you can still manually remove it if needed. + +Sharing +++++++++++++++++++++++++++++++ + +Data-blocks can be shared among other data-blocks. + +Examples where sharing data is common: + +- Sharing textures among materials. +- Sharing meshes between objects (instances). +- Sharing animated actions between objects, for example to make all the lights dim together. + +You can also share data-blocks between files. + +.. _dbl-making_single_user: + +Making Single User +++++++++++++++++++++++++++++++ + +When a data-block is shared between several users, you can make a copy of it for a given user. To do so, click on the user count button to the right of its name (number ``43`` in above image). This will duplicate that data-block and assign the newly created copy to that usage only. + +.. note:: + Objects have a set of more advanced actions to become single-user. + +Removing Data-Blocks +++++++++++++++++++++++++++++++ + +As covered in `Life Time`_, data-blocks are typically removed when they are no longer used. They can also be manually *unlinked* or *deleted*. + +Unlinking a data-block means that its user won't use it anymore. This can be achieved by clicking on the :menuselection:`X` icon next to a data-block's name (see above image). If you unlink a data-block from all of its users, it will eventually be deleted by Blender as described above (unless it is a protected one). + +Deleting a data-block directly erases it from the blend-file, automatically unlinking it from all of its users. This can be achieved by :kbd:`Shift-LMB` on the :menuselection:`X` icon next to its name. + +.. warning:: + Deleting some data-blocks can lead to deletion of some of its users, which would become invalid without them. The main example is that object-data deletion (like mesh, curve, camera ...) will also delete all objects using it. + +Those two operations are also available in the context menu when :kbd:`RMB`-clicking on a data-block in the *Outliner*. diff --git a/source/manual/datablocks/lamp.rst b/source/manual/datablocks/lamp.rst deleted file mode 100644 index 3df4aa02..00000000 --- a/source/manual/datablocks/lamp.rst +++ /dev/null @@ -1,7 +0,0 @@ -.. _datablock-lamp: - -==== -Lamp -==== - -todo diff --git a/source/manual/datablocks/library.rst b/source/manual/datablocks/library.rst deleted file mode 100644 index 33783ce1..00000000 --- a/source/manual/datablocks/library.rst +++ /dev/null @@ -1,7 +0,0 @@ -.. _datablock-library: - -======= -Library -======= - -TODO diff --git a/source/manual/datablocks/light.rst b/source/manual/datablocks/light.rst deleted file mode 100644 index a6ca1d51..00000000 --- a/source/manual/datablocks/light.rst +++ /dev/null @@ -1,11 +0,0 @@ -.. _datablock-light: - -===== -Light -===== - -.. seealso:: - See the Python reference of this object in :class:`KX_GameObject` or :class:`KX_LightObject`. - -TODO - diff --git a/source/manual/datablocks/material.rst b/source/manual/datablocks/material.rst deleted file mode 100644 index da69d82e..00000000 --- a/source/manual/datablocks/material.rst +++ /dev/null @@ -1,7 +0,0 @@ -.. _datablock-material: - -======== -Material -======== - -TODO diff --git a/source/manual/datablocks/mesh.rst b/source/manual/datablocks/mesh.rst deleted file mode 100644 index 923fc170..00000000 --- a/source/manual/datablocks/mesh.rst +++ /dev/null @@ -1,15 +0,0 @@ -.. _datablock-mesh: - -==== -Mesh -==== - -.. seealso:: - See the Python reference of this object in :class:`KX_GameObject` or :class:`KX_NavMeshObject`. - -.. figure:: /images/objects-mesh-add_menu.png - - Default Mesh primitives in Add menu. - -Mesh objects, along with Text objects, are the only ones which can be seen at runtime. Its -uses are many, from visual meshes, invisible physics meshes, etc. \ No newline at end of file diff --git a/source/manual/datablocks/object.rst b/source/manual/datablocks/object.rst deleted file mode 100644 index 25cfcd1a..00000000 --- a/source/manual/datablocks/object.rst +++ /dev/null @@ -1,64 +0,0 @@ -.. _datablock-object: - -====== -Object -====== - -.. seealso:: - See the Python reference of common objects in :class:`KX_GameObject`. - -.. figure:: /images/objects-index-supported_types_highlighted.png - - Supported object types in Add menu. - -UPBGE supports several object types from Blender, as listed below. The unsupported object -types (like Curve, Metaball, Lattice, etc) can be present at Blender scene, but will be -removed automatically at game start, so they should not be taken in account in game -development process. - -.. note:: - Definitions present in this section are related to object's behavior at game runtime. - For definitions about object editing inside Blender editor, refer to - :doc:`/manual/editors/properties/index`. - -Each object type will be explained at its respective page, but all of them have common -attributes and features which will be explained in this page. Those attributes and -features are: - -Ability to contain logic and game properties - This means that logic and property changing is not bound to specific object types: any - object can run logic. This should be used with caution, as scattering logic and - properties across multiple objects can turn any project into a mess. - -Ability to have a physics type - This means that any object can react to physics, even if this object can't be visible - at runtime (as any object other than Mesh objects). However, only Mesh objects can - benefit from certain collision bounds, like Triangle Mesh and Convex Hull. - -World and local transformation values - Even non-visible objects fit a point in scene space. These transformation values are - stored in object in a form of world and local transforms (like position, scale and - orientation). Note that local transforms are relative to object's parent (or world - center, if it lacks a parent). - -Ability to have animations playing on it - Although Mesh and Armature objects benefits more from this feature (with Shape Keys - and Armature actions, respectively), any object can be animated at runtime, from - transformations to some specific object attributes. - -General object values - These general values varies from object color, slow parent's time offset, etc. - -Those attributes and features are present in every object type, with no exception. Other -attributes depends on specific object types, like Lamps or Cameras. - -.. toctree:: - :maxdepth: 1 - :caption: Object Types - - mesh - text - armature - empty - camera - lamp diff --git a/source/manual/datablocks/scene.rst b/source/manual/datablocks/scene.rst deleted file mode 100644 index 4034e838..00000000 --- a/source/manual/datablocks/scene.rst +++ /dev/null @@ -1,7 +0,0 @@ -.. _datablock-scene: - -===== -Scene -===== - -TODO diff --git a/source/manual/datablocks/sound.rst b/source/manual/datablocks/sound.rst deleted file mode 100644 index b21b0c56..00000000 --- a/source/manual/datablocks/sound.rst +++ /dev/null @@ -1,7 +0,0 @@ -.. _datablock-sound: - -===== -Sound -===== - -TODO diff --git a/source/manual/datablocks/text.rst b/source/manual/datablocks/text.rst deleted file mode 100644 index 1b99cdbb..00000000 --- a/source/manual/datablocks/text.rst +++ /dev/null @@ -1,11 +0,0 @@ -.. _datablock-text: - -==== -Text -==== - -.. seealso:: - See the Python reference of this object in :class:`KX_GameObject` or :class:`KX_FontObject`. - -TODO - diff --git a/source/manual/datablocks/texture.rst b/source/manual/datablocks/texture.rst deleted file mode 100644 index a84ff26f..00000000 --- a/source/manual/datablocks/texture.rst +++ /dev/null @@ -1,7 +0,0 @@ -.. _datablock-texture: - -======= -Texture -======= - -TODO diff --git a/source/manual/datablocks/world.rst b/source/manual/datablocks/world.rst deleted file mode 100644 index 5fc187cf..00000000 --- a/source/manual/datablocks/world.rst +++ /dev/null @@ -1,7 +0,0 @@ -.. _datablock-world: - -===== -World -===== - -TODO diff --git a/source/manual/deployment/blender_player.rst b/source/manual/deployment/blender_player.rst new file mode 100644 index 00000000..43b96b5b --- /dev/null +++ b/source/manual/deployment/blender_player.rst @@ -0,0 +1,34 @@ +.. _deploy-standalone_player: + +============================== +Standalone Player +============================== + +The standalone player allows a Blender game to be run without having to load the Blender system. This allows games to be distributed to other users, without requiring them a detailed knowledge of Blender (and also without the possibility of unauthorized modification). Note that the Game Engine *Save as Runtime* is an add-on facility which must be pre-loaded before use. + +The following procedure will give a standalone version of a working game. + +#. :menuselection:`Edit > Preferences > Add-ons > Game Engine > Save As Game Engine Runtime` + enable the checkbox. (You can also *Save User Settings*, in which case the add-on will always be present whenever Blender is re-loaded). +#. :menuselection:`File --> Export --> Save As Game Engine Runtime` + (give appropriate directory/filename) confirm with *Save as Game Engine Runtime*. + +The game can then be executed by running the appropriate ``.exe`` file. Note that all appropriate libraries are automatically loaded by the add-on. + +If you are interested in licensing your game, read `Licensing `__ for a discussion of the issues involved. + +.. tip:: Exporting... + If the game is to be exported to other computers, make a new empty directory for the game runtime and all its ancillary libraries, etc. Then make sure the **whole** directory is transferred to the target computer. + +Personalize The Game Icon +++++++++++++++++++++++++++++++ + +This is option is available for Windows only. You can personalize the icon using the option shown in the figure below. + +.. figure:: /images/deployment/deploy-personalize_icon.png + + Personalize game icon + +Here is a small video tutorial showing all the process, from .ico creation to its use in an example game: + +.. youtube:: 6r2749ldNC4 diff --git a/source/manual/release/index.rst b/source/manual/deployment/index.rst similarity index 100% rename from source/manual/release/index.rst rename to source/manual/deployment/index.rst diff --git a/source/manual/deployment/licensing.rst b/source/manual/deployment/licensing.rst new file mode 100644 index 00000000..b56c51eb --- /dev/null +++ b/source/manual/deployment/licensing.rst @@ -0,0 +1,23 @@ +.. _deploy-licensing_of_games: + +============================== +Licensing of Games +============================== + +Blender and the UPBGE/BGE are licensed as GNU GPL, which means that your games (if they include Blender software) have to comply with that license as well. This only applies to the software, or the bundle if it has software in it, not to the artwork you make with Blender. All your Blender creations are your sole property. + +GNU GPL -- also called "Free Software" -- is a license that aims at keeping the licensed software free, forever. GNU GPL does not allow you to add new restrictions or limitations on the software you received under that license. That works fine if you want your clients or your audience to have the same rights as you have (with Blender). + +In summary, the software and source code are bound to the GNU GPL, but the blend-files (models, textures, sounds) are not. + +Standalone Games +++++++++++++++++++++++++++++++ + +In case you save out your game as a single standalone (using addons for this purpose, for example), the blend-file gets included in the binary (the Blender Player). That requires the blend-file to be compatible with the GNU GPL license. + +In this case, you could decide to load and run another blend-file game (using the Game Actuator logic brick). That file then is not part of the binary, so you can apply any license you wish on it. + +More Information +++++++++++++++++++++++++++++++ + +More information you can find in the `blender.org FAQ `__. diff --git a/source/manual/deployment/performance.rst b/source/manual/deployment/performance.rst new file mode 100644 index 00000000..7cc75c36 --- /dev/null +++ b/source/manual/deployment/performance.rst @@ -0,0 +1,18 @@ +.. _deploy-performance_considerations: + +============================== +Performance Considerations +============================== + +When developing games, game engineers, software and hardware developers uses some tools to fine-tune their games to specific platforms and operating systems, defining a basic usage scenario whereas the users would have the best possible experience with the game. + +Most of these tools, are software tools available for the specific Game Engines whereas the games were being developed and will run. + +Blender Game Engine also comes with some visual tools to fine-tune the games being developed, so the game developers could test the best usage scenario and minimum software and hardware requirements to run the game. + +In Blender, those tools are available at the *System* and *Display* panel of *Render* tab in the *Properties editor*. There are options for specific performance adjusts and measurements, ways to control the frame rate or the way the contents are rendered in Blender window (game viewport) while the game runs, as well as controls for maintaining geometry allocated in graphic cards memory. + +Blender Game Engine rendering system controls: + :ref:`System ` -- controls for Scene rendering while the game is running. +Blender Game Engine Performance measurements: + :ref:`Display ` -- controls for showing specific data about performance while the game is running. diff --git a/source/manual/deployment/release_procedure.rst b/source/manual/deployment/release_procedure.rst new file mode 100644 index 00000000..8ed4a313 --- /dev/null +++ b/source/manual/deployment/release_procedure.rst @@ -0,0 +1,7 @@ +.. _deploy-release_procedure: + +============================== +Deployment Procedure +============================== + +TODO diff --git a/source/manual/editors/index.rst b/source/manual/editors/index.rst index 637a55fb..c71229c9 100644 --- a/source/manual/editors/index.rst +++ b/source/manual/editors/index.rst @@ -1,13 +1,14 @@ .. _editors-index: -+++++++ +============================== Editors -+++++++ +============================== .. toctree:: :maxdepth: 2 properties/index - logic/index + logic_bricks/index + logic_nodes/index text/index diff --git a/source/manual/editors/logic/index.rst b/source/manual/editors/logic/index.rst deleted file mode 100644 index 64b8fec2..00000000 --- a/source/manual/editors/logic/index.rst +++ /dev/null @@ -1,87 +0,0 @@ -.. _bpy.types.SpaceLogicEditor: - -******************* -Logic Bricks Editor -******************* - -The Logic Bricks Editor provides the main method of setting up and editing the game logic for the various actors (i.e. objects) that make up the game. The logic for the objects which are currently selected in the associated 3D View are displayed as logic bricks, which are shown as a table with three columns, showing sensors, controllers, and actuators, respectively. The links joining the logic bricks conduct the pulses between sensor-controller and controller-actuator. - -To give you a better understanding of the Logic Bricks Editor, the image below shows a typical editor content in which the major components have been labeled. We will look at each one individually. - -.. figure:: /images/Editors/editors-logic_editor-logic_editor.png - - The different parts of the Logic Editor. - - 1) Property Region, 2) Object Name, 3a) Links, 3b) Link socket, - 4) Sensor column, 5) Controller Column, 6) Actuator Column, 7) Python Components Region. - -========= -Main View -========= - -Object Name - This toggle shows the name of the object which owns the logic bricks below. -Links - Links (3A) indicate the direction of logical flow between objects. - Link lines are drawn by :kbd:`LMB` dragging from one Link socket (3B) to another. - Links can be drawn from Sensors to Controllers, or from Controllers to Actuators. - If you try to link directly a Sensor with an Actuator a new Controller will appear - between both. Actuators cannot be linked back to Sensors - (however, special actuator and sensor types are available to provide these connections). - - Sending nodes (the chain link found on the right-hand side of Sensors and Controllers) - can send to multiple Reception nodes - (the chain link found on the left-hand side of Controllers and Actuators). - Reception nodes can likewise receive multiple links. - - Links can be created between logic bricks belonging to different objects. - To delete a link between two nodes, :kbd:`CTRL-RMB` drag between the two nodes. - -------------- -Sensor Column -------------- - -This column contains a list of all sensors owned by the active object (and any other selected objects). -New sensors for the active object are created using the "Add Sensor" button. -For a more in-depth look at the content, layout and available operations in this area, -see :doc:`Sensors `. - ------------------ -Controller Column ------------------ - -This column contains a list of all controllers owned by the active object (and any other selected objects). -New controllers for the active object are created using the "Add Controller" button, -together with the creation of states for the active object. -For a more in-depth look at the content, layout, and available operations in this area, -see :doc:`Controllers `. - ---------------- -Actuator Column ---------------- - -This column contains a list of all actuators owned by the active object (and any other selected objects). -New actuators for the active object are created using the "Add Actuator" button. -For a more in-depth look at the content, layout, and available operations in this area, -see :doc:`Actuators `. - -=============== -Property Region -=============== - -Game properties are like variables in other programming languages. -They are used to save and access data associated with an object. -Several types of properties are available. -Properties are declared by clicking the *Add Game Property* button in this region. -For a more in-depth look at the content, -layout and available operations in this region, see :doc:`Properties `. - - -======================== -Python Components Region -======================== - -This region is where the *Python Components* are placed. *Python Components* are an independently -logic system from Logic Bricks system. They are modules that can be attached to game objects. -For a more in-depth look at the content, -layout and available operations in this region, see :doc:`Python Components `. diff --git a/source/manual/editors/logic_bricks/index.rst b/source/manual/editors/logic_bricks/index.rst new file mode 100644 index 00000000..34836fdf --- /dev/null +++ b/source/manual/editors/logic_bricks/index.rst @@ -0,0 +1,53 @@ +.. _bpy.types.SpaceLogicEditor: + +============================== +Logic Bricks Editor +============================== + +The Logic Bricks Editor provides the main method of setting up and editing the game logic for the various actors (i.e. objects) that make up the game. The logic for the objects which are currently selected in the associated 3D View are displayed as logic bricks, which are shown as a table with three columns, showing sensors, controllers, and actuators, respectively. The links joining the logic bricks conduct the pulses between sensor-controller and controller-actuator. + +To give you a better understanding of the Logic Bricks Editor, the image below shows a typical editor content in which the major components have been labeled. We will look at each one individually. + +.. figure:: /images/editors/editors-logic_editor-logic_editor.png + + The different parts of the Logic Editor + +1) Property Region | 2) Object Name | 3a) Links | 3b) Link socket | 4) Sensor column | 5) Controller Column | 6) Actuator Column | 7) Python Components Region. + +Main View +++++++++++++++++++++++++++++++ + +Object Name + This toggle shows the name of the object which owns the logic bricks below. + +Links + Links (3A) indicate the direction of logical flow between objects. Link lines are drawn by :kbd:`LMB` dragging from one Link socket (3B) to another. Links can be drawn from Sensors to Controllers, or from Controllers to Actuators. If you try to link directly a Sensor with an Actuator a new Controller will appear between both. Actuators cannot be linked back to Sensors (however, special actuator and sensor types are available to provide these connections). + + Sending nodes (the chain link found on the right-hand side of Sensors and Controllers) can send to multiple Reception nodes (the chain link found on the left-hand side of Controllers and Actuators). Reception nodes can likewise receive multiple links. + + Links can be created between logic bricks belonging to different objects. To delete a link between two nodes, :kbd:`CTRL-RMB` drag between the two nodes. + +Sensor Column +------------- + +This column contains a list of all sensors owned by the active object (and any other selected objects). New sensors for the active object are created using the "Add Sensor" button. For a more in-depth look at the content, layout and available operations in this area, see :doc:`Sensors `. + +Controller Column +----------------- + +This column contains a list of all controllers owned by the active object (and any other selected objects). New controllers for the active object are created using the "Add Controller" button, together with the creation of states for the active object. For a more in-depth look at the content, layout, and available operations in this area, see :doc:`Controllers `. + +Actuator Column +--------------- + +This column contains a list of all actuators owned by the active object (and any other selected objects). New actuators for the active object are created using the "Add Actuator" button. For a more in-depth look at the content, layout, and available operations in this area, see :doc:`Actuators `. + +Property Region +++++++++++++++++++++++++++++++ + +Game properties are like variables in other programming languages. They are used to save and access data associated with an object. Several types of properties are available. Properties are declared by clicking the *Add Game Property* button in this region. For a more in-depth look at the content, layout and available operations in this region, see :doc:`Properties `. + +Python Components Region +++++++++++++++++++++++++++++++ + +This region is where the *Python Components* are placed. *Python Components* are an independently logic system from Logic Bricks system. They are modules that can be attached to game objects. For a more in-depth look at the content, layout and available operations in this region, see :doc:`Python Components `. diff --git a/source/manual/tutorials/introducing_logic_nodes/a_first_example.rst b/source/manual/editors/logic_nodes/a_first_example.rst similarity index 56% rename from source/manual/tutorials/introducing_logic_nodes/a_first_example.rst rename to source/manual/editors/logic_nodes/a_first_example.rst index b6fe5435..ae94f655 100644 --- a/source/manual/tutorials/introducing_logic_nodes/a_first_example.rst +++ b/source/manual/editors/logic_nodes/a_first_example.rst @@ -1,81 +1,92 @@ -.. _ln-a_first_example: +.. _lne-first_example: ============================== A First Example ============================== -We will print some text to the console when a keyboard key is pressed. This is the "Hello World" example for the Logic Nodes. - -System Console -++++++++++++++++++++++++++++++ - -UPBGE uses system console/terminal to print info and error messages. To see those messages: - -Windows users: - -* :menuselection:`Window --> Toggle System Console` menu. - -Linux and Mac users: - -* start UPBGE via console/terminal - navigate to blender executable file, and run:: - ``./blender`` - -.. figure:: /images/Tutorials/introducing_logic_nodes/00_terminal_run.png - :figwidth: 100% - - Run UPBGE on Linux or Mac terminal - Activating the Logic Nodes Add-on +++++++++++++++++++++++++++++++++ -The *Logic Nodes* add-on comes preinstalled in UPBGE 0.3+. If not already, it needs to be activated: +The *Logic Nodes* add-on comes pre-installed in UPB eGE 0.3+. If not already, it needs to be activated: * :menuselection:`Edit -> Preferences -> Add-ons` -.. figure:: /images/Tutorials/introducing_logic_nodes/01_edit_menu_prefs.png +.. figure:: /images/editors/logic_nodes/01_edit_menu_prefs.png :figwidth: 100% + :align: center Navigate to Preferences -There, in *search/filter* field, filter for ``logic``, and check the box for *Logic Nodes+*. +There, *search/filter* for ``logic``, and check the box for *Logic Nodes+*. -.. figure:: /images/Tutorials/introducing_logic_nodes/02_prefs_filter_logic.png +.. figure:: /images/editors/logic_nodes/02_prefs_filter_logic.png :figwidth: 100% + :align: center Search for 'logic' and check the box Click the little arrow, next to the check box, to expand the *Logic Nodes+* add-on menu, and in the :menuselection:`Preferences` click :menuselection:`Install or Update Uplogic Module` button. -.. figure:: /images/Tutorials/introducing_logic_nodes/03_prefs_addons_ln_unfold.png +.. figure:: /images/editors/logic_nodes/03_prefs_addons_ln_unfold.png :figwidth: 90% + :align: center Install or Update Uplogic Module .. important:: - - This same :menuselection:`Preferences` menu can be used to report a bug - click on :menuselection:`Report a Bug` button (internet connection is required). The default web browser will open ``github.com`` web page. There, click :menuselection:`New issue` button, and follow the instructions. + This same :menuselection:`Preferences` menu can be used to report a bug > click :menuselection:`Report a Bug` button (internet connection is required). The default web browser will open ``github.com`` web page. There, click :menuselection:`New issue` button, and follow the instructions. Houston, the eagle has landed. We're good to go. +.. _lne-system_console: + +System Console +++++++++++++++++++++++++++++++ + +UPBGE uses system console/terminal to print info and error messages. To see those messages: + +Windows users: + +* :menuselection:`Window --> Toggle System Console` menu. + +Linux and Mac users: + +* start UPBGE via console/terminal - navigate to blender executable file, and run:: + ``./blender`` + +.. figure:: /images/editors/logic_nodes/00_terminal_run.png + :figwidth: 100% + :align: center + + Run UPBGE on Linux or Mac terminal +.. _lntut-first_example: + +We will print some text to the console when a keyboard key is pressed. This is the "Hello World" example for the Logic Nodes. + +.. _lntut-creating_new_logic_tree: + Creating a New Logic Tree ++++++++++++++++++++++++++++++ Now let's get started. First we need to create a logic tree. Switch the *Editor Type* to the :menuselection:`Logic Node Editor`. -.. figure:: /images/Tutorials/introducing_logic_nodes/04_editor.png +.. figure:: /images/editors/logic_nodes/04_editor.png :figwidth: 50% + :align: center Select Logic Node Editor This editor is similar to the *Shader Editor* or *Geometry Node Editor*. Click on :menuselection:`New` and a new empty tree (named *Logic Node Editor* by default) will be created. -.. figure:: /images/Tutorials/introducing_logic_nodes/05_new_ln_tree.png +.. figure:: /images/editors/logic_nodes/05_new_ln_tree.png :figwidth: 100% + :align: center Click New button -.. figure:: /images/Tutorials/introducing_logic_nodes/06_n_panel_dashboard.png +.. figure:: /images/editors/logic_nodes/06_n_panel_dashboard.png :figwidth: 100% + :align: center New empty Node Tree with side Dashboard @@ -84,34 +95,36 @@ Adding Nodes With mouse cursor inside *Logic Node Editor*, press :kbd:`Shift-A`, or click :menuselection:`Add` button in top header. This will pop-up a menu with all available *Logic Nodes*, organized in sub-menus. Go ahead and take a look at what is available. -.. figure:: /images/Tutorials/introducing_logic_nodes/07_add_key_node.png +.. figure:: /images/editors/logic_nodes/07_add_key_node.png :figwidth: 100% + :align: center Available Logic Nodes in Add menu -For this example, we're looking for two nodes: the ``Key`` and the ``Print`` node. If you can't find them: +For this example, we're looking for two nodes: :ref:`ln-keyboard_key` and :ref:`ln-print` node. Easiest way to add nodes: -* press :kbd:`Shift-A` hotkey, to add a node; +* press :kbd:`Shift-A` hotkey, to invoke adding a node; * **immediately** after that start typing, i.e. ``print`` - UPBGE is smart and will search for it; * if accidentally wrong node is selected, press :kbd:`ESC` to cancel, and repeat. -.. figure:: /images/Tutorials/introducing_logic_nodes/08_search_print_node.png +.. figure:: /images/editors/logic_nodes/08_search_print_node.png :figwidth: 100% + :align: center Editor searches for node .. tip:: - Beside finding the node, *Search* pop-up also shows in which *menu/sub-menu* the nodes are. -The ``Key`` node is a node of the **condition** type. These nodes do not actually do anything in-game; they either provide a condition, or can be used to check for a more complex set of conditions. +:ln:`Keyboard Key` node is a node of the **condition** type. These nodes do not actually do anything in-game; they either provide a condition, or can be used to check for a more complex set of conditions. -The ``Print`` node is an **action** type node. These nodes actually do something. They move objects, change properties, add constraints etc. - you name it. +:ln:`Print` node is an **action** type node. These nodes actually do something. They move objects, change properties, add constraints etc. - you name it. -Those two nodes need to be connected together. The ``Key`` node has an *If Pressed* output socket, colored red. Connect it (click-and-drag) to the *Condition* input socket of the ``Print`` node and enter "Hello World" in the text box at the bottom, next to *Value* input socket (blue sockets are for *strings*). Also, if not already, look at the ``Key`` node and you'll see that it expects user to choose a key. Click the bottom field and press :kbd:`SPACE` key, which will set that key as selected one. It should look something like this now: +Those two nodes need to be connected together. The :ln:`Keyboard Key` node has an *If Pressed* output socket, colored red. Connect it (click-and-drag) to the *Condition* input socket of the :ln:`Print` node and enter "Hello World" in the text box at the bottom, next to *Value* input socket (blue sockets are for *strings*). Also, if not already, look at the :ln:`Keyboard Key` node and you'll see that it expects user to choose a key. Click the bottom field and press :kbd:`SPACE` key, which will set that key as selected one. It should look something like this now: -.. figure:: /images/Tutorials/introducing_logic_nodes/09_nodes_connected.png +.. figure:: /images/editors/logic_nodes/09_nodes_connected.png :figwidth: 100% + :align: center Logic Nodes added and connected @@ -127,19 +140,20 @@ Example: if this tree is attached to 4 objects and user presses :kbd:`SPACE` key To apply a tree to a cube, first a cube is added; select it and press :menuselection:`Apply To Selected` button, in the *Dashboard* tab of side *N-panel*. Press :kbd:`N` to toggle *N-panel*, if it is hidden. -.. figure:: /images/Tutorials/introducing_logic_nodes/10_apply_to_selected.png +.. figure:: /images/editors/logic_nodes/10_apply_to_selected.png :figwidth: 100% + :align: center Apply logic tree to selected object .. warning:: - Be careful, trees can be applied to multiple objects at once! To see which objects have been applied with a *Logic Node* tree, scroll down the *Dashboard* tab, and check the *Tree applied to:* sub-panel at the bottom. -.. figure:: /images/Tutorials/introducing_logic_nodes/11_tree_applied_to.png +.. figure:: /images/editors/logic_nodes/11_tree_applied_to.png :figwidth: 100% + :align: center Objects with applied Logic Node tree @@ -148,36 +162,38 @@ If needed, sub-panels can be rearranged: * for easier rearranging, first collapse sub-panels - click small arrow next to the sub-panel title; * click-and-drag top-right icon (4 by 2 dots) of sub-panel. -.. figure:: /images/Tutorials/introducing_logic_nodes/12_rearange_n_sub_panel.png +.. figure:: /images/editors/logic_nodes/12_rearange_n_sub_panel.png :figwidth: 100% + :align: center Collapsed and rearranged N-panel sub-panels What is left now is to run our example \'game\': * in *Render* panel of a *Properties* editor, click :menuselection:`Embedded Start` or :menuselection:`Standalone Start` (hotkey is :kbd:`P`) - the \'game\' shall start; -* with \'game\' running, press :kbd:`SPACE` (or whichever keyboard key is assigned in ``Key`` node) once; +* with \'game\' running, press :kbd:`SPACE` (or whichever keyboard key is assigned in :ln:`Keyboard Key` node) once; -.. figure:: /images/Tutorials/introducing_logic_nodes/13_embedded_start.png +.. figure:: /images/editors/logic_nodes/13_embedded_start.png :figwidth: 100% + :align: center Start the game in Render panel Finally check the system console - it should have our message printed: -* once if logic tree was applied to one object; -* twice if logic tree was applied to two objects; -* four times if logic tree was applied to two objects, and :kbd:`SPACE` was pressed twice etc. +- once if logic tree was applied to one object; +- twice if logic tree was applied to two objects; +- four times if logic tree was applied to two objects, and :kbd:`SPACE` was pressed twice etc. -.. figure:: /images/Tutorials/introducing_logic_nodes/14_terminal_output.png +.. figure:: /images/editors/logic_nodes/14_terminal_output.png :figwidth: 100% + :align: center System console/terminal output .. note:: - - See top of this page for `System Console`_ info. + See :ref:`lne-system_console` for more info. - The ``Print`` node prints to the system console only, not to the Python interactive console. This is a feature of Blender and is not changable. + The :ln:`Print` node prints to the system console only, not to the Python interactive console. This is a feature of Blender and is not changeable. Press :kbd:`ESC` key to end the \'game\'. diff --git a/source/manual/editors/logic_nodes/editor_details.rst b/source/manual/editors/logic_nodes/editor_details.rst new file mode 100644 index 00000000..d8dd58fc --- /dev/null +++ b/source/manual/editors/logic_nodes/editor_details.rst @@ -0,0 +1,113 @@ +.. |socket-multi| image:: /images/editors/logic_nodes/lne-socket-multi.png + +.. |socket-bool| image:: /images/editors/logic_nodes/lne-socket-bool.png + +.. |socket-dict| image:: /images/editors/logic_nodes/lne-socket-dict.png + +.. |socket-float| image:: /images/editors/logic_nodes/lne-socket-float.png + +.. |socket-integer| image:: /images/editors/logic_nodes/lne-socket-integer.png + +.. |socket-list| image:: /images/editors/logic_nodes/lne-socket-list.png + +.. |socket-material| image:: /images/editors/logic_nodes/lne-socket-material.png + +.. |socket-object| image:: /images/editors/logic_nodes/lne-socket-object.png + +.. |socket-sound| image:: /images/editors/logic_nodes/lne-socket-sound.png + +.. |socket-string| image:: /images/editors/logic_nodes/lne-socket-string.png + +.. |socket-vector| image:: /images/editors/logic_nodes/lne-socket-vector.png + +.. |socket-file| image:: /images/editors/logic_nodes/lne-socket-file.png + +.. |socket-geometry| image:: /images/editors/logic_nodes/lne-socket-geometry.png + +.. _lne-additional_details: + +============================== +Additional Details +============================== + +N-panel Tabs +++++++++++++++++++++++++++++++ + +After new *logic tree* is added, :kbd:`N`-panel includes: + +- ``Group`` - add a group socket or a panel; + +- ``Node`` - set node name in ``Label`` field, change color, and see Properties; + +- ``Tool`` - active tool for i.e. selection; + +- ``View`` - manage :ref:`Annotations `; + +- ``Dashboard`` - main access point to Logic Node Editor functionality - apply logic tree to node, use a tree template, see properties; + +- ``Custom Nodes`` - add user created custom nodes; + +- ``Help & Documentation`` - update ``Uplogic`` module, access UPBGE manual and API. + +RMB Context +++++++++++++++++++++++++++++++ + +With mouse inside Logic Node Editor, :kbd:`RMB` context has two versions: + +1. No node selected - add, paste, find node, cut and mute links; for a fast workflow, use the hotkeys. + +.. figure:: /images/editors/logic_nodes/15-rmb_no_selection.png + :figwidth: 40% + :align: center + + RMB context with no node selected + +2. Node selected - copy, paste etc. Use the hotkeys, if you dare. + +.. figure:: /images/editors/logic_nodes/16-rmb_node_selected.png + :figwidth: 65% + :align: center + + RMB context with node selected + +Put some *Logic Nodes* into the editor (any will do for testing), connect them, and: + +- :kbd:`LMB-select` them > :kbd:`Shift-J` to put them all into a frame; keep ``Frame`` selected > ``Node`` tab > add text into ``Label`` field > :kbd:`Enter`. + +- :kbd:`Ctrl-RMB-drag` over a noodle (aka *link*) to delete it/cut the link. + +- Also useful for learning/testing/debugging are :kbd:`M` > mute nodes, and for final packed design :kbd:`Ctrl-H` > hide unused sockets, or even :kbd:`H` > collapse the nodes. + +Test other hotkeys as per figures above. + +Socket Type by Colors +++++++++++++++++++++++++++++++ + +.. hlist:: + :columns: 3 + + - |socket-multi| - :socket:`multi` + + - |socket-bool| - :socket:`bool` + + - |socket-dict| - :socket:`dict` + + - |socket-float| - :socket:`float` + + - |socket-integer| - :socket:`integer` + + - |socket-list| - :socket:`list` + + - |socket-material| - :socket:`material` + + - |socket-object| - :socket:`object` + + - |socket-sound| - :socket:`sound` + + - |socket-string| - :socket:`string` + + - |socket-vector| - :socket:`vector` + + - |socket-file| - :socket:`file` + + - |socket-geometry| - :socket:`geometry` diff --git a/source/manual/editors/logic_nodes/index.rst b/source/manual/editors/logic_nodes/index.rst new file mode 100644 index 00000000..53b4817b --- /dev/null +++ b/source/manual/editors/logic_nodes/index.rst @@ -0,0 +1,12 @@ +.. _logic_node_editor-index: + +============================== +Logic Node Editor +============================== + +.. toctree:: + :maxdepth: 1 + + introduction + a_first_example + editor_details diff --git a/source/manual/editors/logic_nodes/introduction.rst b/source/manual/editors/logic_nodes/introduction.rst new file mode 100644 index 00000000..f7a8c124 --- /dev/null +++ b/source/manual/editors/logic_nodes/introduction.rst @@ -0,0 +1,72 @@ +.. _lne-introduction: + +============================== +Introduction +============================== + +Logic Node Add-On +++++++++++++++++++++++++++++++ + +Logic Node add-on adds a large variety of logic nodes to the UPBGE game engine, enabling easy visual game development, just like in the Unreal Engine or Armory3D. + +Why use logic nodes when there's logic bricks +--------------------------------------------- + +Basically, there's two ways to get logic into your game. + +- Logic bricks, and +- Python scripts. + +Using nodes is effectively scripting in python, only visually. They have the advantage of being a lot more versatile than logic bricks. Nodes can be placed freely, trees can be nested and eventually, the code contained by each node will be accessible. + +Things to consider +------------------------------ + +Logic bricks are fastest + + This is because they are using Blenders native C++ API, which makes them simply creepy fast. Second fastest is custom :py:`python code`, and logic nodes are the slowest. + +Only execute code when needed + + You always want to avoid the :ln:`On Update` node, which basically executes every frame. Only use this when necessary, otherwise try to get some kind of ``condition``. Logic trees can also be linked to every ``sensor`` the logic bricks can offer, make good use of that. + +The main loop +------------------------------ + +Main loop is most basic calculation the engine has to go through effectively 60 times a second, keep that in mind. In that loop, every sensor logic brick on every object is checked for its status (whether it is active or not), which is incredibly fast. + +If any sensor is active, the linked controller will be executed. A controller can be either a logic gate, in which case it fires up the linked actuators, or it can be python controller, in which case the referenced python code is evaluated. + +This is where you need to be *careful* what you do. You don't want to run *a lot of unnecessary code* each frame, so put in breaking conditions as often as you can to avoid overhead in the main loop. + +How does it work +------------------------------ + +Under the hood, each logic node includes some lines of python code. That code is executed when the condition for the node is met. If a node has no condition, it is executed each time the sensor logic brick connected to it is active. + +When pressing :menuselection:``Apply To Selected`` (or :menuselection:``Force Compile``) in the logic node tree editor, a .py file is generated. The file defines a reference class for each node in a particular order so that every node is executed only when all values needed for it are computed. + +Then, whenever the connected sensor is active, the :py:``evaluate()`` function for each node is called. This is where the magic happens. This function collects all the input values from its sockets before waltzing though the lines of code that make something happen in-game. + +.. seealso:: + For general *nodes* overview see Blender's `nodes chapter `__. + +Basic Node Types +++++++++++++++++++++++++++++++ + +There are 3 basic logic node types: + +Condition Nodes +------------------------------ + +These nodes are either conditions themselves (like ``sensors``) or they can act as logic gates. + +Parameter Nodes +------------------------------ + +Most parameter nodes do not need a condition to perform. They are pre-defined calculations or data fetchers. + +Action Nodes +------------------------------ + +These are the nodes that manipulate, generate or remove something in the game. From moving objects to writing save files, these nodes perform a certain action. diff --git a/source/manual/editors/properties/constraints.rst b/source/manual/editors/properties/constraints.rst index 742bdb90..2c177bd1 100644 --- a/source/manual/editors/properties/constraints.rst +++ b/source/manual/editors/properties/constraints.rst @@ -1,92 +1,68 @@ -*********** +============================== Constraints -*********** +============================== -The **Constraints** tab in **Properties** editor exposes constraints setups for current -object. +The **Constraints** tab in **Properties** editor exposes constraints setups for current object. -Currently in UPBGE only the *Rigid Body Joint* constraint can be set through the user -interface. +Currently in UPBGE only the *Rigid Body Joint* constraint can be set through the user interface. -=========================== Rigid Body Joint Constraint -=========================== +++++++++++++++++++++++++++++++ -The *Rigid Body Joint* constraint is very special, it is used by the physics part of -UPBGE to simulate a joint between its owner and its target. It offers four joint types: -hinge type, ball-and-socket type, cone-twist type, and generic six-\ :abbr:`DoF (Degrees -of Freedom)` type. +The *Rigid Body Joint* constraint is very special, it is used by the physics part of UPBGE to simulate a joint between its owner and its target. It offers four joint types: hinge type, ball-and-socket type, cone-twist type, and generic six-\ :abbr:`DoF (Degrees of Freedom)` type. -The joint point and axes are defined and fixed relative to the owner. The target moves as -if it were stuck to the center point of a stick, the other end of the stick rotating -around the joint/pivot point. +The joint point and axes are defined and fixed relative to the owner. The target moves as if it were stuck to the center point of a stick, the other end of the stick rotating around the joint/pivot point. .. note:: - - In order for this constraint to work properly, both objects - (so the owner and the target object) need to have *Collision Bounds* enabled. - + In order for this constraint to work properly, both objects (so the owner and the target object) need to have *Collision Bounds* enabled. Options -======= +++++++++++++++++++++++++++++++ -.. figure:: /images/editors-properties-constraints-rigid_body_joint.png +.. figure:: /images/editors/editors-properties-constraints-rigid_body_joint.png - Rigid Body Joint panel. + Rigid Body Joint panel Target - Object used to select the constraints target, and is not functional (red state) when - it has none. + Object used to select the constraints target, and is not functional (red state) when it has none. Pivot Type Ball - Works like an ideal ball-and-socket joint, i.e. allows rotations around all axes - like a shoulder joint. + Works like an ideal ball-and-socket joint, i.e. allows rotations around all axes like a shoulder joint. Hinge - Works in one plane, like an elbow: the owner and target can only rotate around the - X axis of the pivot (joint point). + Works in one plane, like an elbow: the owner and target can only rotate around the X axis of the pivot (joint point). Limits - .. figure:: /images/editors-properties-constraints-rigid_body_joint-hinge.png + .. figure:: /images/editors/editors-properties-constraints-rigid_body_joint-hinge.png - Angular limits for the X axis. + Angular limits for the X axis Cone Twist - Similar to *Ball*, this is a point-to-point joint with limits added for the cone - and twist axis. + Similar to *Ball*, this is a point-to-point joint with limits added for the cone and twist axis. Limits - .. figure:: /images/editors-properties-constraints-rigid_body_joint-cone_twist.png + .. figure:: /images/editors/editors-properties-constraints-rigid_body_joint-cone_twist.png - Angular limits. + Angular limits Generic 6DOF - Works like the *Ball* option, but the target is no longer constrained at a fixed - distance from the pivot point, by default (hence the six degrees of freedom: - rotation and translation around/along the three axes). In fact, there is no longer - a joint by default, with this option, but it enables additional settings which - allow you to restrict some of these DoF: + Works like the *Ball* option, but the target is no longer constrained at a fixed distance from the pivot point, by default (hence the six degrees of freedom: rotation and translation around/along the three axes). In fact, there is no longer a joint by default, with this option, but it enables additional settings which allow you to restrict some of these DoF: Limits - .. figure:: /images/editors-properties-constraints-rigid_body_joint-generic_6_dof.png + .. figure:: /images/editors/editors-properties-constraints-rigid_body_joint-generic_6_dof.png - Linear and angular limits for a given axis (of the pivot) in Blender Units and - degrees respectively. + Linear and angular limits for a given axis (of the pivot) in Blender Units and degrees respectively. .. note:: - The 6DOF constraint has a limitation due to it uses euler angles instead of quaternions. Basically, the rotation of Y-axis can be +/-90 degrees only, - if you exceed that maximum the constrain will go haywire. A good solution to avoid issues is to modify your model in a way that the free rotation doesn't match - with the Y local axis of your object. + The 6DOF constraint has a limitation due to it uses euler angles instead of quaternions. Basically, the rotation of Y-axis can be +/-90 degrees only, if you exceed that maximum the constrain will go haywire. A good solution to avoid issues is to modify your model in a way that the free rotation doesn't match with the Y local axis of your object. Child Object - Normally, leave this blank. You can reset it to blank by right-clicking and selecting - Reset to Default Value. + Normally, leave this blank. You can reset it to blank by right-clicking and selecting Reset to Default Value. Linked Collision - When enabled, this will disable the collision detection between the owner and the - target (in the physical engine of the BGE). + When enabled, this will disable the collision detection between the owner and the target (in the physical engine of the BGE). Display Pivot When enabled, this will draw the pivot of the joint in the 3D Views. The most useful, diff --git a/source/manual/editors/properties/index.rst b/source/manual/editors/properties/index.rst index 6917b825..2b39a95e 100644 --- a/source/manual/editors/properties/index.rst +++ b/source/manual/editors/properties/index.rst @@ -1,29 +1,32 @@ -################# +============================== Properties Editor -################# +============================== -.. figure:: /images/editors-properties-tabs.png - :figwidth: 100% +.. figure:: /images/editors/edt-properties_editor_tabs.png + :figwidth: 35% + :align: right - Properties editor header + Properties Editor tabs -The properties editor is an essential part of the development process. There, you can change almost all properties of the selected object, scene, camera, etc, like: +The Properties Editor is an essential part of the development process. There, you can change almost all properties of the selected object, scene, camera, etc, like: -- The screen resolution; -- Frames per second; -- Background color; -- Name and position of selected object; -- Constraints and modifiers; -- Materials and textures properties; -- Physics properties of selected object; -- Much more. +- The screen resolution; +- Frames per second; +- Background color; +- Name and position of selected object; +- Constraints and modifiers; +- Materials and textures properties; +- Physics properties of selected object; +- Much more. In this section you have a detailed description about each tab of the Properties editor. -.. important:: The **Render layers** and **Particles** tabs don't apply to UPBGE, so they won't be explained here. +.. important:: + The **Render layers** and **Particles** tabs don't apply to UPBGE, so they won't be explained here. -.. note:: This section will explain properties belonging to UPBGE only (Blender Game renderer) or, at most, relevant properties for game development. For other Blender properties, see the `official Blender manual `__. +.. note:: + This section will explain properties belonging to UPBGE only (Blender Game renderer) or, at most, relevant properties for game development. For other Blender properties, see the `official Blender manual `__. .. toctree:: :maxdepth: 1 diff --git a/source/manual/editors/properties/materials.rst b/source/manual/editors/properties/materials.rst index a1515128..ded12a7b 100644 --- a/source/manual/editors/properties/materials.rst +++ b/source/manual/editors/properties/materials.rst @@ -1,24 +1,19 @@ -************** +============================== Materials -************** +============================== Game Settings -============= +++++++++++++++++++++++++++++++ -.. figure:: /images/editors-properties-materials-game_settings.png +.. figure:: /images/editors/editors-properties-materials-game_settings.png - Game Settings panel. + Game Settings panel -This panel contains properties that control how the object surfaces -that use the material are rendered in real-time by the Blender Game Engine. +This panel contains properties that control how the object surfaces that use the material are rendered in real-time by the Blender Game Engine. Backface Cull - Hide the back-faces of objects rendered with this material. - If "Off", both sides of the surface are visible (at the expense of lower rendering speed). - Note that this setting is applied per material and not per face; e.g. - if the material is applied to a cube, only the back and front faces of the cube are visible, - and not both sides of each face. + Hide the back-faces of objects rendered with this material. If "Off", both sides of the surface are visible (at the expense of lower rendering speed). Note that this setting is applied per material and not per face; e.g. if the material is applied to a cube, only the back and front faces of the cube are visible, and not both sides of each face. Invisible Hide all faces of objects rendered with this material. @@ -30,8 +25,7 @@ Alpha Blend Controls how the alpha channel is used to create a transparent texture in the rendered image. Alpha Sort - Orders the sequence in which transparent objects are drawn on top of each other, - so that ones in front receive more light than ones behind. + Orders the sequence in which transparent objects are drawn on top of each other, so that ones in front receive more light than ones behind. Alpha Blend Uses the alpha values present in the bitmap image sourced in the Image slot. Alpha Clip @@ -41,19 +35,16 @@ Alpha Blend Opaque (default) All alpha values are ignored; the scene is completely non-transparent. - Face Orientation -================ - -Provides options regarding the orientation (i.e. rotation transformation) -of faces to which the material is applied. - - Shadow - Faces are used for shadow. - Billboard - Billboard with Z-axis constraint. - Halo - Screen-aligned billboard. - Normal (default) - No transformation. - +++++++++++++++++++++++++++++++ + +Provides options regarding the orientation (i.e. rotation transformation) of faces to which the material is applied. + +Shadow + Faces are used for shadow. +Billboard + Billboard with Z-axis constraint. +Halo + Screen-aligned billboard. +Normal (default) + No transformation. diff --git a/source/manual/editors/properties/object.rst b/source/manual/editors/properties/object.rst index 9b0df7a8..1184e7b6 100644 --- a/source/manual/editors/properties/object.rst +++ b/source/manual/editors/properties/object.rst @@ -1,39 +1,29 @@ -******* +============================== Object -******* +============================== -.. figure:: /images/editors-properties-object.png +.. figure:: /images/editors/editors-properties-object.png - Object tab in Properties Editor. + Object tab in Properties Editor -The **Object** tab from :doc:`Properties Editor ` -exposes settings and properties related to the current object. These properties and -settings can be position, rotation, level of detail, group options and so on. For more -detailed info about this tab, see -`Object properties `__ -in Blender Manual. +The **Object** tab from :doc:`Properties Editor ` exposes settings and properties related to the current object. These properties and settings can be position, rotation, level of detail, group options and so on. For more detailed info about this tab, see `Object properties `__ in Blender Manual. .. _editors-properties-object-object_name: Name -==== +++++++++++++++++++++++++++++++ -.. figure:: /images/editors-properties-object-name.png +.. figure:: /images/editors/editors-properties-object-name.png - Object's name field in Object tab. + Object's name field in Object tab -The object's name will identify the object in most cases, specially in fields inside the -Blender editors. In UPBGE, if two identical objects are added in game (for example, with -an Add Object logic or instanced through a group), both objects will have the same name, -differently from Blender which appends a number in a repeating object, so be aware that -retrieving an object through its name may not work sometimes. -Prefer using **Game Properties**, instead. +The object's name will identify the object in most cases, specially in fields inside the Blender editors. In UPBGE, if two identical objects are added in game (for example, with an Add Object logic or instanced through a group), both objects will have the same name, differently from Blender which appends a number in a repeating object, so be aware that retrieving an object through its name may not work sometimes. Prefer using **Game Properties**, instead. .. _editors-properties-object-culling_bounding_volume: Culling Bounding Volume -======================= +++++++++++++++++++++++++++++++ Predefined Bound Predefined mesh bounding volume used when Auto Update Bound is disabled. @@ -41,11 +31,9 @@ Predefined Bound .. _editors-properties-object-activity_culling: Activity Culling -================ +++++++++++++++++++++++++++++++ -UPBGE's **Activity Culling** feature allows to disable object's physics and logic based -on the distance to the nearest camera. This allows better performance by not processing -objects which are too far away. +UPBGE's **Activity Culling** feature allows to disable object's physics and logic based on the distance to the nearest camera. This allows better performance by not processing objects which are too far away. Physics Suspend physics of this object by its distance to nearest camera. @@ -62,17 +50,13 @@ Logic .. _editors-properties-object-lod: Levels of Detail -================ +++++++++++++++++++++++++++++++ -.. figure:: /images/editors-properties-object-levels_of_detail.png +.. figure:: /images/editors/editors-properties-object-levels_of_detail.png -When creating visual assets it is often desirable to have a high amount of detail in the -asset for up close viewing. However, this high amount of detail is wasted if the object -is viewed from a distance, and brings down the scene's performance. To solve this, the -asset can be swapped out at certain viewing distances. This is commonly referred to as -a level of detail system. Each visual step of the asset is known as a level of detail. -Levels of detail are most appropriate to use when you have a large scene where certain -objects can be viewed both up close and from a distance. + LOD + +When creating visual assets it is often desirable to have a high amount of detail in the asset for up close viewing. However, this high amount of detail is wasted if the object is viewed from a distance, and brings down the scene's performance. To solve this, the asset can be swapped out at certain viewing distances. This is commonly referred to as a level of detail system. Each visual step of the asset is known as a level of detail. Levels of detail are most appropriate to use when you have a large scene where certain objects can be viewed both up close and from a distance. Distance Factor The factor applied to distance computed in LoD. @@ -83,52 +67,34 @@ Add Tools ----- -.. figure:: /images/editors-properties-object-levels_of_detail-tools.png +.. figure:: /images/editors/editors-properties-object-levels_of_detail-tools.png - Tools dropdown menu in Levels of Detail panel. - -Some tools for making levels of detail easier to manage and create can be found from -the select menu next to the add button in the Levels of Detail panel. + Tools dropdown menu in Levels of Detail panel +Some tools for making levels of detail easier to manage and create can be found from the select menu next to the add button in the Levels of Detail panel. Set By Name - Searches the scene for specifically named objects and attempts to set them up as - levels of detail on the currently selected object. The selected object must be the - base level of detail (e.g. LOD0). This can be useful to quickly setup levels of - detail on imported assets. In order to make use of this tool, your naming must be - consistent, and each level must be prefixed or suffixed with "lodx" where x is the - level that object is intended for. The case on "lod" must be consistent across all - objects. Below are some example names that the tool will recognize. - - - LOD0_Box, LOD1_Box, LOD2_Box - - Box.lod0, Box.lod1, Box.lod2 - - LoD0box, LoD1box, LoD2box + Searches the scene for specifically named objects and attempts to set them up as levels of detail on the currently selected object. The selected object must be the base level of detail (e.g. LOD0). This can be useful to quickly setup levels of detail on imported assets. In order to make use of this tool, your naming must be consistent, and each level must be prefixed or suffixed with "lodx" where x is the level that object is intended for. The case on "lod" must be consistent across all objects. Below are some example names that the tool will recognize. + + - LOD0_Box, LOD1_Box, LOD2_Box + - Box.lod0, Box.lod1, Box.lod2 + - LoD0box, LoD1box, LoD2box Generate - This tool generates and sets up levels of details based on the selected object. - Generation is done using the Decimate Modifier. Generation does not apply the - modifier to allow further changing the settings. Generated objects are automatically - named based on the level they are generated for. Below are some settings for the - operator. + This tool generates and sets up levels of details based on the selected object. Generation is done using the Decimate Modifier. Generation does not apply the modifier to allow further changing the settings. Generated objects are automatically named based on the level they are generated for. Below are some settings for the operator. - .. figure:: /images/editors-properties-object-levels_of_detail-generation.png + .. figure:: /images/editors/editors-properties-object-levels_of_detail-generation.png + + Generate LOD Count - The number of levels desired after generation. This operator creates Count-1 new - objects. + The number of levels desired after generation. This operator creates Count-1 new objects. Target Size - The ratio setting for the Decimate Modifier on the last level of detail. The ratio - settings for the other levels are determined by linear interpolation. + The ratio setting for the Decimate Modifier on the last level of detail. The ratio settings for the other levels are determined by linear interpolation. Package into Group - With this setting enabled the operator performs some extra tasks to make the asset - ready for easy linking into a new file. The base object and all of its levels of - detail are placed into a group based on the base object's name. Levels other than - the base are hidden for both the viewport and rendering. This simplifies the - appearance of the system and does not affect the appearance of the base object. - Finally, all levels are parented to the base object to remove clutter from the - Outliner. + With this setting enabled the operator performs some extra tasks to make the asset ready for easy linking into a new file. The base object and all of its levels of detail are placed into a group based on the base object's name. Levels other than the base are hidden for both the viewport and rendering. This simplifies the appearance of the system and does not affect the appearance of the base object. Finally, all levels are parented to the base object to remove clutter from the Outliner. Clear All Clears the level of detail settings from the current object. @@ -136,14 +102,11 @@ Clear All Settings -------- -.. figure:: /images/editors-properties-object-levels_of_detail-settings.png +.. figure:: /images/editors/editors-properties-object-levels_of_detail-settings.png + + LOD Settings -Level of detail settings can be found in the Object settings when the renderer is set to -Blender Game. In the Levels of Detail panel is a button to add a new level of detail to -the current object. The settings for each level of detail are displayed in its own box. -The exception to this is the base level of detail. This is automatically setup as the -current object with a distance setting of 0. To remove a level of detail, click on the X -button in the top right corner of the box of the level to be removed. +Level of detail settings can be found in the Object settings when the renderer is set to Blender Game. In the Levels of Detail panel is a button to add a new level of detail to the current object. The settings for each level of detail are displayed in its own box. The exception to this is the base level of detail. This is automatically setup as the current object with a distance setting of 0. To remove a level of detail, click on the X button in the top right corner of the box of the level to be removed. Object The object to use for this level of detail. @@ -152,85 +115,61 @@ Distance The distance at which this level of detail becomes visible. Use Mesh - When this option is enabled, the mesh from the level of detail object is used until a - lower level of detail overrides it. + When this option is enabled, the mesh from the level of detail object is used until a lower level of detail overrides it. Use Material - When this option is enabled, the material from the level of detail object is used - until a lower level of detail overrides it. + When this option is enabled, the material from the level of detail object is used until a lower level of detail overrides it. .. _editors-properties-object-transforms: Transform and Delta Transform -============================= +++++++++++++++++++++++++++++++ -.. figure:: /images/editors-properties-object-transforms.png +.. figure:: /images/editors/editors-properties-object-transforms.png - Object's transform panels in Object tab. + Object's transform panels in Object tab -The **Transform** panel exposes the position, rotation and scale properties of the -object, and the **Delta Transform** panel increments additional transformation values -to **Transform** values. Note that these properties behave according to the -object's parent transform properties. However, this explanation is just a base to -understand how the transformation values work in UPBGE. More info about the **Transform** -panel can be found at -`Transform Properties `__. +The **Transform** panel exposes the position, rotation and scale properties of the object, and the **Delta Transform** panel increments additional transformation values to **Transform** values. Note that these properties behave according to the object's parent transform properties. However, this explanation is just a base to understand how the transformation values work in UPBGE. More info about the **Transform** panel can be found at `Transform Properties `__. -In UPBGE there are two types of transformation values for the object: the *World* and -the *Local* properties. The *World* values are the transformation values relative to the -center of the world, and the *Local* values are the transformation values relative to the -object's parent object. For example: +In UPBGE there are two types of transformation values for the object: the *World* and the *Local* properties. The *World* values are the transformation values relative to the center of the world, and the *Local* values are the transformation values relative to the object's parent object. For example: -- An object with a *World Position* of ``(0, 0, 0)`` is literally at the center of the world. -- An object with a *Local Position* of ``(0, 0, 0)`` is at the same position of its parent, even if its parent is not at the center of the world. +- An object with a *World Position* of ``(0, 0, 0)`` is literally at the center of the world. +- An object with a *Local Position* of ``(0, 0, 0)`` is at the same position of its parent, even if its parent is not at the center of the world. -Be aware that, if the object doesn't have a parent, the *Local* values behave the same as -the *World* values. +Be aware that, if the object doesn't have a parent, the *Local* values behave the same as the *World* values. -Technically, with the given information, the **Transform** panel works the same as the -*Local* transform values, and the **Delta Transform** panel values are added to the -*World* values of the object at game start. +Technically, with the given information, the **Transform** panel works the same as the *Local* transform values, and the **Delta Transform** panel values are added to the *World* values of the object at game start. .. _editors-properties-object-relations: Relations -========= +++++++++++++++++++++++++++++++ + +.. figure:: /images/editors/editors-properties-object-relations.png -.. figure:: /images/editors-properties-object-relations.png + Relations -Exposes values of relations of current object to other objects, scene, etc. For detailed -info about object relations, see -`Object Relations `__. +Exposes values of relations of current object to other objects, scene, etc. For detailed info about object relations, see `Object Relations `__. Layers - The layers which the object is on the scene, multiple can be selected. The behavior is - similar to Blender's layers, as layers can keep the object hidden / shown or some - actions can be applied only to objects in a specific layer (as lamps and shadows). - Also, only objects in hidden layers can be added through logic. Detailed info about - layers can be found at - `Layers `__. + The layers which the object is on the scene, multiple can be selected. The behavior is similar to Blender's layers, as layers can keep the object hidden / shown or some actions can be applied only to objects in a specific layer (as lamps and shadows). Also, only objects in hidden layers can be added through logic. Detailed info about layers can be found at `Layers `__. Parent - The parent object of the current one. While the current object have a parent, its - transformation values will be inherited from the parent. A parent may have multiple - children, but the reverse is not true. The parenting behavior changes according to - the selected mode in dropdown menu. Detailed info about parenting can be found at - `Parenting Objects `__. + The parent object of the current one. While the current object have a parent, its transformation values will be inherited from the parent. A parent may have multiple children, but the reverse is not true. The parenting behavior changes according to the selected mode in dropdown menu. Detailed info about parenting can be found at `Parenting Objects `__. .. _editors-properties-object-relations_extras: Relations Extras -================ +++++++++++++++++++++++++++++++ -.. figure:: /images/editors-properties-object-relations_extras.png +.. figure:: /images/editors/editors-properties-object-relations_extras.png -Exposes some extra settings about object's relationship. Detailed info about relations -extras can be found at -`Relations Extras `__. + Relations Extra + +Exposes some extra settings about object's relationship. Detailed info about relations extras can be found at `Relations Extras `__. Slow Parent - Creates a delay in parent relationship. Useful to easily smooth movement for character - cameras, for example. + Creates a delay in parent relationship. Useful to easily smooth movement for character cameras, for example. Offset The ammount of delay in Slow Parent. @@ -238,43 +177,32 @@ Slow Parent .. _editors-properties-object-groups: Groups -====== +++++++++++++++++++++++++++++++ + +.. figure:: /images/editors/editors-properties-object-groups.png -.. figure:: /images/editors-properties-object-groups.png + Groups -Groups have multiple uses in Blender, but in UPBGE its main use is to allow creating -maintainable libraries for games through the use of -:ref:`dupli group instances `. -Once one or several objects are added to a group, instances of this group can be added to -the scene, and editing the original objects edits all the instances automatically in -Blender. Detailed info about groups can be found at -`Groups `__. +Groups have multiple uses in Blender, but in UPBGE its main use is to allow creating maintainable libraries for games through the use of :ref:`dupli group instances `. Once one or several objects are added to a group, instances of this group can be added to the scene, and editing the original objects edits all the instances automatically in Blender. Detailed info about groups can be found at `Groups `__. .. _editors-properties-object-display: Display -======= +++++++++++++++++++++++++++++++ + +.. figure:: /images/editors/editors-properties-object-display.png -.. figure:: /images/editors-properties-object-display.png + Display -These settings (except for *Object Color*) don't affect the current object in UPBGE, only -does in **3D Viewport**. The exception, *Object Color*, can be used in game as value in -material nodes, Python and material's *Object Color* option. Detailed info about the -**Display** panel can be found at -`Display `__. +These settings (except for *Object Color*) don't affect the current object in UPBGE, only does in **3D Viewport**. The exception, *Object Color*, can be used in game as value in material nodes, Python and material's *Object Color* option. Detailed info about the **Display** panel can be found at `Display `__. .. _editors-properties-object-duplication: Duplication -=========== +++++++++++++++++++++++++++++++ -.. figure:: /images/editors-properties-object-duplication.png - -Exposes several duplication modes, but the useful one in UPBGE is *Group*. When a group -is selected in the dropdown menu, a group is instanced in the current object. By default, -only empties are used in order to instance groups, but any kind of object can do it as -well. More about dupli group instances uses in UPBGE on -:ref:`Groups `. Detailed info about the -dupli group feature can be found at -`DupliGroup `__. +.. figure:: /images/editors/editors-properties-object-duplication.png + + Duplication +Exposes several duplication modes, but the useful one in UPBGE is *Group*. When a group is selected in the dropdown menu, a group is instanced in the current object. By default, only empties are used in order to instance groups, but any kind of object can do it as well. More about dupli group instances uses in UPBGE on :ref:`Groups `. Detailed info about the dupli group feature can be found at `DupliGroup `__. diff --git a/source/manual/editors/properties/physics.rst b/source/manual/editors/properties/physics.rst index 5a3026ee..75a04b92 100644 --- a/source/manual/editors/properties/physics.rst +++ b/source/manual/editors/properties/physics.rst @@ -1,17 +1,17 @@ .. _game-engine-physics: -******** +============================== Physics -******** +============================== -.. figure:: /images/editors-properties-physics-physics.png +.. figure:: /images/editors/editors-properties-physics-physics.png - Physics tab. + Physics tab .. _game-engine-physics-type: Physics -======= +++++++++++++++++++++++++++++++ Options in Physics panel change according to its selected Physics Type. See below: @@ -33,89 +33,61 @@ Options in Physics panel change according to its selected Physics Type. See belo .. _game-engine-physics-object-collision-bounds: Collision Bounds -================ +++++++++++++++++++++++++++++++ -.. figure:: /images/editors-properties-physics-collision_bounds.png +.. figure:: /images/editors/editors-properties-physics-collision_bounds.png - Collision Bounds panel in Physics tab. + Collision Bounds panel in Physics tab -The first thing you must understand is the idea of the 3D Bounding Box. -If you run through all the vertices of a mesh and record the lowest and highest x values, -you have found the *x min/max* the complete boundary for all x values within the mesh. -Do this again for y and z, then make a rectangular prism out of these values, and you have a *Bounding Box*. -This box could be oriented relative globally to the world or locally to the object's rotation. +The first thing you must understand is the idea of the 3D Bounding Box. If you run through all the vertices of a mesh and record the lowest and highest x values, you have found the *x min/max* the complete boundary for all x values within the mesh. Do this again for y and z, then make a rectangular prism out of these values, and you have a *Bounding Box*. This box could be oriented relative globally to the world or locally to the object's rotation. -.. figure:: /images/editors-properties-physics-rigid_body-bounding_box.png +.. figure:: /images/editors/editors-properties-physics-rigid_body-bounding_box.png - Demonstration of a Local Bounding Box (left) and a Global Bounding Box (right). + Local Bounding Box (left) and a Global Bounding Box (right) The *x extent*, then, is half of the distance between the x min/max. -Throughout all of this you must be cognizant of the Object Origin. For the Game engine, -the default :kbd:`Shift-Ctrl-Alt-C`, :kbd:`3` or :menuselection:`Set Origin --> Origin to Geometry` -is unlikely to get the desired placement of the Collision Bounds that you want. -Instead, you should generally set the origin by looking at the Tool Shelf after you do the *Set Origin*, -and changing the *Center* from *Median Center* to *Bounds Center*. -Blender will remember this change for future :kbd:`Shift-Ctrl-Alt-C` executions. +Throughout all of this you must be cognizant of the Object Origin. For the Game engine, the default :kbd:`Shift-Ctrl-Alt-C`, :kbd:`3` or :menuselection:`Set Origin --> Origin to Geometry` is unlikely to get the desired placement of the Collision Bounds that you want. Instead, you should generally set the origin by looking at the Tool Shelf after you do the *Set Origin*, and changing the *Center* from *Median Center* to *Bounds Center*. Blender will remember this change for future :kbd:`Shift-Ctrl-Alt-C` executions. All Collision Bounds are centered on this origin. All boxes are oriented locally, so object rotation matters. -.. figure:: /images/editors-properties-physics-rigid_body-origin_to_box_bounds.png +.. figure:: /images/editors/editors-properties-physics-rigid_body-origin_to_box_bounds.png - Setting the origin to Bounds Center instead of Median Center. + Setting the origin to Bounds Center instead of Median Center -A final introductory comment: When you set the Collision Bounds on an object, -Blender will attempt to display a visualization of the bounds in the form of a dotted outline. -Currently, there is a bug: *The 3D View* -does not display this bounds preview where it actually will be during the game. -To see it, go to :menuselection:`Game --> Show Physics Visualization` -and look for the white (or green, if sleeping) geometry. +A final introductory comment: When you set the Collision Bounds on an object, Blender will attempt to display a visualization of the bounds in the form of a dotted outline. Currently, there is a bug: *The 3D View* does not display this bounds preview where it actually will be during the game. To see it, go to :menuselection:`Game --> Show Physics Visualization` and look for the white (or green, if sleeping) geometry. Now we can explain the various options for the *Collision Bounds* settings: Default - For Dynamic and Static objects, it is a Triangle Mesh (see below). - For everything else, it is a Sphere (see below). + For Dynamic and Static objects, it is a Triangle Mesh (see below). For everything else, it is a Sphere (see below). Capsule - Which is a cylinder with hemispherical caps, like a pill. - Radius of the hemispheres is the greater of the X or Y extent. - Height is the Z bounds. + Which is a cylinder with hemispherical caps, like a pill. Radius of the hemispheres is the greater of the X or Y extent. Height is the Z bounds. Box The X, Y, Z bounding box, as defined above. Sphere - Radius is defined by the object's scale (visible in the N properties panel) times the physics radius - (can be found in :menuselection:`Physics --> Attributes --> Radius`). - Note: This is the only bounds that respects the Radius option. + Radius is defined by the object's scale (visible in the N properties panel) times the physics radius (can be found in :menuselection:`Physics --> Attributes --> Radius`). Note: This is the only bounds that respects the Radius option. Cylinder - Radius is the greater of the x or y extent. - Height is the z bounds. + Radius is the greater of the x or y extent. Height is the z bounds. Cone - Base radius is the greater of the x or y extent. - Height is the z bounds. + Base radius is the greater of the x or y extent. Height is the z bounds. Convex Hull Forms a shrink-wrapped, simplified geometry around the object. - .. figure:: /images/editors-properties-physics-rigid_body-convex_hull.png + .. figure:: /images/editors/editors-properties-physics-rigid_body-convex_hull.png :width: 200px - A convex hull sketch. + A convex hull sketch Triangle mesh - Most expensive, but most precise. Collision will happen with all of triangulated polygons, - instead of using a virtual mesh to approximate that collision. + Most expensive, but most precise. Collision will happen with all of triangulated polygons, instead of using a virtual mesh to approximate that collision. By Hand - This is not an option in the Physics tab's Collision Bounds settings, but a different approach, entirely. - You create a second mesh, which is invisible, to be the physics representation. - This becomes the parent for your display object. Then, - your display object is set to ghost so it does not fight with the parent object. - This method allows you to strike a balance between the accuracy of *Triangle Mesh* - with the efficiency of some of the others. See the demo of this in the dune buggy to the right. - - .. figure:: /images/editors-properties-physics-rigid_body-manual_hull.png - :width: 300px + This is not an option in the Physics tab's Collision Bounds settings, but a different approach, entirely. You create a second mesh, which is invisible, to be the physics representation. This becomes the parent for your display object. Then, your display object is set to ghost so it does not fight with the parent object. This method allows you to strike a balance between the accuracy of *Triangle Mesh* with the efficiency of some of the others. See the demo of this in the dune buggy to the right. - Another way to create Collision Bounds -- By hand. + .. figure:: /images/editors/editors-properties-physics-rigid_body-manual_hull.png + :width: 300px + Another way to create Collision Bounds - by hand Options ------- @@ -123,23 +95,14 @@ Options There are only two options in the Collision Bounds subpanel. Margin - "Add extra margin around object for collision detection, small amount required for stability." - If you find your objects are getting stuck in places they should not, try increasing this to, say, 0.06. - - Sometimes 0.06 is the default (such as on the Default Cube), but sometimes it is not. - You have to keep an eye on the setting, or else learn the symptoms so you can respond when it gives you trouble. - If you are lazy/paranoid/unsure/diligent/bored, - you can always run this on the Python Console to bump all 0.0 margins to 0.06: for - ``obj`` in ``bpy.data.objects``: ``obj.game.collision_margin = obj.game.collision_margin`` or 0.06 -Compound - "Add children to form compound collision object." Basically, - if you have a child object and do not have this enabled, - the child's collisions will not have an effect on that object "family" - (though it will still push other objects around). If you do have it checked, - the parent's physics will respond to the child's collision (thus updating the whole family). + "Add extra margin around object for collision detection, small amount required for stability." If you find your objects are getting stuck in places they should not, try increasing this to, say, 0.06. + Sometimes 0.06 is the default (such as on the Default Cube), but sometimes it is not. You have to keep an eye on the setting, or else learn the symptoms so you can respond when it gives you trouble. If you are lazy/paranoid/unsure/diligent/bored, you can always run this on the Python Console to bump all 0.0 margins to 0.06: for ``obj`` in ``bpy.data.objects``: ``obj.game.collision_margin = obj.game.collision_margin`` or 0.06 + +Compound + "Add children to form compound collision object." Basically, if you have a child object and do not have this enabled, the child's collisions will not have an effect on that object "family" (though it will still push other objects around). If you do have it checked, the parent's physics will respond to the child's collision (thus updating the whole family). Create Obstacle -=============== +++++++++++++++++++++++++++++++ Todo diff --git a/source/manual/editors/properties/physics_character.rst b/source/manual/editors/properties/physics_character.rst index 22503b3a..be9cbc2e 100644 --- a/source/manual/editors/properties/physics_character.rst +++ b/source/manual/editors/properties/physics_character.rst @@ -3,25 +3,24 @@ Character Physics ***************** -The character physics type is used for player-controlled characters, -for which the other physics types often result unexpected results -(bouncing off walls, sliding, etc.) and for which simple kinematics offer much more precision. - +The character physics type is used for player-controlled characters, for which the other physics types often result unexpected results (bouncing off walls, sliding, etc.) and for which simple kinematics offer much more precision. Properties ========== Step Height The maximum height of steps the character can run over. + Jump Force Upward velocity applied to character when jumping. + Fall Speed Max Maximum speed at which the character will fall. + Max Jumps Maximum number of jumps the character can make before it hits the ground. .. note:: - Obstacle traversal (e.g. step climbing) is governed by (in order of importance): - The velocity of the character object @@ -34,6 +33,5 @@ Max Jumps - The *Fall Speed Max* parameter - The *Step Height* parameter (more *Step Height* -> more fall speed) - Example ======= diff --git a/source/manual/editors/properties/physics_dynamic.rst b/source/manual/editors/properties/physics_dynamic.rst index c7b67212..fc61d0be 100644 --- a/source/manual/editors/properties/physics_dynamic.rst +++ b/source/manual/editors/properties/physics_dynamic.rst @@ -1,22 +1,18 @@ .. _game-engine-physics-dynamic: -*************** +============================== Dynamic Physics -*************** +============================== -*Dynamic* objects give or receive collisions, -but when they do so they themselves do not rotate in response. -So, a Dynamic ball will hit a ramp and slide down, while a rigid body ball would begin rotating. +*Dynamic* objects give or receive collisions, but when they do so they themselves do not rotate in response. So, a Dynamic ball will hit a ramp and slide down, while a rigid body ball would begin rotating. If you do not need the rotational response the Dynamic type can save the extra computation. -Note that these objects can still be rotated with :doc:`Logic Bricks ` or Python code. -Their physics meshes will update when you do these rotations -- so collisions will be based on the new orientations. +Note that these objects can still be rotated with :doc:`Logic Bricks ` or Python code. Their physics meshes will update when you do these rotations -- so collisions will be based on the new orientations. For more documentation, see the general :doc:`physics page <./physics>`. - Options -======= +++++++++++++++++++++++++++++++ See :doc:`./physics_rigid_body`. diff --git a/source/manual/editors/properties/physics_rigid_body.rst b/source/manual/editors/properties/physics_rigid_body.rst index b51c4dce..29c9c26b 100644 --- a/source/manual/editors/properties/physics_rigid_body.rst +++ b/source/manual/editors/properties/physics_rigid_body.rst @@ -1,67 +1,48 @@ .. _game-engine-physics-rigid-body: -****************** +============================== Rigid Body Physics -****************** +============================== -.. figure:: /images/editors-properties-physics-rigid_body.png +.. figure:: /images/editors/editors-properties-physics-rigid_body.png - Rigid Body collision type in Physics tab. + Rigid Body collision type in Physics tab -It will give/receive collisions and react with a change in its velocity and its rotation. -A rigid body ball would begin rotating and roll down (where a -:doc:`Dynamic <./physics_dynamic>` -ball would only hit and slide down the ramp). +It will give/receive collisions and react with a change in its velocity and its rotation. A rigid body ball would begin rotating and roll down (where a :doc:`Dynamic <./physics_dynamic>` ball would only hit and slide down the ramp). -The idea behind rigid body dynamics is that the mesh does not deform. If you need -deformation you will need to either go to -:doc:`Soft Body <./physics_soft_body>` -or else fake it with animated Actions. +The idea behind rigid body dynamics is that the mesh does not deform. If you need deformation you will need to either go to :doc:`Soft Body <./physics_soft_body>` or else fake it with animated Actions. For more documentation, see the general :doc:`physics page <./physics>`. Options -======= +++++++++++++++++++++++++++++++ Actor Enables detection by Near and Radar Sensors. Ghost - Disables collisions completely, similar to - :doc:`No collision <./physics_no_collision>`. + Disables collisions completely, similar to :doc:`No collision <./physics_no_collision>`. Invisible - Does not display, the same as setting the object to unrendered (such as unchecking the - camera icon in the Outliner). + Does not display, the same as setting the object to unrendered (such as unchecking the camera icon in the Outliner). Use Force Field - Materials can have physics settings on them as well: Friction, Elasticity, Force - Field (positive or negative force), and also Dampening to other materials. When you - turn on this checkbox, you are enabling the Material to exhibit this spring force. + Materials can have physics settings on them as well: Friction, Elasticity, Force Field (positive or negative force), and also Dampening to other materials. When you turn on this checkbox, you are enabling the Material to exhibit this spring force. Rotate From Normal Todo. No Sleeping - Prevents simulation meshes from sleeping. When an object has a linear velocity or - angular velocity, it is in motion. It will detect collisions, receive gravity, etc. - Once these thresholds are close to zero, it will cease these calculations -- until - another object interacts with it wake it up. + Prevents simulation meshes from sleeping. When an object has a linear velocity or angular velocity, it is in motion. It will detect collisions, receive gravity, etc. Once these thresholds are close to zero, it will cease these calculations -- until another object interacts with it wake it up. Attributes Mass - Affects the reaction due to collision between objects -- more massive objects have - more inertia. Will also affect material force fields. Will also change behaviors if - you are using the suspension and steering portions of Bullet physics. + Affects the reaction due to collision between objects -- more massive objects have more inertia. Will also affect material force fields. Will also change behaviors if you are using the suspension and steering portions of Bullet physics. .. _game-engine-physics-collision-bounds-radius: Radius - If you have the "Collision Bounds: Sphere" - set explicitly (or implicitly through having the Collision Bounds subpanel unchecked), - this will multiply with the Object's (unapplied) Scale. Note that none of the other - bounds types are affected. Also note that in the 3D View the display will show this - for all types, even though it is only actually used with Sphere. + If you have the "Collision Bounds: Sphere" set explicitly (or implicitly through having the Collision Bounds subpanel unchecked), this will multiply with the Object's (unapplied) Scale. Note that none of the other bounds types are affected. Also note that in the 3D View the display will show this for all types, even though it is only actually used with Sphere. .. list-table:: :header-rows: 1 @@ -71,25 +52,21 @@ Attributes - Unapplied Scale - Applied Scale - Collision Bounds - * - Rolls, radius of 1 BU - Rolls, radius of 1.5 BU (after "popping" upward) - Rolls, radius of 1.5 BU - Rolls, radius of 1 BU (!) - Default (which is Sphere) - * - Slides, extent of 1 BU - Slides, extent of 1 BU - Slides, extent of 1 BU - Slides, extent of 1 BU - Box - * - "" - "" - "" - "" - Convex Hull - * - Slides, extent of 1 BU (but with more friction than above) - Slides, extent of 1 BU (but with more friction than above) - Acts insane @@ -97,35 +74,21 @@ Attributes - Triangle Mesh Form Factor - For affecting the Inertia Tensor. The higher the value, the greater the rotational - inertia, and thus the more resistant to torque. You might think this is strange, - considering Dynamic types do not have torque in response to collisions -- but you can - still see this value's effects when you manually apply Torque. + For affecting the Inertia Tensor. The higher the value, the greater the rotational inertia, and thus the more resistant to torque. You might think this is strange, considering Dynamic types do not have torque in response to collisions -- but you can still see this value's effects when you manually apply Torque. Elasticity - The elasticity of collisions determines how much of the kinetic energy is retained - after the collision. A value of 1 will result in a collision where objects bounce off - each other, and the kinetic energy after the collision is the same as before. A value - of 0 will result in a collision where the objects stick together after the collision, - as all energy will have been converted to heat (or other energy forms that Blender - also does not model). - - In macroscopic nature (so bigger than atomic particles) an elasticity of 1 is never - seen, as at least some energy is converted to heat, sound, etc. An elastic - (elasticity=high) collision occurs when two metal balls collide. An inelastic - (elasticity=low) collision is seen when two half-inflated beach balls collide. + The elasticity of collisions determines how much of the kinetic energy is retained after the collision. A value of 1 will result in a collision where objects bounce off each other, and the kinetic energy after the collision is the same as before. A value of 0 will result in a collision where the objects stick together after the collision, as all energy will have been converted to heat (or other energy forms that Blender also does not model). + + In macroscopic nature (so bigger than atomic particles) an elasticity of 1 is never seen, as at least some energy is converted to heat, sound, etc. An elastic (elasticity=high) collision occurs when two metal balls collide. An inelastic (elasticity=low) collision is seen when two half-inflated beach balls collide. Anisotropic Friction - Isotropic friction is identical at all angles. Anisotropic is directionally-dependent. - Here you can vary the coefficients for the three axes individually, or disable - friction entirely. + Isotropic friction is identical at all angles. Anisotropic is directionally-dependent. Here you can vary the coefficients for the three axes individually, or disable friction entirely. Linear Velocity Limit the linear speed of an object. Minimum - The object is allowed to be at complete rest, but as soon as it accelerates it will - immediately jump to the minimum speed. + The object is allowed to be at complete rest, but as soon as it accelerates it will immediately jump to the minimum speed. Maximum Top speed of the object. @@ -134,12 +97,10 @@ Angular Velocity Limit the angular speed of an object. Minimum - Clamp angular velocity to this minimum speed (except when totally still), in angle - per second. + Clamp angular velocity to this minimum speed (except when totally still), in angle per second. Maximum - Clamp angular velocity to this maximum speed, in angle - per second. + Clamp angular velocity to this maximum speed, in angle per second. Damping Increase the "sluggishness" of the object. @@ -148,13 +109,10 @@ Damping Resist movement (0 - 1). At 1 the object is completely immobile. Rotation - Resist rotation, but not the kind of rotation that comes from a collision. For - example, if a Motion Controller applies Torque to an object, this damping will be - a factor. + Resist rotation, but not the kind of rotation that comes from a collision. For example, if a Motion Controller applies Torque to an object, this damping will be a factor. Lock Translation - Seize the object in the world along one or more axes. Note that this is global - coordinates, not local or otherwise. + Seize the object in the world along one or more axes. Note that this is global coordinates, not local or otherwise. Lock Rotation Same as translation, but for rotation (also with respect to the global coordinates). @@ -175,5 +133,4 @@ Force Field Damping of the spring force when inside the physics distance area. Align to Normal - Align dynamic game objects along the surface normal when inside the physics - distance area. + Align dynamic game objects along the surface normal when inside the physics distance area. diff --git a/source/manual/editors/properties/physics_soft_body.rst b/source/manual/editors/properties/physics_soft_body.rst index ccfecb36..fb26a10a 100644 --- a/source/manual/editors/properties/physics_soft_body.rst +++ b/source/manual/editors/properties/physics_soft_body.rst @@ -4,50 +4,43 @@ Soft Body Physics ***************** -The most advanced type of object in the Game Engine. -Also, it is the most finicky. If you are used to the fun experimentation -that comes from playing around with the non-BGE soft body simulations (such as Cloth), -you will probably find a frustrating lack of options and exciting results. -Do not despair, we are here to help you get some reasonable settings. - -Your setup will involve making sure you have sufficient geometry in the soft body's mesh to -support the deformation, as well as tweaking the options. +The most advanced type of object in the Game Engine. Also, it is the most finicky. If you are used to the fun experimentation that comes from playing around with the non-BGE soft body simulations (such as Cloth), you will probably find a frustrating lack of options and exciting results. Do not despair, we are here to help you get some reasonable settings. +Your setup will involve making sure you have sufficient geometry in the soft body's mesh to support the deformation, as well as tweaking the options. Options ======= Actor Enables detection by Near and Radar Sensors. + Ghost Disables collisions completely, similar to No Collision. + Invisible - Does not display, the same as setting the object to unrendered - (such as unchecking the camera icon in the Outliner). + Does not display, the same as setting the object to unrendered (such as unchecking the camera icon in the Outliner). + Mass - Affects the reaction due to collision between objects -- - more massive objects have more inertia. Will also affect material force fields. - Will also change behaviors if you are using the suspension and steering portions of Bullet physics. + Affects the reaction due to collision between objects -- more massive objects have more inertia. Will also affect material force fields. Will also change behaviors if you are using the suspension and steering portions of Bullet physics. + Shape Match - Upon starting the Game Engine this will record the starting shape of the mesh as the "lowest energy" state. - This means that the edges will have tension whenever they are flexed to some other form. - This is set to on by default, - and in this configuration turns the object into more of a thin sheet of metal rather than a cloth. + Upon starting the Game Engine this will record the starting shape of the mesh as the "lowest energy" state. This means that the edges will have tension whenever they are flexed to some other form. This is set to on by default, and in this configuration turns the object into more of a thin sheet of metal rather than a cloth. + Threshold - `Linearly scales the pose match - `__. + `Linearly scales the pose match `__. - A threshold of 1.0 makes it behave like *Shape Match* on with a *Linear Stiffness* of 1.0. - A threshold of 0.0 makes it behave like *Shape Match* off with a *Linear Stiffness* of 0.0. + Welding TODO. + Position Iteration - Increase the accuracy at a linearly-increasing expense of time. - The effect is visible especially with soft bodies that fall on sharp corners, - though this can slow down even very simple scenes. + Increase the accuracy at a linearly-increasing expense of time. The effect is visible especially with soft bodies that fall on sharp corners, though this can slow down even very simple scenes. + Linear Stiffness - Linear stiffness of the soft body links. - This is most evident when you have *Shape Match* off, but it is also evident with it on. + Linear stiffness of the soft body links. This is most evident when you have *Shape Match* off, but it is also evident with it on. + Friction Dynamic friction coefficient. @@ -68,35 +61,29 @@ Cluster Collision Rigid to Soft Body Enable cluster collisions between rigid and soft bodies. + Soft to Soft Body Enable cluster collisions among soft bodies. + Iterations Number of cluster iterations. - Hints ===== -- A very important configurable in the case of soft body interactions is - :doc:`World Properties <./world>` - :menuselection:`--> Physics --> Physics Steps --> Substeps`. +- A very important configurable in the case of soft body interactions is :doc:`World Properties <./world>` :menuselection:`> Physics > Physics Steps > Substeps`. + - Surprisingly, the more vertices you have in your hit object, the less likely the soft body is to react with it. + If you try letting it hit a Plane, it might stop, but a subdivided Grid might fail. .. note:: - Soft bodies do not work with the Collision, Touch, Near, and Radar logic brick sensors. .. warning:: - - A common practice within the non-BGE Cloth simulator is to employ - Force Fields to animate the cloth. - These do not work in the BGE, so you will have to figure out a way to use Python - (or perhaps plain Logic Bricks) to apply forces to the soft body objects. - + A common practice within the non-BGE Cloth simulator is to employ Force Fields to animate the cloth. These do not work in the BGE, so you will have to figure out a way to use Python (or perhaps plain Logic Bricks) to apply forces to the soft body objects. Goal Weights ============ -TODO. See `Python API -`__. +TODO. See `Python API `__. diff --git a/source/manual/editors/properties/physics_static.rst b/source/manual/editors/properties/physics_static.rst index 03e9b00b..cff14208 100644 --- a/source/manual/editors/properties/physics_static.rst +++ b/source/manual/editors/properties/physics_static.rst @@ -1,64 +1,46 @@ -************** +============================== Static Physics -************** +============================== -Static objects participates in the simulation, affecting other objects, but are not affected by it. -Meaning they do not react to physics, including gravity and collisions and this way -will remain unresponsive in terms of location, rotation, or deformation. +Static objects participates in the simulation, affecting other objects, but are not affected by it. Meaning they do not react to physics, including gravity and collisions and this way will remain unresponsive in terms of location, rotation, or deformation. -It will, however, give collision reactions. Objects will bounce off of Static Objects, -and rotational inertia will transfer to objects capable of rotating -(that is, rigid body objects will spin in response, though Dynamic Objects will not). +It will, however, give collision reactions. Objects will bounce off of Static Objects, and rotational inertia will transfer to objects capable of rotating (that is, rigid body objects will spin in response, though Dynamic Objects will not). -Note that none of this prevents you from transforming the Static Objects with -:doc:`Logic Bricks ` or Python code. -The visual objects will correctly move and their physics representation will update in the engine as well. +Note that none of this prevents you from transforming the Static Objects with :doc:`Logic Bricks ` or Python code. The visual objects will correctly move and their physics representation will update in the engine as well. -Another important note is that the default -`Collision Bounds`_ -is a Triangle Mesh, meaning it is higher in computational requirements but also in detail. -This in turn means the "Radius" option has no effect by default. +Another important note is that the default `Collision Bounds`_ is a Triangle Mesh, meaning it is higher in computational requirements but also in detail. This in turn means the "Radius" option has no effect by default. For more documentation, see the general :doc:`physics page <./physics>`. - Options -======= +++++++++++++++++++++++++++++++ .. note:: bpy Access - - Note that, most of these properties are accessible through - the non-BGE scripting API via ``bpy.data.objects["ObjectName"].game``, - which is of type ``bpy.types.GameObjectSetting``. This is useful, - for example, to set a range of objects to have gradated values via a for-loop. + Note that, most of these properties are accessible through the non-BGE scripting API via ``bpy.data.objects["ObjectName"].game``, which is of type ``bpy.types.GameObjectSetting``. This is useful, for example, to set a range of objects to have gradated values via a for-loop. Actor Enables detection by Near and Radar Sensors. + Ghost Disables collisions completely, similar to No Collision. + Invisible - Does not display, the same as setting the object to unrendered - (such as unchecking the camera icon in the Outliner). + Does not display, the same as setting the object to unrendered (such as unchecking the camera icon in the Outliner). + Radius See :ref:`rigid body `. -Anisotropic Friction - Isotropic friction is identical at all angles. Anisotropic is directionally-dependent. - Here you can vary the coefficients for the three axes individually, or disable friction entirely. - Python properties: ``obj.game.use_anisotropic_friction`` - (boolean) and ``obj.game.friction_coefficients`` (a 3-element array). +Anisotropic Friction + Isotropic friction is identical at all angles. Anisotropic is directionally-dependent. Here you can vary the coefficients for the three axes individually, or disable friction entirely. Python properties: ``obj.game.use_anisotropic_friction`` (boolean) and ``obj.game.friction_coefficients`` (a 3-element array). Collision Bounds -================ - -The Static type differs from the others in that it defaults to a Triangle Mesh bounds, -instead of a simple sphere. -See :ref:`rigid body `. +++++++++++++++++++++++++++++++ +The Static type differs from the others in that it defaults to a Triangle Mesh bounds, instead of a simple sphere. See :ref:`rigid body `. Create Obstacle -=============== +++++++++++++++++++++++++++++++ .. link also to rigid body if done diff --git a/source/manual/editors/properties/render.rst b/source/manual/editors/properties/render.rst index da131a89..5a9c25ee 100644 --- a/source/manual/editors/properties/render.rst +++ b/source/manual/editors/properties/render.rst @@ -1,47 +1,34 @@ -****** +============================== Render -****** +============================== -The **Render** tab in :doc:`Properties Editor ` exposes -options related to game screen rendering. +The **Render** tab in :doc:`Properties Editor ` exposes options related to game screen rendering. -Some of the options showed here may behave differently according to the conditions, as -there are two separate game "players" for previewing the game during development. Note -that while UPBGE is running in either player, the computer's mouse and keyboard -are captured by the game and by default, the mouse cursor is not visible (this can be -changed in the :ref:`Display panel ` of this tab). -To exit the game, press the :kbd:`Esc` key. +Some of the options showed here may behave differently according to the conditions, as there are two separate game "players" for previewing the game during development. Note that while UPBGE is running in either player, the computer's mouse and keyboard are captured by the game and by default, the mouse cursor is not visible (this can be changed in the :ref:`Display panel ` of this tab). To exit the game, press the :kbd:`Esc` key. -.. note:: Make sure that the render engine is set to **UPBGE** when attempting to set these - controls, otherwise this description will not apply to what you see! +.. note:: + Make sure that the render engine is set to **EEVEE** when attempting to set these controls, otherwise this description will not apply to what you see! -In **Render** tab, there are several panels available, as shown. Each one can be expanded -or contracted using the usual triangle button. The features in each panel will be -described in details below. +In **Render** tab, there are several panels available, as shown. Each one can be expanded or contracted using the usual triangle button. The features in each panel will be described in details below. .. _editors-properties-render-embedded-player: Embedded Player -=============== +++++++++++++++++++++++++++++++ -.. figure:: /images/editors-properties-render-embedded_player.png +.. figure:: /images/editors/edt-embedded_standalone.png + :figwidth: 40% + :align: right - Embedded Player panel. + Embedded Player panel -This panel provides information for the **Embedded Player** which allows games to be run -inside the Blender **3D View**. The **Embedded Player** renders onto the **3D View** -editor in the Blender GUI using the current perspective and zoom level of the **3D View**. +This panel provides information for the *Embedded Player* which allows games to be run inside the Blender *3D Viewport*. *Embedded Player* renders onto the *3D Viewport* editor in the Blender GUI using the current perspective and zoom level of the *3D Viewport*. -Note that the *Resolution* settings are independent of the size of the viewport preview -pane. In fact, the *Resolution* controls seem to have no effect at all. The resolution -and aspect ratio of the embedded preview are always fixed to the **3D View** editor, -which behaves much like the *Extend* framing mode for the -:ref:`Standalone Player`. +Note that the *Resolution* settings are independent of the size of the viewport preview pane. In fact, the *Resolution* controls seem to have no effect at all. The resolution and aspect ratio of the embedded preview are always fixed to the *3D Viewport* editor, which behaves much like the *Extend* framing mode for the :ref:`Standalone Player `. Start - Starts UPBGE inside the current Blender **3D View**. Shortcut :kbd:`P` while mouse - hovers the desired **3D View**. + Starts UPBGE inside the current Blender *3D View*. Shortcut :kbd:`P` with mouse-over *3D Viewport*. Resolution X/Y Sets the internal X/Y rendering resolution. @@ -49,53 +36,35 @@ Resolution X/Y .. _editors-properties-render-standalone-player: Standalone Player -================= - -.. figure:: /images/editors-properties-render-standalone_player.png - - Standalone Player panel. - -This panel provides information for the **Standalone Player** which allows games to be -run without Blender. See :doc:`Standalone Player ` for -further details. - -The **Standalone Player** renders the scene from the perspective of the active scene -camera and either creates a new desktop window or switches into fullscreen rendering mode. - -The semantics of the **Standalone Player**'s *Resolution* controls differ for Windowed -and Fullscreen modes. In Windowed mode (*Fullscreen* checkbox unchecked), the -*Resolution* controls set the initial dimensions of the desktop window. The user may -resize the window at any time, causing the rendering resolution to change accordingly. -In Fullscreen mode (*Fullscreen* checkbox checked), the *Resolution* controls set the -internal rendering resolution. The actual display resolution will be a best fit depending -on the user's hardware. In either mode, the aspect ratio/cropping/scaling are determined -by the *Framing* selection under the **Display** panel. - -Regarding *Fullscreen* mode, it is important to remember that the *Resolution* settings -in *Fullscreen* mode are only hints to the operating system. Each display and monitor -combination will have a different set of resolutions that they are capable of displaying; -so there can be little confidence that all end-users will actually get the resolution you -suggest; unless you choose one of the most standard resolutions (e.g. 800x600 or 1024x768). -If you insist on using higher resolutions, then you may want to state clearly in your -documentation that only certain resolutions are supported. In most other cases, the user's -machine may select a resolution that is close to the one suggested; but the results can -be unpredictable, especially in *Letterbox* framing mode. +++++++++++++++++++++++++++++++ + +.. figure:: /images/editors/edt-embedded_standalone.png + :figwidth: 40% + :align: right + + Standalone Player panel + +This panel provides information for the *Standalone Player* which allows games to be run without Blender. See :doc:`Standalone Player ` for further details. + +The *Standalone Player* renders the scene from the perspective of the active scene camera and either creates a new desktop window or switches into fullscreen rendering mode. + +The semantics of the *Standalone Player*'s *Resolution* controls differ for Windowed and Fullscreen modes. In Windowed mode (:menuselection:`Fullscreen` checkbox unchecked), the *Resolution* controls set the initial dimensions of the desktop window. The user may resize the window at any time, causing the rendering resolution to change accordingly. In Fullscreen mode (:menuselection:`Fullscreen` checkbox checked), the *Resolution* controls set the internal rendering resolution. The actual display resolution will be a best fit depending on the user's hardware. In either mode, the aspect ratio/cropping/scaling are determined by the *Framing* selection under the *Display* panel. + +Regarding *Fullscreen* mode, it is important to remember that the *Resolution* settings in *Fullscreen* mode are only hints to the operating system. Each display and monitor combination will have a different set of resolutions that they are capable of displaying; so there can be little confidence that all end-users will actually get the resolution you suggest; unless you choose one of the most standard resolutions (e.g. 800x600 or 1024x768). If you insist on using higher resolutions, then you may want to state clearly in your documentation that only certain resolutions are supported. In most other cases, the user's machine may select a resolution that is close to the one suggested; but the results can be unpredictable, especially in *Letterbox* framing mode. Note that the *Desktop* checkbox has no effect in Windowed mode. Start - Launches the current blend file with the **Standalone Player**. + Launches the current blend file with the *Standalone Player*. Resolution - X - Sets the X window size or fullscreen display resolution. + Sets the X (width) window size or fullscreen display resolution. Y - Sets the Y window size or fullscreen display resolution. + Sets the Y (height) window size or fullscreen display resolution. Fullscreen - Off Opens standalone game as a new window. @@ -103,7 +72,6 @@ Fullscreen Opens standalone game in fullscreen. Desktop - Off Attempts to obey the *Resolution* specified above when in *Fullscreen* mode. @@ -111,7 +79,6 @@ Desktop Keeps the current desktop resolution when in *Fullscreen* mode. Quality - AA Samples The number of AA samples to use for MSAA. @@ -124,31 +91,26 @@ Quality .. _editors-properties-render-stereo: Stereo -====== +++++++++++++++++++++++++++++++ -.. figure:: /images/editors-properties-render-stereo.png +.. figure:: /images/editors/editors-properties-render-stereo.png - Stereo panel. + Stereo panel -Toggle if use an stereo mode and, if use, select a stereo mode that will be used to -capture stereo images of the game (and also, by implication, that stereo displays will -use to render images in the -:ref:`Standalone Player`). +Toggle if use an stereo mode and, if use, select a stereo mode that will be used to capture stereo images of the game (and also, by implication, that stereo displays will use to render images in the :ref:`Standalone Player`). None Render single images with no stereo. Stereo - Render dual images for stereo viewing using appropriate equipment. See - :doc:`Stereo Camera ` - for full details of available options. + Render dual images for stereo viewing using appropriate equipment. See :doc:`Stereo Camera ` for full details of available options. .. _editors-properties-render-shading: Shading -======= +++++++++++++++++++++++++++++++ -.. figure:: /images/editors-properties-render-shading.png +.. figure:: /images/editors/editors-properties-render-shading.png Shading panel. @@ -164,8 +126,7 @@ Shadows Toggles realtime shadows from lamps. Environment Lighting - Toggles environment lighting from - :doc:`World tab `. + Toggles environment lighting from :doc:`World tab `. Ramps Toggles material ramps. @@ -179,27 +140,19 @@ Extra Textures .. _editors-properties-render-system: System -====== +++++++++++++++++++++++++++++++ -.. figure:: /images/editors-properties-render-system.png +.. figure:: /images/editors/editors-properties-render-system.png - System panel in the Render tab. + System panel in the Render tab -The **System** panel at the Render tab lets the game developer specify options about -the system performance regarding to frame discard and restrictions about frame rendering, -the key to stop UPBGE, etc. +The **System** panel at the Render tab lets the game developer specify options about the system performance regarding to frame discard and restrictions about frame rendering, the key to stop UPBGE, etc. Use Frame Rate - Respect the frame rate rather than rendering as many frames as possible. When - unchecked, this will inform Blender to run freely without frame rate restrictions. - The frame rate is specified at the **Display** panel, also in the **Render** tab. For - more information about frame rates, see - :ref:`Display panel `. + Respect the frame rate rather than rendering as many frames as possible. When unchecked, this will inform Blender to run freely without frame rate restrictions. The frame rate is specified at the **Display** panel, also in the **Render** tab. For more information about frame rates, see :ref:`Display panel `. Deprecation Warnings - Every time when the game developer uses a deprecated functionality (which in some - cases are outdated or crippled OpenGL Graphic cards functions), the system will emit - warnings about the deprecated function on the console. + Every time when the game developer uses a deprecated functionality (which in some cases are outdated or crippled OpenGL Graphic cards functions), the system will emit warnings about the deprecated function on the console. Vsync Change Vsync settings. @@ -216,105 +169,80 @@ Exit Key .. _editors-properties-render-animations: Animations -========== +++++++++++++++++++++++++++++++ -.. figure:: /images/editors-properties-render-animations.png +.. figure:: /images/editors/editors-properties-render-animations.png - Animations panel in the Render tab. + Animations panel in the Render tab Specifies animations settings of game, like frame rate. Animation Frame Rate - This number button/slider specify the maximum frame rate at which the game will run. - Minimum is 1, maximum is 120. + This number button/slider specify the maximum frame rate at which the game will run. Minimum is 1, maximum is 120. Restrict Animation Updates - Restrict number of animation updates to the animation FPS. This is better for - performance, but can cause issues with smooth playback. When checked, this will force - UPBGE to discard frames (even at the middle of redrawing, sometimes causing tearing - artifacts) if the rate of frames rendered by the GPU is greater than the specified on - :ref:`Display panel `. + Restrict number of animation updates to the animation FPS. This is better for performance, but can cause issues with smooth playback. When checked, this will force UPBGE to discard frames (even at the middle of redrawing, sometimes causing tearing artifacts) if the rate of frames rendered by the GPU is greater than the specified on :ref:`Display panel `. .. _editors-properties-render-display: Display -======= +++++++++++++++++++++++++++++++ -.. figure:: /images/editors-properties-render-display.png +.. figure:: /images/editors/editors-properties-render-display.png - Display panel at the Render tab. + Display panel at the Render tab -The **Display** panel in the **Render** tab lets the game developer specify whether the -mouse cursor is shown during the game execution, and options to specify the framing style -of the game to fit the window with the specified resolution. +The **Display** panel in the **Render** tab lets the game developer specify whether the mouse cursor is shown during the game execution, and options to specify the framing style of the game to fit the window with the specified resolution. Mouse Cursor Whether to show or not the mouse cursor when the game is running. Framing - Selects how the scene is to be fitted onto the display window or screen. There are - three types of framing available: + Selects how the scene is to be fitted onto the display window or screen. There are three types of framing available: Letterbox - In Windowed mode: - Maintains a 4:3 aspect ratio by scaling to fit the current window dimensions - without cropping, covering any portions of the display that lie outside of the - aspect ratio with color bars. + Maintains a 4:3 aspect ratio by scaling to fit the current window dimensions without cropping, covering any portions of the display that lie outside of the aspect ratio with color bars. In Fullscreen mode: - The behavior of this combination seems to be heavily dependent on the user's - hardware. The result can be quite unpredictable, especially when the resolution - and aspect ratio differ too much from the machine's capabilities. For this - reason, *Extend* mode should be preferred for *Fullscreen* applications. + The behavior of this combination seems to be heavily dependent on the user's hardware. The result can be quite unpredictable, especially when the resolution and aspect ratio differ too much from the machine's capabilities. For this reason, *Extend* mode should be preferred for *Fullscreen* applications. Extend - This mode behaves much like *Letterbox* mode, maintaining a 4:3 aspect ratio by - scaling whenever possible; except that the camera frustum is expanded or contracted - wherever necessary to fill any portions of the display that lie outside of the - aspect ratio, instead of covering those portions of the scene with color bars, as - with *Letterbox* mode, or distorting then scene, as with *Scale* mode. + This mode behaves much like *Letterbox* mode, maintaining a 4:3 aspect ratio by scaling whenever possible; except that the camera frustum is expanded or contracted wherever necessary to fill any portions of the display that lie outside of the aspect ratio, instead of covering those portions of the scene with color bars, as with *Letterbox* mode, or distorting then scene, as with *Scale* mode. Scale - In this mode, no attempt is made to maintain a particular aspect ratio. The scene - and objects within will be stretched or squashed to fit the display exactly. + In this mode, no attempt is made to maintain a particular aspect ratio. The scene and objects within will be stretched or squashed to fit the display exactly. Color Bar - This will let the game developer choose the bar colors when using the *Letterbox* - Framing mode. + This will let the game developer choose the bar colors when using the *Letterbox* Framing mode. .. _editors-properties-render-debug: Debug -===== +++++++++++++++++++++++++++++++ -.. figure:: /images/editors-properties-render-debug.png +.. figure:: /images/editors/editors-properties-render-debug.png - Debug panel at the Render tab. + Debug panel at the Render tab -The **Debug** panel at the **Render** tab toggles various specific debug helpers on UPBGE, -from frame rate being showed on the screen to detailed physics visualization of specific -elements, like armatures and camera frustum. +The **Debug** panel at the **Render** tab toggles various specific debug helpers on UPBGE, from frame rate being showed on the screen to detailed physics visualization of specific elements, like armatures and camera frustum. Framerate and Profile - When checked, this will show values for each of the calculations Blender is doing - while the game is running on the top left of the screen. + When checked, this will show values for each of the calculations Blender is doing while the game is running on the top left of the screen. Render Queries Shows render queries information while the game runs. Properties - When checked, the values of any properties which are selected to be debugged in the - objects are shown on the top left side of the screen. + When checked, the values of any properties which are selected to be debugged in the objects are shown on the top left side of the screen. Physics Visualization - Shows a visualization of physics bounds and interactions (like hulls and collision - shapes), and their interaction. + Shows a visualization of physics bounds and interactions (like hulls and collision shapes), and their interaction. The following remaining options are dropdown menus which allows the following options: -- Disable: Disables the debug of the current option. -- Allow: Allow debugging from individual settings of the current option. -- Force: Allow debugging of the current option. +- Disable: Disables the debug of the current option. +- Allow: Allow debugging from individual settings of the current option. +- Force: Allow debugging of the current option. Bounding Box Shows bounding volume boxes of objects while the game is running. @@ -323,8 +251,7 @@ Armatures Shows armatures while the game is running. Camera Frustum - Shows camera limits visualization according to the current viewport dimensions while - the game is running. + Shows camera limits visualization according to the current viewport dimensions while the game is running. Shadow Frustum Shows lamp's shadows bounds while the game is running. @@ -332,16 +259,13 @@ Shadow Frustum .. _editors-properties-render-bake: Bake -==== +++++++++++++++++++++++++++++++ -The **Bake** panel in the **Render** tab is very similar to its **Blender Render** -counterpart and serves much the same purpose. See -`Render Baking `__ -for further details. +The **Bake** panel in the **Render** tab is very similar to its **Blender Render** counterpart and serves much the same purpose. See `Render Baking `__ for further details. -.. figure:: /images/editors-properties-render-bake.png +.. figure:: /images/editors/editors-properties-render-bake.png - Bake panel at the Render tab (showing different bake modes). + Different Bake modes in the Render tab Bake Bake image textures of selected objects. @@ -353,8 +277,7 @@ Bake Mode Bakes all materials, textures, and lighting except specularity and SSS. Ambient Occlusion - Bakes ambient occlusion as specified in the World panels. Ignores all lights in - the scene. + Bakes ambient occlusion as specified in the World panels. Ignores all lights in the scene. Shadows Bakes shadows and lighting. @@ -366,8 +289,7 @@ Bake Mode Bakes colors of materials and textures only, without shading. Displacement - Similar to baking normal maps, displacement maps can also be baked from a high-res - object to an unwrapped low-res object, using the Selected to Active option. + Similar to baking normal maps, displacement maps can also be baked from a high-res object to an unwrapped low-res object, using the Selected to Active option. Derivative Bake derivative map. @@ -397,7 +319,6 @@ Bake from Multiresolution Bake directly from a multi-resolution object. Normalized - In Displacement Mode: Normalize to the distance. @@ -414,24 +335,19 @@ Normal Space Normals in world coordinates, dependent on object transformation and deformation. Object space - Normals in object coordinates, independent of object transformation, but dependent - on deformation. + Normals in object coordinates, independent of object transformation, but dependent on deformation. Tangent space - Normals in tangent space coordinates, independent of object transformation and - deformation. This is the new default, and the right choice in most cases, since - then the normal map can be used for animated objects too. + Normals in tangent space coordinates, independent of object transformation and deformation. This is the new default, and the right choice in most cases, since then the normal map can be used for animated objects too. Bake to Vertex Color Bake to vertex colors instead of to a UV-mapped image. Clear - If selected, clears the image to selected background color (default is black) before - render. + If selected, clears the image to selected background color (default is black) before render. Margin - Baked result is extended this many pixels beyond the border of each UV "island", to - soften seams in the texture. + Baked result is extended this many pixels beyond the border of each UV "island", to soften seams in the texture. Selected to Active Bake shading on the surface of selected objects to the active object. @@ -461,4 +377,4 @@ User Scale :maxdepth: 1 :caption: More Info - render_stereo \ No newline at end of file + render_stereo diff --git a/source/manual/editors/properties/render_stereo.rst b/source/manual/editors/properties/render_stereo.rst index 642b76c0..8bf60cae 100644 --- a/source/manual/editors/properties/render_stereo.rst +++ b/source/manual/editors/properties/render_stereo.rst @@ -1,43 +1,28 @@ -************* +============================== Stereo Camera -************* +============================== -Stereo rendering allow you to generate images that appear three-dimensional when wearing -special glasses. -This is achieved by rendering two separate images from cameras that are a small distance -apart from each other, simulating how our own eyes see. When viewing a stereo image, one -eye is limited to seeing one of the images, and the other eye sees the second image. Our -brain is able to merge these together, making it appear that we are looking at a 3D object -rather than a flat image. See -`Stereoscopy `__ -for more information on different stereoscopic viewing methods. +Stereo rendering allow you to generate images that appear three-dimensional when wearing special glasses. This is achieved by rendering two separate images from cameras that are a small distance apart from each other, simulating how our own eyes see. When viewing a stereo image, one eye is limited to seeing one of the images, and the other eye sees the second image. Our brain is able to merge these together, making it appear that we are looking at a 3D object rather than a flat image. See `Stereoscopy `__ for more information on different stereoscopic viewing methods. Stereo Settings -=============== +++++++++++++++++++++++++++++++ -.. figure:: /images/editors-properties-render-stereo.png +.. figure:: /images/editors/editors-properties-render-stereo.png - Stereo settings. + Stereo settings None Disable stereo rendering. Stereo Mode - Specifies the way in which the left-eye image and the right-eye image pixels are put together - during rendering. This must be selected according to the type of apparatus available to - display the appropriate images to the viewer's eyes. + Specifies the way in which the left-eye image and the right-eye image pixels are put together during rendering. This must be selected according to the type of apparatus available to display the appropriate images to the viewer's eyes. Anaglyph - One frame is displayed with both images color encoded with red-blue filters. This mode - only requires - `glasses with color filters `__, - there are no special requirements for the display screen and GPU. + One frame is displayed with both images color encoded with red-blue filters. This mode only requires `glasses with color filters `__, there are no special requirements for the display screen and GPU. Quad Buffer - Uses double buffering with a buffer for each eye, totaling four buffers - (Left Front, Left Back, Right Front and Right Back), allowing to swap the buffers for both eyes in sync. - See `Quad Buffering `__ for more information. + Uses double buffering with a buffer for each eye, totaling four buffers (Left Front, Left Back, Right Front and Right Back), allowing to swap the buffers for both eyes in sync. See `Quad Buffering `__ for more information. Side by Side Lines are displayed one after the other, so providing the two images in two frames side-by-side. Above-Below @@ -45,14 +30,9 @@ Stereo Mode Interlaced One frame is displayed with the two images on alternate lines of the display. Vinterlaced - One frame is displayed with both images displayed on alternate columns of the display. - This works with some 'autostereo displays'. + One frame is displayed with both images displayed on alternate columns of the display. This works with some 'autostereo displays'. 3D TV Top-Bottom - One frame displays the left image above and the right image below. - The images are squashed vertically to fit. This mode is designed for passive 3D TV. + One frame displays the left image above and the right image below. The images are squashed vertically to fit. This mode is designed for passive 3D TV. Eye Separation - This value is extremely important. It determines how far apart the two image-capturing - cameras are, and thus how "deep" the scene appears. Too small a value and the image - appears flat; too high a value can result in headaches and eye strain. The ideal value - mimics the separation of the viewer's two eyes. + This value is extremely important. It determines how far apart the two image-capturing cameras are, and thus how "deep" the scene appears. Too small a value and the image appears flat; too high a value can result in headaches and eye strain. The ideal value mimics the separation of the viewer's two eyes. diff --git a/source/manual/editors/properties/scene.rst b/source/manual/editors/properties/scene.rst index 6b070d18..75d88009 100644 --- a/source/manual/editors/properties/scene.rst +++ b/source/manual/editors/properties/scene.rst @@ -1,32 +1,27 @@ -***** +============================== Scene -***** +============================== -The **Scene** tab in :doc:`Properties Editor ` exposes -options related to the current scene. +The **Scene** tab in :doc:`Properties Editor ` exposes options related to the current scene. Physics -======= +++++++++++++++++++++++++++++++ -.. figure:: /images/editors-properties-scene-physics.png +.. figure:: /images/editors/editors-properties-scene-physics.png - Scene tab's Physics panel. + Scene tab's Physics panel -The *Physics* panel located in the *Scene* tab determine the type of physical rules -that govern the current UPBGE scene, the gravity value to be used and some other options. +The *Physics* panel located in the *Scene* tab determine the type of physical rules that govern the current UPBGE scene, the gravity value to be used and some other options. Physics Engine Set the type of physics engine to use. Bullet - The default physics engine, in active development. It handles movement and - collision detection. The things that collide transfer momentum to the - collided object. + The default physics engine, in active development. It handles movement and collision detection. The things that collide transfer momentum to the collided object. None - No physics in use. Things are not affected by gravity and can fly about in a - virtual space. Objects in motion stay in that motion. + No physics in use. Things are not affected by gravity and can fly about in a virtual space. Objects in motion stay in that motion. Physics Solver The physics constraints solver to use. @@ -44,99 +39,77 @@ Physics Solver MLCP Lemke physics solver. Gravity - The gravitational acceleration, m.s\ :sup:`-2` (in units of meters per squared - second), of this world. Each object that is an actor has a mass and size slider. In - conjunction with the frame rate, Blender uses this info to calculate how fast the - object should accelerate downward. + The gravitational acceleration, m.s\ :sup:`-2` (in units of meters per squared second), of this world. Each object that is an actor has a mass and size slider. In conjunction with the frame rate, Blender uses this info to calculate how fast the object should accelerate downward. Physics Steps Max - Sets the maximum number of physics steps per game frame if graphics slow down the - game. Higher value allows physics to keep up with real-time. + Sets the maximum number of physics steps per game frame if graphics slow down the game. Higher value allows physics to keep up with real-time. Substeps - Sets the number of simulation sub-steps per physics time step. Higher value give - better physics precision. + Sets the number of simulation sub-steps per physics time step. Higher value give better physics precision. FPS - Set the nominal number of game frames per second. Physics fixed timestep = 1/fps, - independently of actual frame rate. + Set the nominal number of game frames per second. Physics fixed timestep = 1/fps, independently of actual frame rate. Time Scale Time scale to slow down or speed up animations and physics in game. Logic Steps Max - Sets the maximum number of logic frame per game frame if graphics slows down the - game, higher value allows better synchronization with physics. + Sets the maximum number of logic frame per game frame if graphics slows down the game, higher value allows better synchronization with physics. Physics Deactivation - These settings control the threshold at which physics is deactivated. These settings - help reducing the processing spent on Physics simulation during the game. + These settings control the threshold at which physics is deactivated. These settings help reducing the processing spent on Physics simulation during the game. Linear Threshold - The speed limit under which a rigid body will go to sleep (stop moving) if it - stays below the limits for a time equal or longer than the deactivation time - (sleeping is disabled when deactivation time is set to 0). + The speed limit under which a rigid body will go to sleep (stop moving) if it stays below the limits for a time equal or longer than the deactivation time (sleeping is disabled when deactivation time is set to 0). Angular Threshold Same as linear threshold, but for rotation limit (in rad/s). Time - The amount of time in which the object must have motion below the thresholds for - physics to be disabled (0.0 disables physics deactivation). + The amount of time in which the object must have motion below the thresholds for physics to be disabled (0.0 disables physics deactivation). Culling Occlusion Culling - Use optimized Bullet DBVT tree for view frustum and occlusion culling (more - efficient, but it can waste unnecessary CPU if the scene doesn't have occluder - objects). + Use optimized Bullet DBVT tree for view frustum and occlusion culling (more efficient, but it can waste unnecessary CPU if the scene doesn't have occluder objects). Resolution - The size of the occlusion culling buffer in pixel, use higher value for better - precision (slower). The optimized Bullet DBVT for view frustum and occlusion - culling is activated internally by default. + The size of the occlusion culling buffer in pixel, use higher value for better precision (slower). The optimized Bullet DBVT for view frustum and occlusion culling is activated internally by default. Object Activity Activity Culling - Enable object activity culling in this scene. The culling options can be set - individually by object on **Activity Culling** panel on - :doc:`Object tab `. + Enable object activity culling in this scene. The culling options can be set individually by object on **Activity Culling** panel on :doc:`Object tab `. Obstacle Simulation -=================== +++++++++++++++++++++++++++++++ -.. figure:: /images/editors-properties-scene-obstacle_simulation.png +.. figure:: /images/editors/editors-properties-scene-obstacle_simulation.png - Scene tab's Obstacle Simulation panel. + Scene tab's Obstacle Simulation panel -Simulation used for obstacle avoidance in UPBGE, based on the RVO (Reciprocal Velocity -Obstacles) principle. The aim is to prevent one or more actors colliding with obstacles. +Simulation used for obstacle avoidance in UPBGE, based on the RVO (Reciprocal Velocity Obstacles) principle. The aim is to prevent one or more actors colliding with obstacles. Type None Obstacle simulation is disabled, actors are not able to avoid obstacles. RVO (cells) - Obstacle simulation is based on the - `RVO method `__ with cell sampling. + Obstacle simulation is based on the `RVO method `__ with cell sampling. RVO (rays) - Obstacle simulation is based on the - `RVO method `__ with ray sampling. + Obstacle simulation is based on the `RVO method `__ with ray sampling. Level height - Max difference in heights of obstacles to enable their interaction. Used to define - minimum margin between obstacles by height, when they are treated as those which are - situated one above the other i.e. they does not influence to each other. + Max difference in heights of obstacles to enable their interaction. Used to define minimum margin between obstacles by height, when they are treated as those which are situated one above the other i.e. they does not influence to each other. Visualization Enable debug visualization for obstacle simulation. Navigation Mesh -=============== +++++++++++++++++++++++++++++++ -.. figure:: /images/editors-properties-scene-navigation_mesh.png +.. figure:: /images/editors/editors-properties-scene-navigation_mesh.png Scene tab's Navigation Mesh panel. @@ -195,11 +168,11 @@ Detail Mesh Detail mesh simplification max sample error. Level of Detail -=============== +++++++++++++++++++++++++++++++ -.. figure:: /images/editors-properties-scene-level_of_detail.png +.. figure:: /images/editors/editors-properties-scene-level_of_detail.png - Scene tab's Level of Detail panel. + Scene tab's Level of Detail panel Hysteresis Use LoD hysteresis settings for the current scene. @@ -208,47 +181,38 @@ Hysteresis Minimum distance change required to transition to the previous level of detail. Python Console -============== +++++++++++++++++++++++++++++++ -.. figure:: /images/editors-properties-scene-python_console.png +.. figure:: /images/editors/editors-properties-scene-python_console.png - Scene tab's Python Console panel. + Scene tab's Python Console panel -Enabling the panel's checkbox allows to trigger an interactive Python console when the -game is running through the specified shortcut. +Enabling the panel's checkbox allows to trigger an interactive Python console when the game is running through the specified shortcut. Keys Set the keys to be pressed in order to activate the Python console in game. Scene -====== +++++++++++++++++++++++++++++++ -.. figure:: /images/editors-properties-scene-scene.png +.. figure:: /images/editors/editors-properties-scene-scene.png - Scene tab's Scene panel. + Scene tab's Scene panel Camera - Used to select which camera is used as the active camera. You can also set the active - camera in the 3D View with :kbd:`Ctrl-0`. + Used to select which camera is used as the active camera. You can also set the active camera in the 3D View with :kbd:`Ctrl-0`. .. _scene-background-set: Background - Allows you to use a scene as a background, this is typically useful when you want to - focus on animating the foreground for example, without background elements getting - in the way. + Allows you to use a scene as a background, this is typically useful when you want to focus on animating the foreground for example, without background elements getting in the way. - This scene can have its own animation, physics simulations, etc, but you will have to - select it from the *Scene* data-block menu, if you want to edit any of its contents. + This scene can have its own animation, physics simulations, etc, but you will have to select it from the *Scene* data-block menu, if you want to edit any of its contents. - Sets can themselves have a background set (they're recursively included). So you can - always make additions to existing scenes by using them as a background to a newly - created scene where your additions are made. + Sets can themselves have a background set (they're recursively included). So you can always make additions to existing scenes by using them as a background to a newly created scene where your additions are made. .. tip:: - - This can also be used in combination with Linking to a Scene, where one blend-file - contains the environment, which can be reused in many places. + This can also be used in combination with Linking to a Scene, where one blend-file contains the environment, which can be reused in many places. Camera Active camera, used for rendering the scene. @@ -257,11 +221,11 @@ Background Background set scene. Units -====== +++++++++++++++++++++++++++++++ -.. figure:: /images/editors-properties-scene-units.png +.. figure:: /images/editors/editors-properties-scene-units.png - Scene tab's Units panel. + Scene tab's Units panel Unit Presets Common unit scales to use. @@ -279,23 +243,18 @@ Angle Degrees, Radians .. tip:: - When you are using *Degrees*, the radian value is also displayed in the tooltip. Unit Scale Scale factor to use when converting between Blender Units and *Metric*/*Imperial*. .. tip:: - - Usually you will want to use the *Length* presets to change to scale factor, - as this does not require looking up values to use for conversion. + Usually you will want to use the *Length* presets to change to scale factor, as this does not require looking up values to use for conversion. Separate Units - When *Metric* or *Imperial* display units as multiple values, - for example, "2.285m" will become "2m 28.5cm". + When *Metric* or *Imperial* display units as multiple values, for example, "2.285m" will become "2m 28.5cm". -.. Normally we would avoid documenting long lists of values - however, this is not displayed anywhere else. +.. Normally we would avoid documenting long lists of values however, this is not displayed anywhere else. .. list-table:: Imperial Units :header-rows: 1 @@ -358,6 +317,5 @@ Separate Units - ``km`` - 1000.0 -.. note:: The **Audio** panel settings in **Scene** tab don't have effect in UPBGE. - For audio settings, see - `User Preferences `__. \ No newline at end of file +.. note:: + The **Audio** panel settings in **Scene** tab don't have effect in UPBGE. For audio settings, see `Preferences `__. diff --git a/source/manual/editors/properties/world.rst b/source/manual/editors/properties/world.rst index f83b5539..6aeaab6a 100644 --- a/source/manual/editors/properties/world.rst +++ b/source/manual/editors/properties/world.rst @@ -1,18 +1,16 @@ -***** +============================== World -***** +============================== -**World** settings enable you to set some basic effects which affect all scenes throughout -your game, so giving it a feeling of unity and continuity. These include ambient light, -depth effects (mist), etc. +**World** settings enable you to set some basic effects which affect all scenes throughout your game, so giving it a feeling of unity and continuity. These include ambient light, depth effects (mist), etc. World -===== +++++++++++++++++++++++++++++++ -.. figure:: /images/editors-properties-world-world.png +.. figure:: /images/editors/editors-properties-world-world.png - World tab's World panel. + World tab's World panel These color settings allow you to set some general lighting effects for your game. @@ -26,15 +24,13 @@ Real Sky Render background with a real horizon, relative to the camera angle. Horizon Color - The RGB color at the horizon; i.e. the color and intensity of any areas in the scene - which are not filled explicitly. + The RGB color at the horizon; i.e. the color and intensity of any areas in the scene which are not filled explicitly. Zenith Color The RGB color at the zenith. Ambient Color - Ambient light mimics an overall background illumination obtained from diffusing - surfaces. Its general color and intensity are set by these controls. + Ambient light mimics an overall background illumination obtained from diffusing surfaces. Its general color and intensity are set by these controls. Exposure Ammount of exponential color correction for light. @@ -43,21 +39,17 @@ Range The color range that will be mapped to 0-1. Environment Lighting -====================== +++++++++++++++++++++++++++++++ -.. figure:: /images/editors-properties-world-env_lighting.png +.. figure:: /images/editors/editors-properties-world-env_lighting.png - World tab's Environment Lighting panel. + World tab's Environment Lighting panel **Environment Light** provides light coming from all directions. -Light is calculated with a ray-traced method which is the same as that used by Ambient -Occlusion. The difference is that Environment lighting takes into account the "ambient" -parameter of the material shading settings, which indicates the amount of ambient -light/color that that material receives. +Light is calculated with a ray-traced method which is the same as that used by Ambient Occlusion. The difference is that Environment lighting takes into account the "ambient" parameter of the material shading settings, which indicates the amount of ambient light/color that that material receives. -Also, you can choose the environment color source (white, sky color, sky texture) and -the light energy. +Also, you can choose the environment color source (white, sky color, sky texture) and the light energy. Energy Defines the strength of environment light. @@ -65,21 +57,16 @@ Energy Environment Color Defines where the color of the environment light comes from. -Using both settings simultaneously produces better global lighting. It is good for -mimicking the sky in outdoor lighting. - +Using both settings simultaneously produces better global lighting. It is good for mimicking the sky in outdoor lighting. Mist -==== +++++++++++++++++++++++++++++++ -.. figure:: /images/editors-properties-world-mist.png +.. figure:: /images/editors/editors-properties-world-mist.png - World tab's Mist panel. + World tab's Mist panel -*Mist* can greatly enhance the illusion of depth in your rendering. To create *Mist*, -UPBGE makes objects farther away more transparent (decreasing their Alpha value) so that -they mix more of the background color with the object color. With *Mist* enabled, the -further the object is away from the camera the less its alpha value will be. +*Mist* can greatly enhance the illusion of depth in your rendering. To create *Mist*, UPBGE makes objects farther away more transparent (decreasing their Alpha value) so that they mix more of the background color with the object color. With *Mist* enabled, the further the object is away from the camera the less its alpha value will be. Mist Toggles mist on and off. @@ -88,8 +75,7 @@ Falloff Sets the shape of the falloff of the mist. Start - The starting distance of the mist effect, measured from the camera. No misting will - take place for objects closer than this distance. + The starting distance of the mist effect, measured from the camera. No misting will take place for objects closer than this distance. Depth The depth at which the opacity of objects falls to zero. diff --git a/source/manual/editors/text/index.rst b/source/manual/editors/text/index.rst index 5a90a0ec..bdd389c5 100644 --- a/source/manual/editors/text/index.rst +++ b/source/manual/editors/text/index.rst @@ -1,213 +1,237 @@ .. _bpy.types.SpaceTextEditor: -*********** +============================== Text Editor -*********** +============================== -UPBGE has a *Text Editor* among its editor types, -accessible via the *Editor type* menu, or the shortcut :kbd:`Shift-F11`. +UPBGE has a *Text Editor* among its editor types, accessible via the *Editor type* menu, or the shortcut :kbd:`Shift-F11`. -.. figure:: /images/Editors/editors-text_editor-text_editor.png - - Text Editor for Python/GLSL edition. +.. figure:: /images/editors/editors-text_editor-text_editor.png + Text Editor for Python/GLSL edition Header -====== +++++++++++++++++++++++++++++++ -The newly opened Text editor is empty, with a very simple header. -More options become available when a text file is created or opened. +The newly opened Text editor is empty, with a very simple header. More options become available when a text file is created or opened. -.. figure:: /images/Editors/editors-text_editor-header.png +.. figure:: /images/editors/editors-text_editor-header.png - Text header. + Text header -.. figure:: /images/Editors/editors-text_editor-header_loaded.png +.. figure:: /images/editors/editors-text_editor-header_loaded.png - Text header with a text loaded. + Text header with a text loaded Editor Type The standard editor selection button. + Menus Editor's menus. - Resolve Conflict Resolves modified file conflicts when an external text file is updated from another program. Reload from Disk Opens the file from drive again, overriding any local changes. + Make Text Internal Converts the external text data-block into an internal one. + Ignore Hides the warning message until the external text file is modified externally again. Text - A data-block menu to select a text or to create a new one. - After that the header will change. + A data-block menu to select a text or to create a new one. After that the header will change. Run Script (play icon) - Executes the text as a Python script :kbd:`Alt-P`. This execution has placed out of Game Engine only, - and it is focused for development mainly. If you want to execute a Python script inside the Game Engine check - the :doc:`Python Scripting ` chapter. + Executes the text as a Python script :kbd:`Alt-P`. This execution has placed out of Game Engine only, and it is focused for development mainly. If you want to execute a Python script inside the Game Engine check the :doc:`Python Scripting ` chapter. + Show Toggle display options. Line Numbers, Word Wrap, Syntax Highlighting - View Menu --------- Sidebar :kbd:`Ctrl-T` Show or hide the sidebar. + Line Numbers Displays the text file's line numbers on the left of the `Main View`_. + Word Wrap Wraps words that are too long to fit into the horizontal space by pushing them to a new "pseudo line". + Syntax Highlight Colors special words, in the `Main View`_, that are used in the Python or GLSL programming language. + Highlight Line Emphasizes the active line by altering the color of the background. + Navigation Top :kbd:`Ctrl-Home` Moves the view and cursor to the start of the text file. + Bottom :kbd:`Ctrl-End` Moves the view and cursor to the end of the text file. + Line Begin :kbd:`Home` Moves the cursor to the start of the current line. + Line End :kbd:`End` Moves the cursor to the end of the current line. + Previous Line :kbd:`Up` Moves the cursor to the same position in the line above the current line. + Next Line :kbd:`Down` Moves the cursor to the same position in the line below the current line. + Previous Word :kbd:`Ctrl-Left` - Moves the cursor to the beginning of the previous word. - If the cursor is in the middle of a word, the cursor is moved to the beginning of the current word. - Next Word :kbd:`Ctrl-Right` - Moves the cursor to the end of the next word. - If the cursor is in the middle of a word, the cursor is moved to the end of the current word. + Moves the cursor to the beginning of the previous word. If the cursor is in the middle of a word, the cursor is moved to the beginning of the current word. + Next Word :kbd:`Ctrl-Right` + Moves the cursor to the end of the next word. If the cursor is in the middle of a word, the cursor is moved to the end of the current word. Text Menu --------- New :kbd:`Alt-N` Creates a new text Data Block. + Open Text Block :kbd:`Alt-O`. Loads an external text file that is selected via the File Browser. + Reload :kbd:`Alt-R` Reopens (reloads) the current buffer (all non-saved modifications are lost). + Save :kbd:`Alt-S` Saves an already open file. + Save As :kbd:`Shift-Ctrl-Alt-S`. - Saves text as a new text file, a File Browser is opened to select the directory - to save the file along with giving the file a name/file extension. + Saves text as a new text file, a File Browser is opened to select the directory to save the file along with giving the file a name/file extension. + Register Registers the current text data-block as a module on loading (the text name must end with ``.py``). + Live Edit Todo. + Run Script :kbd:`Alt-P` Executes the text as a Python script, see `Running Scripts`_ for more information. - Edit Menu --------- Undo/Redo Basic Undo/Redo. + Cut :kbd:`Ctrl-X` Cuts out the marked text into the text clipboard. + Copy :kbd:`Ctrl-C` Copies the marked text into the text clipboard. + Paste :kbd:`Ctrl-V` Pastes the text from the clipboard at the cursor location in the Text editor. + Duplicate Line :kbd:`Ctrl-D` Duplicates the current line. + Move Line(s) Up :kbd:`Shift-Ctrl-Up` Swaps the current/selected line(s) with the above. + Move Line(s) Down :kbd:`Shift-Ctrl-Down` Swaps the current/selected line(s) with the below. + Find & Replace :kbd:`Ctrl-F` Shows the *Find & Replace* panel in the Sidebar. + Find & Set Selection :kbd:`Ctrl-G` Finds the next instance of the selected text. + Jump To :kbd:`Ctrl-J` Shows a pop-up, which lets you select a line number where to move the cursor to. + Text Auto Complete :kbd:`Tab` Shows a selectable list of words already used in the text. + Text to 3D Object Converts the text file to a Text Object either as *One Object* or *One Object Per Line*. - Select Menu ----------- All :kbd:`Ctrl-A` Selects the entire text file. + Line :kbd:`Shift-Ctrl-A` Selects the entire current line. + Word double-click :kbd:`LMB` Selects the entire current word. + Top :kbd:`Shift-Ctrl-Home` Selects everything above the cursor. + Bottom :kbd:`Shift-Ctrl-End` Selects everything below the cursor. + Line Begin :kbd:`Shift-Home` Selects everything between the beginning of the current line and the cursor. + Line End :kbd:`Shift-End` Selects everything between the cursor and the end of the current line. + Previous Line :kbd:`Shift-Up` Selects everything between the cursor and the position of the cursor one line above. + Next Line :kbd:`Shift-Down` Selects everything between the cursor and the position of the cursor one line below. + Previous Word :kbd:`Shift-Ctrl-Left` - Selects everything between the cursor and the beginning of the previous word. - If the cursor is in the middle of a word, select everything to the beginning of the current word. -Next Word :kbd:`Shift-Ctrl-Right` - Selects everything between the cursor and the end of the next word. - If the cursor is in the middle of a word, select everything to the end of the current word. + Selects everything between the cursor and the beginning of the previous word. If the cursor is in the middle of a word, select everything to the beginning of the current word. +Next Word :kbd:`Shift-Ctrl-Right` + Selects everything between the cursor and the end of the next word. If the cursor is in the middle of a word, select everything to the end of the current word. Format Menu ----------- Indent :kbd:`Tab` Inserts a tab character at the cursor. + Unindent :kbd:`Shift-Tab`. Unindents the selection. + Toggle Comments :kbd:`Ctrl-Slash`. - Toggles whether the selected line(s) are a Python comment. - If no lines are selected the current line is toggled. + Toggles whether the selected line(s) are a Python comment. If no lines are selected the current line is toggled. + Convert Whitespace Converts indentation characters *To Spaces* or *To Tabs*. - Template Menu ------------- -The *Text Editor* has some dedicated templates for Python scripts, Python Components and GLSL shaders, +*Text Editor* has some dedicated templates for Python scripts, Python Components and GLSL shaders, which are useful for writing tools, like a class/function/variable browser, completion... -.. figure:: /images/Editors/editors-text_editor-template_files.png - - Template files. +.. figure:: /images/editors/editors-text_editor-template_files.png + Template files Main View ========= Typing on the keyboard produces text in the text buffer. -As usual, pressing, dragging and releasing :kbd:`LMB` selects text. -Pressing :kbd:`RMB` opens the context menu. +As usual, pressing, dragging and releasing :kbd:`LMB` selects text. Pressing :kbd:`RMB` opens the context menu. .. tip:: - Text editor is handy also when you want to share your blend-files with others. I.e write a ``README`` text explaining the contents of your blend-file. Be sure to keep it visible when saving! - Sidebar ======= @@ -215,31 +239,25 @@ Find & Replace -------------- Find Text :kbd:`Ctrl-F` - Searches for instances of a text that occur after the cursor. - Using the eyedropper icon will search for the currently selected text - and sets the selection to the match. - *Find Next* searches for the next instance of the text. + Searches for instances of a text that occur after the cursor. Using the eyedropper icon will search for the currently selected text and sets the selection to the match. *Find Next* searches for the next instance of the text. Replace Text :kbd:`Ctrl-H` - Searches for the text specified in *Find Text* and replaces it with the new text. - Using the eyedropper icon will set the currently selected text as the replace text. - *Replace* searches for the next match and replaces it. - *Replace All* searches for the match and replaces all occurrences of the match with the new text. + Searches for the text specified in *Find Text* and replaces it with the new text. Using the eyedropper icon will set the currently selected text as the replace text. *Replace* searches for the next match and replaces it. *Replace All* searches for the match and replaces all occurrences of the match with the new text. Case Search is sensitive to upper-case and lower-case letters. + Wrap Search again from the start of the file when reaching the end. + All Search in all text data-blocks instead of only the active one. - Properties ---------- Margin - Shows a right margin to help keep line length at a reasonable length when scripting. - The width of the margin is specified in *Margin Column*. + Shows a right margin to help keep line length at a reasonable length when scripting. The width of the margin is specified in *Margin Column*. Font Size :kbd:`Ctrl-WheelUp` The size of the font used to display text. @@ -250,14 +268,10 @@ Tab Width Indentation Use *Tabs* or *Spaces* for indentations. - Footer ====== -The Text editor footer displays if the text is saved internal or external and -if there are unsaved changes to an external file. -For external files, this region also displays the file path to the text file. - +The Text editor footer displays if the text is saved internal or external and if there are unsaved changes to an external file. For external files, this region also displays the file path to the text file. Usage ===== @@ -265,12 +279,7 @@ Usage Running Scripts --------------- -The most notable keystroke is :kbd:`Alt-P` which makes the content of the buffer -being parsed by the internal Python interpreter built into UPBGE. -Before going on it is worth noticing that UPBGE comes with a fully functional Python interpreter built-in, -and with a lots of Blender/UPBGE-specific modules. +The most notable keystroke is :kbd:`Alt-P` which makes the content of the buffer being parsed by the internal Python interpreter built into UPBGE. Before going on it is worth noticing that UPBGE comes with a fully functional Python interpreter built-in, and with a lots of Blender/UPBGE-specific modules. .. warning:: - - This script execution takes place outside Game Engine, and it is intended for development purpose only. - If you want to execute a Python script inside the Game Engine check the :doc:`Python Scripting ` chapter. + This script execution takes place outside Game Engine, and it is intended for development purpose only. If you want to execute a Python script inside the Game Engine check the :doc:`Python Scripting ` chapter. diff --git a/source/manual/introduction/briefing.rst b/source/manual/introduction/briefing.rst index cb6459e6..a957153c 100644 --- a/source/manual/introduction/briefing.rst +++ b/source/manual/introduction/briefing.rst @@ -32,7 +32,7 @@ Blender Rises Located in beautiful Amsterdam, the Blender Foundation now oversees the development, distribution, and marketing of Blender. But because of the open source nature of the software, its development has been driven largely by volunteer contributors from across the world. -The Blender Foundation also created the Blender Institute, an animation and game studio that focuses on movie and game development using Blender. The Institute produced the movies **Elephants Dream**, **Big Buck Bunny**, **Sintel**, **Tears of Steel**, **Cosmos Laundromat** and the game **Yo, Frankie!**. These projects serve two main goals: The production process is an opportunity to improve Blender in a real studio environment, and the end result also serves as an advertisement for the software itself. +The Blender Foundation also created the Blender Institute, an animation and game studio that focuses on movie and game development using Blender. The Institute produced the movies ``Elephants Dream``, ``Big Buck Bunny``, ``Sintel``, ``Tears of Steel``, ``Cosmos Laundromat`` and the game ``Yo, Frankie!``. These projects serve two main goals: The production process is an opportunity to improve Blender in a real studio environment, and the end result also serves as an advertisement for the software itself. .. figure:: /images/introduction/02-blender_reel.jpg @@ -56,13 +56,13 @@ You already know that Blender is an open source 3D software that is capable of m The **Uchronia Project Blender Game Engine** (UPBGE) is a `Blender `__'s builtin tool derived from Blender Foundation's `Blender Game Engine `__ for real-time projects, from architectural visualizations and simulations to games. -Originally created by Tristan Porteries as a fork from the Blender Game Engine with the purpose to develop the Blender Game Engine in a faster way, became indepent with the Blender Foundation's announcement of BGE's removal when it reached to Blender 2.80. With this independency, the UPBGE's developers (former BGE developers) have freedom to change and add features that could not be changed before (because the possibility of an official Blender merge, now discarded). +Originally created by Tristan Porteries as a fork from the Blender Game Engine with the purpose to develop the Blender Game Engine in a faster way, became independent with the Blender Foundation's announcement of BGE's removal when it reached to Blender 2.80. With this independency, the UPBGE's developers (former BGE developers) have freedom to change and add features that could not be changed before (because the possibility of an official Blender merge, now discarded). Basically, due to its periodic synchronization with Blender source code (almost daily), UPBGE, as its acronym suggests, has become a Blender from a parallel universe in which the game engine was never removed. In any case, UPBGE is kriptonian for "hope". Who knows if in the future that parallel universe merges with our universe and we may add another line entitled "Justice League" to this beautiful story :-). -Until that time comes, UPBGE has adopted the new physically based and state-of-the-art real-time render engine, Eevee. This way all you can do in Blender/UPBGE editor you can translate it to the Game Engine. A truly WYSIWYG (What You See Is What You Get) Game Engine, the strongest UPBGE feature. +Until that time comes, UPBGE has adopted the new physically based and state-of-the-art real-time render engine, EEVEE. This way all you can do in Blender/UPBGE editor you can translate it to the Game Engine. A truly WYSIWYG (What You See Is What You Get) Game Engine, the strongest UPBGE feature. Of course, software exists to serve the users - that's you. Every time a Blender and/or UPBGE user creates a piece of artwork, it justifies, even if just a little, the enormous amount of time that went into creating the software. We hope that by picking up this manual, you are on your way to creating something amazing to share with the world. @@ -81,11 +81,11 @@ UPBGE have lots of `new features `__ language bindings, allowing support to even more libraries through the use of `PyPI `__. -- Development process entirely inside Blender, without needing to import/export assets, although most used formats are supported through import/export addons (FBX, Collada, glTF, obj, stl, etc). +- Development process entirely inside Blender, without needing to import/export assets, although most used formats are supported through import/export add-ons (FBX, Collada, glTF, obj, stl, etc). - Execution of game in Blender's viewport (for fast previewing) or on an standalone executable. -- Rendering powered by state of art Blender's EEVEE engine including PBR shading, SSR reflections, GTAO ambient occlusion, Bloom, Soft and contact shadows, Light probes for global ilumination, Volumetrics, etc. +- Rendering powered by state of art Blender's EEVEE engine including PBR shading, SSR reflections, GTAO ambient occlusion, Bloom, Soft and contact shadows, Light probes for global illumination, Volumetrics, etc. - Blender's `Linked Libraries `__ feature, allowing to organize projects in multiple blend files. diff --git a/source/manual/introduction/compatibility_notes.rst b/source/manual/introduction/compatibility_notes.rst index 7a6500c8..a700c21b 100644 --- a/source/manual/introduction/compatibility_notes.rst +++ b/source/manual/introduction/compatibility_notes.rst @@ -13,49 +13,54 @@ UPBGE is fully integrated into Blender environment, but it doesn't mean it suppo .. rubric:: Object types supported -- :ref:`datablock-armature` -- :ref:`datablock-camera` -- :ref:`datablock-collection` -- :ref:`datablock-empty` -- :ref:`datablock-light` -- :ref:`datablock-mesh` -- :ref:`datablock-object` -- :ref:`datablock-text` +- Armature +- Camera +- Collection +- Empty +- Light +- Mesh +- Object +- Text -.. important:: Any other object type (like Curve, Speaker, Force Field, etc) will not be rendered into game. A Curve Object can be converted to :ref:`datablock-mesh` though. +.. important:: + Any other object type (like Curve, Speaker, Force Field, etc) will not be rendered into game. A Curve Object can be converted to Mesh though. .. _data_blocks_supported: .. rubric:: Data-blocks supported -- :ref:`datablock-action` -- :ref:`datablock-armature` -- :ref:`datablock-camera` -- :ref:`datablock-collection` -- :ref:`datablock-image` -- :ref:`datablock-light` -- :ref:`datablock-library` -- :ref:`datablock-material` -- :ref:`datablock-mesh` -- :ref:`datablock-object` -- :ref:`datablock-scene` -- Shapekey (along with :ref:`datablock-action`, otherwise unused) -- :ref:`datablock-sound` -- :ref:`datablock-text` -- :ref:`datablock-texture` -- :ref:`datablock-world` -- Particle (partially supported) - -.. important:: Any other data-block type (like Line Styles, Brushes, etc) have no use or will not be rendered into game. +- Action +- Armature +- Camera +- Collection +- Image +- Light +- Library +- Material +- Mesh +- Object +- Scene +- Shapekey (with Action, otherwise unused) +- Sound +- Text +- Texture +- World +- Particle (partially supported) + +.. important:: + Any other data-block type (like Line Styles, Brushes, etc) have no use or will not be rendered into game. UPBGE VS BGE ============================== BGE also have some incompatibilities with UPBGE. UPBGE can partially load and execute games made in BGE, but a game made in UPBGE can't be executed in BGE, resulting in several issues like: -- Logic can't run most of the times. -- Materials get messed up. -- UPBGE do not support Multitexture material mode anymore. Set to GLSL when in vanilla BGE. -- Sometimes physics simulation get messed up. +- Logic can't run most of the times. + +- Materials get messed up. + +- UPBGE do not support Multitexture material mode anymore. Set to GLSL when in vanilla BGE. + +- Sometimes physics simulation get messed up. Along with this compatibility with BGE, UPBGE comes with features not supported by BGE, like Modifiers applied automatically at game start (instead of discarded, as in BGE). diff --git a/source/manual/introduction/deeper_look.rst b/source/manual/introduction/deeper_look.rst index ed911ac7..b870dc15 100644 --- a/source/manual/introduction/deeper_look.rst +++ b/source/manual/introduction/deeper_look.rst @@ -9,7 +9,7 @@ Use Cases UPBGE allows you to create real-time interactive 3D applications or simulations. This allows you to create almost any type of interactive project, like architectural presentations, virtual prototypes for robotic projects, physics simulation projects, simple and complex games, and much more. -Much can be achieved through UPBGE by default, as it provides a blank canvas full of features to be used, and even more can be acomplished by extending these features according to your needs. For example, if you're working with robotics and needs to send or receive commands through a USB port, you can install the `PySerial `__ Python module for use with UPBGE. Or if you need a graphical feature that can't be acomplished through the default UPBGE's capabilities, you can write your own OpenGL shaders. The list goes on, and there's a big chance that the project you aim to can be brought to life with UPBGE, using its features and abilities to be extended. +Much can be achieved through UPBGE by default, as it provides a blank canvas full of features to be used, and even more can be accomplished by extending these features according to your needs. For example, if you're working with robotics and needs to send or receive commands through a USB port, you can install the `PySerial `__ Python module for use with UPBGE. Or if you need a graphical feature that can't be accomplished through the default UPBGE's capabilities, you can write your own OpenGL shaders. The list goes on, and there's a big chance that the project you aim to can be brought to life with UPBGE, using its features and abilities to be extended. Sample Games ++++++++++++++++++++++++++++++ @@ -35,7 +35,7 @@ Here are some examples of games made with BGE/UPBGE: ``Game Name / Creator Name:`` The Future's End by Mark Telles produced with UPBGE 0.2.5. .. - .. youtube:: 3krdf9xRgw4 + .. youtube:: 3krdf9xRgw4 .. ``Game Name / Creator Name:`` Spaceship Test by Atomic Skill produced with UPBGE 0.3. diff --git a/source/manual/logic/actuators/editing.rst b/source/manual/logic/actuators/editing.rst deleted file mode 100644 index 1f1f5ba4..00000000 --- a/source/manual/logic/actuators/editing.rst +++ /dev/null @@ -1,74 +0,0 @@ - -**************** -Actuator Editing -**************** - -.. figure:: /images/Logic/Actuators/logic-actuators-editing-column.png - - Actuator Column with a typical actuator. - -UPBGE actuators can be set up and edited in the right-hand column of the Logic Panel. -This page describes the general column controls, -and also those parameters which are common to all individual actuator types. - -The image shows a typical actuator column with a single example actuator. -At the top of this column, the column heading includes menus and buttons to control which of -all the actuators in the current Game Logic are displayed. - - -Column Heading -============== - -.. figure:: /images/Logic/Actuators/logic-actuators-editing-column1.png - - Actuator Column heading. - -The column headings contain controls to set which actuators are displayed, and the level of detail given, in the actuator column. -This is very useful for hiding unnecessary actuators, -so that the necessary ones are visible and easier to reach. -Both these can be controlled individually. - - -Actuators -========= - -Show Objects - Expands all objects. -Hide Objects - Collapses all objects to just a bar with their name. -Show Actuators - Expands all actuators. -Hide Actuators - Collapses all actuators to bars with their names. - -It is also possible to filter which actuators are viewed using the four heading buttons: - -Sel - Shows all actuators for selected objects. -Act - Shows only actuators belonging to the active object. -Link - Shows actuators which have a link to a controller. -State - Only actuators connected to a controller with active states are shown. - - -Object Heading -============== - -.. figure:: /images/Logic/Actuators/logic-actuators-editing-column2.png - - Actuator Object heading. - -In the column list, actuators are grouped by object. By default, -actuators for every selected object appear in the list, -but this may be modified by the column heading filters. - -At the head of each displayed object sensor list, two entries appear: - -Name - The name of the object. -Add - When clicked, a menu appears with the available actuator types. - Selecting an entry adds a new actuator to the object. - See :doc:`Actuators <./index>` for list of available actuator types. diff --git a/source/manual/logic/actuators/introduction.rst b/source/manual/logic/actuators/introduction.rst deleted file mode 100644 index 011af88b..00000000 --- a/source/manual/logic/actuators/introduction.rst +++ /dev/null @@ -1,46 +0,0 @@ -.. |movement-button| image:: /images/Logic/logic-common-options-icons-movement.png - -.. |pin-button| image:: /images/Logic/logic-common-options-icons-pin.png - -.. |down-button| image:: /images/Logic/logic-common-options-icons-down.png - -************ -Introduction -************ - -Actuators perform actions, such as move, create objects, play a sound. -The actuators initiate their functions when they get a positive pulse from one (or more) -of their controllers. - -The logic blocks for all types of actuator may be constructed and changed using -the Logic Bricks Editor; details of this process are given -in the :doc:`Actuator Editing <./editing>` page. - - -.. _game-engine-logic-actuators-common-options: - -Common Options -============== - -.. figure:: /images/Logic/Actuators/logic-actuators-common_options-column.png - - Common Actuator options. - -All actuators have a set of common buttons, fields and menus. They are organized as follows: - -Triangle button |down-button| - Collapses the sensor information to a single line (toggle). -Actuator type menu - Specifies the type of the sensor. -Actuator name - The name of the actuator. This can be selected by the user. - It is used to access actuators with Python; it needs to be unique among the selected objects. -Pin button |pin-button| - Display the actuator even when it is not linked to a visible states controller. -Movement buttons |movement-button| - Move the actuator up or down over other actuators within the column. -Checkbox button - When unchecked the actuator is deactivated, no action will be done. - Very useful to check different logics without unlink or delete the actuator. -``X`` button - Deletes the actuator. diff --git a/source/manual/logic/actuators/types/collection.rst b/source/manual/logic/actuators/types/collection.rst deleted file mode 100644 index 448038ab..00000000 --- a/source/manual/logic/actuators/types/collection.rst +++ /dev/null @@ -1,65 +0,0 @@ -.. _bpy.types.CollectionActuator: - -******************* -Collection Actuator -******************* - -.. seealso:: - See the Python reference of this logic brick in :class:`SCA_CollectionActuator`. - -The *Collection Actuator* manages the what the user can see through their view. This can be a inventory, ammunition and other UI. - -.. figure:: /images/Logic/Actuators/logic-actuators-types-collection-collection.png - - Collection Actuator. - -Properties -========== - -Collection - Select which collection you want to manipulate. - -Logic - Resume/suspend sensors in the selected collection. - -Physics - Resume/suspend physics in the selected collections objects. - -Visibility - Resume/suspend visibility of the selected collections objects. - -Suspend Collection ------------------- - -Suspends the view of the collection. - -.. figure:: /images/Logic/Actuators/logic-actuators-types-collection-suspend_collection.png - - Suspend Collection. - -Resume Collection ------------------ - -Resumes the view of the collection. - -.. figure:: /images/Logic/Actuators/logic-actuators-types-collection-resume_collection.png - - Resume Collection. - -Add Overlay Collection ----------------------- - -Adds a new overlay collection. - -.. figure:: /images/Logic/Actuators/logic-actuators-types-collection-add_overlay_collection.png - - Add Overlay Collection. - -Remove Overlay Collection -------------------------- - -Removes the overlay collection. - -.. figure:: /images/Logic/Actuators/logic-actuators-types-collection-remove_overlay_collection.png - - Remove Overlay Collection. diff --git a/source/manual/logic/actuators/types/filter_2d.rst b/source/manual/logic/actuators/types/filter_2d.rst deleted file mode 100644 index 28dc97e5..00000000 --- a/source/manual/logic/actuators/types/filter_2d.rst +++ /dev/null @@ -1,116 +0,0 @@ -.. _bpy.types.Filter2DActuator: - -****************** -Filter 2D Actuator -****************** - -.. seealso:: - See the Python reference of this logic brick in :class:`SCA_2DFilterActuator`. - -The *Filter 2D Actuator* adds image filters, that apply on final render of objects. -There are several 2D filters each listed below. Most are self-explanatory, however, -some are special and will be described in detail later. - -- Custom Filter -- Invert -- Sepia -- Gray Scale -- Prewitt -- Sobel -- Laplacian -- Erosion -- Dilation -- Sharpen -- Blur -- Motion Blur (currently not working) -- Remove Filter -- Disable Filter -- Enable Filter - -.. figure:: /images/Logic/Actuators/logic-actuators-types-filter_2d-filter_2d.png - - Filter 2D actuator. - - -Properties -========== - -Filter 2D Type - Selects the type of 2D filter to use. All 2D filters are rendered with fragment shaders - so your hardware must support fragment shaders. Several of the filters are called "built-in filters", - these are: Blur, Sharpen, Dilation, Erosion, Laplacian, Sobel, Prewitt, Gray Scale, Sepia, and Invert. - There are however some filters that work differently from the ones above and are described separately. - - .. figure:: /images/Logic/Actuators/logic-actuators-types-filter_2d-built_in_filters.png - - Built-in Filters. -Pass Number - The pass number for the filter to use. - -Details of special filters are described below. - - -Enable/Disable Filters ----------------------- - -There are two filters which can be used to either *Enable* or *Disable* other filters. - -To enable/disable a filter on a specific pass: - -#. Create appropriate sensor(s) and controller(s). -#. Create a *2D Filter* actuator. -#. Select either *Enable Filter* or *Disable Filter* depending on what you want to do. -#. Set the pass number you want to disable the filter on it. - - -Removing Filters ----------------- - -The *Remove Filter* is used to remove other 2D filters. - -To remove a filter on a specific pass: - -#. Create appropriate sensor(s) and controller(s). -#. Create a *2D Filter* actuator. -#. Select *Remove Filter*. -#. Set the pass number you want to remove the filter from it. - - -Custom Filters -============== - -Custom filters give you the ability to define your own 2D filter using GLSL. -Its usage is the same as built-in filters, -but you must select *Custom Filter* in *2D Filter* actuator, -then write shader program into the Text Editor, and then place shader script name on actuator. - -.. figure:: /images/Logic/Actuators/logic-actuators-types-filter_2d-custom_filter.png - - 2D Filters: Custom Filter. - -FXAA Antialiasing Example: - -.. figure:: /images/Logic/Actuators/logic-actuators-types-filter_2d-custom_filter1.png - - Custom Filter: FXAA Antialiasing Filter. - -At *Text Editor* under Templates / OpenGL Shading Language there is a FXAA antialiasing filter -that can be used as a *Custom Filter*. Once opened in the *Text Editor* can be used in -the *2D Filter* actuator under *Custom Filter* option. - - -Examples -======== - -Built-in Filters ----------------- - -.. list-table:: - - * - .. figure:: /images/Logic/Actuators/logic-actuators-types-filter_2d-sepia_render_full.jpg - - Sepia Filter. - - - .. figure:: /images/Logic/Actuators/logic-actuators-types-filter_2d-sobel_render_full.jpg - - Sobel Filter. diff --git a/source/manual/logic/actuators/types/motion.rst b/source/manual/logic/actuators/types/motion.rst deleted file mode 100644 index ba27c555..00000000 --- a/source/manual/logic/actuators/types/motion.rst +++ /dev/null @@ -1,154 +0,0 @@ -.. _bpy.types.ObjectActuator: - -.. _actuator-motion: - -*************** -Motion Actuator -*************** - -.. seealso:: - See the Python reference of this logic brick in :class:`SCA_ObjectActuator`. - -The *Motion Actuator* sets an object into motion. There are three modes of operation, Simple, Servo and Character, -in which the object can either teleport and rotate, or dynamically move. - -.. figure:: /images/Logic/Actuators/logic-actuators-types-motion-motion.png - - Motion Actuator - -Properties -========== - -Motion Type - Determines the type of motion: - - Simple Motion - Applies a change in location and/or rotation directly. - Servo Control - Sets a target speed, and also how quickly it reaches that speed. - Character Motion - Sets the speed and direction the character is traveling. - This should be used instead of *Simple Motion* to properly move a character. - - .. note:: - - This actuator will only work if the object physics type is set to Character. - - -Simple Motion -============= - -*Simple Motion* gives control over position and velocity, -but does this as an instant displacement; the object never -passes any of the coordinates between the start and end positions. -This can interfere with the physical simulation of other objects, -and can cause an object to go through another object. -The `Servo Control`_ actuator does not suffer from this, -since it produces physically correct velocities, -and leaves updating the position to the physics simulation. - -.. figure:: /images/Logic/Actuators/logic-actuators-types-motion-simple.png - - Motion actuator for Simple Motion. - -Loc - The object jumps the number of Blender units entered, - each time a pulse is received. -Rot - The object rotates by the specified amount, - each time a pulse is received. -L - Coordinates specified are Global (deactivated) or Local (actived). - -.. figure:: /images/Logic/Actuators/logic-actuators-types-motion-simple1.png - - Simple Motion for a dynamic object. - -Servo Control -============= - -The Servo Control actuator influences the velocity of a game object by applying forces, -resulting in correct behavior when colliding with other objects controlled by the physics simulation. -The amount of force necessary is determined by a `PID controller `__, -a type of controller that is often used in control systems. -This actuator controls position or rotation only indirectly. - -Controlling the position is not necessary in that respect; that is -left to a player moving the object via direction-type controls -(such as the WASD keys in a first person shooter). In such a scenario, -each direction-key sensor should be attached to a different Servo Control -actuator setting a different target velocity. - -.. tip:: - - To use the Servo Control actuator, it is necessary to set - the object's Physics Type to "Dynamic" or "Rigid Body", - and to mark the object as "Actor" in the same panel. - This actuator does not work with the Character physics type. - -.. figure:: /images/Logic/Actuators/logic-actuators-types-motion-servo.png - - Motion actuator for Servo Control. - -Reference Object - Specifies the object which the actuator uses as a reference for the velocity. - When set, it will use a velocity relative to that object - instead of absolute (i.e. world-relative) velocity. - Use this for a player object standing on a moving platform. - -Servo Type - Linear Velocity - The target linear velocity for the object. - Angular Velocity - The target angular velocity for the object. -L - Determines whether the Linear Velocity specified are in Local - (button depressed) or Global (button released) coordinates. -X, Y, Z force limits - Sets minimum and maximum limits for the force applied to the object. - If disabled (i.e. X, Y or Z buttons are depressed) the force applied is unlimited. - -The following three coefficients determine the response to the *velocity error*, -which is the difference between the target velocity and the object's actual velocity. - -Proportional Coefficient - This controls the reaction proportional to the velocity error. - Small values cause smooth (but possibly too slow) changes in velocity. - Higher values cause rapid changes, but may cause overshooting. -Integral Coefficient - This controls the reaction to the sum of errors so far. Using only - the Proportional component results in a systematic velocity error - if there is friction: some velocity delta is necessary to produce - the force that compensates the friction. Using the Integral - component suppresses this effect (the target velocity is achieved - on average) but can create oscillations; the control will speed to - compensate the initial velocity error. To avoid the oscillation, - the Proportional component must be used with the Integral component - (the Proportional component damps the control) This is why the GUI - sets the Proportional Coefficient systematically when you change - the Integral Coefficient. -Derivative Coefficient - Set the Derivative Coefficient. This dampens the acceleration when - the target velocity is almost reached. - - -Character Motion -================ - -.. figure:: /images/Logic/Actuators/logic-actuators-types-motion-character.png - - Motion actuator for Character Motion. - -Loc - The character moves the number of Blender units entered, - each time a pulse is received. -Rot - The character rotates by the specified amount, - each time a pulse is received. -L - Coordinates specified are Global (deactivated) or Local (actived). -Add - The movement is incorporated to the movement performed by others character motion actuators - doing the movement more fluid. -Jump - Make the character jump using the settings in the physics properties (Jump Force and Max Jumps). diff --git a/source/manual/logic/actuators/types/property.rst b/source/manual/logic/actuators/types/property.rst deleted file mode 100644 index b6d851fd..00000000 --- a/source/manual/logic/actuators/types/property.rst +++ /dev/null @@ -1,64 +0,0 @@ -.. _bpy.types.PropertyActuator: - -.. _actuator-property: - -***************** -Property Actuator -***************** - -.. seealso:: - See the Python reference of this logic brick in :class:`SCA_PropertyActuator`. - -The *Property Actuator* changes the value of a given property (like assigning, adding, or copying) -once the actuator itself is activated. - -.. figure:: /images/Logic/Actuators/logic-actuators-types-property-property.png - - Property Actuator. - - -Properties -========== - -Mode - Assign - The *Property* target property will become equal to the set *Value* once the actuator is activated. - Add - Adds *Value* to the value of the property *Property* once the actuator is activated - (enter a negative value to decrease). - For *Bool*, a value other than 0 (also negative) is counted as True. - Copy - Copies a property from another *Object* to a property of the actuator owner once the actuator is activated. - Toggle - Switches 0 to 1 and any other number than 0 to 0 once the actuator is activated. Useful for on/off switches. - Level - TODO. - -Property - The target property that this actuator will change. -Value - The value to be used to change the property. - - -Example -======= - -You have a character, it has a property named "hp" (hit/health points) -to determine when he has taken enough damage to die. ``hp`` is an int with the start value of 100. - -.. figure:: /images/Logic/Actuators/logic-actuators-types-property-example.png - - ``hp`` Property. - -You set up two *Collision* sensors, one for enemy bullets, and one for picking up more health. -The first one is connected (through an *AND* controller) to an *Add Property* actuator with -the property ``hp`` and the value -10. Every time the player is hit by an enemy bullet he loses 10 HP. -The other sensor is connected (through an *AND* controller) to an other *Add Property* actuator, -this one with the value 50. So every time the player collides with a health item the HP increases by 50. -Next you set up a *Property* sensor for an interval, greater than 100. -This is connected (through an *AND* controller) to an *Assign Property* actuator which is set to 100. -So if the players HP increases over 100 it is set to 100. - -.. figure:: /images/Logic/Actuators/logic-actuators-types-property-example1.png - - Property logic. diff --git a/source/manual/logic/actuators/types/random.rst b/source/manual/logic/actuators/types/random.rst deleted file mode 100644 index 782734dd..00000000 --- a/source/manual/logic/actuators/types/random.rst +++ /dev/null @@ -1,118 +0,0 @@ -.. _bpy.types.RandomActuator: - -*************** -Random Actuator -*************** - -.. seealso:: - See the Python reference of this logic brick in :class:`SCA_RandomActuator`. - -The *Random Actuator* creates a random value which can be stored in a property of the object. - -.. figure:: /images/Logic/Actuators/logic-actuators-types-random-random.png - - Random Actuator. - - -Properties -========== - -Seed - Starting seed for random generator. -Property - Property where to store the random value. - - -Distribution ------------- - -Distributions from which to select the random value. The default entry of *Boolean Constant* -gives either True or False, which is useful for test purposes. - -Each distribution has one common property called: *Property*. -This can be either a float, integer, or a boolean depending on the distribution type. - -Float Neg. Exp. - .. figure:: /images/Logic/Actuators/logic-actuators-types-random-float_neg_exp.png - - Distribution: Float Neg. Exp. - - Values drop off exponentially with the specified half-life time. - - Half-Life Time - Half-life time. - -Float Normal - .. figure:: /images/Logic/Actuators/logic-actuators-types-random-float_normal.png - - Distribution: Float Normal. - - Random numbers from a normal distribution. - - Mean - Mean of normal distribution. - SD - Standard deviation of normal distribution. - -Float Uniform - .. figure:: /images/Logic/Actuators/logic-actuators-types-random-float_uniform.png - - Distribution: Float Uniform. - - Random values selected uniformly between a minimum (*Min*) and maximum (*Max*) values. - -Float Constant - .. figure:: /images/Logic/Actuators/logic-actuators-types-random-float_constant.png - - Distribution: Float Constant. - - Returns a constant value specified in the *Value* field. - -Int Poisson - .. figure:: /images/Logic/Actuators/logic-actuators-types-random-int_poisson.png - - Distribution: Int Poisson. - - Random numbers from a `Poisson distribution `__. - The mean of the equation is defined by the *Mean* value. - -Int Uniform - .. figure:: /images/Logic/Actuators/logic-actuators-types-random-int_uniform.png - - Distribution: Int Uniform. - - Random values selected uniformly between a minimum (*Min*) and maximum (*Max*) values. - -Int Constant - .. figure:: /images/Logic/Actuators/logic-actuators-types-random-int_constant.png - - Distribution: Int Constant. - - Returns a constant value specified by the *Value* field. - -Bool Bernoulli - .. figure:: /images/Logic/Actuators/logic-actuators-types-random-bool_bernoulli.png - - Distribution: Bool Bernoulli. - - Returns a random distribution using - the `Bernoulli distribution `__ - with specified ratio of ``TRUE`` pulses. This ratio is calculated by the *Chance* value. - -Bool Uniform - .. figure:: /images/Logic/Actuators/logic-actuators-types-random-bool_uniform.png - - Distribution: Bool Uniform. - - A 50/50 chance of obtaining True/False. - -Bool Constant - .. figure:: /images/Logic/Actuators/logic-actuators-types-random-bool_constant.png - - Distribution: Bool Constant. - - Returns a constant value specified in the *Value* field, must be either ``True`` or ``False``. - - -Example -======= diff --git a/source/manual/logic/actuators/types/state.rst b/source/manual/logic/actuators/types/state.rst deleted file mode 100644 index 589f747d..00000000 --- a/source/manual/logic/actuators/types/state.rst +++ /dev/null @@ -1,40 +0,0 @@ -.. _bpy.types.StateActuator: - -************** -State Actuator -************** - -.. seealso:: - See the Python reference of this logic brick in :class:`SCA_StateActuator`. - -The *State Actuator* allows the user to create complex logic, -while retaining a clear user interface. It does this by having different states, -and performing operations upon them. - -.. note:: - - With the state actuator, you can create tiers of logic, - without the need for hundreds of properties. Use it well, and you benefit greatly, - but often problems may be circumvented by Python. - -.. figure:: /images/Logic/Actuators/logic-actuators-types-state-state.png - - State actuator. - - -Properties -========== - -Operation - Change State - Change from the current state to the state specified. - Remove State - Removes the specified states from the active states (deactivates them). - Add State - Adds the specified states to the active states (activates them). - Set State - Moves from the current state to the state specified, deactivating other added states. - - -Example -======= diff --git a/source/manual/logic/controllers/editing.rst b/source/manual/logic/controllers/editing.rst deleted file mode 100644 index e654cf3a..00000000 --- a/source/manual/logic/controllers/editing.rst +++ /dev/null @@ -1,127 +0,0 @@ -.. |true-button| image:: /images/Logic/logic-common-options-icons-true.png - -.. |false-button| image:: /images/Logic/logic-common-options-icons-false.png - -.. |movement-button| image:: /images/Logic/logic-common-options-icons-movement.png - -.. |down-button| image:: /images/Logic/logic-common-options-icons-down.png - -.. |preference-button| image:: /images/Logic/logic-common-options-icons-preference.png - -****************** -Controller Editing -****************** - -.. figure:: /images/Logic/Controllers/logic-controllers-editing-column.png - - Controller Column with a typical sensor. - -UPBGE controllers can be set up and edited in the central column of the Logic Bricks Panel. -This page describes the general column controls, -those parameters which are common to all individual controller types, -and how different states for the objects in the logic system can be set up and edited. - -The image shows a typical controller column with a single controller. -At the top of this column, and for sensors and actuators, the column heading includes menus -and buttons to control which of all the controllers in the current Game Logic are displayed. - - -Column Heading -============== - -.. figure:: /images/Logic/Controllers/logic-controllers-editing-column1.png - - Controller Column headings. - -The column headings contain controls to set which controllers appear, -and the level of detail given, in the controller column. This is very useful for hiding -unnecessary controllers so that the necessary ones are visible and easier to reach. -Both these can be controlled individually. - - -Controllers -=========== - -Show Objects - Expands all objects. - -Hide Objects - Collapses all objects to just a bar with their name. - -Show Controllers - Expands all Controllers. - -Hide Controllers - Collapses all Controllers to bars with their names. - -It is also possible to filter which controllers are viewed using the three heading buttons: - -Sel - Shows all controllers for selected objects. - -Act - Shows only controllers belonging to the active object. - -Link - Shows controllers which have a link to actuators/sensors. - - -Object Heading -============== - -.. figure:: /images/Logic/Controllers/logic-controllers-editing-column2.png - -.. figure:: /images/Logic/Controllers/logic-controllers-editing-column3.png - -In the column list, controllers are grouped by object. By default, controllers for every -selected object appear in the list, but this may be modified by the column heading filters. - -At the head of each displayed object controller list, three entries appear: - -Triangle button |down-button| - Shows which states are in use for the object (toggle). - Detailed description of the marked panel is given in :doc:`States `. - -Name - The name of the object. - -Add Controller - When clicked, a menu appears with the available controller types. Selecting an entry - adds a new controller to the object. See :doc:`Controllers ` - for a list of available controller types. - -Standard Controller Parts -========================= - -.. _standard-controller-parts: - -The controller heading is standard to every controller. - -.. figure:: /images/Logic/Controllers/logic-controllers-editing-column4.png - -Triangle button |down-button| - Collapses the sensor information to a single line (toggle). - -Controller Type menu - Specifies the type of the controller. - -Controller Name - The name of the controller. This can be selected by the user. It is used to access - controllers with Python; it needs to be unique among the selected objects. - -Preference Button |preference-button| - If on, this controller will operate before all other non-preference controllers - (useful for start-up scripts). - -Movement buttons |movement-button| - Move the sensor up or down over other sensors within the column. - -Checkbox button - When unchecked the controller is deactivated, no pulses will be sent to the connected - actuators. Very useful to check different logics without unlink or delete the controller. - -``X`` Button - Deletes the controller. - -Visible State - Sets the designated state for which this controller will operate. diff --git a/source/manual/logic/controllers/introduction.rst b/source/manual/logic/controllers/introduction.rst deleted file mode 100644 index cf7c1476..00000000 --- a/source/manual/logic/controllers/introduction.rst +++ /dev/null @@ -1,82 +0,0 @@ - -************ -Introduction -************ - -The controllers are the bricks that collect data sent by the sensors, -and also specify the state for which they operate. After performing the specified logic operations, -they send out pulse signals to drive the actuators to which they are connected. - -When a sensor is activated, it sends out a positive pulse, and when it is deactivated, -it sends out a negative pulse. -The controllers' job is to check and combine these pulses to trigger the proper response. - -The logic blocks for all types of controller may be constructed and changed using -the Logic Editor; details of this process are given -in the :doc:`Controller Editing <./editing>` page. - - -Controller Types -================ - -There are eight types of controller logic brick to carry out the logic process on -the input signal(s). -This table gives a quick overview of the logic operations performed by -the logical controller types. The first column, input, -represents the number of positive pulses sent from the connected sensors. -The following columns represent each controller's response to those pulses. -True means the conditions of the controller are fulfilled, -and the actuators it is connected to will be activated; -false means the controller's conditions are not met and nothing will happen. Please consult -the individual controller pages for a more detailed description of each controller. - -.. note:: - - It is assumed that more than one sensor is connected to the controller. - For only one sensor, consult the "All" line. - -.. list-table:: - :header-rows: 1 - - * - Positive sensors - - Controllers - - .. - - .. - - .. - - .. - - .. - * - .. - - :doc:`AND <./types/and>` - - :doc:`OR <./types/or>` - - :doc:`XOR <./types/xor>` - - :doc:`NAND <./types/nand>` - - :doc:`NOR <./types/nor>` - - :doc:`XNOR <./types/xnor>` - * - None - - False - - False - - False - - True - - True - - True - * - One - - False - - True - - True - - True - - False - - False - * - Multiple, not all - - False - - True - - False - - True - - False - - True - * - All - - True - - True - - False - - False - - False - - True diff --git a/source/manual/logic/controllers/types/nand.rst b/source/manual/logic/controllers/types/nand.rst deleted file mode 100644 index 8bf800d2..00000000 --- a/source/manual/logic/controllers/types/nand.rst +++ /dev/null @@ -1,29 +0,0 @@ - -*************** -NAND Controller -*************** - -.. seealso:: - See the Python reference of this logic brick in :class:`SCA_NANDController`. - -This controller *activates* all connected actuators if: - -- The game object is in the designated state. -- At least one connected sensor triggers the controller. -- At least one connected sensor evaluated False. - -This controller *deactivates* all connected actuators if: - -- The game object is in the designated state. -- At least one connected sensor triggers the controller. -- *All* connected sensor evaluated True. - - -Options -======= - -.. figure:: /images/Logic/Controllers/logic-controllers-types-nand-nand.png - - NAND Controller. - -See :ref:`standard controller parts ` for descriptions of the remaining options. diff --git a/source/manual/logic/introduction.rst b/source/manual/logic/introduction.rst deleted file mode 100644 index 197dee7d..00000000 --- a/source/manual/logic/introduction.rst +++ /dev/null @@ -1,122 +0,0 @@ -.. _logic-introduction: - -============ -Introduction -============ - -What makes a game different than a movie? Let's see. In both you can find yourself buried in a -comfortable seat eating junk food and alienated from the world. And funny 3D goggles are not exclusive -to either. But what about interactivity? In a game you can control a player and interact with the -virtual (or real!) world and the game elements. The story can be dynamically created in front of your eyes. - -Therefore, as a director and content creator you will play different roles in a movie or a game. In a movie, -for example, you have to direct the flow of the story, but for a game, you have to direct how the player -controls and experiences this flow. More than ever, it's time to narrow the gap between what technology can -deliver and what the public can experiment with and assimilate as part of their own nature. It is necessary -to give *all the power to the user*. - -Traditionally, to design your game interaction in the past, you would have needed coding expertise and a highly -technical background. If, as a creative artist, any words such as technical, code, or programming scare -you, Have confidence! "Pure artists" are still scared with code. The idea here is not that they will no longer -be afraid of it. Instead, with the UPBGE they will not have to face their fears. *Logic Bricks* are an alternative -to hardcore coding, known to be "artists friendly" more. *Logic Bricks* is here to rescue you. *Logic Bricks* is a -visual set of tools responsible for integrating the game components together. By using *Logic Bricks*, you can -determine what to do after a mouse click, when to play an animation, how to move your character, and so on, as -shown in following picture. - -.. figure:: /images/Logic/logic-logic-bricks-editor.png - - Logic Bricks Editor. - -.. note:: - - Logic Bricks is high level visual programming. - -*Logic Bricks* system is the default "scripting" layer in the Game Engine. -Each *Game Object* in the game may store a collection of logical components (Logic Bricks) -which control its behavior within the scene. *Logic bricks* can be combined to perform -user-defined actions that determine the progression of the simulation. - ------------- -Logic Bricks ------------- - -The main part of *Logic Bricks* system can be set up through a graphical interface, -the Logic Bricks Editor, and therefore does not require detailed programming knowledge. -Logic is set up as blocks (or "bricks") which represent preprogrammed functions; -these can be tweaked and combined to create the game/application. - -The *Logic Brick* system is composed of three main elements: -:doc:`Sensors `, -:doc:`Controllers ` and -:doc:`Actuators `. Sensors are an event system -used to trigger an action upon a specific event (for example, an object collides -with another object or the joystick is used). Once one or more sensors is triggered, -you can use a controller to control whether or not this set of events will produce -an event in the game (and which effect). Controllers work as logic pipes, evaluating -sensors through simple logic conditions, such as And, Or, and Not. Finally, when a -controller validates a set of sensors, it will activate an actuator. An actuator is -responsible for a specific action of the game (such as ending the game, moving an -object, and so on). - -In this chapter, we'll cover sensors, controllers, and actuators in detail specifically, -how and when to use them. Additionally, you will learn about object game properties, -the State Machine system, how the interface works, and the architecture of the system -as a whole. As a system used to build new worlds, this is no place for do's and don'ts. -It will be up to you to find the best set of features that fits your project and -creativity. Nevertheless, when possible, we'll present suggestions of when and how -people have used the tools in the past, but you don't have to feel constrained by that. -Treat Logic Bricks as small Lego pieces and surprise us and yourself. - -.. note:: - - Logic Bricks are really easy and quick to use. You can make entire games with them with - absolutely no need for coding. - ----------- -Properties ----------- - -:doc:`Properties ` are like variables in other programming languages. -They are used to save and access data values either for the whole game (e.g. scores), -or for particular objects/players (e.g. names). -However, in the UPBGE, a property is associated with an object. -Properties can be of different types, -and are set up in a special area of the Logic Editor. - ------- -States ------- - -Another useful feature is object :doc:`States `. -At any time while the simulation is running, -the object will process any logic which belongs to the current state of the object. -States can be used to define groups of behavior -- e.g. an actor object may be "sleeping", "awake" or "dead", -and its logic behavior may be different in each of these three states. The states of an object are set up, -displayed and edited in the Controller logic bricks for the object. - ------------- -Architecture ------------- - -The game engine was designed to revolve around game objects. Twenty years ago, when it was first developed, this -was a breakthrough design. The idea of having events controlled per object, as opposed to a central controller, -worked well for the early days of 3D engines. Nowadays, some people may advocate that controlling elements per object -is less scalable and more difficult to manage. That will be up to you to decide. Regardless of your thoughts on that -subject, the game engine still allows you to emulate a centralized controlling system, while giving autonomy to each -object to deal with its own business. Part of this flexibility is due to the hooked-up Python layer and the -Logic Brick system. Through the Python interface, you can replace or at least control most of the effects and logic -setups you create with Logic Bricks. With Logic Bricks, you can quickly set up a system that is easy to visualize, -implement, and test. The strength of the game engine comes from the trade-off between the two sibling systems. -A flexible design may lack features and performance compared to specific engines. Nevertheless, the different kinds -of applications you can prototype and develop quickly with the game engine make up for the compromise. - -If you look at a level deep into the object structure, you will find that the architecture of the Logic Bricks -system is "controller-centric." It revolves around the controllers of the game because they are the ones to determine -what do to with the sensors and what actuators to activate. This doesn't have to be followed strictly, but based on -this design, you will want to keep your sensors and actuators to a minimum and optimize their usage with the -controllers. Actually, in order to optimize the performance, the game engine disables any sensor and actuator that -is unlinked to a controller or linked to a controller in a non-active state. This is one of the (many) reasons why -Python controllers are so popular. They allow you to replace the use of multiple sensors and actuators by direct -calls to their equivalents in the source code. The chapter :doc:`Python Scripting ` is entirely -dedicated to that aspect of the game engine, and will complement the applications of Logic Bricks discussed in this chapter. diff --git a/source/manual/logic/properties.rst b/source/manual/logic/properties.rst deleted file mode 100644 index 9cc444ec..00000000 --- a/source/manual/logic/properties.rst +++ /dev/null @@ -1,87 +0,0 @@ -.. |info-button| image:: /images/Logic/logic-common-options-icons-info.png - -.. |movement-button| image:: /images/Logic/logic-common-options-icons-movement.png - -.. _logic-properties: - -========== -Properties -========== - -Properties are the game logic equivalent to variables. They are stored with the object, -and can be used to represent things about them such as ammo, health, name, and so on. - - -.. _game-engine-property-types: - -.. _logic-properties-types: - --------------- -Property Types --------------- - -There are five types of properties: - -Timer - Starts at the property value and counts upwards as long as the object exists. - It can for example be used if you want to know how long time it takes the player to complete a level. - - .. note:: - - This timer uses the simulation time (or frame time) not the real time. When we have 60 fps - both times are equal but in other circunstances not. -Float - Uses decimal numbers as values, can range from -10000.000 to 10000.000. It is useful for precision values. -Integer - Uses integers (whole numbers) as values, between -10000 and 10000. - Useful for counting things such as ammunition, where decimals are unnecessary. -String - Takes text as value. Can store 128 characters. -Boolean - Boolean variable, has two values: ``TRUE`` or ``FALSE``. - This is useful for things that have only two modes, like a light switch. - ----------------- -Using Properties ----------------- - -When a game is running, values of properties are set, manipulated, and evaluated using -the :doc:`Property Sensor ` and -the :doc:`Property Actuator `. - -Logic Properties are created and edited using the panel on the right (although it -can be moved to the left with F5) of the Logic Bricks Editor panel. -The top menu provides a list of the available property types. - -.. figure:: /images/Logic/logic-logic_properties-panel.png - - Properties Panel of the Logic Editor. - -Add Game Property button - This button adds a new property to the list, default is a *Float* property named ``prop``, - followed by a number if there already is one with this name. - -Name field - Where you give your property its name, this is how you are going to access it through Python or expressions. - The way to do so in Python is by dictionary style look-up (``GameObject["propname"]``). - The name is case sensitive. - -Type menu - This menu determines which type of property it is. The available options are in `Property Types`_. - -Value field - Sets the initial value of the property. - -Information |info-button| - Display property value in debug information. If debugging is turned on, - the value of the property is given in the top left-hand corner of the screen while the game is running. - To turn debugging on, tick the *Debug Properties* checkbox in the Game Debug panel of the Render Properties. - All properties with debugging activated will then be presented with their object name, - property name and value during gameplay. - This is useful if you suspect something with your properties is causing problems. - -Movement buttons |movement-button| - Move the property up or down over other properties within the column. - -``X`` button - Deletes the property. diff --git a/source/manual/logic/sensors/editing.rst b/source/manual/logic/sensors/editing.rst deleted file mode 100644 index 4ca82119..00000000 --- a/source/manual/logic/sensors/editing.rst +++ /dev/null @@ -1,73 +0,0 @@ - -************** -Sensor Editing -************** - -.. figure:: /images/Logic/Sensors/logic-sensors-editing-column.png - - Sensor Column with a typical sensor. - -UPBGE sensors can be set up and edited in the left-hand column of the Logic Panel. -This page describes the general column controls, -and also those parameters which are common to all individual sensor types. - -The image shows a typical sensor column with a single example sensor. -At the top of this column, the column heading includes menus and buttons to control which of -all the sensors in the current Game Logic are displayed. - - -Column Heading -============== - -.. figure:: /images/Logic/Sensors/logic-sensors-editing-column1.png - - Sensor Column heading. - -The column headings contain controls to set which sensors, and the level of detail given, -in the sensor column. This is very useful for hiding unnecessary sensors so that the necessary -ones are visible and easier to reach. Both these can be controlled individually. - - -Sensors -======= - -Show Objects - Expands all objects. -Hide Objects - Collapses all objects to just a bar with their name. -Show Sensors - Expands all sensors. -Hide Sensors - Collapses all sensors to bars with their names. - -It is also possible to filter which sensors are viewed using the four heading buttons: - -Sel - Shows all sensors for selected objects. -Act - Shows only sensors belonging to the active object. -Link - Shows sensors which have a link to a controller. -State - Only sensors connected to a controller with active states are shown. - - -Object Heading -============== - -.. figure:: /images/Logic/Sensors/logic-sensors-editing-column2.png - - Sensor Object Heading. - -In the column list, sensors are grouped by object. By default, -sensors for every selected object appear in the list, -but this may be modified by the column heading filters. - -At the head of each displayed object sensor list, two entries appear: - -Name - The name of the object. -Add Sensor - When clicked, a menu appears with the available sensor types. - Selecting an entry adds a new sensor to the object. - See :doc:`Sensors ` for a list of available sensor types. diff --git a/source/manual/logic/sensors/introduction.rst b/source/manual/logic/sensors/introduction.rst deleted file mode 100644 index cd06561a..00000000 --- a/source/manual/logic/sensors/introduction.rst +++ /dev/null @@ -1,139 +0,0 @@ -.. |true-button| image:: /images/Logic/logic-common-options-icons-true.png - -.. |false-button| image:: /images/Logic/logic-common-options-icons-false.png - -.. |movement-button| image:: /images/Logic/logic-common-options-icons-movement.png - -.. |pin-button| image:: /images/Logic/logic-common-options-icons-pin.png - -.. |down-button| image:: /images/Logic/logic-common-options-icons-down.png - -************ -Introduction -************ - -Sensors are the logic bricks that cause the logic to do anything. -Sensors give an output when something happens, e.g. -a trigger event such as a collision between two objects, a key pressed on the keyboard, -or a timer for a timed event going off. When a sensor is triggered, -a positive pulse is sent to all controllers that are linked to it. - -The logic blocks for all types of sensor may be constructed and changed using -the Logic Editor; details of this process are given -in the :doc:`Sensor Editing ` page. - - -.. _game-engine-logic-sensors-common-options: - -Common Options -============== - -.. figure:: /images/Logic/Sensors/logic-sensors-common-options.png - - Common Sensor options. - -All sensors have a set of common buttons, fields and menus. They are organized as follows: - -Triangle button |down-button| - Collapses the sensor information to a single line (toggle). -Sensor type menu - Specifies the type of the sensor. -Sensor name - The name of the sensor. This can be selected by the user. It is used to access sensors with Python; - it needs to be unique among the selected objects. -Pin button |pin-button| - Display the sensor even when it is not linked to a visible states controller. -Movement buttons |movement-button| - Move the sensor up or down over other sensors within the column. -Checkbox button - When unchecked the sensor is deactivated, no pulses will be sent to the connected - controllers. Very useful to check different logics without unlink or delete the sensor. -``X`` button - Deletes the sensor. - -.. note:: Triggers - - If a controller does not get triggered by any connected sensor - (regardless of the sensors' state) it will not be activated at all. - - A sensor triggers the connected controllers on state change. - When the sensor changes its state from negative to positive or positive to negative, - the sensor triggers the connected controllers. - A sensor triggers a connected controller as well when the sensor changes from deactivation to - activation. - -The following parameters specify how the sensor triggers connected controllers: - -True level triggering |true-button| - If this is set, the connected controllers will be triggered as long as the sensor's state is positive. - The sensor will trigger skipping the logic ticks (See parameter: Skip) indicated in the sensor. -False level triggering |false-button| - If this is set, the connected controllers will be triggered as long as the sensor's state is negative. - The sensor will trigger skipping the logic ticks (See parameter: Skip) indicated in the sensor. -Skip - This parameter sets the number of logic ticks skipped between 2 active pulses or triggers. - The default value is 0 and it means no logic tick is skipped. - It is only used if at least one of the level triggering parameters are enabled. - - Raising the value of *Skip* is a good way for saving performance costs by avoiding - to execute controllers or activate actuators more often than necessary. - - Examples: (assuming the default frame rate with a frequency of 60 Hz (60 frames per second)). - -.. list-table:: - :header-rows: 1 - :class: valign - :widths: 10 30 15 15 15 15 - - * - Skip - - Meaning - - Frames with trigger - - Frames without trigger - - Period in frames - - Frequency in frames/sec - * - 0 - - The sensor triggers the next frame. - - 1 - - 0 - - 1 - - 60 - * - 1 - - The sensor triggers at one frame and skips another one until it triggers again. It results in half speed. - - 1 - - 1 - - 2 - - 30 - * - 29 - - The sensor triggers at one frame and skips 29 frames until it triggers again. - - 1 - - 29 - - 30 - - 2 - * - 59 - - The sensor triggers at one frame and skips 59 frames until it triggers again. - - 1 - - 59 - - 30 - - 1 - -*Level* Button - Triggers connected controllers when state (of the build-in state machine) changes - (for more information see :doc:`States `). - -The following parameters specify how the sensor's status gets evaluated: - -*Tap* Button - Changes the sensor's state to negative one frame after changing - to positive even if the sensor evaluation remains positive. - As this is a state change it triggers the connected controllers as well. - Only one of *Tap* or *Level* can be activated. - If the *TRUE level triggering* is set, - the sensor state will consecutive change from True to False until the sensor evaluates False. - The *FALSE level triggering* will be ignored when the *Tap* parameter is set. - -*Invert* Button - This inverts the sensor output. - If this is set, the sensor's state will be inverted. - This means the sensor's state changes to positive when evaluating False and changes to - False when evaluating True. - If the *Tap* parameter is set, the sensor triggers the controller based on the inverted sensor state. diff --git a/source/manual/logic/sensors/types/always.rst b/source/manual/logic/sensors/types/always.rst deleted file mode 100644 index 0a4ea518..00000000 --- a/source/manual/logic/sensors/types/always.rst +++ /dev/null @@ -1,28 +0,0 @@ -.. _bpy.types.AlwaysSensor: - -************* -Always Sensor -************* - -.. seealso:: - See the Python reference of this logic brick in :class:`SCA_AlwaysSensor`. - -The *Always Sensor* gives a continuous output signal at regular intervals. -It is used for things that need to be done every logic tick, -or at every *x* logic tick (with non-null *Skip*), or at start-up (with *Tap*). - -.. figure:: /images/Logic/Sensors/logic-sensors-types-always-always.png - - Always sensor. - - -Properties -========== - -See :ref:`Sensor Common Options ` for common options. - -This sensor does not have any special options. - - -Example -======= diff --git a/source/manual/logic/sensors/types/collision.rst b/source/manual/logic/sensors/types/collision.rst deleted file mode 100644 index 79ed2ea1..00000000 --- a/source/manual/logic/sensors/types/collision.rst +++ /dev/null @@ -1,37 +0,0 @@ -.. _bpy.types.CollisionSensor: - -**************** -Collision Sensor -**************** - -.. seealso:: - See the Python reference of this logic brick in :class:`SCA_CollisionSensor`. - -A *Collision Sensor* works like a "touch sensor" but can also filter by property or material. -Only objects with the property/material with that name will generate a positive pulse upon collision. -Leave blank for collision detection with any object. - -.. note:: Soft Bodies - - The *Collision* sensor cannot detect collisions with soft bodies. - This is a limitation in Bullet, the physics library used by the Game Engine. - -.. figure:: /images/Logic/Sensors/logic-sensors-types-collision-collision.png - - Collision sensor. - - -Properties -========== - -See :ref:`Sensor Common Options ` for common options. - -Pulse button - Makes it sensible to other collisions even if it is still in touch - with the object that triggered the last positive pulse. -M/P button - Toggles between material and property filtering. - - -Example -======= diff --git a/source/manual/logic/sensors/types/joystick.rst b/source/manual/logic/sensors/types/joystick.rst deleted file mode 100644 index 5f58de9d..00000000 --- a/source/manual/logic/sensors/types/joystick.rst +++ /dev/null @@ -1,90 +0,0 @@ -.. _bpy.types.JoystickSensor: - -*************** -Joystick Sensor -*************** - -.. seealso:: - See the Python reference of this logic brick in :class:`SCA_JoystickSensor`. - -The *Joystick Sensor* triggers whenever the joystick moves. -It also detects events on a range of ancillary controls on the joystick device (shoulder triggers, buttons, etc.). -More than one joystick may be used (see "Joystick Index"). - -.. note:: - - UPBGE maps all the joysticks against the layout of Xbox 360 game controller. This way is easier to setup the - different movements or actions because you have to do it for one type of controller only. - -.. figure:: /images/Logic/Sensors/logic-sensors-types-joystick-button.png - - Joystick sensor. - - -Properties -========== - -See :ref:`Sensor Common Options ` for common options. - -Event Type - A menu to select which joystick event to use, each is described later. -Joystick Index - Specifies which joystick to use. -All Events - Sensor triggers for all events on this joystick's current type. - - -Stick Directions ----------------- - -Detect movement in a stick - -.. figure:: /images/Logic/Sensors/logic-sensors-types-joystick-stick-directions.png - - Joystick Stick Directions. - -Stick - Stick to detect a input: Left Stick/Right Stick. - -Stick Direction - Direction of the stick moving: Right/Left, Up/Down. - - -Stick Axis ----------- - -Detects the axis of the joystick. - -.. figure:: /images/Logic/Sensors/logic-sensors-types-joystick-stick-axis.png - - Joystick Stick Axis. - -Stick Axis - Which axis either of the sticks are moving on Left Stick Horizontal/Vertical, Right Stick Horizontal/Vertical. - - -Shoulder Triggers ------------------ - -.. figure:: /images/Logic/Sensors/logic-sensors-types-joystick-shoulder-triggers.png - - Joystick Shoulder Triggers. - -Triggers - Triggers that are used: Left/Right Shoulder Trigger. - - -Buttons -------- - -.. figure:: /images/Logic/Sensors/logic-sensors-types-joystick-button.png - - Joystick Buttons. - -Button - Buttons that are used: ``A``, ``B``, ``X``, ``Y``, Dpad Right/Left/Up/Down, - Right/Left Shoulder, Right/Left Stick, Start and Guide. - - -Example -======= diff --git a/source/manual/logic/sensors/types/keyboard.rst b/source/manual/logic/sensors/types/keyboard.rst deleted file mode 100644 index 41886f4d..00000000 --- a/source/manual/logic/sensors/types/keyboard.rst +++ /dev/null @@ -1,50 +0,0 @@ -.. _bpy.types.KeyboardSensor: - -.. _sensor-keyboard: - -*************** -Keyboard Sensor -*************** - -.. seealso:: - See the Python reference of this logic brick in :class:`SCA_KeyboardSensor`. - -The *Keyboard* sensor is for detecting keyboard input. -It can also save keyboard input to a :ref:`String property `. - -.. figure:: /images/Logic/Sensors/logic-sensors-types-keyboard-keyboard.png - - Keyboard sensor. - - -Properties -========== - -See :ref:`Sensor Common Options ` for common options. - -Key - This field detects presses on a named key. - Press the button with no label and a key to assign that key to the sensor. - This is the active key, which will trigger the ``TRUE`` pulse. - Click the button and then click outside of the button to deassign the key. - A ``FALSE`` pulse is given when the key is released. -All keys button - Sends a ``TRUE`` pulse when any key is pressed. - This is useful for custom key maps with - a :doc:`Python controller `. -First Modifier, Second Modifier - Specifies additional key(s), all of which must be held down while - the active key is pressed in order for the sensor to give a ``TRUE`` pulse. - These are selected in the same way as Key. - This is useful if you wish to use key combinations, - for example :kbd:`Ctrl-R` or :kbd:`Shift-Alt-Esc` to do a specific action. -Log Toggle - Assigns a *Bool* property which determines if the keystroke will or will not be logged in the target *String*. - This property needs to be ``TRUE`` if you wish to log your keystrokes. -Target - The name of property to which the keystrokes are saved. This property must be of type *String*. - Together with a *Property* sensor this can be used for example to enter passwords. - - -Example -======= diff --git a/source/manual/logic/sensors/types/message.rst b/source/manual/logic/sensors/types/message.rst deleted file mode 100644 index 8a2cbd36..00000000 --- a/source/manual/logic/sensors/types/message.rst +++ /dev/null @@ -1,33 +0,0 @@ -.. _bpy.types.MessageSensor: - -************** -Message Sensor -************** - -.. seealso:: - See the Python reference of this logic brick in :class:`KX_NetworkMessageSensor`. - -The *Message Sensor* can be used to detect either text messages or property values. -The sensor sends a positive pulse once an appropriate message is sent from anywhere in the engine. -It can be set up to only send a pulse upon a message with a specific subject. - -.. note:: - - See :doc:`Message Actuator ` for how to send messages. - -.. figure:: /images/Logic/Sensors/logic-sensors-types-message-message.png - - Message Sensor. - - -Properties -========== - -See :ref:`Sensor Common Options ` for common options. - -Subject - Specifies the message that must be received to trigger the sensor (this can be left blank). - - -Example -======= diff --git a/source/manual/logic/sensors/types/radar.rst b/source/manual/logic/sensors/types/radar.rst deleted file mode 100644 index 1f7dc8cb..00000000 --- a/source/manual/logic/sensors/types/radar.rst +++ /dev/null @@ -1,50 +0,0 @@ -.. _bpy.types.RadarSensor: - -************ -Radar Sensor -************ - -.. seealso:: - See the Python reference of this logic brick in :class:`SCA_RadarSensor`. - -The *Radar Sensor* works much like the :doc:`Near sensor `, -but only within an angle from an axis, forming an invisible cone with the top in the objects' -center and base at a distance on an axis. It is possible to visualize the invisible cone turning on -the :ref:`Physics Visualization `. -This sensor is useful for giving bots sight only in front of them, for example. - -.. figure:: /images/Logic/Sensors/logic-sensors-types-radar-cone-angle.png - -.. note:: Soft Bodies - - The *Radar* sensor cannot detect soft bodies. - This is a limitation in Bullet, the physics library used by the Game Engine. - -.. note:: - - - The Radar sensor can detect objects "through" other objects (walls, etc.). - - Objects must have Physics "Actor" property enabled to be detected. - -.. figure:: /images/Logic/Sensors/logic-sensors-types-radar-radar.png - - Radar sensor. - - -Properties -========== - -See :ref:`Sensor Common Options ` for common options. - -Property - This field can be used to limit the sensor to look for only those objects with this property. -Axis - This menu determines the direction of the radar cone. - The ± signs is whether it is on the axis direction (+), or the opposite (-). -Angle - Determines the angle of the cone. -Distance - Determines the length of the cone. (Blender units). - - -Example -======= diff --git a/source/manual/logic/sensors/types/ray.rst b/source/manual/logic/sensors/types/ray.rst deleted file mode 100644 index ef27f110..00000000 --- a/source/manual/logic/sensors/types/ray.rst +++ /dev/null @@ -1,42 +0,0 @@ -.. _bpy.types.RaySensor: - -********** -Ray Sensor -********** - -.. seealso:: - See the Python reference of this logic brick in :class:`SCA_RaySensor`. - -The *Ray Sensor* shoots a ray in the direction of an axis and sends a positive pulse once -it hits something. It can be filtered to only detect objects with a given material or property. - -.. figure:: /images/Logic/Sensors/logic-sensors-types-ray-ray.png - - Ray sensor. - - -Properties -========== - -See :ref:`Sensor Common Options ` for common options. - -Property - This field can be used to limit the sensor to look for only those objects with this property. - -.. note:: - - - Unless the Property field is set, the Ray sensor can detect objects "through" other objects (walls, etc.). - - Objects must have Physics "Actor" property enabled to be detected. - -Axis - This menu determines the direction of the ray. - The ± signs is whether it is on the axis direction (+), or the opposite (-). -Range - Determines the length of the ray (in Blender units). -X-Ray Mode button - Makes it x-ray, so that it sees through objects that do not - have the property or material specified in the filter field. - - -Example -======= diff --git a/source/manual/logic/states.rst b/source/manual/logic/states.rst deleted file mode 100644 index 48ddf93d..00000000 --- a/source/manual/logic/states.rst +++ /dev/null @@ -1,95 +0,0 @@ -.. |info-button| image:: /images/Logic/logic-common-options-icons-info.png - -.. _logic-states: - -====== -States -====== - -In the BGE, an object can have different "states". At any time while the game is playing, -the current state of the object defines its behavior. For instance, -a character in your game may have states representing awake, sleeping or dead. At any moment -their behavior in response to a loud bang will be dependent on their current state; -they may crouch down (awake); wake up (asleep) or do nothing (dead). - ------------------- -How States Operate ------------------- - -States are set up and used through controllers: note that only controllers, -not actuators and sensors, are directly controlled by the state system. -Each object has a number of states (up to 30; default = 1), -and can only be in one state at any particular time. -A controller must always specify the state for which it will operate -- it will only give an output pulse -if a) its logic conditions are met, and b) the object is currently in the specified State. -States are set up and edited in the object's Controller settings (for details see below). - -.. tip:: - - State settings are automatic in simple games. By default, - the number of states for each object is 1, and all controllers are set to use State 1. So, - if a game does not need multiple states, everything will work without explicitly setting - states -- you do not need to bother about states at all. - -One of the actuators, the State actuator, can set or unset the object's State bits, -and so allow the object's reaction to a sensor signal to depend on its current state. So, -in the above example, the actor will have a number of controllers connected to the "loud bang" -sensor, for each of the "awake", "asleep" or "dead" states. -These will operate different actuators depending on the current state of the actor, -and some of these actuators may switch the actor's state under appropriate conditions. - --------------- -Editing States --------------- - -.. figure:: /images/Logic/logic-states-panel.png - - State Panel button. - -States are set up and edited using the Controller (center) column of the Game Logic Panel. -To see the State panel, click on the State Panel Button shown. -The panel shows two areas for each of the 30 available states; these show Visible states, -and Initial states (see below). Setting up the State system for a game is performed by -choosing the appropriate state for each controller in the object's logic. - -The display of an object's state logic, and other housekeeping, -is carried out using the State Panel for the object, -which is switched on and off using the button shown. The panel is divided into two halves, -Visible and Initial. - --------------- -Visible States --------------- - -.. figure:: /images/Logic/logic-states-panel1.png - - State Panel visible. - -In the Visible area, each of the 30 available states is represented by a light-gray square. -This panel shows what logic is visible for the logic brick displayed for the object. -At the right is the All button; if clicked, then all the object's logic bricks are displayed -(this is a toggle), and all State Panel squares are light gray. Otherwise, -individual states can be clicked to make their logic visible. -(Note that you can click more than one square). Clicking the square again deselects the state. - -States for the object that are in use -(i.e. the object has controllers which operate in that state) have dots in them, -and squares are dark gray if these controllers are shown in the Game Logic display. -The display of their connected sensors and actuators can also be controlled -if the State buttons at the head of their columns are ticked. - -------------- -Initial State -------------- - -.. figure:: /images/Logic/logic-states-panel2.png - - State Panel initial. - -In the Initial area, each of the 30 available states is again represented by a light-gray square. -One of these states may be clicked as the state in which the object starts when the game is run. - -At the right is the |info-button| button; if clicked, -and the :menuselection:`Render properties --> Game Debug panel --> Debug Properties checkbox` is clicked, -the current state of the object is shown in the top left-hand corner of the display -while the game is running. diff --git a/source/manual/logic_bricks/actuators/editing.rst b/source/manual/logic_bricks/actuators/editing.rst new file mode 100644 index 00000000..b242ee9f --- /dev/null +++ b/source/manual/logic_bricks/actuators/editing.rst @@ -0,0 +1,60 @@ + +============================== +Actuator Editing +============================== + +.. figure:: /images/logic_bricks/actuators/logic-actuators-editing-column.png + + Actuator Column with a typical actuator + +UPBGE actuators can be set up and edited in the right-hand column of the Logic Panel. This page describes the general column controls, and also those parameters which are common to all individual actuator types. + +The image shows a typical actuator column with a single example actuator. At the top of this column, the column heading includes menus and buttons to control which of all the actuators in the current Game Logic are displayed. + +Column Heading +++++++++++++++++++++++++++++++ + +.. figure:: /images/logic_bricks/actuators/logic-actuators-editing-column1.png + + Actuator Column heading + +The column headings contain controls to set which actuators are displayed, and the level of detail given, in the actuator column. This is very useful for hiding unnecessary actuators, so that the necessary ones are visible and easier to reach. Both these can be controlled individually. + +Actuators +++++++++++++++++++++++++++++++ + +Show Objects + Expands all objects. +Hide Objects + Collapses all objects to just a bar with their name. +Show Actuators + Expands all actuators. +Hide Actuators + Collapses all actuators to bars with their names. + +It is also possible to filter which actuators are viewed using the four heading buttons: + +Sel + Shows all actuators for selected objects. +Act + Shows only actuators belonging to the active object. +Link + Shows actuators which have a link to a controller. +State + Only actuators connected to a controller with active states are shown. + +Object Heading +++++++++++++++++++++++++++++++ + +.. figure:: /images/logic_bricks/actuators/logic-actuators-editing-column2.png + + Actuator Object heading + +In the column list, actuators are grouped by object. By default, actuators for every selected object appear in the list, but this may be modified by the column heading filters. + +At the head of each displayed object sensor list, two entries appear: + +Name + The name of the object. +Add + When clicked, a menu appears with the available actuator types. Selecting an entry adds a new actuator to the object. See :doc:`Actuators <./index>` for list of available actuator types. diff --git a/source/manual/logic/actuators/index.rst b/source/manual/logic_bricks/actuators/index.rst similarity index 85% rename from source/manual/logic/actuators/index.rst rename to source/manual/logic_bricks/actuators/index.rst index 5060c715..717b0ac1 100644 --- a/source/manual/logic/actuators/index.rst +++ b/source/manual/logic_bricks/actuators/index.rst @@ -1,9 +1,9 @@ .. _actuators-index: .. _bpy.types.Actuator: -############# - Actuators -############# +============================== +Actuators +============================== .. toctree:: :maxdepth: 2 @@ -11,9 +11,8 @@ introduction.rst editing.rst - Actuators Types -=============== +++++++++++++++++++++++++++++++ .. toctree:: :maxdepth: 1 diff --git a/source/manual/logic_bricks/actuators/introduction.rst b/source/manual/logic_bricks/actuators/introduction.rst new file mode 100644 index 00000000..5ea30d65 --- /dev/null +++ b/source/manual/logic_bricks/actuators/introduction.rst @@ -0,0 +1,39 @@ +.. |movement-button| image:: /images/logic_bricks/logic-common-options-icons-movement.png + +.. |pin-button| image:: /images/logic_bricks/logic-common-options-icons-pin.png + +.. |down-button| image:: /images/logic_bricks/logic-common-options-icons-down.png + +============================== +Introduction +============================== + +Actuators perform actions, such as move, create objects, play a sound. The actuators initiate their functions when they get a positive pulse from one (or more) of their controllers. + +The logic blocks for all types of actuator may be constructed and changed using the Logic Bricks Editor; details of this process are given in the :doc:`Actuator Editing <./editing>` page. + +.. _game-engine-logic-actuators-common-options: + +Common Options +++++++++++++++++++++++++++++++ + +.. figure:: /images/logic_bricks/actuators/logic-actuators-common_options-column.png + + Common Actuator options + +All actuators have a set of common buttons, fields and menus. They are organized as follows: + +Triangle button |down-button| + Collapses the sensor information to a single line (toggle). +Actuator type menu + Specifies the type of the sensor. +Actuator name + The name of the actuator. This can be selected by the user. It is used to access actuators with Python; it needs to be unique among the selected objects. +Pin button |pin-button| + Display the actuator even when it is not linked to a visible states controller. +Movement buttons |movement-button| + Move the actuator up or down over other actuators within the column. +Checkbox button + When unchecked the actuator is deactivated, no action will be done. Very useful to check different logics without unlink or delete the actuator. +X button + Deletes the actuator. diff --git a/source/manual/logic/actuators/types/action.rst b/source/manual/logic_bricks/actuators/types/action.rst similarity index 78% rename from source/manual/logic/actuators/types/action.rst rename to source/manual/logic_bricks/actuators/types/action.rst index 1bffa430..5fb5aa9a 100644 --- a/source/manual/logic/actuators/types/action.rst +++ b/source/manual/logic_bricks/actuators/types/action.rst @@ -2,62 +2,73 @@ .. _actuator-action: -*************** +============================== Action Actuator -*************** +============================== .. seealso:: See the Python reference of this logic brick in :class:`BL_ActionActuator`. The *Action Actuator* controls animation actions and sets the playback method. -.. figure:: /images/Logic/Actuators/logic-actuators-types-action-action.png - - Action Actuator. +.. figure:: /images/logic_bricks/actuators/logic-actuators-types-action-action.png + Action Actuator Properties -========== +++++++++++++++++++++++++++++++ Action Playback Type Play Play an action once from start to end when a ``TRUE`` pulse is received. + Ping Pong - Play an action once from start to end when a ``TRUE`` pulse is received. - When the end is reached play the action once from end to start when a ``TRUE`` pulse is received. + Play an action once from start to end when a ``TRUE`` pulse is received. When the end is reached play the action once from end to start when a ``TRUE`` pulse is received. + Flipper Play an action once from start to end when a ``TRUE`` pulse is received. Plays backwards when a ``FALSE`` pulse is received. + Loop End Play an action continuously from start to end when a ``TRUE`` pulse is received. + Loop Stop Play an action continuously from start to end when a ``TRUE`` pulse is received. Stop when a ``FALSE`` pulse is received. + Property Uses a property to define what frame is displayed. Action Select the action to use. + Continue Restore last frame when switching on/off, otherwise play from the start each time. + Start Frame Set the start frame of the action. + End Frame Set the end frame of the action. + Child Button Update action on all children objects as well. + Blending Number of frames of motion blending. + Priority - Execution priority -- lower numbers will override actions with higher numbers. - With 2 or more actions at once, the overriding channels must be lower in the stack. + Execution priority -- lower numbers will override actions with higher numbers. With 2 or more actions at once, the overriding channels must be lower in the stack. + Frame Property Assign the action's current frame number to this property. + Property Use this property to define the action position. Only for Property playback type. + Layer The animation layer to play the action on. + Layer Weight How much of the previous layer to blend into this one. - Example -======= +++++++++++++++++++++++++++++++ diff --git a/source/manual/logic/actuators/types/armature.rst b/source/manual/logic_bricks/actuators/types/armature.rst similarity index 63% rename from source/manual/logic/actuators/types/armature.rst rename to source/manual/logic_bricks/actuators/types/armature.rst index bc67993d..05663ff7 100644 --- a/source/manual/logic/actuators/types/armature.rst +++ b/source/manual/logic_bricks/actuators/types/armature.rst @@ -1,25 +1,23 @@ .. _bpy.types.ArmatureActuator: -***************** +============================== Armature Actuator -***************** +============================== .. seealso:: See the Python reference of this logic brick in :class:`BL_ArmatureActuator`. The *Armature Actuator* is used to modify bone constraints. -.. figure:: /images/Logic/Actuators/logic-actuators-types-armature-armature.png +.. figure:: /images/logic_bricks/actuators/logic-actuators-types-armature-armature.png - Armature Actuator. + Armature Actuator .. note:: - - The *Armature Actuator* is only available for armature objects. - + *Armature Actuator* is only available for armature objects. Properties -========== +++++++++++++++++++++++++++++++ Constraint Type Action to perform on the bone constraint. @@ -29,19 +27,14 @@ Constraint Type Enable/Disable Used to disable a constraint by selecting the constraint via the Data ID. Set Target - Used to change the constraint's Target by selecting the new target via - the Data ID. + Used to change the constraint's Target by selecting the new target via the Data ID. Set Weight - Used to change the weight of a constraint by selecting a new weight with - the *Weight* field. + Used to change the weight of a constraint by selecting a new weight with the *Weight* field. Set Influence - Used to change the influence of a constraint by selecting a new influence - with the *Influence* field + Used to change the influence of a constraint by selecting a new influence with the *Influence* field Constraint - Several of the *Constraint Types* need you to select a constraint to use, - this is done via this Data ID. - + Several of the *Constraint Types* need you to select a constraint to use, this is done via this Data ID. Example -======= +++++++++++++++++++++++++++++++ diff --git a/source/manual/logic/actuators/types/camera.rst b/source/manual/logic_bricks/actuators/types/camera.rst similarity index 58% rename from source/manual/logic/actuators/types/camera.rst rename to source/manual/logic_bricks/actuators/types/camera.rst index 19cc65d5..00c3ff17 100644 --- a/source/manual/logic/actuators/types/camera.rst +++ b/source/manual/logic_bricks/actuators/types/camera.rst @@ -1,21 +1,20 @@ .. _bpy.types.CameraActuator: -*************** +============================== Camera Actuator -*************** +============================== .. seealso:: See the Python reference of this logic brick in :class:`SCA_CameraActuator`. -The *Camera Actuator* makes the camera follow or track an object. +*Camera Actuator* makes the camera follow or track an object. -.. figure:: /images/Logic/Actuators/logic-actuators-types-camera-camera.png - - Camera Actuator. +.. figure:: /images/logic_bricks/actuators/logic-actuators-types-camera-camera.png + Camera Actuator Properties -========== +++++++++++++++++++++++++++++++ Camera Object Name of the Game Object that the camera follows/tracks. @@ -28,10 +27,7 @@ Min Max Maximum distance for the camera to follow the Game Object. Damping - Strength of the constraint that drives the camera behind the target. - The higher the parameter, the quicker the camera will adjust to be inside - the constrained range (of min, max and height). - + Strength of the constraint that drives the camera behind the target. The higher the parameter, the quicker the camera will adjust to be inside the constrained range (of min, max and height). Example -======= +++++++++++++++++++++++++++++++ diff --git a/source/manual/logic_bricks/actuators/types/collection.rst b/source/manual/logic_bricks/actuators/types/collection.rst new file mode 100644 index 00000000..3f3efb27 --- /dev/null +++ b/source/manual/logic_bricks/actuators/types/collection.rst @@ -0,0 +1,65 @@ +.. _bpy.types.CollectionActuator: + +============================== +Collection Actuator +============================== + +.. seealso:: + See the Python reference of this logic brick in :class:`SCA_CollectionActuator`. + +The *Collection Actuator* manages the what the user can see through their view. This can be a inventory, ammunition and other UI. + +.. figure:: /images/logic_bricks/actuators/logic-actuators-types-collection-collection.png + + Collection Actuator + +Properties +++++++++++++++++++++++++++++++ + +Collection + Select which collection you want to manipulate. + +Logic + Resume/suspend sensors in the selected collection. + +Physics + Resume/suspend physics in the selected collections objects. + +Visibility + Resume/suspend visibility of the selected collections objects. + +Suspend Collection +------------------------------ + +Suspends the view of the collection. + +.. figure:: /images/logic_bricks/actuators/logic-actuators-types-collection-suspend_collection.png + + Suspend Collection + +Resume Collection +------------------------------ + +Resumes the view of the collection. + +.. figure:: /images/logic_bricks/actuators/logic-actuators-types-collection-resume_collection.png + + Resume Collection + +Add Overlay Collection +------------------------------ + +Adds a new overlay collection. + +.. figure:: /images/logic_bricks/actuators/logic-actuators-types-collection-add_overlay_collection.png + + Add Overlay Collection + +Remove Overlay Collection +------------------------------ + +Removes the overlay collection. + +.. figure:: /images/logic_bricks/actuators/logic-actuators-types-collection-remove_overlay_collection.png + + Remove Overlay Collection diff --git a/source/manual/logic/actuators/types/constraint.rst b/source/manual/logic_bricks/actuators/types/constraint.rst similarity index 67% rename from source/manual/logic/actuators/types/constraint.rst rename to source/manual/logic_bricks/actuators/types/constraint.rst index d333cf90..544ea432 100644 --- a/source/manual/logic/actuators/types/constraint.rst +++ b/source/manual/logic_bricks/actuators/types/constraint.rst @@ -1,35 +1,32 @@ .. _bpy.types.ConstraintActuator: -******************** +============================== Constraints Actuator -******************** +============================== .. seealso:: See the Python reference of this logic brick in :class:`SCA_ConstraintActuator`. -The *Constraints Actuator* adds a constraint to the location or orientation of an object. -This is useful for controlling the physics of the object in-game. +The *Constraints Actuator* adds a constraint to the location or orientation of an object. This is useful for controlling the physics of the object in-game. -.. figure:: /images/Logic/Actuators/logic-actuators-types-constraint-constraint.png - - Constraint Actuator. +.. figure:: /images/logic_bricks/actuators/logic-actuators-types-constraint-constraint.png + Constraint Actuator Properties -========== +++++++++++++++++++++++++++++++ Constraint Mode Constraint type to use. Each is described below. - Force Field Constraint ----------------------- +------------------------------ Create a force field buffer zone along one axis of the object. -.. figure:: /images/Logic/Actuators/logic-actuators-types-constraint-forcefield.png +.. figure:: /images/logic_bricks/actuators/logic-actuators-types-constraint-forcefield.png - Force Field Constraint. + Force Field Constraint Damping Damping factor of the Fh spring force. @@ -48,22 +45,20 @@ M/P Property Property/Material that triggers the Force Field constraint (blank for **all** Properties/Materials). Per - Persistence button: When on, force field constraint always looks at Property/Material; - when off, turns itself off if it cannot find the Property/Material. + Persistence button: When on, force field constraint always looks at Property/Material; when off, turns itself off if it cannot find the Property/Material. Time Number of frames for which constraint remains active. RotDamp Damping factor for rotation. - Orientation Constraint ----------------------- +------------------------------ Constrain the specified axis in the Game to a specified direction in the World axis. -.. figure:: /images/Logic/Actuators/logic-actuators-types-constraint-orientation.png +.. figure:: /images/logic_bricks/actuators/logic-actuators-types-constraint-orientation.png - Orientation Constraint. + Orientation Constraint Direction Game axis to be modified (X, Y, Z or none). @@ -78,15 +73,14 @@ Min Angle Max Angle Maximum angle for the axis modification. - Distance Constraint -------------------- +------------------------------ Maintain the distance the Game Object has to be from a surface. -.. figure:: /images/Logic/Actuators/logic-actuators-types-constraint-distance.png +.. figure:: /images/logic_bricks/actuators/logic-actuators-types-constraint-distance.png - Distance Constraint. + Distance Constraint Direction Axis Direction (X, Y, Z, -X, -Y, -Z, or None). @@ -97,8 +91,7 @@ N Range Maximum length of ray used to check for Material/Property on another game object. Force Distance - Distance to be maintained between object and - the Material/Property that triggers the *Distance Constraint*. + Distance to be maintained between object and the Material/Property that triggers the *Distance Constraint*. Damping Delay (frames) of the constraint response. M/P @@ -106,23 +99,20 @@ M/P Property Property/Material that triggers the Distance Constraint (blank for **all** Properties/Materials) Per - Persistence button: When on, Distance Constraint always looks for Property/Material; - when off, turns itself off if it cannot find the Property/Material. + Persistence button: When on, Distance Constraint always looks for Property/Material; when off, turns itself off if it cannot find the Property/Material. Time Number of frames for which constraint remains active. Rotation Damping Damping factor for rotation. - Location Constraint -------------------- +------------------------------ -Limit the position of the Game Object within one World Axis direction. -To limit movement within an area or volume, use two or three constraints. +Limit the position of the Game Object within one World Axis direction. To limit movement within an area or volume, use two or three constraints. -.. figure:: /images/Logic/Actuators/logic-actuators-types-constraint-location.png +.. figure:: /images/logic_bricks/actuators/logic-actuators-types-constraint-location.png - Location Constraint. + Location Constraint Limit Axis in which to apply limits (LocX, LocY, LocZ or none). @@ -133,6 +123,5 @@ Max Damping Delay (frames) of the constraint. - Examples -======== +++++++++++++++++++++++++++++++ diff --git a/source/manual/logic/actuators/types/edit_object.rst b/source/manual/logic_bricks/actuators/types/edit_object.rst similarity index 55% rename from source/manual/logic/actuators/types/edit_object.rst rename to source/manual/logic_bricks/actuators/types/edit_object.rst index 2f747859..a60927ae 100644 --- a/source/manual/logic/actuators/types/edit_object.rst +++ b/source/manual/logic_bricks/actuators/types/edit_object.rst @@ -1,36 +1,32 @@ .. _bpy.types.EditObjectActuator: -******************** +============================== Edit Object Actuator -******************** +============================== .. seealso:: - See the Python reference of this logic brick in :class:`SCA_AddObjectActuator`, - :class:`SCA_DynamicActuator`, :class:`SCA_EndObjectActuator` and :class:`SCA_ReplaceMeshActuator`. + See the Python reference of this logic brick in :class:`SCA_AddObjectActuator`, :class:`SCA_DynamicActuator`, :class:`SCA_EndObjectActuator` and :class:`SCA_ReplaceMeshActuator`. -The *Edit Object Actuator* allows the user to edit settings of objects in-game. -In example edits the object's mesh, adds objects, or destroys them. -It can also change the mesh of an object. +The *Edit Object Actuator* allows the user to edit settings of objects in-game. In example edits the object's mesh, adds objects, or destroys them. It can also change the mesh of an object. -.. figure:: /images/Logic/Actuators/logic-actuators-types-edit_object-edit_object.png +.. figure:: /images/logic_bricks/actuators/logic-actuators-types-edit_object-edit_object.png - Edit Object Actuator. + Edit Object Actuator Properties -========== +++++++++++++++++++++++++++++++ Edit Object How the object is modified, each is described below. - Dynamics --------- +------------------------------ Provides a menu of *Dynamic Operations* to set up dynamics options for object. -.. figure:: /images/Logic/Actuators/logic-actuators-types-edit_object-dynamics.png +.. figure:: /images/logic_bricks/actuators/logic-actuators-types-edit_object-dynamics.png - Edit Object: Dynamics. + Edit Object: Dynamics Set Mass Enables the user to set the mass of the current object for Physics. @@ -47,16 +43,14 @@ Suspend Physics Restore Physics Resumes the object physics (enables object velocity and collision). - Track To --------- +------------------------------ -Makes the object "look at" another object, in 2D or 3D. -The Y axis is considered the front of the object. +Makes the object "look at" another object, in 2D or 3D. The Y axis is considered the front of the object. -.. figure:: /images/Logic/Actuators/logic-actuators-types-edit_object-track_to.png +.. figure:: /images/logic_bricks/actuators/logic-actuators-types-edit_object-track_to.png - Edit Object: Track To. + Edit Object: Track To Object Object to follow. @@ -69,16 +63,14 @@ Up Axis Track Axis Selects the axis that should point to the target object. - Replace Mesh ------------- +------------------------------ -Replace mesh with another. Both the mesh and/or its physics can be replaced, -together or independently. +Replace mesh with another. Both the mesh and/or its physics can be replaced, together or independently. -.. figure:: /images/Logic/Actuators/logic-actuators-types-edit_object-replace_mesh.png +.. figure:: /images/logic_bricks/actuators/logic-actuators-types-edit_object-replace_mesh.png - Edit Object: Replace Mesh. + Edit Object: Replace Mesh Mesh Name of mesh to replace the current mesh. @@ -87,34 +79,29 @@ Gfx Button Phys Button Replace physics mesh (not compound shapes). - End Object ----------- +------------------------------ Destroy the current object (note, debug properties will display error Zombie Object in console). -.. figure:: /images/Logic/Actuators/logic-actuators-types-edit_object-end_object.png - - Edit Object: End Object. +.. figure:: /images/logic_bricks/actuators/logic-actuators-types-edit_object-end_object.png + Edit Object: End Object Add Object ----------- +------------------------------ -Adds an object at the center of the current object. -The object that is added needs to be on another, hidden, layer. +Adds an object at the center of the current object. The object that is added needs to be on another, hidden, layer. -.. figure:: /images/Logic/Actuators/logic-actuators-types-edit_object-add_object.png +.. figure:: /images/logic_bricks/actuators/logic-actuators-types-edit_object-add_object.png - Edit Object: Add Object. + Edit Object: Add Object Object The name of the object that is going to be added. Time - The time (in frames) the object stays alive before it disappears. - Zero makes it stay forever. + The time (in frames) the object stays alive before it disappears. Zero makes it stay forever. Linear Velocity - Linear Velocity, works like in the motion actuator but on the created object instead of the object itself. - Useful for shooting objects, create them with an initial speed. + Linear Velocity, works like in the motion actuator but on the created object instead of the object itself. Useful for shooting objects, create them with an initial speed. Angular Velocity Angular velocity, works like in the motion actuator but on the created object instead of the object itself. diff --git a/source/manual/logic_bricks/actuators/types/filter_2d.rst b/source/manual/logic_bricks/actuators/types/filter_2d.rst new file mode 100644 index 00000000..d2d07440 --- /dev/null +++ b/source/manual/logic_bricks/actuators/types/filter_2d.rst @@ -0,0 +1,102 @@ +.. _bpy.types.Filter2DActuator: + +============================== +Filter 2D Actuator +============================== + +.. seealso:: + See the Python reference of this logic brick in :class:`SCA_2DFilterActuator`. + +The *Filter 2D Actuator* adds image filters, that apply on final render of objects. There are several 2D filters each listed below. Most are self-explanatory, however, some are special and will be described in detail later. + +- Custom Filter +- Invert +- Sepia +- Gray Scale +- Prewitt +- Sobel +- Laplacian +- Erosion +- Dilation +- Sharpen +- Blur +- Motion Blur (currently not working) +- Remove Filter +- Disable Filter +- Enable Filter + +.. figure:: /images/logic_bricks/actuators/logic-actuators-types-filter_2d-filter_2d.png + + Filter 2D actuator + +Properties +++++++++++++++++++++++++++++++ + +Filter 2D Type + Selects the type of 2D filter to use. All 2D filters are rendered with fragment shaders so your hardware must support fragment shaders. Several of the filters are called "built-in filters", these are: Blur, Sharpen, Dilation, Erosion, Laplacian, Sobel, Prewitt, Gray Scale, Sepia, and Invert. There are however some filters that work differently from the ones above and are described separately. + + .. figure:: /images/logic_bricks/actuators/logic-actuators-types-filter_2d-built_in_filters.png + + Built-in Filters + +Pass Number + The pass number for the filter to use. + +Details of special filters are described below. + +Enable/Disable Filters +------------------------------ + +There are two filters which can be used to either *Enable* or *Disable* other filters. + +To enable/disable a filter on a specific pass: + +#. Create appropriate sensor(s) and controller(s). +#. Create a *2D Filter* actuator. +#. Select either *Enable Filter* or *Disable Filter* depending on what you want to do. +#. Set the pass number you want to disable the filter on it. + +Removing Filters +------------------------------ + +The *Remove Filter* is used to remove other 2D filters. + +To remove a filter on a specific pass: + +#. Create appropriate sensor(s) and controller(s). +#. Create a *2D Filter* actuator. +#. Select *Remove Filter*. +#. Set the pass number you want to remove the filter from it. + +Custom Filters +++++++++++++++++++++++++++++++ + +Custom filters give you the ability to define your own 2D filter using GLSL. Its usage is the same as built-in filters, but you must select *Custom Filter* in *2D Filter* actuator, then write shader program into the Text Editor, and then place shader script name on actuator. + +.. figure:: /images/logic_bricks/actuators/logic-actuators-types-filter_2d-custom_filter.png + + 2D Filters: Custom Filter + +FXAA Antialiasing Example: + +.. figure:: /images/logic_bricks/actuators/logic-actuators-types-filter_2d-custom_filter1.png + + Custom Filter: FXAA Antialiasing Filter + +At *Text Editor* under Templates / OpenGL Shading Language there is a FXAA antialiasing filter that can be used as a *Custom Filter*. Once opened in the *Text Editor* can be used in the *2D Filter* actuator under *Custom Filter* option. + +Examples +++++++++++++++++++++++++++++++ + +Built-in Filters +------------------------------ + +.. list-table:: + + * - .. figure:: /images/logic_bricks/actuators/logic-actuators-types-filter_2d-sepia_render_full.jpg + + Sepia Filter + + - .. figure:: /images/logic_bricks/actuators/logic-actuators-types-filter_2d-sobel_render_full.jpg + + Sobel Filter diff --git a/source/manual/logic/actuators/types/game.rst b/source/manual/logic_bricks/actuators/types/game.rst similarity index 62% rename from source/manual/logic/actuators/types/game.rst rename to source/manual/logic_bricks/actuators/types/game.rst index c2b34fd3..257928f3 100644 --- a/source/manual/logic/actuators/types/game.rst +++ b/source/manual/logic_bricks/actuators/types/game.rst @@ -1,22 +1,20 @@ .. _bpy.types.GameActuator: -************* +============================== Game Actuator -************* +============================== .. seealso:: See the Python reference of this logic brick in :class:`SCA_GameActuator`. -The *Game Actuator* handles the entire game and this way allows the user to perform -game-specific functions, such as restart, quit, and load. +The *Game Actuator* handles the entire game and this way allows the user to perform game-specific functions, such as restart, quit, and load. -.. figure:: /images/Logic/Actuators/logic-actuators-types-game-game.png - - Game actuator. +.. figure:: /images/logic_bricks/actuators/logic-actuators-types-game-game.png + Game actuator Properties -========== +++++++++++++++++++++++++++++++ Game Load ``bge.logic.globalDict`` @@ -39,12 +37,7 @@ Game Path to the blend-file to load. .. note:: - - If you use the keyboard sensor as a hook for :kbd:`Esc`, - in the event that the quit game actuator fails, such as an error in a Python file, - the game will be unable to close. Data may be recovered from ``quit.blend`` - :menuselection:`File --> Recover Last Session` - + If you use the keyboard sensor as a hook for :kbd:`Esc`, in the event that the quit game actuator fails, such as an error in a Python file, the game will be unable to close. Data may be recovered from ``quit.blend`` :menuselection:`File > Recover Last Session` Example -======= +++++++++++++++++++++++++++++++ diff --git a/source/manual/logic/actuators/types/message.rst b/source/manual/logic_bricks/actuators/types/message.rst similarity index 54% rename from source/manual/logic/actuators/types/message.rst rename to source/manual/logic_bricks/actuators/types/message.rst index ffd7d341..6a4f8369 100644 --- a/source/manual/logic/actuators/types/message.rst +++ b/source/manual/logic_bricks/actuators/types/message.rst @@ -1,28 +1,25 @@ .. _bpy.types.MessageActuator: -**************** +============================== Message Actuator -**************** +============================== .. seealso:: See the Python reference of this logic brick in :class:`KX_NetworkMessageActuator`. -The *Message Actuator* allows the user to send data across a scene, -and between scenes themselves, which can be received by other objects to activate them. +The *Message Actuator* allows the user to send data across a scene, and between scenes themselves, which can be received by other objects to activate them. -.. figure:: /images/Logic/Actuators/logic-actuators-types-message-message.png - - Message actuator. +.. figure:: /images/logic_bricks/actuators/logic-actuators-types-message-message.png + Message actuator Properties -========== +++++++++++++++++++++++++++++++ To Object to broadcast to. Leave blank if broadcast to all (or sending to another scene). Subject - Subject of message. Useful if sending certain types of message, such as "end-game", - to a message sensor listening for "end game" ``and`` Quit Game actuator. + Subject of message. Useful if sending certain types of message, such as "end-game", to a message sensor listening for "end game" ``and`` Quit Game actuator. Body Body of message sent (only read by Python). @@ -32,10 +29,7 @@ Body User-specified property. .. tip:: - - You can use the *Message Actuator* to send data, such as scores to other objects, - or even across scenes! (alternatively use ``bge.logic.globalDict``). - + You can use the *Message Actuator* to send data, such as scores to other objects, or even across scenes! (alternatively use ``bge.logic.globalDict``). Example -======= +++++++++++++++++++++++++++++++ diff --git a/source/manual/logic_bricks/actuators/types/motion.rst b/source/manual/logic_bricks/actuators/types/motion.rst new file mode 100644 index 00000000..732445e2 --- /dev/null +++ b/source/manual/logic_bricks/actuators/types/motion.rst @@ -0,0 +1,106 @@ +.. _bpy.types.ObjectActuator: + +.. _actuator-motion: + +============================== +Motion Actuator +============================== + +.. seealso:: + See the Python reference of this logic brick in :class:`SCA_ObjectActuator`. + +The *Motion Actuator* sets an object into motion. There are three modes of operation, Simple, Servo and Character, in which the object can either teleport and rotate, or dynamically move. + +.. figure:: /images/logic_bricks/actuators/logic-actuators-types-motion-motion.png + + Motion Actuator + +Properties +++++++++++++++++++++++++++++++ + +Motion Type + Determines the type of motion: + + Simple Motion + Applies a change in location and/or rotation directly. + Servo Control + Sets a target speed, and also how quickly it reaches that speed. + Character Motion + Sets the speed and direction the character is traveling. This should be used instead of *Simple Motion* to properly move a character. + + .. note:: + This actuator will only work if the object physics type is set to Character. + +Simple Motion +++++++++++++++++++++++++++++++ + +*Simple Motion* gives control over position and velocity, but does this as an instant displacement; the object never passes any of the coordinates between the start and end positions. This can interfere with the physical simulation of other objects, and can cause an object to go through another object. The `Servo Control`_ actuator does not suffer from this, since it produces physically correct velocities, and leaves updating the position to the physics simulation. + +.. figure:: /images/logic_bricks/actuators/logic-actuators-types-motion-simple.png + + Motion actuator for Simple Motion + +Loc + The object jumps the number of Blender units entered, each time a pulse is received. +Rot + The object rotates by the specified amount, each time a pulse is received. +L + Coordinates specified are Global (deactivated) or Local (actived). + +.. figure:: /images/logic_bricks/actuators/logic-actuators-types-motion-simple1.png + + Simple Motion for a dynamic object + +Servo Control +++++++++++++++++++++++++++++++ + +The Servo Control actuator influences the velocity of a game object by applying forces, resulting in correct behavior when colliding with other objects controlled by the physics simulation. The amount of force necessary is determined by a `PID controller `__, a type of controller that is often used in control systems. This actuator controls position or rotation only indirectly. + +Controlling the position is not necessary in that respect; that is left to a player moving the object via direction-type controls (such as the WASD keys in a first person shooter). In such a scenario, each direction-key sensor should be attached to a different Servo Control actuator setting a different target velocity. + +.. tip:: + To use the Servo Control actuator, it is necessary to set the object's Physics Type to "Dynamic" or "Rigid Body", and to mark the object as "Actor" in the same panel. This actuator does not work with the Character physics type. + +.. figure:: /images/logic_bricks/actuators/logic-actuators-types-motion-servo.png + + Motion actuator for Servo Control + +Reference Object + Specifies the object which the actuator uses as a reference for the velocity. When set, it will use a velocity relative to that object instead of absolute (i.e. world-relative) velocity. Use this for a player object standing on a moving platform. + +Servo Type + Linear Velocity + The target linear velocity for the object. + Angular Velocity + The target angular velocity for the object. +L + Determines whether the Linear Velocity specified are in Local (button depressed) or Global (button released) coordinates. +X, Y, Z force limits + Sets minimum and maximum limits for the force applied to the object. If disabled (i.e. X, Y or Z buttons are depressed) the force applied is unlimited. + +The following three coefficients determine the response to the *velocity error*, which is the difference between the target velocity and the object's actual velocity. + +Proportional Coefficient + This controls the reaction proportional to the velocity error. Small values cause smooth (but possibly too slow) changes in velocity. Higher values cause rapid changes, but may cause overshooting. +Integral Coefficient + This controls the reaction to the sum of errors so far. Using only the Proportional component results in a systematic velocity error if there is friction: some velocity delta is necessary to produce the force that compensates the friction. Using the Integral component suppresses this effect (the target velocity is achieved on average) but can create oscillations; the control will speed to compensate the initial velocity error. To avoid the oscillation, the Proportional component must be used with the Integral component (the Proportional component damps the control) This is why the GUI sets the Proportional Coefficient systematically when you change the Integral Coefficient. +Derivative Coefficient + Set the Derivative Coefficient. This dampens the acceleration when the target velocity is almost reached. + +Character Motion +++++++++++++++++++++++++++++++ + +.. figure:: /images/logic_bricks/actuators/logic-actuators-types-motion-character.png + + Motion actuator for Character Motion + +Loc + The character moves the number of Blender units entered, each time a pulse is received. +Rot + The character rotates by the specified amount, each time a pulse is received. +L + Coordinates specified are Global (deactivated) or Local (actived). +Add + The movement is incorporated to the movement performed by others character motion actuators doing the movement more fluid. +Jump + Make the character jump using the settings in the physics properties (Jump Force and Max Jumps). diff --git a/source/manual/logic/actuators/types/mouse.rst b/source/manual/logic_bricks/actuators/types/mouse.rst similarity index 60% rename from source/manual/logic/actuators/types/mouse.rst rename to source/manual/logic_bricks/actuators/types/mouse.rst index bf7dc5f2..2557c71e 100644 --- a/source/manual/logic/actuators/types/mouse.rst +++ b/source/manual/logic_bricks/actuators/types/mouse.rst @@ -1,25 +1,22 @@ .. _bpy.types.MouseActuator: -************** +============================== Mouse Actuator -************** +============================== .. seealso:: See the Python reference of this logic brick in :class:`SCA_MouseActuator`. -The *Mouse Actuator* allows two modes of operation, -to show/hide the mouse cursor or to control object rotation with the mouse. -The mouse rotation is flexible enough to allow any type of mouse look -as well as banking for flight controls. +The *Mouse Actuator* allows two modes of operation, to show/hide the mouse cursor or to control object rotation with the mouse. The mouse rotation is flexible enough to allow any type of mouse look as well as banking for flight controls. Mouse actuator for Mouse Look -.. figure:: /images/Logic/Actuators/logic-actuators-types-mouse-mouse.png +.. figure:: /images/logic_bricks/actuators/logic-actuators-types-mouse-mouse.png Mouse Actuator Properties -========== +++++++++++++++++++++++++++++++ Mode Determines the mouse mode. @@ -27,36 +24,31 @@ Mode Visibility Allows to show/hide the mouse cursor. Look - Controls the object rotation according to X and/or Y mouse movement. - Moreover, the object rotation can be constrained using thresholds and capping angles. - + Controls the object rotation according to X and/or Y mouse movement. Moreover, the object rotation can be constrained using thresholds and capping angles. Visibility ----------- +------------------------------ Mouse actuator for Visibility. -.. figure:: /images/Logic/Actuators/logic-actuators-types-mouse-visibility.png +.. figure:: /images/logic_bricks/actuators/logic-actuators-types-mouse-visibility.png - Mouse Actuator: Visibility. + Mouse Actuator: Visibility Visibility Toggles the visibility of the mouse cursor. - Look ----- +------------------------------ -Mouse actuator for Mouse Look +Mouse actuator for Mouse Look. -.. figure:: /images/Logic/Actuators/logic-actuators-types-mouse-look.png +.. figure:: /images/logic_bricks/actuators/logic-actuators-types-mouse-look.png - Mouse Actuator: Look. + Mouse Actuator: Look .. note:: - - To make Mouse Look work in a smoother way, it is necessary that the width and - height screen resolutions, in the render window, are set with even numbers (i.e. 1920x1080). + To make Mouse Look work in a smoother way, it is necessary that the width and height screen resolutions, in the render window, are set with even numbers (i.e. 1920x1080). Use ``X`` axis, ``Y`` axis X axis or/and Y axis mouse movement causes the rotation of the object. @@ -75,6 +67,5 @@ Local Reset Reset the cursor's X/Y position to the center of the screen space after calculating. - Example -======= +++++++++++++++++++++++++++++++ diff --git a/source/manual/logic/actuators/types/parent.rst b/source/manual/logic_bricks/actuators/types/parent.rst similarity index 58% rename from source/manual/logic/actuators/types/parent.rst rename to source/manual/logic_bricks/actuators/types/parent.rst index 69b48bf8..322c5b71 100644 --- a/source/manual/logic/actuators/types/parent.rst +++ b/source/manual/logic_bricks/actuators/types/parent.rst @@ -1,21 +1,20 @@ .. _bpy.types.ParentActuator: -*************** +============================== Parent Actuator -*************** +============================== .. seealso:: See the Python reference of this logic brick in :class:`SCA_ParentActuator`. The *Parent Actuator* enables the user to change the parent relationships of the current object. -.. figure:: /images/Logic/Actuators/logic-actuators-types-parent-parent.png - - Parent Actuator. +.. figure:: /images/logic_bricks/actuators/logic-actuators-types-parent-parent.png + Parent Actuator Properties -========== +++++++++++++++++++++++++++++++ Scene The type of parenting operation. @@ -23,9 +22,9 @@ Scene Set Parent Make this object to be current object's parent. - .. figure:: /images/Logic/Actuators/logic-actuators-types-parent-set.png + .. figure:: /images/logic_bricks/actuators/logic-actuators-types-parent-set.png - Parent Actuator: Set. + Parent Actuator: Set Parent Object Name of parent object. @@ -37,10 +36,9 @@ Scene Remove Parent Remove all parents of current object. - .. figure:: /images/Logic/Actuators/logic-actuators-types-parent-remove.png - - Parent Actuator: Remove. + .. figure:: /images/logic_bricks/actuators/logic-actuators-types-parent-remove.png + Parent Actuator: Remove Example -======= +++++++++++++++++++++++++++++++ diff --git a/source/manual/logic_bricks/actuators/types/property.rst b/source/manual/logic_bricks/actuators/types/property.rst new file mode 100644 index 00000000..8bc9529d --- /dev/null +++ b/source/manual/logic_bricks/actuators/types/property.rst @@ -0,0 +1,51 @@ +.. _bpy.types.PropertyActuator: + +.. _actuator-property: + +============================== +Property Actuator +============================== + +.. seealso:: + See the Python reference of this logic brick in :class:`SCA_PropertyActuator`. + +The *Property Actuator* changes the value of a given property (like assigning, adding, or copying) once the actuator itself is activated. + +.. figure:: /images/logic_bricks/actuators/logic-actuators-types-property-property.png + + Property Actuator + +Properties +++++++++++++++++++++++++++++++ + +Mode + Assign + The *Property* target property will become equal to the set *Value* once the actuator is activated. + Add + Adds *Value* to the value of the property *Property* once the actuator is activated (enter a negative value to decrease). For *Bool*, a value other than 0 (also negative) is counted as True. + Copy + Copies a property from another *Object* to a property of the actuator owner once the actuator is activated. + Toggle + Switches 0 to 1 and any other number than 0 to 0 once the actuator is activated. Useful for on/off switches. + Level + TODO. + +Property + The target property that this actuator will change. +Value + The value to be used to change the property. + +Example +++++++++++++++++++++++++++++++ + +You have a character, it has a property named "hp" (hit/health points) to determine when he has taken enough damage to die. ``hp`` is an int with the start value of 100. + +.. figure:: /images/logic_bricks/actuators/logic-actuators-types-property-example.png + + hp Property + +You set up two *Collision* sensors, one for enemy bullets, and one for picking up more health. The first one is connected (through an *AND* controller) to an *Add Property* actuator with the property ``hp`` and the value -10. Every time the player is hit by an enemy bullet he loses 10 HP. The other sensor is connected (through an *AND* controller) to an other *Add Property* actuator, this one with the value 50. So every time the player collides with a health item the HP increases by 50. Next you set up a *Property* sensor for an interval, greater than 100. This is connected (through an *AND* controller) to an *Assign Property* actuator which is set to 100. So if the players HP increases over 100 it is set to 100. + +.. figure:: /images/logic_bricks/actuators/logic-actuators-types-property-example1.png + + Property logic diff --git a/source/manual/logic_bricks/actuators/types/random.rst b/source/manual/logic_bricks/actuators/types/random.rst new file mode 100644 index 00000000..ece38fe3 --- /dev/null +++ b/source/manual/logic_bricks/actuators/types/random.rst @@ -0,0 +1,110 @@ +.. _bpy.types.RandomActuator: + +============================== +Random Actuator +============================== + +.. seealso:: + See the Python reference of this logic brick in :class:`SCA_RandomActuator`. + +The *Random Actuator* creates a random value which can be stored in a property of the object. + +.. figure:: /images/logic_bricks/actuators/logic-actuators-types-random-random.png + + Random Actuator + +Properties +++++++++++++++++++++++++++++++ + +Seed + Starting seed for random generator. +Property + Property where to store the random value. + +Distribution +------------------------------ + +Distributions from which to select the random value. The default entry of *Boolean Constant* gives either True or False, which is useful for test purposes. + +Each distribution has one common property called: *Property*. This can be either a float, integer, or a boolean depending on the distribution type. + +Float Neg. Exp. + .. figure:: /images/logic_bricks/actuators/logic-actuators-types-random-float_neg_exp.png + + Distribution: Float Neg. Exp. + + Values drop off exponentially with the specified half-life time. + + Half-Life Time + Half-life time. + +Float Normal + .. figure:: /images/logic_bricks/actuators/logic-actuators-types-random-float_normal.png + + Distribution: Float Normal + + Random numbers from a normal distribution. + + Mean + Mean of normal distribution. + SD + Standard deviation of normal distribution. + +Float Uniform + .. figure:: /images/logic_bricks/actuators/logic-actuators-types-random-float_uniform.png + + Distribution: Float Uniform + + Random values selected uniformly between a minimum (*Min*) and maximum (*Max*) values. + +Float Constant + .. figure:: /images/logic_bricks/actuators/logic-actuators-types-random-float_constant.png + + Distribution: Float Constant + + Returns a constant value specified in the *Value* field. + +Int Poisson + .. figure:: /images/logic_bricks/actuators/logic-actuators-types-random-int_poisson.png + + Distribution: Int Poisson + + Random numbers from a `Poisson distribution `__. The mean of the equation is defined by the *Mean* value. + +Int Uniform + .. figure:: /images/logic_bricks/actuators/logic-actuators-types-random-int_uniform.png + + Distribution: Int Uniform + + Random values selected uniformly between a minimum (*Min*) and maximum (*Max*) values. + +Int Constant + .. figure:: /images/logic_bricks/actuators/logic-actuators-types-random-int_constant.png + + Distribution: Int Constant + + Returns a constant value specified by the *Value* field. + +Bool Bernoulli + .. figure:: /images/logic_bricks/actuators/logic-actuators-types-random-bool_bernoulli.png + + Distribution: Bool Bernoulli + + Returns a random distribution using the `Bernoulli distribution `__ with specified ratio of ``TRUE`` pulses. This ratio is calculated by the *Chance* value. + +Bool Uniform + .. figure:: /images/logic_bricks/actuators/logic-actuators-types-random-bool_uniform.png + + Distribution: Bool Uniform + + A 50/50 chance of obtaining True/False. + +Bool Constant + .. figure:: /images/logic_bricks/actuators/logic-actuators-types-random-bool_constant.png + + Distribution: Bool Constant + + Returns a constant value specified in the *Value* field, must be either ``True`` or ``False``. + +Example +++++++++++++++++++++++++++++++ diff --git a/source/manual/logic/actuators/types/scene.rst b/source/manual/logic_bricks/actuators/types/scene.rst similarity index 60% rename from source/manual/logic/actuators/types/scene.rst rename to source/manual/logic_bricks/actuators/types/scene.rst index faa856a7..aeec21d9 100644 --- a/source/manual/logic/actuators/types/scene.rst +++ b/source/manual/logic_bricks/actuators/types/scene.rst @@ -1,18 +1,17 @@ .. _bpy.types.SceneActuator: -************** +============================== Scene Actuator -************** +============================== The *Scene Actuator* manages the scenes in the user's blend-file. -.. figure:: /images/Logic/Actuators/logic-actuators-types-scene-scene.png - - Scene actuator. +.. figure:: /images/logic_bricks/actuators/logic-actuators-types-scene-scene.png + Scene actuator Properties -========== +++++++++++++++++++++++++++++++ The actuator has several modes described below: @@ -23,6 +22,5 @@ Set Scene Set Camera Changes which camera is used. - Example -======= +++++++++++++++++++++++++++++++ diff --git a/source/manual/logic/actuators/types/sound.rst b/source/manual/logic_bricks/actuators/types/sound.rst similarity index 53% rename from source/manual/logic/actuators/types/sound.rst rename to source/manual/logic_bricks/actuators/types/sound.rst index d635d144..1072754b 100644 --- a/source/manual/logic/actuators/types/sound.rst +++ b/source/manual/logic_bricks/actuators/types/sound.rst @@ -1,25 +1,24 @@ .. _bpy.types.SoundActuator: -************** +============================== Sound Actuator -************** +============================== .. seealso:: See the Python reference of this logic brick in :class:`SCA_SoundActuator`. The *Sound Actuator* allows the user to play sound files in the game engine. -.. figure:: /images/Logic/Actuators/logic-actuators-types-sound-sound.png +.. figure:: /images/logic_bricks/actuators/logic-actuators-types-sound-sound.png - Sound Actuator: File selection. + Sound Actuator: File selection -.. figure:: /images/Logic/Actuators/logic-actuators-types-sound-sound1.png - - Sound Actuator: Properties. +.. figure:: /images/logic_bricks/actuators/logic-actuators-types-sound-sound1.png + Sound Actuator: Properties Properties -========== +++++++++++++++++++++++++++++++ Sound File Load a new sound file or select one from the list. @@ -29,13 +28,11 @@ Play Mode Play Stop The sound effect is played when activated. Stops instantly when deactivated. Play End - The sound effect is played when activated. When deactivated, stops after finishing playing the sound. - The sound is not replayed if activated while still playing. + The sound effect is played when activated. When deactivated, stops after finishing playing the sound. The sound is not replayed if activated while still playing. Loop Stop The sound is played as infinite loop when activated. Stops instantly when deactivated. Loop End - The sound is played as infinite loop when activated. - When deactivated, stops after finishing playing the sound. + The sound is played as infinite loop when activated. When deactivated, stops after finishing playing the sound. Loop Bidirectional The sound is played as infinite ping-pong loop. When deactivated, stops after finishing playing the sound. Loop Bidirectional Stop @@ -45,51 +42,39 @@ Volume Pitch The pitch at which the sound effect is played. 0 is default, 12 is one octave. - 3D Sound --------- +------------------------------ -.. figure:: /images/Logic/Actuators/logic-actuators-types-sound-cone.jpg +.. figure:: /images/logic_bricks/actuators/logic-actuators-types-sound-cone.jpg :width: 200px :figwidth: 200px - The cones point in the direction of the objects negative Z axis. + The cones point in the direction of the objects negative Z axis -If enabled, the sound is affected by distance, speed of the emitting object and various other things. -The options below are only available if *3D Sound* checkbox is enabled. +If enabled, the sound is affected by distance, speed of the emitting object and various other things. The options below are only available if *3D Sound* checkbox is enabled. .. note:: - - The sound has to be *Mono* to can be used as a *3D Sound* in a 3D environment. - *Stereo* sounds have not 3D properties. + The sound has to be *Mono* to be used as a *3D Sound* in a 3D environment. *Stereo* sounds have not 3D properties. .. note:: - - 3D sound is influenced by the Audio panel in Scene Settings. - A brief description of the different distance models can be found - `here `__. + 3D sound is influenced by the Audio panel in Scene Settings. A brief description of the different distance models can be found `here `__. Minimum Gain The minimum gain of the sound, no matter how far it is away. Maximum Gain The maximum gain of the sound, no matter how near it is. Reference Distance - The cones point in the direction of the objects negative Z axis. - The distance at which the sound has a gain of 1.0. + The cones point in the direction of the objects negative Z axis. The distance at which the sound has a gain of 1.0. Maximum Distance The maximum distance at which the sound can be heard. Rolloff - The influence factor on volume depending on distance. - The higher, the more the sound will fade with distance. + The influence factor on volume depending on distance. The higher, the more the sound will fade with distance. Cone Outer Gain - The gain outside the outer cone. The gain inside the outer cone will be interpolated - between this value and the normal gain inside the inner cone (Volume). - Note that the cones always point in the direction of the objects local -Z axis (figure right). + The gain outside the outer cone. The gain inside the outer cone will be interpolated between this value and the normal gain inside the inner cone (Volume). Note that the cones always point in the direction of the objects local -Z axis (figure right). Cone Outer Angle The angle of the outer cone. Cone Inner Angle The angle of the inner cone. - Example -======= +++++++++++++++++++++++++++++++ diff --git a/source/manual/logic_bricks/actuators/types/state.rst b/source/manual/logic_bricks/actuators/types/state.rst new file mode 100644 index 00000000..b47e338c --- /dev/null +++ b/source/manual/logic_bricks/actuators/types/state.rst @@ -0,0 +1,33 @@ +.. _bpy.types.StateActuator: + +============================== +State Actuator +============================== + +.. seealso:: + See the Python reference of this logic brick in :class:`SCA_StateActuator`. + +The *State Actuator* allows the user to create complex logic, while retaining a clear user interface. It does this by having different states, and performing operations upon them. + +.. note:: + With the state actuator, you can create tiers of logic, without the need for hundreds of properties. Use it well, and you benefit greatly, but often problems may be circumvented by Python. + +.. figure:: /images/logic_bricks/actuators/logic-actuators-types-state-state.png + + State actuator + +Properties +++++++++++++++++++++++++++++++ + +Operation + Change State + Change from the current state to the state specified. + Remove State + Removes the specified states from the active states (deactivates them). + Add State + Adds the specified states to the active states (activates them). + Set State + Moves from the current state to the state specified, deactivating other added states. + +Example +++++++++++++++++++++++++++++++ diff --git a/source/manual/logic/actuators/types/steering.rst b/source/manual/logic_bricks/actuators/types/steering.rst similarity index 50% rename from source/manual/logic/actuators/types/steering.rst rename to source/manual/logic_bricks/actuators/types/steering.rst index d2aa0588..42151a52 100644 --- a/source/manual/logic/actuators/types/steering.rst +++ b/source/manual/logic_bricks/actuators/types/steering.rst @@ -1,23 +1,20 @@ .. _bpy.types.SteeringActuator: -***************** +============================== Steering Actuator -***************** +============================== .. seealso:: See the Python reference of this logic brick in :class:`SCA_SteeringActuator`. -The *Steering Actuator* provides simple pathfinding for an object by moving it towards a target object, -with options to seek, flee, or follow a path. This actuator will not actually try to avoid obstacles -by deviating the objects course. +The *Steering Actuator* provides simple pathfinding for an object by moving it towards a target object, with options to seek, flee, or follow a path. This actuator will not actually try to avoid obstacles by deviating the objects course. -.. figure:: /images/Logic/Actuators/logic-actuators-types-steering-steering.png - - Steering Actuator. +.. figure:: /images/logic_bricks/actuators/logic-actuators-types-steering-steering.png + Steering Actuator Properties -========== +++++++++++++++++++++++++++++++ Behavior Seek, Flee or Path following @@ -25,15 +22,10 @@ Target Object The game object to seek. Navigation Mesh Object - The name of the navigation mesh object used by the Steering Actuator when in Path following behavior. - The game object will use the Navigation Mesh to create a path to follow the Target Object. + The name of the navigation mesh object used by the Steering Actuator when in Path following behavior. The game object will use the Navigation Mesh to create a path to follow the Target Object. .. tip:: - - You can create your own mesh to use for navigation and make it a Navigation Mesh in: - :menuselection:`Properties editor --> Physics --> Physics panel --> choosing Physics Type: Navigation Mesh` - Or you can let Blender create a Navigation Mesh, then select a mesh. (Floor, or ground, or etc.): - :menuselection:`Properties editor --> Scene --> Navigation mesh object panel --> Build navigation mesh` + You can create your own mesh to use for navigation and make it a Navigation Mesh in: :menuselection:`Properties editor > Physics > Physics panel > choosing Physics Type: Navigation Mesh` Or you can let Blender create a Navigation Mesh, then select a mesh. (Floor, or ground, or etc.): :menuselection:`Properties editor > Scene > Navigation mesh object panel > Build navigation mesh` Distance The maximum distance for the game object approach the Target Object. @@ -46,25 +38,20 @@ Turn Speed Facing Set a game object axis that always faces the Target Object. Axis - The game object axis that always faces the Target Object. - Options are: Positive (``X``, ``Y``, ``Z``) and Negative (``-X``, ``-Y``, ``-Z``). + The game object axis that always faces the Target Object. Options are: Positive (``X``, ``Y``, ``Z``) and Negative (``-X``, ``-Y``, ``-Z``). Axis N Use the Normal of the Navigation Mesh to align the up vector of the game object. Self Terminated If disabled: - Stops moving toward the Target Object once it reaches the maximum distance to approach the Target Object. - Will follow the Target Object if it moves further away than the maximum distance. + Stops moving toward the Target Object once it reaches the maximum distance to approach the Target Object. Will follow the Target Object if it moves further away than the maximum distance. If enabled: - Stops moving toward the Target Object once it reaches the maximum distance to approach the Target Object. - Will not follow even if the Target Object moves further away than the maximum distance. + Stops moving toward the Target Object once it reaches the maximum distance to approach the Target Object. Will not follow even if the Target Object moves further away than the maximum distance. Lock ``Z`` velocity Avoid object movement in ``Z`` axis while seeking a target. Visualize - This checkbox let the user specify whether to show or not the debug informations of the actuator. It only - available for *Path following* behaviour. + This checkbox let the user specify whether to show or not the debug informations of the actuator. It only available for *Path following* behaviour. Update period Set the period to update path detection. It only available for *Path following* behaviour. - Example -======= +++++++++++++++++++++++++++++++ diff --git a/source/manual/logic/actuators/types/vibration.rst b/source/manual/logic_bricks/actuators/types/vibration.rst similarity index 71% rename from source/manual/logic/actuators/types/vibration.rst rename to source/manual/logic_bricks/actuators/types/vibration.rst index ac81ec6f..2289cfbd 100644 --- a/source/manual/logic/actuators/types/vibration.rst +++ b/source/manual/logic_bricks/actuators/types/vibration.rst @@ -1,25 +1,23 @@ .. _bpy.types.VibrationActuator: -******************* +============================== Vibration Actuator -******************* +============================== .. seealso:: See the Python reference of this logic brick in :class:`SCA_VibrationActuator`. The *Vibration Actuator* allows the user to control the joystick vibration during the game. -.. figure:: /images/Logic/Actuators/logic-actuators-types-vibration-vibration.png +.. figure:: /images/logic_bricks/actuators/logic-actuators-types-vibration-vibration.png - Vibration Actuator. + Vibration Actuator .. tip:: - - The vibration can be updated in every logic tick. This way different vibration effects - can be performed (sin, up/down, etc). + The vibration can be updated in every logic tick. This way different vibration effects can be performed (sin, up/down, etc). Properties -========== +++++++++++++++++++++++++++++++ Joystick Index Specifies in which joystick to control the vibration. @@ -35,6 +33,5 @@ Strength High Freq Duration Duration (in milliseconds) of the vibration. - Example -======= +++++++++++++++++++++++++++++++ diff --git a/source/manual/logic/actuators/types/visibility.rst b/source/manual/logic_bricks/actuators/types/visibility.rst similarity index 53% rename from source/manual/logic/actuators/types/visibility.rst rename to source/manual/logic_bricks/actuators/types/visibility.rst index 2d0d143a..5e3ca029 100644 --- a/source/manual/logic/actuators/types/visibility.rst +++ b/source/manual/logic_bricks/actuators/types/visibility.rst @@ -1,8 +1,8 @@ .. _bpy.types.VisibilityActuator: -******************* +============================== Visibility Actuator -******************* +============================== .. seealso:: See the Python reference of this logic brick in :class:`SCA_VisibilityActuator`. @@ -10,27 +10,21 @@ Visibility Actuator The *Visibility Actuator* allows the user to change the visibility of objects during run-time. .. note:: + Using the visibility actuator will save on Rasterizer usage, however, not Physics, and so is limited in terms of Level of Detail (LOD). For LOD look at replace mesh, but be aware that the logic required can negate the effect of the LOD. - Using the visibility actuator will save on Rasterizer usage, however, not Physics, - and so is limited in terms of Level of Detail (LOD). For LOD look at replace mesh, - but be aware that the logic required can negate the effect of the LOD. - -.. figure:: /images/Logic/Actuators/logic-actuators-types-visibility-visibility.png - - Visibility Actuator. +.. figure:: /images/logic_bricks/actuators/logic-actuators-types-visibility-visibility.png + Visibility Actuator Properties -========== +++++++++++++++++++++++++++++++ Visible Toggle checkbox to toggle visibility. Occlusion Toggle checkbox to toggle occlusion. Must be initialized from the *Physics* tab. Children - Toggle checkbox to toggle recursive setting -- will set visibility / occlusion state - to all child objects, children of children (recursively). - + Toggle checkbox to toggle recursive setting -- will set visibility / occlusion state to all child objects, children of children (recursively). Example -======= +++++++++++++++++++++++++++++++ diff --git a/source/manual/logic_bricks/controllers/editing.rst b/source/manual/logic_bricks/controllers/editing.rst new file mode 100644 index 00000000..e78a9752 --- /dev/null +++ b/source/manual/logic_bricks/controllers/editing.rst @@ -0,0 +1,115 @@ +.. |true-button| image:: /images/logic_bricks/logic-common-options-icons-true.png + +.. |false-button| image:: /images/logic_bricks/logic-common-options-icons-false.png + +.. |movement-button| image:: /images/logic_bricks/logic-common-options-icons-movement.png + +.. |down-button| image:: /images/logic_bricks/logic-common-options-icons-down.png + +.. |preference-button| image:: /images/logic_bricks/logic-common-options-icons-preference.png + +============================== +Controller Editing +============================== + +.. figure:: /images/logic_bricks/controllers/logic-controllers-editing-column.png + + Controller Column with a typical sensor + +UPBGE controllers can be set up and edited in the central column of the Logic Bricks Panel. This page describes the general column controls, those parameters which are common to all individual controller types, and how different states for the objects in the logic system can be set up and edited. + +The image shows a typical controller column with a single controller. At the top of this column, and for sensors and actuators, the column heading includes menus and buttons to control which of all the controllers in the current Game Logic are displayed. + +Column Heading +++++++++++++++++++++++++++++++ + +.. figure:: /images/logic_bricks/controllers/logic-controllers-editing-column1.png + + Controller Column headings + +The column headings contain controls to set which controllers appear, and the level of detail given, in the controller column. This is very useful for hiding unnecessary controllers so that the necessary ones are visible and easier to reach. Both these can be controlled individually. + +Controllers +++++++++++++++++++++++++++++++ + +Show Objects + Expands all objects. + +Hide Objects + Collapses all objects to just a bar with their name. + +Show Controllers + Expands all Controllers. + +Hide Controllers + Collapses all Controllers to bars with their names. + +It is also possible to filter which controllers are viewed using the three heading buttons: + +Sel + Shows all controllers for selected objects. + +Act + Shows only controllers belonging to the active object. + +Link + Shows controllers which have a link to actuators/sensors. + +Object Heading +++++++++++++++++++++++++++++++ + +.. figure:: /images/logic_bricks/controllers/logic-controllers-editing-column2.png + + Object heading + +.. figure:: /images/logic_bricks/controllers/logic-controllers-editing-column3.png + + Object list + +In the column list, controllers are grouped by object. By default, controllers for every selected object appear in the list, but this may be modified by the column heading filters. + +At the head of each displayed object controller list, three entries appear: + +Triangle button |down-button| + Shows which states are in use for the object (toggle). Detailed description of the marked panel is given in :doc:`States `. + +Name + The name of the object. + +Add Controller + When clicked, a menu appears with the available controller types. Selecting an entry adds a new controller to the object. See :doc:`Controllers ` for a list of available controller types. + +Standard Controller Parts +++++++++++++++++++++++++++++++ + +.. _standard-controller-parts: + +The controller heading is standard to every controller. + +.. figure:: /images/logic_bricks/controllers/logic-controllers-editing-column4.png + + Controller parts + +Triangle button |down-button| + Collapses the sensor information to a single line (toggle). + +Controller Type menu + Specifies the type of the controller. + +Controller Name + The name of the controller. This can be selected by the user. It is used to access controllers with Python; it needs to be unique among the selected objects. + +Preference Button |preference-button| + If on, this controller will operate before all other non-preference controllers (useful for start-up scripts). + +Movement buttons |movement-button| + Move the sensor up or down over other sensors within the column. + +Checkbox button + When unchecked the controller is deactivated, no pulses will be sent to the connected actuators. Very useful to check different logics without unlink or delete the controller. + +X Button + Deletes the controller. + +Visible State + Sets the designated state for which this controller will operate. diff --git a/source/manual/logic/controllers/index.rst b/source/manual/logic_bricks/controllers/index.rst similarity index 77% rename from source/manual/logic/controllers/index.rst rename to source/manual/logic_bricks/controllers/index.rst index 993f81a1..9984ca4c 100644 --- a/source/manual/logic/controllers/index.rst +++ b/source/manual/logic_bricks/controllers/index.rst @@ -1,9 +1,9 @@ .. _controllers-index: .. _bpy.types.Controller: -############### +============================== Controllers -############### +============================== .. toctree:: :maxdepth: 2 @@ -13,7 +13,7 @@ Controller Types -================ +++++++++++++++++++++++++++++++ .. toctree:: :maxdepth: 1 diff --git a/source/manual/logic_bricks/controllers/introduction.rst b/source/manual/logic_bricks/controllers/introduction.rst new file mode 100644 index 00000000..92d00dc5 --- /dev/null +++ b/source/manual/logic_bricks/controllers/introduction.rst @@ -0,0 +1,64 @@ + +============================== +Introduction +============================== + +The controllers are the bricks that collect data sent by the sensors, and also specify the state for which they operate. After performing the specified logic operations, they send out pulse signals to drive the actuators to which they are connected. + +When a sensor is activated, it sends out a positive pulse, and when it is deactivated, it sends out a negative pulse. The controllers' job is to check and combine these pulses to trigger the proper response. + +The logic blocks for all types of controller may be constructed and changed using the Logic Editor; details of this process are given in the :doc:`Controller Editing <./editing>` page. + +Controller Types +++++++++++++++++++++++++++++++ + +There are eight types of controller logic brick to carry out the logic process on the input signal(s). This table gives a quick overview of the logic operations performed by the logical controller types. The first column, input, represents the number of positive pulses sent from the connected sensors. The following columns represent each controller's response to those pulses. True means the conditions of the controller are fulfilled, and the actuators it is connected to will be activated; false means the controller's conditions are not met and nothing will happen. Please consult the individual controller pages for a more detailed description of each controller. + +.. note:: + It is assumed that more than one sensor is connected to the controller. For only one sensor, consult the "All" line. + +.. list-table:: + :header-rows: 1 + + * - Positive sensors + - Controllers + - .. + - .. + - .. + - .. + - .. + * - .. + - :doc:`AND <./types/and>` + - :doc:`OR <./types/or>` + - :doc:`XOR <./types/xor>` + - :doc:`NAND <./types/nand>` + - :doc:`NOR <./types/nor>` + - :doc:`XNOR <./types/xnor>` + * - None + - False + - False + - False + - True + - True + - True + * - One + - False + - True + - True + - True + - False + - False + * - Multiple, not all + - False + - True + - False + - True + - False + - True + * - All + - True + - True + - False + - False + - False + - True diff --git a/source/manual/logic/controllers/types/and.rst b/source/manual/logic_bricks/controllers/types/and.rst similarity index 74% rename from source/manual/logic/controllers/types/and.rst rename to source/manual/logic_bricks/controllers/types/and.rst index e9a93c86..4803917d 100644 --- a/source/manual/logic/controllers/types/and.rst +++ b/source/manual/logic_bricks/controllers/types/and.rst @@ -1,8 +1,8 @@ .. _controller-and: -************** +============================== AND Controller -************** +============================== .. seealso:: See the Python reference of this logic brick in :class:`SCA_ANDController`. @@ -14,12 +14,11 @@ This controller gives a positive (``TRUE``) output when: For all other conditions the controller gives a negative (``FALSE``) output. - Options ======= -.. figure:: /images/Logic/Controllers/logic-controllers-types-and-and.png +.. figure:: /images/logic_bricks/controllers/logic-controllers-types-and-and.png - AND Controller. + AND Controller See :ref:`standard controller parts ` for descriptions of the remaining options. diff --git a/source/manual/logic/controllers/types/expression.rst b/source/manual/logic_bricks/controllers/types/expression.rst similarity index 54% rename from source/manual/logic/controllers/types/expression.rst rename to source/manual/logic_bricks/controllers/types/expression.rst index 82d483b1..fb1cf860 100644 --- a/source/manual/logic/controllers/types/expression.rst +++ b/source/manual/logic_bricks/controllers/types/expression.rst @@ -1,46 +1,42 @@ .. _bpy.types.ExpressionController: -********************* +============================== Expression Controller -********************* +============================== .. seealso:: See the Python reference of this logic brick in :class:`SCA_IController`. This controller evaluates a user written expression, and gives a positive (``TRUE``) output when: -- The result of the expression is ``TRUE``, and -- The object is in the designated State. +- The result of the expression is ``TRUE``, and +- The object is in the designated State. For all other conditions the controller gives a negative (``FALSE``) output. -.. figure:: /images/Logic/Controllers/logic-controllers-types-expression-expression.png - - Expression Controller. +.. figure:: /images/logic_bricks/controllers/logic-controllers-types-expression-expression.png + Expression Controller Expression -========== - -The expression, which is written in the field, can consist of variables, -constants and operators. These must follow the rules laid out below. +++++++++++++++++++++++++++++++ +The expression, which is written in the field, can consist of variables, constants and operators. These must follow the rules laid out below. Variables -========= +++++++++++++++++++++++++++++++ You can use: -- *sensors names*, -- *properties*: assign a game property to an object and use it in a controller expression. +- *sensors names*, +- *properties*: assign a game property to an object and use it in a controller expression. These cannot contain blank spaces. - Operations -========== +++++++++++++++++++++++++++++++ Mathematical Operations ------------------------ +------------------------------ Operators: ``*``, ``/``, ``+``, ``-`` @@ -48,20 +44,18 @@ Returns: a number Examples: ``3 + 2``, ``35 / 5`` - Logical Operations ------------------- +------------------------------ -- Comparison operators: ``<``, ``>``, ``>=``, ``<=``, ``==``, ``!=`` -- Booleans operators: ``AND``, ``OR``, ``NOT`` +- Comparison operators: ``<``, ``>``, ``>=``, ``<=``, ``==``, ``!=`` +- Booleans operators: ``AND``, ``OR``, ``NOT`` Returns: ``True`` or ``False``. Examples: ``3 > 2 (True)``, ``1 AND 0 (False)`` - Conditional Statement (if) -========================== +++++++++++++++++++++++++++++++ Use:: @@ -69,17 +63,16 @@ Use:: If the controller evaluates ``expression`` to True: -- if ``pulse_if_expression_is_true`` is ``True``, the controller sends a positive pulse to the connected actuators. -- if ``pulse_if_expression_is_true`` is ``False``, the controller sends a negative pulse to the connected actuators. +- if ``pulse_if_expression_is_true`` is ``True``, the controller sends a positive pulse to the connected actuators. +- if ``pulse_if_expression_is_true`` is ``False``, the controller sends a negative pulse to the connected actuators. If the controller evaluates ``expression`` to False: -- if ``pulse_if_expression_is_false`` is ``True``, the controller sends a positive pulse to the connected actuators. -- if ``pulse_if_expression_is_false`` is ``False``, the controller sends a negative pulse to the connected actuators. - +- if ``pulse_if_expression_is_false`` is ``True``, the controller sends a positive pulse to the connected actuators. +- if ``pulse_if_expression_is_false`` is ``False``, the controller sends a negative pulse to the connected actuators. Examples -======== +++++++++++++++++++++++++++++++ Given the object has a property ``coins`` equal to 30:: @@ -89,8 +82,8 @@ returns ``True`` (the controller sends a positive pulse to the connected actuato Given the object has: -- A sensor called ``Key_Inserted`` equal to ``True``. -- A property named ``Fuel`` equal to ``False``. +- A sensor called ``Key_Inserted`` equal to ``True``. +- A property named ``Fuel`` equal to ``False``. .. code-block:: python @@ -112,16 +105,14 @@ You can also do:: if ((Key_Inserted AND Fuel) OR (coins > 20), True, False) -This expression returns True, -hence in this case the controller sends a positive pulse to the connected actuators. - +This expression returns True, hence in this case the controller sends a positive pulse to the connected actuators. Parts of the Expression Controller -================================== +++++++++++++++++++++++++++++++++++ -.. figure:: /images/Logic/Controllers/logic-controllers-types-expression-part.png +.. figure:: /images/logic_bricks/controllers/logic-controllers-types-expression-part.png - The Expression to calculate. + The Expression to calculate .. 1. Expression. diff --git a/source/manual/logic_bricks/controllers/types/nand.rst b/source/manual/logic_bricks/controllers/types/nand.rst new file mode 100644 index 00000000..67325634 --- /dev/null +++ b/source/manual/logic_bricks/controllers/types/nand.rst @@ -0,0 +1,28 @@ + +============================== +NAND Controller +============================== + +.. seealso:: + See the Python reference of this logic brick in :class:`SCA_NANDController`. + +This controller *activates* all connected actuators if: + +- The game object is in the designated state. +- At least one connected sensor triggers the controller. +- At least one connected sensor evaluated False. + +This controller *deactivates* all connected actuators if: + +- The game object is in the designated state. +- At least one connected sensor triggers the controller. +- *All* connected sensor evaluated True. + +Options +++++++++++++++++++++++++++++++ + +.. figure:: /images/logic_bricks/controllers/logic-controllers-types-nand-nand.png + + NAND Controller + +See :ref:`standard controller parts ` for descriptions of the remaining options. diff --git a/source/manual/logic/controllers/types/nor.rst b/source/manual/logic_bricks/controllers/types/nor.rst similarity index 57% rename from source/manual/logic/controllers/types/nor.rst rename to source/manual/logic_bricks/controllers/types/nor.rst index 766021b0..2c085cab 100644 --- a/source/manual/logic/controllers/types/nor.rst +++ b/source/manual/logic_bricks/controllers/types/nor.rst @@ -1,24 +1,23 @@ -************** +============================== NOR Controller -************** +============================== .. seealso:: See the Python reference of this logic brick in :class:`SCA_NORController`. This controller gives a positive (``TRUE``) output when: -- None of its inputs is ``TRUE``, and -- The object is in the designated State. +- None of its inputs is ``TRUE``, and +- The object is in the designated State. For all other conditions the controller gives a negative (``FALSE``) output. - Options -======= +++++++++++++++++++++++++++++++ -.. figure:: /images/Logic/Controllers/logic-controllers-types-nor-nor.png +.. figure:: /images/logic_bricks/controllers/logic-controllers-types-nor-nor.png - NOR Controller. + NOR Controller See :ref:`standard controller parts ` for descriptions of the remaining options. diff --git a/source/manual/logic/controllers/types/or.rst b/source/manual/logic_bricks/controllers/types/or.rst similarity index 56% rename from source/manual/logic/controllers/types/or.rst rename to source/manual/logic_bricks/controllers/types/or.rst index e5cda1c4..20813aeb 100644 --- a/source/manual/logic/controllers/types/or.rst +++ b/source/manual/logic_bricks/controllers/types/or.rst @@ -1,24 +1,23 @@ -************* +============================== OR Controller -************* +============================== .. seealso:: See the Python reference of this logic brick in :class:`SCA_ORController`. This controller gives a positive (``TRUE``) output when: -- Any one or more of its inputs is ``TRUE``, and -- The object is in the designated State. +- Any one or more of its inputs is ``TRUE``, and +- The object is in the designated State. For all other conditions the controller gives a negative (``FALSE``) output. - Options -======= +++++++++++++++++++++++++++++++ -.. figure:: /images/Logic/Controllers/logic-controllers-types-or-or.png +.. figure:: /images/logic_bricks/controllers/logic-controllers-types-or-or.png - OR Controller. + OR Controller See :ref:`standard controller parts ` for descriptions of the remaining options. diff --git a/source/manual/logic/controllers/types/python.rst b/source/manual/logic_bricks/controllers/types/python.rst similarity index 54% rename from source/manual/logic/controllers/types/python.rst rename to source/manual/logic_bricks/controllers/types/python.rst index 18e6a87f..aea536e9 100644 --- a/source/manual/logic/controllers/types/python.rst +++ b/source/manual/logic_bricks/controllers/types/python.rst @@ -1,49 +1,41 @@ .. _bpy.types.PythonController: -***************** +============================== Python Controller -***************** +============================== .. seealso:: See the Python reference of this logic brick in :class:`SCA_PythonController`. -The Python controller runs a Python script when a sensor triggers the controller. -This Python script can interact with the scene or logic bricks through -`Blender/UPBGE's API `__. +The Python controller runs a Python script when a sensor triggers the controller. This Python script can interact with the scene or logic bricks through `Blender/UPBGE's API `__. -A Python script can either run as an entire file or a single module. -A file must be added in the Text editor, and is identified simply by its name, not its path. -Names are case sensitive. Modules are identified by the file name *without* the extension followed by a ``.`` -and then the name of the module. For example: +A Python script can either run as an entire file or a single module. A file must be added in the Text editor, and is identified simply by its name, not its path. Names are case sensitive. Modules are identified by the file name *without* the extension followed by a ``.`` and then the name of the module. For example: A file ``myscript.py`` contains:: def myModule (): print("Go Open Source!"); -The function can be accessed as ``myscript.myModule``, which will run ``print("Go Open Source!");`` -every time the controller is triggered. +The function can be accessed as ``myscript.myModule``, which will run ``print("Go Open Source!");`` every time the controller is triggered. The entire file can be run by setting the type to *Script* and setting the name to *myscript.py*. - Parts of the Python Controller -============================== +++++++++++++++++++++++++++++++ -.. figure:: /images/Logic/Controllers/logic-controllers-types-python-python.png +.. figure:: /images/logic_bricks/controllers/logic-controllers-types-python-python.png - Python Controller. + Python Controller Type Specifies whether it is a module or entire file. Name The name of the file to be loaded. -``D`` (Use Debug) +D (Use Debug) Continuously reloads the file. See :ref:`standard controller parts ` for descriptions of the remaining options. .. seealso:: For more information on the Python API, see: - - - `Blender/UPBGE's API `__. - - :ref:`Python Scripting chapter `. + - `Blender/UPBGE's API `__. + - :ref:`Python Scripting chapter `. diff --git a/source/manual/logic/controllers/types/xnor.rst b/source/manual/logic_bricks/controllers/types/xnor.rst similarity index 55% rename from source/manual/logic/controllers/types/xnor.rst rename to source/manual/logic_bricks/controllers/types/xnor.rst index 24a7ae3a..12adadc9 100644 --- a/source/manual/logic/controllers/types/xnor.rst +++ b/source/manual/logic_bricks/controllers/types/xnor.rst @@ -1,24 +1,23 @@ -*************** +============================== XNOR Controller -*************** +============================== .. seealso:: See the Python reference of this logic brick in :class:`SCA_XNORController`. This controller gives a positive (``TRUE``) output when: -- One (and only one) of its inputs is ``FALSE``, and -- The object is in the designated State. +- One (and only one) of its inputs is ``FALSE``, and +- The object is in the designated State. For all other conditions the controller gives a negative (``FALSE``) output. - Options -======= +++++++++++++++++++++++++++++++ -.. figure:: /images/Logic/Controllers/logic-controllers-types-xnor-xnor.png +.. figure:: /images/logic_bricks/controllers/logic-controllers-types-xnor-xnor.png - XNOR Controller. + XNOR Controller See :ref:`standard controller parts ` for descriptions of the remaining options. diff --git a/source/manual/logic/controllers/types/xor.rst b/source/manual/logic_bricks/controllers/types/xor.rst similarity index 56% rename from source/manual/logic/controllers/types/xor.rst rename to source/manual/logic_bricks/controllers/types/xor.rst index 7e111cc4..a96fe283 100644 --- a/source/manual/logic/controllers/types/xor.rst +++ b/source/manual/logic_bricks/controllers/types/xor.rst @@ -1,24 +1,23 @@ -************** +============================== XOR Controller -************** +============================== .. seealso:: See the Python reference of this logic brick in :class:`SCA_XORController`. This controller gives a positive (``TRUE``) output when: -- One (and only one) of its inputs is ``TRUE``, and -- The object is in the designated State. +- One (and only one) of its inputs is ``TRUE``, and +- The object is in the designated State. For all other conditions the controller gives a negative (``FALSE``) output. - Options -======= +++++++++++++++++++++++++++++++ -.. figure:: /images/Logic/Controllers/logic-controllers-types-xor-xor.png +.. figure:: /images/logic_bricks/controllers/logic-controllers-types-xor-xor.png - XOR Controller. + XOR Controller See :ref:`standard controller parts ` for descriptions of the remaining options. diff --git a/source/manual/logic/index.rst b/source/manual/logic_bricks/index.rst similarity index 65% rename from source/manual/logic/index.rst rename to source/manual/logic_bricks/index.rst index ad81a769..db55c306 100644 --- a/source/manual/logic/index.rst +++ b/source/manual/logic_bricks/index.rst @@ -1,8 +1,8 @@ -.. _logic-index: +.. _logic_bricks-index: -++++++++++++ +============================== Logic Bricks -++++++++++++ +============================== .. toctree:: :maxdepth: 2 diff --git a/source/manual/logic_bricks/introduction.rst b/source/manual/logic_bricks/introduction.rst new file mode 100644 index 00000000..87ab0509 --- /dev/null +++ b/source/manual/logic_bricks/introduction.rst @@ -0,0 +1,49 @@ +.. _logic_bricks-introduction: + +============================== +Introduction +============================== + +What makes a game different than a movie? Let's see. In both you can find yourself buried in a comfortable seat eating junk food and alienated from the world. And funny 3D goggles are not exclusive to either. But what about interactivity? In a game you can control a player and interact with the virtual (or real!) world and the game elements. The story can be dynamically created in front of your eyes. + +Therefore, as a director and content creator you will play different roles in a movie or a game. In a movie, for example, you have to direct the flow of the story, but for a game, you have to direct how the player controls and experiences this flow. More than ever, it's time to narrow the gap between what technology can deliver and what the public can experiment with and assimilate as part of their own nature. It is necessary to give *all the power to the user*. + +Traditionally, to design your game interaction in the past, you would have needed coding expertise and a highly technical background. If, as a creative artist, any words such as technical, code, or programming scare you, Have confidence! "Pure artists" are still scared with code. The idea here is not that they will no longer be afraid of it. Instead, with the UPBGE they will not have to face their fears. *Logic Bricks* are an alternative to hardcore coding, known to be "artists friendly" more. *Logic Bricks* is here to rescue you. *Logic Bricks* is a visual set of tools responsible for integrating the game components together. By using *Logic Bricks*, you can determine what to do after a mouse click, when to play an animation, how to move your character, and so on, as shown in following picture. + +.. figure:: /images/logic_bricks/logic-logic-bricks-editor.png + + Logic Bricks Editor + +.. note:: + Logic Bricks is high level visual programming. + +*Logic Bricks* system is the default "scripting" layer in the Game Engine. Each *Game Object* in the game may store a collection of logical components (Logic Bricks) which control its behavior within the scene. *Logic bricks* can be combined to perform user-defined actions that determine the progression of the simulation. + +Logic Bricks +++++++++++++++++++++++++++++++ + +The main part of *Logic Bricks* system can be set up through a graphical interface, the Logic Bricks Editor, and therefore does not require detailed programming knowledge. Logic is set up as blocks (or "bricks") which represent preprogrammed functions; these can be tweaked and combined to create the game/application. + +*Logic Brick* system is composed of three main elements: :doc:`Sensors `, :doc:`Controllers ` and :doc:`Actuators `. Sensors are an event system used to trigger an action upon a specific event (for example, an object collides with another object or the joystick is used). Once one or more sensors is triggered, you can use a controller to control whether or not this set of events will produce an event in the game (and which effect). Controllers work as logic pipes, evaluating sensors through simple logic conditions, such as And, Or, and Not. Finally, when a controller validates a set of sensors, it will activate an actuator. An actuator is responsible for a specific action of the game (such as ending the game, moving an object, and so on). + +In this chapter, we'll cover sensors, controllers, and actuators in detail specifically, how and when to use them. Additionally, you will learn about object game properties, the State Machine system, how the interface works, and the architecture of the system as a whole. As a system used to build new worlds, this is no place for do's and don'ts. It will be up to you to find the best set of features that fits your project and creativity. Nevertheless, when possible, we'll present suggestions of when and how people have used the tools in the past, but you don't have to feel constrained by that. Treat Logic Bricks as small Lego pieces and surprise us and yourself. + +.. note:: + Logic Bricks are really easy and quick to use. You can make entire games with them with absolutely no need for coding. + +Properties +++++++++++++++++++++++++++++++ + +:doc:`Properties ` are like variables in other programming languages. They are used to save and access data values either for the whole game (e.g. scores), or for particular objects/players (e.g. names). However, in the UPBGE, a property is associated with an object. Properties can be of different types, and are set up in a special area of the Logic Editor. + +States +++++++++++++++++++++++++++++++ + +Another useful feature is object :doc:`States `. At any time while the simulation is running, the object will process any logic which belongs to the current state of the object. States can be used to define groups of behavior -- e.g. an actor object may be "sleeping", "awake" or "dead", and its logic behavior may be different in each of these three states. The states of an object are set up, displayed and edited in the Controller logic bricks for the object. + +Architecture +++++++++++++++++++++++++++++++ + +The game engine was designed to revolve around game objects. Twenty years ago, when it was first developed, this was a breakthrough design. The idea of having events controlled per object, as opposed to a central controller, worked well for the early days of 3D engines. Nowadays, some people may advocate that controlling elements per object is less scalable and more difficult to manage. That will be up to you to decide. Regardless of your thoughts on that subject, the game engine still allows you to emulate a centralized controlling system, while giving autonomy to each object to deal with its own business. Part of this flexibility is due to the hooked-up Python layer and the Logic Brick system. Through the Python interface, you can replace or at least control most of the effects and logic setups you create with Logic Bricks. With Logic Bricks, you can quickly set up a system that is easy to visualize, implement, and test. The strength of the game engine comes from the trade-off between the two sibling systems. A flexible design may lack features and performance compared to specific engines. Nevertheless, the different kinds of applications you can prototype and develop quickly with the game engine make up for the compromise. + +If you look at a level deep into the object structure, you will find that the architecture of the Logic Bricks system is "controller-centric." It revolves around the controllers of the game because they are the ones to determine what do to with the sensors and what actuators to activate. This doesn't have to be followed strictly, but based on this design, you will want to keep your sensors and actuators to a minimum and optimize their usage with the controllers. Actually, in order to optimize the performance, the game engine disables any sensor and actuator that is unlinked to a controller or linked to a controller in a non-active state. This is one of the (many) reasons why Python controllers are so popular. They allow you to replace the use of multiple sensors and actuators by direct calls to their equivalents in the source code. The chapter :doc:`Python Scripting ` is entirely dedicated to that aspect of the game engine, and will complement the applications of Logic Bricks discussed in this chapter. diff --git a/source/manual/logic_bricks/properties.rst b/source/manual/logic_bricks/properties.rst new file mode 100644 index 00000000..4a24d7d8 --- /dev/null +++ b/source/manual/logic_bricks/properties.rst @@ -0,0 +1,70 @@ +.. |info-button| image:: /images/logic_bricks/logic-common-options-icons-info.png + +.. |movement-button| image:: /images/logic_bricks/logic-common-options-icons-movement.png + +.. _logic-properties: + +============================== +Properties +============================== + +Properties are the game logic equivalent to variables. They are stored with the object, and can be used to represent things about them such as ammo, health, name, and so on. + +.. _game-engine-property-types: + +.. _logic-properties-types: + +Property Types +++++++++++++++++++++++++++++++ + +There are five types of properties: + +Timer + Starts at the property value and counts upwards as long as the object exists. It can for example be used if you want to know how long time it takes the player to complete a level. + + .. note:: + This timer uses the simulation time (or frame time) not the real time. When we have 60 fps both times are equal but in other circunstances not. + +Float + Uses decimal numbers as values, can range from -10000.000 to 10000.000. It is useful for precision values. + +Integer + Uses integers (whole numbers) as values, between -10000 and 10000. Useful for counting things such as ammunition, where decimals are unnecessary. + +String + Takes text as value. Can store 128 characters. + +Boolean + Boolean variable, has two values: ``TRUE`` or ``FALSE``. This is useful for things that have only two modes, like a light switch. + +Using Properties +++++++++++++++++++++++++++++++ + +When a game is running, values of properties are set, manipulated, and evaluated using the :doc:`Property Sensor ` and the :doc:`Property Actuator `. + +Logic Properties are created and edited using the panel on the right (although it can be moved to the left with F5) of the Logic Bricks Editor panel. The top menu provides a list of the available property types. + +.. figure:: /images/logic_bricks/logic-logic_properties-panel.png + + Properties Panel of the Logic Editor + +Add Game Property button + This button adds a new property to the list, default is a *Float* property named ``prop``, followed by a number if there already is one with this name. + +Name field + Where you give your property its name, this is how you are going to access it through Python or expressions. The way to do so in Python is by dictionary style look-up (``GameObject["propname"]``). The name is case sensitive. + +Type menu + This menu determines which type of property it is. The available options are in `Property Types`_. + +Value field + Sets the initial value of the property. + +Information |info-button| + Display property value in debug information. If debugging is turned on, the value of the property is given in the top left-hand corner of the screen while the game is running. To turn debugging on, tick the *Debug Properties* checkbox in the Game Debug panel of the Render Properties. All properties with debugging activated will then be presented with their object name, property name and value during gameplay. This is useful if you suspect something with your properties is causing problems. + +Movement buttons |movement-button| + Move the property up or down over other properties within the column. + +X button + Deletes the property. diff --git a/source/manual/logic_bricks/sensors/editing.rst b/source/manual/logic_bricks/sensors/editing.rst new file mode 100644 index 00000000..8e17fe5f --- /dev/null +++ b/source/manual/logic_bricks/sensors/editing.rst @@ -0,0 +1,67 @@ + +============================== +Sensor Editing +============================== + +.. figure:: /images/logic_bricks/sensors/logic-sensors-editing-column.png + + Sensor Column with a typical sensor + +UPBGE sensors can be set up and edited in the left-hand column of the Logic Panel. This page describes the general column controls, and also those parameters which are common to all individual sensor types. + +The image shows a typical sensor column with a single example sensor. At the top of this column, the column heading includes menus and buttons to control which of all the sensors in the current Game Logic are displayed. + +Column Heading +++++++++++++++++++++++++++++++ + +.. figure:: /images/logic_bricks/sensors/logic-sensors-editing-column1.png + + Sensor Column heading + +The column headings contain controls to set which sensors, and the level of detail given, in the sensor column. This is very useful for hiding unnecessary sensors so that the necessary ones are visible and easier to reach. Both these can be controlled individually. + +Sensors +++++++++++++++++++++++++++++++ + +Show Objects + Expands all objects. + +Hide Objects + Collapses all objects to just a bar with their name. + +Show Sensors + Expands all sensors. + +Hide Sensors + Collapses all sensors to bars with their names. + +It is also possible to filter which sensors are viewed using the four heading buttons: + +Sel + Shows all sensors for selected objects. + +Act + Shows only sensors belonging to the active object. + +Link + Shows sensors which have a link to a controller. + +State + Only sensors connected to a controller with active states are shown. + +Object Heading +++++++++++++++++++++++++++++++ + +.. figure:: /images/logic_bricks/sensors/logic-sensors-editing-column2.png + + Sensor Object Heading + +In the column list, sensors are grouped by object. By default, sensors for every selected object appear in the list, but this may be modified by the column heading filters. + +At the head of each displayed object sensor list, two entries appear: + +Name + The name of the object. + +Add Sensor + When clicked, a menu appears with the available sensor types. Selecting an entry adds a new sensor to the object. See :doc:`Sensors ` for a list of available sensor types. diff --git a/source/manual/logic/sensors/index.rst b/source/manual/logic_bricks/sensors/index.rst similarity index 82% rename from source/manual/logic/sensors/index.rst rename to source/manual/logic_bricks/sensors/index.rst index 06db4dad..b132c30f 100644 --- a/source/manual/logic/sensors/index.rst +++ b/source/manual/logic_bricks/sensors/index.rst @@ -1,18 +1,17 @@ .. _sensors-index: .. _bpy.types.Sensor: -####### +============================== Sensors -####### +============================== .. toctree:: introduction.rst editing.rst - Sensor Types -============ +++++++++++++++++++++++++++++++ .. toctree:: :maxdepth: 1 diff --git a/source/manual/logic_bricks/sensors/introduction.rst b/source/manual/logic_bricks/sensors/introduction.rst new file mode 100644 index 00000000..bc734fb6 --- /dev/null +++ b/source/manual/logic_bricks/sensors/introduction.rst @@ -0,0 +1,116 @@ +.. |true-button| image:: /images/logic_bricks/logic-common-options-icons-true.png + +.. |false-button| image:: /images/logic_bricks/logic-common-options-icons-false.png + +.. |movement-button| image:: /images/logic_bricks/logic-common-options-icons-movement.png + +.. |pin-button| image:: /images/logic_bricks/logic-common-options-icons-pin.png + +.. |down-button| image:: /images/logic_bricks/logic-common-options-icons-down.png + +============================== +Introduction +============================== + +Sensors are the logic bricks that cause the logic to do anything. Sensors give an output when something happens, e.g. a trigger event such as a collision between two objects, a key pressed on the keyboard, or a timer for a timed event going off. When a sensor is triggered, a positive pulse is sent to all controllers that are linked to it. + +The logic blocks for all types of sensor may be constructed and changed using the Logic Editor; details of this process are given in the :doc:`Sensor Editing ` page. + +.. _game-engine-logic-sensors-common-options: + +Common Options +++++++++++++++++++++++++++++++ + +.. figure:: /images/logic_bricks/sensors/logic-sensors-common-options.png + + Common Sensor options + +All sensors have a set of common buttons, fields and menus. They are organized as follows: + +Triangle button |down-button| + Collapses the sensor information to a single line (toggle). + +Sensor type menu + Specifies the type of the sensor. + +Sensor name + The name of the sensor. This can be selected by the user. It is used to access sensors with Python; it needs to be unique among the selected objects. + +Pin button |pin-button| + Display the sensor even when it is not linked to a visible states controller. + +Movement buttons |movement-button| + Move the sensor up or down over other sensors within the column. + +Checkbox button + When unchecked the sensor is deactivated, no pulses will be sent to the connected controllers. Very useful to check different logics without unlink or delete the sensor. + +X button + Deletes the sensor. + +.. note:: Triggers + If a controller does not get triggered by any connected sensor (regardless of the sensors' state) it will not be activated at all. + + A sensor triggers the connected controllers on state change. When the sensor changes its state from negative to positive or positive to negative, the sensor triggers the connected controllers. A sensor triggers a connected controller as well when the sensor changes from deactivation to activation. + +The following parameters specify how the sensor triggers connected controllers: + +True level triggering |true-button| + If this is set, the connected controllers will be triggered as long as the sensor's state is positive. The sensor will trigger skipping the logic ticks (See parameter: Skip) indicated in the sensor. + +False level triggering |false-button| + If this is set, the connected controllers will be triggered as long as the sensor's state is negative. The sensor will trigger skipping the logic ticks (See parameter: Skip) indicated in the sensor. + +Skip + This parameter sets the number of logic ticks skipped between 2 active pulses or triggers. The default value is 0 and it means no logic tick is skipped. It is only used if at least one of the level triggering parameters are enabled. + + Raising the value of *Skip* is a good way for saving performance costs by avoiding to execute controllers or activate actuators more often than necessary. + + Examples: (assuming the default frame rate with a frequency of 60 Hz (60 frames per second)). + +.. list-table:: + :header-rows: 1 + :class: valign + :widths: 10 30 15 15 15 15 + + * - Skip + - Meaning + - Frames with trigger + - Frames without trigger + - Period in frames + - Frequency in frames/sec + * - 0 + - The sensor triggers the next frame. + - 1 + - 0 + - 1 + - 60 + * - 1 + - The sensor triggers at one frame and skips another one until it triggers again. It results in half speed. + - 1 + - 1 + - 2 + - 30 + * - 29 + - The sensor triggers at one frame and skips 29 frames until it triggers again. + - 1 + - 29 + - 30 + - 2 + * - 59 + - The sensor triggers at one frame and skips 59 frames until it triggers again. + - 1 + - 59 + - 30 + - 1 + +*Level* Button + Triggers connected controllers when state (of the build-in state machine) changes (for more information see :doc:`States `). + +The following parameters specify how the sensor's status gets evaluated: + +*Tap* Button + Changes the sensor's state to negative one frame after changing to positive even if the sensor evaluation remains positive. As this is a state change it triggers the connected controllers as well. Only one of *Tap* or *Level* can be activated. If the *TRUE level triggering* is set, the sensor state will consecutive change from True to False until the sensor evaluates False. The *FALSE level triggering* will be ignored when the *Tap* parameter is set. + +*Invert* Button + This inverts the sensor output. If this is set, the sensor's state will be inverted. This means the sensor's state changes to positive when evaluating False and changes to False when evaluating True. If the *Tap* parameter is set, the sensor triggers the controller based on the inverted sensor state. diff --git a/source/manual/logic/sensors/types/actuator.rst b/source/manual/logic_bricks/sensors/types/actuator.rst similarity index 51% rename from source/manual/logic/sensors/types/actuator.rst rename to source/manual/logic_bricks/sensors/types/actuator.rst index cf50e5d8..5bcbfb04 100644 --- a/source/manual/logic/sensors/types/actuator.rst +++ b/source/manual/logic_bricks/sensors/types/actuator.rst @@ -1,23 +1,20 @@ .. _bpy.types.ActuatorSensor: -*************** +============================== Actuator Sensor -*************** +============================== .. seealso:: See the Python reference of this logic brick in :class:`SCA_ActuatorSensor`. -The *Actuator Sensor* detects when a particular actuator receives an activation pulse. -It sends a ``TRUE`` pulse when the specified actuator is activated. -The sensor also sends a ``FALSE`` pulse when the specified actuator is deactivated. +The *Actuator Sensor* detects when a particular actuator receives an activation pulse. It sends a ``TRUE`` pulse when the specified actuator is activated. The sensor also sends a ``FALSE`` pulse when the specified actuator is deactivated. -.. figure:: /images/Logic/Sensors/logic-sensors-types-actuator-actuator.png - - Actuator sensor. +.. figure:: /images/logic_bricks/sensors/logic-sensors-types-actuator-actuator.png + Actuator sensor Properties -========== +++++++++++++++++++++++++++++++ See :ref:`Sensor Common Options ` for common options. @@ -27,6 +24,5 @@ Actuator .. note:: The actuator referenced must be owned by the same object. - Example -======= +++++++++++++++++++++++++++++++ diff --git a/source/manual/logic_bricks/sensors/types/always.rst b/source/manual/logic_bricks/sensors/types/always.rst new file mode 100644 index 00000000..194a4eff --- /dev/null +++ b/source/manual/logic_bricks/sensors/types/always.rst @@ -0,0 +1,24 @@ +.. _bpy.types.AlwaysSensor: + +============================== +Always Sensor +============================== + +.. seealso:: + See the Python reference of this logic brick in :class:`SCA_AlwaysSensor`. + +The *Always Sensor* gives a continuous output signal at regular intervals. It is used for things that need to be done every logic tick, or at every *x* logic tick (with non-null *Skip*), or at start-up (with *Tap*). + +.. figure:: /images/logic_bricks/sensors/logic-sensors-types-always-always.png + + Always sensor + +Properties +++++++++++++++++++++++++++++++ + +See :ref:`Sensor Common Options ` for common options. + +This sensor does not have any special options. + +Example +++++++++++++++++++++++++++++++ diff --git a/source/manual/logic/sensors/types/armature.rst b/source/manual/logic_bricks/sensors/types/armature.rst similarity index 66% rename from source/manual/logic/sensors/types/armature.rst rename to source/manual/logic_bricks/sensors/types/armature.rst index 21f73ad0..614ef39b 100644 --- a/source/manual/logic/sensors/types/armature.rst +++ b/source/manual/logic_bricks/sensors/types/armature.rst @@ -1,25 +1,23 @@ .. _bpy.types.ArmatureSensor: -*************** +============================== Armature Sensor -*************** +============================== .. seealso:: See the Python reference of this logic brick in :class:`SCA_ArmatureSensor`. The *Armature Sensor* is used to detect changes in values of an IK solver. -.. figure:: /images/Logic/Sensors/logic-sensors-types-armature-armature.png +.. figure:: /images/logic_bricks/sensors/logic-sensors-types-armature-armature.png - Armature Sensor. + Armature Sensor .. note:: - The *Armature Sensor* is available for armature objects only. - Properties -========== +++++++++++++++++++++++++++++++ Bone Name The bone to check for changes in value. @@ -33,20 +31,15 @@ Test State Changed Any changes will invoke the sensor. Lin error below - Any value below of the amount of residual error in Blender space unit for - constraints that work on position will invoke the sensor. + Any value below of the amount of residual error in Blender space unit for constraints that work on position will invoke the sensor. Lin error above - Any value above of the amount of residual error in Blender space unit for - constraints that work on position will invoke the sensor. + Any value above of the amount of residual error in Blender space unit for constraints that work on position will invoke the sensor. Rot error below - Any value below of the amount of residual error in radians for constraints - that work on orientation will invoke the sensor. + Any value below of the amount of residual error in radians for constraints that work on orientation will invoke the sensor. Rot error above - Any value above of the amount of residual error in radians for constraints - that work on orientation will invoke the sensor. + Any value above of the amount of residual error in radians for constraints that work on orientation will invoke the sensor. Value Some tests will take a value, this value is used in the comparison when detecting changes. - Example -======= +++++++++++++++++++++++++++++++ diff --git a/source/manual/logic_bricks/sensors/types/collision.rst b/source/manual/logic_bricks/sensors/types/collision.rst new file mode 100644 index 00000000..df08d8ab --- /dev/null +++ b/source/manual/logic_bricks/sensors/types/collision.rst @@ -0,0 +1,30 @@ +.. _bpy.types.CollisionSensor: + +============================== +Collision Sensor +============================== + +.. seealso:: + See the Python reference of this logic brick in :class:`SCA_CollisionSensor`. + +A *Collision Sensor* works like a "touch sensor" but can also filter by property or material. Only objects with the property/material with that name will generate a positive pulse upon collision. Leave blank for collision detection with any object. + +.. note:: Soft Bodies + The *Collision* sensor cannot detect collisions with soft bodies. This is a limitation in Bullet, the physics library used by the Game Engine. + +.. figure:: /images/logic_bricks/sensors/logic-sensors-types-collision-collision.png + + Collision sensor + +Properties +++++++++++++++++++++++++++++++ + +See :ref:`Sensor Common Options ` for common options. + +Pulse button + Makes it sensible to other collisions even if it is still in touch with the object that triggered the last positive pulse. +M/P button + Toggles between material and property filtering. + +Example +++++++++++++++++++++++++++++++ diff --git a/source/manual/logic/sensors/types/delay.rst b/source/manual/logic_bricks/sensors/types/delay.rst similarity index 65% rename from source/manual/logic/sensors/types/delay.rst rename to source/manual/logic_bricks/sensors/types/delay.rst index af3587f1..b3b5cd1a 100644 --- a/source/manual/logic/sensors/types/delay.rst +++ b/source/manual/logic_bricks/sensors/types/delay.rst @@ -1,22 +1,20 @@ .. _bpy.types.DelaySensor: -************ +============================== Delay Sensor -************ +============================== .. seealso:: See the Python reference of this logic brick in :class:`SCA_DelaySensor`. -The *Delay Sensor* is designed for delaying reactions a number of logic ticks. -This is useful if an other action has to be done first or to time events. +The *Delay Sensor* is designed for delaying reactions a number of logic ticks. This is useful if an other action has to be done first or to time events. -.. figure:: /images/Logic/Sensors/logic-sensors-types-delay-delay.png - - Delay sensor. +.. figure:: /images/logic_bricks/sensors/logic-sensors-types-delay-delay.png + Delay sensor Properties -========== +++++++++++++++++++++++++++++++ See :ref:`Sensor Common Options ` for common options. @@ -27,6 +25,5 @@ Duration Repeat Button Makes the sensor restart after the delay and duration time is up. - Example -======= +++++++++++++++++++++++++++++++ diff --git a/source/manual/logic_bricks/sensors/types/joystick.rst b/source/manual/logic_bricks/sensors/types/joystick.rst new file mode 100644 index 00000000..97686c35 --- /dev/null +++ b/source/manual/logic_bricks/sensors/types/joystick.rst @@ -0,0 +1,79 @@ +.. _bpy.types.JoystickSensor: + +============================== +Joystick Sensor +============================== + +.. seealso:: + See the Python reference of this logic brick in :class:`SCA_JoystickSensor`. + +The *Joystick Sensor* triggers whenever the joystick moves. It also detects events on a range of ancillary controls on the joystick device (shoulder triggers, buttons, etc.). More than one joystick may be used (see "Joystick Index"). + +.. note:: + UPBGE maps all the joysticks against the layout of Xbox 360 game controller. This way is easier to setup the different movements or actions because you have to do it for one type of controller only. + +.. figure:: /images/logic_bricks/sensors/logic-sensors-types-joystick-button.png + + Joystick sensor + +Properties +++++++++++++++++++++++++++++++ + +See :ref:`Sensor Common Options ` for common options. + +Event Type + A menu to select which joystick event to use, each is described later. +Joystick Index + Specifies which joystick to use. +All Events + Sensor triggers for all events on this joystick's current type. + +Stick Directions +------------------------------ + +Detect movement in a stick. + +.. figure:: /images/logic_bricks/sensors/logic-sensors-types-joystick-stick-directions.png + + Joystick Stick Directions + +Stick + Stick to detect a input: Left Stick/Right Stick. + +Stick Direction + Direction of the stick moving: Right/Left, Up/Down. + +Stick Axis +------------------------------ + +Detects the axis of the joystick. + +.. figure:: /images/logic_bricks/sensors/logic-sensors-types-joystick-stick-axis.png + + Joystick Stick Axis + +Stick Axis + Which axis either of the sticks are moving on Left Stick Horizontal/Vertical, Right Stick Horizontal/Vertical. + +Shoulder Triggers +------------------------------ + +.. figure:: /images/logic_bricks/sensors/logic-sensors-types-joystick-shoulder-triggers.png + + Joystick Shoulder Triggers + +Triggers + Triggers that are used: Left/Right Shoulder Trigger. + +Buttons +------------------------------ + +.. figure:: /images/logic_bricks/sensors/logic-sensors-types-joystick-button.png + + Joystick Buttons + +Button + Buttons that are used: ``A``, ``B``, ``X``, ``Y``, Dpad Right/Left/Up/Down, Right/Left Shoulder, Right/Left Stick, Start and Guide. + +Example +++++++++++++++++++++++++++++++ diff --git a/source/manual/logic_bricks/sensors/types/keyboard.rst b/source/manual/logic_bricks/sensors/types/keyboard.rst new file mode 100644 index 00000000..2dfca14c --- /dev/null +++ b/source/manual/logic_bricks/sensors/types/keyboard.rst @@ -0,0 +1,39 @@ +.. _bpy.types.KeyboardSensor: + +.. _sensor-keyboard: + +============================== +Keyboard Sensor +============================== + +.. seealso:: + See the Python reference of this logic brick in :class:`SCA_KeyboardSensor`. + +The *Keyboard* sensor is for detecting keyboard input. It can also save keyboard input to a :ref:`String property `. + +.. figure:: /images/logic_bricks/sensors/logic-sensors-types-keyboard-keyboard.png + + Keyboard sensor + +Properties +++++++++++++++++++++++++++++++ + +See :ref:`Sensor Common Options ` for common options. + +Key + This field detects presses on a named key. Press the button with no label and a key to assign that key to the sensor. This is the active key, which will trigger the ``TRUE`` pulse. Click the button and then click outside of the button to deassign the key. A ``FALSE`` pulse is given when the key is released. + +All keys button + Sends a ``TRUE`` pulse when any key is pressed. This is useful for custom key maps with a :doc:`Python controller `. + +First Modifier, Second Modifier + Specifies additional key(s), all of which must be held down while the active key is pressed in order for the sensor to give a ``TRUE`` pulse. These are selected in the same way as Key. This is useful if you wish to use key combinations, for example :kbd:`Ctrl-R` or :kbd:`Shift-Alt-Esc` to do a specific action. + +Log Toggle + Assigns a *Bool* property which determines if the keystroke will or will not be logged in the target *String*. This property needs to be ``TRUE`` if you wish to log your keystrokes. + +Target + The name of property to which the keystrokes are saved. This property must be of type *String*. Together with a *Property* sensor this can be used for example to enter passwords. + +Example +++++++++++++++++++++++++++++++ diff --git a/source/manual/logic_bricks/sensors/types/message.rst b/source/manual/logic_bricks/sensors/types/message.rst new file mode 100644 index 00000000..8f4b1996 --- /dev/null +++ b/source/manual/logic_bricks/sensors/types/message.rst @@ -0,0 +1,28 @@ +.. _bpy.types.MessageSensor: + +============================== +Message Sensor +============================== + +.. seealso:: + See the Python reference of this logic brick in :class:`KX_NetworkMessageSensor`. + +The *Message Sensor* can be used to detect either text messages or property values. The sensor sends a positive pulse once an appropriate message is sent from anywhere in the engine. It can be set up to only send a pulse upon a message with a specific subject. + +.. note:: + See :doc:`Message Actuator ` for how to send messages. + +.. figure:: /images/logic_bricks/sensors/logic-sensors-types-message-message.png + + Message Sensor + +Properties +++++++++++++++++++++++++++++++ + +See :ref:`Sensor Common Options ` for common options. + +Subject + Specifies the message that must be received to trigger the sensor (this can be left blank). + +Example +++++++++++++++++++++++++++++++ diff --git a/source/manual/logic/sensors/types/mouse.rst b/source/manual/logic_bricks/sensors/types/mouse.rst similarity index 68% rename from source/manual/logic/sensors/types/mouse.rst rename to source/manual/logic_bricks/sensors/types/mouse.rst index b3570d8b..e739fe1f 100644 --- a/source/manual/logic/sensors/types/mouse.rst +++ b/source/manual/logic_bricks/sensors/types/mouse.rst @@ -1,55 +1,60 @@ .. _bpy.types.MouseSensor: -************ +============================== Mouse Sensor -************ +============================== .. seealso:: See the Python reference of this logic brick in :class:`SCA_MouseSensor`. The *Mouse Sensor* detects mouse events. -.. figure:: /images/Logic/Sensors/logic-sensors-types-mouse-mouse.png - - Mouse sensor. +.. figure:: /images/logic_bricks/sensors/logic-sensors-types-mouse-mouse.png + Mouse sensor Properties -========== +++++++++++++++++++++++++++++++ See :ref:`Sensor Common Options ` for common options. -The controller consist only of a list of types of mouse events. -A ``FALSE`` pulse is given when any of these conditions ends. +The controller consist only of a list of types of mouse events. A ``FALSE`` pulse is given when any of these conditions ends. Mouse over any Gives a ``TRUE`` pulse if the mouse moves over any game object. + Mouse over Gives a ``TRUE`` pulse if the mouse moves over the owner object. + Movement Any movement with the mouse causes a stream of ``TRUE`` pulses. + Wheel Down Causes a stream of ``TRUE`` pulses as the scroll wheel of the mouse moves down. + Wheel Up Causes a stream of ``TRUE`` pulses as the scroll wheel of the mouse moves up. + Right button Gives a ``TRUE`` pulse when right mouse button is pressed. + Middle button Gives a ``TRUE`` pulse when middle mouse button is pressed. + Left button Gives a ``TRUE`` pulse when left mouse button is pressed. + Button 4 Gives a ``TRUE`` pulse when 4th mouse button is pressed. + Button 5 Gives a ``TRUE`` pulse when 5th mouse button is pressed. + Button 6 - Gives a ``TRUE`` pulse when 6th mouse button is pressed. This button depends in mouse - configuration software. It is possible that doesn't work correctly. + Gives a ``TRUE`` pulse when 6th mouse button is pressed. This button depends in mouse configuration software. It is possible that doesn't work correctly. + Button 7 - Gives a ``TRUE`` pulse when 7th mouse button is pressed. This button depends in mouse - configuration software. It is possible that doesn't work correctly. + Gives a ``TRUE`` pulse when 7th mouse button is pressed. This button depends in mouse configuration software. It is possible that doesn't work correctly. .. note:: - - There is a logic brick for specific mouse movement and - reactions (such as first person camera), see :ref:`Mouse Actuator `. + There is a logic brick for specific mouse movement and reactions (such as first person camera), see :ref:`Mouse Actuator `. diff --git a/source/manual/logic/sensors/types/movement.rst b/source/manual/logic_bricks/sensors/types/movement.rst similarity index 77% rename from source/manual/logic/sensors/types/movement.rst rename to source/manual/logic_bricks/sensors/types/movement.rst index 80478e99..f8672338 100644 --- a/source/manual/logic/sensors/types/movement.rst +++ b/source/manual/logic_bricks/sensors/types/movement.rst @@ -1,28 +1,28 @@ .. _bpy.types.MovementSensor: -*************** +============================== Movement Sensor -*************** +============================== .. seealso:: See the Python reference of this logic brick in :class:`SCA_MovementSensor`. The *Movement Sensor* detects the object movement along one or more axis. -.. figure:: /images/Logic/Sensors/logic-sensors-types-movement-movement.png - - Movement sensor. +.. figure:: /images/logic_bricks/sensors/logic-sensors-types-movement-movement.png + Movement sensor Properties -========== +++++++++++++++++++++++++++++++ See :ref:`Sensor Common Options ` for common options. Axis This menu determines the direction of the object movement to be detected. The ± signs is whether it is on the axis direction (+), or the opposite (-). + Local Indicates whether the movement detected is in local or global coordinates. + Threshold Indicates the amount of displacement from which movement is detected. - diff --git a/source/manual/logic/sensors/types/near.rst b/source/manual/logic_bricks/sensors/types/near.rst similarity index 55% rename from source/manual/logic/sensors/types/near.rst rename to source/manual/logic_bricks/sensors/types/near.rst index 2fd6a555..032b5797 100644 --- a/source/manual/logic/sensors/types/near.rst +++ b/source/manual/logic_bricks/sensors/types/near.rst @@ -1,43 +1,39 @@ .. _bpy.types.NearSensor: -*********** +============================== Near Sensor -*********** +============================== .. seealso:: See the Python reference of this logic brick in :class:`SCA_NearSensor`. -A *Near Sensor* detects objects that move to within a specific distance of themselves. -It can filter objects with properties, -like the :doc:`Collision sensor `. +A *Near Sensor* detects objects that move to within a specific distance of themselves. It can filter objects with properties, like the :doc:`Collision sensor `. .. note:: - - - The Near sensor can detect objects "through" other objects (walls, etc.). + - *Near* sensor can detect objects "through" other objects (walls etc.). - Objects must have Physics "Actor" property enabled to be detected. .. note:: + *Near* sensor cannot detect soft bodies. This is a limitation in Bullet, the physics library used by the Game Engine. - The *Near* sensor cannot detect soft bodies. - This is a limitation in Bullet, the physics library used by the Game Engine. - -.. figure:: /images/Logic/Sensors/logic-sensors-types-near-near.png +.. figure:: /images/logic_bricks/sensors/logic-sensors-types-near-near.png - Near sensor. + Near sensor Properties -========== +++++++++++++++++++++++++++++++ See :ref:`Sensor Common Options ` for common options. Property This field can be used to limit the sensor to look for only those objects with this property. + Distance The number of Blender units it will detect objects within. + Reset The distance the object needs to be to reset the sensor (send a ``FALSE`` pulse). - Example -======= +++++++++++++++++++++++++++++++ diff --git a/source/manual/logic/sensors/types/property.rst b/source/manual/logic_bricks/sensors/types/property.rst similarity index 76% rename from source/manual/logic/sensors/types/property.rst rename to source/manual/logic_bricks/sensors/types/property.rst index 15af4036..63d728d9 100644 --- a/source/manual/logic/sensors/types/property.rst +++ b/source/manual/logic_bricks/sensors/types/property.rst @@ -11,38 +11,40 @@ Property Sensor The *Property Sensor* detects changes in the properties of its owner object. -.. figure:: /images/Logic/Sensors/logic-sensors-types-property-property.png - - Property sensor. +.. figure:: /images/logic_bricks/sensors/logic-sensors-types-property-property.png + Property sensor Properties -========== +++++++++++++++++++++++++++++++ See :ref:`Sensor Common Options ` for common options. Evaluation Type Specifies how the property will be evaluated against the value(s). + Greater Than Sends a ``TRUE`` pulse when the property value is greater than the *Value* in the sensor. + Less Than Sends a ``TRUE`` pulse when the property value is less than the *Value* in the sensor. + Changed Sends a ``TRUE`` pulse as soon as the property value changes. + Interval Sends a ``TRUE`` pulse when the *Value* of the property is between the *Min* and *Max* values of the sensor. + Not Equal Sends a ``TRUE`` pulse when the property value differs from the *Value* in the sensor. + Equal Sends a ``TRUE`` pulse when the property value matches the *Value* in the sensor. .. note:: + The names of other properties can't be entered to compare properties. If you need to compare a property with another one you can use the expression controller: - The names of other properties can't be entered to compare properties. - If you need to compare a property with another one you can use the expression controller: - - .. image:: /images/Logic/Sensors/logic-sensors-types-property-note.png - + .. image:: /images/logic_bricks/sensors/logic-sensors-types-property-note.png Example -======= +++++++++++++++++++++++++++++++ diff --git a/source/manual/logic_bricks/sensors/types/radar.rst b/source/manual/logic_bricks/sensors/types/radar.rst new file mode 100644 index 00000000..4173452e --- /dev/null +++ b/source/manual/logic_bricks/sensors/types/radar.rst @@ -0,0 +1,47 @@ +.. _bpy.types.RadarSensor: + +============================== +Radar Sensor +============================== + +.. seealso:: + See the Python reference of this logic brick in :class:`SCA_RadarSensor`. + +The *Radar Sensor* works much like the :doc:`Near sensor `, but only within an angle from an axis, forming an invisible cone with the top in the objects' center and base at a distance on an axis. It is possible to visualize the invisible cone turning on the :ref:`Physics Visualization `. This sensor is useful for giving bots sight only in front of them, for example. + +.. figure:: /images/logic_bricks/sensors/logic-sensors-types-radar-cone-angle.png + + Radar sensor principles + +.. note:: + Soft Bodies + + *Radar* sensor cannot detect soft bodies. This is a limitation in Bullet, the physics library used by the Game Engine. + +.. note:: + - Radar sensor can detect objects "through" other objects (walls etc.). + - Objects must have Physics "Actor" property enabled to be detected. + +.. figure:: /images/logic_bricks/sensors/logic-sensors-types-radar-radar.png + + Radar sensor + +Properties +++++++++++++++++++++++++++++++ + +See :ref:`Sensor Common Options ` for common options. + +Property + This field can be used to limit the sensor to look for only those objects with this property. + +Axis + This menu determines the direction of the radar cone. The ± signs is whether it is on the axis direction (+), or the opposite (-). + +Angle + Determines the angle of the cone. + +Distance + Determines the length of the cone. (Blender units). + +Example +++++++++++++++++++++++++++++++ diff --git a/source/manual/logic/sensors/types/random.rst b/source/manual/logic_bricks/sensors/types/random.rst similarity index 62% rename from source/manual/logic/sensors/types/random.rst rename to source/manual/logic_bricks/sensors/types/random.rst index 07cf333c..dec9b8f6 100644 --- a/source/manual/logic/sensors/types/random.rst +++ b/source/manual/logic_bricks/sensors/types/random.rst @@ -1,21 +1,20 @@ .. _bpy.types.RandomSensor: -************* +============================== Random Sensor -************* +============================== .. seealso:: See the Python reference of this logic brick in :class:`SCA_RandomSensor`. The *Random Sensor* generates random pulses. -.. figure:: /images/Logic/Sensors/logic-sensors-types-random-random.png - - Random sensor. +.. figure:: /images/logic_bricks/sensors/logic-sensors-types-random-random.png + Random sensor Properties -========== +++++++++++++++++++++++++++++++ See :ref:`Sensor Common Options ` for common options. @@ -23,14 +22,10 @@ Seed This field to enter the initial seed for the random number algorithm. .. note:: - 0 is not random, but is useful for testing and debugging purposes. .. note:: - - If you run several times with the same Seed, the sequence of intervals you get - will be the same for each run, although the intervals will be randomly distributed. - + If you run several times with the same Seed, the sequence of intervals you get will be the same for each run, although the intervals will be randomly distributed. Example -======= +++++++++++++++++++++++++++++++ diff --git a/source/manual/logic_bricks/sensors/types/ray.rst b/source/manual/logic_bricks/sensors/types/ray.rst new file mode 100644 index 00000000..f35230bf --- /dev/null +++ b/source/manual/logic_bricks/sensors/types/ray.rst @@ -0,0 +1,38 @@ +.. _bpy.types.RaySensor: + +============================== +Ray Sensor +============================== + +.. seealso:: + See the Python reference of this logic brick in :class:`SCA_RaySensor`. + +The *Ray Sensor* shoots a ray in the direction of an axis and sends a positive pulse once it hits something. It can be filtered to only detect objects with a given material or property. + +.. figure:: /images/logic_bricks/sensors/logic-sensors-types-ray-ray.png + + Ray sensor + +Properties +++++++++++++++++++++++++++++++ + +See :ref:`Sensor Common Options ` for common options. + +Property + This field can be used to limit the sensor to look for only those objects with this property. + +.. note:: + - Unless the Property field is set, the Ray sensor can detect objects "through" other objects (walls, etc.). + - Objects must have Physics "Actor" property enabled to be detected. + +Axis + This menu determines the direction of the ray. The ± signs is whether it is on the axis direction (+), or the opposite (-). + +Range + Determines the length of the ray (in Blender units). + +X-Ray Mode button + Makes it x-ray, so that it sees through objects that do not have the property or material specified in the filter field. + +Example +++++++++++++++++++++++++++++++ diff --git a/source/manual/logic_bricks/states.rst b/source/manual/logic_bricks/states.rst new file mode 100644 index 00000000..eb5967c5 --- /dev/null +++ b/source/manual/logic_bricks/states.rst @@ -0,0 +1,52 @@ +.. |info-button| image:: /images/logic_bricks/logic-common-options-icons-info.png + +.. _logic-states: + +============================== +States +============================== + +In the BGE, an object can have different "states". At any time while the game is playing, the current state of the object defines its behavior. For instance, a character in your game may have states representing awake, sleeping or dead. At any moment their behavior in response to a loud bang will be dependent on their current state; they may crouch down (awake); wake up (asleep) or do nothing (dead). + +How States Operate +++++++++++++++++++++++++++++++ + +States are set up and used through controllers: note that only controllers, not actuators and sensors, are directly controlled by the state system. Each object has a number of states (up to 30; default = 1), and can only be in one state at any particular time. A controller must always specify the state for which it will operate -- it will only give an output pulse if a) its logic conditions are met, and b) the object is currently in the specified State. States are set up and edited in the object's Controller settings (for details see below). + +.. tip:: + State settings are automatic in simple games. By default, the number of states for each object is 1, and all controllers are set to use State 1. So, if a game does not need multiple states, everything will work without explicitly setting states -- you do not need to bother about states at all. + +One of the actuators, the State actuator, can set or unset the object's State bits, and so allow the object's reaction to a sensor signal to depend on its current state. So, in the above example, the actor will have a number of controllers connected to the "loud bang" sensor, for each of the "awake", "asleep" or "dead" states. These will operate different actuators depending on the current state of the actor, and some of these actuators may switch the actor's state under appropriate conditions. + +Editing States +++++++++++++++++++++++++++++++ + +.. figure:: /images/logic_bricks/logic-states-panel.png + + State Panel button + +States are set up and edited using the Controller (center) column of the Game Logic Panel. To see the State panel, click on the State Panel Button shown. The panel shows two areas for each of the 30 available states; these show Visible states, and Initial states (see below). Setting up the State system for a game is performed by choosing the appropriate state for each controller in the object's logic. + +The display of an object's state logic, and other housekeeping, is carried out using the State Panel for the object, which is switched on and off using the button shown. The panel is divided into two halves, Visible and Initial. + +Visible States +++++++++++++++++++++++++++++++ + +.. figure:: /images/logic_bricks/logic-states-panel1.png + + State Panel visible + +In the Visible area, each of the 30 available states is represented by a light-gray square. This panel shows what logic is visible for the logic brick displayed for the object. At the right is the All button; if clicked, then all the object's logic bricks are displayed (this is a toggle), and all State Panel squares are light gray. Otherwise, individual states can be clicked to make their logic visible. (Note that you can click more than one square). Clicking the square again deselects the state. + +States for the object that are in use (i.e. the object has controllers which operate in that state) have dots in them, and squares are dark gray if these controllers are shown in the Game Logic display. The display of their connected sensors and actuators can also be controlled if the State buttons at the head of their columns are ticked. + +Initial State +++++++++++++++++++++++++++++++ + +.. figure:: /images/logic_bricks/logic-states-panel2.png + + State Panel initial + +In the Initial area, each of the 30 available states is again represented by a light-gray square. One of these states may be clicked as the state in which the object starts when the game is run. + +At the right is the |info-button| button; if clicked, and the :menuselection:`Render properties > Game Debug panel > Debug Properties checkbox` is clicked, the current state of the object is shown in the top left-hand corner of the display while the game is running. diff --git a/source/manual/logic_nodes/animation/animation_status.rst b/source/manual/logic_nodes/animation/animation_status.rst index 6c515376..d937b016 100644 --- a/source/manual/logic_nodes/animation/animation_status.rst +++ b/source/manual/logic_nodes/animation/animation_status.rst @@ -5,12 +5,12 @@ .. _ln-animation_status: -====================== +============================== Animation Status -====================== +============================== Inputs -++++++ +++++++++++++++++++++++++++++++ Object Which object to use. Type in or picker-select. @@ -19,7 +19,7 @@ Layer todo Outputs -+++++++ +++++++++++++++++++++++++++++++ Is Playing *True* if animation is playing. diff --git a/source/manual/logic_nodes/animation/armature_rig/bone_status.rst b/source/manual/logic_nodes/animation/armature_rig/bone_status.rst index 752f321f..cfd6b834 100644 --- a/source/manual/logic_nodes/animation/armature_rig/bone_status.rst +++ b/source/manual/logic_nodes/animation/armature_rig/bone_status.rst @@ -10,7 +10,7 @@ Bone Status ============================== Inputs -++++++ +++++++++++++++++++++++++++++++ Armature Object Which object to inspect. @@ -19,7 +19,7 @@ Bone Name String representation of a desired bone. Outputs -+++++++ +++++++++++++++++++++++++++++++ Position todo diff --git a/source/manual/logic_nodes/animation/armature_rig/index.rst b/source/manual/logic_nodes/animation/armature_rig/index.rst index 8439edc4..5d2db159 100644 --- a/source/manual/logic_nodes/animation/armature_rig/index.rst +++ b/source/manual/logic_nodes/animation/armature_rig/index.rst @@ -1,8 +1,8 @@ .. _ln-animation-armature_rig-index: -============== +============================== Armature / Rig -============== +============================== .. toctree:: :maxdepth: 1 diff --git a/source/manual/logic_nodes/animation/armature_rig/set_bone_position.rst b/source/manual/logic_nodes/animation/armature_rig/set_bone_position.rst index 0ec26912..0b3f439a 100644 --- a/source/manual/logic_nodes/animation/armature_rig/set_bone_position.rst +++ b/source/manual/logic_nodes/animation/armature_rig/set_bone_position.rst @@ -10,7 +10,7 @@ Set Bone Position ============================== Inputs -++++++ +++++++++++++++++++++++++++++++ Condition If connected, condition must be fulfilled for node to activate. @@ -25,7 +25,7 @@ Set Pos Vector representation of position to set. Outputs -+++++++ +++++++++++++++++++++++++++++++ Done *True* if the node performed successfuly. diff --git a/source/manual/logic_nodes/animation/bone_constraints/index.rst b/source/manual/logic_nodes/animation/bone_constraints/index.rst index c917b137..bbcb5027 100644 --- a/source/manual/logic_nodes/animation/bone_constraints/index.rst +++ b/source/manual/logic_nodes/animation/bone_constraints/index.rst @@ -1,8 +1,8 @@ .. _logic_nodes-animation-bone_constraints: -================ +============================== Bone Constraints -================ +============================== .. toctree:: :maxdepth: 1 diff --git a/source/manual/logic_nodes/animation/bone_constraints/set_attribute.rst b/source/manual/logic_nodes/animation/bone_constraints/set_attribute.rst index f5a58bd3..fcebee0b 100644 --- a/source/manual/logic_nodes/animation/bone_constraints/set_attribute.rst +++ b/source/manual/logic_nodes/animation/bone_constraints/set_attribute.rst @@ -10,7 +10,7 @@ Set Attribute ============================== Inputs -++++++ +++++++++++++++++++++++++++++++ Condition If connected, condition must be fulfilled for node to activate. @@ -31,7 +31,7 @@ Value Type and value to set. Outputs -+++++++ +++++++++++++++++++++++++++++++ Done *True* if node performs successfully. diff --git a/source/manual/logic_nodes/animation/bone_constraints/set_influence.rst b/source/manual/logic_nodes/animation/bone_constraints/set_influence.rst index 286e025d..80a6e1a3 100644 --- a/source/manual/logic_nodes/animation/bone_constraints/set_influence.rst +++ b/source/manual/logic_nodes/animation/bone_constraints/set_influence.rst @@ -5,12 +5,12 @@ .. _ln-set_influence: -====================== +============================== Set Influence -====================== +============================== Inputs -++++++ +++++++++++++++++++++++++++++++ Condition If connected, condition must be fulfilled for node to activate. @@ -28,7 +28,7 @@ Influence Influence of the bone, ranged 0-1. Outputs -+++++++ +++++++++++++++++++++++++++++++ Done *True* if node performs successfully, else *False*. diff --git a/source/manual/logic_nodes/animation/bone_constraints/set_target.rst b/source/manual/logic_nodes/animation/bone_constraints/set_target.rst index 3901ebc2..3dc4d231 100644 --- a/source/manual/logic_nodes/animation/bone_constraints/set_target.rst +++ b/source/manual/logic_nodes/animation/bone_constraints/set_target.rst @@ -10,7 +10,7 @@ Set Target ============================== Inputs -++++++ +++++++++++++++++++++++++++++++ Condition Which condition will be used for node to activate. @@ -28,7 +28,7 @@ Target Which object to use as target. Outputs -+++++++ +++++++++++++++++++++++++++++++ Done *True* if node performed successfully, else *False*. diff --git a/source/manual/logic_nodes/animation/index.rst b/source/manual/logic_nodes/animation/index.rst index b6f479ed..8681688e 100644 --- a/source/manual/logic_nodes/animation/index.rst +++ b/source/manual/logic_nodes/animation/index.rst @@ -1,8 +1,8 @@ .. _ln-animation-index: -========= +============================== Animation -========= +============================== .. toctree:: :maxdepth: 1 diff --git a/source/manual/logic_nodes/animation/play_animation.rst b/source/manual/logic_nodes/animation/play_animation.rst index 0d2e4acd..6bcb0816 100644 --- a/source/manual/logic_nodes/animation/play_animation.rst +++ b/source/manual/logic_nodes/animation/play_animation.rst @@ -5,12 +5,12 @@ .. _ln-play_animation: -====================== +============================== Play Animation -====================== +============================== Inputs -++++++ +++++++++++++++++++++++++++++++ Condition If connected, required condition must be present for node to act. @@ -46,7 +46,7 @@ Blend Mode todo Outputs -+++++++ +++++++++++++++++++++++++++++++ Started *True* if animation started. diff --git a/source/manual/logic_nodes/animation/set_animation_frame.rst b/source/manual/logic_nodes/animation/set_animation_frame.rst index 85e8f80d..f107141c 100644 --- a/source/manual/logic_nodes/animation/set_animation_frame.rst +++ b/source/manual/logic_nodes/animation/set_animation_frame.rst @@ -5,12 +5,12 @@ .. _ln-set_animation_frame: -====================== +============================== Set Animation Frame -====================== +============================== Inputs -++++++ +++++++++++++++++++++++++++++++ Condition Condition which is required for node to activate. @@ -34,7 +34,7 @@ Layer Weight todo Outputs -+++++++ +++++++++++++++++++++++++++++++ Done *True* if animation finished successfully. diff --git a/source/manual/logic_nodes/animation/stop_animation.rst b/source/manual/logic_nodes/animation/stop_animation.rst index de1def6f..597255c3 100644 --- a/source/manual/logic_nodes/animation/stop_animation.rst +++ b/source/manual/logic_nodes/animation/stop_animation.rst @@ -5,12 +5,12 @@ .. _ln-stop_animation: -====================== +============================== Stop Animation -====================== +============================== Inputs -++++++ +++++++++++++++++++++++++++++++ Condition If connected, certain condition is required for node to activate. @@ -22,7 +22,7 @@ Animation Layer Which layer is used. Outputs -+++++++ +++++++++++++++++++++++++++++++ Done *True* if animation is stopped successfully. diff --git a/source/manual/logic_nodes/data/dict/dictionary_from_items.rst b/source/manual/logic_nodes/data/dict/dictionary_from_items.rst index 399e95d2..8042247e 100644 --- a/source/manual/logic_nodes/data/dict/dictionary_from_items.rst +++ b/source/manual/logic_nodes/data/dict/dictionary_from_items.rst @@ -5,12 +5,12 @@ .. _ln-dictionary_from_items: -===================== +============================== Dictionary From Items -===================== +============================== Inputs -+++++++ +++++++++++++++++++++++++++++++ Key Name for dictionary key. @@ -19,7 +19,7 @@ String Type and value to be paired with matching key. Outputs -+++++++ +++++++++++++++++++++++++++++++ Dictionary Dictionary will be created and its data passed out. todo diff --git a/source/manual/logic_nodes/data/dict/get_dictionary_key.rst b/source/manual/logic_nodes/data/dict/get_dictionary_key.rst index 35c203d2..5d1c9d86 100644 --- a/source/manual/logic_nodes/data/dict/get_dictionary_key.rst +++ b/source/manual/logic_nodes/data/dict/get_dictionary_key.rst @@ -5,12 +5,12 @@ .. _ln-get_dictionary_key: -===================== +============================== Get Dictionary Key -===================== +============================== Inputs -+++++++ +++++++++++++++++++++++++++++++ Dictionary Which dictionary to use. @@ -22,7 +22,7 @@ Default Value If default value is to be used. todo Outputs -+++++++ +++++++++++++++++++++++++++++++ Property Value Resulting value matching the input conditions. diff --git a/source/manual/logic_nodes/data/dict/index.rst b/source/manual/logic_nodes/data/dict/index.rst index 1f0877ea..6ef50808 100644 --- a/source/manual/logic_nodes/data/dict/index.rst +++ b/source/manual/logic_nodes/data/dict/index.rst @@ -1,8 +1,8 @@ .. _ln-data-dict-index: -====== +============================== Dict -====== +============================== .. toctree:: :maxdepth: 1 diff --git a/source/manual/logic_nodes/data/dict/new_dictionary.rst b/source/manual/logic_nodes/data/dict/new_dictionary.rst index b6ef7e1f..0260966f 100644 --- a/source/manual/logic_nodes/data/dict/new_dictionary.rst +++ b/source/manual/logic_nodes/data/dict/new_dictionary.rst @@ -5,14 +5,17 @@ .. _ln-new_dictionary: -================= +============================== New Dictionary -================= +============================== todo Outputs -+++++++ +++++++++++++++++++++++++++++++ Dictionary Creates new empty dictionary. + +.. note:: + *Diamond* socket indicates *dictionary*. diff --git a/source/manual/logic_nodes/data/dict/remove_dictionary_key.rst b/source/manual/logic_nodes/data/dict/remove_dictionary_key.rst index 7600201f..af683084 100644 --- a/source/manual/logic_nodes/data/dict/remove_dictionary_key.rst +++ b/source/manual/logic_nodes/data/dict/remove_dictionary_key.rst @@ -5,12 +5,12 @@ .. _ln-remove_dictionary_key: -===================== +============================== Remove Dictionary Key -===================== +============================== Inputs -+++++++ +++++++++++++++++++++++++++++++ Condition If connected, condition must be fullfiled for node to activate. @@ -22,7 +22,7 @@ Key Which key will be removed from above dictionary. Outputs -+++++++ +++++++++++++++++++++++++++++++ Done *True* if node performs successfully, else *False*. diff --git a/source/manual/logic_nodes/data/dict/set_dictionary_key.rst b/source/manual/logic_nodes/data/dict/set_dictionary_key.rst index d74cc55f..e4c80b1c 100644 --- a/source/manual/logic_nodes/data/dict/set_dictionary_key.rst +++ b/source/manual/logic_nodes/data/dict/set_dictionary_key.rst @@ -5,12 +5,12 @@ .. _ln-set_dictionary_key: -===================== +============================== Set Dictionary Key -===================== +============================== Inputs -+++++++ +++++++++++++++++++++++++++++++ Condition If connected, condition must be fulfilled for node to activate. @@ -25,7 +25,7 @@ Type Which type and value to set. Outputs -+++++++ +++++++++++++++++++++++++++++++ Done *True* if node performs successfully, else *False*. diff --git a/source/manual/logic_nodes/data/index.rst b/source/manual/logic_nodes/data/index.rst index 190427b4..31f89e88 100644 --- a/source/manual/logic_nodes/data/index.rst +++ b/source/manual/logic_nodes/data/index.rst @@ -1,8 +1,8 @@ .. _ln-data-index: -====== +============================== Data -====== +============================== .. toctree:: :maxdepth: 1 diff --git a/source/manual/logic_nodes/data/list/append.rst b/source/manual/logic_nodes/data/list/append.rst index 0e579f68..f50e6667 100644 --- a/source/manual/logic_nodes/data/list/append.rst +++ b/source/manual/logic_nodes/data/list/append.rst @@ -5,12 +5,12 @@ .. _ln-append: -================= +============================== Append -================= +============================== Inputs -+++++++ +++++++++++++++++++++++++++++++ Condition Condition to be fulfilled for node to activate. @@ -22,7 +22,7 @@ Type Type and the value to append. Outputs -+++++++ +++++++++++++++++++++++++++++++ Done *True* if node performs successfully, else *False*. diff --git a/source/manual/logic_nodes/data/list/duplicate.rst b/source/manual/logic_nodes/data/list/duplicate.rst index 636fdae4..84ab3384 100644 --- a/source/manual/logic_nodes/data/list/duplicate.rst +++ b/source/manual/logic_nodes/data/list/duplicate.rst @@ -5,20 +5,20 @@ .. _ln-duplicate: -===================== +============================== Duplicate -===================== +============================== todo Inputs -+++++++ +++++++++++++++++++++++++++++++ List Which list to duplicate. Outputs -+++++++ +++++++++++++++++++++++++++++++ List Resulting duplicated list. diff --git a/source/manual/logic_nodes/data/list/extend.rst b/source/manual/logic_nodes/data/list/extend.rst index 2b4c3aa1..e58d1d52 100644 --- a/source/manual/logic_nodes/data/list/extend.rst +++ b/source/manual/logic_nodes/data/list/extend.rst @@ -5,14 +5,14 @@ .. _ln-extend: -================= +============================== Extend -================= +============================== Will extend one list with another. todo Inputs -+++++++ +++++++++++++++++++++++++++++++ List 1 List to be extended. todo @@ -21,7 +21,7 @@ List 2 List to use for extending. todo Outputs -+++++++ +++++++++++++++++++++++++++++++ List Resulting combined list from *List 1* and *List 2*. diff --git a/source/manual/logic_nodes/data/list/get_list_index.rst b/source/manual/logic_nodes/data/list/get_list_index.rst index a4a5a063..f5c7f79d 100644 --- a/source/manual/logic_nodes/data/list/get_list_index.rst +++ b/source/manual/logic_nodes/data/list/get_list_index.rst @@ -5,14 +5,14 @@ .. _ln-get_list_index: -================= +============================== Get List Index -================= +============================== Retrieve value at specifiend index of the list. Inputs -+++++++ +++++++++++++++++++++++++++++++ List List to be used. @@ -21,7 +21,7 @@ Index Which index to get. Outputs -+++++++ +++++++++++++++++++++++++++++++ Value Resulting value at index from list. diff --git a/source/manual/logic_nodes/data/list/get_random_list_item.rst b/source/manual/logic_nodes/data/list/get_random_list_item.rst index 58171bac..0197167f 100644 --- a/source/manual/logic_nodes/data/list/get_random_list_item.rst +++ b/source/manual/logic_nodes/data/list/get_random_list_item.rst @@ -5,18 +5,18 @@ .. _ln-get_random_list_item: -===================== +============================== Get Random List Item -===================== +============================== Inputs -+++++++ +++++++++++++++++++++++++++++++ List Which list to use for getting a random item. Outputs -+++++++ +++++++++++++++++++++++++++++++ Value A value of the random item from the list. diff --git a/source/manual/logic_nodes/data/list/index.rst b/source/manual/logic_nodes/data/list/index.rst index 0283ef16..d8bb4fcf 100644 --- a/source/manual/logic_nodes/data/list/index.rst +++ b/source/manual/logic_nodes/data/list/index.rst @@ -1,8 +1,8 @@ .. _ln-data-list-index: -====== +============================== List -====== +============================== .. toctree:: :maxdepth: 1 diff --git a/source/manual/logic_nodes/data/list/list_from_items.rst b/source/manual/logic_nodes/data/list/list_from_items.rst index 3697794a..02eb7afa 100644 --- a/source/manual/logic_nodes/data/list/list_from_items.rst +++ b/source/manual/logic_nodes/data/list/list_from_items.rst @@ -5,18 +5,18 @@ .. _ln-list_from_items: -================= +============================== List From Items -================= +============================== Parameters -++++++++++ +++++++++++++++++++++++++++++++ Add Socket Will add another socket for additional items. Inputs -+++++++ +++++++++++++++++++++++++++++++ Item First item to add to list. @@ -25,7 +25,7 @@ Item Second item to add. Outputs -+++++++ +++++++++++++++++++++++++++++++ List Resulting populated list with added items. diff --git a/source/manual/logic_nodes/data/list/new_list.rst b/source/manual/logic_nodes/data/list/new_list.rst index 45723fbe..d364e900 100644 --- a/source/manual/logic_nodes/data/list/new_list.rst +++ b/source/manual/logic_nodes/data/list/new_list.rst @@ -5,18 +5,18 @@ .. _ln-new_list: -================= +============================== New List -================= +============================== Inputs -+++++++ +++++++++++++++++++++++++++++++ Length List length - how many items will it have. Outputs -+++++++ +++++++++++++++++++++++++++++++ List Resulting empty list of specified length. diff --git a/source/manual/logic_nodes/data/list/remove_index.rst b/source/manual/logic_nodes/data/list/remove_index.rst index b6ee4684..bc6d25a0 100644 --- a/source/manual/logic_nodes/data/list/remove_index.rst +++ b/source/manual/logic_nodes/data/list/remove_index.rst @@ -5,12 +5,12 @@ .. _ln-remove_index: -================= +============================== Remove Index -================= +============================== Inputs -+++++++ +++++++++++++++++++++++++++++++ Condition Condition to be fulfilled for node to be activated. @@ -22,7 +22,7 @@ Index Which index to remove from above list. Outputs -+++++++ +++++++++++++++++++++++++++++++ Done *True* if removal of index is successful, else *False*. diff --git a/source/manual/logic_nodes/data/list/remove_value.rst b/source/manual/logic_nodes/data/list/remove_value.rst index 97276045..34c0c03e 100644 --- a/source/manual/logic_nodes/data/list/remove_value.rst +++ b/source/manual/logic_nodes/data/list/remove_value.rst @@ -5,12 +5,12 @@ .. _ln-remove_value: -================= +============================== Remove Value -================= +============================== Inputs -+++++++ +++++++++++++++++++++++++++++++ Condition Condition to be fulfilled for node to activate. @@ -22,7 +22,7 @@ Type Which type and value to remove from list. Outputs -+++++++ +++++++++++++++++++++++++++++++ Done *True* if value is removed, else *False*. diff --git a/source/manual/logic_nodes/data/list/set_list_index.rst b/source/manual/logic_nodes/data/list/set_list_index.rst index 02bb5cbb..0e371184 100644 --- a/source/manual/logic_nodes/data/list/set_list_index.rst +++ b/source/manual/logic_nodes/data/list/set_list_index.rst @@ -5,12 +5,12 @@ .. _ln-set_list_index: -================= +============================== Set List Index -================= +============================== Inputs -+++++++ +++++++++++++++++++++++++++++++ Conditon If connected, a condition must be fulfilled for note to activate. @@ -25,7 +25,7 @@ Type Which type and value to set for above list. Outputs -+++++++ +++++++++++++++++++++++++++++++ Done *True* if node sets an index successfully, else *False*. diff --git a/source/manual/logic_nodes/data/load_file_content.rst b/source/manual/logic_nodes/data/load_file_content.rst index 7ac6d1f2..23be6095 100644 --- a/source/manual/logic_nodes/data/load_file_content.rst +++ b/source/manual/logic_nodes/data/load_file_content.rst @@ -5,18 +5,18 @@ .. _ln-load_file_content: -================= +============================== Load File Content -================= +============================== Inputs -+++++++ +++++++++++++++++++++++++++++++ Condition If connected, condition must be fulfilled for node to activate. Outputs -+++++++ +++++++++++++++++++++++++++++++ Loaded *True* if node executed properly, else *False*. todo diff --git a/source/manual/logic_nodes/data/load_scene.rst b/source/manual/logic_nodes/data/load_scene.rst index 84199943..2f24b13e 100644 --- a/source/manual/logic_nodes/data/load_scene.rst +++ b/source/manual/logic_nodes/data/load_scene.rst @@ -5,12 +5,12 @@ .. _ln-load_scene: -========== +============================== Load Scene -========== +============================== Inputs -+++++++ +++++++++++++++++++++++++++++++ Condition Which condition will be used for node to activate. @@ -19,7 +19,7 @@ Scene Which scene to load. Outputs -+++++++ +++++++++++++++++++++++++++++++ Loaded *True* if node executed properly. todo diff --git a/source/manual/logic_nodes/data/variables/clear_variables.rst b/source/manual/logic_nodes/data/variables/clear_variables.rst index 42b3dddf..92a7b750 100644 --- a/source/manual/logic_nodes/data/variables/clear_variables.rst +++ b/source/manual/logic_nodes/data/variables/clear_variables.rst @@ -5,18 +5,18 @@ .. _ln-clear_variables: -================== +============================== Clear Variables -================== +============================== Parameters -++++++++++ +++++++++++++++++++++++++++++++ File Path/Data Path to file/data. todo Inputs -+++++++ +++++++++++++++++++++++++++++++ Conditon Which condition must be fulfilled for node to activate. @@ -25,7 +25,7 @@ Filename Which file to use for clearing. todo Outputs -+++++++ +++++++++++++++++++++++++++++++ Done *True* if variables have been cleared successfully, else *False*. diff --git a/source/manual/logic_nodes/data/variables/index.rst b/source/manual/logic_nodes/data/variables/index.rst index fabe8da6..f2f42d66 100644 --- a/source/manual/logic_nodes/data/variables/index.rst +++ b/source/manual/logic_nodes/data/variables/index.rst @@ -1,8 +1,8 @@ .. _ln-data-variables-index: -========= +============================== Variables -========= +============================== .. toctree:: :maxdepth: 1 diff --git a/source/manual/logic_nodes/data/variables/list_saved_variables.rst b/source/manual/logic_nodes/data/variables/list_saved_variables.rst index 90a9a4e7..9fc7983e 100644 --- a/source/manual/logic_nodes/data/variables/list_saved_variables.rst +++ b/source/manual/logic_nodes/data/variables/list_saved_variables.rst @@ -5,18 +5,18 @@ .. _ln-list_saved_variables: -==================== +============================== List Saved Variables -==================== +============================== Parameters -++++++++++ +++++++++++++++++++++++++++++++ File Path/Data Path to file to be used. Inputs -+++++++ +++++++++++++++++++++++++++++++ Condition Which condition will be used for node to activate. If checked, always *True*. todo @@ -28,7 +28,7 @@ Print If checked, list will be printed. todo Outputs -+++++++ +++++++++++++++++++++++++++++++ Done *True* if listing is performed, else *False*. diff --git a/source/manual/logic_nodes/data/variables/load_variable.rst b/source/manual/logic_nodes/data/variables/load_variable.rst index aba7e527..2d5f3411 100644 --- a/source/manual/logic_nodes/data/variables/load_variable.rst +++ b/source/manual/logic_nodes/data/variables/load_variable.rst @@ -5,18 +5,18 @@ .. _ln-load_variable: -================= +============================== Load Variable -================= +============================== Parameters -++++++++++ +++++++++++++++++++++++++++++++ File Path/Data Path to file/data to load. Inputs -+++++++ +++++++++++++++++++++++++++++++ Filename File name to load from. @@ -28,7 +28,7 @@ Default Value If connected, that value will be used as default. todo Outputs -+++++++ +++++++++++++++++++++++++++++++ Value Resulting value that was loaded. diff --git a/source/manual/logic_nodes/data/variables/load_variable_dict.rst b/source/manual/logic_nodes/data/variables/load_variable_dict.rst index 22b94c11..43485485 100644 --- a/source/manual/logic_nodes/data/variables/load_variable_dict.rst +++ b/source/manual/logic_nodes/data/variables/load_variable_dict.rst @@ -5,24 +5,24 @@ .. _ln-load_variable_dict: -================== +============================== Load Variable Dict -================== +============================== Parameters -++++++++++ +++++++++++++++++++++++++++++++ File Path/Data Path to file/data to be used. Inputs -+++++++ +++++++++++++++++++++++++++++++ Filename File name of loaded . todo Outputs -+++++++ +++++++++++++++++++++++++++++++ Variables Resulting loaded variables dictionary. diff --git a/source/manual/logic_nodes/data/variables/remove_variable.rst b/source/manual/logic_nodes/data/variables/remove_variable.rst index a2e9414d..f059ae53 100644 --- a/source/manual/logic_nodes/data/variables/remove_variable.rst +++ b/source/manual/logic_nodes/data/variables/remove_variable.rst @@ -5,18 +5,18 @@ .. _ln-remove_variable: -================= +============================== Remove Variable -================= +============================== Parameters -++++++++++ +++++++++++++++++++++++++++++++ File Path/Data Path to file to be used. Inputs -+++++++ +++++++++++++++++++++++++++++++ Condition If connected, condition must be fulfilled for node to activate. @@ -28,7 +28,7 @@ Name Variable name to be removed. Outputs -+++++++ +++++++++++++++++++++++++++++++ Done *True* if node performed successfully, else *False*. diff --git a/source/manual/logic_nodes/data/variables/save_variable.rst b/source/manual/logic_nodes/data/variables/save_variable.rst index 7239fd6a..895e4376 100644 --- a/source/manual/logic_nodes/data/variables/save_variable.rst +++ b/source/manual/logic_nodes/data/variables/save_variable.rst @@ -5,18 +5,18 @@ .. _ln-save_variable: -================= +============================== Save Variable -================= +============================== Parameters -++++++++++ +++++++++++++++++++++++++++++++ File Path/Data Path to file to be used. Inputs -+++++++ +++++++++++++++++++++++++++++++ Condition Which condition will be used for node to activate. @@ -31,7 +31,7 @@ Type Which type and value to save. Outputs -+++++++ +++++++++++++++++++++++++++++++ Done *True* if node performed successfully, else *False*. diff --git a/source/manual/logic_nodes/data/variables/save_variable_dict.rst b/source/manual/logic_nodes/data/variables/save_variable_dict.rst index 99a724b9..9405639c 100644 --- a/source/manual/logic_nodes/data/variables/save_variable_dict.rst +++ b/source/manual/logic_nodes/data/variables/save_variable_dict.rst @@ -5,18 +5,18 @@ .. _ln-save_variable_dict: -================== +============================== Save Variable Dict -================== +============================== Parameters -++++++++++ +++++++++++++++++++++++++++++++ File Path/Data Path to file to be saved. todo Inputs -+++++++ +++++++++++++++++++++++++++++++ Condition If connected, condition must be fulfilled for node to activate. @@ -28,7 +28,7 @@ Variables Dictionary of variables to save. Outputs -+++++++ +++++++++++++++++++++++++++++++ Done *True* if node performed successfully, else *False*. diff --git a/source/manual/logic_nodes/events/custom/index.rst b/source/manual/logic_nodes/events/custom/index.rst index 92a0d9b6..515857fe 100644 --- a/source/manual/logic_nodes/events/custom/index.rst +++ b/source/manual/logic_nodes/events/custom/index.rst @@ -1,8 +1,8 @@ .. _ln-events-custom-index: -====== +============================== Custom -====== +============================== .. toctree:: :maxdepth: 1 diff --git a/source/manual/logic_nodes/events/custom/receive_event.rst b/source/manual/logic_nodes/events/custom/receive_event.rst index 014d7c12..9bdb90f2 100644 --- a/source/manual/logic_nodes/events/custom/receive_event.rst +++ b/source/manual/logic_nodes/events/custom/receive_event.rst @@ -5,20 +5,20 @@ .. _ln-receive_event: -============================= +============================== Receive Event -============================= +============================== Reacts to events sent via the :doc:`./send_event` node or the *Uplogic* module. An event can store some data, which can be extracted using this node. Inputs -++++++ +++++++++++++++++++++++++++++++ Subject The ID of the event. Outputs -+++++++ +++++++++++++++++++++++++++++++ Received *True* if an event has been found, else *False*. @@ -30,5 +30,4 @@ Messenger Messenger of this event, expected to be a ``KX_GameObject``. .. important:: - If multiple events have the same ID (subject), older events are overwritten. diff --git a/source/manual/logic_nodes/events/custom/send_event.rst b/source/manual/logic_nodes/events/custom/send_event.rst index 906227f9..6784a619 100644 --- a/source/manual/logic_nodes/events/custom/send_event.rst +++ b/source/manual/logic_nodes/events/custom/send_event.rst @@ -5,20 +5,20 @@ .. _ln-send_event: -=============== +============================== Send Event -=============== +============================== Creates an event that can be reacted to, using the :doc:`./receive_event` node or the *Uplogic* module. An event can store *Content*, and a *Messenger* can be assigned. Properties -++++++++++ +++++++++++++++++++++++++++++++ Advanced Enables access to the *Content* and *Messenger* sockets. Inputs -++++++ +++++++++++++++++++++++++++++++ Condition If *True*, the event is created. @@ -33,11 +33,10 @@ Messenger Messenger attached to this event, expected to be ``KX_GameObject``. Visible only if *Advanced* is selected. Outputs -+++++++ +++++++++++++++++++++++++++++++ Done *True* if the node performed successfully, else *False*. .. important:: - Events are only created for the next frame. After that, they are erased. If multiple events have the same ID (subject), older events are overwritten. diff --git a/source/manual/logic_nodes/events/index.rst b/source/manual/logic_nodes/events/index.rst index 8af057ec..d71508b8 100644 --- a/source/manual/logic_nodes/events/index.rst +++ b/source/manual/logic_nodes/events/index.rst @@ -1,11 +1,11 @@ .. _ln-events-index: -====== +============================== Events -====== +============================== .. toctree:: - :maxdepth: 1 + :maxdepth: 0 on_init on_update @@ -13,4 +13,8 @@ Events on_value_changed_to on_value_changed once + +.. toctree:: + :maxdepth: 2 + custom/index diff --git a/source/manual/logic_nodes/events/on_init.rst b/source/manual/logic_nodes/events/on_init.rst index 57824625..60c00ff0 100644 --- a/source/manual/logic_nodes/events/on_init.rst +++ b/source/manual/logic_nodes/events/on_init.rst @@ -5,14 +5,14 @@ .. _ln-on_init: -========== +============================== On Init -========== +============================== Used to set up a scene. It activates only on the first frame - game initialization. Outputs -+++++++ +++++++++++++++++++++++++++++++ Out *True* if node performed successfully, else *False*. diff --git a/source/manual/logic_nodes/events/on_next_frame.rst b/source/manual/logic_nodes/events/on_next_frame.rst index b69c15d2..91a251b2 100644 --- a/source/manual/logic_nodes/events/on_next_frame.rst +++ b/source/manual/logic_nodes/events/on_next_frame.rst @@ -5,20 +5,20 @@ .. _ln-on_next_frame: -============= +============================== On Next Frame -============= +============================== Delays a condition by one tick/frame. Inputs -++++++ +++++++++++++++++++++++++++++++ Condition If *True*, the condition is reserved until the next tick/frame. Outputs -+++++++ +++++++++++++++++++++++++++++++ Out *True* one tick/frame after the *Condition* socket is activated. diff --git a/source/manual/logic_nodes/events/on_update.rst b/source/manual/logic_nodes/events/on_update.rst index 99ae57aa..6ddeaada 100644 --- a/source/manual/logic_nodes/events/on_update.rst +++ b/source/manual/logic_nodes/events/on_update.rst @@ -5,18 +5,17 @@ .. _ln-on_update: -=========== +============================== On Update -=========== +============================== -Activates each frame. It is used to continuously do something. It is node equivalent to the :doc:`/manual/logic/sensors/types/always`. +Activates each frame. It is used to continuously do something. It is node equivalent to the :doc:`/manual/logic_bricks/sensors/types/always`. Outputs -+++++++ +++++++++++++++++++++++++++++++ Out *True* on each frame. .. note:: - *On Update* can be expensive depending on the logic attached to it, and should only be used if necessary. diff --git a/source/manual/logic_nodes/events/on_value_changed.rst b/source/manual/logic_nodes/events/on_value_changed.rst index c1acc03c..7e464e82 100644 --- a/source/manual/logic_nodes/events/on_value_changed.rst +++ b/source/manual/logic_nodes/events/on_value_changed.rst @@ -5,20 +5,26 @@ .. _ln-on_value_changed: -================ +============================== On Value Changed -================ +============================== Stores a value internally, and as soon as a value other than the stored one is pulled through the input, it activates. Then the new value is stored. +Parameters +++++++++++++++++++++++++++++++ + +Initialize + todo + Inputs -++++++ +++++++++++++++++++++++++++++++ Value Connected value is pulled each frame. Outputs -+++++++ +++++++++++++++++++++++++++++++ If Changed *True* if the new value is different from the stored one, else *False*. diff --git a/source/manual/logic_nodes/events/on_value_changed_to.rst b/source/manual/logic_nodes/events/on_value_changed_to.rst index d94bdf33..ab8e6f40 100644 --- a/source/manual/logic_nodes/events/on_value_changed_to.rst +++ b/source/manual/logic_nodes/events/on_value_changed_to.rst @@ -5,14 +5,14 @@ .. _ln-on_value_changed_to: -=================== +============================== On Value Changed To -=================== +============================== Stores a value internally, and as soon as the value pulled through the input matches the target value, it activates. Then the new value is stored. Inputs -++++++ +++++++++++++++++++++++++++++++ Value The connected value is pulled each frame. @@ -21,7 +21,7 @@ Target Compare the new value to this value. Outputs -+++++++ +++++++++++++++++++++++++++++++ Result *True* if the new value matches the target, else *False*. diff --git a/source/manual/logic_nodes/events/once.rst b/source/manual/logic_nodes/events/once.rst index 09405400..22d52483 100644 --- a/source/manual/logic_nodes/events/once.rst +++ b/source/manual/logic_nodes/events/once.rst @@ -5,14 +5,14 @@ .. _ln-once: -========== +============================== Once -========== +============================== Restricts a continuous *True* condition to only the first frame. Inputs -+++++++ +++++++++++++++++++++++++++++++ Condition Input condition. @@ -21,18 +21,19 @@ Repeat Allow another activation after the input condition is reset to *False*. Outputs -+++++++ +++++++++++++++++++++++++++++++ Out *True* for the first frame of a *True* input condition, else *False*. Example -+++++++ +++++++++++++++++++++++++++++++ .. figure:: /images/logic_nodes/events/ln-once-example.png :width: 500 :alt: Once Node Example + :align: center Once Node Example -:doc:`./on_update` linked to *Once* node would be equal to :doc:`./on_init`. +:doc:`./on_update` linked to :ln:`Once` node would be equal to :doc:`./on_init`. diff --git a/source/manual/logic_nodes/file/get_font.rst b/source/manual/logic_nodes/file/get_font.rst index beb8834d..d3be9d82 100644 --- a/source/manual/logic_nodes/file/get_font.rst +++ b/source/manual/logic_nodes/file/get_font.rst @@ -5,18 +5,18 @@ .. _ln-get_font: -================= +============================== Get Font -================= +============================== Inputs -+++++++ +++++++++++++++++++++++++++++++ Font Font to get. Load with *Folder* icon and select/set from selection menu. Outputs -+++++++ +++++++++++++++++++++++++++++++ Font Resulting font. todo diff --git a/source/manual/logic_nodes/file/get_image.rst b/source/manual/logic_nodes/file/get_image.rst index 8fe58c2d..afe7faa1 100644 --- a/source/manual/logic_nodes/file/get_image.rst +++ b/source/manual/logic_nodes/file/get_image.rst @@ -5,18 +5,18 @@ .. _ln-get_image: -================= +============================== Get Image -================= +============================== Inputs -+++++++ +++++++++++++++++++++++++++++++ Image Image to get. Load with *Folder* icon and select/set from selection menu. Outputs -+++++++ +++++++++++++++++++++++++++++++ Image Resulting image data. diff --git a/source/manual/logic_nodes/file/get_sound.rst b/source/manual/logic_nodes/file/get_sound.rst index 3957c5d4..6b0514f0 100644 --- a/source/manual/logic_nodes/file/get_sound.rst +++ b/source/manual/logic_nodes/file/get_sound.rst @@ -5,18 +5,18 @@ .. _ln-get_sound: -================= +============================== Get Sound -================= +============================== Inputs -+++++++ +++++++++++++++++++++++++++++++ Sound File *Sound File* to get. If node is connected todo, else load with *Folder* icon and select/set from selection dropdown. Outputs -+++++++ +++++++++++++++++++++++++++++++ Sound File Resulting sound file. diff --git a/source/manual/logic_nodes/file/index.rst b/source/manual/logic_nodes/file/index.rst index 950a80ac..9d340727 100644 --- a/source/manual/logic_nodes/file/index.rst +++ b/source/manual/logic_nodes/file/index.rst @@ -1,8 +1,8 @@ .. _ln-file-index: -====== +============================== File -====== +============================== .. toctree:: :maxdepth: 1 diff --git a/source/manual/logic_nodes/game/index.rst b/source/manual/logic_nodes/game/index.rst index 5165f207..5dbe82cc 100644 --- a/source/manual/logic_nodes/game/index.rst +++ b/source/manual/logic_nodes/game/index.rst @@ -1,8 +1,8 @@ .. _ln-game-index: -==== +============================== Game -==== +============================== .. toctree:: :maxdepth: 1 diff --git a/source/manual/logic_nodes/game/load_blender_file.rst b/source/manual/logic_nodes/game/load_blender_file.rst index 83b4987a..e0812c54 100644 --- a/source/manual/logic_nodes/game/load_blender_file.rst +++ b/source/manual/logic_nodes/game/load_blender_file.rst @@ -5,14 +5,14 @@ .. _ln-load_blender_file: -================= +============================== Load Blender File -================= +============================== This is the in-game equivalent of *File Open*. It loads directly into the runtime version of another .blend file. Inputs -+++++++ +++++++++++++++++++++++++++++++ Condition Input condition needed for node to activate. @@ -21,10 +21,10 @@ File Name Full path to the target .blend file; supports relative paths. Outputs -+++++++ +++++++++++++++++++++++++++++++ Done *True* if the node performed successfully, else *False*. .. important:: - Output exists, but is disabled in code, therefore is not visible. + Output exists, but is disabled in code, therefore it is not visible. diff --git a/source/manual/logic_nodes/game/load_game.rst b/source/manual/logic_nodes/game/load_game.rst index 41624982..ae6ec0bf 100644 --- a/source/manual/logic_nodes/game/load_game.rst +++ b/source/manual/logic_nodes/game/load_game.rst @@ -5,20 +5,20 @@ .. _ln-load_game: -========== +============================== Load Game -========== +============================== Reads information about the state of the current scene from a previously saved ``.json`` file. Parameters -++++++++++ +++++++++++++++++++++++++++++++ File Path/Saves Path to where the save files are stored. Inputs -++++++ +++++++++++++++++++++++++++++++ Condition Input condition. @@ -27,7 +27,7 @@ Slot Index of this save file. Outputs -+++++++ +++++++++++++++++++++++++++++++ Done *True* if the node performed successfully, else *False*. diff --git a/source/manual/logic_nodes/game/quit_game.rst b/source/manual/logic_nodes/game/quit_game.rst index 5927cc06..98274e41 100644 --- a/source/manual/logic_nodes/game/quit_game.rst +++ b/source/manual/logic_nodes/game/quit_game.rst @@ -5,14 +5,14 @@ .. _ln-quit_game: -=========== +============================== Quit Game -=========== +============================== Exits the current runtime. In standalone mode it closes the runtime window entirely. Inputs -++++++ +++++++++++++++++++++++++++++++ Condition Input condition which must be fulfilled for node to activate. diff --git a/source/manual/logic_nodes/game/restart_game.rst b/source/manual/logic_nodes/game/restart_game.rst index d4a92b98..3239af53 100644 --- a/source/manual/logic_nodes/game/restart_game.rst +++ b/source/manual/logic_nodes/game/restart_game.rst @@ -5,20 +5,20 @@ .. _ln-restart_game: -============= +============================== Restart Game -============= +============================== Reverts the state of the current runtime to it's original version. Inputs -++++++ +++++++++++++++++++++++++++++++ Condition Input condition required for node to activate. Outputs -+++++++ +++++++++++++++++++++++++++++++ Done *True* if the node performed successfully, else *False*. diff --git a/source/manual/logic_nodes/game/save_game.rst b/source/manual/logic_nodes/game/save_game.rst index d87c3587..f29afb5d 100644 --- a/source/manual/logic_nodes/game/save_game.rst +++ b/source/manual/logic_nodes/game/save_game.rst @@ -5,20 +5,20 @@ .. _ln-save_game: -========== +============================== Save Game -========== +============================== Stores information about the state of the scene in a ``.json`` file. Parameters -++++++++++ +++++++++++++++++++++++++++++++ File Path/Saves Path to where the save files are stored. Inputs -++++++ +++++++++++++++++++++++++++++++ Condition Input condition required for node to activate. @@ -27,7 +27,7 @@ Slot Index of this save file. Outputs -+++++++ +++++++++++++++++++++++++++++++ Done *True* if the node performed successfully, else *False*. diff --git a/source/manual/logic_nodes/index.rst b/source/manual/logic_nodes/index.rst index acc9dcab..27ceacdd 100644 --- a/source/manual/logic_nodes/index.rst +++ b/source/manual/logic_nodes/index.rst @@ -1,12 +1,49 @@ .. _ln-index: -=========== +.. figure:: /images/logic_nodes/ln-guinness_world_record.png + :align: center + :figwidth: 100% + :alt: Guinness world record + +| + +This page lists available :ln:`Logic Nodes`, which are many. There are 6 categories in *Logic Node Editor* :menuselection:`Add` menu, with sub-menus: either jump into one here below, or scroll down the page for direct access to :ln:`Logic Nodes`. + +.. rst-class:: center + + - :ref:`ln-events-index` | | :ref:`ln-game-index` | | :ref:`ln-input-index` | | :ref:`ln-values-index` + + - :ref:`ln-animation-index` | | :ref:`ln-lights-index` | | :ref:`ln-nodes-index` | | :ref:`ln-objects-index` | | :ref:`ln-scene-index` | | :ref:`ln-sound-index` + + - :ref:`ln-logic-index` | | :ref:`ln-math-index` | | :ref:`ln-physics-index` | | :ref:`ln-python-index` | | :ref:`ln-raycasts-index` | | :ref:`ln-time-index` + + - :ref:`ln-data-index` | | :ref:`ln-file-index` | | :ref:`ln-network-index` + + - :ref:`ln-render-index` | | :ref:`ln-ui-index` + + - :ref:`ln-utility-index` + +----- + +.. note:: + The sub-menu *Layout* is not a particular part of :ln:`Logic Nodes` - those are tools for organizing and connecting, and are common feature for all *node editors*. + +.. figure:: /images/logic_nodes/ln-noodles.png + :align: center + :figwidth: 60% + :alt: Logic Noodles + + Logic Noodles + +---- + +============================== Logic Nodes -=========== +============================== .. toctree:: - :maxdepth: 2 - :hidden: + :maxdepth: 3 + :titlesonly: introduction events/index @@ -31,28 +68,3 @@ Logic Nodes render/index ui/index utility/index - -This page lists available *Logic Nodes* sub-menus. There are 6 categories in *Logic Editor* :menuselection:`Add` menu, separated into sub- and sub-sub-menus: - - * :ref:`ln-events-index` | | :ref:`ln-game-index` | | :ref:`ln-input-index` | | :ref:`ln-values-index` - - * :ref:`ln-animation-index` | | :ref:`ln-lights-index` | | :ref:`ln-nodes-index` | | :ref:`ln-objects-index` | | :ref:`ln-scene-index` | | :ref:`ln-sound-index` - - * :ref:`ln-logic-index` | | :ref:`ln-math-index` | | :ref:`ln-physics-index` | | :ref:`ln-python-index` | | :ref:`ln-raycasts-index` | | :ref:`ln-time-index` - - * :ref:`ln-data-index` | | :ref:`ln-file-index` | | :ref:`ln-network-index` - - * :ref:`ln-render-index` | | :ref:`ln-ui-index` - - * :ref:`ln-utility-index` - ------ - -.. note:: - The sub-menu *Layout* is not a particular part of Logic Nodes - those are tools for organizing and connecting, and are common feature for all *node editors*. - -.. figure:: /images/logic_nodes/ln-noodles.png - :scale: 60% - :alt: Logic Noodles - - Logic Noodles diff --git a/source/manual/logic_nodes/input/gamepad/gamepad_active.rst b/source/manual/logic_nodes/input/gamepad/gamepad_active.rst index 21b2a644..4194616e 100644 --- a/source/manual/logic_nodes/input/gamepad/gamepad_active.rst +++ b/source/manual/logic_nodes/input/gamepad/gamepad_active.rst @@ -5,20 +5,20 @@ .. _ln-gamepad_active: -=============== +============================== Gamepad Active -=============== +============================== Detects if the controller at given index has any activity. Inputs -+++++++ +++++++++++++++++++++++++++++++ Index The controller index to monitor. Outputs -+++++++ +++++++++++++++++++++++++++++++ Active *True* if the controller has activity, else *False*. diff --git a/source/manual/logic_nodes/input/gamepad/gamepad_button.rst b/source/manual/logic_nodes/input/gamepad/gamepad_button.rst index 52bc248b..06a784f6 100644 --- a/source/manual/logic_nodes/input/gamepad/gamepad_button.rst +++ b/source/manual/logic_nodes/input/gamepad/gamepad_button.rst @@ -5,14 +5,14 @@ .. _ln-gamepad_button: -============== +============================== Gamepad Button -============== +============================== Detects if a specified button has been pressed on the controller at given index. Parameters -++++++++++ +++++++++++++++++++++++++++++++ Button Which button/trigger is monitored. @@ -21,16 +21,16 @@ Input Type Input detection mode. Inputs -++++++ +++++++++++++++++++++++++++++++ Index The controller index to monitor. Outputs -+++++++ +++++++++++++++++++++++++++++++ Pressed *True* if the button is active in the selected mode, else *False*. Strength - Value of the trigger from 0 to 1. Only visible if button is `LT / L2` or `RT / R2`. + Value of the trigger from 0 to 1. Only visible if button is `LT/L2` or `RT/R2`. diff --git a/source/manual/logic_nodes/input/gamepad/gamepad_look.rst b/source/manual/logic_nodes/input/gamepad/gamepad_look.rst index b11e684d..ee57b329 100644 --- a/source/manual/logic_nodes/input/gamepad/gamepad_look.rst +++ b/source/manual/logic_nodes/input/gamepad/gamepad_look.rst @@ -5,22 +5,22 @@ .. _ln-gamepad_look: -============== +============================== Gamepad Look -============== +============================== A quick way to make objects follow controller stick movement. It's possible to assign a *Body* and a *Head* object. If no *Head* object is assigned, the *Body* will be used for both axis, but that is generally discouraged as it can lead to unwanted side effects. Parameters -++++++++++ +++++++++++++++++++++++++++++++ Axis Which stick of the controller to use for the transformation. Inputs -++++++ +++++++++++++++++++++++++++++++ Condition Input condition for node activaton. @@ -59,7 +59,7 @@ Threshold Ignore stick values under this threshold. Outputs -+++++++ +++++++++++++++++++++++++++++++ Done *True* if the node performed successfully, else *False*. diff --git a/source/manual/logic_nodes/input/gamepad/gamepad_sticks.rst b/source/manual/logic_nodes/input/gamepad/gamepad_sticks.rst index 65dde8a7..32c2dbcd 100644 --- a/source/manual/logic_nodes/input/gamepad/gamepad_sticks.rst +++ b/source/manual/logic_nodes/input/gamepad/gamepad_sticks.rst @@ -5,20 +5,20 @@ .. _ln-gamepad_sticks: -============== +============================== Gamepad Sticks -============== +============================== Detects stick values of the controller at given index. Parameters -++++++++++ +++++++++++++++++++++++++++++++ Axis Which stick values to read. Inputs -++++++ +++++++++++++++++++++++++++++++ Invert XY Checked axis will be inverted. @@ -33,7 +33,7 @@ Threshold Dead-zone for the stick. Outputs -+++++++ +++++++++++++++++++++++++++++++ Vector Stick values as vector `(X, Y, 0)`. diff --git a/source/manual/logic_nodes/input/gamepad/gamepad_vibrate.rst b/source/manual/logic_nodes/input/gamepad/gamepad_vibrate.rst index da5ab167..8db384ce 100644 --- a/source/manual/logic_nodes/input/gamepad/gamepad_vibrate.rst +++ b/source/manual/logic_nodes/input/gamepad/gamepad_vibrate.rst @@ -5,14 +5,14 @@ .. _ln-gamepad_vibrate: -================ +============================== Gamepad Vibrate -================ +============================== Detects if the controller at given index has any activity. Inputs -++++++ +++++++++++++++++++++++++++++++ Condition Condition that need be fulfilled to activate the node. @@ -30,7 +30,7 @@ Time Vibrate for this many seconds. Outputs -+++++++ +++++++++++++++++++++++++++++++ Done *True* if the node performed successfully, else *False*. diff --git a/source/manual/logic_nodes/input/gamepad/index.rst b/source/manual/logic_nodes/input/gamepad/index.rst index 498b1763..31e0597a 100644 --- a/source/manual/logic_nodes/input/gamepad/index.rst +++ b/source/manual/logic_nodes/input/gamepad/index.rst @@ -1,8 +1,8 @@ .. _ln-input-gamepad-index: -======= +============================== Gamepad -======= +============================== .. toctree:: :maxdepth: 1 diff --git a/source/manual/logic_nodes/input/index.rst b/source/manual/logic_nodes/input/index.rst index 416e53c0..881449bf 100644 --- a/source/manual/logic_nodes/input/index.rst +++ b/source/manual/logic_nodes/input/index.rst @@ -1,11 +1,11 @@ .. _ln-input-index: -===== +============================== Input -===== +============================== .. toctree:: - :maxdepth: 2 + :maxdepth: 3 mouse/index keyboard/index diff --git a/source/manual/logic_nodes/input/keyboard/index.rst b/source/manual/logic_nodes/input/keyboard/index.rst index 62af741e..d5dc194c 100644 --- a/source/manual/logic_nodes/input/keyboard/index.rst +++ b/source/manual/logic_nodes/input/keyboard/index.rst @@ -1,8 +1,8 @@ .. _ln-input-keyboard-index: -========= +============================== Keyboard -========= +============================== .. toctree:: :maxdepth: 1 diff --git a/source/manual/logic_nodes/input/keyboard/instream.rst b/source/manual/logic_nodes/input/keyboard/instream.rst index d164d574..4f0755fe 100644 --- a/source/manual/logic_nodes/input/keyboard/instream.rst +++ b/source/manual/logic_nodes/input/keyboard/instream.rst @@ -5,20 +5,20 @@ .. _ln-instream: -========== +============================== Key Logger -========== +============================== Records keyboard activity. Inputs -++++++ +++++++++++++++++++++++++++++++ Only Characters Boolean value for condition. todo Outputs -+++++++ +++++++++++++++++++++++++++++++ Pressed *True* if the node performed successfully, else *False*. diff --git a/source/manual/logic_nodes/input/keyboard/key_code.rst b/source/manual/logic_nodes/input/keyboard/key_code.rst index 0980384f..477c15ae 100644 --- a/source/manual/logic_nodes/input/keyboard/key_code.rst +++ b/source/manual/logic_nodes/input/keyboard/key_code.rst @@ -5,20 +5,20 @@ .. _ln-key_code: -======== +============================== Key Code -======== +============================== Retrieves a specified key's numeric code. This node is meant for debugging purposes. Inputs -++++++ +++++++++++++++++++++++++++++++ Key The key to translate. Outputs -+++++++ +++++++++++++++++++++++++++++++ Code Integer code of the selected key. diff --git a/source/manual/logic_nodes/input/keyboard/keyboard_active.rst b/source/manual/logic_nodes/input/keyboard/keyboard_active.rst index c89c85fb..70b6fc4b 100644 --- a/source/manual/logic_nodes/input/keyboard/keyboard_active.rst +++ b/source/manual/logic_nodes/input/keyboard/keyboard_active.rst @@ -5,14 +5,14 @@ .. _ln-keyboard_active: -=============== +============================== Keyboard Active -=============== +============================== Detects any activity on the keyboard. Outputs -+++++++ +++++++++++++++++++++++++++++++ Active *True* if keyboard state changed, else *False*. diff --git a/source/manual/logic_nodes/input/keyboard/keyboard_key.rst b/source/manual/logic_nodes/input/keyboard/keyboard_key.rst index 6450dc76..f247068f 100644 --- a/source/manual/logic_nodes/input/keyboard/keyboard_key.rst +++ b/source/manual/logic_nodes/input/keyboard/keyboard_key.rst @@ -5,26 +5,26 @@ .. _ln-keyboard_key: -============= +============================== Keyboard Key -============= +============================== Detects if a specified key has been pressed. Parameters -++++++++++ +++++++++++++++++++++++++++++++ Input Type Input detection mode. Inputs -++++++ +++++++++++++++++++++++++++++++ Key The key to monitor; click & press a desired key. Outputs -+++++++ +++++++++++++++++++++++++++++++ If Pressed *True* if the key is active in the selected mode, else *False*. diff --git a/source/manual/logic_nodes/input/mouse/cursor_visibility.rst b/source/manual/logic_nodes/input/mouse/cursor_visibility.rst index 5bd112cc..e0eee252 100644 --- a/source/manual/logic_nodes/input/mouse/cursor_visibility.rst +++ b/source/manual/logic_nodes/input/mouse/cursor_visibility.rst @@ -5,27 +5,23 @@ .. _ln-cursor_visibility: -================= +============================== Cursor Visibility -================= +============================== -*Cursor Visibility* node is used to set the visibility status of the system mouse cursor. +Used to set the visibility status of the system mouse cursor. Inputs -++++++ +++++++++++++++++++++++++++++++ Condition - Input condition. + If connected, condition from connected node must be fulfilled for node to activate. Visible Target state for the system cursor. Outputs -+++++++ +++++++++++++++++++++++++++++++ Done *True* if the node performed successfully, else *False*. - -Example -+++++++ - diff --git a/source/manual/logic_nodes/input/mouse/index.rst b/source/manual/logic_nodes/input/mouse/index.rst index b5f2b536..a94b39a2 100644 --- a/source/manual/logic_nodes/input/mouse/index.rst +++ b/source/manual/logic_nodes/input/mouse/index.rst @@ -1,8 +1,8 @@ .. _ln-input-mouse-index: -===== +============================== Mouse -===== +============================== .. toctree:: :maxdepth: 1 diff --git a/source/manual/logic_nodes/input/mouse/mouse_button.rst b/source/manual/logic_nodes/input/mouse/mouse_button.rst index 3156a9a6..4917bc39 100644 --- a/source/manual/logic_nodes/input/mouse/mouse_button.rst +++ b/source/manual/logic_nodes/input/mouse/mouse_button.rst @@ -5,26 +5,26 @@ .. _ln-mouse_button: -============= +============================== Mouse Button -============= +============================== Detects mouse button activity. Parameters -++++++++++ +++++++++++++++++++++++++++++++ Input Type Input detection mode for mouse button. Inputs -++++++ +++++++++++++++++++++++++++++++ Button Which button to monitor. Outputs -+++++++ +++++++++++++++++++++++++++++++ If Pressed *True* if the corresponding button is pressed, else *False*. diff --git a/source/manual/logic_nodes/input/mouse/mouse_look.rst b/source/manual/logic_nodes/input/mouse/mouse_look.rst index a2ea0f12..dd9ba780 100644 --- a/source/manual/logic_nodes/input/mouse/mouse_look.rst +++ b/source/manual/logic_nodes/input/mouse/mouse_look.rst @@ -5,26 +5,26 @@ .. _ln-mouse_look: -============ +============================== Mouse Look -============ +============================== A quick way to make objects follow the mouse movement. It's possible to assign a *Body* and a *Head* object. If no *Head* object is assigned, the body will be used for both axis, but that is generally discouraged as it can lead to unwanted side effects. Parameters -++++++++++ +++++++++++++++++++++++++++++++ Front Look direction of the *Head* Object. If set to Y, the rotational axis will be X and vice versa. -Inputs -++++++ - Center Mouse todo +Inputs +++++++++++++++++++++++++++++++ + Condition If connected, condition must be fulfilled for node to activate. @@ -44,19 +44,19 @@ Cap Left/Right Limit the body objects rotation on its local Z axis. X Limits - The limits for the body objects local Z rotation (Vector2). Only shown if Cap Left / Right is selected. + The limits for the body objects local Z rotation (Vector2). Only shown if Cap Left/Right is selected. Cap Up/Down Limit the head object's rotation on its local X/Y axis. Y Limits - The limits for the head object's local X/Y rotaion (Vectpr2). Only shown if Cap Up / Down is selected. + The limits for the head object's local X/Y rotaion (Vectpr2). Only shown if Cap Up/Down is selected. Smoothing Use linear interpolation to slowly adapt the object transformation to mouse movement. Outputs -+++++++ +++++++++++++++++++++++++++++++ Done *True* if the node performed successfully, else *False*. diff --git a/source/manual/logic_nodes/input/mouse/mouse_moved.rst b/source/manual/logic_nodes/input/mouse/mouse_moved.rst index 0ae0ea76..aaee159c 100644 --- a/source/manual/logic_nodes/input/mouse/mouse_moved.rst +++ b/source/manual/logic_nodes/input/mouse/mouse_moved.rst @@ -5,20 +5,20 @@ .. _ln-mouse_moved: -=========== +============================== Mouse Moved -=========== +============================== Detects mouse movement. Parameters -++++++++++ +++++++++++++++++++++++++++++++ -Mode +Each Frame Boolean value to select between *Once* (unchecked) and *Each Frame* (checked) modes. Outputs -+++++++ +++++++++++++++++++++++++++++++ If Moved *True* if mouse movement is detected, else *False*. diff --git a/source/manual/logic_nodes/input/mouse/mouse_over.rst b/source/manual/logic_nodes/input/mouse/mouse_over.rst index 0f44f2ea..5a0d3c58 100644 --- a/source/manual/logic_nodes/input/mouse/mouse_over.rst +++ b/source/manual/logic_nodes/input/mouse/mouse_over.rst @@ -5,20 +5,20 @@ .. _ln-mouse_over: -=========== +============================== Mouse Over -=========== +============================== Matches the mouse position to an object on screen. Inputs -++++++ +++++++++++++++++++++++++++++++ Object Which object to monitor, if mouse cursor is over. Outputs -+++++++ +++++++++++++++++++++++++++++++ On Enter *True* on the first frame the mouse position matches the object bounds, else *False*. @@ -36,16 +36,18 @@ Normal Face normal of the targeted mesh face (Vector3). Example -+++++++ +++++++++++++++++++++++++++++++ .. figure:: /images/logic_nodes/input/mouse/ln-mouse_over-example_apply.png :align: center :width: 500 :alt: Mouse Over Node Apply -With Cube object selected, apply the Logic Tree (click :menuselection:`Apply To Selected` button). + Apply To Selected -Run the UPBGE from terminal (Linux & mac), or open the console (Windows). See :doc:`System Console ` if needed. +With Cube object selected, apply the logic tree (click :menuselection:`Apply To Selected` button). + +Run the UPBGE from terminal (Linux & mac), or open the console (Windows). See :ref:`lne-system_console` if needed. Make sure that in :menuselection:`Render > Game Debug > Mouse Cursor` is selected. @@ -54,11 +56,15 @@ Make sure that in :menuselection:`Render > Game Debug > Mouse Cursor` is selecte :width: 90% :alt: Mouse Over Node Terminal -Run the example, and move mouse cursor over the Cube which has *Logic Tree* applied to it. In system terminal/console, see printed results. + Terminal output + +Run the example, and move mouse cursor over the Cube which has *logic tree* applied to it. In system terminal/console, see printed results. .. figure:: /images/logic_nodes/input/mouse/ln-mouse_over-example_once.png :align: center :width: 500 - :alt: Mouse Over Node Terminal + :alt: Mouse Over Node Terminal Once + + Added Once node -Add `Once` node, run and observe different terminal output. Only once per *Mouse Over* is now system message printed. Uncheck ``Repeat`` and exactly once is message printed - on first *Mouse Over* event only. +Add :ln:`Once` node, run and observe different terminal output. Only once per *Mouse Over* is now system message printed. Uncheck ``Repeat`` and exactly once is message printed - on first *Mouse Over* event only. diff --git a/source/manual/logic_nodes/input/mouse/mouse_status.rst b/source/manual/logic_nodes/input/mouse/mouse_status.rst index d4f11d0c..e66b5a69 100644 --- a/source/manual/logic_nodes/input/mouse/mouse_status.rst +++ b/source/manual/logic_nodes/input/mouse/mouse_status.rst @@ -5,12 +5,12 @@ .. _ln-mouse_status: -============== +============================== Mouse Status -============== +============================== Outputs -+++++++ +++++++++++++++++++++++++++++++ Position todo diff --git a/source/manual/logic_nodes/input/mouse/set_cursor_position.rst b/source/manual/logic_nodes/input/mouse/set_cursor_position.rst index 2d2cf693..c229a0c4 100644 --- a/source/manual/logic_nodes/input/mouse/set_cursor_position.rst +++ b/source/manual/logic_nodes/input/mouse/set_cursor_position.rst @@ -5,14 +5,14 @@ .. _ln-set_cursor_position: -==================== +============================== Set Cursor Position -==================== +============================== Places the mouse cursor on corresponding coordinates between (0, 0) and (1, 1) on the screen. Inputs -++++++ +++++++++++++++++++++++++++++++ Condition Input condition. @@ -24,7 +24,7 @@ Screen Y Vertical cursor position between 0 and 1. Outputs -+++++++ +++++++++++++++++++++++++++++++ Done *True* if the node performed successfully, else *False*. diff --git a/source/manual/logic_nodes/input/vr/index.rst b/source/manual/logic_nodes/input/vr/index.rst index d61bc95f..fd0ff0a9 100644 --- a/source/manual/logic_nodes/input/vr/index.rst +++ b/source/manual/logic_nodes/input/vr/index.rst @@ -1,8 +1,8 @@ .. _ln-input-vr-index: -==== +============================== VR -==== +============================== .. toctree:: :maxdepth: 1 diff --git a/source/manual/logic_nodes/input/vr/vr_controller.rst b/source/manual/logic_nodes/input/vr/vr_controller.rst index fad7e62c..22af916c 100644 --- a/source/manual/logic_nodes/input/vr/vr_controller.rst +++ b/source/manual/logic_nodes/input/vr/vr_controller.rst @@ -5,20 +5,20 @@ .. _ln-vr_controller: -============== +============================== VR Controller -============== +============================== Retrieves the current position and orientation of the VR controller if there is a running VR session. Parameters -++++++++++ +++++++++++++++++++++++++++++++ Controller Use the left or the right hand controller. Outputs -+++++++ +++++++++++++++++++++++++++++++ Position World position of the controller. diff --git a/source/manual/logic_nodes/input/vr/vr_headset.rst b/source/manual/logic_nodes/input/vr/vr_headset.rst index 84ac146b..0bae996d 100644 --- a/source/manual/logic_nodes/input/vr/vr_headset.rst +++ b/source/manual/logic_nodes/input/vr/vr_headset.rst @@ -5,14 +5,14 @@ .. _ln-vr_headset: -=========== +============================== VR Headset -=========== +============================== Retrieves the current position and orientation of the VR headset if there is a running VR session. Outputs -+++++++ +++++++++++++++++++++++++++++++ Position World position of the headset. diff --git a/source/manual/logic_nodes/introduction.rst b/source/manual/logic_nodes/introduction.rst index 06a778dd..b872d82c 100644 --- a/source/manual/logic_nodes/introduction.rst +++ b/source/manual/logic_nodes/introduction.rst @@ -7,7 +7,8 @@ Introduction As an alternative to *Python scripts* and *Logic Bricks*, *Logic Nodes* provide an intuitive and versatile way to create game logic. Designed to support rapid prototyping, they enable artists and game designers to quickly test and even fully implement desired features. .. figure:: /images/logic_nodes/ln-4_key_template.png - :scale: 60% + :align: center + :figwidth: 90% 4-Key Template for Object/Player Movement @@ -38,5 +39,4 @@ Architecture Under the hood, Logic Nodes are actually generating *Python scripts* to be executed by the game engine. The generated component will have options for executing the tree *only at startup* and for executing the tree *only when a certain property is set*. Using this method will prevent you from accessing Logic Bricks directly, but you can still access them via *custom Python calls*. .. warning:: - Due to the way Logic Nodes *currently* work, they are the most performance-heavy way to create logic. diff --git a/source/manual/logic_nodes/lights/get_light_color.rst b/source/manual/logic_nodes/lights/get_light_color.rst index 1c6c7b6f..4df220ee 100644 --- a/source/manual/logic_nodes/lights/get_light_color.rst +++ b/source/manual/logic_nodes/lights/get_light_color.rst @@ -5,18 +5,18 @@ .. _ln-get_light_color: -=============== +============================== Get Light Color -=============== +============================== Inputs -++++++ +++++++++++++++++++++++++++++++ Light Object Which light to use. Outputs -+++++++ +++++++++++++++++++++++++++++++ Color Color of the light. diff --git a/source/manual/logic_nodes/lights/get_light_power.rst b/source/manual/logic_nodes/lights/get_light_power.rst index f8d013bd..61f379c2 100644 --- a/source/manual/logic_nodes/lights/get_light_power.rst +++ b/source/manual/logic_nodes/lights/get_light_power.rst @@ -5,18 +5,18 @@ .. _ln-get_light_power: -=============== +============================== Get Light Power -=============== +============================== Inputs -++++++ +++++++++++++++++++++++++++++++ Light Object Which light to use. Outputs -+++++++ +++++++++++++++++++++++++++++++ Power Resulting strength of the light. diff --git a/source/manual/logic_nodes/lights/index.rst b/source/manual/logic_nodes/lights/index.rst index dfdd7b34..13732945 100644 --- a/source/manual/logic_nodes/lights/index.rst +++ b/source/manual/logic_nodes/lights/index.rst @@ -1,8 +1,8 @@ .. _ln-lights-index: -====================== +============================== Lights -====================== +============================== .. toctree:: :maxdepth: 1 diff --git a/source/manual/logic_nodes/lights/make_light_unique.rst b/source/manual/logic_nodes/lights/make_light_unique.rst index 3ed37adc..bec6beaf 100644 --- a/source/manual/logic_nodes/lights/make_light_unique.rst +++ b/source/manual/logic_nodes/lights/make_light_unique.rst @@ -5,12 +5,12 @@ .. _ln-make_light_unique: -================= +============================== Make Light Unique -================= +============================== Inputs -++++++ +++++++++++++++++++++++++++++++ Condition Which condition will be used for node to activate. @@ -19,7 +19,7 @@ Light Object Which light to use. Outputs -+++++++ +++++++++++++++++++++++++++++++ Done *True* if node performed successfully, else *False*. diff --git a/source/manual/logic_nodes/lights/set_light_color.rst b/source/manual/logic_nodes/lights/set_light_color.rst index 5c725c25..a0fdf293 100644 --- a/source/manual/logic_nodes/lights/set_light_color.rst +++ b/source/manual/logic_nodes/lights/set_light_color.rst @@ -5,12 +5,12 @@ .. _ln-set_light_color: -=============== +============================== Set Light Color -=============== +============================== Inputs -++++++ +++++++++++++++++++++++++++++++ Condition If connected, condition must be fulfilled for node to activate. @@ -22,7 +22,7 @@ Color Which color to assign to light. Outputs -+++++++ +++++++++++++++++++++++++++++++ Done *True* if node performed successfully, else *False*. diff --git a/source/manual/logic_nodes/lights/set_light_power.rst b/source/manual/logic_nodes/lights/set_light_power.rst index 1bfc2156..e2cee871 100644 --- a/source/manual/logic_nodes/lights/set_light_power.rst +++ b/source/manual/logic_nodes/lights/set_light_power.rst @@ -5,12 +5,12 @@ .. _ln-set_light_power: -=============== +============================== Set Light Power -=============== +============================== Inputs -++++++ +++++++++++++++++++++++++++++++ Condition If connected, condition must be fulfilled for node to activate. @@ -22,7 +22,7 @@ Power The strength of the light. Can be negative. Outputs -+++++++ +++++++++++++++++++++++++++++++ Done *True* if node performed successfully, else *False*. diff --git a/source/manual/logic_nodes/lights/set_light_shadow.rst b/source/manual/logic_nodes/lights/set_light_shadow.rst index dfee8e4d..f877e352 100644 --- a/source/manual/logic_nodes/lights/set_light_shadow.rst +++ b/source/manual/logic_nodes/lights/set_light_shadow.rst @@ -5,12 +5,12 @@ .. _ln-set_light_shadow: -================= +============================== Set Light Shadow -================= +============================== Inputs -++++++ +++++++++++++++++++++++++++++++ Condition If connected, condition must be fulfilled for node to activate. @@ -22,7 +22,7 @@ Use Shadow If checked, light will produce shadows. Accepts Boolean result from connected node. Outputs -+++++++ +++++++++++++++++++++++++++++++ Done *True* if node performed successfully, else *False*. diff --git a/source/manual/logic_nodes/logic/branch.rst b/source/manual/logic_nodes/logic/branch.rst index c5fed031..e6a06f2f 100644 --- a/source/manual/logic_nodes/logic/branch.rst +++ b/source/manual/logic_nodes/logic/branch.rst @@ -5,18 +5,18 @@ .. _ln-branch: -====================== +============================== Branch -====================== +============================== Inputs -++++++ +++++++++++++++++++++++++++++++ Condition If connected, condition must be fulfilled for node to activate. Outputs -+++++++ +++++++++++++++++++++++++++++++ True True output. diff --git a/source/manual/logic_nodes/logic/bricks/controller_status.rst b/source/manual/logic_nodes/logic/bricks/controller_status.rst index dfb32075..761f6bd2 100644 --- a/source/manual/logic_nodes/logic/bricks/controller_status.rst +++ b/source/manual/logic_nodes/logic/bricks/controller_status.rst @@ -5,12 +5,12 @@ .. _ln-controller_status: -====================== +============================== Controller Status -====================== +============================== Inputs -++++++ +++++++++++++++++++++++++++++++ Object Which *Object* to inspect. @@ -19,7 +19,7 @@ Controller Which *Controller* to inspect. Outputs -+++++++ +++++++++++++++++++++++++++++++ Status Resulting status of the controller. diff --git a/source/manual/logic_nodes/logic/bricks/get_actuator_value.rst b/source/manual/logic_nodes/logic/bricks/get_actuator_value.rst index 16cbc096..07685fd7 100644 --- a/source/manual/logic_nodes/logic/bricks/get_actuator_value.rst +++ b/source/manual/logic_nodes/logic/bricks/get_actuator_value.rst @@ -5,12 +5,12 @@ .. _ln-get_actuator_value: -====================== +============================== Get Actuator Value -====================== +============================== Inputs -++++++ +++++++++++++++++++++++++++++++ Object Which object to inspect. @@ -22,7 +22,7 @@ Field Which field to inspect. Outputs -+++++++ +++++++++++++++++++++++++++++++ Value Resulting actuator value. diff --git a/source/manual/logic_nodes/logic/bricks/get_sensor_value.rst b/source/manual/logic_nodes/logic/bricks/get_sensor_value.rst index a3d79396..75f762e1 100644 --- a/source/manual/logic_nodes/logic/bricks/get_sensor_value.rst +++ b/source/manual/logic_nodes/logic/bricks/get_sensor_value.rst @@ -5,12 +5,12 @@ .. _ln-get_sensor_value: -====================== +============================== Get Sensor Value -====================== +============================== Inputs -++++++ +++++++++++++++++++++++++++++++ Object Which object to inspect. @@ -22,7 +22,7 @@ Field todo Outputs -+++++++ +++++++++++++++++++++++++++++++ Value Resulting sensor value. diff --git a/source/manual/logic_nodes/logic/bricks/index.rst b/source/manual/logic_nodes/logic/bricks/index.rst index 6510e573..0bc09863 100644 --- a/source/manual/logic_nodes/logic/bricks/index.rst +++ b/source/manual/logic_nodes/logic/bricks/index.rst @@ -1,8 +1,8 @@ .. _ln-logic-bricks-index: -====================== +============================== Bricks -====================== +============================== .. toctree:: :maxdepth: 1 diff --git a/source/manual/logic_nodes/logic/bricks/sensor_positive.rst b/source/manual/logic_nodes/logic/bricks/sensor_positive.rst index dd2e02f4..ebb0d550 100644 --- a/source/manual/logic_nodes/logic/bricks/sensor_positive.rst +++ b/source/manual/logic_nodes/logic/bricks/sensor_positive.rst @@ -5,12 +5,12 @@ .. _ln-sensor_positive: -====================== +============================== Sensor Positive -====================== +============================== Inputs -++++++ +++++++++++++++++++++++++++++++ Object Which object to inspect. @@ -19,7 +19,7 @@ Sensor Which sensor to inspect. Outputs -+++++++ +++++++++++++++++++++++++++++++ Positive todo diff --git a/source/manual/logic_nodes/logic/bricks/set_actuator_value.rst b/source/manual/logic_nodes/logic/bricks/set_actuator_value.rst index 487ee8b2..f6c475ea 100644 --- a/source/manual/logic_nodes/logic/bricks/set_actuator_value.rst +++ b/source/manual/logic_nodes/logic/bricks/set_actuator_value.rst @@ -5,12 +5,12 @@ .. _ln-set_actuator_value: -====================== +============================== Set Actuator Value -====================== +============================== Inputs -++++++ +++++++++++++++++++++++++++++++ Condition If connected, condition must be fulfilled for node to activate. @@ -28,7 +28,7 @@ Type Selected type and value to set. Outputs -+++++++ +++++++++++++++++++++++++++++++ Done *True* if node performed successfully, else *False*. diff --git a/source/manual/logic_nodes/logic/bricks/set_sensor_value.rst b/source/manual/logic_nodes/logic/bricks/set_sensor_value.rst index a0246e94..e33da792 100644 --- a/source/manual/logic_nodes/logic/bricks/set_sensor_value.rst +++ b/source/manual/logic_nodes/logic/bricks/set_sensor_value.rst @@ -5,12 +5,12 @@ .. _ln-set_sensor_value: -====================== +============================== Set Sensor Value -====================== +============================== Inputs -++++++ +++++++++++++++++++++++++++++++ Condition If connected, condition must be fulfilled for node to activate. @@ -28,7 +28,7 @@ Type Selected type and value to set. Outputs -+++++++ +++++++++++++++++++++++++++++++ Done *True* if node performed successfully, else *False*. diff --git a/source/manual/logic_nodes/logic/gate.rst b/source/manual/logic_nodes/logic/gate.rst index ab655ffc..fcc21b9d 100644 --- a/source/manual/logic_nodes/logic/gate.rst +++ b/source/manual/logic_nodes/logic/gate.rst @@ -5,18 +5,18 @@ .. _ln-gate: -====================== +============================== Gate -====================== +============================== Parameters -++++++++++ +++++++++++++++++++++++++++++++ Gate Type Selected gate type. Inputs -++++++ +++++++++++++++++++++++++++++++ Condition A Input A value. @@ -25,7 +25,7 @@ Condition B Input B value. Outputs -+++++++ +++++++++++++++++++++++++++++++ Result Resulting gate operation between A and B. diff --git a/source/manual/logic_nodes/logic/gate_list.rst b/source/manual/logic_nodes/logic/gate_list.rst index 83d0a13e..d92e40d9 100644 --- a/source/manual/logic_nodes/logic/gate_list.rst +++ b/source/manual/logic_nodes/logic/gate_list.rst @@ -5,12 +5,12 @@ .. _ln-gate_list: -====================== +============================== Gate List -====================== +============================== Parameters -++++++++++ +++++++++++++++++++++++++++++++ Add Socket Add a socket to list. @@ -19,7 +19,7 @@ Gate Type Selected gate type. Inputs -++++++ +++++++++++++++++++++++++++++++ Condition First condition. @@ -28,7 +28,7 @@ Condition Second condition. Outputs -+++++++ +++++++++++++++++++++++++++++++ Result Resulting value from gate operation. diff --git a/source/manual/logic_nodes/logic/index.rst b/source/manual/logic_nodes/logic/index.rst index ca18375c..2c1218d3 100644 --- a/source/manual/logic_nodes/logic/index.rst +++ b/source/manual/logic_nodes/logic/index.rst @@ -1,8 +1,8 @@ .. _ln-logic-index: -====================== +============================== Logic -====================== +============================== .. toctree:: :maxdepth: 1 diff --git a/source/manual/logic_nodes/logic/is_none.rst b/source/manual/logic_nodes/logic/is_none.rst index 14e11d28..f8da7e9c 100644 --- a/source/manual/logic_nodes/logic/is_none.rst +++ b/source/manual/logic_nodes/logic/is_none.rst @@ -5,18 +5,18 @@ .. _ln-is_none: -====================== +============================== Is None -====================== +============================== Inputs -++++++ +++++++++++++++++++++++++++++++ Value Value to inspect. Outputs -+++++++ +++++++++++++++++++++++++++++++ If None *True* if value is none. diff --git a/source/manual/logic_nodes/logic/not_none.rst b/source/manual/logic_nodes/logic/not_none.rst index e97848b9..29b450e8 100644 --- a/source/manual/logic_nodes/logic/not_none.rst +++ b/source/manual/logic_nodes/logic/not_none.rst @@ -5,18 +5,18 @@ .. _ln-not_none: -====================== +============================== Not None -====================== +============================== Inputs -++++++ +++++++++++++++++++++++++++++++ Value Value to inspect. Outputs -+++++++ +++++++++++++++++++++++++++++++ If Not None *True* if value is not none. diff --git a/source/manual/logic_nodes/logic/trees/add_logic_tree_to_object.rst b/source/manual/logic_nodes/logic/trees/add_logic_tree_to_object.rst index 26eb9fb1..b95032c6 100644 --- a/source/manual/logic_nodes/logic/trees/add_logic_tree_to_object.rst +++ b/source/manual/logic_nodes/logic/trees/add_logic_tree_to_object.rst @@ -5,12 +5,12 @@ .. _ln-add_logic_tree_to_object: -========================= +============================== Add Logic Tree To Object -========================= +============================== Inputs -++++++ +++++++++++++++++++++++++++++++ Condition If connected, condition from attached node must be fulfilled for node to activate. @@ -25,7 +25,7 @@ Initialize todo Outputs -+++++++ +++++++++++++++++++++++++++++++ Done *True* if node performed successfully, else *False*. diff --git a/source/manual/logic_nodes/logic/trees/index.rst b/source/manual/logic_nodes/logic/trees/index.rst index 2352290f..8378190c 100644 --- a/source/manual/logic_nodes/logic/trees/index.rst +++ b/source/manual/logic_nodes/logic/trees/index.rst @@ -1,8 +1,8 @@ .. _ln-logic-trees-index: -====================== +============================== Trees -====================== +============================== .. toctree:: :maxdepth: 1 diff --git a/source/manual/logic_nodes/logic/trees/logic_tree_status.rst b/source/manual/logic_nodes/logic/trees/logic_tree_status.rst index 131e0adc..dfe74b4d 100644 --- a/source/manual/logic_nodes/logic/trees/logic_tree_status.rst +++ b/source/manual/logic_nodes/logic/trees/logic_tree_status.rst @@ -5,12 +5,12 @@ .. _ln-logic_tree_status: -========================= +============================== Logic Tree Status -========================= +============================== Inputs -++++++ +++++++++++++++++++++++++++++++ Target Which object to inspect. @@ -19,7 +19,7 @@ Node Tree Which *Node Tree* todo. Outputs -+++++++ +++++++++++++++++++++++++++++++ Running todo diff --git a/source/manual/logic_nodes/logic/trees/run_logic_tree.rst b/source/manual/logic_nodes/logic/trees/run_logic_tree.rst index 0dda8d8a..650c246b 100644 --- a/source/manual/logic_nodes/logic/trees/run_logic_tree.rst +++ b/source/manual/logic_nodes/logic/trees/run_logic_tree.rst @@ -5,12 +5,12 @@ .. _ln-run_logic_tree: -====================== +============================== Run Logic Tree -====================== +============================== Inputs -++++++ +++++++++++++++++++++++++++++++ Condition If connected, condition from attached node must be fulfilled for node to activate. If checked, always *True*, else *False*. @@ -22,7 +22,7 @@ Node Tree Which *Node Tree* to run. Outputs -+++++++ +++++++++++++++++++++++++++++++ Done *True* if node performed successfully, else *False*. diff --git a/source/manual/logic_nodes/logic/trees/start_logic_tree.rst b/source/manual/logic_nodes/logic/trees/start_logic_tree.rst index 15176671..17a28eef 100644 --- a/source/manual/logic_nodes/logic/trees/start_logic_tree.rst +++ b/source/manual/logic_nodes/logic/trees/start_logic_tree.rst @@ -5,12 +5,12 @@ .. _ln-start_logic_tree: -====================== +============================== Start Logic Tree -====================== +============================== Inputs -++++++ +++++++++++++++++++++++++++++++ Condition If connected, condition must be fulfilled for node to activate. @@ -22,7 +22,7 @@ Node Tree Which *Node Tree* to apply to the object. Outputs -+++++++ +++++++++++++++++++++++++++++++ Done *True* if node performed successfully, else *False*. diff --git a/source/manual/logic_nodes/logic/trees/stop_logic_tree.rst b/source/manual/logic_nodes/logic/trees/stop_logic_tree.rst index 43f3f9f8..6c36dd64 100644 --- a/source/manual/logic_nodes/logic/trees/stop_logic_tree.rst +++ b/source/manual/logic_nodes/logic/trees/stop_logic_tree.rst @@ -5,12 +5,12 @@ .. _ln-stop_logic_tree: -====================== +============================== Stop Logic Tree -====================== +============================== Inputs -++++++ +++++++++++++++++++++++++++++++ Condition If connected, condition must be fulfilled for node to activate. @@ -22,7 +22,7 @@ Node Tree Which *Node Tree* to apply to stop. Outputs -+++++++ +++++++++++++++++++++++++++++++ Done *True* if node performed successfully, else *False*. diff --git a/source/manual/logic_nodes/math/absolute.rst b/source/manual/logic_nodes/math/absolute.rst index b82fab84..540add89 100644 --- a/source/manual/logic_nodes/math/absolute.rst +++ b/source/manual/logic_nodes/math/absolute.rst @@ -5,18 +5,18 @@ .. _ln-absolute: -====================== +============================== Absolute -====================== +============================== Inputs -++++++ +++++++++++++++++++++++++++++++ Value A value to perform absolute operation on. Outputs -+++++++ +++++++++++++++++++++++++++++++ Value Resulting absolute value. diff --git a/source/manual/logic_nodes/math/clamp.rst b/source/manual/logic_nodes/math/clamp.rst index 994e61f0..89fa1f83 100644 --- a/source/manual/logic_nodes/math/clamp.rst +++ b/source/manual/logic_nodes/math/clamp.rst @@ -5,12 +5,14 @@ .. _ln-clamp: -====================== +============================== Clamp -====================== +============================== + +Will clamp *Value* between *Min* and *Max* values. Inputs -++++++ +++++++++++++++++++++++++++++++ Value Value to clamp. @@ -22,7 +24,7 @@ Max Maximum value to clamp to. Outputs -+++++++ +++++++++++++++++++++++++++++++ Value Resulting clamped value. diff --git a/source/manual/logic_nodes/math/compare.rst b/source/manual/logic_nodes/math/compare.rst index 0c30aa71..744210f2 100644 --- a/source/manual/logic_nodes/math/compare.rst +++ b/source/manual/logic_nodes/math/compare.rst @@ -5,18 +5,20 @@ .. _ln-compare: -====================== +============================== Compare -====================== +============================== + +Will compare two float values, according to selected standard mathematical/programming *Operator*. Parameters -++++++++++ +++++++++++++++++++++++++++++++ Operator Selected operator for comparing. Inputs -++++++ +++++++++++++++++++++++++++++++ Type First type and value to use for comparing. @@ -25,7 +27,7 @@ Type Second type and value to use for comparing. Outputs -+++++++ +++++++++++++++++++++++++++++++ Result Resulting boolean value of comparison. todo diff --git a/source/manual/logic_nodes/math/curve_interpolation.rst b/source/manual/logic_nodes/math/curve_interpolation.rst new file mode 100644 index 00000000..11535329 --- /dev/null +++ b/source/manual/logic_nodes/math/curve_interpolation.rst @@ -0,0 +1,39 @@ +.. figure:: /images/logic_nodes/math/ln-curve_interpolation.png + :align: right + :width: 275 + :alt: Curve Interpolation Node + +.. _ln-curve_interpolation: + +============================== +Curve Interpolation +============================== + +Curve node enables advanced value manipulation, via curve points: + +Add Point + :kbd:`LMB` on curve. + +Delete Point + :kbd:`LMB`-select a point, below the graph is a row with point settings - click :menuselection:`X` to delete. + +Change Point Location + :kbd:`LMB`-drag the point to desired location on graph. + +Point Settings + In a row below the graph, click-select icon to change handle type, or change position values (X Y coordinates) for *selected point*. + +Graph Options + Above the graph are option icons - zoom in/out, use *Clipping* (will clamp output values between 0 and 1), use dropdown menu to *Reset View*, *Reset Curve* etc. + +Inputs +++++++++++++++++++++++++++++++ + +Value + Input float value for curve interpolation. + +Outputs +++++++++++++++++++++++++++++++ + +Value + Resulting interpolated value. diff --git a/source/manual/logic_nodes/math/formula.rst b/source/manual/logic_nodes/math/formula.rst index 2538780f..448bdf85 100644 --- a/source/manual/logic_nodes/math/formula.rst +++ b/source/manual/logic_nodes/math/formula.rst @@ -5,21 +5,23 @@ .. _ln-formula: -====================== +============================== Formula -====================== +============================== + +Will perform mathemathical calculations, according to *Formula* input. There are numerous predefined mathemathical formulas to choose from dropdown menu. Enjoy. :) Parameters -++++++++++ +++++++++++++++++++++++++++++++ Predef. - Pre-defined mathematical formulas for calculations. + Predefined mathematical formulas for calculations. Includes *User Defined* option. Formula - String representation of math formula for calculation. + String representation of mathematical formula for calculation. Inputs -++++++ +++++++++++++++++++++++++++++++ a First operator value. @@ -28,7 +30,7 @@ b Second operator value. Outputs -+++++++ +++++++++++++++++++++++++++++++ Result Resulting value of math operation. diff --git a/source/manual/logic_nodes/math/index.rst b/source/manual/logic_nodes/math/index.rst index 8cc518ab..481784a6 100644 --- a/source/manual/logic_nodes/math/index.rst +++ b/source/manual/logic_nodes/math/index.rst @@ -1,8 +1,8 @@ .. _ln-math-index: -====================== +============================== Math -====================== +============================== .. toctree:: :maxdepth: 1 @@ -11,6 +11,8 @@ Math vector_math vectors/index interpolate + curve_interpolation + tween_value absolute clamp compare diff --git a/source/manual/logic_nodes/math/interpolate.rst b/source/manual/logic_nodes/math/interpolate.rst index 94a073e4..2d2fb277 100644 --- a/source/manual/logic_nodes/math/interpolate.rst +++ b/source/manual/logic_nodes/math/interpolate.rst @@ -5,12 +5,12 @@ .. _ln-interpolate: -====================== +============================== Interpolate -====================== +============================== Inputs -++++++ +++++++++++++++++++++++++++++++ From Interpolate from which value. @@ -22,7 +22,7 @@ Factor Interpolation factor. todo Outputs -+++++++ +++++++++++++++++++++++++++++++ Value Resulting interpolated value. diff --git a/source/manual/logic_nodes/math/limit_range.rst b/source/manual/logic_nodes/math/limit_range.rst index f868d5d7..9f037553 100644 --- a/source/manual/logic_nodes/math/limit_range.rst +++ b/source/manual/logic_nodes/math/limit_range.rst @@ -5,18 +5,18 @@ .. _ln-limit_range: -====================== +============================== Limit Range -====================== +============================== Parameters -++++++++++ +++++++++++++++++++++++++++++++ Operator Selected operator for range limit. Inputs -++++++ +++++++++++++++++++++++++++++++ Value A value to compare. @@ -28,7 +28,7 @@ Max Maximum value to compare against. Outputs -+++++++ +++++++++++++++++++++++++++++++ Value Resulting value within limited range. diff --git a/source/manual/logic_nodes/math/map_range.rst b/source/manual/logic_nodes/math/map_range.rst index 427b233f..05a41ee2 100644 --- a/source/manual/logic_nodes/math/map_range.rst +++ b/source/manual/logic_nodes/math/map_range.rst @@ -5,22 +5,22 @@ .. _ln-map_range: -====================== +============================== Map Range -====================== +============================== Parameters -++++++++++ +++++++++++++++++++++++++++++++ Mode Selected mode of operation. -Inputs -++++++ - Clamp Clamp values between 0 and 1. todo +Inputs +++++++++++++++++++++++++++++++ + Value *Map Range* value. @@ -37,7 +37,7 @@ To Max todo Outputs -+++++++ +++++++++++++++++++++++++++++++ Result Resulting value from ranging operation. diff --git a/source/manual/logic_nodes/math/math.rst b/source/manual/logic_nodes/math/math.rst index 9eee8008..b4e997b6 100644 --- a/source/manual/logic_nodes/math/math.rst +++ b/source/manual/logic_nodes/math/math.rst @@ -5,18 +5,18 @@ .. _ln-math: -====================== +============================== Math -====================== +============================== Parameters -++++++++++ +++++++++++++++++++++++++++++++ Operation Selected mathematical operation. Inputs -++++++ +++++++++++++++++++++++++++++++ A Input A value. @@ -25,7 +25,17 @@ B Input B value. Outputs -+++++++ +++++++++++++++++++++++++++++++ Result Resulting value from math operation. + +Example +++++++++++++++++++++++++++++++ + +.. figure:: /images/logic_nodes/math/ln-math-example.png + :align: center + :figwidth: 100% + :alt: Math Node + + Math nodes making sure that pressing the keyboard keys is fun diff --git a/source/manual/logic_nodes/math/ranged_treshold.rst b/source/manual/logic_nodes/math/ranged_treshold.rst index 05d7cb64..4ee31d1c 100644 --- a/source/manual/logic_nodes/math/ranged_treshold.rst +++ b/source/manual/logic_nodes/math/ranged_treshold.rst @@ -5,18 +5,18 @@ .. _ln-ranged_treshold: -====================== +============================== Ranged Treshold -====================== +============================== Parameters -++++++++++ +++++++++++++++++++++++++++++++ Mode Selected mode for operation. Inputs -++++++ +++++++++++++++++++++++++++++++ Value Value to compare. @@ -28,7 +28,7 @@ Max Maximum value to compare against. Outputs -+++++++ +++++++++++++++++++++++++++++++ Value Resulting value. diff --git a/source/manual/logic_nodes/math/treshold.rst b/source/manual/logic_nodes/math/treshold.rst index efe5217a..559b0d8e 100644 --- a/source/manual/logic_nodes/math/treshold.rst +++ b/source/manual/logic_nodes/math/treshold.rst @@ -5,18 +5,18 @@ .. _ln-treshold: -====================== +============================== Treshold -====================== +============================== Parameters -++++++++++ +++++++++++++++++++++++++++++++ Operation Selected treshold operation. Inputs -++++++ +++++++++++++++++++++++++++++++ Else 0 todo @@ -28,7 +28,7 @@ Treshold Value to compare against. Outputs -+++++++ +++++++++++++++++++++++++++++++ Value Resulting value of treshold operation. diff --git a/source/manual/logic_nodes/math/tween_value.rst b/source/manual/logic_nodes/math/tween_value.rst new file mode 100644 index 00000000..870e7f67 --- /dev/null +++ b/source/manual/logic_nodes/math/tween_value.rst @@ -0,0 +1,64 @@ +.. figure:: /images/logic_nodes/math/ln-tween_value.png + :align: right + :width: 245 + :alt: Tween Value Node + +.. _ln-tween_value: + +============================== +Tween Value +============================== + +Add Point + :kbd:`LMB` on curve. + +Delete Point + :kbd:`LMB`-select a point, below the graph is a row with point settings - click :menuselection:`X` to delete. + +Change Point Location + :kbd:`LMB`-drag the point to desired location on graph. + +Point Settings + In a row below the graph, click-select icon to change handle type, or change its position values (X Y coordinates). + +Graph Options + Above the graph are option icons - zoom in/out, use *Clipping* (will clamp output values between 0 and 1), use dropdown menu to *Reset View*, *Reset Curve* etc. + +Parameters +++++++++++++++++++++++++++++++ + +Type + A value type to process. + +On Demand + todo + +Inputs +++++++++++++++++++++++++++++++ + +Forward + todo + +Back + todo + +From + Starting tween value. todo + +To + Ending tween value. todo + +Duration + Duration of tween. todo + +Outputs +++++++++++++++++++++++++++++++ + +Done + *True* if node performed successfully, else *False*. + +Result + Resulting tween value. todo + +Factor + todo diff --git a/source/manual/logic_nodes/math/vector_math.rst b/source/manual/logic_nodes/math/vector_math.rst index ca438457..890ce935 100644 --- a/source/manual/logic_nodes/math/vector_math.rst +++ b/source/manual/logic_nodes/math/vector_math.rst @@ -5,27 +5,39 @@ .. _ln-vector_math: -====================== +============================== Vector Math -====================== +============================== Parameters -++++++++++ +++++++++++++++++++++++++++++++ Operation Mode of vector math to perform. + I.e. *Multiply* takes 2 vectors (blue-ish input dot), *Scale* takes a vector and a float (gray input dot). *Normalize* only exposes 1 input socket, and will normalize input values between 0 to 1. + Inputs -++++++ +++++++++++++++++++++++++++++++ Vector 1 Vector3 values. Vector 2 - Vextor3 values. + Vector3 values. Outputs -+++++++ +++++++++++++++++++++++++++++++ Result Result of vector math operation. + +Example +++++++++++++++++++++++++++++++ + +.. figure:: /images/logic_nodes/math/ln-vector_math-example.png + :align: center + :figwidth: 80% + :alt: Vector Math Node + + Vector Math nodes in Normalize and Scale mode diff --git a/source/manual/logic_nodes/math/vectors/absolute_vector.rst b/source/manual/logic_nodes/math/vectors/absolute_vector.rst index 58c54a41..f7eb50b2 100644 --- a/source/manual/logic_nodes/math/vectors/absolute_vector.rst +++ b/source/manual/logic_nodes/math/vectors/absolute_vector.rst @@ -5,18 +5,18 @@ .. _ln-absolute_vector: -====================== +============================== Absolute Vector -====================== +============================== Inputs -++++++ +++++++++++++++++++++++++++++++ Vector Input vector values. Outputs -+++++++ +++++++++++++++++++++++++++++++ Vector Resulting absolute vector values. diff --git a/source/manual/logic_nodes/math/vectors/check_angle.rst b/source/manual/logic_nodes/math/vectors/check_angle.rst index 0b004db7..7413a0a8 100644 --- a/source/manual/logic_nodes/math/vectors/check_angle.rst +++ b/source/manual/logic_nodes/math/vectors/check_angle.rst @@ -5,18 +5,18 @@ .. _ln-check_angle: -====================== +============================== Check Angle -====================== +============================== Parameters -++++++++++ +++++++++++++++++++++++++++++++ Operation Which operation to use at checking. Inputs -++++++ +++++++++++++++++++++++++++++++ Vector 1 First vector to use for operation. @@ -28,7 +28,7 @@ Value todo Outputs -+++++++ +++++++++++++++++++++++++++++++ If True todo diff --git a/source/manual/logic_nodes/math/vectors/index.rst b/source/manual/logic_nodes/math/vectors/index.rst index 709d97b1..fedb8fcd 100644 --- a/source/manual/logic_nodes/math/vectors/index.rst +++ b/source/manual/logic_nodes/math/vectors/index.rst @@ -1,8 +1,8 @@ .. _ln-math-vectors-index: -====================== +============================== Vectors -====================== +============================== .. toctree:: :maxdepth: 1 diff --git a/source/manual/logic_nodes/math/vectors/matrix_to_xyz.rst b/source/manual/logic_nodes/math/vectors/matrix_to_xyz.rst index 9d7c2a4f..99b90042 100644 --- a/source/manual/logic_nodes/math/vectors/matrix_to_xyz.rst +++ b/source/manual/logic_nodes/math/vectors/matrix_to_xyz.rst @@ -5,24 +5,24 @@ .. _ln-matrix_to_xyz: -====================== +============================== Matrix To XYZ -====================== +============================== Parameters -++++++++++ +++++++++++++++++++++++++++++++ XYZ Type Selected type for operation. Inputs -++++++ +++++++++++++++++++++++++++++++ Dimensions Selected matrix dimension for operation. Outputs -+++++++ +++++++++++++++++++++++++++++++ Vector Resulting XYZ vector. diff --git a/source/manual/logic_nodes/math/vectors/vector_rotate.rst b/source/manual/logic_nodes/math/vectors/vector_rotate.rst index e89080ae..7524c4d9 100644 --- a/source/manual/logic_nodes/math/vectors/vector_rotate.rst +++ b/source/manual/logic_nodes/math/vectors/vector_rotate.rst @@ -5,18 +5,18 @@ .. _ln-vector_rotate: -====================== +============================== Vector Rotate -====================== +============================== Parameters -++++++++++ +++++++++++++++++++++++++++++++ Mode Selected mode for rotation. Inputs -++++++ +++++++++++++++++++++++++++++++ Origin Vector values of origin point. @@ -28,7 +28,7 @@ Angle Rotation value. Outputs -+++++++ +++++++++++++++++++++++++++++++ Point todo diff --git a/source/manual/logic_nodes/math/vectors/xyz_to_matrix.rst b/source/manual/logic_nodes/math/vectors/xyz_to_matrix.rst index 36c1ea11..4a828aa0 100644 --- a/source/manual/logic_nodes/math/vectors/xyz_to_matrix.rst +++ b/source/manual/logic_nodes/math/vectors/xyz_to_matrix.rst @@ -5,18 +5,18 @@ .. _ln-xyz_to_matrix: -====================== +============================== XYZ To Matrix -====================== +============================== Inputs -++++++ +++++++++++++++++++++++++++++++ XYZ Vector3 values to convert. Outputs -+++++++ +++++++++++++++++++++++++++++++ Matrix Resulting matrix values. diff --git a/source/manual/logic_nodes/math/within_range.rst b/source/manual/logic_nodes/math/within_range.rst index 7508a1c2..b7c9d839 100644 --- a/source/manual/logic_nodes/math/within_range.rst +++ b/source/manual/logic_nodes/math/within_range.rst @@ -5,18 +5,18 @@ .. _ln-within_range: -====================== +============================== Within Range -====================== +============================== Parameters -++++++++++ +++++++++++++++++++++++++++++++ Mode Selected mode of operation. Inputs -++++++ +++++++++++++++++++++++++++++++ Value Value to compare. @@ -28,7 +28,7 @@ Max Maximum value to compare against. Outputs -+++++++ +++++++++++++++++++++++++++++++ If True If value is within range. todo diff --git a/source/manual/logic_nodes/network/index.rst b/source/manual/logic_nodes/network/index.rst index 5f2fb79e..f99c932c 100644 --- a/source/manual/logic_nodes/network/index.rst +++ b/source/manual/logic_nodes/network/index.rst @@ -1,8 +1,8 @@ .. _ln-network-index: -======== +============================== Network -======== +============================== .. toctree:: :maxdepth: 1 diff --git a/source/manual/logic_nodes/network/lan_client.rst b/source/manual/logic_nodes/network/lan_client.rst index d206c2f8..7daf0bdf 100644 --- a/source/manual/logic_nodes/network/lan_client.rst +++ b/source/manual/logic_nodes/network/lan_client.rst @@ -5,15 +5,18 @@ .. _ln-lan_client: -================= +============================== LAN Client -================= +============================== -Inputs -+++++++ +Parameters +++++++++++++++++++++++++++++++ On Startup - Connect to specified web address at game start. todo + Connect to specified web address at game start. + +Inputs +++++++++++++++++++++++++++++++ Connect Condition to be fulfilled for node to activate. todo @@ -28,7 +31,7 @@ Disconnect If *Stop* condition is received, connection is cut. Outputs -+++++++ +++++++++++++++++++++++++++++++ On Connect Connection established signal is emitted. todo diff --git a/source/manual/logic_nodes/network/lan_server.rst b/source/manual/logic_nodes/network/lan_server.rst index 2e617ab2..32f64837 100644 --- a/source/manual/logic_nodes/network/lan_server.rst +++ b/source/manual/logic_nodes/network/lan_server.rst @@ -5,16 +5,19 @@ .. _ln-lan_server: -================= +============================== LAN Server -================= +============================== -Inputs -+++++++ +Parameters +++++++++++++++++++++++++++++++ On Startup Connect to specified web address at game start. +Inputs +++++++++++++++++++++++++++++++ + Start Condition to be fulfilled for node to activate. @@ -28,7 +31,7 @@ Stop If *Stop* condition is received, connection is cut. Outputs -+++++++ +++++++++++++++++++++++++++++++ On Start Connection established signal is emitted. todo diff --git a/source/manual/logic_nodes/network/rebuild_data.rst b/source/manual/logic_nodes/network/rebuild_data.rst index dfeea0b6..d92ff6b5 100644 --- a/source/manual/logic_nodes/network/rebuild_data.rst +++ b/source/manual/logic_nodes/network/rebuild_data.rst @@ -5,24 +5,24 @@ .. _ln-rebuild_data: -================= +============================== Rebuild Data -================= +============================== Parameters -++++++++++ +++++++++++++++++++++++++++++++ Read As Selected todo. Inputs -+++++++ +++++++++++++++++++++++++++++++ Data todo Outputs -+++++++ +++++++++++++++++++++++++++++++ Data Resulting data . todo diff --git a/source/manual/logic_nodes/network/send_data.rst b/source/manual/logic_nodes/network/send_data.rst index a312c984..94ded6d8 100644 --- a/source/manual/logic_nodes/network/send_data.rst +++ b/source/manual/logic_nodes/network/send_data.rst @@ -5,12 +5,12 @@ .. _ln-send_data: -================= +============================== Send Data -================= +============================== Inputs -+++++++ +++++++++++++++++++++++++++++++ Condition If connected, condition must be fulfilled for node to activate. @@ -25,7 +25,7 @@ Subject todo Outputs -+++++++ +++++++++++++++++++++++++++++++ Done *True* if node performed successfully, else *False*. diff --git a/source/manual/logic_nodes/network/serialize_data.rst b/source/manual/logic_nodes/network/serialize_data.rst index 4aefe63f..cf7b4736 100644 --- a/source/manual/logic_nodes/network/serialize_data.rst +++ b/source/manual/logic_nodes/network/serialize_data.rst @@ -5,24 +5,24 @@ .. _ln-serialize_data: -================= +============================== Serialize Data -================= +============================== Parameters -++++++++++ +++++++++++++++++++++++++++++++ Serialize As todo Inputs -+++++++ +++++++++++++++++++++++++++++++ Data todo Outputs -+++++++ +++++++++++++++++++++++++++++++ Data todo diff --git a/source/manual/logic_nodes/nodes/geometry/get_node_value.rst b/source/manual/logic_nodes/nodes/geometry/get_node_value.rst index 12f4c88a..6ea07c29 100644 --- a/source/manual/logic_nodes/nodes/geometry/get_node_value.rst +++ b/source/manual/logic_nodes/nodes/geometry/get_node_value.rst @@ -5,12 +5,12 @@ .. _ln-geo-get_node_value: -================ +============================== Get Node Value -================ +============================== Inputs -++++++ +++++++++++++++++++++++++++++++ Node Tree Geometry node to inspect. @@ -19,7 +19,7 @@ Node Name String representation of node name. Outputs -+++++++ +++++++++++++++++++++++++++++++ Value Resulting node value. diff --git a/source/manual/logic_nodes/nodes/geometry/get_socket_value.rst b/source/manual/logic_nodes/nodes/geometry/get_socket_value.rst index fb8ab034..9be77ff9 100644 --- a/source/manual/logic_nodes/nodes/geometry/get_socket_value.rst +++ b/source/manual/logic_nodes/nodes/geometry/get_socket_value.rst @@ -5,12 +5,12 @@ .. _ln-geo-get_socket_value: -================ +============================== Get Socket Value -================ +============================== Inputs -++++++ +++++++++++++++++++++++++++++++ Node Tree Geometry node to inspect. @@ -19,7 +19,7 @@ Node Name String representation of node name. Outputs -+++++++ +++++++++++++++++++++++++++++++ Value Resulting value for getting node socket. diff --git a/source/manual/logic_nodes/nodes/geometry/index.rst b/source/manual/logic_nodes/nodes/geometry/index.rst index efdbc376..d077227c 100644 --- a/source/manual/logic_nodes/nodes/geometry/index.rst +++ b/source/manual/logic_nodes/nodes/geometry/index.rst @@ -1,8 +1,8 @@ .. _ln-nodes-geometry-index: -====================== +============================== Geometry -====================== +============================== .. toctree:: :maxdepth: 1 diff --git a/source/manual/logic_nodes/nodes/geometry/set_node_value.rst b/source/manual/logic_nodes/nodes/geometry/set_node_value.rst index 05cd598a..e4b9e579 100644 --- a/source/manual/logic_nodes/nodes/geometry/set_node_value.rst +++ b/source/manual/logic_nodes/nodes/geometry/set_node_value.rst @@ -5,12 +5,12 @@ .. _ln-geo-set_node_value: -================ +============================== Set Node Value -================ +============================== Inputs -++++++ +++++++++++++++++++++++++++++++ Condition Which condition will be used for node to activate. @@ -22,7 +22,7 @@ Node Name String representation of node name. Outputs -+++++++ +++++++++++++++++++++++++++++++ Done *True* if node performed successfully, else *False*. diff --git a/source/manual/logic_nodes/nodes/geometry/set_socket.rst b/source/manual/logic_nodes/nodes/geometry/set_socket.rst index 075d0634..cef0b471 100644 --- a/source/manual/logic_nodes/nodes/geometry/set_socket.rst +++ b/source/manual/logic_nodes/nodes/geometry/set_socket.rst @@ -5,12 +5,12 @@ .. _ln-geo-set_socket: -================ +============================== Set Socket -================ +============================== Inputs -++++++ +++++++++++++++++++++++++++++++ Condition If connected, condition must be fulfilled for node to activate. @@ -22,7 +22,7 @@ Node Name String representation of node name. Outputs -+++++++ +++++++++++++++++++++++++++++++ Done *True* if node performed successfully, else *False*. diff --git a/source/manual/logic_nodes/nodes/groups/get_node_value.rst b/source/manual/logic_nodes/nodes/groups/get_node_value.rst index 34fb7966..52e28c3b 100644 --- a/source/manual/logic_nodes/nodes/groups/get_node_value.rst +++ b/source/manual/logic_nodes/nodes/groups/get_node_value.rst @@ -5,12 +5,12 @@ .. _ln-gro-get_node_value: -================ +============================== Get Node Value -================ +============================== Inputs -++++++ +++++++++++++++++++++++++++++++ Node Tree Group node to use. @@ -19,7 +19,7 @@ Node Name Name of the node. Outputs -+++++++ +++++++++++++++++++++++++++++++ Value Resulting node value. diff --git a/source/manual/logic_nodes/nodes/groups/get_socket_value.rst b/source/manual/logic_nodes/nodes/groups/get_socket_value.rst index a0c32925..1a556bd6 100644 --- a/source/manual/logic_nodes/nodes/groups/get_socket_value.rst +++ b/source/manual/logic_nodes/nodes/groups/get_socket_value.rst @@ -5,12 +5,12 @@ .. _ln-gro-get_socket_value: -================ +============================== Get Socket Value -================ +============================== Inputs -++++++ +++++++++++++++++++++++++++++++ Node Tree Geometry node to use. todo @@ -19,7 +19,7 @@ Node Name String representation of node name. Outputs -+++++++ +++++++++++++++++++++++++++++++ Value Resulting socket value. diff --git a/source/manual/logic_nodes/nodes/groups/index.rst b/source/manual/logic_nodes/nodes/groups/index.rst index ab0512df..8b9a1906 100644 --- a/source/manual/logic_nodes/nodes/groups/index.rst +++ b/source/manual/logic_nodes/nodes/groups/index.rst @@ -1,8 +1,8 @@ .. _ln-nodes-groups-index: -====================== +============================== Groups -====================== +============================== .. toctree:: :maxdepth: 1 diff --git a/source/manual/logic_nodes/nodes/groups/set_node_value.rst b/source/manual/logic_nodes/nodes/groups/set_node_value.rst index 441e4601..93fd8a8a 100644 --- a/source/manual/logic_nodes/nodes/groups/set_node_value.rst +++ b/source/manual/logic_nodes/nodes/groups/set_node_value.rst @@ -5,12 +5,12 @@ .. _ln-gro-set_node_value: -================ +============================== Set Node Value -================ +============================== Inputs -++++++ +++++++++++++++++++++++++++++++ Condition If connected, condition must be fulfilled for node to activate. @@ -22,7 +22,7 @@ Node Name String representation of node name. Internal - todo + The internal socket is for modifying attributes that aren't stored directly on the node but in another container (i.e. ShaderNodeTexImage.image_user.offset > image_user would be the internal entry). Attribute todo @@ -31,7 +31,7 @@ Value Type and value to set. Outputs -+++++++ +++++++++++++++++++++++++++++++ Done *True* if node performed successfully, else *False*. diff --git a/source/manual/logic_nodes/nodes/groups/set_socket.rst b/source/manual/logic_nodes/nodes/groups/set_socket.rst index 4a718b8c..132548ad 100644 --- a/source/manual/logic_nodes/nodes/groups/set_socket.rst +++ b/source/manual/logic_nodes/nodes/groups/set_socket.rst @@ -5,12 +5,12 @@ .. _ln-gro-set_socket: -================ +============================== Set Socket -================ +============================== Inputs -++++++ +++++++++++++++++++++++++++++++ Condition If connected, condition must be fulfilled for node to activate. @@ -22,7 +22,7 @@ Node Name Name of the node. Outputs -+++++++ +++++++++++++++++++++++++++++++ Done *True* if node performed successfully, else *False*. diff --git a/source/manual/logic_nodes/nodes/index.rst b/source/manual/logic_nodes/nodes/index.rst index 224834a0..6441bf2b 100644 --- a/source/manual/logic_nodes/nodes/index.rst +++ b/source/manual/logic_nodes/nodes/index.rst @@ -1,8 +1,8 @@ .. _ln-nodes-index: -====================== +============================== Nodes -====================== +============================== .. toctree:: :maxdepth: 1 diff --git a/source/manual/logic_nodes/nodes/materials/get_node.rst b/source/manual/logic_nodes/nodes/materials/get_node.rst index 74e29092..83691221 100644 --- a/source/manual/logic_nodes/nodes/materials/get_node.rst +++ b/source/manual/logic_nodes/nodes/materials/get_node.rst @@ -5,12 +5,12 @@ .. _ln-mat-get_node: -=============== +============================== Get Node -=============== +============================== Inputs -++++++ +++++++++++++++++++++++++++++++ Material Which material to inspect. @@ -19,7 +19,7 @@ Node Name todo Outputs -+++++++ +++++++++++++++++++++++++++++++ Node Resulting node. diff --git a/source/manual/logic_nodes/nodes/materials/get_node_value.rst b/source/manual/logic_nodes/nodes/materials/get_node_value.rst index 5a0382bc..5e266a91 100644 --- a/source/manual/logic_nodes/nodes/materials/get_node_value.rst +++ b/source/manual/logic_nodes/nodes/materials/get_node_value.rst @@ -5,12 +5,12 @@ .. _ln-mat-get_node_value: -================ +============================== Get Node Value -================ +============================== Inputs -++++++ +++++++++++++++++++++++++++++++ Material todo @@ -19,7 +19,7 @@ Node Name String representation of node name. Outputs -+++++++ +++++++++++++++++++++++++++++++ Value Resulting node value. diff --git a/source/manual/logic_nodes/nodes/materials/get_socket_value.rst b/source/manual/logic_nodes/nodes/materials/get_socket_value.rst index a85b436f..4e5c4a06 100644 --- a/source/manual/logic_nodes/nodes/materials/get_socket_value.rst +++ b/source/manual/logic_nodes/nodes/materials/get_socket_value.rst @@ -5,12 +5,12 @@ .. _ln-mat-get_socket_value: -================ +============================== Get Socket Value -================ +============================== Inputs -++++++ +++++++++++++++++++++++++++++++ Material todo @@ -19,7 +19,7 @@ Node Name todo Outputs -+++++++ +++++++++++++++++++++++++++++++ Value Resulting socket value. diff --git a/source/manual/logic_nodes/nodes/materials/index.rst b/source/manual/logic_nodes/nodes/materials/index.rst index 728a236f..935f33af 100644 --- a/source/manual/logic_nodes/nodes/materials/index.rst +++ b/source/manual/logic_nodes/nodes/materials/index.rst @@ -1,8 +1,8 @@ .. _ln-nodes-materials-index: -====================== +============================== Materials -====================== +============================== .. toctree:: :maxdepth: 1 diff --git a/source/manual/logic_nodes/nodes/materials/play_sequence.rst b/source/manual/logic_nodes/nodes/materials/play_sequence.rst index 6b9a0725..593cfeb2 100644 --- a/source/manual/logic_nodes/nodes/materials/play_sequence.rst +++ b/source/manual/logic_nodes/nodes/materials/play_sequence.rst @@ -5,12 +5,12 @@ .. _ln-mat-play_sequence: -=============== +============================== Play Sequence -=============== +============================== Inputs -++++++ +++++++++++++++++++++++++++++++ Condition If connected, condition must be fulfilled for node to activate. @@ -22,7 +22,7 @@ Node Name todo Outputs -+++++++ +++++++++++++++++++++++++++++++ On Start Emits *True* signal that sequence started playing. diff --git a/source/manual/logic_nodes/nodes/materials/set_node_value.rst b/source/manual/logic_nodes/nodes/materials/set_node_value.rst index 775fd646..65fc523c 100644 --- a/source/manual/logic_nodes/nodes/materials/set_node_value.rst +++ b/source/manual/logic_nodes/nodes/materials/set_node_value.rst @@ -5,12 +5,12 @@ .. _ln-mat-set_node_value: -================ +============================== Set Node Value -================ +============================== Inputs -++++++ +++++++++++++++++++++++++++++++ Condition If connected, condition must be fulfilled for node to activate. @@ -22,7 +22,7 @@ Node Name String representation for node name. Outputs -+++++++ +++++++++++++++++++++++++++++++ Done *True* if node performed successfully, else *False*. diff --git a/source/manual/logic_nodes/nodes/materials/set_socket.rst b/source/manual/logic_nodes/nodes/materials/set_socket.rst index 63857da1..8e00ec15 100644 --- a/source/manual/logic_nodes/nodes/materials/set_socket.rst +++ b/source/manual/logic_nodes/nodes/materials/set_socket.rst @@ -5,12 +5,12 @@ .. _ln-mat-set_socket: -================ +============================== Set Socket -================ +============================== Inputs -++++++ +++++++++++++++++++++++++++++++ Condition If connected, condition must be fulfilled for node to activate. @@ -22,7 +22,7 @@ Node Name String representation of node name. Outputs -+++++++ +++++++++++++++++++++++++++++++ Done *True* if node performed successfully, else *False*. diff --git a/source/manual/logic_nodes/objects/add_object.rst b/source/manual/logic_nodes/objects/add_object.rst index 4438fb62..6558afd4 100644 --- a/source/manual/logic_nodes/objects/add_object.rst +++ b/source/manual/logic_nodes/objects/add_object.rst @@ -5,12 +5,12 @@ .. _ln-add_object: -====================== +============================== Add Object -====================== +============================== Inputs -++++++ +++++++++++++++++++++++++++++++ Condition Which condition will be used for node to activate. @@ -28,7 +28,7 @@ Full Copy todo Outputs -+++++++ +++++++++++++++++++++++++++++++ Done *True* if the node performed successfully, else *False*. diff --git a/source/manual/logic_nodes/objects/curves/get_curve_points.rst b/source/manual/logic_nodes/objects/curves/get_curve_points.rst index 0862cfe5..34e11c42 100644 --- a/source/manual/logic_nodes/objects/curves/get_curve_points.rst +++ b/source/manual/logic_nodes/objects/curves/get_curve_points.rst @@ -5,18 +5,18 @@ .. _ln-get_curve_points: -====================== +============================== Get Curve Points -====================== +============================== Inputs -++++++ +++++++++++++++++++++++++++++++ Curve Which curve to inspect for points. Outputs -+++++++ +++++++++++++++++++++++++++++++ Points A list of resulting curve points. diff --git a/source/manual/logic_nodes/objects/curves/index.rst b/source/manual/logic_nodes/objects/curves/index.rst index 3c591bc0..157a1e31 100644 --- a/source/manual/logic_nodes/objects/curves/index.rst +++ b/source/manual/logic_nodes/objects/curves/index.rst @@ -1,8 +1,8 @@ .. _ln-objects-curves-index: -======== +============================== Curves -======== +============================== .. toctree:: :maxdepth: 1 diff --git a/source/manual/logic_nodes/objects/curves/set_curve_points.rst b/source/manual/logic_nodes/objects/curves/set_curve_points.rst index a06f69b7..5cec7b58 100644 --- a/source/manual/logic_nodes/objects/curves/set_curve_points.rst +++ b/source/manual/logic_nodes/objects/curves/set_curve_points.rst @@ -5,12 +5,12 @@ .. _ln-set_curve_points: -====================== +============================== Set Curve Points -====================== +============================== Inputs -++++++ +++++++++++++++++++++++++++++++ Condition Which condition will be used for node to activate. @@ -22,7 +22,7 @@ Points A list of points to set. Outputs -+++++++ +++++++++++++++++++++++++++++++ Done *True* if the node performed successfully, else *False*. diff --git a/source/manual/logic_nodes/objects/get_attribute/get_color.rst b/source/manual/logic_nodes/objects/get_attribute/get_color.rst index f3da8b61..60f8bc98 100644 --- a/source/manual/logic_nodes/objects/get_attribute/get_color.rst +++ b/source/manual/logic_nodes/objects/get_attribute/get_color.rst @@ -1,28 +1,28 @@ -.. figure:: /images/logic_nodes/objects/get_attribute/ln-color.png +.. figure:: /images/logic_nodes/objects/get_attribute/ln-get_color.png :align: right :width: 215 :alt: Get Color Node .. _ln-get_color: -============================= +============================== Get Color -============================= +============================== Parameters -++++++++++ +++++++++++++++++++++++++++++++ Get Attribute Color todo Inputs -++++++ +++++++++++++++++++++++++++++++ Object todo Outputs -+++++++ +++++++++++++++++++++++++++++++ Color todo diff --git a/source/manual/logic_nodes/objects/get_attribute/get_local_angular_velocity.rst b/source/manual/logic_nodes/objects/get_attribute/get_local_angular_velocity.rst index a55d96ef..56a2707b 100644 --- a/source/manual/logic_nodes/objects/get_attribute/get_local_angular_velocity.rst +++ b/source/manual/logic_nodes/objects/get_attribute/get_local_angular_velocity.rst @@ -1,28 +1,28 @@ -.. figure:: /images/logic_nodes/objects/get_attribute/ln-local_angular_velocity.png +.. figure:: /images/logic_nodes/objects/get_attribute/ln-get_local_angular_velocity.png :align: right :width: 215 :alt: Get Local Angular Velocity Node .. _ln-get_local_angular_velocity: -============================= +============================== Get Local Angular Velocity -============================= +============================== Parameters -++++++++++ +++++++++++++++++++++++++++++++ Get Attribute Local Angular Velocity Inputs -++++++ +++++++++++++++++++++++++++++++ Object todo Outputs -+++++++ +++++++++++++++++++++++++++++++ Local Angular Velocity todo diff --git a/source/manual/logic_nodes/objects/get_attribute/get_local_linear_velocity.rst b/source/manual/logic_nodes/objects/get_attribute/get_local_linear_velocity.rst index 81466943..8a98840c 100644 --- a/source/manual/logic_nodes/objects/get_attribute/get_local_linear_velocity.rst +++ b/source/manual/logic_nodes/objects/get_attribute/get_local_linear_velocity.rst @@ -1,28 +1,28 @@ -.. figure:: /images/logic_nodes/objects/get_attribute/ln-local_linear_velocity.png +.. figure:: /images/logic_nodes/objects/get_attribute/ln-get_local_linear_velocity.png :align: right :width: 215 :alt: Get Local Linear Velocity Node .. _ln-get_local_linear_velocity: -============================= +============================== Get Local Linear Velocity -============================= +============================== Parameters -++++++++++ +++++++++++++++++++++++++++++++ Get Attribute Local Linear Velocity todo Inputs -++++++ +++++++++++++++++++++++++++++++ Object todo Outputs -+++++++ +++++++++++++++++++++++++++++++ Local Linear Velocity todo diff --git a/source/manual/logic_nodes/objects/get_attribute/get_local_orientation.rst b/source/manual/logic_nodes/objects/get_attribute/get_local_orientation.rst index 88b58fa7..db71f1c0 100644 --- a/source/manual/logic_nodes/objects/get_attribute/get_local_orientation.rst +++ b/source/manual/logic_nodes/objects/get_attribute/get_local_orientation.rst @@ -1,28 +1,28 @@ -.. figure:: /images/logic_nodes/objects/get_attribute/ln-local_orientation.png +.. figure:: /images/logic_nodes/objects/get_attribute/ln-get_local_orientation.png :align: right :width: 215 :alt: Get Local Orientation Node .. _ln-get_local_orientation: -============================= +============================== Get Local Orientation -============================= +============================== Parameters -++++++++++ +++++++++++++++++++++++++++++++ Get Attribute todo Inputs -++++++ +++++++++++++++++++++++++++++++ Object todo Outputs -+++++++ +++++++++++++++++++++++++++++++ Orientation todo diff --git a/source/manual/logic_nodes/objects/get_attribute/get_local_position.rst b/source/manual/logic_nodes/objects/get_attribute/get_local_position.rst index ed6b1f35..f9525cd6 100644 --- a/source/manual/logic_nodes/objects/get_attribute/get_local_position.rst +++ b/source/manual/logic_nodes/objects/get_attribute/get_local_position.rst @@ -1,28 +1,28 @@ -.. figure:: /images/logic_nodes/objects/get_attribute/ln-local_position.png +.. figure:: /images/logic_nodes/objects/get_attribute/ln-get_local_position.png :align: right :width: 215 :alt: Get Local Position Node .. _ln-get_local_position: -============================= +============================== Get Local Position -============================= +============================== Parameters -++++++++++ +++++++++++++++++++++++++++++++ Get Attribute Local Position todo Inputs -++++++ +++++++++++++++++++++++++++++++ Object todo Outputs -+++++++ +++++++++++++++++++++++++++++++ Local Position todo diff --git a/source/manual/logic_nodes/objects/get_attribute/get_local_scale.rst b/source/manual/logic_nodes/objects/get_attribute/get_local_scale.rst index f4b39f8e..461b58d9 100644 --- a/source/manual/logic_nodes/objects/get_attribute/get_local_scale.rst +++ b/source/manual/logic_nodes/objects/get_attribute/get_local_scale.rst @@ -1,28 +1,28 @@ -.. figure:: /images/logic_nodes/objects/get_attribute/ln-local_scale.png +.. figure:: /images/logic_nodes/objects/get_attribute/ln-get_local_scale.png :align: right :width: 215 :alt: Get Local Scale Node .. _ln-get_local_scale: -============================= +============================== Get Local Scale -============================= +============================== Parameters -++++++++++ +++++++++++++++++++++++++++++++ Get Attribute Local Scale todo Inputs -++++++ +++++++++++++++++++++++++++++++ Object todo Outputs -+++++++ +++++++++++++++++++++++++++++++ Local Scale todo diff --git a/source/manual/logic_nodes/objects/get_attribute/get_local_transform.rst b/source/manual/logic_nodes/objects/get_attribute/get_local_transform.rst index 04359a21..37baa8da 100644 --- a/source/manual/logic_nodes/objects/get_attribute/get_local_transform.rst +++ b/source/manual/logic_nodes/objects/get_attribute/get_local_transform.rst @@ -1,28 +1,28 @@ -.. figure:: /images/logic_nodes/objects/get_attribute/ln-local_transform.png +.. figure:: /images/logic_nodes/objects/get_attribute/ln-get_local_transform.png :align: right :width: 215 :alt: Get Local Transform Node .. _ln-get_local_transform: -============================= +============================== Get Local Transform -============================= +============================== Parameters -++++++++++ +++++++++++++++++++++++++++++++ Get Attribute Local Transform todo Inputs -++++++ +++++++++++++++++++++++++++++++ Object todo Outputs -+++++++ +++++++++++++++++++++++++++++++ Value todo diff --git a/source/manual/logic_nodes/objects/get_attribute/get_name.rst b/source/manual/logic_nodes/objects/get_attribute/get_name.rst index 1107ca75..d211869c 100644 --- a/source/manual/logic_nodes/objects/get_attribute/get_name.rst +++ b/source/manual/logic_nodes/objects/get_attribute/get_name.rst @@ -1,28 +1,28 @@ -.. figure:: /images/logic_nodes/objects/get_attribute/ln-name.png +.. figure:: /images/logic_nodes/objects/get_attribute/ln-get_name.png :align: right :width: 215 :alt: Get Name Node .. _ln-get_name: -============================= +============================== Get Name -============================= +============================== Parameters -++++++++++ +++++++++++++++++++++++++++++++ Get Attribute Name todo Inputs -++++++ +++++++++++++++++++++++++++++++ Object todo Outputs -+++++++ +++++++++++++++++++++++++++++++ Value todo diff --git a/source/manual/logic_nodes/objects/get_attribute/get_scale.rst b/source/manual/logic_nodes/objects/get_attribute/get_scale.rst deleted file mode 100644 index 219527ee..00000000 --- a/source/manual/logic_nodes/objects/get_attribute/get_scale.rst +++ /dev/null @@ -1,32 +0,0 @@ -.. figure:: /images/logic_nodes/objects/get_attribute/ln-get_scale.png - :align: right - :width: 215 - :alt: Get Scale Node - - .. _ln-get_scale: - -============================= -Get Scale -============================= - -Parameters -++++++++++ - -prop - value - -Inputs -++++++ - -prop - value - -Outputs -+++++++ - -prop - value - -Example -+++++++ - diff --git a/source/manual/logic_nodes/objects/get_attribute/get_visibility.rst b/source/manual/logic_nodes/objects/get_attribute/get_visibility.rst index dc5706ef..20f983bb 100644 --- a/source/manual/logic_nodes/objects/get_attribute/get_visibility.rst +++ b/source/manual/logic_nodes/objects/get_attribute/get_visibility.rst @@ -1,28 +1,28 @@ -.. figure:: /images/logic_nodes/objects/get_attribute/ln-visibility.png +.. figure:: /images/logic_nodes/objects/get_attribute/ln-get_visibility.png :align: right :width: 215 :alt: Get Visibility Node .. _ln-get_visibility: -============================= +============================== Get Visibility -============================= +============================== Parameters -++++++++++ +++++++++++++++++++++++++++++++ Get Attribute Visibility todo Inputs -++++++ +++++++++++++++++++++++++++++++ Object todo Outputs -+++++++ +++++++++++++++++++++++++++++++ Visible todo diff --git a/source/manual/logic_nodes/objects/get_attribute/get_world_angular_velocity.rst b/source/manual/logic_nodes/objects/get_attribute/get_world_angular_velocity.rst index c1665d71..7f7e0b4a 100644 --- a/source/manual/logic_nodes/objects/get_attribute/get_world_angular_velocity.rst +++ b/source/manual/logic_nodes/objects/get_attribute/get_world_angular_velocity.rst @@ -1,28 +1,28 @@ -.. figure:: /images/logic_nodes/objects/get_attribute/ln-world_angular_velocity.png +.. figure:: /images/logic_nodes/objects/get_attribute/ln-get_world_angular_velocity.png :align: right :width: 215 :alt: Get World Angular Velocity Node .. _ln-get_world_angular_velocity: -============================= +============================== Get World Angular Velocity -============================= +============================== Parameters -++++++++++ +++++++++++++++++++++++++++++++ Get Attribute World Angular Velocity todo. Inputs -++++++ +++++++++++++++++++++++++++++++ Object todo Outputs -+++++++ +++++++++++++++++++++++++++++++ World Angular Velocity todo diff --git a/source/manual/logic_nodes/objects/get_attribute/get_world_linear_velocity.rst b/source/manual/logic_nodes/objects/get_attribute/get_world_linear_velocity.rst index 81d2309e..8ad649fa 100644 --- a/source/manual/logic_nodes/objects/get_attribute/get_world_linear_velocity.rst +++ b/source/manual/logic_nodes/objects/get_attribute/get_world_linear_velocity.rst @@ -1,28 +1,28 @@ -.. figure:: /images/logic_nodes/objects/get_attribute/ln-world_linear_velocity.png +.. figure:: /images/logic_nodes/objects/get_attribute/ln-get_world_linear_velocity.png :align: right :width: 215 :alt: Get World Linear Velocity Node .. _ln-get_world_linear_velocity: -============================= +============================== Get World Linear Velocity -============================= +============================== Parameters -++++++++++ +++++++++++++++++++++++++++++++ Get Attribute World Linear Velocity todo. Inputs -++++++ +++++++++++++++++++++++++++++++ Object Object todo. Outputs -+++++++ +++++++++++++++++++++++++++++++ World Linear Velocity todo diff --git a/source/manual/logic_nodes/objects/get_attribute/get_world_orientation.rst b/source/manual/logic_nodes/objects/get_attribute/get_world_orientation.rst index 81a5e0d7..869288b9 100644 --- a/source/manual/logic_nodes/objects/get_attribute/get_world_orientation.rst +++ b/source/manual/logic_nodes/objects/get_attribute/get_world_orientation.rst @@ -1,28 +1,28 @@ -.. figure:: /images/logic_nodes/objects/get_attribute/ln-world_orientation.png +.. figure:: /images/logic_nodes/objects/get_attribute/ln-get_world_orientation.png :align: right :width: 215 :alt: Get World Orientation Node .. _ln-get_world_orientation: -======================= +============================== Get World Orientation -======================= +============================== Parameters -++++++++++ +++++++++++++++++++++++++++++++ Get Attribute World Orientation todo. Inputs -++++++ +++++++++++++++++++++++++++++++ Object todo Outputs -+++++++ +++++++++++++++++++++++++++++++ Orientation World Orientation todo diff --git a/source/manual/logic_nodes/objects/get_attribute/get_world_position.rst b/source/manual/logic_nodes/objects/get_attribute/get_world_position.rst index 27c1a8cd..04ee9574 100644 --- a/source/manual/logic_nodes/objects/get_attribute/get_world_position.rst +++ b/source/manual/logic_nodes/objects/get_attribute/get_world_position.rst @@ -1,28 +1,28 @@ -.. figure:: /images/logic_nodes/objects/get_attribute/ln-world_position.png +.. figure:: /images/logic_nodes/objects/get_attribute/ln-get_world_position.png :align: right :width: 215 :alt: Get World Position Node .. _ln-get_world_position: -======================= +============================== Get World Position -======================= +============================== Parameters -++++++++++ +++++++++++++++++++++++++++++++ Get Attribute World Position todo. Inputs -++++++ +++++++++++++++++++++++++++++++ Object todo Outputs -+++++++ +++++++++++++++++++++++++++++++ World Position todo diff --git a/source/manual/logic_nodes/objects/get_attribute/get_world_scale.rst b/source/manual/logic_nodes/objects/get_attribute/get_world_scale.rst index 1587773a..50eb3a8a 100644 --- a/source/manual/logic_nodes/objects/get_attribute/get_world_scale.rst +++ b/source/manual/logic_nodes/objects/get_attribute/get_world_scale.rst @@ -1,28 +1,28 @@ -.. figure:: /images/logic_nodes/objects/get_attribute/ln-world_scale.png +.. figure:: /images/logic_nodes/objects/get_attribute/ln-get_world_scale.png :align: right :width: 215 :alt: Get World Scale Node .. _ln-get_world_scale: -============================= +============================== Get World Scale -============================= +============================== Parameters -++++++++++ +++++++++++++++++++++++++++++++ Get Attribute World Scale todo Inputs -++++++ +++++++++++++++++++++++++++++++ Object todo Outputs -+++++++ +++++++++++++++++++++++++++++++ World Scale todo diff --git a/source/manual/logic_nodes/objects/get_attribute/get_world_transform.rst b/source/manual/logic_nodes/objects/get_attribute/get_world_transform.rst index aed13ae5..3a3e6f39 100644 --- a/source/manual/logic_nodes/objects/get_attribute/get_world_transform.rst +++ b/source/manual/logic_nodes/objects/get_attribute/get_world_transform.rst @@ -1,28 +1,28 @@ -.. figure:: /images/logic_nodes/objects/get_attribute/ln-world_transform.png +.. figure:: /images/logic_nodes/objects/get_attribute/ln-get_world_transform.png :align: right :width: 215 :alt: Get World Transform Node .. _ln-get_world_transform: -============================= +============================== Get World Transform -============================= +============================== Parameters -++++++++++ +++++++++++++++++++++++++++++++ Get Attribute World Transform todo. Inputs -++++++ +++++++++++++++++++++++++++++++ Object todo Outputs -+++++++ +++++++++++++++++++++++++++++++ Value World Transform diff --git a/source/manual/logic_nodes/objects/get_attribute/index.rst b/source/manual/logic_nodes/objects/get_attribute/index.rst index 2f2c9b16..a3887269 100644 --- a/source/manual/logic_nodes/objects/get_attribute/index.rst +++ b/source/manual/logic_nodes/objects/get_attribute/index.rst @@ -1,8 +1,8 @@ .. _ln-get_attribute-index: -============================= +============================== Get Attribute -============================= +============================== .. toctree:: :maxdepth: 1 diff --git a/source/manual/logic_nodes/objects/get_child_by_index.rst b/source/manual/logic_nodes/objects/get_child_by_index.rst index ce2deb9c..f6b1ff9b 100644 --- a/source/manual/logic_nodes/objects/get_child_by_index.rst +++ b/source/manual/logic_nodes/objects/get_child_by_index.rst @@ -5,12 +5,12 @@ .. _ln-get_child_by_index: -====================== +============================== Get Child By Index -====================== +============================== Inputs -++++++ +++++++++++++++++++++++++++++++ Parent A parent object of a child object which to inspect. @@ -19,7 +19,7 @@ Index Index of todo. Outputs -+++++++ +++++++++++++++++++++++++++++++ Child Resulting data of the child object. diff --git a/source/manual/logic_nodes/objects/get_child_by_name.rst b/source/manual/logic_nodes/objects/get_child_by_name.rst index 38690485..37e99089 100644 --- a/source/manual/logic_nodes/objects/get_child_by_name.rst +++ b/source/manual/logic_nodes/objects/get_child_by_name.rst @@ -5,12 +5,12 @@ .. _ln-get_child_by_name: -====================== +============================== Get Child By Name -====================== +============================== Inputs -++++++ +++++++++++++++++++++++++++++++ Parent A parent object of the child object to inpect. @@ -19,7 +19,7 @@ Child A child object to inspect. Outputs -+++++++ +++++++++++++++++++++++++++++++ Child Resulting child object data. diff --git a/source/manual/logic_nodes/objects/get_object.rst b/source/manual/logic_nodes/objects/get_object.rst index 62fac34a..3ffc498e 100644 --- a/source/manual/logic_nodes/objects/get_object.rst +++ b/source/manual/logic_nodes/objects/get_object.rst @@ -5,18 +5,18 @@ .. _ln-get_object: -====================== +============================== Get Object -====================== +============================== Inputs -++++++ +++++++++++++++++++++++++++++++ Object Which object to inspect. Outputs -+++++++ +++++++++++++++++++++++++++++++ Object Resulting object. diff --git a/source/manual/logic_nodes/objects/get_parent.rst b/source/manual/logic_nodes/objects/get_parent.rst index ac4561e2..26eb6b6b 100644 --- a/source/manual/logic_nodes/objects/get_parent.rst +++ b/source/manual/logic_nodes/objects/get_parent.rst @@ -5,18 +5,18 @@ .. _ln-get_parent: -====================== +============================== Get Parent -====================== +============================== Inputs -++++++ +++++++++++++++++++++++++++++++ Child Object A child object for which to get its parent. Outputs -+++++++ +++++++++++++++++++++++++++++++ Parent Object Data of the resulting parent object. diff --git a/source/manual/logic_nodes/objects/index.rst b/source/manual/logic_nodes/objects/index.rst index c1efeecd..e623e68d 100644 --- a/source/manual/logic_nodes/objects/index.rst +++ b/source/manual/logic_nodes/objects/index.rst @@ -1,8 +1,8 @@ .. _ln-objects-index: -======== +============================== Objects -======== +============================== .. toctree:: :maxdepth: 1 diff --git a/source/manual/logic_nodes/objects/object_data/get_axis_vector.rst b/source/manual/logic_nodes/objects/object_data/get_axis_vector.rst index c7457980..a543278d 100644 --- a/source/manual/logic_nodes/objects/object_data/get_axis_vector.rst +++ b/source/manual/logic_nodes/objects/object_data/get_axis_vector.rst @@ -5,24 +5,24 @@ .. _ln-get_axis_vector: -====================== +============================== Get Axis Vector -====================== +============================== Parameters -++++++++++ +++++++++++++++++++++++++++++++ Axis Selected axis to get. Inputs -++++++ +++++++++++++++++++++++++++++++ Object Which object to inspect for axis vector. Outputs -+++++++ +++++++++++++++++++++++++++++++ Vector Resulting vector. diff --git a/source/manual/logic_nodes/objects/object_data/get_object_id.rst b/source/manual/logic_nodes/objects/object_data/get_object_id.rst index 4475f7a8..608723f0 100644 --- a/source/manual/logic_nodes/objects/object_data/get_object_id.rst +++ b/source/manual/logic_nodes/objects/object_data/get_object_id.rst @@ -5,18 +5,18 @@ .. _ln-get_object_id: -====================== +============================== Get Object ID -====================== +============================== Inputs -++++++ +++++++++++++++++++++++++++++++ Object Which object to inspect. Outputs -+++++++ +++++++++++++++++++++++++++++++ ID Resulting ID of the object. diff --git a/source/manual/logic_nodes/objects/object_data/get_vertices.rst b/source/manual/logic_nodes/objects/object_data/get_vertices.rst index 12456e0f..53b5c644 100644 --- a/source/manual/logic_nodes/objects/object_data/get_vertices.rst +++ b/source/manual/logic_nodes/objects/object_data/get_vertices.rst @@ -5,18 +5,18 @@ .. _ln-get_vertices: -====================== +============================== Get Vertices -====================== +============================== Inputs -++++++ +++++++++++++++++++++++++++++++ Object Which object to get vertices from. Outputs -+++++++ +++++++++++++++++++++++++++++++ Vertices A list of resulting vertices. diff --git a/source/manual/logic_nodes/objects/object_data/index.rst b/source/manual/logic_nodes/objects/object_data/index.rst index f0e38531..fbab7a1b 100644 --- a/source/manual/logic_nodes/objects/object_data/index.rst +++ b/source/manual/logic_nodes/objects/object_data/index.rst @@ -1,8 +1,8 @@ .. _ln-objects-object_data-index: -============ +============================== Object Data -============ +============================== .. toctree:: :maxdepth: 1 diff --git a/source/manual/logic_nodes/objects/object_data/replace_mesh.rst b/source/manual/logic_nodes/objects/object_data/replace_mesh.rst index e04b5f07..16d4da98 100644 --- a/source/manual/logic_nodes/objects/object_data/replace_mesh.rst +++ b/source/manual/logic_nodes/objects/object_data/replace_mesh.rst @@ -5,12 +5,12 @@ .. _ln-replace_mesh: -====================== +============================== Replace Mesh -====================== +============================== Inputs -++++++ +++++++++++++++++++++++++++++++ Condition Which condition will be used for node to activate. @@ -28,7 +28,7 @@ Use Physics todo Outputs -+++++++ +++++++++++++++++++++++++++++++ Done *True* if the node performed successfully, else *False*. diff --git a/source/manual/logic_nodes/objects/object_data/set_constraint_attribute.rst b/source/manual/logic_nodes/objects/object_data/set_constraint_attribute.rst index 94d06ae8..027f38e8 100644 --- a/source/manual/logic_nodes/objects/object_data/set_constraint_attribute.rst +++ b/source/manual/logic_nodes/objects/object_data/set_constraint_attribute.rst @@ -5,12 +5,12 @@ .. _ln-set_constraint_attribute: -======================== +============================== Set Constraint Attribute -======================== +============================== Inputs -++++++ +++++++++++++++++++++++++++++++ Condition Which condition will be used for node to activate. @@ -28,7 +28,7 @@ Value todo Outputs -+++++++ +++++++++++++++++++++++++++++++ Done *True* if the node performed successfully, else *False*. diff --git a/source/manual/logic_nodes/objects/remove_object.rst b/source/manual/logic_nodes/objects/remove_object.rst index 31da0b89..41bafc12 100644 --- a/source/manual/logic_nodes/objects/remove_object.rst +++ b/source/manual/logic_nodes/objects/remove_object.rst @@ -5,12 +5,12 @@ .. _ln-remove_object: -====================== +============================== Remove Object -====================== +============================== Inputs -++++++ +++++++++++++++++++++++++++++++ Condition Which condition is used for node to activate. @@ -19,7 +19,7 @@ Object Which object to remove. Outputs -+++++++ +++++++++++++++++++++++++++++++ Done *True* if the node performed successfully, else *False*. diff --git a/source/manual/logic_nodes/objects/remove_parent.rst b/source/manual/logic_nodes/objects/remove_parent.rst index c0c1972e..3955b2ec 100644 --- a/source/manual/logic_nodes/objects/remove_parent.rst +++ b/source/manual/logic_nodes/objects/remove_parent.rst @@ -5,12 +5,12 @@ .. _ln-remove_parent: -====================== +============================== Remove Parent -====================== +============================== Inputs -++++++ +++++++++++++++++++++++++++++++ Condition Which condition is used for node to activate. @@ -19,7 +19,7 @@ Child Object Object which will get its parent removed. Outputs -+++++++ +++++++++++++++++++++++++++++++ Done *True* if the node performed successfully, else *False*. diff --git a/source/manual/logic_nodes/objects/send_message.rst b/source/manual/logic_nodes/objects/send_message.rst index fe3e898f..629076b3 100644 --- a/source/manual/logic_nodes/objects/send_message.rst +++ b/source/manual/logic_nodes/objects/send_message.rst @@ -5,12 +5,12 @@ .. _ln-send_message: -====================== +============================== Send Message -====================== +============================== Inputs -++++++ +++++++++++++++++++++++++++++++ Condition Which condition is used for node to activate. @@ -28,7 +28,7 @@ Body Message text to send. Outputs -+++++++ +++++++++++++++++++++++++++++++ Done *True* if the node performed successfully, else *False*. diff --git a/source/manual/logic_nodes/objects/set_attribute/index.rst b/source/manual/logic_nodes/objects/set_attribute/index.rst index 566060f9..13107820 100644 --- a/source/manual/logic_nodes/objects/set_attribute/index.rst +++ b/source/manual/logic_nodes/objects/set_attribute/index.rst @@ -1,8 +1,8 @@ .. _ln-set_attribute-index: -============================= +============================== Set Attribute -============================= +============================== .. toctree:: :maxdepth: 1 diff --git a/source/manual/logic_nodes/objects/set_attribute/set_color.rst b/source/manual/logic_nodes/objects/set_attribute/set_color.rst index cb9a5bfa..e1f63c09 100644 --- a/source/manual/logic_nodes/objects/set_attribute/set_color.rst +++ b/source/manual/logic_nodes/objects/set_attribute/set_color.rst @@ -1,22 +1,22 @@ -.. figure:: /images/logic_nodes/objects/set_attribute/ln-color.png +.. figure:: /images/logic_nodes/objects/set_attribute/ln-set_color.png :align: right :width: 215 :alt: Set Color Node .. _ln-set_color: -============================= +============================== Set Color -============================= +============================== Parameters -++++++++++ +++++++++++++++++++++++++++++++ Set Attribute Color todo Inputs -++++++ +++++++++++++++++++++++++++++++ Condition Condition to be fulfilled for node to activate. @@ -31,7 +31,7 @@ Color todo Outputs -+++++++ +++++++++++++++++++++++++++++++ Done *True* if node performed successfully, else *False*. diff --git a/source/manual/logic_nodes/objects/set_attribute/set_local_angular_velocity.rst b/source/manual/logic_nodes/objects/set_attribute/set_local_angular_velocity.rst index 6c5278da..c0d2dfcc 100644 --- a/source/manual/logic_nodes/objects/set_attribute/set_local_angular_velocity.rst +++ b/source/manual/logic_nodes/objects/set_attribute/set_local_angular_velocity.rst @@ -1,22 +1,22 @@ -.. figure:: /images/logic_nodes/objects/set_attribute/ln-local_angular_velocity.png +.. figure:: /images/logic_nodes/objects/set_attribute/ln-set_local_angular_velocity.png :align: right :width: 215 :alt: Set Local Angular Velocity Node .. _ln-set_local_angular_velocity: -============================= +============================== Set Local Angular Velocity -============================= +============================== Parameters -++++++++++ +++++++++++++++++++++++++++++++ Set Attribute Local Angular Velocity todo Inputs -++++++ +++++++++++++++++++++++++++++++ Condition Condition to be fulfilled for node to activate. @@ -31,7 +31,7 @@ Value todo Outputs -+++++++ +++++++++++++++++++++++++++++++ Done *True* if node performed successfully, else *False*. diff --git a/source/manual/logic_nodes/objects/set_attribute/set_local_linear_velocity.rst b/source/manual/logic_nodes/objects/set_attribute/set_local_linear_velocity.rst index f6b796c8..96213c3d 100644 --- a/source/manual/logic_nodes/objects/set_attribute/set_local_linear_velocity.rst +++ b/source/manual/logic_nodes/objects/set_attribute/set_local_linear_velocity.rst @@ -1,22 +1,22 @@ -.. figure:: /images/logic_nodes/objects/set_attribute/ln-local_linear_velocity.png +.. figure:: /images/logic_nodes/objects/set_attribute/ln-set_local_linear_velocity.png :align: right :width: 215 :alt: Set Local Linear Velocity Node .. _ln-set_local_linear_velocity: -============================= +============================== Set Local Linear Velocity -============================= +============================== Parameters -++++++++++ +++++++++++++++++++++++++++++++ Set Attribute Local Linear Velocity todo Inputs -++++++ +++++++++++++++++++++++++++++++ Condition Condition to be fulfilled for node to activate. @@ -31,7 +31,7 @@ Value todo Outputs -+++++++ +++++++++++++++++++++++++++++++ Done *True* if node performed successfully, else *False*. diff --git a/source/manual/logic_nodes/objects/set_attribute/set_local_orientation.rst b/source/manual/logic_nodes/objects/set_attribute/set_local_orientation.rst index 3ae0827d..ebe69bda 100644 --- a/source/manual/logic_nodes/objects/set_attribute/set_local_orientation.rst +++ b/source/manual/logic_nodes/objects/set_attribute/set_local_orientation.rst @@ -1,22 +1,22 @@ -.. figure:: /images/logic_nodes/objects/set_attribute/ln-local_orientation.png +.. figure:: /images/logic_nodes/objects/set_attribute/ln-set_local_orientation.png :align: right :width: 215 :alt: Set Local Orientation Node .. _ln-set_local_orientation: -============================= +============================== Set Local Orientation -============================= +============================== Parameters -++++++++++ +++++++++++++++++++++++++++++++ Set Attribute Local Orientation todo Inputs -++++++ +++++++++++++++++++++++++++++++ Condition Condition to be fulfilled for node to activate. @@ -31,7 +31,7 @@ Value todo Outputs -+++++++ +++++++++++++++++++++++++++++++ Done *True* if node performed successfully, else *False*. diff --git a/source/manual/logic_nodes/objects/set_attribute/set_local_position.rst b/source/manual/logic_nodes/objects/set_attribute/set_local_position.rst index 666f6654..aa218a7f 100644 --- a/source/manual/logic_nodes/objects/set_attribute/set_local_position.rst +++ b/source/manual/logic_nodes/objects/set_attribute/set_local_position.rst @@ -1,22 +1,22 @@ -.. figure:: /images/logic_nodes/objects/set_attribute/ln-local_position.png +.. figure:: /images/logic_nodes/objects/set_attribute/ln-set_local_position.png :align: right :width: 215 :alt: Set Local Position Node .. _ln-set_local_position: -============================= +============================== Set Local Position -============================= +============================== Parameters -++++++++++ +++++++++++++++++++++++++++++++ Set Attribute Local Position todo Inputs -++++++ +++++++++++++++++++++++++++++++ Condition Condition to be fulfilled for node to activate. @@ -31,7 +31,7 @@ Value todo Outputs -+++++++ +++++++++++++++++++++++++++++++ Done *True* if node performed successfully, else *False*. diff --git a/source/manual/logic_nodes/objects/set_attribute/set_local_transform.rst b/source/manual/logic_nodes/objects/set_attribute/set_local_transform.rst index 5941af50..4553610e 100644 --- a/source/manual/logic_nodes/objects/set_attribute/set_local_transform.rst +++ b/source/manual/logic_nodes/objects/set_attribute/set_local_transform.rst @@ -1,22 +1,22 @@ -.. figure:: /images/logic_nodes/objects/set_attribute/ln-local_transform.png +.. figure:: /images/logic_nodes/objects/set_attribute/ln-set_local_transform.png :align: right :width: 215 :alt: Set Local Transform Node .. _ln-set_local_transform: -============================= +============================== Set Local Transform -============================= +============================== Parameters -++++++++++ +++++++++++++++++++++++++++++++ Set Attribute Local Transform todo Inputs -++++++ +++++++++++++++++++++++++++++++ Condition Condition to be fulfilled for node to activate. @@ -31,7 +31,7 @@ Value todo Outputs -+++++++ +++++++++++++++++++++++++++++++ Done *True* if node performed successfully, else *False*. diff --git a/source/manual/logic_nodes/objects/set_attribute/set_name.rst b/source/manual/logic_nodes/objects/set_attribute/set_name.rst deleted file mode 100644 index ff1560d3..00000000 --- a/source/manual/logic_nodes/objects/set_attribute/set_name.rst +++ /dev/null @@ -1,32 +0,0 @@ -.. figure:: /images/logic_nodes/objects/set_attribute/ln-set_name.png - :align: right - :width: 215 - :alt: Set Name Node - -.. _ln-set_name: - -============================= -Set Name -============================= - -Parameters -++++++++++ - -prop - value - -Inputs -++++++ - -prop - value - -Outputs -+++++++ - -prop - value - -Example -+++++++ - diff --git a/source/manual/logic_nodes/objects/set_attribute/set_scale.rst b/source/manual/logic_nodes/objects/set_attribute/set_scale.rst deleted file mode 100644 index 81ae712f..00000000 --- a/source/manual/logic_nodes/objects/set_attribute/set_scale.rst +++ /dev/null @@ -1,32 +0,0 @@ -.. figure:: /images/logic_nodes/objects/set_attribute/ln-set_scale.png - :align: right - :width: 215 - :alt: Set Scale Node - -.. _ln-set_scale: - -============================= -Set Scale -============================= - -Parameters -++++++++++ - -prop - value - -Inputs -++++++ - -prop - value - -Outputs -+++++++ - -prop - value - -Example -+++++++ - diff --git a/source/manual/logic_nodes/objects/set_attribute/set_world_angular_velocity.rst b/source/manual/logic_nodes/objects/set_attribute/set_world_angular_velocity.rst index 1faf8d34..449ca602 100644 --- a/source/manual/logic_nodes/objects/set_attribute/set_world_angular_velocity.rst +++ b/source/manual/logic_nodes/objects/set_attribute/set_world_angular_velocity.rst @@ -1,22 +1,22 @@ -.. figure:: /images/logic_nodes/objects/set_attribute/ln-world_angular_velocity.png +.. figure:: /images/logic_nodes/objects/set_attribute/ln-set_world_angular_velocity.png :align: right :width: 215 :alt: Set World Angular Velocity Node .. _ln-set_world_angular_velocity: -============================= +============================== Set World Angular Velocity -============================= +============================== Parameters -++++++++++ +++++++++++++++++++++++++++++++ Set Attribute World Angular Velocity todo Inputs -++++++ +++++++++++++++++++++++++++++++ Condition Condition to be fulfilled for node to activate. @@ -31,7 +31,7 @@ Value todo Outputs -+++++++ +++++++++++++++++++++++++++++++ Done *True* if node performed successfully, else *False*. diff --git a/source/manual/logic_nodes/objects/set_attribute/set_world_linear_velocity.rst b/source/manual/logic_nodes/objects/set_attribute/set_world_linear_velocity.rst index 53c6a7ed..2893d7e5 100644 --- a/source/manual/logic_nodes/objects/set_attribute/set_world_linear_velocity.rst +++ b/source/manual/logic_nodes/objects/set_attribute/set_world_linear_velocity.rst @@ -1,22 +1,22 @@ -.. figure:: /images/logic_nodes/objects/set_attribute/ln-world_linear_velocity.png +.. figure:: /images/logic_nodes/objects/set_attribute/ln-set_world_linear_velocity.png :align: right :width: 215 :alt: Set World Linear Velocity Node .. _ln-set_world_linear_velocity: -============================= +============================== Set World Linear Velocity -============================= +============================== Parameters -++++++++++ +++++++++++++++++++++++++++++++ Set Attribute World Linear Velocity todo Inputs -++++++ +++++++++++++++++++++++++++++++ Condition Condition to be fulfilled for node to activate. @@ -31,7 +31,7 @@ Value todo Outputs -+++++++ +++++++++++++++++++++++++++++++ Done *True* if node performed successfully, else *False*. diff --git a/source/manual/logic_nodes/objects/set_attribute/set_world_orientation.rst b/source/manual/logic_nodes/objects/set_attribute/set_world_orientation.rst index 65cb1aa8..32796e02 100644 --- a/source/manual/logic_nodes/objects/set_attribute/set_world_orientation.rst +++ b/source/manual/logic_nodes/objects/set_attribute/set_world_orientation.rst @@ -1,22 +1,22 @@ -.. figure:: /images/logic_nodes/objects/set_attribute/ln-world_orientation.png +.. figure:: /images/logic_nodes/objects/set_attribute/ln-set_world_orientation.png :align: right :width: 215 :alt: Set World Orientation Node .. _ln-set_world_orientation: -======================= +============================== Set World Orientation -======================= +============================== Parameters -++++++++++ +++++++++++++++++++++++++++++++ Set Attribute World Orientation todo Inputs -++++++ +++++++++++++++++++++++++++++++ Condition Condition to be fulfilled for node to activate. @@ -31,7 +31,7 @@ Value todo Outputs -+++++++ +++++++++++++++++++++++++++++++ Done *True* if node performed successfully, else *False*. diff --git a/source/manual/logic_nodes/objects/set_attribute/set_world_position.rst b/source/manual/logic_nodes/objects/set_attribute/set_world_position.rst index adeede10..07bc2f28 100644 --- a/source/manual/logic_nodes/objects/set_attribute/set_world_position.rst +++ b/source/manual/logic_nodes/objects/set_attribute/set_world_position.rst @@ -1,22 +1,22 @@ -.. figure:: /images/logic_nodes/objects/set_attribute/ln-world_position.png +.. figure:: /images/logic_nodes/objects/set_attribute/ln-set_world_position.png :align: right :width: 215 :alt: Set World Position Node .. _ln-set_world_position: -======================= +============================== Set World Position -======================= +============================== Parameters -++++++++++ +++++++++++++++++++++++++++++++ Set Attribute World Position todo Inputs -++++++ +++++++++++++++++++++++++++++++ Condition Condition to be fulfilled for node to activate. @@ -31,7 +31,7 @@ Value todo Outputs -+++++++ +++++++++++++++++++++++++++++++ Done *True* if node performed successfully, else *False*. diff --git a/source/manual/logic_nodes/objects/set_attribute/set_world_scale.rst b/source/manual/logic_nodes/objects/set_attribute/set_world_scale.rst index 4c669c40..b5b7f844 100644 --- a/source/manual/logic_nodes/objects/set_attribute/set_world_scale.rst +++ b/source/manual/logic_nodes/objects/set_attribute/set_world_scale.rst @@ -1,22 +1,22 @@ -.. figure:: /images/logic_nodes/objects/set_attribute/ln-world_scale.png +.. figure:: /images/logic_nodes/objects/set_attribute/ln-set_world_scale.png :align: right :width: 215 :alt: Set World Scale Node .. _ln-set_world_scale: -============================= +============================== Set World Scale -============================= +============================== Parameters -++++++++++ +++++++++++++++++++++++++++++++ Set Attribute World Scale todo Inputs -++++++ +++++++++++++++++++++++++++++++ Condition Condition to be fulfilled for node to activate. @@ -31,7 +31,7 @@ Value todo Outputs -+++++++ +++++++++++++++++++++++++++++++ Done *True* if node performed successfully, else *False*. diff --git a/source/manual/logic_nodes/objects/set_attribute/set_world_transform.rst b/source/manual/logic_nodes/objects/set_attribute/set_world_transform.rst index 5686800b..17bfe1bb 100644 --- a/source/manual/logic_nodes/objects/set_attribute/set_world_transform.rst +++ b/source/manual/logic_nodes/objects/set_attribute/set_world_transform.rst @@ -1,22 +1,22 @@ -.. figure:: /images/logic_nodes/objects/set_attribute/ln-world_transform.png +.. figure:: /images/logic_nodes/objects/set_attribute/ln-set_world_transform.png :align: right :width: 215 :alt: Set World Transform Node .. _ln-set_world_transform: -============================= +============================== Set World Transform -============================= +============================== Parameters -++++++++++ +++++++++++++++++++++++++++++++ Set Attribute World Transform todo Inputs -++++++ +++++++++++++++++++++++++++++++ Condition Condition to be fulfilled for node to activate. @@ -31,7 +31,7 @@ Value todo Outputs -+++++++ +++++++++++++++++++++++++++++++ Done *True* if node performed successfully, else *False*. diff --git a/source/manual/logic_nodes/objects/set_material.rst b/source/manual/logic_nodes/objects/set_material.rst index fe792268..a136f63a 100644 --- a/source/manual/logic_nodes/objects/set_material.rst +++ b/source/manual/logic_nodes/objects/set_material.rst @@ -5,12 +5,12 @@ .. _ln-set_material: -====================== +============================== Set Material -====================== +============================== Inputs -++++++ +++++++++++++++++++++++++++++++ Condition Which condition is used for node to activate. @@ -25,7 +25,7 @@ Material Which material to set. Outputs -+++++++ +++++++++++++++++++++++++++++++ Done *True* if the node performed successfully, else *False*. diff --git a/source/manual/logic_nodes/objects/set_parent.rst b/source/manual/logic_nodes/objects/set_parent.rst index 11da8d22..364dbfdc 100644 --- a/source/manual/logic_nodes/objects/set_parent.rst +++ b/source/manual/logic_nodes/objects/set_parent.rst @@ -5,12 +5,12 @@ .. _ln-set_parent: -====================== +============================== Set Parent -====================== +============================== Inputs -++++++ +++++++++++++++++++++++++++++++ Condition Which condition is used for node to activate. @@ -22,7 +22,7 @@ Parent Object An object that will become a parent. Congratulations! Outputs -+++++++ +++++++++++++++++++++++++++++++ Done *True* if the node performed successfully, else *False*. diff --git a/source/manual/logic_nodes/objects/set_visibility.rst b/source/manual/logic_nodes/objects/set_visibility.rst index 766e91ce..5223e74e 100644 --- a/source/manual/logic_nodes/objects/set_visibility.rst +++ b/source/manual/logic_nodes/objects/set_visibility.rst @@ -5,12 +5,12 @@ .. _ln-set_visibility: -====================== +============================== Set Visibility -====================== +============================== Inputs -++++++ +++++++++++++++++++++++++++++++ Condition Which condition is used for node to activate. @@ -22,7 +22,7 @@ Visible If checked, set *Visible* state, else set not *Visible State*. Outputs -+++++++ +++++++++++++++++++++++++++++++ Done *True* if the node performed successfully, else *False*. diff --git a/source/manual/logic_nodes/objects/spawn_pool.rst b/source/manual/logic_nodes/objects/spawn_pool.rst index 107db32c..01fbb10f 100644 --- a/source/manual/logic_nodes/objects/spawn_pool.rst +++ b/source/manual/logic_nodes/objects/spawn_pool.rst @@ -5,21 +5,21 @@ .. _ln-spawn_pool: -====================== +============================== Spawn Pool -====================== +============================== Parameters -++++++++++ +++++++++++++++++++++++++++++++ + +On Startup + If selected, pool will be spawn on game start. Spawn Behavior Selected behavior of spawn pool. Inputs -++++++ - -On Startup - If selected, pool will be spawn on game start. +++++++++++++++++++++++++++++++ Spawn todo @@ -40,7 +40,7 @@ Visualize todo Outputs -+++++++ +++++++++++++++++++++++++++++++ Spawned todo diff --git a/source/manual/logic_nodes/objects/transformation/align_axis_to_vector.rst b/source/manual/logic_nodes/objects/transformation/align_axis_to_vector.rst index ea8d8300..e043ffca 100644 --- a/source/manual/logic_nodes/objects/transformation/align_axis_to_vector.rst +++ b/source/manual/logic_nodes/objects/transformation/align_axis_to_vector.rst @@ -5,18 +5,21 @@ .. _ln-align_axis_to_vector: -==================== +============================== Align Axis to Vector -==================== +============================== -Input -+++++ +Properties +++++++++++++++++++++++++++++++ Local Direction of the object will be the same direction that the vector has, in relation to the *World Origin*. If vector is in a certain position relative to *World Origin*, object will receive the same angulation in this relation: *World Origin* to *Object*. +Input +++++++++++++++++++++++++++++++ + Condition The condition for this node to start. @@ -33,7 +36,7 @@ Factor Each time this node is activated (through *Condition*), the object will rotate to its destination by a certain amount. It can be completed in just one activation (Factor: 1.00) or up to 100 activations (Factor: 0.01). Any other value can be written between 0 and 1. Output -++++++ +++++++++++++++++++++++++++++++ Done *True* if the node performed successfully, else *False*. diff --git a/source/manual/logic_nodes/objects/transformation/apply_force.rst b/source/manual/logic_nodes/objects/transformation/apply_force.rst index 69b9d518..86245960 100644 --- a/source/manual/logic_nodes/objects/transformation/apply_force.rst +++ b/source/manual/logic_nodes/objects/transformation/apply_force.rst @@ -5,9 +5,9 @@ .. _ln-apply_force: -============== +============================== Apply Force -============== +============================== Applies an offset force to an object on any axis of the Cartesian plane. To function properly, the object must have a physical property that enables displacement. @@ -19,12 +19,18 @@ Applies an offset force to an object on any axis of the Cartesian plane. To func The node applies force to the entire object. In contrast, the :ref:`Apply Impulse ` node applies force at a specific point. -Input -+++++ +Parameters +++++++++++++++++++++++++++++++ + +Mode + Selected mode of operation. Local If checked, force will be applied in the direction of the object's local axes, else of the object's global axes. +Input +++++++++++++++++++++++++++++++ + Condition The condition for this node to start. @@ -35,7 +41,7 @@ Vector Value of the force that will be applied to the object, by the direction of the axes in the Cartesian plane. It can be a value referring to the axes of the world (global) or the axes of the object (local). Output -++++++ +++++++++++++++++++++++++++++++ Done *True* if the node performed successfully, else *False*. diff --git a/source/manual/logic_nodes/objects/transformation/apply_impulse.rst b/source/manual/logic_nodes/objects/transformation/apply_impulse.rst index f08b0d93..48f3d2ea 100644 --- a/source/manual/logic_nodes/objects/transformation/apply_impulse.rst +++ b/source/manual/logic_nodes/objects/transformation/apply_impulse.rst @@ -5,9 +5,9 @@ .. _ln-apply_impulse: -============== +============================== Apply Impulse -============== +============================== Applies a displacement force that has an origin (*point*) and a *direction*. To function properly, the object must have a physical property that enables displacement. @@ -20,17 +20,17 @@ Applies a displacement force that has an origin (*point*) and a *direction*. To This node applies force at a specific point. In contrast, the :ref:`Apply Force ` node applies force in entire object. Parameters -++++++++++ +++++++++++++++++++++++++++++++ Mode Selected mode of operation to apply. -Input -+++++ - Local If checked, object's local axes will be used, else global axes are used. +Input +++++++++++++++++++++++++++++++ + Condition The condition for this node to start. @@ -44,7 +44,7 @@ Direction The direction in which impulse will be applied. todo Output -++++++ +++++++++++++++++++++++++++++++ Done *True* if the node performed successfully, else *False*. diff --git a/source/manual/logic_nodes/objects/transformation/apply_movement.rst b/source/manual/logic_nodes/objects/transformation/apply_movement.rst index 6638a0fd..dfba2c44 100644 --- a/source/manual/logic_nodes/objects/transformation/apply_movement.rst +++ b/source/manual/logic_nodes/objects/transformation/apply_movement.rst @@ -5,9 +5,9 @@ .. _ln-apply_movement: -============== +============================== Apply Movement -============== +============================== Moves the object a certain vector-defined distance. Does not apply acceleration. @@ -16,17 +16,17 @@ The object is still subject to other forces while the motion is being applied, s The node can be applied to some types of physical properties, i.e. :doc:`Game Physics `. Parameters -++++++++++ +++++++++++++++++++++++++++++++ Mode Selected mode of operation. -Input -+++++ - Local If checked, local coordinates will be used. +Input +++++++++++++++++++++++++++++++ + Condition The condition for this node to start. @@ -37,7 +37,7 @@ Vector The amount of displacement that will be applied to the object. Output -++++++ +++++++++++++++++++++++++++++++ Done *True* if the node performed successfully else *False*. diff --git a/source/manual/logic_nodes/objects/transformation/apply_rotation.rst b/source/manual/logic_nodes/objects/transformation/apply_rotation.rst index 6eaff344..4a39e83c 100644 --- a/source/manual/logic_nodes/objects/transformation/apply_rotation.rst +++ b/source/manual/logic_nodes/objects/transformation/apply_rotation.rst @@ -5,26 +5,26 @@ .. _ln-apply_rotation: -============== +============================== Apply Rotation -============== +============================== Rotates an object a certain vector-defined angulation. Each time this node is activated, the defined rotation will happen. See also :ref:`Rotate To `. Parameters -++++++++++ +++++++++++++++++++++++++++++++ Mode Selected mode of operation. -Input -+++++ - Local The rotation will be applied following the object's local axes. +Input +++++++++++++++++++++++++++++++ + Condition The condition for this node to start. @@ -35,7 +35,7 @@ Vector The value that will be applied to the rotation in degrees. Output -++++++ +++++++++++++++++++++++++++++++ Done *True* if the node performed successfully. diff --git a/source/manual/logic_nodes/objects/transformation/apply_torque.rst b/source/manual/logic_nodes/objects/transformation/apply_torque.rst index 2606af68..050710b8 100644 --- a/source/manual/logic_nodes/objects/transformation/apply_torque.rst +++ b/source/manual/logic_nodes/objects/transformation/apply_torque.rst @@ -5,9 +5,9 @@ .. _ln-apply_torque: -============== +============================== Apply Torque -============== +============================== Rotates an object using torque mechanics and tries to follow real-world physical rules. It uses the Newton-meter as a unit of measure (torque = force x length of the lever). @@ -21,17 +21,17 @@ If the object has some kind of :doc:`Collision Bounds `_ or a `Rigid Body Joint Constraint `_. Properties -++++++++++ +++++++++++++++++++++++++++++++ Mode Selected mode of operation to apply. -Input -+++++ - Local If checked, *Torque* will be applied following the object's local axes, else global axes. +Input +++++++++++++++++++++++++++++++ + Condition The condition for this node to start. @@ -42,7 +42,7 @@ Vector The value that will be applied to the rotation in Newton-meters. Output -++++++ +++++++++++++++++++++++++++++++ Done *True* if the node performed successfully, else *False*. diff --git a/source/manual/logic_nodes/objects/transformation/follow_path.rst b/source/manual/logic_nodes/objects/transformation/follow_path.rst index d636ffb1..41cc5573 100644 --- a/source/manual/logic_nodes/objects/transformation/follow_path.rst +++ b/source/manual/logic_nodes/objects/transformation/follow_path.rst @@ -5,14 +5,14 @@ .. _ln-follow_path: -============== +============================== Follow Path -============== +============================== Select an object to move through the points of a Nurbs Curve. Only works in conjunction with :ref:`Get Curve Points `. Use on `NPCs `_ that need to walk around. Input -+++++ +++++++++++++++++++++++++++++++ Condition The condition for this node to start. @@ -65,7 +65,7 @@ Front Which axis is the front of the object. Output -++++++ +++++++++++++++++++++++++++++++ Done *True* if the node performed successfully, else *False*. diff --git a/source/manual/logic_nodes/objects/transformation/index.rst b/source/manual/logic_nodes/objects/transformation/index.rst index 568cbf5b..9e39ec04 100644 --- a/source/manual/logic_nodes/objects/transformation/index.rst +++ b/source/manual/logic_nodes/objects/transformation/index.rst @@ -1,8 +1,8 @@ .. _ln-objects-transformation-index: -============== +============================== Transformation -============== +============================== .. toctree:: :maxdepth: 1 diff --git a/source/manual/logic_nodes/objects/transformation/move_to.rst b/source/manual/logic_nodes/objects/transformation/move_to.rst index 8980554e..9c539cab 100644 --- a/source/manual/logic_nodes/objects/transformation/move_to.rst +++ b/source/manual/logic_nodes/objects/transformation/move_to.rst @@ -5,14 +5,14 @@ .. _ln-move_to: -============== +============================== Move To -============== +============================== Moves a selected object to a specific location in the scene. Input -+++++ +++++++++++++++++++++++++++++++ Condition The condition for this node to start. @@ -33,7 +33,7 @@ Stop At Distance A distance that the object needs to be close to the *Target Location*, to complete the move. Output -++++++ +++++++++++++++++++++++++++++++ Done *True* if the node performed successfully, else *False*. diff --git a/source/manual/logic_nodes/objects/transformation/move_to_with_navmesh.rst b/source/manual/logic_nodes/objects/transformation/move_to_with_navmesh.rst index d79046b3..f66674a3 100644 --- a/source/manual/logic_nodes/objects/transformation/move_to_with_navmesh.rst +++ b/source/manual/logic_nodes/objects/transformation/move_to_with_navmesh.rst @@ -5,9 +5,9 @@ .. _ln-move_to_with_navmesh: -====================== +============================== Move To with Navmesh -====================== +============================== Moves an object in a space delimited by :ref:`Navigation Mesh `. @@ -16,7 +16,7 @@ Moves an object in a space delimited by :ref:`Navigation Mesh `. Input -+++++ +++++++++++++++++++++++++++++++ Condition Condition for this node to start. @@ -35,7 +35,7 @@ Front Which axis is the front of the object. Output -++++++ +++++++++++++++++++++++++++++++ Done *True* if the node performed successfully, else *False*. diff --git a/source/manual/logic_nodes/objects/transformation/slow_follow.rst b/source/manual/logic_nodes/objects/transformation/slow_follow.rst index 9373e029..98f30127 100644 --- a/source/manual/logic_nodes/objects/transformation/slow_follow.rst +++ b/source/manual/logic_nodes/objects/transformation/slow_follow.rst @@ -5,9 +5,9 @@ .. _ln-slow_follow: -============== +============================== Slow Follow -============== +============================== todo - check description Rotates a selected object to a specific angle instantly. Applies rotation only on a single axis and fixed angulation in the world. @@ -15,13 +15,13 @@ Rotates a selected object to a specific angle instantly. Applies rotation only o See also :ref:`Apply Rotation `. Parameters -++++++++++ +++++++++++++++++++++++++++++++ Atrribute Selected attribute. Input -+++++ +++++++++++++++++++++++++++++++ Condition Condition for this node to start. @@ -36,7 +36,7 @@ Factor todo Output -++++++ +++++++++++++++++++++++++++++++ Done *True* if the node performed successfully, else *False*. diff --git a/source/manual/logic_nodes/physics/add_constraint.rst b/source/manual/logic_nodes/physics/add_constraint.rst index 4a199521..d9a598a3 100644 --- a/source/manual/logic_nodes/physics/add_constraint.rst +++ b/source/manual/logic_nodes/physics/add_constraint.rst @@ -5,18 +5,18 @@ .. _ln-add_constraint: -==================== +============================== Add Constraint -==================== +============================== Parameters -++++++++++ +++++++++++++++++++++++++++++++ Constraint Type Selected constraint type to add. Inputs -++++++ +++++++++++++++++++++++++++++++ Condition If connected, condition must be fulfilled for node to activate. @@ -40,7 +40,7 @@ Linked Collision todo Outputs -+++++++ +++++++++++++++++++++++++++++++ Done *True* if node performed successfully, else *False*. diff --git a/source/manual/logic_nodes/physics/character/get_physics_info.rst b/source/manual/logic_nodes/physics/character/get_physics_info.rst index 39b29649..bacaddd7 100644 --- a/source/manual/logic_nodes/physics/character/get_physics_info.rst +++ b/source/manual/logic_nodes/physics/character/get_physics_info.rst @@ -5,21 +5,24 @@ .. _ln-get_physics_info: -==================== +============================== Get Physics Info -==================== +============================== -Inputs -++++++ +Parameters +++++++++++++++++++++++++++++++ Local todo +Inputs +++++++++++++++++++++++++++++++ + Object Which character object to use. Outputs -+++++++ +++++++++++++++++++++++++++++++ Max Jumps Max allowed jumps while character is in the air. todo diff --git a/source/manual/logic_nodes/physics/character/index.rst b/source/manual/logic_nodes/physics/character/index.rst index dc6f47ae..59e28170 100644 --- a/source/manual/logic_nodes/physics/character/index.rst +++ b/source/manual/logic_nodes/physics/character/index.rst @@ -1,8 +1,8 @@ .. _ln-physics-character-index: -========== +============================== Character -========== +============================== .. toctree:: :maxdepth: 1 diff --git a/source/manual/logic_nodes/physics/character/jump.rst b/source/manual/logic_nodes/physics/character/jump.rst index 4ba2e432..48b3d4b5 100644 --- a/source/manual/logic_nodes/physics/character/jump.rst +++ b/source/manual/logic_nodes/physics/character/jump.rst @@ -5,12 +5,12 @@ .. _ln-jump: -==================== +============================== Jump -==================== +============================== Inputs -++++++ +++++++++++++++++++++++++++++++ Condition If connected, condition must be fulfilled for node to activate. @@ -19,7 +19,7 @@ Object Which object to use as character. Outputs -+++++++ +++++++++++++++++++++++++++++++ Done *True* if node performed successfully, else *False*. diff --git a/source/manual/logic_nodes/physics/character/set_jump_force.rst b/source/manual/logic_nodes/physics/character/set_jump_force.rst index 58ee0fb5..a070a955 100644 --- a/source/manual/logic_nodes/physics/character/set_jump_force.rst +++ b/source/manual/logic_nodes/physics/character/set_jump_force.rst @@ -5,12 +5,12 @@ .. _ln-set_jump_force: -==================== +============================== Set Jump Force -==================== +============================== Inputs -++++++ +++++++++++++++++++++++++++++++ Condition If connected, condition must be fulfilled for node to activate. @@ -22,7 +22,7 @@ Force Force to apply to jump. Outputs -+++++++ +++++++++++++++++++++++++++++++ Done *True* if node performed successfully, else *False*. diff --git a/source/manual/logic_nodes/physics/character/set_max_jumps.rst b/source/manual/logic_nodes/physics/character/set_max_jumps.rst index 50133919..1ecf49a1 100644 --- a/source/manual/logic_nodes/physics/character/set_max_jumps.rst +++ b/source/manual/logic_nodes/physics/character/set_max_jumps.rst @@ -5,12 +5,12 @@ .. _ln-set_max_jumps: -==================== +============================== Set Max Jumps -==================== +============================== Inputs -++++++ +++++++++++++++++++++++++++++++ Condition If connected, condition must be fulfilled for node to activate. @@ -22,7 +22,7 @@ Max Jumps Max allowed number of jumps while character is in the air. todo Outputs -+++++++ +++++++++++++++++++++++++++++++ Done *True* if node performed successfully, else *False*. diff --git a/source/manual/logic_nodes/physics/character/set_velocity.rst b/source/manual/logic_nodes/physics/character/set_velocity.rst index 96bac019..674c9f01 100644 --- a/source/manual/logic_nodes/physics/character/set_velocity.rst +++ b/source/manual/logic_nodes/physics/character/set_velocity.rst @@ -5,15 +5,18 @@ .. _ln-set_velocity: -==================== +============================== Set Velocity -==================== +============================== -Inputs -++++++ +Parameters +++++++++++++++++++++++++++++++ Local - Use character's local axisg. + Use character's local axis. + +Inputs +++++++++++++++++++++++++++++++ Condition If connected, condition must be fulfilled for node to activate. @@ -28,7 +31,7 @@ Time todo Outputs -+++++++ +++++++++++++++++++++++++++++++ Done *True* if node performed successfully, else *False*. diff --git a/source/manual/logic_nodes/physics/character/walk.rst b/source/manual/logic_nodes/physics/character/walk.rst index d68f490b..6d2b092e 100644 --- a/source/manual/logic_nodes/physics/character/walk.rst +++ b/source/manual/logic_nodes/physics/character/walk.rst @@ -5,27 +5,40 @@ .. _ln-walk: -==================== +============================== Walk -==================== +============================== -Inputs -++++++ +Parameters +++++++++++++++++++++++++++++++ Local Use character's local axis for walking. +Inputs +++++++++++++++++++++++++++++++ + Condition If connected, condition must be fulfilled for node to activate. Object - Which object to use as character. + Which character to use. Vector Vector3 values for walking to apply. todo Outputs -+++++++ +++++++++++++++++++++++++++++++ Done *True* if node performed successfully, else *False*. + +Example +++++++++++++++++++++++++++++++ + +.. figure:: /images/logic_nodes/physics/character/ln-walk-example.png + :align: center + :figwidth: 80% + :alt: Walk Node + + Walk node at the end of the 4-Key Template diff --git a/source/manual/logic_nodes/physics/collision.rst b/source/manual/logic_nodes/physics/collision.rst index 04aebb9b..83aea412 100644 --- a/source/manual/logic_nodes/physics/collision.rst +++ b/source/manual/logic_nodes/physics/collision.rst @@ -5,18 +5,21 @@ .. _ln-collision: -=============== +============================== Collision -=============== +============================== -Inputs -++++++ +Parameters +++++++++++++++++++++++++++++++ Continuous Monitor for continuous collision, not just initial one. +Inputs +++++++++++++++++++++++++++++++ + Object - Which object to use for follision. + Which object to use for collision. Use Material Which material to use. @@ -25,7 +28,7 @@ Property todo Outputs -+++++++ +++++++++++++++++++++++++++++++ On Collision What to trigger when collision happens. todo diff --git a/source/manual/logic_nodes/physics/index.rst b/source/manual/logic_nodes/physics/index.rst index c3b163a9..cb1e9d77 100644 --- a/source/manual/logic_nodes/physics/index.rst +++ b/source/manual/logic_nodes/physics/index.rst @@ -1,8 +1,8 @@ .. _ln-physics-index: -======== +============================== Physics -======== +============================== .. toctree:: :maxdepth: 1 @@ -15,6 +15,6 @@ Physics add_constraint remove_constraint set_physics - set_gravity + set_character_gravity set_dynamics set_rigid_body diff --git a/source/manual/logic_nodes/physics/remove_constraint.rst b/source/manual/logic_nodes/physics/remove_constraint.rst index b0bb59f6..cd7e35e1 100644 --- a/source/manual/logic_nodes/physics/remove_constraint.rst +++ b/source/manual/logic_nodes/physics/remove_constraint.rst @@ -5,12 +5,12 @@ .. _ln-remove_constraint: -==================== +============================== Remove Constraint -==================== +============================== Inputs -++++++ +++++++++++++++++++++++++++++++ Condition If connected, condition must be fulfilled for node to activate. @@ -22,7 +22,7 @@ Name todo Outputs -+++++++ +++++++++++++++++++++++++++++++ Done *True* if node performed successfully, else *False*. diff --git a/source/manual/logic_nodes/physics/set_gravity.rst b/source/manual/logic_nodes/physics/set_character_gravity.rst similarity index 53% rename from source/manual/logic_nodes/physics/set_gravity.rst rename to source/manual/logic_nodes/physics/set_character_gravity.rst index 72cbf7b1..566bdafb 100644 --- a/source/manual/logic_nodes/physics/set_gravity.rst +++ b/source/manual/logic_nodes/physics/set_character_gravity.rst @@ -1,16 +1,16 @@ -.. figure:: /images/logic_nodes/physics/ln-set_gravity.png +.. figure:: /images/logic_nodes/physics/ln-set_character_gravity.png :align: right :width: 215 :alt: Set Gravity Node -.. _ln-physics_set_gravity: +.. _ln-set_character_gravity: -==================== -Set Gravity -==================== +============================== +Set Character Gravity +============================== Inputs -++++++ +++++++++++++++++++++++++++++++ Condition If connected, condition must be fulfilled for node to activate. @@ -22,7 +22,7 @@ Gravity Gravity to set. Outputs -+++++++ +++++++++++++++++++++++++++++++ Done *True* if node performed successfully, else *False*. diff --git a/source/manual/logic_nodes/physics/set_collision_group.rst b/source/manual/logic_nodes/physics/set_collision_group.rst index 2f3d2f4c..10bbc416 100644 --- a/source/manual/logic_nodes/physics/set_collision_group.rst +++ b/source/manual/logic_nodes/physics/set_collision_group.rst @@ -5,18 +5,18 @@ .. _ln-set_collision_group: -==================== +============================== Set Collision Group -==================== +============================== Parameters -++++++++++ +++++++++++++++++++++++++++++++ Mode Selected mode for collision group node. Inputs -++++++ +++++++++++++++++++++++++++++++ Condition If connected, condition must be fulfilled for node to activate. @@ -25,10 +25,10 @@ Object Which object to use todo. Mask - todo + 16 layers available to set collision on. Hold :kbd:`Shift` and :kbd:`LMB`-drag over the layers to select multiple. todo Outputs -+++++++ +++++++++++++++++++++++++++++++ Done *True* if node performed successfully, else *False*. diff --git a/source/manual/logic_nodes/physics/set_collision_mask.rst b/source/manual/logic_nodes/physics/set_collision_mask.rst index 9f011655..7a2e8fab 100644 --- a/source/manual/logic_nodes/physics/set_collision_mask.rst +++ b/source/manual/logic_nodes/physics/set_collision_mask.rst @@ -5,12 +5,12 @@ .. _ln-set_collision_mask: -==================== +============================== Set Collision Mask -==================== +============================== Inputs -++++++ +++++++++++++++++++++++++++++++ Condition If connected, condition must be fulfilled for node to activate. @@ -19,10 +19,10 @@ Object Which object to use todo. Mask - todo + 16 layers available to set collision on. Hold :kbd:`Shift` and :kbd:`LMB`-drag over the layers to select multiple. todo Outputs -+++++++ +++++++++++++++++++++++++++++++ Done *True* if node performed successfully, else *False*. diff --git a/source/manual/logic_nodes/physics/set_dynamics.rst b/source/manual/logic_nodes/physics/set_dynamics.rst index 146259d7..d2fdc8a1 100644 --- a/source/manual/logic_nodes/physics/set_dynamics.rst +++ b/source/manual/logic_nodes/physics/set_dynamics.rst @@ -5,12 +5,12 @@ .. _ln-set_dynamics: -==================== +============================== Set Dynamics -==================== +============================== Inputs -++++++ +++++++++++++++++++++++++++++++ Condition If connected, condition must be fulfilled for node to activate. @@ -25,7 +25,7 @@ Ghost todo Outputs -+++++++ +++++++++++++++++++++++++++++++ Done *True* if node performed successfully, else *False*. diff --git a/source/manual/logic_nodes/physics/set_physics.rst b/source/manual/logic_nodes/physics/set_physics.rst index 0337a06b..569b1d7d 100644 --- a/source/manual/logic_nodes/physics/set_physics.rst +++ b/source/manual/logic_nodes/physics/set_physics.rst @@ -5,12 +5,12 @@ .. _ln-set_physics: -==================== +============================== Set Physics -==================== +============================== Inputs -++++++ +++++++++++++++++++++++++++++++ Condition If connected, condition must be fulfilled for node to activate. @@ -25,7 +25,7 @@ Cut Constraints todo Outputs -+++++++ +++++++++++++++++++++++++++++++ Done *True* if node performed successfully, else *False*. diff --git a/source/manual/logic_nodes/physics/set_rigid_body.rst b/source/manual/logic_nodes/physics/set_rigid_body.rst index 3e9a5a7e..09f8606e 100644 --- a/source/manual/logic_nodes/physics/set_rigid_body.rst +++ b/source/manual/logic_nodes/physics/set_rigid_body.rst @@ -5,12 +5,12 @@ .. _ln-set_rigid_body: -==================== +============================== Set Rigid Body -==================== +============================== Inputs -++++++ +++++++++++++++++++++++++++++++ Condition If connected, condition must be fulfilled for node to activate. @@ -22,7 +22,7 @@ Enabled todo Outputs -+++++++ +++++++++++++++++++++++++++++++ Done *True* if node performed successfully, else *False*. diff --git a/source/manual/logic_nodes/physics/vehicle/accelerate.rst b/source/manual/logic_nodes/physics/vehicle/accelerate.rst index 4d842290..ea0206d2 100644 --- a/source/manual/logic_nodes/physics/vehicle/accelerate.rst +++ b/source/manual/logic_nodes/physics/vehicle/accelerate.rst @@ -5,18 +5,18 @@ .. _ln-accelerate: -==================== +============================== Accelerate -==================== +============================== Parameters -++++++++++ +++++++++++++++++++++++++++++++ Axis Selected axis of vehicle wheels. Inputs -++++++ +++++++++++++++++++++++++++++++ Condition If connected, condition must be fulfilled for node to activate. @@ -31,7 +31,7 @@ Power Applied power to selected axis. Outputs -+++++++ +++++++++++++++++++++++++++++++ Done *True* if node performed successfully, else *False*. diff --git a/source/manual/logic_nodes/physics/vehicle/brake.rst b/source/manual/logic_nodes/physics/vehicle/brake.rst index 29d5f47e..76f25324 100644 --- a/source/manual/logic_nodes/physics/vehicle/brake.rst +++ b/source/manual/logic_nodes/physics/vehicle/brake.rst @@ -5,18 +5,18 @@ .. _ln-brake: -==================== +============================== Brake -==================== +============================== Parameters -++++++++++ +++++++++++++++++++++++++++++++ Axis Selected axis of vehicle wheels. Inputs -++++++ +++++++++++++++++++++++++++++++ Condition If connected, condition must be fulfilled for node to activate. @@ -31,7 +31,7 @@ Power Applied power to selected axis. Outputs -+++++++ +++++++++++++++++++++++++++++++ Done *True* if node performed successfully, else *False*. diff --git a/source/manual/logic_nodes/physics/vehicle/create_new_vehicle.rst b/source/manual/logic_nodes/physics/vehicle/create_new_vehicle.rst index 647dc70c..d4c7b712 100644 --- a/source/manual/logic_nodes/physics/vehicle/create_new_vehicle.rst +++ b/source/manual/logic_nodes/physics/vehicle/create_new_vehicle.rst @@ -5,42 +5,62 @@ .. _ln-create_new_vehicle: -==================== +============================== Create New Vehicle -==================== +============================== + +Attaches a vehicle constraint to an object. This object will become the collider for the vehicle. + +.. important:: + This node needs a specific object setup to work correctly. A vehicle needs to be ceated only once, otherwise the vehicle control nodes won't be able to address the correct constraint. Of course, there must be the collider object. This will be the object executing the tree. Parented directly to this collider must be all the wheels. + + The wheels must follow a naming convention: + + If ``FWheel`` appears somewhere in the wheels name, it will be a ``front`` mounted wheel. + + If ``RWheel`` appears somewhere in the wheels name, it will be a ``rear`` mounted wheel. + +Wheels will be mounted in the position they are placed at, but the difference is that vehicle control nodes can be targeted to either front, rear or all wheels, which are accessed differently. + +The collider may have any number of wheels. It may also have other children, as everything not named *FWheel* or *RWheel* will be ignored. + +The node will return a vehicle constraint which can be used to drive the vehicle or modify its attributes. This constraint will also be automatically saved to the collider object and can be accessed via:: + + # obj is the collider object + vehicle_constraint = obj['_vconst'] Inputs -++++++ +++++++++++++++++++++++++++++++ Condition If connected, condition must be fulfilled for node to activate. Collider - Object that will act as collider for vehicle. todo + Object that will act as collider for vehicle. Suspension - Vehicle suspension settings. + Vehicle suspension height. Stiffness - Vehicle suspension stiffness. todo + Vehicle suspension stiffness, will determine how much vehicle `wiggles`. Damping - Vehicle suspension damping. todo + The rate at which suspension activity will subside. Friction - Vehicle wheels friction. todo + The grip of the wheel. Pavement would be a higher value than mud. Wheel Modifier todo Outputs -+++++++ +++++++++++++++++++++++++++++++ Done *True* if node performed successfully, else *False*. Vehicle Constraint - todo + A vehicle constraint. Wheels - A list of . todo + A list of wheel objects. diff --git a/source/manual/logic_nodes/physics/vehicle/index.rst b/source/manual/logic_nodes/physics/vehicle/index.rst index 044fe241..c00dda3b 100644 --- a/source/manual/logic_nodes/physics/vehicle/index.rst +++ b/source/manual/logic_nodes/physics/vehicle/index.rst @@ -1,8 +1,8 @@ .. _ln-physics-vehicle-index: -========== +============================== Vehicle -========== +============================== .. toctree:: :maxdepth: 1 diff --git a/source/manual/logic_nodes/physics/vehicle/set_vehicle_attribute.rst b/source/manual/logic_nodes/physics/vehicle/set_vehicle_attribute.rst index 93d30dbb..f0d2193b 100644 --- a/source/manual/logic_nodes/physics/vehicle/set_vehicle_attribute.rst +++ b/source/manual/logic_nodes/physics/vehicle/set_vehicle_attribute.rst @@ -5,18 +5,18 @@ .. _ln-set_vehicle_attribute: -===================== +============================== Set Vehicle Attribute -===================== +============================== Parameters -++++++++++ +++++++++++++++++++++++++++++++ Axis Selected vehicle wheels axis. Inputs -++++++ +++++++++++++++++++++++++++++++ Condition If connected, condition must be fulfilled for node to activate. @@ -40,7 +40,7 @@ Friction Vehicle wheels friction. todo Outputs -+++++++ +++++++++++++++++++++++++++++++ Done *True* if node performed successfully, else *False*. diff --git a/source/manual/logic_nodes/physics/vehicle/steer.rst b/source/manual/logic_nodes/physics/vehicle/steer.rst index a64735fb..2bad58d4 100644 --- a/source/manual/logic_nodes/physics/vehicle/steer.rst +++ b/source/manual/logic_nodes/physics/vehicle/steer.rst @@ -5,18 +5,18 @@ .. _ln-steer: -===================== +============================== Steer -===================== +============================== Parameters -++++++++++ +++++++++++++++++++++++++++++++ Axis Selected vehicle wheels axis. Inputs -++++++ +++++++++++++++++++++++++++++++ Condition If connected, condition must be fulfilled for node to activate. @@ -31,7 +31,7 @@ Steel Steering value. Outputs -+++++++ +++++++++++++++++++++++++++++++ Done *True* if node performed successfully, else *False*. diff --git a/source/manual/logic_nodes/python/get_instance_attribute.rst b/source/manual/logic_nodes/python/get_instance_attribute.rst index ac70bd22..fb58194a 100644 --- a/source/manual/logic_nodes/python/get_instance_attribute.rst +++ b/source/manual/logic_nodes/python/get_instance_attribute.rst @@ -5,12 +5,12 @@ .. _ln-get_instance_attribute: -======================= +============================== Get Instance Attribute -======================= +============================== Inputs -++++++ +++++++++++++++++++++++++++++++ Parent todo @@ -19,7 +19,7 @@ Index todo Outputs -+++++++ +++++++++++++++++++++++++++++++ Child todo diff --git a/source/manual/logic_nodes/python/index.rst b/source/manual/logic_nodes/python/index.rst index 0525d3a1..e7a32cb0 100644 --- a/source/manual/logic_nodes/python/index.rst +++ b/source/manual/logic_nodes/python/index.rst @@ -1,8 +1,8 @@ .. _ln-python-index: -======== +============================== Python -======== +============================== .. toctree:: :maxdepth: 1 diff --git a/source/manual/logic_nodes/python/run_python_code.rst b/source/manual/logic_nodes/python/run_python_code.rst index 8bc705a0..aa02e24a 100644 --- a/source/manual/logic_nodes/python/run_python_code.rst +++ b/source/manual/logic_nodes/python/run_python_code.rst @@ -5,18 +5,18 @@ .. _ln-run_python_code: -=============== +============================== Run Python Code -=============== +============================== Parameters -++++++++++ +++++++++++++++++++++++++++++++ Mode Selected Python mode. todo Inputs -++++++ +++++++++++++++++++++++++++++++ Condition Which condition will be used for node to activate. @@ -25,7 +25,7 @@ Text Path/file with Python code to run. Outputs -+++++++ +++++++++++++++++++++++++++++++ Done *True* if node performed successfully, else *False*. diff --git a/source/manual/logic_nodes/python/set_object_attribute.rst b/source/manual/logic_nodes/python/set_object_attribute.rst index c748727e..de26ce08 100644 --- a/source/manual/logic_nodes/python/set_object_attribute.rst +++ b/source/manual/logic_nodes/python/set_object_attribute.rst @@ -5,12 +5,12 @@ .. _ln-set_object_attribute: -======================= +============================== Set Object Attribute -======================= +============================== Inputs -++++++ +++++++++++++++++++++++++++++++ Condition Which condition will be used for node to activate. @@ -25,7 +25,7 @@ Type Type and value to set. Outputs -+++++++ +++++++++++++++++++++++++++++++ Done *True* if node performed successfully, else *False*. diff --git a/source/manual/logic_nodes/python/typecast_value.rst b/source/manual/logic_nodes/python/typecast_value.rst index 90c73aef..a6ffc552 100644 --- a/source/manual/logic_nodes/python/typecast_value.rst +++ b/source/manual/logic_nodes/python/typecast_value.rst @@ -5,24 +5,24 @@ .. _ln-typecast_value: -======================= +============================== Typecast Value -======================= +============================== Parameters -++++++++++ +++++++++++++++++++++++++++++++ To Type Typecast Python value to which type. Inputs -++++++ +++++++++++++++++++++++++++++++ Type Type and value to cast. Outputs -+++++++ +++++++++++++++++++++++++++++++ Integer Resulting output value of selected type. diff --git a/source/manual/logic_nodes/raycasts/camera_ray.rst b/source/manual/logic_nodes/raycasts/camera_ray.rst index 540ec6d7..13b21576 100644 --- a/source/manual/logic_nodes/raycasts/camera_ray.rst +++ b/source/manual/logic_nodes/raycasts/camera_ray.rst @@ -5,12 +5,12 @@ .. _ln-camera_ray: -=============== +============================== Camera Ray -=============== +============================== Inputs -++++++ +++++++++++++++++++++++++++++++ Condition Which condition will be used for node to activate. @@ -31,7 +31,7 @@ Mask Mask layers to use. todo Outputs -+++++++ +++++++++++++++++++++++++++++++ Has Result todo diff --git a/source/manual/logic_nodes/raycasts/index.rst b/source/manual/logic_nodes/raycasts/index.rst index cd4ac5c1..811eb1c7 100644 --- a/source/manual/logic_nodes/raycasts/index.rst +++ b/source/manual/logic_nodes/raycasts/index.rst @@ -1,8 +1,8 @@ .. _ln-raycasts-index: -======== +============================== Raycasts -======== +============================== .. toctree:: :maxdepth: 1 diff --git a/source/manual/logic_nodes/raycasts/mouse_ray.rst b/source/manual/logic_nodes/raycasts/mouse_ray.rst index 5131b07e..703a9fd4 100644 --- a/source/manual/logic_nodes/raycasts/mouse_ray.rst +++ b/source/manual/logic_nodes/raycasts/mouse_ray.rst @@ -5,12 +5,12 @@ .. _ln-mouse_ray: -=============== +============================== Mouse Ray -=============== +============================== Inputs -++++++ +++++++++++++++++++++++++++++++ Condition Which condition will be used for node to activate. @@ -28,7 +28,7 @@ Mask Mask layers to use. todo Outputs -+++++++ +++++++++++++++++++++++++++++++ Has Result todo diff --git a/source/manual/logic_nodes/raycasts/raycast.rst b/source/manual/logic_nodes/raycasts/raycast.rst index 719eedf2..1407053d 100644 --- a/source/manual/logic_nodes/raycasts/raycast.rst +++ b/source/manual/logic_nodes/raycasts/raycast.rst @@ -5,16 +5,19 @@ .. _ln-raycast: -=============== +============================== Raycast -=============== +============================== -Inputs -++++++ +Parameters +++++++++++++++++++++++++++++++ Face Data todo +Inputs +++++++++++++++++++++++++++++++ + Condition Which condition will be used for node to activate. @@ -52,7 +55,7 @@ Visualize todo Outputs -+++++++ +++++++++++++++++++++++++++++++ Has Result todo diff --git a/source/manual/logic_nodes/render/eevee/index.rst b/source/manual/logic_nodes/render/eevee/index.rst index 7377f899..b5a4301a 100644 --- a/source/manual/logic_nodes/render/eevee/index.rst +++ b/source/manual/logic_nodes/render/eevee/index.rst @@ -1,8 +1,8 @@ .. _ln-render-eevee-index: -============================= +============================== EEVEE -============================= +============================== .. toctree:: :maxdepth: 1 diff --git a/source/manual/logic_nodes/render/eevee/set_ambient_occlusion.rst b/source/manual/logic_nodes/render/eevee/set_ambient_occlusion.rst index 2f9da9ab..5ae50a2c 100644 --- a/source/manual/logic_nodes/render/eevee/set_ambient_occlusion.rst +++ b/source/manual/logic_nodes/render/eevee/set_ambient_occlusion.rst @@ -5,12 +5,12 @@ .. _ln-set_ambient_occlusion: -============================= +============================== Set Ambient Occlusion -============================= +============================== Inputs -++++++ +++++++++++++++++++++++++++++++ Condition If connected, condition must be fulfilled for node to activate. @@ -19,7 +19,7 @@ Use AO If checked, Ambient Occlusion will be used. Outputs -+++++++ +++++++++++++++++++++++++++++++ Done *True* if node performed successfully, else *False*. diff --git a/source/manual/logic_nodes/render/eevee/set_bloom.rst b/source/manual/logic_nodes/render/eevee/set_bloom.rst index 70ffeda1..64699b9b 100644 --- a/source/manual/logic_nodes/render/eevee/set_bloom.rst +++ b/source/manual/logic_nodes/render/eevee/set_bloom.rst @@ -5,12 +5,12 @@ .. _ln-set_bloom: -======================= +============================== Set Bloom -======================= +============================== Inputs -++++++ +++++++++++++++++++++++++++++++ Condition If connected, condition must be fulfilled for node to activate. @@ -19,7 +19,7 @@ Use Bloom If checked, Bloom will be used. Outputs -+++++++ +++++++++++++++++++++++++++++++ Done *True* if node performed successfully, else *False*. diff --git a/source/manual/logic_nodes/render/eevee/set_exposure.rst b/source/manual/logic_nodes/render/eevee/set_exposure.rst index 0ededdbb..1067d5d8 100644 --- a/source/manual/logic_nodes/render/eevee/set_exposure.rst +++ b/source/manual/logic_nodes/render/eevee/set_exposure.rst @@ -5,12 +5,12 @@ .. _ln-set_exposure: -======================= +============================== Set Exposure -======================= +============================== Inputs -++++++ +++++++++++++++++++++++++++++++ Condition If connected, condition must be fulfilled for node to activate. @@ -19,7 +19,7 @@ Exposure Value of the Exposure to set. Outputs -+++++++ +++++++++++++++++++++++++++++++ Done *True* if node performed successfully, else *False*. diff --git a/source/manual/logic_nodes/render/eevee/set_gamma.rst b/source/manual/logic_nodes/render/eevee/set_gamma.rst index 7714dd00..3bf08b96 100644 --- a/source/manual/logic_nodes/render/eevee/set_gamma.rst +++ b/source/manual/logic_nodes/render/eevee/set_gamma.rst @@ -5,12 +5,12 @@ .. _ln-set_gamma: -======================= +============================== Set Gamma -======================= +============================== Inputs -++++++ +++++++++++++++++++++++++++++++ Condition If connected, condition must be fulfilled for node to activate. @@ -19,7 +19,7 @@ Gamma Value of the Gamma to set. Outputs -+++++++ +++++++++++++++++++++++++++++++ Done *True* if node performed successfully, else *False*. diff --git a/source/manual/logic_nodes/render/eevee/set_ssr.rst b/source/manual/logic_nodes/render/eevee/set_ssr.rst index 75df5e05..83685126 100644 --- a/source/manual/logic_nodes/render/eevee/set_ssr.rst +++ b/source/manual/logic_nodes/render/eevee/set_ssr.rst @@ -5,12 +5,12 @@ .. _ln-set_ssr: -======================= +============================== Set SSR -======================= +============================== Inputs -++++++ +++++++++++++++++++++++++++++++ Condition If connected, condition must be fulfilled for node to activate. @@ -19,7 +19,7 @@ Use SSR If checked, SSR (Screen Space Reflection) will be used. Outputs -+++++++ +++++++++++++++++++++++++++++++ Done *True* if node performed successfully, else *False*. diff --git a/source/manual/logic_nodes/render/eevee/set_volumetric_light.rst b/source/manual/logic_nodes/render/eevee/set_volumetric_light.rst index 3672dc1a..be8ea2ec 100644 --- a/source/manual/logic_nodes/render/eevee/set_volumetric_light.rst +++ b/source/manual/logic_nodes/render/eevee/set_volumetric_light.rst @@ -5,12 +5,12 @@ .. _ln-set_volumetric_light: -======================= +============================== Set Volumetric Light -======================= +============================== Inputs -++++++ +++++++++++++++++++++++++++++++ Condition If connected, condition must be fulfilled for node to activate. @@ -19,7 +19,7 @@ Volumetrics If checked, Volumetric Light will be used. Outputs -+++++++ +++++++++++++++++++++++++++++++ Done *True* if node performed successfully, else *False*. diff --git a/source/manual/logic_nodes/render/get_fullscreen.rst b/source/manual/logic_nodes/render/get_fullscreen.rst index 02110460..c113f86b 100644 --- a/source/manual/logic_nodes/render/get_fullscreen.rst +++ b/source/manual/logic_nodes/render/get_fullscreen.rst @@ -5,12 +5,12 @@ .. _ln-get_fullscreen: -=============== +============================== Get Fullscreen -=============== +============================== Outputs -+++++++ +++++++++++++++++++++++++++++++ Fullscreen *True* if Fullscreen is enabled, else *False*. todo diff --git a/source/manual/logic_nodes/render/get_resolution.rst b/source/manual/logic_nodes/render/get_resolution.rst index b7597940..f6fc39f5 100644 --- a/source/manual/logic_nodes/render/get_resolution.rst +++ b/source/manual/logic_nodes/render/get_resolution.rst @@ -5,12 +5,12 @@ .. _ln-get_resolution: -============================= +============================== Get Resolution -============================= +============================== Outputs -+++++++ +++++++++++++++++++++++++++++++ Width Resulting screen width. todo diff --git a/source/manual/logic_nodes/render/get_vsync.rst b/source/manual/logic_nodes/render/get_vsync.rst index c9f05a2d..a0df8126 100644 --- a/source/manual/logic_nodes/render/get_vsync.rst +++ b/source/manual/logic_nodes/render/get_vsync.rst @@ -5,12 +5,12 @@ .. _ln-get_vsync: -========== +============================== Get VSync -========== +============================== Outputs -+++++++ +++++++++++++++++++++++++++++++ Mode todo diff --git a/source/manual/logic_nodes/render/index.rst b/source/manual/logic_nodes/render/index.rst index fd4422dc..9ec2226f 100644 --- a/source/manual/logic_nodes/render/index.rst +++ b/source/manual/logic_nodes/render/index.rst @@ -1,8 +1,8 @@ .. _ln-render-index: -============================= +============================== Render -============================= +============================== .. toctree:: :maxdepth: 1 diff --git a/source/manual/logic_nodes/render/set_fullscreen.rst b/source/manual/logic_nodes/render/set_fullscreen.rst index ec03c456..2cff3138 100644 --- a/source/manual/logic_nodes/render/set_fullscreen.rst +++ b/source/manual/logic_nodes/render/set_fullscreen.rst @@ -5,12 +5,12 @@ .. _ln-set_fullscreen: -============== +============================== Set Fullscreen -============== +============================== Inputs -++++++ +++++++++++++++++++++++++++++++ Condition If connected, condition must be fulfilled for node to activate. @@ -19,7 +19,7 @@ Fullscreen If checked, Fullscreen will be set. Outputs -+++++++ +++++++++++++++++++++++++++++++ Done *True* if node performed successfully, else *False*. diff --git a/source/manual/logic_nodes/render/set_resolution.rst b/source/manual/logic_nodes/render/set_resolution.rst index 7c413554..8c817a01 100644 --- a/source/manual/logic_nodes/render/set_resolution.rst +++ b/source/manual/logic_nodes/render/set_resolution.rst @@ -5,12 +5,12 @@ .. _ln-set_resolution: -=============== +============================== Set Resolution -=============== +============================== Inputs -++++++ +++++++++++++++++++++++++++++++ Condition If connected, condition must be fulfilled for node to activate. @@ -22,7 +22,7 @@ Y Resolution height to set. Outputs -+++++++ +++++++++++++++++++++++++++++++ Done *True* if node performed successfully, else *False*. diff --git a/source/manual/logic_nodes/render/set_vsync.rst b/source/manual/logic_nodes/render/set_vsync.rst index 35417a57..efbb5263 100644 --- a/source/manual/logic_nodes/render/set_vsync.rst +++ b/source/manual/logic_nodes/render/set_vsync.rst @@ -5,24 +5,24 @@ .. _ln-set_vsync: -========== +============================== Set VSync -========== +============================== Parameters -++++++++++ +++++++++++++++++++++++++++++++ Mode Selected mode of VSync to set. todo Inputs -++++++ +++++++++++++++++++++++++++++++ Condition If connected, condition must be fulfilled for node to activate. Outputs -+++++++ +++++++++++++++++++++++++++++++ Done *True* if node performed successfully, else *False*. diff --git a/source/manual/logic_nodes/render/show_framerate.rst b/source/manual/logic_nodes/render/show_framerate.rst index 3f5e5416..02d97f34 100644 --- a/source/manual/logic_nodes/render/show_framerate.rst +++ b/source/manual/logic_nodes/render/show_framerate.rst @@ -5,12 +5,12 @@ .. _ln-show_framerate: -============================= +============================== Show Framerate -============================= +============================== Inputs -++++++ +++++++++++++++++++++++++++++++ Condition If connected, condition must be fulfilled for node to activate. @@ -19,7 +19,7 @@ Show If checked/enabled, Framerate will be shown. Outputs -+++++++ +++++++++++++++++++++++++++++++ Done *True* if node performed successfully, else *False*. diff --git a/source/manual/logic_nodes/render/show_profile.rst b/source/manual/logic_nodes/render/show_profile.rst index 70ef5972..9d60c49a 100644 --- a/source/manual/logic_nodes/render/show_profile.rst +++ b/source/manual/logic_nodes/render/show_profile.rst @@ -5,12 +5,12 @@ .. _ln-show_profile: -============================= +============================== Show Profile -============================= +============================== Inputs -++++++ +++++++++++++++++++++++++++++++ Condition If connected, condition must be fulfilled for node to activate. @@ -19,7 +19,7 @@ Show If checked/enabled, Framerate will be shown. Outputs -+++++++ +++++++++++++++++++++++++++++++ Done *True* if node performed successfully, else *False*. diff --git a/source/manual/logic_nodes/scene/camera/active_camera.rst b/source/manual/logic_nodes/scene/camera/active_camera.rst index c5f77ae8..bb6a68ee 100644 --- a/source/manual/logic_nodes/scene/camera/active_camera.rst +++ b/source/manual/logic_nodes/scene/camera/active_camera.rst @@ -5,12 +5,12 @@ .. _ln-active_camera: -============== +============================== Active Camera -============== +============================== Outputs -+++++++ +++++++++++++++++++++++++++++++ Camera Current active camera in the scene. diff --git a/source/manual/logic_nodes/scene/camera/index.rst b/source/manual/logic_nodes/scene/camera/index.rst index 51398e02..38b9d698 100644 --- a/source/manual/logic_nodes/scene/camera/index.rst +++ b/source/manual/logic_nodes/scene/camera/index.rst @@ -1,8 +1,8 @@ .. _ln-scene-camera-index: -========= +============================== Camera -========= +============================== .. toctree:: :maxdepth: 1 diff --git a/source/manual/logic_nodes/scene/camera/screen_to_world.rst b/source/manual/logic_nodes/scene/camera/screen_to_world.rst index 489c6b31..242913aa 100644 --- a/source/manual/logic_nodes/scene/camera/screen_to_world.rst +++ b/source/manual/logic_nodes/scene/camera/screen_to_world.rst @@ -5,12 +5,12 @@ .. _ln-screen_to_world: -======================= +============================== Screen To World -======================= +============================== Inputs -++++++ +++++++++++++++++++++++++++++++ Camera todo @@ -25,7 +25,7 @@ Depth todo Outputs -+++++++ +++++++++++++++++++++++++++++++ World Position Resulting world position. diff --git a/source/manual/logic_nodes/scene/camera/set_camera.rst b/source/manual/logic_nodes/scene/camera/set_camera.rst index e9ec87de..7532ef5b 100644 --- a/source/manual/logic_nodes/scene/camera/set_camera.rst +++ b/source/manual/logic_nodes/scene/camera/set_camera.rst @@ -5,12 +5,12 @@ .. _ln-set_camera: -============== +============================== Set Camera -============== +============================== Inputs -++++++ +++++++++++++++++++++++++++++++ Condition If connected, condition must be fulfilled for node to activate. @@ -19,7 +19,7 @@ Camera Which camera to set. Outputs -+++++++ +++++++++++++++++++++++++++++++ Done *True* if the node performed successfully, else *False*. diff --git a/source/manual/logic_nodes/scene/camera/set_fov.rst b/source/manual/logic_nodes/scene/camera/set_fov.rst index 31bcd048..3c7fa6ae 100644 --- a/source/manual/logic_nodes/scene/camera/set_fov.rst +++ b/source/manual/logic_nodes/scene/camera/set_fov.rst @@ -5,14 +5,14 @@ .. _ln-set_fov: -============== +============================== Set FOV -============== +============================== Will set a *Field of View* to selected camera. Inputs -++++++ +++++++++++++++++++++++++++++++ Condition If connected, condition must be fulfilled for node to activate. @@ -24,7 +24,7 @@ FOV Value of FOV to set. Outputs -+++++++ +++++++++++++++++++++++++++++++ Done *True* if the node performed successfully, else *False*. diff --git a/source/manual/logic_nodes/scene/camera/set_orthographic_scale.rst b/source/manual/logic_nodes/scene/camera/set_orthographic_scale.rst index 8f9668b2..8853cb53 100644 --- a/source/manual/logic_nodes/scene/camera/set_orthographic_scale.rst +++ b/source/manual/logic_nodes/scene/camera/set_orthographic_scale.rst @@ -5,12 +5,12 @@ .. _ln-set_orthographic_scale: -======================= +============================== Set Orthographic Scale -======================= +============================== Inputs -++++++ +++++++++++++++++++++++++++++++ Condition If connected, condition must be fulfilled for node to activate. @@ -19,7 +19,7 @@ Camera Which camera to set to. Outputs -+++++++ +++++++++++++++++++++++++++++++ Done *True* if the node performed successfully, else *False*. diff --git a/source/manual/logic_nodes/scene/camera/world_to_screen.rst b/source/manual/logic_nodes/scene/camera/world_to_screen.rst index 4e31b1c5..3f34282f 100644 --- a/source/manual/logic_nodes/scene/camera/world_to_screen.rst +++ b/source/manual/logic_nodes/scene/camera/world_to_screen.rst @@ -5,12 +5,12 @@ .. _ln-world_to_screen: -======================= +============================== World To Screen -======================= +============================== Inputs -++++++ +++++++++++++++++++++++++++++++ Point todo @@ -19,7 +19,7 @@ Camera todo Outputs -+++++++ +++++++++++++++++++++++++++++++ On Screen todo diff --git a/source/manual/logic_nodes/scene/collections/get_collection.rst b/source/manual/logic_nodes/scene/collections/get_collection.rst index a780cb30..d13df80d 100644 --- a/source/manual/logic_nodes/scene/collections/get_collection.rst +++ b/source/manual/logic_nodes/scene/collections/get_collection.rst @@ -5,18 +5,18 @@ .. _ln-get_collection: -======================= +============================== Get Collection -======================= +============================== Inputs -++++++ +++++++++++++++++++++++++++++++ Collection Collection to get. Outputs -+++++++ +++++++++++++++++++++++++++++++ Collection Resulting collection data. diff --git a/source/manual/logic_nodes/scene/collections/get_object_names.rst b/source/manual/logic_nodes/scene/collections/get_object_names.rst index e52f82ca..897d1d1b 100644 --- a/source/manual/logic_nodes/scene/collections/get_object_names.rst +++ b/source/manual/logic_nodes/scene/collections/get_object_names.rst @@ -5,18 +5,18 @@ .. _ln-get_object_names: -======================= +============================== Get Object Names -======================= +============================== Inputs -++++++ +++++++++++++++++++++++++++++++ Collection Collection to get object names from. Outputs -+++++++ +++++++++++++++++++++++++++++++ Object Names A list of resulting object names. diff --git a/source/manual/logic_nodes/scene/collections/get_objects.rst b/source/manual/logic_nodes/scene/collections/get_objects.rst index 18fb7986..d3fdb7ef 100644 --- a/source/manual/logic_nodes/scene/collections/get_objects.rst +++ b/source/manual/logic_nodes/scene/collections/get_objects.rst @@ -5,18 +5,18 @@ .. _ln-get_objects: -======================= +============================== Get Objects -======================= +============================== Inputs -++++++ +++++++++++++++++++++++++++++++ Collection Collection to get objects from. Outputs -+++++++ +++++++++++++++++++++++++++++++ Objects A list of resulting objects. diff --git a/source/manual/logic_nodes/scene/collections/index.rst b/source/manual/logic_nodes/scene/collections/index.rst index 35e769ab..2eeb2598 100644 --- a/source/manual/logic_nodes/scene/collections/index.rst +++ b/source/manual/logic_nodes/scene/collections/index.rst @@ -1,8 +1,8 @@ .. _ln-scene-collections-index: -=========== +============================== Collections -=========== +============================== .. toctree:: :maxdepth: 1 diff --git a/source/manual/logic_nodes/scene/collections/remove_overlay_collection.rst b/source/manual/logic_nodes/scene/collections/remove_overlay_collection.rst index f436fcff..5ff48cce 100644 --- a/source/manual/logic_nodes/scene/collections/remove_overlay_collection.rst +++ b/source/manual/logic_nodes/scene/collections/remove_overlay_collection.rst @@ -5,12 +5,12 @@ .. _ln-remove_overlay_collection: -========================= +============================== Remove Overlay Collection -========================= +============================== Inputs -++++++ +++++++++++++++++++++++++++++++ Condition The condition for this node to activate. @@ -19,7 +19,7 @@ Collection Which collection to remove overlay from. Outputs -+++++++ +++++++++++++++++++++++++++++++ Done *True* if the node performed successfully, else *False*. diff --git a/source/manual/logic_nodes/scene/collections/set_collection_visibility.rst b/source/manual/logic_nodes/scene/collections/set_collection_visibility.rst index 3c561bff..4dcfa53f 100644 --- a/source/manual/logic_nodes/scene/collections/set_collection_visibility.rst +++ b/source/manual/logic_nodes/scene/collections/set_collection_visibility.rst @@ -5,12 +5,12 @@ .. _ln-set_collection_visibility: -========================= +============================== Set Collection Visibility -========================= +============================== Inputs -++++++ +++++++++++++++++++++++++++++++ Condition The condition for this node to start. @@ -25,7 +25,7 @@ Include Children todo Outputs -+++++++ +++++++++++++++++++++++++++++++ Done *True* if the node performed successfully, else *False*. diff --git a/source/manual/logic_nodes/scene/collections/set_overlay_collection.rst b/source/manual/logic_nodes/scene/collections/set_overlay_collection.rst index 51e2de65..e515daec 100644 --- a/source/manual/logic_nodes/scene/collections/set_overlay_collection.rst +++ b/source/manual/logic_nodes/scene/collections/set_overlay_collection.rst @@ -5,12 +5,12 @@ .. _ln-set_overlay_collection: -======================= +============================== Set Overlay Collection -======================= +============================== Inputs -++++++ +++++++++++++++++++++++++++++++ Condition The condition for this node to start. @@ -22,7 +22,7 @@ Collection Which collection to set overlay to. Outputs -+++++++ +++++++++++++++++++++++++++++++ Done *True* if the node performed successfully, else *False*. diff --git a/source/manual/logic_nodes/scene/get_gravity.rst b/source/manual/logic_nodes/scene/get_gravity.rst deleted file mode 100644 index adc5db5b..00000000 --- a/source/manual/logic_nodes/scene/get_gravity.rst +++ /dev/null @@ -1,16 +0,0 @@ -.. figure:: /images/logic_nodes/scene/ln-get_gravity.png - :align: right - :width: 215 - :alt: Get Gravity Node - -.. _ln-get_gravity: - -=========== -Get Gravity -=========== - -Outputs -+++++++ - -Gravity - Gravity data of current scene. diff --git a/source/manual/logic_nodes/scene/get_scene.rst b/source/manual/logic_nodes/scene/get_scene.rst index c9df1211..22d0e49a 100644 --- a/source/manual/logic_nodes/scene/get_scene.rst +++ b/source/manual/logic_nodes/scene/get_scene.rst @@ -5,12 +5,12 @@ .. _ln-get_scene: -========== +============================== Get Scene -========== +============================== Outputs -+++++++ +++++++++++++++++++++++++++++++ Scene Active scene. todo diff --git a/source/manual/logic_nodes/scene/get_timescale.rst b/source/manual/logic_nodes/scene/get_timescale.rst index cf650330..61e6f5a8 100644 --- a/source/manual/logic_nodes/scene/get_timescale.rst +++ b/source/manual/logic_nodes/scene/get_timescale.rst @@ -5,12 +5,12 @@ .. _ln-get_timescale: -============= +============================== Get Timescale -============= +============================== Outputs -+++++++ +++++++++++++++++++++++++++++++ Timescale Current timescale of the scene. diff --git a/source/manual/logic_nodes/scene/get_world_gravity.rst b/source/manual/logic_nodes/scene/get_world_gravity.rst new file mode 100644 index 00000000..2bda5a3f --- /dev/null +++ b/source/manual/logic_nodes/scene/get_world_gravity.rst @@ -0,0 +1,16 @@ +.. figure:: /images/logic_nodes/scene/ln-get_world_gravity.png + :align: right + :width: 215 + :alt: Get World Gravity Node + +.. _ln-get_world_gravity: + +============================== +Get World Gravity +============================== + +Outputs +++++++++++++++++++++++++++++++ + +Gravity + Gravity data of current world/scene. diff --git a/source/manual/logic_nodes/scene/index.rst b/source/manual/logic_nodes/scene/index.rst index 02c63f51..9515392a 100644 --- a/source/manual/logic_nodes/scene/index.rst +++ b/source/manual/logic_nodes/scene/index.rst @@ -1,8 +1,8 @@ .. _ln-scene-index: -============ +============================== Scene -============ +============================== .. toctree:: :maxdepth: 1 @@ -12,7 +12,7 @@ Scene collections/index get_scene set_scene - get_gravity - set_gravity + get_world_gravity + set_world_gravity get_timescale set_timescale diff --git a/source/manual/logic_nodes/scene/post_fx/add_filter.rst b/source/manual/logic_nodes/scene/post_fx/add_filter.rst index b7a5e8a4..7b097d99 100644 --- a/source/manual/logic_nodes/scene/post_fx/add_filter.rst +++ b/source/manual/logic_nodes/scene/post_fx/add_filter.rst @@ -5,18 +5,18 @@ .. _ln-add_filter: -======================= +============================== Add Filter -======================= +============================== Parameters -++++++++++ +++++++++++++++++++++++++++++++ Filter Filter type to add. Inputs -++++++ +++++++++++++++++++++++++++++++ Condition If connected, condition must be fulfilled for node to activate. @@ -40,7 +40,7 @@ Density Density of the mist. For *Mist* filter only. Outputs -+++++++ +++++++++++++++++++++++++++++++ Done *True* if the node performed successfully, else *False*. diff --git a/source/manual/logic_nodes/scene/post_fx/index.rst b/source/manual/logic_nodes/scene/post_fx/index.rst index 16036c96..a5616a94 100644 --- a/source/manual/logic_nodes/scene/post_fx/index.rst +++ b/source/manual/logic_nodes/scene/post_fx/index.rst @@ -1,8 +1,8 @@ .. _ln-scene-post_fx-index: -========= +============================== Post FX -========= +============================== .. toctree:: :maxdepth: 1 diff --git a/source/manual/logic_nodes/scene/post_fx/remove_filter.rst b/source/manual/logic_nodes/scene/post_fx/remove_filter.rst index 24b4ad8c..dc18eb5e 100644 --- a/source/manual/logic_nodes/scene/post_fx/remove_filter.rst +++ b/source/manual/logic_nodes/scene/post_fx/remove_filter.rst @@ -5,12 +5,12 @@ .. _ln-remove_filter: -======================= +============================== Remove Filter -======================= +============================== Inputs -++++++ +++++++++++++++++++++++++++++++ Condition If connected, condition must be fulfilled for node to activate. @@ -19,7 +19,7 @@ Pass Index todo Outputs -+++++++ +++++++++++++++++++++++++++++++ Done *True* if the node performed successfully, else *False*. diff --git a/source/manual/logic_nodes/scene/post_fx/set_filter_state.rst b/source/manual/logic_nodes/scene/post_fx/set_filter_state.rst index 43d61b33..90b47cf8 100644 --- a/source/manual/logic_nodes/scene/post_fx/set_filter_state.rst +++ b/source/manual/logic_nodes/scene/post_fx/set_filter_state.rst @@ -5,12 +5,12 @@ .. _ln-set_filter_state: -======================= +============================== Set Filter State -======================= +============================== Inputs -++++++ +++++++++++++++++++++++++++++++ Condition If connected, condition must be fulfilled for node to activate. @@ -22,7 +22,7 @@ Active todo Outputs -+++++++ +++++++++++++++++++++++++++++++ Done *True* if the node performed successfully, else *False*. diff --git a/source/manual/logic_nodes/scene/post_fx/toggle_filter.rst b/source/manual/logic_nodes/scene/post_fx/toggle_filter.rst index 30191025..eeaf8c3b 100644 --- a/source/manual/logic_nodes/scene/post_fx/toggle_filter.rst +++ b/source/manual/logic_nodes/scene/post_fx/toggle_filter.rst @@ -5,12 +5,12 @@ .. _ln-toggle_filter: -======================= +============================== Toggle Filter -======================= +============================== Inputs -++++++ +++++++++++++++++++++++++++++++ Condition If connected, condition must be fulfilled for node to activate. @@ -19,7 +19,7 @@ Pass Index todo Outputs -+++++++ +++++++++++++++++++++++++++++++ Done *True* if the node performed successfully, else *False*. diff --git a/source/manual/logic_nodes/scene/set_gravity.rst b/source/manual/logic_nodes/scene/set_gravity.rst deleted file mode 100644 index e857c9c2..00000000 --- a/source/manual/logic_nodes/scene/set_gravity.rst +++ /dev/null @@ -1,25 +0,0 @@ -.. figure:: /images/logic_nodes/scene/ln-set_gravity.png - :align: right - :width: 215 - :alt: Set Gravity Node - -.. _ln-set_gravity: - -=========== -Set Gravity -=========== - -Inputs -++++++ - -Condition - The condition for this node to activate. - -Gravity - Gravity data to set. - -Outputs -+++++++ - -Done - *True* if the node performed successfully, else *False*. diff --git a/source/manual/logic_nodes/scene/set_scene.rst b/source/manual/logic_nodes/scene/set_scene.rst index ae69bcb1..c2798c0d 100644 --- a/source/manual/logic_nodes/scene/set_scene.rst +++ b/source/manual/logic_nodes/scene/set_scene.rst @@ -5,12 +5,12 @@ .. _ln-set_scene: -========== +============================== Set Scene -========== +============================== Inputs -++++++ +++++++++++++++++++++++++++++++ Condition The condition for this node to activate. @@ -19,7 +19,7 @@ Scene Which scene to set. Outputs -+++++++ +++++++++++++++++++++++++++++++ Done *True* if the node performed successfully, else *False*. diff --git a/source/manual/logic_nodes/scene/set_timescale.rst b/source/manual/logic_nodes/scene/set_timescale.rst index 95b40059..54f24c88 100644 --- a/source/manual/logic_nodes/scene/set_timescale.rst +++ b/source/manual/logic_nodes/scene/set_timescale.rst @@ -5,12 +5,12 @@ .. _ln-set_timescale: -============= +============================== Set Timescale -============= +============================== Inputs -++++++ +++++++++++++++++++++++++++++++ Condition The condition for this node to activate. @@ -19,7 +19,7 @@ Timescale Timescale value to set. Outputs -+++++++ +++++++++++++++++++++++++++++++ Done *True* if the node performed successfully, else *False*. diff --git a/source/manual/logic_nodes/scene/set_world_gravity.rst b/source/manual/logic_nodes/scene/set_world_gravity.rst new file mode 100644 index 00000000..b3419a7c --- /dev/null +++ b/source/manual/logic_nodes/scene/set_world_gravity.rst @@ -0,0 +1,25 @@ +.. figure:: /images/logic_nodes/scene/ln-set_world_gravity.png + :align: right + :width: 215 + :alt: Set World Gravity Node + +.. _ln-set_world_gravity: + +============================== +Set World Gravity +============================== + +Inputs +++++++++++++++++++++++++++++++ + +Condition + The condition for this node to activate. + +Gravity + Gravity data to set. + +Outputs +++++++++++++++++++++++++++++++ + +Done + *True* if the node performed successfully, else *False*. diff --git a/source/manual/logic_nodes/sound/index.rst b/source/manual/logic_nodes/sound/index.rst index 8d3404a0..56ef8599 100644 --- a/source/manual/logic_nodes/sound/index.rst +++ b/source/manual/logic_nodes/sound/index.rst @@ -1,8 +1,8 @@ .. _ln-sound-index: -====================== +============================== Sound -====================== +============================== .. toctree:: :maxdepth: 1 diff --git a/source/manual/logic_nodes/sound/pause_sound.rst b/source/manual/logic_nodes/sound/pause_sound.rst index ae2e9140..eb4470d3 100644 --- a/source/manual/logic_nodes/sound/pause_sound.rst +++ b/source/manual/logic_nodes/sound/pause_sound.rst @@ -5,12 +5,12 @@ .. _ln-pause_sound: -====================== +============================== Pause Sound -====================== +============================== Inputs -++++++ +++++++++++++++++++++++++++++++ Condition If connected, condition must be fulfilled for node to activate. @@ -19,13 +19,13 @@ Sound Playing sound. Outputs -+++++++ +++++++++++++++++++++++++++++++ Done *True* if node performed successfully, else *False*. Example -+++++++ +++++++++++++++++++++++++++++++ .. figure:: /images/logic_nodes/sound/ln-pause_sound-example.png :width: 100% diff --git a/source/manual/logic_nodes/sound/resume_sound.rst b/source/manual/logic_nodes/sound/resume_sound.rst index e21efb69..b64c9417 100644 --- a/source/manual/logic_nodes/sound/resume_sound.rst +++ b/source/manual/logic_nodes/sound/resume_sound.rst @@ -5,12 +5,12 @@ .. _ln-resume_sound: -====================== +============================== Resume Sound -====================== +============================== Inputs -++++++ +++++++++++++++++++++++++++++++ Condition If connected, condition must be fulfilled for node to activate. @@ -19,7 +19,12 @@ Sound Playing sound. Outputs -+++++++ +++++++++++++++++++++++++++++++ Done *True* if node performed successfully, else *False*. + +Example +++++++++++++++++++++++++++++++ + +See previous node (:ref:`ln-pause_sound`) for an example. diff --git a/source/manual/logic_nodes/sound/start_sound.rst b/source/manual/logic_nodes/sound/start_sound.rst index 654466f0..3213fbae 100644 --- a/source/manual/logic_nodes/sound/start_sound.rst +++ b/source/manual/logic_nodes/sound/start_sound.rst @@ -5,22 +5,16 @@ .. _ln-start_sound: -====================== +============================== Start Sound -====================== +============================== Parameters -++++++++++ +++++++++++++++++++++++++++++++ Sound Type 2D or 3D sound or sample; sample has additional 2 more inputs. -Loop Count - Play once, loop or play sound n times. - -Inputs -++++++ - Update Running todo @@ -30,6 +24,9 @@ Show Advanced Options Use Speaker If selected, *Position* is changed to *Object* field; enter object name or pick from list. +Inputs +++++++++++++++++++++++++++++++ + Condition If connected, condition must be fulfilled for node to activate. @@ -67,7 +64,7 @@ Cone Outer Volume Volume of outer cone. Only visible if *Show Advanced Options* is selected. Outputs -+++++++ +++++++++++++++++++++++++++++++ On Start Start signal is emitted. diff --git a/source/manual/logic_nodes/sound/start_speaker.rst b/source/manual/logic_nodes/sound/start_speaker.rst index a6ccfbba..a0f3cb97 100644 --- a/source/manual/logic_nodes/sound/start_speaker.rst +++ b/source/manual/logic_nodes/sound/start_speaker.rst @@ -5,12 +5,12 @@ .. _ln-start_speaker: -====================== +============================== Start Speaker -====================== +============================== Inputs -++++++ +++++++++++++++++++++++++++++++ Condition If connected, condition must be fulfilled for node to activate. @@ -28,7 +28,7 @@ Ignore Timescale todo Outputs -+++++++ +++++++++++++++++++++++++++++++ On Start Start signal is emitted. diff --git a/source/manual/logic_nodes/sound/stop_all_sounds.rst b/source/manual/logic_nodes/sound/stop_all_sounds.rst index 5f430a49..dc76cf1a 100644 --- a/source/manual/logic_nodes/sound/stop_all_sounds.rst +++ b/source/manual/logic_nodes/sound/stop_all_sounds.rst @@ -5,18 +5,18 @@ .. _ln-stop_all_sounds: -====================== +============================== Stop All Sounds -====================== +============================== Inputs -++++++ +++++++++++++++++++++++++++++++ Condition If connected, condition must be fulfilled for node to activate. Outputs -+++++++ +++++++++++++++++++++++++++++++ Done *True* if node performed successfully, else *False*. diff --git a/source/manual/logic_nodes/sound/stop_sound.rst b/source/manual/logic_nodes/sound/stop_sound.rst index 2a111478..5eac9940 100644 --- a/source/manual/logic_nodes/sound/stop_sound.rst +++ b/source/manual/logic_nodes/sound/stop_sound.rst @@ -5,12 +5,12 @@ .. _ln-stop_sound: -====================== +============================== Stop Sound -====================== +============================== Inputs -++++++ +++++++++++++++++++++++++++++++ Condition If connected, condition must be fulfilled for node to activate. @@ -19,7 +19,7 @@ Sound Playing sound. Outputs -+++++++ +++++++++++++++++++++++++++++++ Done *True* if node performed successfully, else *False*. diff --git a/source/manual/logic_nodes/time/barrier.rst b/source/manual/logic_nodes/time/barrier.rst index bb6a791e..c03026f6 100644 --- a/source/manual/logic_nodes/time/barrier.rst +++ b/source/manual/logic_nodes/time/barrier.rst @@ -5,12 +5,12 @@ .. _ln-barrier: -====================== +============================== Barrier -====================== +============================== Inputs -++++++ +++++++++++++++++++++++++++++++ Condition If connected, condition must be fulfilled for node to activate. @@ -19,7 +19,7 @@ Time todo Outputs -+++++++ +++++++++++++++++++++++++++++++ Out Resulting value of . todo diff --git a/source/manual/logic_nodes/time/delay.rst b/source/manual/logic_nodes/time/delay.rst index a08bbc27..d671c1eb 100644 --- a/source/manual/logic_nodes/time/delay.rst +++ b/source/manual/logic_nodes/time/delay.rst @@ -5,12 +5,12 @@ .. _ln-delay: -====================== +============================== Delay -====================== +============================== Inputs -++++++ +++++++++++++++++++++++++++++++ Condition If connected, condition must be fulfilled for node to activate. @@ -19,7 +19,7 @@ Delay *Delay* value to use. Outputs -+++++++ +++++++++++++++++++++++++++++++ Out Resulting delay value to apply. diff --git a/source/manual/logic_nodes/time/delta_factor.rst b/source/manual/logic_nodes/time/delta_factor.rst index b838e049..1598bb0b 100644 --- a/source/manual/logic_nodes/time/delta_factor.rst +++ b/source/manual/logic_nodes/time/delta_factor.rst @@ -5,12 +5,12 @@ .. _ln-delta_factor: -====================== +============================== Delta Factor -====================== +============================== Outputs -+++++++ +++++++++++++++++++++++++++++++ Factor *Delta Factor* of . todo diff --git a/source/manual/logic_nodes/time/index.rst b/source/manual/logic_nodes/time/index.rst index 54ef01b9..4577df7d 100644 --- a/source/manual/logic_nodes/time/index.rst +++ b/source/manual/logic_nodes/time/index.rst @@ -1,8 +1,8 @@ .. _ln-time-index: -====================== +============================== Time -====================== +============================== .. toctree:: :maxdepth: 1 diff --git a/source/manual/logic_nodes/time/pulsify.rst b/source/manual/logic_nodes/time/pulsify.rst index 82209bad..752ac9ed 100644 --- a/source/manual/logic_nodes/time/pulsify.rst +++ b/source/manual/logic_nodes/time/pulsify.rst @@ -5,12 +5,12 @@ .. _ln-pulsify: -====================== +============================== Pulsify -====================== +============================== Inputs -++++++ +++++++++++++++++++++++++++++++ Condition If connected, condition must be fulfilled for node to activate. @@ -19,7 +19,7 @@ Gap A gap between pulses. Outputs -+++++++ +++++++++++++++++++++++++++++++ Out Resulting . todo diff --git a/source/manual/logic_nodes/time/time_data.rst b/source/manual/logic_nodes/time/time_data.rst index 93f6f195..e38c6db5 100644 --- a/source/manual/logic_nodes/time/time_data.rst +++ b/source/manual/logic_nodes/time/time_data.rst @@ -5,12 +5,12 @@ .. _ln-time_data: -====================== +============================== Time Data -====================== +============================== Outputs -+++++++ +++++++++++++++++++++++++++++++ Time todo diff --git a/source/manual/logic_nodes/time/timer.rst b/source/manual/logic_nodes/time/timer.rst index 212ccfe5..597966e8 100644 --- a/source/manual/logic_nodes/time/timer.rst +++ b/source/manual/logic_nodes/time/timer.rst @@ -5,12 +5,12 @@ .. _ln-timer: -====================== +============================== Timer -====================== +============================== Inputs -++++++ +++++++++++++++++++++++++++++++ Set Timer Condition required for timer to be set. @@ -19,7 +19,7 @@ Seconds Seconds needed to pass until timer activates. Outputs -+++++++ +++++++++++++++++++++++++++++++ When Elapsed Condition/node to execute when timer has elapsed. diff --git a/source/manual/logic_nodes/ui/add_widget.rst b/source/manual/logic_nodes/ui/add_widget.rst index c335521b..98ee6bd7 100644 --- a/source/manual/logic_nodes/ui/add_widget.rst +++ b/source/manual/logic_nodes/ui/add_widget.rst @@ -5,12 +5,12 @@ .. _ln-add_widget: -========== +============================== Add Widget -========== +============================== Inputs -++++++ +++++++++++++++++++++++++++++++ Condition If connected, condition must be fulfilled for node to activate. @@ -22,7 +22,7 @@ Widget todo Outputs -+++++++ +++++++++++++++++++++++++++++++ Done *True* if node performed successfully, else *False*. diff --git a/source/manual/logic_nodes/ui/get_widget_attribute.rst b/source/manual/logic_nodes/ui/get_widget_attribute.rst index dfb78771..e8b58f94 100644 --- a/source/manual/logic_nodes/ui/get_widget_attribute.rst +++ b/source/manual/logic_nodes/ui/get_widget_attribute.rst @@ -5,24 +5,24 @@ .. _ln-get_widget_attribute: -============================= +============================== Get Widget Attribute -============================= +============================== Parameters -++++++++++ +++++++++++++++++++++++++++++++ todo todo Inputs -++++++ +++++++++++++++++++++++++++++++ Widget Widget from which to get an attribute. Outputs -+++++++ +++++++++++++++++++++++++++++++ Output todo Resulting output value. todo diff --git a/source/manual/logic_nodes/ui/index.rst b/source/manual/logic_nodes/ui/index.rst index 532a31c3..47271267 100644 --- a/source/manual/logic_nodes/ui/index.rst +++ b/source/manual/logic_nodes/ui/index.rst @@ -1,8 +1,8 @@ .. _ln-ui-index: -============================= +============================== UI -============================= +============================== .. toctree:: :maxdepth: 1 diff --git a/source/manual/logic_nodes/ui/set_custom_cursor.rst b/source/manual/logic_nodes/ui/set_custom_cursor.rst index f5825f63..a3676243 100644 --- a/source/manual/logic_nodes/ui/set_custom_cursor.rst +++ b/source/manual/logic_nodes/ui/set_custom_cursor.rst @@ -5,12 +5,12 @@ .. _ln-set_custom_cursor: -============================= +============================== Set Custom Cursor -============================= +============================== Inputs -++++++ +++++++++++++++++++++++++++++++ Condition If connected, condition must be fulfilled for node to activate. @@ -22,7 +22,7 @@ Size Size of above image for cursor. Outputs -+++++++ +++++++++++++++++++++++++++++++ Done *True* if node performed successfully, else *False*. diff --git a/source/manual/logic_nodes/ui/set_widget_attribute.rst b/source/manual/logic_nodes/ui/set_widget_attribute.rst index 6e68973d..72ee711a 100644 --- a/source/manual/logic_nodes/ui/set_widget_attribute.rst +++ b/source/manual/logic_nodes/ui/set_widget_attribute.rst @@ -5,18 +5,18 @@ .. _ln-set_widget_attribute: -============================= +============================== Set Widget Attribute -============================= +============================== Parameters -++++++++++ +++++++++++++++++++++++++++++++ todo todo Inputs -++++++ +++++++++++++++++++++++++++++++ Condition If connected, condition must be fulfilled for node to activate. @@ -25,7 +25,7 @@ Widget Which widget to set attribute to. Outputs -+++++++ +++++++++++++++++++++++++++++++ Done *True* if node performed successfully, else *False*. diff --git a/source/manual/logic_nodes/ui/widgets/create_button.rst b/source/manual/logic_nodes/ui/widgets/create_button.rst index f23619db..5fe037da 100644 --- a/source/manual/logic_nodes/ui/widgets/create_button.rst +++ b/source/manual/logic_nodes/ui/widgets/create_button.rst @@ -5,12 +5,12 @@ .. _ln-create_button: -======================== +============================== Create Button -======================== +============================== Parameters -++++++++++ +++++++++++++++++++++++++++++++ X: Origin/start horizontal position. @@ -19,7 +19,7 @@ Y: Origin/start vertical position. Inputs -++++++ +++++++++++++++++++++++++++++++ Condition If connected, condition must be fulfilled for node to activate. @@ -58,7 +58,7 @@ Text Button text string. Outputs -+++++++ +++++++++++++++++++++++++++++++ Done *True* if node performed successfully, else *False*. diff --git a/source/manual/logic_nodes/ui/widgets/create_canvas.rst b/source/manual/logic_nodes/ui/widgets/create_canvas.rst index 8896bc79..ed742d5c 100644 --- a/source/manual/logic_nodes/ui/widgets/create_canvas.rst +++ b/source/manual/logic_nodes/ui/widgets/create_canvas.rst @@ -5,18 +5,18 @@ .. _ln-create_canvas: -======================== +============================== Create Canvas -======================== +============================== -Inputs -++++++ +Parameters +++++++++++++++++++++++++++++++ On Init If checked, canvas will be created on game initialization. Outputs -+++++++ +++++++++++++++++++++++++++++++ Done *True* if node performed successfully, else *False*. diff --git a/source/manual/logic_nodes/ui/widgets/create_image.rst b/source/manual/logic_nodes/ui/widgets/create_image.rst index 46e56173..481337cd 100644 --- a/source/manual/logic_nodes/ui/widgets/create_image.rst +++ b/source/manual/logic_nodes/ui/widgets/create_image.rst @@ -5,12 +5,12 @@ .. _ln-create_image: -======================== +============================== Create Image -======================== +============================== Parameters -++++++++++ +++++++++++++++++++++++++++++++ X: Origin/start horizontal position. @@ -19,7 +19,7 @@ Y: Origin/start vertical position. Inputs -++++++ +++++++++++++++++++++++++++++++ Condition If connected, condition must be fulfilled for node to activate. @@ -46,7 +46,7 @@ Image Path to the image to use. Outputs -+++++++ +++++++++++++++++++++++++++++++ Done *True* if node performed successfully, else *False*. diff --git a/source/manual/logic_nodes/ui/widgets/create_label.rst b/source/manual/logic_nodes/ui/widgets/create_label.rst index e11bb3e6..1d3d8535 100644 --- a/source/manual/logic_nodes/ui/widgets/create_label.rst +++ b/source/manual/logic_nodes/ui/widgets/create_label.rst @@ -5,12 +5,12 @@ .. _ln-create_label: -======================== +============================== Create Label -======================== +============================== Parameters -++++++++++ +++++++++++++++++++++++++++++++ X: Origin/start horizontal position. @@ -19,7 +19,7 @@ Y: Origin/start vertical position. Inputs -++++++ +++++++++++++++++++++++++++++++ Condition If connected, condition must be fulfilled for node to activate. @@ -55,7 +55,7 @@ Use Shadow If checked, text will drop a shadow on background. Outputs -+++++++ +++++++++++++++++++++++++++++++ Done *True* if node performed successfully, else *False*. diff --git a/source/manual/logic_nodes/ui/widgets/create_layout.rst b/source/manual/logic_nodes/ui/widgets/create_layout.rst index 6359235f..4206bb8d 100644 --- a/source/manual/logic_nodes/ui/widgets/create_layout.rst +++ b/source/manual/logic_nodes/ui/widgets/create_layout.rst @@ -5,12 +5,12 @@ .. _ln-create_layout: -======================== +============================== Create Layout -======================== +============================== Parameters -++++++++++ +++++++++++++++++++++++++++++++ Layout Type Selected layout type. @@ -22,7 +22,7 @@ Y: Origin/start vertical position. Inputs -++++++ +++++++++++++++++++++++++++++++ Condition If connected, condition must be fulfilled for node to activate. @@ -55,7 +55,7 @@ Border Color Color of border line. Outputs -+++++++ +++++++++++++++++++++++++++++++ Done *True* if node performed successfully, else *False*. diff --git a/source/manual/logic_nodes/ui/widgets/create_slider.rst b/source/manual/logic_nodes/ui/widgets/create_slider.rst index 75a13616..fbf094c6 100644 --- a/source/manual/logic_nodes/ui/widgets/create_slider.rst +++ b/source/manual/logic_nodes/ui/widgets/create_slider.rst @@ -5,12 +5,12 @@ .. _ln-create_slider: -======================== +============================== Create Slider -======================== +============================== Parameters -++++++++++ +++++++++++++++++++++++++++++++ Type Selected slider type. @@ -25,7 +25,7 @@ Y: Origin/start vertical position. Inputs -++++++ +++++++++++++++++++++++++++++++ Condition If connected, condition must be fulfilled for node to activate. @@ -76,7 +76,7 @@ Bar Control If checked, . todo Outputs -+++++++ +++++++++++++++++++++++++++++++ Done *True* if node performed successfully, else *False*. diff --git a/source/manual/logic_nodes/ui/widgets/index.rst b/source/manual/logic_nodes/ui/widgets/index.rst index 89fc948b..53581b6f 100644 --- a/source/manual/logic_nodes/ui/widgets/index.rst +++ b/source/manual/logic_nodes/ui/widgets/index.rst @@ -1,8 +1,8 @@ .. _ln-ui-widgets-index: -========= +============================== Widgets -========= +============================== .. toctree:: :maxdepth: 1 diff --git a/source/manual/logic_nodes/utility/draw.rst b/source/manual/logic_nodes/utility/draw.rst index 7239ae5f..656687c8 100644 --- a/source/manual/logic_nodes/utility/draw.rst +++ b/source/manual/logic_nodes/utility/draw.rst @@ -5,18 +5,18 @@ .. _ln-draw: -============================= +============================== Draw -============================= +============================== Parameters -++++++++++ +++++++++++++++++++++++++++++++ Shape Which shape to draw. Inputs -++++++ +++++++++++++++++++++++++++++++ Condition If checked/connected, condition must be fulfilled for node to activate. @@ -31,7 +31,7 @@ Target End point of the shape. todo Outputs -+++++++ +++++++++++++++++++++++++++++++ Done *True* if node performed successfully, else *False*. diff --git a/source/manual/logic_nodes/utility/index.rst b/source/manual/logic_nodes/utility/index.rst index ef8e69aa..26b26c7b 100644 --- a/source/manual/logic_nodes/utility/index.rst +++ b/source/manual/logic_nodes/utility/index.rst @@ -1,8 +1,8 @@ .. _ln-utility-index: -============================= +============================== Utility -============================= +============================== .. toctree:: :maxdepth: 1 diff --git a/source/manual/logic_nodes/utility/print.rst b/source/manual/logic_nodes/utility/print.rst index 5c337044..0ba9b5d7 100644 --- a/source/manual/logic_nodes/utility/print.rst +++ b/source/manual/logic_nodes/utility/print.rst @@ -5,20 +5,20 @@ .. _ln-print: -============================= +============================== Print -============================= +============================== -Will print messages to :ref:`System Console `. Useful for debugging/game development. +Will print messages to :ref:`System Console `. Useful for debugging/game development. Parameters -++++++++++ +++++++++++++++++++++++++++++++ Type Printed message type. Inputs -++++++ +++++++++++++++++++++++++++++++ Condition If checked/connected, condition must be fulfilled for node to activate. @@ -27,12 +27,12 @@ Value String/text to print. Outputs -+++++++ +++++++++++++++++++++++++++++++ Done *True* if node performed successfully, else *False*. Example -+++++++ +++++++++++++++++++++++++++++++ See :ref:`Formatted String ` node for ``Print`` node example. diff --git a/source/manual/logic_nodes/values/boolean.rst b/source/manual/logic_nodes/values/boolean.rst index 8fa05e01..4919f7c5 100644 --- a/source/manual/logic_nodes/values/boolean.rst +++ b/source/manual/logic_nodes/values/boolean.rst @@ -5,24 +5,24 @@ .. _ln-boolean: -======================== +============================== Boolean -======================== +============================== Parameters -++++++++++ +++++++++++++++++++++++++++++++ Data Type Selected data type to be used - boolean. Inputs -++++++ +++++++++++++++++++++++++++++++ Boolean *True* if checked, else *False*, or result of socket input. Outputs -+++++++ +++++++++++++++++++++++++++++++ Boolean *True* or *False*. diff --git a/source/manual/logic_nodes/values/file_path.rst b/source/manual/logic_nodes/values/file_path.rst index 42e39de9..55878099 100644 --- a/source/manual/logic_nodes/values/file_path.rst +++ b/source/manual/logic_nodes/values/file_path.rst @@ -5,18 +5,18 @@ .. _ln-file_path: -======================== +============================== File Path -======================== +============================== Inputs -++++++ +++++++++++++++++++++++++++++++ Path Enter the path or click the *Folder* icon to open popup window, and navigate to the required file. Outputs -+++++++ +++++++++++++++++++++++++++++++ Path Resulting path to file. diff --git a/source/manual/logic_nodes/values/float.rst b/source/manual/logic_nodes/values/float.rst index 5ca5129b..331a2aff 100644 --- a/source/manual/logic_nodes/values/float.rst +++ b/source/manual/logic_nodes/values/float.rst @@ -5,24 +5,24 @@ .. _ln-float: -======================== +============================== Float -======================== +============================== Parameters -++++++++++ +++++++++++++++++++++++++++++++ Data Type Selected data type -floating number value. Inputs -++++++ +++++++++++++++++++++++++++++++ Float Either fixed float value or result from socket, if connected. Outputs -+++++++ +++++++++++++++++++++++++++++++ Float Float result. diff --git a/source/manual/logic_nodes/values/formatted_string.rst b/source/manual/logic_nodes/values/formatted_string.rst index d992dd90..a3b8ee4c 100644 --- a/source/manual/logic_nodes/values/formatted_string.rst +++ b/source/manual/logic_nodes/values/formatted_string.rst @@ -5,12 +5,12 @@ .. _ln-formatted_string: -======================== +============================== Formatted String -======================== +============================== Inputs -++++++ +++++++++++++++++++++++++++++++ Format String Fixed string format, or result from connected socket. @@ -22,22 +22,24 @@ B String parameter B. Outputs -+++++++ +++++++++++++++++++++++++++++++ String - Resulting string formated from A and B strings. + Resulting string formated from all input strings. Example -+++++++ +++++++++++++++++++++++++++++++ .. figure:: /images/logic_nodes/values/ln-formatted_string_nodes.png - :width: 500 + :align: center + :figwidth: 80% :alt: Formatted String Node Example -Above setup will pull text values from two String nodes, format them through Formatted String, and print the resulting string into console, on ``LMB`` click. +Above setup will pull text values from two String nodes, format them through Formatted String, and print the resulting string into console, on ``LMB`` click. Additional inputs can be added with ``{}`` string - inputs will be added automatically. .. figure:: /images/logic_nodes/values/ln-formatted_string_output.png - :width: 400 + :align: center + :figwidth: 60% :alt: Formatted String Node Output -Printed result in System Console. + Printed resulting string in System Console diff --git a/source/manual/logic_nodes/values/index.rst b/source/manual/logic_nodes/values/index.rst index fb618043..98656c4f 100644 --- a/source/manual/logic_nodes/values/index.rst +++ b/source/manual/logic_nodes/values/index.rst @@ -1,8 +1,8 @@ .. _ln-values-index: -========= +============================== Values -========= +============================== .. toctree:: :maxdepth: 1 diff --git a/source/manual/logic_nodes/values/integer.rst b/source/manual/logic_nodes/values/integer.rst index bf00596e..58f8bd9c 100644 --- a/source/manual/logic_nodes/values/integer.rst +++ b/source/manual/logic_nodes/values/integer.rst @@ -5,24 +5,24 @@ .. _ln-integer: -======================== +============================== Integer -======================== +============================== Parameters -++++++++++ +++++++++++++++++++++++++++++++ Data Type Selected data type - integer value. Inputs -++++++ +++++++++++++++++++++++++++++++ Integer Fixed input integer value, or a result from connected node. Outputs -+++++++ +++++++++++++++++++++++++++++++ Integer Resulting output integer value. diff --git a/source/manual/logic_nodes/values/invert.rst b/source/manual/logic_nodes/values/invert.rst index 4258601e..1145f092 100644 --- a/source/manual/logic_nodes/values/invert.rst +++ b/source/manual/logic_nodes/values/invert.rst @@ -5,18 +5,18 @@ .. _ln-invert: -======================== +============================== Invert -======================== +============================== Inputs -++++++ +++++++++++++++++++++++++++++++ Value Fixed value, or resulting connected value to invert. Outputs -+++++++ +++++++++++++++++++++++++++++++ Value Resulting inverted value. diff --git a/source/manual/logic_nodes/values/properties/copy_property_from_object.rst b/source/manual/logic_nodes/values/properties/copy_property_from_object.rst index 81cee9f4..71fc242e 100644 --- a/source/manual/logic_nodes/values/properties/copy_property_from_object.rst +++ b/source/manual/logic_nodes/values/properties/copy_property_from_object.rst @@ -5,18 +5,18 @@ .. _ln-copy_property_from_object: -============================= +============================== Copy Property From Object -============================= +============================== Parameters -++++++++++ +++++++++++++++++++++++++++++++ Mode Selected property mode. Inputs -++++++ +++++++++++++++++++++++++++++++ Condition If connected, condition must be fulfilled for node to activate. @@ -31,7 +31,7 @@ Property String representation of the property to copy. Outputs -+++++++ +++++++++++++++++++++++++++++++ Done *True* if node performed successfully, else *False*. diff --git a/source/manual/logic_nodes/values/properties/evaluate_object_property.rst b/source/manual/logic_nodes/values/properties/evaluate_object_property.rst index 0c5a15d0..ba821dbd 100644 --- a/source/manual/logic_nodes/values/properties/evaluate_object_property.rst +++ b/source/manual/logic_nodes/values/properties/evaluate_object_property.rst @@ -5,12 +5,12 @@ .. _ln-evaluate_object_property: -======================== +============================== Evaluate Object Property -======================== +============================== Parameters -++++++++++ +++++++++++++++++++++++++++++++ Mode Selected property mode. @@ -19,7 +19,7 @@ Operation Type of selected operation to perform. Inputs -++++++ +++++++++++++++++++++++++++++++ Object Which object to use. @@ -31,7 +31,7 @@ Type Selected type of evaluated property. Outputs -+++++++ +++++++++++++++++++++++++++++++ If True todo diff --git a/source/manual/logic_nodes/values/properties/get_global_property.rst b/source/manual/logic_nodes/values/properties/get_global_property.rst index 1a8fa5ba..a2553631 100644 --- a/source/manual/logic_nodes/values/properties/get_global_property.rst +++ b/source/manual/logic_nodes/values/properties/get_global_property.rst @@ -5,12 +5,12 @@ .. _ln-get_global_property: -======================== +============================== Get Global Property -======================== +============================== Inputs -++++++ +++++++++++++++++++++++++++++++ Collection todo todo @@ -22,7 +22,7 @@ Default Value todo Outputs -+++++++ +++++++++++++++++++++++++++++++ Value Resulting retrieved value. diff --git a/source/manual/logic_nodes/values/properties/get_object_property.rst b/source/manual/logic_nodes/values/properties/get_object_property.rst index 22a2e99b..e09b4b26 100644 --- a/source/manual/logic_nodes/values/properties/get_object_property.rst +++ b/source/manual/logic_nodes/values/properties/get_object_property.rst @@ -5,18 +5,20 @@ .. _ln-get_object_property: -======================== +============================== Get Object Property -======================== +============================== + +Will get a property from selected object, if exists, and output it as a value. Parameters -++++++++++ +++++++++++++++++++++++++++++++ Mode Selected property mode. Inputs -++++++ +++++++++++++++++++++++++++++++ Object Which object to use. @@ -25,7 +27,19 @@ Property Name of the property, either fixed, or result from connected node. Outputs -+++++++ +++++++++++++++++++++++++++++++ Property Value Resulting property value. + +Example +++++++++++++++++++++++++++++++ + +.. figure:: /images/logic_nodes/values/properties/ln-get_object_property-example.png + :align: center + :figwidth: 95% + :alt: Get Object Property Node Example + + Get Object Property example + +A game property is manually added, and accessed with *Get Object Property* node. diff --git a/source/manual/logic_nodes/values/properties/get_tree_property.rst b/source/manual/logic_nodes/values/properties/get_tree_property.rst index e90e0b06..b0de0cd5 100644 --- a/source/manual/logic_nodes/values/properties/get_tree_property.rst +++ b/source/manual/logic_nodes/values/properties/get_tree_property.rst @@ -5,18 +5,18 @@ .. _ln-get_tree_property: -======================== +============================== Get Tree Property -======================== +============================== Inputs -++++++ +++++++++++++++++++++++++++++++ Tree Name Name of the tree to use. Outputs -+++++++ +++++++++++++++++++++++++++++++ Property Resulting property. diff --git a/source/manual/logic_nodes/values/properties/index.rst b/source/manual/logic_nodes/values/properties/index.rst index 80adbaa9..4d5e4f8d 100644 --- a/source/manual/logic_nodes/values/properties/index.rst +++ b/source/manual/logic_nodes/values/properties/index.rst @@ -1,8 +1,8 @@ .. _ln-values-properties-index: -=========== +============================== Properties -=========== +============================== .. toctree:: :maxdepth: 1 diff --git a/source/manual/logic_nodes/values/properties/modify_object_property.rst b/source/manual/logic_nodes/values/properties/modify_object_property.rst index 009f5266..505dd37b 100644 --- a/source/manual/logic_nodes/values/properties/modify_object_property.rst +++ b/source/manual/logic_nodes/values/properties/modify_object_property.rst @@ -5,12 +5,12 @@ .. _ln-modify_object_property: -======================== +============================== Modify Object Property -======================== +============================== Parameters -++++++++++ +++++++++++++++++++++++++++++++ Mode Selected property mode. @@ -18,12 +18,12 @@ Mode Operation Type of selected operation to perform. -Inputs -++++++ - Clamp Clamp the value to 0-1 range. +Inputs +++++++++++++++++++++++++++++++ + Condition If connected, condition must be fulfilled for node to activate. @@ -37,7 +37,7 @@ Value Value to use for modification. Outputs -+++++++ +++++++++++++++++++++++++++++++ Done *True* if node performed successfully, else *False*. diff --git a/source/manual/logic_nodes/values/properties/object_has_property.rst b/source/manual/logic_nodes/values/properties/object_has_property.rst index 50f3efee..54b70548 100644 --- a/source/manual/logic_nodes/values/properties/object_has_property.rst +++ b/source/manual/logic_nodes/values/properties/object_has_property.rst @@ -5,18 +5,20 @@ .. _ln-object_has_property: -======================== +============================== Object Has Property -======================== +============================== + +Will check if selected object has required property. Parameters -++++++++++ +++++++++++++++++++++++++++++++ Mode Selected property mode. Inputs -++++++ +++++++++++++++++++++++++++++++ Object Which object to inspect. @@ -25,7 +27,7 @@ Name Name of the property to inspect. Outputs -+++++++ +++++++++++++++++++++++++++++++ If True todo diff --git a/source/manual/logic_nodes/values/properties/set_global_property.rst b/source/manual/logic_nodes/values/properties/set_global_property.rst index 5a032cdb..a5579025 100644 --- a/source/manual/logic_nodes/values/properties/set_global_property.rst +++ b/source/manual/logic_nodes/values/properties/set_global_property.rst @@ -5,12 +5,12 @@ .. _ln-set_global_property: -======================== +============================== Set Global Property -======================== +============================== Inputs -++++++ +++++++++++++++++++++++++++++++ Condition If connected, condition must be fulfilled for node to activate. @@ -22,13 +22,13 @@ Property Name of property to set. Type - Selected type of property to set. + Selected type and value of property to set. Persistent todo Outputs -+++++++ +++++++++++++++++++++++++++++++ Done *True* if node performed successfully, else *False*. diff --git a/source/manual/logic_nodes/values/properties/set_object_property.rst b/source/manual/logic_nodes/values/properties/set_object_property.rst index 4a71f680..ac243b8b 100644 --- a/source/manual/logic_nodes/values/properties/set_object_property.rst +++ b/source/manual/logic_nodes/values/properties/set_object_property.rst @@ -5,18 +5,18 @@ .. _ln-set_object_property: -======================== +============================== Set Object Property -======================== +============================== Parameters -++++++++++ +++++++++++++++++++++++++++++++ Mode Selected property mode. Inputs -++++++ +++++++++++++++++++++++++++++++ Condition If connected, condition must be fulfilled for node to activate. @@ -29,3 +29,9 @@ Property Type Type of selected property to set. + +Outputs +++++++++++++++++++++++++++++++ + +Done + *True* if node performed successfully, else *False*. diff --git a/source/manual/logic_nodes/values/properties/set_tree_property.rst b/source/manual/logic_nodes/values/properties/set_tree_property.rst index a0d7fb61..1e44cabc 100644 --- a/source/manual/logic_nodes/values/properties/set_tree_property.rst +++ b/source/manual/logic_nodes/values/properties/set_tree_property.rst @@ -5,12 +5,12 @@ .. _ln-set_tree_property: -======================== +============================== Set Tree Property -======================== +============================== Inputs -++++++ +++++++++++++++++++++++++++++++ Condition If connected, condition must be fulfilled for node to activate. @@ -19,7 +19,7 @@ Tree Name Name of the tree to use. Outputs -+++++++ +++++++++++++++++++++++++++++++ Done *True* if node performed successfully, else *False*. diff --git a/source/manual/logic_nodes/values/properties/toggle_object_property.rst b/source/manual/logic_nodes/values/properties/toggle_object_property.rst index 28daaffa..f9d7d177 100644 --- a/source/manual/logic_nodes/values/properties/toggle_object_property.rst +++ b/source/manual/logic_nodes/values/properties/toggle_object_property.rst @@ -5,18 +5,18 @@ .. _ln-toggle_object_property: -======================== +============================== Toggle Object Property -======================== +============================== Parameters -++++++++++ +++++++++++++++++++++++++++++++ Mode Property mode. Inputs -++++++ +++++++++++++++++++++++++++++++ Condition If connected, condition must be fulfilled for node to activate. @@ -28,7 +28,7 @@ Property Which property to toggle. Outputs -+++++++ +++++++++++++++++++++++++++++++ Done *True* if node performed successfully, else *False*. diff --git a/source/manual/logic_nodes/values/random_value.rst b/source/manual/logic_nodes/values/random_value.rst index 4ed776f4..a766c12f 100644 --- a/source/manual/logic_nodes/values/random_value.rst +++ b/source/manual/logic_nodes/values/random_value.rst @@ -5,18 +5,18 @@ .. _ln-random_value: -======================== +============================== Random Value -======================== +============================== Parameters -++++++++++ +++++++++++++++++++++++++++++++ Data Type Selected data type for random value. Inputs -++++++ +++++++++++++++++++++++++++++++ Min Minimum value. @@ -25,7 +25,7 @@ Max Maximum value. Outputs -+++++++ +++++++++++++++++++++++++++++++ Result Resulting random value from Min-Max range. diff --git a/source/manual/logic_nodes/values/store_value.rst b/source/manual/logic_nodes/values/store_value.rst index f685008e..52fcb097 100644 --- a/source/manual/logic_nodes/values/store_value.rst +++ b/source/manual/logic_nodes/values/store_value.rst @@ -5,15 +5,18 @@ .. _ln-store_value: -======================== +============================== Store Value -======================== +============================== -Inputs -++++++ +Parameters +++++++++++++++++++++++++++++++ Initialize - If checked, value will be initialized. + If checked . todo + +Inputs +++++++++++++++++++++++++++++++ Condition If connected, condition must be fulfilled for node to activate. @@ -22,7 +25,7 @@ Type Data type of value to be stored. Outputs -+++++++ +++++++++++++++++++++++++++++++ Stored Value Resulting stored value. diff --git a/source/manual/logic_nodes/values/string.rst b/source/manual/logic_nodes/values/string.rst index 43e3ea8b..5a6f4376 100644 --- a/source/manual/logic_nodes/values/string.rst +++ b/source/manual/logic_nodes/values/string.rst @@ -5,24 +5,24 @@ .. _ln-string: -======================== +============================== String -======================== +============================== Parameters -++++++++++ +++++++++++++++++++++++++++++++ Data Type Selected data type - string data type. Inputs -++++++ +++++++++++++++++++++++++++++++ String Fixed input string value, or a result from connected node. Outputs -+++++++ +++++++++++++++++++++++++++++++ String Output string result. diff --git a/source/manual/logic_nodes/values/value_switch.rst b/source/manual/logic_nodes/values/value_switch.rst index f54ac207..b2618d3d 100644 --- a/source/manual/logic_nodes/values/value_switch.rst +++ b/source/manual/logic_nodes/values/value_switch.rst @@ -5,12 +5,14 @@ .. _ln-value_switch: -======================== +============================== Value Switch -======================== +============================== + +Will switch between two values, if condition is *True*. Used i.e. to switch movement speed of a character, if :kbd:`Shift` key is pressed. Inputs -++++++ +++++++++++++++++++++++++++++++ Switch If checked, A will be selected, else B value will be selected. Accepts Boolean result from connected node. @@ -22,7 +24,17 @@ B Value Fixed value for B field, or a result from connected node. Value type is selected from dropdown menu. Outputs -+++++++ +++++++++++++++++++++++++++++++ Result Resulting value. + +Example +++++++++++++++++++++++++++++++ + +.. figure:: /images/logic_nodes/values/ln-value_switch-example.png + :align: center + :figwidth: 80% + :alt: Value Switch Node Example + + Will result in A value (0.20) if Shift key is held down diff --git a/source/manual/logic_nodes/values/value_switch_list.rst b/source/manual/logic_nodes/values/value_switch_list.rst index 98e9aa75..d3b928a9 100644 --- a/source/manual/logic_nodes/values/value_switch_list.rst +++ b/source/manual/logic_nodes/values/value_switch_list.rst @@ -5,12 +5,12 @@ .. _ln-value_switch_list: -======================== +============================== Value Switch List -======================== +============================== Inputs -++++++ +++++++++++++++++++++++++++++++ todo todo @@ -19,7 +19,7 @@ Value Fixed value of selected type, or resulting value from connected node. Outputs -+++++++ +++++++++++++++++++++++++++++++ Result Resulting value. diff --git a/source/manual/logic_nodes/values/value_switch_list_compare.rst b/source/manual/logic_nodes/values/value_switch_list_compare.rst index 9d971d9f..533651b1 100644 --- a/source/manual/logic_nodes/values/value_switch_list_compare.rst +++ b/source/manual/logic_nodes/values/value_switch_list_compare.rst @@ -5,18 +5,18 @@ .. _ln-value_switch_list_compare: -========================== +============================== Value Switch List Compare -========================== +============================== Parameters -++++++++++ +++++++++++++++++++++++++++++++ Operator Boolean operator for comparison evaluation. Inputs -++++++ +++++++++++++++++++++++++++++++ Switch todo @@ -28,7 +28,7 @@ Case N todo Outputs -+++++++ +++++++++++++++++++++++++++++++ Result Resulting value of comparison. diff --git a/source/manual/logic_nodes/values/vector/color_rgb.rst b/source/manual/logic_nodes/values/vector/color_rgb.rst index f6b17f2c..ef1ff015 100644 --- a/source/manual/logic_nodes/values/vector/color_rgb.rst +++ b/source/manual/logic_nodes/values/vector/color_rgb.rst @@ -5,18 +5,18 @@ .. _ln-color_rgb: -======================== +============================== Color RGB -======================== +============================== Inputs -++++++ +++++++++++++++++++++++++++++++ Color Selected color or result from connected node. Outputs -+++++++ +++++++++++++++++++++++++++++++ Color Output color. diff --git a/source/manual/logic_nodes/values/vector/color_rgba.rst b/source/manual/logic_nodes/values/vector/color_rgba.rst index 6c910ca3..a2cf26e8 100644 --- a/source/manual/logic_nodes/values/vector/color_rgba.rst +++ b/source/manual/logic_nodes/values/vector/color_rgba.rst @@ -5,18 +5,18 @@ .. _ln-color_rgba: -======================== +============================== Color RGBA -======================== +============================== Inputs -++++++ +++++++++++++++++++++++++++++++ Color Fixed selected color, or a result from connected socket. Outputs -+++++++ +++++++++++++++++++++++++++++++ Color Resulting color. diff --git a/source/manual/logic_nodes/values/vector/combine_xy.rst b/source/manual/logic_nodes/values/vector/combine_xy.rst index 6757b9ed..93377478 100644 --- a/source/manual/logic_nodes/values/vector/combine_xy.rst +++ b/source/manual/logic_nodes/values/vector/combine_xy.rst @@ -5,21 +5,23 @@ .. _ln-combine_xy: -======================== +============================== Combine XY -======================== +============================== + +Accepts float inputs and combines them into Vector2. Inputs -++++++ +++++++++++++++++++++++++++++++ X - Either fixed input value, or result from connected node. + Either fixed input float value, or result from connected node. Y - Either fixed input value, or result from connected node. + Either fixed input float value, or result from connected node. Outputs -+++++++ +++++++++++++++++++++++++++++++ Vector - Resulting XY vector. + Resulting XY Vector2. diff --git a/source/manual/logic_nodes/values/vector/combine_xyz.rst b/source/manual/logic_nodes/values/vector/combine_xyz.rst index 78cb620d..cdf9f281 100644 --- a/source/manual/logic_nodes/values/vector/combine_xyz.rst +++ b/source/manual/logic_nodes/values/vector/combine_xyz.rst @@ -5,24 +5,26 @@ .. _ln-combine_xyz: -======================== +============================== Combine XYZ -======================== +============================== + +Accepts float inputs and combines them into Vector3. Inputs -++++++ +++++++++++++++++++++++++++++++ X - Fixed input X value, or result from connected node. + Fixed input X float value, or result from connected node. Y - Fixed input Y value, or result from connected node. + Fixed input Y float value, or result from connected node. Z - Fixed input Z value, or result from connected node. + Fixed input Z float value, or result from connected node. Outputs -+++++++ +++++++++++++++++++++++++++++++ Vector - Resulting XYZ (Vector3) vector. + Resulting XYZ Vector3. diff --git a/source/manual/logic_nodes/values/vector/combine_xyzw.rst b/source/manual/logic_nodes/values/vector/combine_xyzw.rst index 81ebe1eb..dd2b120d 100644 --- a/source/manual/logic_nodes/values/vector/combine_xyzw.rst +++ b/source/manual/logic_nodes/values/vector/combine_xyzw.rst @@ -5,27 +5,29 @@ .. _ln-combine_xyzw: -======================== +============================== Combine XYZW -======================== +============================== + +Accepts float inputs and combines them into Quaternion. Inputs -++++++ +++++++++++++++++++++++++++++++ X - Fixed input X value, or result from connected node. + Fixed input X float value, or result from connected node. Y - Fixed input Y value, or result from connected node. + Fixed input Y float value, or result from connected node. Z - Fixed input Z value, or result from connected node. + Fixed input Z float value, or result from connected node. W - Fixed input W value, or result from connected node. + Fixed input W float value, or result from connected node. Outputs -+++++++ +++++++++++++++++++++++++++++++ Vector - Resulting XYZ (Vector3) vector. + Resulting XYZW Quaternion. diff --git a/source/manual/logic_nodes/values/vector/euler.rst b/source/manual/logic_nodes/values/vector/euler.rst index 35481d61..e99166a7 100644 --- a/source/manual/logic_nodes/values/vector/euler.rst +++ b/source/manual/logic_nodes/values/vector/euler.rst @@ -5,18 +5,20 @@ .. _ln-euler: -======================== +============================== Euler -======================== +============================== + +Accepts float inputs and combines them into Euler angle. Parameters -++++++++++ +++++++++++++++++++++++++++++++ Euler Order Selected order of vectors. Inputs -++++++ +++++++++++++++++++++++++++++++ X Fixed input X value, or result from connected node. @@ -28,7 +30,7 @@ Z Fixed input Z value, or result from connected node. Outputs -+++++++ +++++++++++++++++++++++++++++++ Euler - Resulting Euler values. + Resulting Euler angle. diff --git a/source/manual/logic_nodes/values/vector/index.rst b/source/manual/logic_nodes/values/vector/index.rst index 73c2d6ed..11f50e5a 100644 --- a/source/manual/logic_nodes/values/vector/index.rst +++ b/source/manual/logic_nodes/values/vector/index.rst @@ -1,8 +1,8 @@ .. _ln-values-vector-index: -========= +============================== Vector -========= +============================== .. toctree:: :maxdepth: 1 diff --git a/source/manual/logic_nodes/values/vector/resize_vector.rst b/source/manual/logic_nodes/values/vector/resize_vector.rst index fe17aa0f..be625c0c 100644 --- a/source/manual/logic_nodes/values/vector/resize_vector.rst +++ b/source/manual/logic_nodes/values/vector/resize_vector.rst @@ -5,24 +5,24 @@ .. _ln-resize_vector: -======================== +============================== Resize Vector -======================== +============================== Parameters -++++++++++ +++++++++++++++++++++++++++++++ Resize To Selected dimension for resizing. Inputs -++++++ +++++++++++++++++++++++++++++++ Vector Either fixed input XYZ values, or result from connected node. Outputs -+++++++ +++++++++++++++++++++++++++++++ Vector Resulting vector. diff --git a/source/manual/logic_nodes/values/vector/separate_xy.rst b/source/manual/logic_nodes/values/vector/separate_xy.rst index 0568fc2d..7af78d76 100644 --- a/source/manual/logic_nodes/values/vector/separate_xy.rst +++ b/source/manual/logic_nodes/values/vector/separate_xy.rst @@ -5,21 +5,23 @@ .. _ln-separate_xy: -======================== +============================== Separate XY -======================== +============================== + +Accepts Vector2 input, separates it into X and Y float values. Inputs -++++++ +++++++++++++++++++++++++++++++ Vector Either fixed input X and Y vector value, or a result from connected socket. Outputs -+++++++ +++++++++++++++++++++++++++++++ X - Resulting X value. + Resulting X float value. Y - Resulting Y value. + Resulting Y float value. diff --git a/source/manual/logic_nodes/values/vector/separate_xyz.rst b/source/manual/logic_nodes/values/vector/separate_xyz.rst index a1541d30..64442db3 100644 --- a/source/manual/logic_nodes/values/vector/separate_xyz.rst +++ b/source/manual/logic_nodes/values/vector/separate_xyz.rst @@ -5,24 +5,26 @@ .. _ln-separate_xyz: -======================== +============================== Separate XYZ -======================== +============================== + +Accepts Vector3 input, separates it into X, Y and Z float values. Inputs -++++++ +++++++++++++++++++++++++++++++ Vector Either fixed input values, or a result from connected node. Outputs -+++++++ +++++++++++++++++++++++++++++++ X - Resulting X value. + Resulting X float value. Y - Resulting Y value. + Resulting Y float value. Z - Resulting Z value. + Resulting Z float value. diff --git a/source/manual/physics/index.rst b/source/manual/physics/index.rst index 8d676f0c..c00b2f22 100644 --- a/source/manual/physics/index.rst +++ b/source/manual/physics/index.rst @@ -1,10 +1,11 @@ .. _physics-index: -+++++++ +============================== Physics -+++++++ +============================== .. toctree:: :maxdepth: 2 introduction.rst + world.rst diff --git a/source/manual/physics/introduction.rst b/source/manual/physics/introduction.rst index d6ab5da4..ddd29863 100644 --- a/source/manual/physics/introduction.rst +++ b/source/manual/physics/introduction.rst @@ -1,14 +1,16 @@ .. _physics-introduction: -============ +============================== Introduction -============ +============================== What Is Physics? ----------------- +++++++++++++++++++++++++++++++ .. figure:: /images/Chapter6/Fig06-01.png +| + In the real world, the laws of physics govern everything from the smallest subatomic particle to the largest galaxy far, far away. Luckily for us, we don't have to understand quantum mechanics, Newtonian physics, or Euclidean space in order to make a fun game. A physics engine handles game events such as collision detection between objects, moves objects in a physically realistic way, and even deforms objects as if they are made up of a soft material. A physics engine moves things based on a set of predefined rules so that you, the artist, don't have to manually animate every object interaction. Compared to traditional keyframe animations, which are premade, the dynamic nature of the physics engine means that it is inherently non-deterministic. The motion of the object depends on the physical property of the object and its state in the physical world. This unique property makes games that utilize real-time physics fun to play around with, if not unpredictable sometimes. @@ -16,26 +18,26 @@ A physics engine moves things based on a set of predefined rules so that you, th As usual, this chapter comes with a collection of example files that showcase what the physics engine can do. You can find them in the folder /chapters6/demos. Bullet Physics Library ----------------------- +++++++++++++++++++++++++++++++ UPBGE includes advanced physics simulation in the form of the Bullet Physics Engine (`Bullet Physics `__). Most of your work will involve setting the right properties on the objects in your scene, then you can sit back and let the engine take over. The physics simulation can be used for games, but also for animation. UPBGE is based on rigid body physics, which differs significantly from the complementary set of tools available in the form of soft body physics simulations. Though the UPBGE does have a soft body type, it is not nearly as advanced as the non-BGE soft body. The inverse is even more true: it is difficult to get the non-BGE physics to resemble anything like a stiff shape. Rigid body physics does not have, as an effect or a cause, any mesh deformations. For a discussion on how to partially overcome this, see: `Mesh Deformations`_. Overview --------- +++++++++++++++++++++++++++++++ Because physics is such an integral part of the Blender game engine, physics-related settings are found in many different places. However scattered they might look at first glance, there is a pattern in this chaos. The physics settings can be broken down into these sections: -* **World settings:** The world or global Physics Engine settings can be found in the :doc:`World Properties `, which include the Gravity strength constant and some important engine performance tweaks. +- **World settings:** The world or global Physics Engine settings can be found in the :doc:`World Properties `, which include the Gravity strength constant and some important engine performance tweaks. .. figure:: /images/Chapter6/Fig06-02.png World Properties Editor -* **Object Physics settings:** Any game-engine object (mesh, lamp, camera, empty, and text) can be turned into a physical object. Once physics is enabled for an object, it starts obeying the rules of the physics engine, transforming the object from a static object into something that falls, collides, tumbles, and deforms. Figure 6.3 shows the Physics Properties Editor. +- **Object Physics settings:** Any game-engine object (mesh, lamp, camera, empty, and text) can be turned into a physical object. Once physics is enabled for an object, it starts obeying the rules of the physics engine, transforming the object from a static object into something that falls, collides, tumbles, and deforms. Figure 6.3 shows the Physics Properties Editor. .. figure:: /images/game_engine-physics-introduction-tab_header.png @@ -43,28 +45,25 @@ The physics settings can be broken down into these sections: Physics Properties Editor -See :ref:`game-engine-physics-types` in this chapter. - -* **Material Physics settings:** The Material panel is not only a place where all the graphic magic happens; it also contains additional physics that control how the surface of the object behaves. Settings such as surface friction can be found here. Because an object can have multiple materials, material physics settings allow the artist to assign different surface materials for different parts of a single object. These seetings are meant to be used in conjunction with the object physics settings, not replace it. Figure 6.4 shows the Material Properties Editor. +- **Material Physics settings:** The Material panel is not only a place where all the graphic magic happens; it also contains additional physics that control how the surface of the object behaves. Settings such as surface friction can be found here. Because an object can have multiple materials, material physics settings allow the artist to assign different surface materials for different parts of a single object. These seetings are meant to be used in conjunction with the object physics settings, not replace it. Figure 6.4 shows the Material Properties Editor. .. figure:: /images/Chapter6/Fig06-04.png Material Properties Editor -* **Constraints:** Physics constraints allow you to set up simple rules that the objects follow, rules such as tracking one object to another or limiting their range of motion. With constraints, it's possible to realistically represent many of the structures that have a limited degree of motion, such as hinges, wheels, and chains. +- **Constraints:** Physics constraints allow you to set up simple rules that the objects follow, rules such as tracking one object to another or limiting their range of motion. With constraints, it's possible to realistically represent many of the structures that have a limited degree of motion, such as hinges, wheels, and chains. It is imperative to understand that the Blender constraints generally do not work inside the BGE. This means interesting effects such as *Copy Rotation* are unavailable directly. Your options include: -- *Parenting* - but not Vertex Parenting. -- *Rigid Body Joint* - this is the one constraint that you can set up through the UI that works in the BGE. - It has several options, and can be very powerful - see ITS page for a detailed description and demo blend-file. - Do not forget that you can loop through objects using ``bpy`` instead of clicking thousands of times to set up chains of these constraints. -- *Rigid body joints on-the-fly* - you can add/remove them after the BGE starts by using ``bge.constraints.createConstraint()``. This can be good either to simply automate their setup, or to truly make them dynamic. - A simple demo can be viewed in: TODO_FIXME -- :doc:`Python Controllers ` - as always, in the BGE, you can get the most power when you drop into Python and start toying with the settings directly. - For instance, the *Copy Rotation* mentioned above is not hard - all you have to do is something to the effect of: +- *Parenting* - but not Vertex Parenting. + +- *Rigid Body Joint* - this is the one constraint that you can set up through the UI that works in the BGE. It has several options, and can be very powerful - see ITS page for a detailed description and demo blend-file. Do not forget that you can loop through objects using ``bpy`` instead of clicking thousands of times to set up chains of these constraints. + +- *Rigid body joints on-the-fly* - you can add/remove them after the BGE starts by using ``bge.constraints.createConstraint()``. This can be good either to simply automate their setup, or to truly make them dynamic. A simple demo can be viewed in: TODO_FIXME + +- :doc:`Python Controllers ` - as always, in the BGE, you can get the most power when you drop into Python and start toying with the settings directly. For instance, the *Copy Rotation* mentioned above is not hard - all you have to do is something to the effect of: .. code-block:: python @@ -75,13 +74,13 @@ Your options include: Object Constraints Properties Editor -* **Physics sensors and actuators:** Except for maybe the case of a Rube Goldberg machine, where everything happens in a predetermined manner, most games would be pretty boring if there were no way to make an object move at a user's command or to trigger a reaction when two objects collide. Actuators and sensors fulfill these two roles, respectively. Actuators are part of logic brick that carries out an action (such as applying a force to the object to make it move). Sensors are triggers that detect when something happens in the game, such as when two objects touch. A combination of sensors and actuators makes a game truly interactive, by giving the game engine the ability to make decisions. Figure 6.6 shows the Logic Brick Editor. In case you forgot, there is a full chapter in this book about logic bricks. +- **Physics sensors and actuators:** Except for maybe the case of a Rube Goldberg machine, where everything happens in a predetermined manner, most games would be pretty boring if there were no way to make an object move at a user's command or to trigger a reaction when two objects collide. Actuators and sensors fulfill these two roles, respectively. Actuators are part of logic brick that carries out an action (such as applying a force to the object to make it move). Sensors are triggers that detect when something happens in the game, such as when two objects touch. A combination of sensors and actuators makes a game truly interactive, by giving the game engine the ability to make decisions. Figure 6.6 shows the Logic Brick Editor. In case you forgot, there is a full chapter in this book about logic bricks. .. figure:: /images/Chapter6/Fig06-06.png Logic Brick Editor -* **Python:** In addition to all the physics settings one can access from the graphic user interface, an extensive Python API is at your disposal. The Python API gives you programmable control over many aspects of the physics engine. With Python, you can dynamically set many of the physics options while the game is running. It even allows you to accomplish a few things that are not possible from the graphic interface. For instance, Python can be used to create realistic vehicle physics. Figure 6.7 shows the Text Editor with a Python script open. +- **Python:** In addition to all the physics settings one can access from the graphic user interface, an extensive Python API is at your disposal. The Python API gives you programmable control over many aspects of the physics engine. With Python, you can dynamically set many of the physics options while the game is running. It even allows you to accomplish a few things that are not possible from the graphic interface. For instance, Python can be used to create realistic vehicle physics. Figure 6.7 shows the Text Editor with a Python script open. .. figure:: /images/Chapter6/Fig06-07.png @@ -90,22 +89,22 @@ Your options include: So now that you have an overview of what physics is all about and where to find all the settings, the rest of the chapter will explain how to use these settings in combination to achieve various effects. Visualizing Physics -=================== +++++++++++++++++++++++++++++++ .. figure:: /images/game_engine-physics-introduction-visualization.png -Go to :menuselection:`Game --> Show Physics Visualization` to show lines representing various attributes of the Bullet representation of your objects. Note that these might be easier to see when you turn on Wireframe Mode :kbd:`Z` before you press :kbd:`P`. Also note that you can see how the Bullet triangulation is working (it busts all your Quads to Tris at run-time, but the BGE meshes are still quads at run-time). + Physics Visualization + +Go to :menuselection:`Game > Show Physics Visualization` to show lines representing various attributes of the Bullet representation of your objects. Note that these might be easier to see when you turn on Wireframe Mode :kbd:`Z` before you press :kbd:`P`. Also note that you can see how the Bullet triangulation is working (it busts all your Quads to Tris at run-time, but the BGE meshes are still quads at run-time). -- *RGB/XYZ Widget* -- Representing the object's Local Orientation and Origin. -- *Green* -- "sleeping meshes" that are not moving, saving calculations until an external event "wakes" them. -- *White* -- White lines represent active bounding meshes at are undergoing physics calculations, until such calculations are so small that the object is put to rest. This is how you can see the effects of the *Collision Bounds*. -- *Thick*, or *Many White Lines* -- A compound collision mesh/meshes. -- *Violet* -- Bounding meshes for soft bodies. -- *Red* -- The bounding box, the outer boundary of object. - It is always aligned with global X, Y and Z, and is used to optimize calculations. - Also represents meshes that have been forced into "no sleep" status. -- *Yellow* -- Normals. -- *Black* -- When in wireframe, this is your mesh's visual appearance. +- *RGB/XYZ Widget* - representing the object's Local Orientation and Origin. +- *Green* - "sleeping meshes" that are not moving, saving calculations until an external event "wakes" them. +- *White* - white lines represent active bounding meshes at are undergoing physics calculations, until such calculations are so small that the object is put to rest. This is how you can see the effects of the *Collision Bounds*. +- *Thick*, or *Many White Lines* - a compound collision mesh/meshes. +- *Violet* - bounding meshes for soft bodies. +- *Red* - the bounding box, the outer boundary of object. It is always aligned with global X, Y and Z, and is used to optimize calculations. Also represents meshes that have been forced into "no sleep" status. +- *Yellow* - Normals. +- *Black* - when in wireframe, this is your mesh's visual appearance. If you want finer-grained control over the display options, you can add this as a Python Controller and uncomment whichever pieces you want to see: @@ -122,66 +121,61 @@ If you want finer-grained control over the display options, you can add this as For all debug modes, see API docs for ``bge.constraints``. Show Framerate and Profile --------------------------- +++++++++++++++++++++++++++++++ .. figure:: /images/game_engine-physics-introduction-profile_stats.jpg - A shot of `Manual-BGE-Physics-DancingSticks.blend - `__ - with :menuselection:`Game --> Show Framerate and Profile` enabled. + Dancing Sticks -If you enable :menuselection:`Game --> Show Framerate and Profile`, it will put some statistics in the upper left area of the game window. +A shot of `Manual-BGE-Physics-DancingSticks.blend `__ with :menuselection:`Game > Show Framerate and Profile` enabled. -.. seealso:: - - These can be very informative, but also a bit cryptic. Moguri has elaborated on their meanings, for us: `Moguri's blog `__. +If you enable :menuselection:`Game > Show Framerate and Profile`, it will put some statistics in the upper left area of the game window. +.. seealso:: + These can be very informative, but also a bit cryptic. Moguri has elaborated on their meanings: `Moguri's blog `__. Mesh Deformations ------------------ +++++++++++++++++++++++++++++++ As mentioned above, rigid body physics do not affect mesh deformations, nor do they account for them in the physics model. This leaves you with a few options: - Soft Bodies ------------ - -You can try using a :doc:`soft body `, but these are fairly hard to configure well. +++++++++++++++++++++++++++++++ +You can try using a Soft Body, but these are fairly hard to configure well. Actions -------- +++++++++++++++++++++++++++++++ -To use an :doc:`Action Actuator ` to do the deformation, you have to make a choice. If you use *shape keys* in the Action, you will be fine as far as the overall collisions (but see below for the note on ``reinstancePhysicsMesh()``). The mesh itself is both a display and a physics mesh, so there is not much to configure. +To use an :doc:`Action Actuator ` to do the deformation, you have to make a choice. If you use *shape keys* in the Action, you will be fine as far as the overall collisions (but see below for the note on ``reinstancePhysicsMesh()``). The mesh itself is both a display and a physics mesh, so there is not much to configure. To use an *armature* as the deformer will require a bit of extra thought and effort. Basically the armature will only deform a mesh if the armature is the parent of that mesh. But at that point, your mesh will lose its physics responsiveness, and only hang in the air (it is copying the location/rotation of the armature). To somewhat fix this you can then parent the armature to a collision mesh (perhaps a simple box or otherwise very low-poly mesh). This "Deformation Mesh" will be the physics representative, being type: Dynamic or Rigid Body, but it will be set to Invisible. Then "display mesh" will be the opposite set to *No Collision*, but visible. This still leaves the problem mentioned in the previous paragraph. When you deform a display mesh, it does not update the corresponding physics mesh. You can view this evidently when you enable physics visualization (`Visualizing Physics`_) -- the collision bounds will remain exactly as when they began. To fix this, you must call ``own.reinstancePhysicsMesh()`` in some form. Currently this only works on *Triangle Mesh* bounds, not *Convex Hull*. -We have prepared a demonstration file in `Manual-BGE-Physics-DancingSticks.blend `__. -Note that, we had to increase the :menuselection:`World --> Physics --> Physics Steps --> Substeps` to make the collisions work well. The more basic case is the case the Shapekeyed Action, which you can see in the back area of the scene. Since it is the only object involved, you can call ``reinstancePhysicsMesh()`` unadorned, and it will do the right thing. +We have prepared a demonstration file in `Manual-BGE-Physics-DancingSticks.blend `__. Note that, we had to increase the :menuselection:`World --> Physics --> Physics Steps --> Substeps` to make the collisions work well. The more basic case is the case the Shapekeyed Action, which you can see in the back area of the scene. Since it is the only object involved, you can call ``reinstancePhysicsMesh()`` unadorned, and it will do the right thing. The more complicated case is the :menuselection:`Collision Mesh --> Armature --> Display Mesh` cluster, which you can see in the front of the scene. What it does in the blend-file is call ``reinstancePhysicsMesh(viz)``, that is, passing in a reference to the visual mesh. If we tried to establish this relationship without the use of Python, we would find that Blender's dependency check system would reject it as a cyclic setup. This is an example of where Blender's checking is too coarsely-grained, as this circle is perfectly valid: the grandparent object (the collision mesh) controls the location/rotation, while the middle object (the armature) receives the animated Action, where the child (the Display Mesh) receives the deformation, and passes that on up to the top, harmlessly. Something to note is that the collision mesh is merely a plane -- that is all it requires for this, since it will be getting the mesh data from ``viz``. Ragdolls --------- +++++++++++++++++++++++++++++++ A third option is to create your items out of many sub-objects, connected together with *rigid body joints* or similar. This can be quite a bit more work, but the results can be much more like a realistic response to collisions. For an add-on that can help you out in the process, check out the `Blender Ragdoll Implementation Kit `__. .. _game-engine-physics-bake-keyframes: Digging Deeper --------------- +++++++++++++++++++++++++++++++ Sometimes you will want to look at: -* The `main Bullet Physics page `__ -* The `Bullet Wiki `__ -* The `Bullet API Docs `__ -* The `Bullet Forums `__ +- The `main Bullet Physics page `__ +- The `Bullet Wiki `__ +- The `Bullet API Docs `__ +- The `Bullet Forums `__ Recording to Keyframes ----------------------- +++++++++++++++++++++++++++++++ Beyond gaming, sometimes you wish to render a complex scene that involves collisions, multiple forces, friction between multiple bodies, and air drag or even a simple setup that is just easier to achieve using the real-time physics. @@ -189,7 +183,7 @@ Blender provides a way to ''bake'' or ''record'' a physics simulation into keyfr .. figure:: /images/game_engine-physics-introduction-record_animation.png - Menu to record Keyframes to the Dope Sheet. + Menu to record Keyframes to the Dope Sheet All you have to do to achieve this effect is to execute the following script: @@ -204,20 +198,20 @@ it will lock away your keyframes for use in *Blender Render* mode. You can go ba Note that you can also use Game Logic Bricks and scripting. Everything will be recorded. Keyframe Clean-up ------------------ +++++++++++++++++++++++++++++++ .. figure:: /images/game_engine-physics-introduction-dope_sheet_full.png - Resulting recorded animation. + Resulting recorded animation *Record Animation* keys redundant data (data that did not change relative to the last frame). Pressing :kbd:`O` while in the *Dope Sheet* will remove all superfluous keyframes. Unwanted channels can also be removed. .. figure:: /images/game_engine-physics-introduction-dope_sheet_cleaned.png - Cleaned up recording. + Cleaned up recording Exporting ---------- +++++++++++++++++++++++++++++++ .bullet / Bullet Compatible Engines ----------------------------------- diff --git a/drafts/physics/world.rst b/source/manual/physics/world.rst similarity index 54% rename from drafts/physics/world.rst rename to source/manual/physics/world.rst index d93c5735..531b3c4a 100644 --- a/drafts/physics/world.rst +++ b/source/manual/physics/world.rst @@ -1,73 +1,51 @@ -************* +============================== World Physics -************* +============================== -.. figure:: /images/game-engine_physics_world_panel.png +.. figure:: /images/game_engine-physics-world_panel.png :align: right :width: 290px - BGE World Physics panel. - + World Physics panel Physics Panel -============= +++++++++++++++++++++++++++++++ -The *Game Physics* located in the *World* panel determine the type -of physical rules that govern the Game Engine scene, and the gravity value to be used. -Based on the physics engine selected, in physics simulations in the Game Engine, -Blender will automatically move *Actors* in the downward (-Z) direction. -After you arrange the actors and they move as you wish, -you can then bake this computed motion into keyframes -(see :ref:`game-engine-physics-bake-keyframes` for more info). +The *Game Physics* located in the *World* panel determine the type of physical rules that govern the Game Engine scene, and the gravity value to be used. Based on the physics engine selected, in physics simulations in the Game Engine, Blender will automatically move *Actors* in the downward (-Z) direction. After you arrange the actors and they move as you wish, you can then bake this computed motion into keyframes (see :ref:`game-engine-physics-bake-keyframes` for more info). Physics Engine Set the type of physics engine to use. Bullet - The default physics engine, in active development. - It handles movement and collision detection. - The things that collide transfer momentum to the collided object. + The default physics engine, in active development. It handles movement and collision detection. The things that collide transfer momentum to the collided object. None - No physics in use. Things are not affected by gravity and can fly about in a virtual space. - Objects in motion stay in that motion. + No physics in use. Things are not affected by gravity and can fly about in a virtual space. Objects in motion stay in that motion. Gravity - The gravitational acceleration, m.s\ :sup:`-2` (in units of meters per squared second), - of this world. Each object that is an actor has a mass and size slider. - In conjunction with the frame rate, - Blender uses this info to calculate how fast the object should accelerate downward. + The gravitational acceleration, m.s\ :sup:`-2` (in units of meters per squared second), of this world. Each object that is an actor has a mass and size slider. In conjunction with the frame rate, Blender uses this info to calculate how fast the object should accelerate downward. Culling Resolution - The size of the occlusion culling buffer in pixel, use higher value for better precision (slower). - The optimized Bullet DBVT for view frustum and occlusion culling is activated internally by default. + The size of the occlusion culling buffer in pixel, use higher value for better precision (slower). The optimized Bullet DBVT for view frustum and occlusion culling is activated internally by default. Physics Steps Max - Sets the maximum number of physics steps per game frame if graphics slow down the game. - higher value allows physics to keep up with real-time. + Sets the maximum number of physics steps per game frame if graphics slow down the game. higher value allows physics to keep up with real-time. Substeps Sets the number of simulation sub-steps per physics time step. Higher value give better physics precision. FPS - Set the nominal number of game frames per second. - Physics fixed timestep = 1/fps, independently of actual frame rate. + Set the nominal number of game frames per second. Physics fixed timestep = 1/fps, independently of actual frame rate. Logic Steps - Sets the maximum number of logic frame per game frame if graphics slows down the game, - higher value allows better synchronization with physics. + Sets the maximum number of logic frame per game frame if graphics slows down the game, higher value allows better synchronization with physics. Physics Deactivation - These settings control the threshold at which physics is deactivated. - These settings help reducing the processing spent on Physics simulation during the game. + These settings control the threshold at which physics is deactivated. These settings help reducing the processing spent on Physics simulation during the game. Linear Threshold - The speed limit under which a rigid body will go to sleep (stop moving) - if it stays below the limits for a time equal or longer than the deactivation time - (sleeping is disabled when deactivation time is set to 0). + The speed limit under which a rigid body will go to sleep (stop moving) if it stays below the limits for a time equal or longer than the deactivation time (sleeping is disabled when deactivation time is set to 0). Angular Threshold Same as linear threshold, but for rotation limit (in rad/s) Time - The amount of time in which the object must have motion below the thresholds - for physics to be disabled (0.0 disables physics deactivation). - + The amount of time in which the object must have motion below the thresholds for physics to be disabled (0.0 disables physics deactivation). Navigation Mesh -=============== +++++++++++++++++++++++++++++++ Rasterization Cell size @@ -108,16 +86,12 @@ Detail Mesh Max Sample Error Detail mesh simplification max sample error. - Obstacle Simulation -=================== +++++++++++++++++++++++++++++++ -Simulation used for obstacle avoidance in the Game Engine, -based on the RVO (Reciprocal Velocity Obstacles) principle. -The aim is to prevent one or more actors colliding with obstacles. +Simulation used for obstacle avoidance in the Game Engine, based on the RVO (Reciprocal Velocity Obstacles) principle. The aim is to prevent one or more actors colliding with obstacles. -See `Pathfinding and steering behaviors `__ -for more details. +See `Pathfinding and steering behaviors `__ for more details. Type None @@ -128,8 +102,6 @@ Type Obstacle simulation is based on the `RVO method `__ with ray sampling. Level height - Max difference in heights of obstacles to enable their interaction. - Used to define minimum margin between obstacles by height, - when they are treated as those which are situated one above the other i.e. they does not influence to each other. + Max difference in heights of obstacles to enable their interaction. Used to define minimum margin between obstacles by height, when they are treated as those which are situated one above the other i.e. they does not influence to each other. Visualization Enable debug visualization for obstacle simulation. diff --git a/source/manual/python/index.rst b/source/manual/python/index.rst deleted file mode 100644 index 5fb2953a..00000000 --- a/source/manual/python/index.rst +++ /dev/null @@ -1,12 +0,0 @@ -.. _python-index: - -++++++++++++++++ -Python Scripting -++++++++++++++++ - -.. toctree:: - :maxdepth: 2 - - introduction.rst - python_game_engine.rst - understanding_inheritance_and_composition_in_game_scripting.rst \ No newline at end of file diff --git a/source/manual/python/introduction.rst b/source/manual/python/introduction.rst deleted file mode 100644 index 87d62fa6..00000000 --- a/source/manual/python/introduction.rst +++ /dev/null @@ -1,479 +0,0 @@ -.. _python-introduction: - -************************* -Introduction to Scripting -************************* - -Congratulations, you finally arrived at one of the most technical parts of the manual. Keep that in mind in case you get lost. - -The UPBGE game engine was once famous for letting you create a full game without touching a single piece of code. Although this may sound attractive, -it also leads to a very limited game-making experience. Logic bricks, as presented in :ref:`Logic Bricks chapter `, -are very handy for quick prototyping. However, once you need to access advanced resources, external libraries and devices, or simply optimize your application, -a programming language becomes your new best friend. - -Through the use of a scripting language called **Python**, the game engine (as UPBGE itself) is fully extensible. This programming language is easy to learn, -although extremely powerful. Be aware, though, that you will not find a complete guide to learning Python here. There are plenty of resources online and offline -that will serve you better. However, even if you are not inclined to study Python deeply now, sooner or later you will find yourself struggling with script files. -So, it's important to know what you are dealing with. - -.. note:: **Yes, You Can** - - For those experienced Python programmers (or for those catching up with the reference learning material), - always remember: if you can do something with Python, chances are, you can do it in the game engine. - -After the brief overview in the Python basics, we will explain how to apply your knowledge of Python inside the game engine. You'll also learn -how to access the Python methods, properties, and objects you'll be using. - -Why Script When You Can Logic Brick It? -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -We can compare logic bricks with real bricks. On the one hand, we have strong elements on which to build our system, but, on the other hand, we have a -system as flexible as a blind wall. - -There are many occasions when the same effect can be achieved in different ways. Different phases of the production may also require varied -workflows. The reason for picking a particular method is often personal. Nevertheless, we present here a few arguments that may convince you to crack a -good Python book and start learning more about it: - -* Sane replacement for large-scale logic-bricked objects. -* Better handling of multiple objects. -* Access to UPBGE's advanced features. -* Use features that are not part of UPBGE. -* Keep track of your changes with a version control system. -* Debug your game while it runs. - -.. note:: **Logic Brick, the Necessary Good** - - You can't ever get away from logic bricks. Even when using Python exclusively for your game, you will need to invoke the scripts from a Python controller. - The ideal is to find the balance that fits your project. - -Sane Replacement for Large-Scale Logic-Bricked Objects -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -It's always good to have an excuse to show an image in a programming chapter, and here it is. In the next pìcture you see the logic bricks for Frankie, -the main character of the open game **Yo Frankie!** - -.. figure:: /images/Python_Scripting/python-scripting-introduction-to-scripting-01.png - - Chapagetti - -This system is well organized: different actions belong to different states and sensors; controllers and actuators are properly named. -Nevertheless, it's not hard to lose yourself trying to understand which sensor connects to which controller. One of the reasons for such a complex -project to rely on logic bricks is because **Yo Frankie!** serves as a didactic project for artists wanting to start with the game engine. Anyone with a -little programming experience can take the files and expand the game freely. (Have you tried it yet?) - -However, you often aim for performance and workflow. Having everything centralized in a single script file can save you a lot of time. - -Another important aspect while working is to document your project. It's easy to open a file only a few months old and find yourself completely lost. -Script files, on the other hand, are naturally structured to be self-documented. To document logic bricks, you need to rely on text files inside or outside -your Blender files (and neat image diagrams). It's definitively not as handy as inline comments along your code. (Code diagrams can still be useful, but -that's a different topic.) - -Better Handling of Multiple Objects -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -Big projects lead to multiple files, this is an inevitable truth. Even when you use external linking and libraries, it's crucial to optimize -the time spent in changing multiple sets at once. This is one of the weaknesses of logic bricks, they make it hard to automatically change -a big range of elements at the same time. - -If you need to change a property name or initial value of an object, you will need to repeat that change in other instances of the same. We have ways -to make it easier by using copy and paste of logic bricks/properties between objects or even through logic sharing. Nevertheless, you will still have -to update all the Property sensors, controllers, and actuators that may rely on the old value. That's especially true for objects with logic bricks -across them, as we saw, the game engine allows you to link logic bricks from different objects. However, self-contained objects/logic bricks are easier -to work with (and with less spaghetti). - -If you thought that before picture was a mess, try to make sense of next picture. Here we have the logic bricks of **Frankie**, plus the objects that have logic bricks -connected to it. As you recall, you can restrict the visible logics through the Show Panel option, but this illustrates how difficult it is to get a global view of your system. - -.. figure:: /images/Python_Scripting/python-scripting-introduction-to-scripting-02.png - - Spaghetti - -Once you start to work with scripts, you will see how easy it is to assume control over all your scene elements in a global way. It will give you lots of benefits in the long run. - -Access to UPBGE's Advanced Features -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -You will be happy to know that the game engine has a powerful set of features beyond those found in the logic brick's interface. Also, almost all -the functionality found in the logic bricks can be accomplished through an equivalent method of the game engine API (which will be covered in the -section "Using the Game Engine API - Application Programming Interface"). The API ranges from tasks that could be performed with logic bricks, such -as to change a property in a sensor or to completely remove an object from the game, all the way to functionality not available otherwise, such as -playing videos and network connection. - -There are a few reasons for not having all the methods accessible through logic bricks. First, a graphic interface is very limited for complex coding. -You may end up with a slow system that is far from optimized. Second, having methods independent from the interface allows it to be expanded more easily -and constantly (from a development point of view). Some advanced features, such as mirroring system, dynamic load of meshes, OpenGL calls, and custom constraints -would hardly fit in the current game engine interface. They would probably end up not being implemented because of the amount of extra work required. Other -things you will find in the game engine built-in methods are: make screenshots; change world settings (gravity, logic tic rates); access the returned data from sensors -(pressed keys, mouse position); change object properties (camera lens, light colors, object mass); and many others we will cover in the course of this chapter. - -Use Features That Are Not Part of UPBGE -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -No man is an island. No game is an island either (except **Monkey Island**). And the easiest way to integrate your UPBGE game with the exterior -world is with Python. If you want to use external devices to control the game input or to tie external applications to your game, you may find Python suitable for that task. - -Here are some examples that showcase what can be done with Python external libraries: - -* Grab data off the Internet for game score. -* Control your game with a Nintendo Wiimote controller. -* Combine Head-tracking and immersive displays for augmented reality. - -Those possibilities go with the previous statement that almost everything that you can do with Python, you can do in the game engine. And since Python can -be used with modules written in other languages (properly wrapped), you can virtually use any application as a basis for your system. - -.. note:: **Cross-Platform, Yes; Cross-Version, Not** - - To use external libraries, you must know the Python version they were built against. The Python library you are using must be compatible with the - Python version that comes with your UPBGE. It's also valuable to check how often the library is updated and if it will be maintained in the future. - -Keep Track of Your Changes with a Version Control System -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -If you take a Blender file in two different moments of your production, you will have a hard time finding what has changed between them. This is because UPBGE/Blender's -native file format is a binary type. Binary files are written in a way that you can't get to them directly, they are designed to be accessed by programs and not by human beings. - -Scripts, on the other hand, are plain text files. You can open a script in any text editor and immediately see the differences between two similar files. Finding those -differences are vital to going forward and backward with your experimentations during work. Actually, if you don't want to check for differences manually, you may want -to consider using external script files with a version control system such as Git, SVN, Mercury, or CVN. - -.. note:: **And the Catch Is …** - - This works only for scripts maintained outside UPBGE. This is one of the strong reasons to prefer Python Module controllers as opposed to Python Script controllers. - -A version control system allows you to move between working versions of your project files. It makes it relatively safe to experiment with different -methods in a destructive way. In other words, it's a system to protect you from yourself. In next image, you can see an application of this. Someone changed -the script file online while we were working locally on it. Instead of manually tracking down the differences, we could use a tool to merge both changes into -a new file and commit it. - -.. figure:: /images/Python_Scripting/python-scripting-introduction-to-scripting-03.png - - Git diff - -Debug Your Game While It Runs -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -Interpreted languages (also known as scripting languages) are slower than compiled code. Therefore, to speed up their performance they are -precompiled and cached the first time they run (when you launch your game). This is not mandatory, though, and if you are using external Python scripts -(instead of those created inside UPBGE), you can use the debugging button to have them reloaded every time they are called. - -In next figure, we have the reload.reload\_me module that will be reloaded every frame. That way you can dynamically change the content of your scripts, -variables, and functions without having to restart the game. Try it yourself: download the example :download:`001_reloadme.zip ` -to your computer, extract it and launch debug\_python.blend. Play your game, and you will see a spinning cube. The speed of the cube is controlled by the 14th line of the file reload.py, -found in the same folder. - -.. code-block:: python - - # edit the speed value and you will see the rotation changing - - # (try with values from 0.01 to 0.05) - - speed = 0.025 - -.. figure:: /images/Python_Scripting/python-scripting-introduction-to-scripting-04.png - - Debugging button at Python Module controller. - -Without closing UPBGE or even stopping your game, open the file script.py in a text editor, change this line to 0.05, for example, and save it. -You will see the speed changing immediately. Your game is literally being updated at runtime, and you can change any module that's been called with the debug option on. - -.. note:: **Turn It Off When You Leave** - - Remember to turn debugging off when you are done with this script. Reloading the script every frame can drastically reduce your performance. - -So What Exactly Is Python? -^^^^^^^^^^^^^^^^^^^^^^^^^^ - -Now that you are aware of all the benefits of using Python, it's time to understand what Python is. Once again, we can't go over all the aspects of the language here. Nevertheless, -a general overview is still desirable to help you understand the examples presented in this book. - -To study your scripts, you must be aware of the following aspects: - -* Flexible data types -* Indentation -* OOP, Object-Oriented Programming - -Flexible Data Types -^^^^^^^^^^^^^^^^^^^ - -Whenever you write a program, you have to use variables to store changing values at runtime. Unlike languages such as C and Java, Python variables are -very flexible: they can be declared on the fly when you first use them; you can assign different data types for the same variable; and you can even name them dynamically: - -.. code-block:: python - - for i in range(10): - exec("var_%d = %d" % (i,i)) - -This snip of code is the equivalent to the following: - -.. code-block:: python - - var_0 = 0 - var_1 = 1 - var_2 = 2 - (...) - -As you can see, the variable names are created at runtime. Therefore, if you name your objects correctly in the Blender file, you can store them in -variables named after them. The following code snip assigns the scene objects (retrieved from the game engine) to variables named after their names. - -.. code-block:: python - - (...) - - for object in scene.objects: - - exec("%s = object" % (object.name)) - -Although we have flexible data types, we must respect variable types while manipulating and passing/returning them to functions. Here you can see a list -of the data types you will find in the UPBGE game engine API: - -- **Integer:** This is the most common of the numerical types. It can store any number that fits in your computer memory. You can perform any regular math operations on it, such as sum, subtraction, division, modulus, and potency. - -.. code-block:: python - - my_integer = 112358132134 - -- **Float:** This type is very similar to integers, but has a range of numbers that includes fractions. If you divide an even number by its half, Python will automatically convert your integer to a float number. - -.. code-block:: python - - simple_float = 0.5 - - phi = (1 + math.sqrt(5)) / 2 # ~1.618 - -- **Boolean:** As simple as it sounds, this data type stores a true or a false value. It can also be understood as an integer with the value of 1 or 0. - -.. code-block:: python - - i_am_enjoying_the_manual = True - - i_am_understanding_the_manual = i_am_enjoying_the_manual - 1 - -- **List:** A list contains a conjunct of elements ordered by ascending indexes. Although the size of a list can change on the fly, you can't access a list index that wasn't created yet (this will crash Python). List can have mixed elements such as integers, strings, and objects. - -.. code-block:: python - - my_list = [3.14159265359, "PI", True] - -- **Tuple:** This is another kind of list where elements can't be overwritten. As with lists, you can read them using indexes. But it's more common to access all the values at once, assigning them to different variables. - -.. code-block:: python - - t,u,p,l,e = (1,2,3,4,5) # works as: t = 1, u = 2, p = 3, ... - -- **String:** Whenever you need to store a text, you will use strings. As words are a combination of individual letters, a string consists of individual characters. Indeed, strings can be understood as a list of characters because you can access them using their location index, though you can't overwrite them (like in a tuple). - -.. code-block:: python - - python = "rulez" - -- **Dictionary:** Like a list, a dictionary can store multiple values. Unlike a list, a dictionary is not based on numerical index access. Therefore, we have strings working as "keys" to store and retrieve the individual variables. In fact, anything can be a key to a dictionary, a number, an object, a class … - -.. code-block:: python - - _3d_software = {"name ": "UPBGE", "version": 0.3} - -- **Custom Types:** These are things such as vectors and matrixes. The game engine combines some of the basic data types to create more complex ones. They are mainly used for vectors and matrixes. That way you can interact mathematically with them in a way that basic types won't do. - -.. code-block:: python - - mathutils.Vector(1,0,0) * object.orientation # the result is a Matrix - -Indentation -^^^^^^^^^^^ - -Indentation, the amount of white spaces or tabs you leave before a new line. - -When coding in a particular programming language, it's mandatory to follow its general syntax. In that regard, Python is one of the most restricted languages out there. -Think of this as a tough grammar exam. You won't be able to score high unless you follow all the pre-established grammar rules. Now imagine that it could be even worse, -as bad as a written legal document. We are talking about strict paragraphs, indentation, information hierarchy, and similar rules. - -As in a legal document, those rules have a raison d'etrê. With strict form/syntax, you can focus more on the content of the text. -And ambiguity in the context of code making is fatal. - -Indentation is the most important aspect of Python syntax. Python code uses the indentation level to define where loops, functions, and general nesting start/end. -Take a look at this example: - -.. code-block:: python - - 1 def here_i_am(): # definition of the first function - - 2 print("I'm inside the first function.") - - 3 print("I'm outside the function.") - - 4 def but_I'm_not_here(): # definition of the second function - - 5 print("For you can't see me!") - - 6 print("I'm still outside the function.") - - 7 here_i_am() # calling the first function - -Here we are defining a function (1–2), calling a built-in print function (3), defining another function (4–5), calling another built-in print function (6), -and finally calling the first function we declared (7). - -The output of such script will be: - -`I'm outside the function.` - -`I'm still outside the function.` - -`I'm inside the first function.` - -The first thing you may notice is that Python runs from top to bottom. Therefore, you must define your function before you call it. Secondly, you can see that the second -function is never called. So how can the code interpreter determine which print statements to call? The answer is: indentation! Whenever you change the indentation level -(lines 1–2, 2–3, 4–5, and 5–6), you determine the hierarchical relation between the elements. Therefore line 2 belongs to the function defined in line 1, line 5 to line 4, -and the other lines are all at the same level. - -Python pep-8 standard recommends to use spaces for identation. In the manual we will use 2 spaces identation. - -.. note:: **Pound Sign, I (Finally) Love You** - - If, like me, you never understood the reason for the number/pound sign key (#) on your phone, you will eventually find it very useful. - In Python, any text to the right of a pound sign is ignored by the interpreter. Therefore, the pound sign is used to add commentaries to your code - or to temporarily deactivate part of it. - -OOP - Object-Oriented Programming -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -Since games deal with 3D world objects, it makes sense to use a language that is oriented to them. The game engine itself is written in C++, a very strong and -object-oriented language, and Python OOP capabilities let you handle the game data in a Python-native way. It reflects in the game engine objects having their -own set of functions and variables directly accessed from a Python API (to be explained later in this chapter in the section "Using the Game Engine API - Application -Programming Interface"). - -In the Python code, you can (and will) create your own classes, modules, and elements. For example, you may want to control some 3D elements as a group defined -by your code. It will make it easy to get to all of them at once. Therefore, you can have a custom class that will store all the related objects you want to access -and preserve some properties as a group. - -Download the example :download:`002_oop.zip `, extract it and load the oop.blend file. - -The first script that runs in this file is the init\_world.py. Here we are creating two groups to store different kind of elements (cube and sphere). -In order to sort the objects between the groups, we go over the entire scene object list and check for objects with a property "cube" or "sphere" and append -them to their respective lists. - -.. code-block:: python - - # ################ # - # init\_world.py # - # ################ # - - import bge - from bge import logic as G - from bge import render as R - - # showing the mouse cursor - R.showMouse(True) - - # storing the current scene in a variable - scene = G.getCurrentScene() - - # define a class to store all group elements and the click object - class Group(): - def __init__(self, name): - self.name = name - self.click = None - self.objects = [] - - # create new element groups - cube_group = Group("cubes") - sphere_group = Group("sphere") - - # add all objects with an "ui" property to the created element - for obj in scene.objects: - if "cube" in obj: - cube_group.objects.append(obj) - elif "sphere" in obj: - sphere_group.objects.append(obj) - elif "click" in obj: - exec("%s\_group.click = obj" % (obj["click"])) - - G.groups = {"cube":cube_group, "sphere":sphere_group} - -After storing them in the global module `bge.logic`, we wait for the user to click in the cube or sphere in the middle of the scene. When that happens, it -will toggle the value of the on/off property of the cube or sphere. The following script (which runs every frame) will then hide/unhide the group's objects accordingly. - -.. code-block:: python - - # #################### # - # visibility\_check.py # - # #################### # - - from bge import logic - - # defines a function to hide/turn visible all the objects passed as argument - def change_visibility(objects, on_off): - for obj in objects: - obj.visible = on_off - - # retrieve the stored groups to local variables - cube_group = logic.groups["cube"] - sphere_group = logic.groups["sphere"] - - # read the current value of the "on\_off" property in the cube/sphere - cube_visible = cube_group.click["on\_off"] - sphere_visible = sphere_group.click["on\_off"] - - # calls the function into the group object with the visibility flag - change_visibility(cube_group.objects, cube_visible) - change_visibility(sphere_group.objects, sphere_visible) - -And we are done with this interaction. Play with the file by adding new elements (tubes, planes, monkeys) and make them interact as we have here. -A few copies and pastes should be enough to adapt this code to your new situation. Remember to note the current indentation used. - -Where to Learn Python -^^^^^^^^^^^^^^^^^^^^^ - -If you have previous experience with another programming language, you will learn Python in no time. If you go over some basic Python tutorials, -look at some script examples, and check the UPBGE game engine API, that might be enough. But if learning Python is your first step into coding experience, -don't worry. Take the time to read through the basics of the language, start with the simplest tasks, and never give up. - -Usually, a good way to start is tweaking ready-to-use scripts, which doesn't require you to understand all the aspects of the language before your first -experiments. Also, it gives you a good motivational boost by producing quick results for your efforts. We recommend you first learn Python and then focus on -its application in the game engine. But you may be more comfortable messing with game engine files first and then later learning Python more deeply. - -Online Material -^^^^^^^^^^^^^^^ - -Below are some websites where you can learn more about Python. - -``_ and ``_ - -Learn about new Python versions, API changes, and module documentation. - -``_ - -Official Blender + UPBGE API Documentation, all the built-in modules that can be used with the game engine. - -``_ - -Blender Artists forum, you can find good script examples in the Python section (general Blender Python) and in the game engine section. - -``_ - -Dive Into Python 3 covers Python 3 and its differences from Python 2. A complete book available online. - -``_ - -This interactive tutorial website offers a great introduction to Python for beginners. - - -Offline Material -^^^^^^^^^^^^^^^^ - -Books, there are plenty of them in your nearby library. - - -Python Built-in Help -^^^^^^^^^^^^^^^^^^^^ - -You can also access help directly in Python. - -.. code-block:: python - - dir(python_object) - -The Python function "dir" creates a list with all the functions/modules/attributes available to be accessed from this object. - -.. code-block:: python - - help(python_function) diff --git a/source/manual/python/understanding_inheritance_and_composition_in_game_scripting.rst b/source/manual/python/understanding_inheritance_and_composition_in_game_scripting.rst deleted file mode 100644 index a7d69fba..00000000 --- a/source/manual/python/understanding_inheritance_and_composition_in_game_scripting.rst +++ /dev/null @@ -1,558 +0,0 @@ -.. _understanding-inheritance-and-composition-in-game-scripting: - -=========================================================== -Understanding Inheritance And Composition In Game Scripting -=========================================================== - -Introduction ------------- - -Let us imagine we are making a video game in which characters can attack each other and receive damage. -You will likely want to add a few properties like health or max_health to each object and write simple scripts -to calculate them when the character gets hit or drinks a potion. Pretty simple, isn't it? - -In many cases, writing game scripts doesn't require much more knowledge than that. -A game engine is supposed to handle most of the heavy lifting for you, and all you need to do is declaring -a few such variables, or writing a few conditional statements, loops, or functions to stitch them together. -There is a reason why writing game logic is called 'scripting' even when it's done with a compiled -language like C#, after all. - -But what if you want to try something more complex, like creating an RPG where you can bash a door or a -chest until it breaks open? Do you see the resemblance between hitting an enemy with a sword and -doing the same to a crate? - -Of course, you can simply add the same variables to the crate and copy and paste the same code you used -to calculate a character's health. But what if there are many similar cases and you have to paste the -same code to hundreds of them? Wouldn't it make your project challenging to understand or modify? - -Although software engineering is not a popular topic among most game developers, some of its principles -like DRY or SOLID can offer a helpful guide in such a situation. - -And with slight exaggeration, we can say that the entire idea of software design revolves around the -concept of generalisation and abstraction, which is a tool invented to solve precisely such a kind of problem. -In other words, how can we generalise the idea of something that can be damaged into a reusable code so -that we don't have to repeatedly copy and paste the same code over and over? - -Object-Oriented Programming or OOP is a software paradigm that provides powerful tools we can utilise -to solve such a problem. Even though it has seen increasing challenges over the years, it remains one of -the most widely used software paradigms, well supported by popular languages like Python or C#. -So, let's look into the concept briefly in the next chapter. - -Type and Inheritance --------------------- - -To put it simply, a type in an OOP language determines an object's nature (i.e. properties and behaviours). -It also applies to a dynamically typed language like Python, which allows you to write code without caring -too much about types. You know that you can change the value of a variable from abc to ABC by invoking -its 'upper()' API because it has the type of str which declares upper() as its method. - -But the real benefit of having a type system goes further than allowing you to figure out what functions -an existing object provides. It can also serve as a tool to express a set of common characteristics that -things can share, like the fact that they can be damaged, for example. - -A character can be attacked and receives damage, and so can a crate. In other words, they are both something -capable of being damaged and probably also destroyed after getting hit repeatedly. Let's generalise this -idea as Damageable type as follows: - -.. code-block:: python - - class Damageable: - def __init__(self, init_health: int = 100): - self.health = init_health - - def damage(self, amount: int) -> None: - self.health = max(0, self.health - amount) - - @property - def destroyed(self) -> bool: - return self.health == 0 - -But how can you use (or 'reuse') it to eliminate the repetition? And that is where the concept of 'inheritance' -comes in. - -If you want to make your character or a crate class damageable, you can simply make them 'inherit' or derive -from 'Damageable' type like this: - -.. code-block:: python - - class Character(Damageable): - pass - - class Crate(Damageable): - pass - - character = Character() - - character.damage(40) - crate.damage(120) - - print(character.health) # Prints "60" - print(character.destroyed) # Prints "False" - - print(crate.health) # Prints "0" - print(crate.destroyed) # Prints "True" - -As you can see, inheritance is a powerful tool to generalise ideas and promote code reuse. But -it is not without problems which we will discuss in the following chapter. - -Problems of Inheritance ------------------------ - -We just made a crate damageable by deriving it from Damageable type. But what if we also want to -add some other features, like being able to be opened? Maybe we could define another class Openable -to describe the concept of something which can be opened. But can an object inherit from both of those types? - -This can pose a serious issue in a language that does not allow multiple inheritance like C#. -And even with languages that do, deriving from multiple parents may bring more headaches than -benefits sometimes, causing issues like the infamous Diamond Problem. - -Furthermore, it can also introduce additional challenges in the context of game development. -Typically a game engine handles all performance-critical operations in its native layer while -exposing a small set of features as a scripting API in a higher-level language like C# or Python -to offer better productivity and ease of use for its users. - -Because of this, some game engines (e.g. a famous private one that keeps them "united" :-)) do -not allow instantiating such game-related classes -directly in the scripting layer, making it difficult or even impossible to extend them by subtyping, -as we discussed in the previous chapter. - -And even those that do (e.g. Godot), the typical workflow they provide involves providing initial -parameters from the editor, which the engine uses to instantiate objects for the user. So, if you create -game objects directly in code, you'll lose all the conveniences the editor provides. (This, however, is not -the case in UPBGE as it has a unique feature that allows you to combine both approaches. We will discuss -this feature later.) - -Due to such limitations, it is often desirable to take a different approach to promote code reuse when -working on a game project. Fortunately, a design principle can be used to overcome this particular problem -called Composition Over Inheritance, which also works well when writing game scripts. - -Composition Over Inheritance ----------------------------- - -The basic idea of composition is implementing each feature of an object as a modular 'component'. By doing so, -we can compose such elements to describe the behaviours and properties of the whole. - -For example, instead of making the Crate class inherit from Damageable type, we can rename the latter -to HitBox and make it a property of the enclosing class: - -.. code-block:: python - - class HitBox: - def __init__(self, init_health: int = 100): - self.health = init_health - - def damage(self, amount: int) -> None: - self.health = max(0, self.health - amount) - - @property - def destroyed(self) -> bool: - return self.health == 0 - - class Crate: - def __init__(self): - self.hit_box = HitBox() - - crate = Crate() - - crate.hit_box.damage(80) - - print(crate.hit_box.health) # Prints "20" - print(crate.hit_box.destroyed) # Prints "False" - - crate.hit_box.damage(50) - - print(crate.hit_box.health) # Prints "0" - print(crate.hit_box.destroyed) # Prints "True" - -Similarly, we can also make the crate 'openable' by creating a Door component and assign an -instance of it as a property of Crate: - -.. code-block:: python - - class Door: - def __init__(self, opened: bool = True): - self.opened = opened - - def open(self) -> None: - self.opened = True - - def close(self) -> None: - self.opened = False - - class Crate: - def __init__(self): - self.hit_box = HitBox() - self.door = Door() - - crate = Crate() - - crate.door.open() - print(crate.door.opened) # Prints "True" - - crate.door.close() - print(crate.door.opened) # Prints "False" - -In this way, you can add as many features to an object as you like without the concern of -introducing potential conflict in the type hierarchy. - -Dynamic Component Model ------------------------ - -Let's take the idea one step further and generalise the concept of components itself. What if -we replace individual properties like door or hit_box with a generic list? - -.. code-block:: python - - class Crate: - def __init__(self): - self.components = dict() - - crate = Crate() - - crate.components["hit_box"] = HitBox() # Now the crate can be damaged. - crate.components["door"] = Door() # And it becomes openable. - -As you see, now we can attach an arbitrary behaviour to an existing object without modifying the -class definition. And what if we make the Character class damageable in the same manner? -Wouldn't it make Character look almost identical with Crate? - -.. code-block:: python - - class Character: - def __init__(self): - self.components = dict() - - character = Character() - - character.components["hit_box"] = HitBox() - -They look similar indeed! Then why not replace them both with something more generic, like GameObject? - -.. code-block:: python - - class GameObject: - def __init__(self, name: str): - self.name = name - self.components = dict() - - character = GameObject("Character") - character.components["hit_box"] = HitBox() - - crate = GameObject("Crate") - crate.components["hit_box"] = HitBox() - crate.components["door"] = Door() - -If you want to make it a bit more precise, you can define a common base type to represent -a component, like Component and derive both HitBox and Door from it. Using Python's typing -support for clarity, the code would look like the following example: - -.. code-block:: python - - from abc import ABC - from typing import Dict - - class Component(ABC): # Indicates that this is an abstract base class - pass - - class GameObject: - def __init__(self, name: str): - self.name = name - self.components: Dict[str, Component] = dict() - - class Door(Component): - ... - - class HitBox(Component): - ... - -In fact, this is what objects and components in game engines are all about. They may -be named differently or have slightly different APIs, depending on the game engine you choose. -But be it GameObject/MonoBehaviour in other game engine or KX_GameObject/KX_PythonComponent in UPBGE, -the core idea behind it remains the same nonetheless. - -The dynamic nature - namely, the ability to define arbitrary behaviour as a component and -attach it to an object without modifying its source - of the compositional pattern fits -game development so well that many game engines enforce it as the only viable method to -write game scripts. - -But could it be a 'silver bullet' of software design pattern? If composition is so good -for everything, why almost all major OOP languages still support inheritance? - -Why Inheritance Still Matters? ------------------------------- - -One prominent case where using inheritance over composition would make sense is when -the concepts you want to represent as types have an is-a relationship with each other. - -Suppose you want to make an inventory system that can store things like food or weapons. -Both an apple and a dagger may take up some space if you put them in your inventory, and -they may also have other common traits like having specific weight and so on. - -In other words, we can say that any item has a specific inventory slot size and weight. -As long as Potion or Weapon is an Item, it inherits common properties like inventory_size -or weight from its parent type. Bearing that in mind, it shouldn't be difficult to see how -saying that "a dagger is an item" is much more intuitive than saying that "it contains a -component with item-specific properties and behaviours". - -Another disadvantage of using the compositional pattern could be its dynamic nature itself. -As with most things in software development, there is a trade-off relationship between -dynamically attaching properties or behaviours of an object and statically defining them. - -Remember our first version of Character class that directly extends Damageable? - -.. code-block:: python - - character = Character() - character.damage(50) - -Now, compare that with a componentised version: - -.. code-block:: python - - character = GameObject("Character") - - # Let's assume that the engine added HitBox component automatically. - character.components["hit_box"].damage(50) - -Can you see the difference? Aside from being slightly more verbose, the latter version -is also much more prone to errors. With the former example, a decent Python IDE with a proper -setup will autocomplete methods like damage and warn you if you accidentally make a typo, -like when you type character.destroeyd instead of character.destroyed, for example. - -And in case you want to rename a method or property, like changing damage to hit, for instance, -you rely on refactoring support that most IDEs provide to perform the task without an error. - -However, you will lose all such conveniences with the dynamic approach as your IDE won't be -able to infer proper types in that case, which could become a significant issue if your -project grows larger and more complex. - -Now, examine this method signature: - -.. code-block:: python - - def heal(target, amount) - -Can you guess the proper usage of that API or how to implement its body if you are -a developer? If you are not sure, how about this version? - -.. code-block:: python - - def heal(target: GameObject, amount: float) -> None - -Now you know that you are expected to pass a GameObject instance as the first parameter -and specify the amount you want to heal as a float value. But what is a GameObject really? - -As we learned from the previous chapter, it's just something that contains components. -It may mean anything - anything from a character to a house. You may make a good guess from -the method name and assume it would expect a GameObject with a Hitbox attached to it, but -nobody will stop you if you pass an actual house as long as it's also a GameObject. - -Also, others may not be as smart as you and may have difficulty guessing the proper type of -object to pass as the first parameter without having good documentation. - -But what if we haven't adopted the component approach but just used the plain inheritance model instead? - -.. code-block:: python - - def heal(target: Damageable, amount: float) -> None: - -Now it became immediately apparent what the function expects as its first parameter. -If you use an IDE, it will also let you know that the target argument supports damage method, -which you can use to implement the function body as target.damage(-amount). Furthermore, it will -also warn you if you attempt to pass a non-Damageable type object like a House, all of which can -help you maintain your codebase as it grows in size. - -However, there was a good reason why we considered adopting the more dynamic approach before, -and we may still want to keep some of its benefits. - -Suppose you want to derive your Crate class directly from Openable type instead of attaching a -Door component to it as we did before. Wouldn't it be still nice if you can assign different kinds -of doors - like one with an animation, or another with a locking mechanism, and so on - without -having to rewrite the Crate class every time? - -A language feature or a design pattern called mixin can provide an answer to this question. - -Mixins And Traits ------------------ - -According to a relevant Wikipedia article, a mixin is "a class that contains methods -for use by other classes without having to be the parent class of those other classes". - -Such a class is sometimes called a trait and often named as an adjective like Damageable or -Openable to describe a specific aspect or characteristic of the target object. - -The idea is, you can define various aspects of an object as "traits" and "mix them in" as -needed. It is a powerful tool that provides a way to add behaviours to an existing class in a -compositional manner without erasing the type information as the component pattern does. - -Let's make our Crate class again using the technique: - -.. code-block:: python - - # The same class we saw at the beginning, now acting as a 'trait'. - class Damageable: - def __init__(self): - self.health = 100 - - def damage(self, amount: int) -> None: - self.health = max(0, self.health - amount) - - @property - def destroyed(self) -> bool: - return self.health == 0 - - # Tha same Door class, now renamed as appropriate for a trait - class Openable: - def __init__(self): - self.opened = True - - def open(self) -> None: - self.opened = True - - def close(self) -> None: - self.opened = False - - # Let's assume there is a base class for all items, named as `Item`. - # Now you can "mix" useful traits into Item as follows: - class Crate(Damageable, Openable, Item): - pass - - crate = Crate() - - print(isinstance(crate, Damageable)) # Returns "True" - - crate.damage(50) # Much better than crate.components["hit_box"].damage(50) - crate.open() - -You may have noticed how intuitive the class definition reads now. Even without any -comment or having to read the source code, you can immediately see the purpose of the -Crate class as it's a "damageable and openable item", indeed. - -Also, because the class is a proper subtype of both Damageable and Openable, an IDE will -be able to autocomplete such methods like damage(amount) or open() for you. It also enables -you to tighten the type signature when you write an API like -def heal(damageable: Damageable, amount: Float) -> None so that an IDE can warn you if you -attempt to pass an object with a wrong type by mistake. - -But how can we preserve the dynamic nature of the component model? What if I want to add crates -in the game editor and make some of them have a unique animation when they open? - -Of course, you can still benefit from the dynamic nature of using components, well, by -using components! In fact, mixins and components are not mutually exclusive concepts since -you can write a trait that relies on a component to implement a behaviour. - -.. code-block:: python - - class Door(Component): - def __init__(self): - self.opened = True - - class Openable: - - @property - def door(self) -> Door: - return next(filter(lambda o: isinstance(o, Door), self.components)) - - @property - def opened(self)-> bool: - return self.door.opened - - def open(self) -> None: - self.door.opened = True - - def close(self) -> None: - self.door.opened = False - - class Crate(Openable, GameObject): - pass - -As the trait is now mixed into a GameObject, it can reference its components property -from which it can find a suitable component to work with, in this case, a Door. And the -fact that the Door class is a component means that you can dynamically assign a specific -implementation of it from the game editor without modifying the source code of either -Crate or Openable. - -If you want to add an animation to some of the crates, for example, you can write a special -subtype of Door like class AnimatedDoor(Door) and attach it to a game object with the -Openable trait. As long as the target object has the trait, it wouldn't matter if it's -a crate or a gate. And as long as the component derives from Door, it will work perfectly -fine with any Openable object, be it an animated door or one that requires a key to -open it, for instance. - -Mixins and Components in UPBGE ------------------------------- - -As shown in the previous chapters, the component model and mixins are powerful tools -to design your software while maintaining a clean separation of concern between -classes responsible for different functionalities. - -To reap the full benefits of these design patterns, however, it is necessary to have -a proper programming environment that supports such concepts. - -An older version of C# (before 8.0), for example, didn't allow providing a default -implementation of a method defined in an interface, thus severely limiting its usefulness when used as a trait. - -And while most of the game engines enforced either the component model (e.g. private one that keeps them united) or -the inheritance model (e.g. Godot) on their users, few, if any, support both of them like UPBGE now does. - -With its recent introduction of the custom game object feature, you can define -either static or dynamic (i.e. component-based) traits and mix them into any -game object in UPBGE. It provides programmers with a powerful tool to design -and organise game-related classes without sacrificing the ability to -configure them graphically within UPBGE. - -The example code shown above will work almost verbatim on UPBGE if you simply -replace GameObject with KX_GameObject and Component with KX_PythonComponent like this: - -.. code-block:: python - - class Door(KX_PythonComponent): - args = OrderedDict(( - ("Open", True), - )) - - def start(self, args) -> None: - self.opened = args["Open"] - - # A dynamic trait based on component - class Openable: - - @property - def door(self) -> Door: - return next(filter(lambda o: isinstance(o, Door), self.components)) - - @property - def opened(self)-> bool: - return self.door.opened - - def open(self) -> None: - self.door.opened = True - - def close(self) -> None: - self.door.opened = False - - # An example of a static trait - class Damageable: - health: float - - def damage(self, amount: int) -> None: - self.health = max(0, self.health - amount) - - @property - def destroyed(self) -> bool: - return self.health == 0 - - class Crate(Openable, Damageable, KX_GameObject): - args = OrderedDict(( - ("Health", 100), - )) - - def start(self, args) -> None: - self.health = args["Health"] - -Now you can assign different initial health values to each crate in UPBGE or add an animated -door to some of them without writing a new class for such cases. Also, when you write -scripts, you can directly invoke any API they define without having to look up nested -components or losing the valuable type information. - -Those are some of the few unique advantages that UPBGE has over its competitors. diff --git a/source/manual/python_components/getting_started/character_controller_templates.rst b/source/manual/python_components/getting_started/character_controller_templates.rst index 52500c14..61f61384 100644 --- a/source/manual/python_components/getting_started/character_controller_templates.rst +++ b/source/manual/python_components/getting_started/character_controller_templates.rst @@ -6,41 +6,42 @@ Character Controller Templates These templates were created to help UPBGE users to create games or any kind of interactive things that requests a Character Controller. Easy to use, easy to attach to your project. -.. figure:: /images/Python_Components/Fig-08.png +.. figure:: /images/python_components/Fig-08.png + +| To use, just select it from template label at script editor and you're done! You can use this template in your projects, even for commercial projects. You only need to give credits to Guilherme Teres Nunes (UnidayStudio) for this. It's very easy to use: Just load this script into your .blend file through template label (or paste it in the same folder that your .blend is), select the object that you want, and attach the script into the object's components using **Register Component** button. Character Controller Component ------------------------------- +++++++++++++++++++++++++++++++ -This component will serve as a **Character Controller** for your game. With this, you can easly made an object move using :kbd:`W`, :kbd:`A`, :kbd:`S`, :kbd:`D`, run with :kbd:`LSHIFT` and Jump with :kbd:`SPACE`. -You simply have to create a capsule for your character, set the physics type to "Character" and attach this Component to them. It's very simple to configure: +This component will serve as a **Character Controller** for your game. With this, you can easily made an object move using :kbd:`W`, :kbd:`A`, :kbd:`S`, :kbd:`D`, run with :kbd:`LSHIFT` and Jump with :kbd:`SPACE`. You simply have to create a capsule for your character, set the physics type to "Character" and attach this Component to them. It's very simple to configure: -.. figure:: /images/Python_Components/Fig-09.png +.. figure:: /images/python_components/Fig-09.png :align: right Character Controller component -* **Activate**: If you want this component running. +- **Activate**: If you want this component running. -* **Walk Speed**: The character's walk speed. +- **Walk Speed**: The character's walk speed. -* **Run Speed**: The character's run speed. +- **Run Speed**: The character's run speed. -* **Max Jumps**: The character's max jumps. Set to :kbd:`0` if you don't want the character to jump. +- **Max Jumps**: The character's max jumps. Set to :kbd:`0` if you don't want the character to jump. -* **Static Jump Direction**: If you want to make your character jump in a static direction, activate "Static Jump Direction". It means that, if the player wasn't moving when he pressed Space, the character will jump up and the player will not be able to change this during the jump. The same for when he was moving when pressed Space. The jump direction will be the character direction when the player press space. +- **Static Jump Direction**: If you want to make your character jump in a static direction, activate "Static Jump Direction". It means that, if the player wasn't moving when he pressed Space, the character will jump up and the player will not be able to change this during the jump. The same for when he was moving when pressed Space. The jump direction will be the character direction when the player press space. -* **Static Jump Rotation**: Exactly like the Jump Direction, but for the character rotation. +- **Static Jump Rotation**: Exactly like the Jump Direction, but for the character rotation. -* **Avoid Sliding**: If your character object have Collision Bounds activated, I'd recommend to enable the "Avoid Sliding" option. If so, the component will avoid the character from sliding on ramps. +- **Avoid Sliding**: If your character object have Collision Bounds activated, I'd recommend to enable the "Avoid Sliding" option. If so, the component will avoid the character from sliding on ramps. -* **Smooth Character Movement**: You can make the movement gets more smooth by increasing this value (:kbd:`0.0` to :kbd:`1.0`). +- **Smooth Character Movement**: You can make the movement gets more smooth by increasing this value (:kbd:`0.0` to :kbd:`1.0`). -* **Make Object Invisible**: Makes the object invisible ingame (useful if you attach this component to a capsule object that have a armature inside). +- **Make Object Invisible**: Makes the object invisible ingame (useful if you attach this component to a capsule object that have a armature inside). First Person Camera Component ------------------------------ +++++++++++++++++++++++++++++++ This component was created to be attached to your camera and to give you a great mouselook control. Very useful for First Person games. @@ -48,23 +49,23 @@ To use, add a camera in your scene, parent it into your character capsule (you c You can configure the mouse sensibility, invert :kbd:`X` or :kbd:`Y` axis and enable/disable the camera rotation limit. It's very simple to configure: -.. figure:: /images/Python_Components/Fig-10.png +.. figure:: /images/python_components/Fig-10.png :align: right First Person Camera component -* **Activate**: If you want this component running. +- **Activate**: If you want this component running. -* **Mouse Sensibility**: The mouse sensibility. +- **Mouse Sensibility**: The mouse sensibility. -* **Invert Mouse X Axis**: To invert the mouselook on the :kbd:`X` axis. +- **Invert Mouse X Axis**: To invert the mouselook on the :kbd:`X` axis. -* **Invert Mouse Y Axis**: To invert the mouselook on the :kbd:`Y` axis. +- **Invert Mouse Y Axis**: To invert the mouselook on the :kbd:`Y` axis. -* **Limit Camera Rotation**: Limits the camera rotation on the :kbd:`X` local axis. Very useful for First Person games to avoid the camera from flip upside down. +- **Limit Camera Rotation**: Limits the camera rotation on the :kbd:`X` local axis. Very useful for First Person games to avoid the camera from flip upside down. Third Person Camera Component ------------------------------ +++++++++++++++++++++++++++++++ This component was created to be attached to your camera to give you a great third person mouselook control. Very useful for Adventure games, RPGs, Open Worlds, or any kind of games that may require a third person camera. @@ -72,67 +73,68 @@ To use, add a camera in your scene, parent it into your character capsule (you c You can configure the mouse sensibility, invert :kbd:`X` or :kbd:`Y` axis and enable/disable the camera rotation limit. It's very simple to configure: -.. figure:: /images/Python_Components/Fig-11.png +.. figure:: /images/python_components/Fig-11.png :align: right Third Person Camera component -* **Activate**: If you want this component running. +- **Activate**: If you want this component running. -* **Mouse Sensibility**: The mouse sensibility. +- **Mouse Sensibility**: The mouse sensibility. -* **Invert Mouse X Axis**: To invert the mouselook on the :kbd:`X` axis. +- **Invert Mouse X Axis**: To invert the mouselook on the :kbd:`X` axis. -* **Invert Mouse Y Axis**: To invert the mouselook on the :kbd:`Y` axis. +- **Invert Mouse Y Axis**: To invert the mouselook on the :kbd:`Y` axis. -* **Camera Height**: The height that you want your camera to be (consider height zero = the center of your character). +- **Camera Height**: The height that you want your camera to be (consider height zero = the center of your character). -* **Camera Distance**: How far from the character that you want your camera to be. +- **Camera Distance**: How far from the character that you want your camera to be. -* **Camera Crab (Side)**: You can make the camera stay on the side of your character, if you want. Just adjust this variable. +- **Camera Crab (Side)**: You can make the camera stay on the side of your character, if you want. Just adjust this variable. -* **Camera Collision**: If you want your camera to have collision (to prevent the camera from traversing walls). +- **Camera Collision**: If you want your camera to have collision (to prevent the camera from traversing walls). - * **Camera Collision Property**: The property that you want your camera to avoid (if you want the camera to avoid all the objects, leave this blank). +- **Camera Collision Property**: The property that you want your camera to avoid (if you want the camera to avoid all the objects, leave this blank). -* **Align Player to View**: You can define when you want the player (character) to look at the camera view direction: Never, just when the player moves or always. +- **Align Player to View**: You can define when you want the player (character) to look at the camera view direction: Never, just when the player moves or always. -* **Align Player Smooth**: How smooth you want the player to look at the camera direction. :kbd:`0` means no smooth and :kbd:`1` means maximum smooth possible. +- **Align Player Smooth**: How smooth you want the player to look at the camera direction. :kbd:`0` means no smooth and :kbd:`1` means maximum smooth possible. By using this Component, you can also call some functions using python (from other components) to help you: setCameraAlign(type), setCameraPos(x,y,z), alignPlayerToView(), getCameraView(). Take a look at the implementation to see how these functions works. Simple Animator Component -------------------------- +++++++++++++++++++++++++++++++ This component will automatically align the armature to the move direction of your character, runs the right animations accordding to the speed and if the character is on air or not. To use, attach this component to the armature of your character. It's important that the armature is parented with an capsule object with physics type equals to Character. It's very simple to configure: -.. figure:: /images/Python_Components/Fig-12.png +.. figure:: /images/python_components/Fig-12.png :align: right Simple Animator component -* **Activate**: If you want this component running. +- **Activate**: If you want this component running. -* **Max Walk Speed**: Define the max speed that you want while executing the walk animation. After this speed, the character will start interpolating the run animation. (Read the notes at the end). +- **Max Walk Speed**: Define the max speed that you want while executing the walk animation. After this speed, the character will start interpolating the run animation. (Read the notes at the end). -* **Max Run Speed**: Define the max speed that you want while executing the run animation. After this speed, the animation will not change. +- **Max Run Speed**: Define the max speed that you want while executing the run animation. After this speed, the animation will not change. -* **Suspend Children's Physics**: Enable this if you want to remove all the physics from the armature's childrens (recursive). Useful to avoid these childrens to collide with the player capsule, causing a physics bug. +- **Suspend Children's Physics**: Enable this if you want to remove all the physics from the armature's childrens (recursive). Useful to avoid these childrens to collide with the player capsule, causing a physics bug. -* **Align To Move Direction**: Enable this if you want to make you character faces the direction that the player is going. +- **Align To Move Direction**: Enable this if you want to make you character faces the direction that the player is going. -* **Align Smooth**: How smooth you want to align the character with the direction. 0 Means no smooth and 1 means max smooth. +- **Align Smooth**: How smooth you want to align the character with the direction. 0 Means no smooth and 1 means max smooth. + +- **Idle Animation**: Define the name of the Idle (stopped) animation, the frame start and frame end. -* **Idle Animation**: Define the name of the Idle (stopped) animation, the frame start and frame end. +- **Walk Animation**: Define the name of the Walk animation, the frame start and frame end. -* **Walk Animation**: Define the name of the Walk animation, the frame start and frame end. -* **Run Animation**: Define the name of the Run animation, the frame start and frame end. +- **Run Animation**: Define the name of the Run animation, the frame start and frame end. -* **Jump Up Animation**: Define the name of the Jump Up animation, the frame start and frame end. +- **Jump Up Animation**: Define the name of the Jump Up animation, the frame start and frame end. -* **Jump Down Animation**: Define the name of the Jump Down animation, the frame start and frame end. The Jump animations should be divided in two: Jump Up and Jump Down. The first one will be executed when the character is going up. The second, whe the character is falling. Both should be loop animations. +- **Jump Down Animation**: Define the name of the Jump Down animation, the frame start and frame end. The Jump animations should be divided in two: Jump Up and Jump Down. The first one will be executed when the character is going up. The second, whe the character is falling. Both should be loop animations. .. note:: The anim interpolation/transition between idle-walk and walk-run according to the speed is not implemented yet. diff --git a/source/manual/python_components/getting_started/index.rst b/source/manual/python_components/getting_started/index.rst index 814070e8..8c6358ee 100644 --- a/source/manual/python_components/getting_started/index.rst +++ b/source/manual/python_components/getting_started/index.rst @@ -1,16 +1,14 @@ .. _python_components_getting_started-index: -+++++++++++++++ +============================== Getting Started -+++++++++++++++ +============================== -This subchapter aims to show the basic Python Component templates included in UPBGE, from the character controller movements to -the most common operations used in game development. This will give you important information -on how to use the reusable components, included in the UPBGE, in all your games. +This subchapter aims to show the basic Python Component templates included in UPBGE, from the character controller movements to the most common operations used in game development. This will give you important information on how to use the reusable components, included in the UPBGE, in all your games. The Python Component templates are included under the template option in the script editor. -.. figure:: /images/Python_Components/Fig-07.png +.. figure:: /images/python_components/Fig-07.png Python Component template list @@ -20,4 +18,3 @@ The Python Component templates are included under the template option in the scr character_controller_templates.rst top_down_templates.rst util_templates.rst - vehicle_templates.rst diff --git a/source/manual/python_components/getting_started/top_down_templates.rst b/source/manual/python_components/getting_started/top_down_templates.rst index 7e45859b..b1162a64 100644 --- a/source/manual/python_components/getting_started/top_down_templates.rst +++ b/source/manual/python_components/getting_started/top_down_templates.rst @@ -1,74 +1,72 @@ .. _python_components_getting_started_top_down_templates: -================== +============================== Top Down Templates -================== +============================== This template was created to help UPBGE users to create games or any kind of interactive thing that request a Top Down Controller. Easy to use, easy to attach to your project. -.. figure:: /images/Python_Components/Fig-13.png +.. figure:: /images/python_components/Fig-13.png +| To use, just select it from template label at script editor and you're done! You can use this template in your projects, even for commercial projects. You only need to give credits to Guilherme Teres Nunes (UnidayStudio) for this. It's very easy to use: Just load this script into your .blend file through template label (or paste it in the same folder that your .blend is), select the object that you want, and attach the script into the object's components using **Register Component** button. Mouse Camera Drag Component ---------------------------- +++++++++++++++++++++++++++++++ -This component will allow the player to move the camera (or other objects) by simple holding a mouse button (you decide what button) and dragging the mouse around. Very useful for top down games. It will also allow the player to move the camera (or other objects) by pressing :kbd:`W`, :kbd:`A`, :kbd:`S`, :kbd:`D` keys. There is some configuration to help you adapting this logic to better fit in your project. If you want to drag the camera in a vertial way, to create a side scroller game, for example, you can easly change the "Up Axis" to allow this. You can attach this component into your camera or into other objects. -It's very simple to configure: +This component will allow the player to move the camera (or other objects) by simple holding a mouse button (you decide what button) and dragging the mouse around. Very useful for top down games. It will also allow the player to move the camera (or other objects) by pressing :kbd:`W`, :kbd:`A`, :kbd:`S`, :kbd:`D` keys. There is some configuration to help you adapting this logic to better fit in your project. If you want to drag the camera in a vertial way, to create a side scroller game, for example, you can easly change the "Up Axis" to allow this. -.. figure:: /images/Python_Components/Fig-14.png - :align: left +.. figure:: /images/python_components/Fig-14.png + :align: right Mouse Camera Drag component -* **Show Mouse**: Enable if you want to show the mouse -* **Mouse Movement**: Enable if you want to activate the mouse drag logic -* **Mouse Button**: Which mouse button you want to use -* **Keyboard Movement**: Enable if you want to move the object using :kbd:`W`, :kbd:`A`, :kbd:`S`, :kbd:`D` -* **Up Axis**: Select the :kbd:`UP` axis. -* **Local Movement**: Local or Global movement? You decide! -* **Mouse Sensibility**: The mouse sensibility! -* **Keyboard Speed**: If you enabled the Keyboard Movement, control the speed here! -* **Limit Area**: You can limit the area that the object can stay by playing around with this values. If you don't want, just set to :kbd:`0`. +You can attach this component into your camera or into other objects. It's very simple to configure: -| +- **Show Mouse**: Enable if you want to show the mouse +- **Mouse Movement**: Enable if you want to activate the mouse drag logic +- **Mouse Button**: Which mouse button you want to use +- **Keyboard Movement**: Enable if you want to move the object using :kbd:`W`, :kbd:`A`, :kbd:`S`, :kbd:`D` +- **Up Axis**: Select the :kbd:`UP` axis. +- **Local Movement**: Local or Global movement? You decide! +- **Mouse Sensibility**: The mouse sensibility! +- **Keyboard Speed**: If you enabled the Keyboard Movement, control the speed here! +- **Limit Area**: You can limit the area that the object can stay by playing around with this values. If you don't want, just set to :kbd:`0`. Mouse Point And Click Component -------------------------------- ++++++++++++++++++++++++++++++++ -This component will allow you to teleport an object right into the point that the player clicks. You can limit the scope of the clicks by adding a property. This feature is very useful for top down/point and click games, because you need a pivot to point where the player wants the character to go. -It's very simple to configure: +This component will allow you to teleport an object right into the point that the player clicks. You can limit the scope of the clicks by adding a property. -.. figure:: /images/Python_Components/Fig-15.png - :align: left +.. figure:: /images/python_components/Fig-15.png + :align: right Mouse Point and Click component -* **Activate**: Activate or deactivate the logic -* **Mouse Button**: Which mouse button you want to use -* **Align To Normal**: Enable if you want to align the object to the mouse over normal. -* **Property**: The property that you want to interact with (leave this blank if you want to interact with everything). +This feature is very useful for top down/point and click games, because you need a pivot to point where the player wants the character to go. It's very simple to configure: -| +- **Activate**: Activate or deactivate the logic +- **Mouse Button**: Which mouse button you want to use +- **Align To Normal**: Enable if you want to align the object to the mouse over normal. +- **Property**: The property that you want to interact with (leave this blank if you want to interact with everything). Object Chaser Component ------------------------ +++++++++++++++++++++++++++++++ -This component will make the object chase a target (another object) when they have certain distance. Note that is necessary to have a navmesh in your scene. You can also change the Target object in realtime by calling the function setTarget(). -It's very simple to configure: +This component will make the object chase a target (another object) when they have certain distance. Note that is necessary to have a navmesh in your scene. You can also change the Target object in realtime by calling the function setTarget(). It's very simple to configure: -.. figure:: /images/Python_Components/Fig-16.png - :align: left +.. figure:: /images/python_components/Fig-16.png + :align: right Object Chaser component -* **Activate**: Activate or deactivate the logic. -* **Navmesh Name**: The name of your navmesh. -* **Target Object**: The name of your target. -* **Min Distance**: The minimum distance that you want the object from the target. -* **Tolerance Distance**: Once the object is already near the target, the extra tolerance distance that they can have before it starts chasing again. -* **Speed**: The speed of the object while chasing the target. -* **Front Axis**: The front Axis (put :kbd:`Y` axis if you don't know). -* **Up Axis**: The :kbd:`UP` Axis (put :kbd:`Z` if you don't know). -* **Smooth Turn**: To smooth the path following turns. +- **Activate**: Activate or deactivate the logic. +- **Navmesh Name**: The name of your navmesh. +- **Target Object**: The name of your target. +- **Min Distance**: The minimum distance that you want the object from the target. +- **Tolerance Distance**: Once the object is already near the target, the extra tolerance distance that they can have before it starts chasing again. +- **Speed**: The speed of the object while chasing the target. +- **Front Axis**: The front Axis (put :kbd:`Y` axis if you don't know). +- **Up Axis**: The :kbd:`UP` Axis (put :kbd:`Z` if you don't know). +- **Smooth Turn**: To smooth the path following turns. diff --git a/source/manual/python_components/getting_started/util_templates.rst b/source/manual/python_components/getting_started/util_templates.rst index 8ae16158..a11b8068 100644 --- a/source/manual/python_components/getting_started/util_templates.rst +++ b/source/manual/python_components/getting_started/util_templates.rst @@ -1,53 +1,45 @@ .. _python_components_getting_started_util_templates: -=============== +============================== Utils Templates -=============== +============================== These templates were created to help UPBGE users to create games or any kind of interactive things. Easy to use, easy to attach to your project. -.. - figure:: /images/Python_Components/Fig-17.png - - To use, just select it from template label at script editor and you're done! You can use this template in your projects, even for commercial projects. You only need to give credits to Guilherme Teres Nunes (UnidayStudio) for this. It's very easy to use: Just load this script into your .blend file through template label (or paste it in the same folder that your .blend is), select the object that you want, and attach the script into the object's components using **Register Component** button. Sound Speaker Component ------------------------ +++++++++++++++++++++++++++++++ -This component will serve as an sound Speaker for your game. With this, you can easly control 3D sound, volume. Unfortunatelly, the sounds needs to be mono to make the 3D sound works. You can convert your sound to mono using windows CMD like this: '> ffmpeg -i Sound.wav -ac 1 SoundMono.wav' -It's very simple to configure: +This component will serve as an sound Speaker for your game. With this, you can easly control 3D sound, volume. Unfortunatelly, the sounds needs to be mono to make the 3D sound works. You can convert your sound to mono using windows CMD like this: '> ffmpeg -i Sound.wav -ac 1 SoundMono.wav' It's very simple to configure: -.. figure:: /images/Python_Components/Fig-18.png - :align: left +.. figure:: /images/python_components/Fig-18.png + :align: right Sound Speaker component -* **Sound File**: The file name, example: "Assets/DoorMono.wav". -* **Loop Sound**: If you want the sound to loop or just play once. -* **Volume**: The Volume. -* **Pitch**: The Pitch. -* **3D Sound**: If you want the sound to be 3D. -* **Min Distance**: If 3D Sound is enabled, the sound will have the max volume if the listener is at this distance or minor. -* **Max Distance**: If 3D Sound is enabled, the sound will volume down until zero when the listener reach this distance. -* **Delete Object After End**: If enabled, the object will be deleted at the end of the sound (if Loop Sound equals to false). - -| +- **Sound File**: The file name, example: "Assets/DoorMono.wav". +- **Loop Sound**: If you want the sound to loop or just play once. +- **Volume**: The Volume. +- **Pitch**: The Pitch. +- **3D Sound**: If you want the sound to be 3D. +- **Min Distance**: If 3D Sound is enabled, the sound will have the max volume if the listener is at this distance or minor. +- **Max Distance**: If 3D Sound is enabled, the sound will volume down until zero when the listener reach this distance. +- **Delete Object After End**: If enabled, the object will be deleted at the end of the sound (if Loop Sound equals to false). Minimap Component ------------------ +++++++++++++++++++++++++++++++ -This component will spawn a minimap based on the camera (which owns the component) view. Add this component to a camera and position it on top of your character. -To configure, take a look at the values: +This component will spawn a minimap based on the camera (which owns the component) view. Add this component to a camera and position it on top of your character. To configure, take a look at the values: -.. figure:: /images/Python_Components/Fig-19.png - :align: left +.. figure:: /images/python_components/Fig-19.png + :align: right Minimap component -* **Camera Type**: You can choose between Perspertive or Ortographic camera. -* **Camera Height**: Define the height that you want your minimap camera to be. If you don't want the component to modify this, just set to :kbd:`0`. -* **Minimap Position**: The position of the center of the minimap on the screen (values goes from :kbd:`0` to :kbd:`1`). -* **Minimap Size**: The size of the minimap (values goes from :kbd:`0` to :kbd:`1`). -* **Follow Object**: You can define an object for the minimap to follow (like the player). Leave it empty if you don't want. -* **Rotate on Z axis**: If you defined a Follow Object, you can also makes the minimap rotates on the :kbd:`Z` axis according to the follow object's rotation. +- **Camera Type**: You can choose between Perspertive or Ortographic camera. +- **Camera Height**: Define the height that you want your minimap camera to be. If you don't want the component to modify this, just set to :kbd:`0`. +- **Minimap Position**: The position of the center of the minimap on the screen (values go from :kbd:`0` to :kbd:`1`). +- **Minimap Size**: The size of the minimap (values go from :kbd:`0` to :kbd:`1`). +- **Follow Object**: You can define an object for the minimap to follow (like the player). Leave it empty if you don't want. +- **Rotate on Z axis**: If you define a Follow Object, you can also makes the minimap rotate on the :kbd:`Z` axis according to the follow object's rotation. diff --git a/source/manual/python_components/getting_started/vehicle_templates.rst b/source/manual/python_components/getting_started/vehicle_templates.rst deleted file mode 100644 index 32464bea..00000000 --- a/source/manual/python_components/getting_started/vehicle_templates.rst +++ /dev/null @@ -1,6 +0,0 @@ -.. _python_components_getting_started_vehicle_templates: - -================= -Vehicle Templates -================= - diff --git a/source/manual/python_components/index.rst b/source/manual/python_components/index.rst index b54bbc92..25915877 100644 --- a/source/manual/python_components/index.rst +++ b/source/manual/python_components/index.rst @@ -1,8 +1,8 @@ .. _python_components-index: -+++++++++++++++++ +============================== Python Components -+++++++++++++++++ +============================== .. toctree:: :maxdepth: 2 diff --git a/source/manual/python_components/introduction.rst b/source/manual/python_components/introduction.rst index 5aba1756..eacd9584 100644 --- a/source/manual/python_components/introduction.rst +++ b/source/manual/python_components/introduction.rst @@ -1,29 +1,21 @@ .. _python_components-introduction: -============ +============================== Introduction -============ +============================== What Is A Python Component? ---------------------------- +++++++++++++++++++++++++++++++ -The idea of a component is a simple one. They are modules that can be attached to game objects. You can attach as many as you want, -and each one serves a specific purpose such as third person character movement with :kbd:`WASD` keys. After a component has been attached to an object, -it can have various exposed settings that you can edit. In the case of a third person movement component, this could be things such as -movement speed and turn speed. +The idea of a component is a simple one. They are modules that can be attached to game objects. You can attach as many as you want, and each one serves a specific purpose such as third person character movement with :kbd:`WASD` keys. After a component has been attached to an object, it can have various exposed settings that you can edit. In the case of a third person movement component, this could be things such as movement speed and turn speed. -.. figure:: /images/Python_Components/Fig-01.png +.. figure:: /images/python_components/Fig-01.png Python Component (Vehicle Wheeled template) -Python component can be compared to python logic bricks with parameters. The python component is a script loaded in the UI, this script defined -a component class by inheriting from KX_PythonComponent. -This class must contain a dictionary of properties: **args** and two default functions: **start()** and **update()**. -Additionally, the component can include an optional function: **dispose()** +Python component can be compared to python logic bricks with parameters. The python component is a script loaded in the UI, this script defined a component class by inheriting from KX_PythonComponent. This class must contain a dictionary of properties: **args** and two default functions: **start()** and **update()**. Additionally, the component can include an optional function: **dispose()**. -The script used to create the component must have .py extension. The component properties are loaded from the args attribute from the UI at loading time. -When the game start the function start() is called with as arguments a dictionary of the properties’ name and value. -The update() function is called each frame during the logic stage before running logics bricks. The goal of this function is to handle and process everything. +The script used to create the component must have .py extension. The component properties are loaded from the args attribute from the UI at loading time. When the game start the function start() is called with as arguments a dictionary of the properties’ name and value. The update() function is called each frame during the logic stage before running logics bricks. The goal of this function is to handle and process everything. The following component example moves and rotates the object when pressing the keys :kbd:`W`, :kbd:`A`, :kbd:`S` and :kbd:`D`. @@ -70,9 +62,7 @@ The following component example moves and rotates the object when pressing the k self.object.applyMovement((0, move, 0), True) self.object.applyRotation((0, 0, rotate), True) - -The standard property types supported are float, integer, boolean, string, set (for enumeration) and Vector 2D, 3D and 4D. -The following example show all of these property types: +The standard property types supported are float, integer, boolean, string, set (for enumeration) and Vector 2D, 3D and 4D. The following example shows all of these property types: .. code-block:: python @@ -100,10 +90,9 @@ The following example show all of these property types: Additionally, the following data (ID) property types are supported too: - -.. figure:: /images/Python_Components/Fig-20.png +.. figure:: /images/python_components/Fig-20.png + :width: 80% :align: left - :width: 90% Data (ID) Property Types supported @@ -155,46 +144,43 @@ The optional **dispose()** function is called when the component is destroyed. I Inside of UPBGE there are several python component templates that can help us with common tasks. We will analyze them in the next subchapters. - Python Component Creation -------------------------- +++++++++++++++++++++++++++++++ The Python Component panel, or also called Game Component panel, is placed in the Properties editor under the Game Object Properties tab. -.. figure:: /images/Python_Components/Fig-02.png +.. figure:: /images/python_components/Fig-02.png Game Component panel -You will find there the 2 ways to make a Python Component in UPBGE, **Add** and **Create**. +You will find there two ways to make a Python Component in UPBGE, **Add** and **Create**. -.. figure:: /images/Python_Components/Fig-03.png +.. figure:: /images/python_components/Fig-03.png - The 2 ways to make a Python Component + 2 ways to make a Python Component Create Component -++++++++++++++++ +++++++++++++++++++++++++++++++ -When you push over the **Create** button a detachable panel will appear. In that panel you can introduce the component module name and the class name, both separate by a dot. -After entering the name and clicking on the **Create** button, a new python script with the name of the component's module will be created in the script editor. -That python script will contain an empty class which name will be the one entered previously. +When you click **Create** button a panel will appear. In that panel you can write the component module and the class name, separated by a dot. Clicking on the **Ok** button, a new python script with the name of the component's module will be created in the script editor. That python script will contain an empty class which name will be the one entered previously. -.. figure:: /images/Python_Components/Fig-04.png +.. figure:: /images/python_components/Fig-04.png Create Component process As the component script is developed you can click on the component reload option to see the updated component. -.. figure:: /images/Python_Components/Fig-05.png +.. figure:: /images/python_components/Fig-05.png Python Component reload process Add Component -+++++++++++++ +++++++++++++++++++++++++++++++ This process is the opposite of the previous one. First of all, we already have a python script previously formatted as a component that can be placed either in the script editor or at the same level as the .blend file. -When we click on the **Add** button we will have to enter the name of the python script (without the .py) followed by a dot and the class name. After accept the Python Component will be created. +When we click the **Add** button we will have to enter the name of the python script (without the .py), followed by a dot and the class name. After clicking **Ok** the Python Component will be created. -.. figure:: /images/Python_Components/Fig-06.png +.. figure:: /images/python_components/Fig-06.png Add Component process diff --git a/source/manual/python_scripting/index.rst b/source/manual/python_scripting/index.rst new file mode 100644 index 00000000..cc00226e --- /dev/null +++ b/source/manual/python_scripting/index.rst @@ -0,0 +1,12 @@ +.. _python-index: + +============================== +Python Scripting +============================== + +.. toctree:: + :maxdepth: 2 + + introduction + python_game_engine + understanding_inheritance diff --git a/source/manual/python_scripting/introduction.rst b/source/manual/python_scripting/introduction.rst new file mode 100644 index 00000000..a2d68fc1 --- /dev/null +++ b/source/manual/python_scripting/introduction.rst @@ -0,0 +1,404 @@ +.. _python-introduction: + +============================== +Introduction to Scripting +============================== + +Congratulations, you finally arrived at one of the most technical parts of the manual. Keep that in mind in case you get lost. + +The UPBGE game engine was once famous for letting you create a full game without touching a single piece of code. Although this may sound attractive, it also leads to a very limited game-making experience. Logic bricks, as presented in :ref:`Logic Bricks chapter `, are very handy for quick prototyping. However, once you need to access advanced resources, external libraries and devices, or simply optimize your application, a programming language becomes your new best friend. + +Through the use of a scripting language called **Python**, the game engine (as UPBGE itself) is fully extensible. This programming language is easy to learn, although extremely powerful. Be aware, though, that you will not find a complete guide to learning Python here. There are plenty of resources online and offline that will serve you better. However, even if you are not inclined to study Python deeply now, sooner or later you will find yourself struggling with script files. So, it's important to know what you are dealing with. + +.. note:: + **Yes, You Can** + + For those experienced Python programmers (or for those catching up with the reference learning material), always remember: if you can do something with Python, chances are, you can do it in the game engine. + +After the brief overview in the Python basics, we will explain how to apply your knowledge of Python inside the game engine. You'll also learn how to access the Python methods, properties, and objects you'll be using. + +Why Script When You Can Logic Brick It? ++++++++++++++++++++++++++++++++++++++++ + +We can compare logic bricks with real bricks. On the one hand, we have strong elements on which to build our system, but, on the other hand, we have a system as flexible as a blind wall. + +There are many occasions when the same effect can be achieved in different ways. Different phases of the production may also require varied workflows. The reason for picking a particular method is often personal. Nevertheless, we present here a few arguments that may convince you to crack a good Python book and start learning more about it: + +- Sane replacement for large-scale logic-bricked objects. +- Better handling of multiple objects. +- Access to UPBGE's advanced features. +- Use features that are not part of UPBGE. +- Keep track of your changes with a version control system. +- Debug your game while it runs. + +.. note:: + **Logic Brick, the Necessary Good** + + You can't ever get away from logic bricks. Even when using Python exclusively for your game, you will need to invoke the scripts from a Python controller. The ideal is to find the balance that fits your project. + +Sane Replacement for Large-Scale Logic-Bricked Objects +++++++++++++++++++++++++++++++++++++++++++++++++++++++ + +It's always good to have an excuse to show an image in a programming chapter, and here it is. In the next pìcture you see the logic bricks for Frankie, the main character of the open game **Yo Frankie!** + +.. figure:: /images/python_scripting/introduction_to_scripting_01.png + + Chapagetti + +This system is well organized: different actions belong to different states and sensors; controllers and actuators are properly named. Nevertheless, it's not hard to lose yourself trying to understand which sensor connects to which controller. One of the reasons for such a complex project to rely on logic bricks is because **Yo Frankie!** serves as a didactic project for artists wanting to start with the game engine. Anyone with a little programming experience can take the files and expand the game freely. (Have you tried it yet?) + +However, you often aim for performance and workflow. Having everything centralized in a single script file can save you a lot of time. + +Another important aspect while working is to document your project. It's easy to open a file only a few months old and find yourself completely lost. Script files, on the other hand, are naturally structured to be self-documented. To document logic bricks, you need to rely on text files inside or outside your Blender files (and neat image diagrams). It's definitively not as handy as inline comments along your code. (Code diagrams can still be useful, but that's a different topic.) + +Better Handling of Multiple Objects ++++++++++++++++++++++++++++++++++++ + +Big projects lead to multiple files, this is an inevitable truth. Even when you use external linking and libraries, it's crucial to optimize the time spent in changing multiple sets at once. This is one of the weaknesses of logic bricks, they make it hard to automatically change a big range of elements at the same time. + +If you need to change a property name or initial value of an object, you will need to repeat that change in other instances of the same. We have ways to make it easier by using copy and paste of logic bricks/properties between objects or even through logic sharing. Nevertheless, you will still have to update all the Property sensors, controllers, and actuators that may rely on the old value. That's especially true for objects with logic bricks across them, as we saw, the game engine allows you to link logic bricks from different objects. However, self-contained objects/logic bricks are easier to work with (and with less spaghetti). + +If you thought that before picture was a mess, try to make sense of next picture. Here we have the logic bricks of **Frankie**, plus the objects that have logic bricks connected to it. As you recall, you can restrict the visible logics through the Show Panel option, but this illustrates how difficult it is to get a global view of your system. + +.. figure:: /images/python_scripting/introduction_to_scripting_02.png + + Spaghetti + +Once you start to work with scripts, you will see how easy it is to assume control over all your scene elements in a global way. It will give you lots of benefits in the long run. + +Access to UPBGE's Advanced Features ++++++++++++++++++++++++++++++++++++ + +You will be happy to know that the game engine has a powerful set of features beyond those found in the logic brick's interface. Also, almost all the functionality found in the logic bricks can be accomplished through an equivalent method of the game engine API (which will be covered in the section "Using the Game Engine API - Application Programming Interface"). The API ranges from tasks that could be performed with logic bricks, such as to change a property in a sensor or to completely remove an object from the game, all the way to functionality not available otherwise, such as playing videos and network connection. + +There are a few reasons for not having all the methods accessible through logic bricks. First, a graphic interface is very limited for complex coding. You may end up with a slow system that is far from optimized. Second, having methods independent from the interface allows it to be expanded more easily and constantly (from a development point of view). Some advanced features, such as mirroring system, dynamic load of meshes, OpenGL calls, and custom constraints would hardly fit in the current game engine interface. They would probably end up not being implemented because of the amount of extra work required. Other things you will find in the game engine built-in methods are: make screenshots; change world settings (gravity, logic tic rates); access the returned data from sensors (pressed keys, mouse position); change object properties (camera lens, light colors, object mass); and many others we will cover in the course of this chapter. + +Use Features That Are Not Part of UPBGE ++++++++++++++++++++++++++++++++++++++++ + +No man is an island. No game is an island either (except **Monkey Island**). And the easiest way to integrate your UPBGE game with the exterior world is with Python. If you want to use external devices to control the game input or to tie external applications to your game, you may find Python suitable for that task. + +Here are some examples that showcase what can be done with Python external libraries: + +- Grab data off the Internet for game score. +- Control your game with a Nintendo Wiimote controller. +- Combine Head-tracking and immersive displays for augmented reality. + +Those possibilities go with the previous statement that almost everything that you can do with Python, you can do in the game engine. And since Python can be used with modules written in other languages (properly wrapped), you can virtually use any application as a basis for your system. + +.. note:: + **Cross-Platform, Yes; Cross-Version, Not** + + To use external libraries, you must know the Python version they were built against. The Python library you are using must be compatible with the Python version that comes with your UPBGE. It's also valuable to check how often the library is updated and if it will be maintained in the future. + +Keep Track of Your Changes with a Version Control System +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + +If you take a Blender file in two different moments of your production, you will have a hard time finding what has changed between them. This is because UPBGE/Blender's native file format is a binary type. Binary files are written in a way that you can't get to them directly, they are designed to be accessed by programs and not by human beings. + +Scripts, on the other hand, are plain text files. You can open a script in any text editor and immediately see the differences between two similar files. Finding those differences are vital to going forward and backward with your experimentations during work. Actually, if you don't want to check for differences manually, you may want to consider using external script files with a version control system such as Git, SVN, Mercury, or CVN. + +.. note:: + **And the Catch Is ...** + + This works only for scripts maintained outside UPBGE. This is one of the strong reasons to prefer Python Module controllers as opposed to Python Script controllers. + +A version control system allows you to move between working versions of your project files. It makes it relatively safe to experiment with different methods in a destructive way. In other words, it's a system to protect you from yourself. In next image, you can see an application of this. Someone changed the script file online while we were working locally on it. Instead of manually tracking down the differences, we could use a tool to merge both changes into a new file and commit it. + +.. figure:: /images/python_scripting/introduction_to_scripting_03.png + + Git diff + +Debug Your Game While It Runs +++++++++++++++++++++++++++++++ + +Interpreted languages (also known as scripting languages) are slower than compiled code. Therefore, to speed up their performance they are precompiled and cached the first time they run (when you launch your game). This is not mandatory, though, and if you are using external Python scripts (instead of those created inside UPBGE), you can use the debugging button to have them reloaded every time they are called. + +In next figure, we have the reload.reload\_me module that will be reloaded every frame. That way you can dynamically change the content of your scripts, variables, and functions without having to restart the game. Try it yourself: download the example :download:`001_reloadme.zip ` to your computer, extract it and launch debug\_python.blend. Play your game, and you will see a spinning cube. The speed of the cube is controlled by the 14th line of the file reload.py, found in the same folder. + +.. code-block:: python + + # edit the speed value and you will see the rotation changing + + # (try with values from 0.01 to 0.05) + + speed = 0.025 + +.. figure:: /images/python_scripting/introduction_to_scripting_04.png + + Debugging button at Python Module controller + +Without closing UPBGE or even stopping your game, open the file script.py in a text editor, change this line to 0.05, for example, and save it. You will see the speed changing immediately. Your game is literally being updated at runtime, and you can change any module that's been called with the debug option on. + +.. note:: **Turn It Off When You Leave** + + Remember to turn debugging off when you are done with this script. Reloading the script every frame can drastically reduce your performance. + +So What Exactly Is Python? +++++++++++++++++++++++++++++++ + +Now that you are aware of all the benefits of using Python, it's time to understand what Python is. Once again, we can't go over all the aspects of the language here. Nevertheless, a general overview is still desirable to help you understand the examples presented in this book. + +To study your scripts, you must be aware of the following aspects: + +- Flexible data types; +- Indentation; +- OOP, Object-Oriented Programming. + +Flexible Data Types +++++++++++++++++++++++++++++++ + +Whenever you write a program, you have to use variables to store changing values at runtime. Unlike languages such as C and Java, Python variables are very flexible: they can be declared on the fly when you first use them; you can assign different data types for the same variable; and you can even name them dynamically: + +.. code-block:: python + + for i in range(10): + exec("var_%d = %d" % (i,i)) + +This snip of code is the equivalent to the following: + +.. code-block:: python + + var_0 = 0 + var_1 = 1 + var_2 = 2 + (...) + +As you can see, the variable names are created at runtime. Therefore, if you name your objects correctly in the Blender file, you can store them in variables named after them. The following code snip assigns the scene objects (retrieved from the game engine) to variables named after their names. + +.. code-block:: python + + (...) + + for object in scene.objects: + + exec("%s = object" % (object.name)) + +Although we have flexible data types, we must respect variable types while manipulating and passing/returning them to functions. Here you can see a list of the data types you will find in the UPBGE game engine API: + +- **Integer:** This is the most common of the numerical types. It can store any number that fits in your computer memory. You can perform any regular math operations on it, such as sum, subtraction, division, modulus, and potency. + +.. code-block:: python + + my_integer = 112358132134 + +- **Float:** This type is very similar to integers, but has a range of numbers that includes fractions. If you divide an even number by its half, Python will automatically convert your integer to a float number. + +.. code-block:: python + + simple_float = 0.5 + + phi = (1 + math.sqrt(5)) / 2 # ~1.618 + +- **Boolean:** As simple as it sounds, this data type stores a true or a false value. It can also be understood as an integer with the value of 1 or 0. + +.. code-block:: python + + i_am_enjoying_the_manual = True + + i_am_understanding_the_manual = i_am_enjoying_the_manual - 1 + +- **List:** A list contains a conjunct of elements ordered by ascending indexes. Although the size of a list can change on the fly, you can't access a list index that wasn't created yet (this will crash Python). List can have mixed elements such as integers, strings, and objects. + +.. code-block:: python + + my_list = [3.14159265359, "PI", True] + +- **Tuple:** This is another kind of list where elements can't be overwritten. As with lists, you can read them using indexes. But it's more common to access all the values at once, assigning them to different variables. + +.. code-block:: python + + t,u,p,l,e = (1,2,3,4,5) # works as: t = 1, u = 2, p = 3, ... + +- **String:** Whenever you need to store a text, you will use strings. As words are a combination of individual letters, a string consists of individual characters. Indeed, strings can be understood as a list of characters because you can access them using their location index, though you can't overwrite them (like in a tuple). + +.. code-block:: python + + python = "rulez" + +- **Dictionary:** Like a list, a dictionary can store multiple values. Unlike a list, a dictionary is not based on numerical index access. Therefore, we have strings working as "keys" to store and retrieve the individual variables. In fact, anything can be a key to a dictionary, a number, an object, a class … + +.. code-block:: python + + _3d_software = {"name ": "UPBGE", "version": 0.3} + +- **Custom Types:** These are things such as vectors and matrixes. The game engine combines some of the basic data types to create more complex ones. They are mainly used for vectors and matrixes. That way you can interact mathematically with them in a way that basic types won't do. + +.. code-block:: python + + mathutils.Vector(1,0,0) * object.orientation # the result is a Matrix + +Indentation +------------------------------ + +Indentation, the amount of white spaces or tabs you leave before a new line. + +When coding in a particular programming language, it's mandatory to follow its general syntax. In that regard, Python is one of the most restricted languages out there. Think of this as a tough grammar exam. You won't be able to score high unless you follow all the pre-established grammar rules. Now imagine that it could be even worse, as bad as a written legal document. We are talking about strict paragraphs, indentation, information hierarchy, and similar rules. + +As in a legal document, those rules have a raison d'etrê. With strict form/syntax, you can focus more on the content of the text. And ambiguity in the context of code making is fatal. + +Indentation is the most important aspect of Python syntax. Python code uses the indentation level to define where loops, functions, and general nesting start/end. Take a look at this example: + +.. code-block:: python + + 1 def here_i_am(): # definition of the first function + + 2 print("I'm inside the first function.") + + 3 print("I'm outside the function.") + + 4 def but_I'm_not_here(): # definition of the second function + + 5 print("For you can't see me!") + + 6 print("I'm still outside the function.") + + 7 here_i_am() # calling the first function + +Here we are defining a function (1–2), calling a built-in print function (3), defining another function (4–5), calling another built-in print function (6), and finally calling the first function we declared (7). + +The output of such script will be: + +`I'm outside the function.` + +`I'm still outside the function.` + +`I'm inside the first function.` + +The first thing you may notice is that Python runs from top to bottom. Therefore, you must define your function before you call it. Secondly, you can see that the second function is never called. So how can the code interpreter determine which print statements to call? The answer is: indentation! Whenever you change the indentation level (lines 1–2, 2–3, 4–5, and 5–6), you determine the hierarchical relation between the elements. Therefore line 2 belongs to the function defined in line 1, line 5 to line 4, and the other lines are all at the same level. + +Python pep-8 standard recommends to use spaces for identation. In the manual we will use 2 spaces identation. + +.. note:: **Pound Sign, I (Finally) Love You** + + If, like me, you never understood the reason for the number/pound sign key (#) on your phone, you will eventually find it very useful. In Python, any text to the right of a pound sign is ignored by the interpreter. Therefore, the pound sign is used to add commentaries to your code or to temporarily deactivate part of it. + +OOP - Object-Oriented Programming ++++++++++++++++++++++++++++++++++ + +Since games deal with 3D world objects, it makes sense to use a language that is oriented to them. The game engine itself is written in C++, a very strong and object-oriented language, and Python OOP capabilities let you handle the game data in a Python-native way. It reflects in the game engine objects having their own set of functions and variables directly accessed from a Python API (to be explained later in this chapter in the section "Using the Game Engine API - Application Programming Interface"). + +In the Python code, you can (and will) create your own classes, modules, and elements. For example, you may want to control some 3D elements as a group defined by your code. It will make it easy to get to all of them at once. Therefore, you can have a custom class that will store all the related objects you want to access and preserve some properties as a group. + +Download the example :download:`002_oop.zip `, extract it and load the oop.blend file. + +The first script that runs in this file is the init\_world.py. Here we are creating two groups to store different kind of elements (cube and sphere). In order to sort the objects between the groups, we go over the entire scene object list and check for objects with a property "cube" or "sphere" and append them to their respective lists. + +.. code-block:: python + + # ################ # + # init\_world.py # + # ################ # + + import bge + from bge import logic as G + from bge import render as R + + # showing the mouse cursor + R.showMouse(True) + + # storing the current scene in a variable + scene = G.getCurrentScene() + + # define a class to store all group elements and the click object + class Group(): + def __init__(self, name): + self.name = name + self.click = None + self.objects = [] + + # create new element groups + cube_group = Group("cubes") + sphere_group = Group("sphere") + + # add all objects with an "ui" property to the created element + for obj in scene.objects: + if "cube" in obj: + cube_group.objects.append(obj) + elif "sphere" in obj: + sphere_group.objects.append(obj) + elif "click" in obj: + exec("%s\_group.click = obj" % (obj["click"])) + + G.groups = {"cube":cube_group, "sphere":sphere_group} + +After storing them in the global module `bge.logic`, we wait for the user to click in the cube or sphere in the middle of the scene. When that happens, it will toggle the value of the on/off property of the cube or sphere. The following script (which runs every frame) will then hide/unhide the group's objects accordingly. + +.. code-block:: python + + # #################### # + # visibility\_check.py # + # #################### # + + from bge import logic + + # defines a function to hide/turn visible all the objects passed as argument + def change_visibility(objects, on_off): + for obj in objects: + obj.visible = on_off + + # retrieve the stored groups to local variables + cube_group = logic.groups["cube"] + sphere_group = logic.groups["sphere"] + + # read the current value of the "on\_off" property in the cube/sphere + cube_visible = cube_group.click["on\_off"] + sphere_visible = sphere_group.click["on\_off"] + + # calls the function into the group object with the visibility flag + change_visibility(cube_group.objects, cube_visible) + change_visibility(sphere_group.objects, sphere_visible) + +And we are done with this interaction. Play with the file by adding new elements (tubes, planes, monkeys) and make them interact as we have here. A few copies and pastes should be enough to adapt this code to your new situation. Remember to note the current indentation used. + +Where to Learn Python +++++++++++++++++++++++++++++++ + +If you have previous experience with another programming language, you will learn Python in no time. If you go over some basic Python tutorials, look at some script examples, and check the UPBGE game engine API, that might be enough. But if learning Python is your first step into coding experience, don't worry. Take the time to read through the basics of the language, start with the simplest tasks, and never give up. + +Usually, a good way to start is tweaking ready-to-use scripts, which doesn't require you to understand all the aspects of the language before your first experiments. Also, it gives you a good motivational boost by producing quick results for your efforts. We recommend you first learn Python and then focus on its application in the game engine. But you may be more comfortable messing with game engine files first and then later learning Python more deeply. + +Online Material +++++++++++++++++++++++++++++++ + +Below are some websites where you can learn more about Python. + +``_ and ``_ + +Learn about new Python versions, API changes, and module documentation. + +``_ + +Official Blender + UPBGE API Documentation, all the built-in modules that can be used with the game engine. + +``_ + +Blender Artists forum, you can find good script examples in the Python section (general Blender Python) and in the game engine section. + +``_ + +Dive Into Python 3 covers Python 3 and its differences from Python 2. A complete book available online. + +``_ + +This interactive tutorial website offers a great introduction to Python for beginners. + +Offline Material +++++++++++++++++++++++++++++++ + +Books, there are plenty of them in your nearby library. + +Python Built-in Help +++++++++++++++++++++++++++++++ + +You can also access help directly in Python. + +.. code-block:: python + + dir(python_object) + +The Python function "dir" creates a list with all the functions/modules/attributes available to be accessed from this object. + +.. code-block:: python + + help(python_function) diff --git a/source/manual/python/python_game_engine.rst b/source/manual/python_scripting/python_game_engine.rst similarity index 83% rename from source/manual/python/python_game_engine.rst rename to source/manual/python_scripting/python_game_engine.rst index 7da8f0ec..3acebf00 100644 --- a/source/manual/python/python_game_engine.rst +++ b/source/manual/python_scripting/python_game_engine.rst @@ -1,21 +1,18 @@ .. _python-game-engine: -========================== +============================== Python and the Game Engine -========================== +============================== -This whole chapter is organized into three main parts: why, what, and how. Thus, if you have read from -the beginning, you already have solid reasons to start using scripts for your project, and you understand -what Python is. The final part of this chapter will cover how to use your Python knowledge -inside the game engine. This part is divided into four submodules: +This whole chapter is organized into three main parts: why, what, and how. Thus, if you have read from the beginning, you already have solid reasons to start using scripts for your project, and you understand what Python is. The final part of this chapter will cover how to use your Python knowledge inside the game engine. This part is divided into four submodules: -* Integrating Python in the game engine. -* Writing your Python scripts. -* Designing your script. -* Using the Game Engine API. +- Integrating Python in the game engine. +- Writing your Python scripts. +- Designing your script. +- Using the Game Engine API. Integrating Python in the Game Engine -------------------------------------- ++++++++++++++++++++++++++++++++++++++ In the game engine, the script interface is controller-centric by design. Therefore, you can consider the Python script simply as a more complex controller to replace the Expression or the Boolean controllers. In those cases, the script will be responsible for controlling how the sensors are related with the actuators of a given object. In fact, the sensors, actuators, and even the object where you are calling the script from are all attributes of the controller. @@ -23,14 +20,13 @@ As we mentioned earlier, with a Python script you can control external devices, In the first example, you will find a very simple case study of how to make your Python controller work. It will cover the basic behavior of receiving sensors' input in the script and triggering actuators from it. -Download the example :download:`003_template.zip `, extract it and load the abracadabra.blend file. +Download the example :download:`003_template.zip `, extract it and load the abracadabra.blend file. -.. figure:: /images/Python_Scripting/python-scripting-introduction-to-scripting-05.png +.. figure:: /images/python_scripting/introduction_to_scripting_05.png Abracadabra -Launch the game and keep the spacebar pressed. In above figure, you can see the result before and after you press the key. -Can you read the spinning text? It may not be impressive, but it certainly is didactic. Here is the script behind this effect: +Launch the game and keep the spacebar pressed. In above figure, you can see the result before and after you press the key. Can you read the spinning text? It may not be impressive, but it certainly is didactic. Here is the script behind this effect: .. code-block:: python @@ -62,10 +58,9 @@ Can you read the spinning text? It may not be impressive, but it certainly is di font_object_data.resolution_u = 4 -This script is triggered from a keyboard sensor, runs from a controller in the camera object, -activates an actuator in the camera itself, and changes a property in the text object. Next figure shows logic bricks for this one. +This script is triggered from a keyboard sensor, runs from a controller in the camera object, activates an actuator in the camera itself, and changes a property in the text object. Next figure shows logic bricks for this one. -.. figure:: /images/Python_Scripting/python-scripting-introduction-to-scripting-06.png +.. figure:: /images/python_scripting/introduction_to_scripting_06.png Simple logic bricks with a Python controller @@ -76,11 +71,7 @@ Let's look at it from the beginning: import bge from bge import logic -The first lines import the module bge and then the submodule logic. No big deal here. -We actually don't need to explicitly import the bge module since we are importing a submodule directly. -However, it doesn't hurt to do it. Lines 4 and 5 will store the current controller in a variable and -create a pointer to the object where it was called from (known as _owner_). We are not using the owner -variable here, but it's good to be familiar with it. You will be using it a lot. +The first lines import the module bge and then the submodule logic. No big deal here. We actually don't need to explicitly import the bge module since we are importing a submodule directly. However, it doesn't hurt to do it. Lines 4 and 5 will store the current controller in a variable and create a pointer to the object where it was called from (known as _owner_). We are not using the owner variable here, but it's good to be familiar with it. You will be using it a lot. .. code-block:: python @@ -88,9 +79,7 @@ variable here, but it's good to be familiar with it. You will be using it a lot. cont = logic.getCurrentController() owner = cont.owner -The following lines get more elements from the game to be used in the script: scene will give you -direct access to the current scene; objects is the current list to be used later; font_obj is one -element of the objects list (accessed by its name in Blender). +The following lines get more elements from the game to be used in the script: scene will give you direct access to the current scene; objects is the current list to be used later; font_obj is one element of the objects list (accessed by its name in Blender). .. code-block:: python @@ -98,29 +87,21 @@ element of the objects list (accessed by its name in Blender). objects = scene.objects font_obj = objects["Text"] -In the above code we used the bge module to get the font game object but using the bge module only we are -limiting us to get/set the game object plus to make transforms with this game object (position, rotate or scale). -Whether we want to access to the inner parts of the Text object and modify them then we need to understand that -the Text object is a bpy object (type TextCurve) and we need to adquire its bpy object data. Once adquired we can use -all the properties of bpy.types.TextCurve class. +In the above code we used the bge module to get the font game object but using the bge module only we are limiting us to get/set the game object plus to make transforms with this game object (position, rotate or scale). Whether we want to access to the inner parts of the Text object and modify them then we need to understand that the Text object is a bpy object (type TextCurve) and we need to adquire its bpy object data. Once adquired we can use all the properties of bpy.types.TextCurve class. .. code-block:: python # Use bpy.types.TextCurve attributes to set other text settings (size, body, etc) font_object_data = font_object.blenderObject.data -Remember when we said that the game engine is controller-centric? All the sensors and actuators are -accessed from the controller, not from the object they belong to (its owner), as you might expect. -Lines 11 and 12, respectively, read the built-in sensor and actuator list to get the ones we are looking for. +Remember when we said that the game engine is controller-centric? All the sensors and actuators are accessed from the controller, not from the object they belong to (its owner), as you might expect. Lines 11 and 12, respectively, read the built-in sensor and actuator list to get the ones we are looking for. .. code-block:: python sens = cont.sensors['my_sensor'] act = cont.actuators['my_actuator'] -In a way similar to how logic bricks work, we are going to activate the actuator if the sensor triggers positive -and deactivate it otherwise. The deactivation happens in the frame after the sensor ceases to validate, -for example, the key is unpressed or the mouse button is released. +In a way similar to how logic bricks work, we are going to activate the actuator if the sensor triggers positive and deactivate it otherwise. The deactivation happens in the frame after the sensor ceases to validate, for example, the key is unpressed or the mouse button is released. .. code-block:: python @@ -129,8 +110,7 @@ for example, the key is unpressed or the mouse button is released. else: cont.deactivate(act) -We are not restricted to controlling only actuators, though. Lines 19-21 and 24-26 change the text, the size and -the resolution of the object when you press/release the spacebar: +We are not restricted to controlling only actuators, though. Lines 19-21 and 24-26 change the text, the size and the resolution of the object when you press/release the spacebar: .. code-block:: python @@ -142,140 +122,97 @@ the resolution of the object when you press/release the spacebar: font_object_data.size = 1 font_object_data.resolution_u = 4 -This file can be simple, but holds the essence of the game engine architecture design. Now is a good time to go over -the other game engine template files that come with the example :download:`003_template.zip ` -and spend some time studying those examples. +This file can be simple, but holds the essence of the game engine architecture design. Now is a good time to go over the other game engine template files that come with the example :download:`003_template.zip ` and spend some time studying those examples. Writing Your Python Scripts ---------------------------- +++++++++++++++++++++++++++++++ -If you haven't started your own scripts, now is a good time to do so. You will need a text editor, the API modules documented, -and a good way to test your files. +If you haven't started your own scripts, now is a good time to do so. You will need a text editor, the API modules documented, and a good way to test your files. Text Editors -++++++++++++ +------------------------------ -It's important to find a script editor that you find pleasant to work with. The most important features you will be looking -for are: syntax coloring and highlighting, auto indentation, and auto completion. You can find editors with even more -features than these, so experiment with different alternatives and decide what's best for you. +It's important to find a script editor that you find pleasant to work with. The most important features you will be looking for are: syntax coloring and highlighting, auto indentation, and auto completion. You can find editors with even more features than these, so experiment with different alternatives and decide what's best for you. UPBGE Text Editor -******************* +------------------------------ -As you probably know, UPBGE has its own internal text editor (see next figure). Although it may -not be as powerful as software designed exclusively for this particular task, it can be very convenient. -It's useful for quick tests, small scripts, or when you want to keep everything bundled inside the Blender file. -Here are its main features: +As you probably know, UPBGE has its own internal text editor (see next figure). Although it may not be as powerful as software designed exclusively for this particular task, it can be very convenient. It's useful for quick tests, small scripts, or when you want to keep everything bundled inside the Blender file. Here are its main features: -* Syntax highlighting -* Dynamic font sizes -* Indentation conversion (spaces to tabs and vice versa) -* Line counting and navigation -* Search over multiple internal files -* Sync with external files -* Icon viewer (small but marvellous feature to get what is the icon that you want to use) +- Syntax highlighting; +- Dynamic font sizes; +- Indentation conversion (spaces to tabs and vice versa); +- Line counting and navigation; +- Search over multiple internal files; +- Sync with external files; +- Icon viewer (small but marvellous feature to get what is the icon that you want to use). -.. figure:: /images/Python_Scripting/python-scripting-introduction-to-scripting-07.png +.. figure:: /images/python_scripting/introduction_to_scripting_07.png UPBGE internal text editor Visual Studio Code or PyCharm -***************************** +------------------------------ -External editors as Visual Studio Code or PyCharm have many more features than internal UPBGE Text editor. -The weakest point of using external editors is the auto-completion and the documentation visualization directly -from the code. +External editors as Visual Studio Code or PyCharm have many more features than internal UPBGE Text editor. The weakest point of using external editors is the auto-completion and the documentation visualization directly from the code. -Using a Python API stub generated from UPBGE .rst documentation can solve both issues. In the :ref:`tools-api-stubs` -chapter you can see how install the upbge-stubs package to improve the external editor experience. +Using a Python API stub generated from UPBGE .rst documentation can solve both issues. In the :ref:`tools-api_stubs` chapter you can see how install the upbge-stubs package to improve the external editor experience. Reference Material and Documentation ++++++++++++++++++++++++++++++++++++ -Since the `UPBGE game engine Python API `__ is available online, you -have an official excuse to keep a Web browser open while you work. -It's not a bad idea to keep an `offline version of it `__, -too. Use it when you need to be more productive and the Internet is getting in your way (as in, always). +Since the `UPBGE game engine Python API `__ is available online, you have an official excuse to keep a Web browser open while you work. It's not a bad idea to keep an `offline version of it `__, too. Use it when you need to be more productive and the Internet is getting in your way (as in, always). -It's good if you can start to gather example materials from the Internet and keep them organized. -If you use the append feature in Blender to navigate to and import text files from your "collection", -you will not even need to open another Blender application. Also, if you are consistent with your naming -style, indentation rules, and file structures, you will find easy to reuse your own scripts. +It's good if you can start to gather example materials from the Internet and keep them organized. If you use the append feature in Blender to navigate to and import text files from your "collection", you will not even need to open another Blender application. Also, if you are consistent with your naming style, indentation rules, and file structures, you will find easy to reuse your own scripts. Testing Your Scripts ++++++++++++++++++++ -It doesn't matter how easy Python is, you will spend evenings testing and retesting your scripts before you -have them working properly. The more complete way to test your script is to play it inside the game engine. -However, you may not want to load your game every time you need to be sure of some Python syntax, data types' -built-in functions, or simply to check if the math of a result is correct. +It doesn't matter how easy Python is, you will spend evenings testing and retesting your scripts before you have them working properly. The more complete way to test your script is to play it inside the game engine. However, you may not want to load your game every time you need to be sure of some Python syntax, data types' built-in functions, or simply to check if the math of a result is correct. -In those cases, you can use an interactive interpreter to help you. If you have Python installed on -your system, you have it already. If you are using Windows, this will be the python.exe application in your -Python installation directory (C:\Python39\ by default, considering the installation of Python 3.9), as seen in -Figure 7.8. In Linux or OSX, you have to type "python" in any console and you are good to go. +In those cases, you can use an interactive interpreter to help you. If you have Python installed on your system, you have it already. If you are using Windows, this will be the python.exe application in your Python installation directory (C:\Python39\ by default, considering the installation of Python 3.9), as seen in Figure 7.8. In Linux or OSX, you have to type "python" in any console and you are good to go. -.. figure:: /images/Python_Scripting/python-scripting-introduction-to-scripting-08.png +.. figure:: /images/python_scripting/introduction_to_scripting_08.png Python IDE -You can also use the UPBGE Python console. Change one of your current windows into the console, and you should -see the screen shown in the next figure. +You can also use the UPBGE Python console. Change one of your current windows into the console, and you should see the screen shown in the next figure. -.. figure:: /images/Python_Scripting/python-scripting-introduction-to-scripting-09.png +.. figure:: /images/python_scripting/introduction_to_scripting_09.png UPBGE Python console -Now you can use it to type simple codes, or to run a help or a dir into any of the Python modules. -Unfortunately, only Blender modules have the auto-complete working from there. +Now you can use it to type simple codes, or to run a help or a dir into any of the Python modules. Unfortunately, only Blender modules have the auto-complete working from there. -Additionally, you can also use the in-game python console for debugging the game from python. In the scene properties -tab you can activate it and set-up its short-cut. +Additionally, you can also use the in-game python console for debugging the game from python. In the scene properties tab you can activate it and set-up its short-cut. -.. figure:: /images/Python_Scripting/python-scripting-introduction-to-scripting-10.png +.. figure:: /images/python_scripting/introduction_to_scripting_10.png Set-up In-game UPBGE Python console -To activate it, once the game has started you have to press the short-cut. Then the game will be paused and in the -Windows console or linux terminal you will see the interactive python console, as you can see in the next figure. Whether -you want to continue the game you need simply ending the interpreter, for linux Ctrl + D and for windows Ctrl + Z + Enter. +To activate it, once the game has started you have to press the short-cut. Then the game will be paused and in the Windows console or linux terminal you will see the interactive python console, as you can see in the next figure. Whether you want to continue the game you need simply ending the interpreter, for Linux :kbd:`Ctrl-D` and for Windows :kbd:`Ctrl-Z > Enter`. -.. figure:: /images/Python_Scripting/python-scripting-introduction-to-scripting-11.png +.. figure:: /images/python_scripting/introduction_to_scripting_11.png In-game UPBGE Python console -Another important strategy is to keep the development of new functionalities outside the main file. For example, -if you need to develop a navigation system (as we will soon), you don't need to use your real big, high-textured scenario. -Definitively not for the early tests. If you keep independent systems that work together, you will be able to identify -errors faster and easier and even to port fixes over to other projects smoothly. +Another important strategy is to keep the development of new functionalities outside the main file. For example, if you need to develop a navigation system (as we will soon), you don't need to use your real big, high-textured scenario. Definitively not for the early tests. If you keep independent systems that work together, you will be able to identify errors faster and easier and even to port fixes over to other projects smoothly. Designing Your Python Script - Study Example -------------------------------------------- -We are now going to dive into an example of writing and planning a Python script for the game engine from scratch. -We will assume that you have already covered all the basics of Python scripting and the general understanding of -game engine internals so we can move on to its real usage. More specifically, we are going over the writing process -of a camera navigation system for an architectural visualization walkthrough. This study case is actually the system -developed for a commercial project for an Italian book project. In general, we needed to implement a system to navigate -and interact in a virtual model of an Italian Doric temple. Here, however, we are going to develop it under a sandbox -and reapply it into another file, emulating what you could do with your own projects. +We are now going to dive into an example of writing and planning a Python script for the game engine from scratch. We will assume that you have already covered all the basics of Python scripting and the general understanding of game engine internals so we can move on to its real usage. More specifically, we are going over the writing process of a camera navigation system for an architectural visualization walkthrough. This study case is actually the system developed for a commercial project for an Italian book project. In general, we needed to implement a system to navigate and interact in a virtual model of an Italian Doric temple. Here, however, we are going to develop it under a sandbox and reapply it into another file, emulating what you could do with your own projects. -Unlike gaming cameras, a virtual walkthrough can use a very simple navigation system compound of (1) an orbit mode to -look at the exterior of the building; (2) a walk mode to navigate inside the building with gravity simulation and -collision; (3) and a fly mode to freely explore the virtual environment with collision only. The other requirement -was to make the system as portable as possible, and with the least amount of logic bricks. +Unlike gaming cameras, a virtual walkthrough can use a very simple navigation system compound of (1) an orbit mode to look at the exterior of the building; (2) a walk mode to navigate inside the building with gravity simulation and collision; (3) and a fly mode to freely explore the virtual environment with collision only. The other requirement was to make the system as portable as possible, and with the least amount of logic bricks. -All of those aspects must be considered from the first phases of the coding process. With a well-defined design, -you can plan the most efficient system in the short and long run. +All of those aspects must be considered from the first phases of the coding process. With a well-defined design, you can plan the most efficient system in the short and long run. -.. note:: **Pencil and Paper, Valuable Coding Assets** +.. note:: + **Pencil and Paper, Valuable Coding Assets** - It doesn't matter how advanced and technical the coding is that you are working on; you can always have a great time - sketching your ideas and plans with old-fashioned pencil and paper. This is how the problems are solved, - clearly laying down the ideas and organizing them logically. + It doesn't matter how advanced and technical the coding is that you are working on; you can always have a great time sketching your ideas and plans with old-fashioned pencil and paper. This is how the problems are solved, clearly laying down the ideas and organizing them logically. -The system will consist of one camera for the orbit mode, and one to be used for both the fly and walk mode. -Each mode works as described in the following table: +The system will consist of one camera for the orbit mode, and one to be used for both the fly and walk mode. Each mode works as described in the following table: .. table:: Comparison of Different Navigation Cameras @@ -293,12 +230,12 @@ Each mode works as described in the following table: | Vertical Rotation Pivot | Empty | Empty | Empty | +-------------------------------+---------------+------------------+--------+ -- **Empty:** is an empty object the camera is parented to. +- **Empty:** is an empty object the camera is parented to. -.. note:: **Try It Out** +.. note:: + **Try It Out** - In order to illustrate it better, you can see the working system demonstrated in the book file: \Book\Chapter7\4\_navigation\_system\camera\_navigation.blend. - To switch modes press 1, 2, or 3. This will change the mode to orbit, walk, and fly, respectively. To navigate, you can use the mouse and the keys WASD. + In order to illustrate it better, you can see the working system demonstrated in the book file: \Book\Chapter7\4\_navigation\_system\camera\_navigation.blend. To switch modes press 1, 2, or 3. This will change the mode to orbit, walk, and fly, respectively. To navigate, you can use the mouse and the keys :kbd:`W A S D`. 3D World Elements +++++++++++++++++ @@ -307,12 +244,12 @@ Open up the file \Book\Chapter7\4_navigation_system\camera_navigation.blend. You will find two cameras and different empty objects in the first layer: -* scripts - an empty to calls all the scripts. -* CAM_Move - the camera for the walk and fly mode. -* CAM_Orbit - the camera for the orbit mode. -* CAM_back, CAM_front, CAM_side, CAM_top - empties to store the position and orientation for the game cameras. -* MOVE_PIVOT - the pivot for the walk and fly camera. -* ORB_PIVOT - the pivot for the orbit camera. +- scripts - an empty to calls all the scripts. +- CAM_Move - the camera for the walk and fly mode. +- CAM_Orbit - the camera for the orbit mode. +- CAM_back, CAM_front, CAM_side, CAM_top - empties to store the position and orientation for the game cameras. +- MOVE_PIVOT - the pivot for the walk and fly camera. +- ORB_PIVOT - the pivot for the orbit camera. In the second layer, you will find the collision meshes[md]the ground and the vertical elements. Everything is very simple here, since we only need to test the system, and for that a few low poly obstacles work fine. @@ -322,10 +259,11 @@ Understanding the Code /Book/Chapter7/4_navigation_system/camera_navigation.py This program is divided into five different parts: -#. Global Initialization, -#. Event Management, -#. Internal Functions, -#. Game Interaction, + +#. Global Initialization; +#. Event Management; +#. Internal Functions; +#. Game Interaction; #. More Python. The diagram in Figure 7.10 illustrates how they relate to one another. Now let's take an inside look at each of them. @@ -335,7 +273,7 @@ The diagram in Figure 7.10 illustrates how they relate to one another. Now let's Script architecture Global Initialization -********************* +++++++++++++++++++++++++++++++ `camera_navigation.init_world()` @@ -396,17 +334,17 @@ Last, but not least, we need to create the variables we are going to read and wr 104 G.nav_mode = "orbit" Event Management -**************** +++++++++++++++++++++++++++++++ .. code-block:: python camera_navigation.mouse_move camera_navigation.keyboard -Apart from the Always sensor needed for the `camera_navigation.init_world()` function, there are two other sensors we need - a keyboard and a mouse sensor. All the interaction you will have with this navigation system will run through those functions. +Apart from the Always sensor needed for the *camera_navigation.init_world()* function, there are two other sensors we need - a keyboard and a mouse sensor. All the interaction you will have with this navigation system will run through those functions. scripts.mouse_move -~~~~~~~~~~~~~~~~~~~ +------------------------------ Let's first take a look at the mouse sensor controlling system: @@ -422,7 +360,7 @@ Let's first take a look at the mouse sensor controlling system: 217 else: 218 look_camera(sensor) -It looks quite similar to the script template we saw recently. A difference is that instead of activating an actuator, we are calling a function to rotate the view. Actually, according to the current camera (orbit or fly/walk), we will have to call different functions (`orbit_camera` and `look_camera` respectively). Also, you can see that the function gets the controller passed as an argument. The game engine passes the controller by default for the module when using the Python Module controller. The argument declaration in the function is actually optional. So you could replace line 210 of the code with the following two lines, and it would work just as well: +It looks quite similar to the script template we saw recently. A difference is that instead of activating an actuator, we are calling a function to rotate the view. Actually, according to the current camera (orbit or fly/walk), we will have to call different functions (*orbit_camera* and *look_camera* respectively). Also, you can see that the function gets the controller passed as an argument. The game engine passes the controller by default for the module when using the Python Module controller. The argument declaration in the function is actually optional. So you could replace line 210 of the code with the following two lines, and it would work just as well: .. code-block:: python @@ -430,7 +368,7 @@ It looks quite similar to the script template we saw recently. A difference is t cont = G.getCurrentController() scripts.keyboard -~~~~~~~~~~~~~~~~ +------------------------------ The second event management function handles keyboard inputs. This function takes the sensor input and calls internal functions according to the pressed key. If the pressed key is W, A, S, or D, we move the camera. If the key is 1, 2, or 3, we switch it. @@ -473,7 +411,7 @@ The second event management function handles keyboard inputs. This function take If you don't want to use a keyboard sensor, you can use an internal instance of the keyboard module. You can read about this in the "bge.logic API" section later in this chapter, or on the online API page: _http://www.blender.org/documentation/blender_python_api_2_66_release/bge.logic.html#bge.logic.keyboard._ Internal Functions -****************** +++++++++++++++++++++++++++++++ .. code-block:: python @@ -484,7 +422,7 @@ Internal Functions These three functions are called from the event management functions. In their lines, you can find the math responsible for the camera movement. We're calling them "internal functions" because they are the bridge between the sensors' inputs and the outputs in the game engine world. scripts.move_camera -~~~~~~~~~~~~~~~~~~~~ +------------------------------ The function responsible for the camera movement is very simple. In the walk and fly mode, we are going to move the pivot in the desired direction (which is passed as argument). Therefore, we first need to create a vector to this course. If you are unfamiliar with vectorial math, think of vector as the direction between the origin [0, 0, 0] and the vector coordinates [X, Y, Z]. @@ -509,7 +447,7 @@ The function responsible for the camera movement is very simple. In the walk and Here the vector is the movement we need to apply to the pivot in order to get it moving. The size of the vector (MOVE) will act as intensity or speed of the movement. scripts.orbit_camera -~~~~~~~~~~~~~~~~~~~~~ +------------------------------ We decided to use different methods for the walk/fly camera and the orbit one. In the orbit camera, every position on the screen corresponds to an orientation of the camera. @@ -562,10 +500,7 @@ The first lines that deserve our attention here are the normalizing operation. T .. note:: **Even Fewer Logic Bricks and Normalized Mouse Coordinates** - It's important to always use normalized coordinates for your screen operations. Otherwise, different desktop resolutions will produce different results in a game. As a counter edge case, you may need the absolute coordinates for mouse events if you want to assure minimum clickable areas for your events. - You don't always need to normalize the mouse coordinates manually. Like the keyboard sensor, you can replace the mouse sensor by an internal instance of the mouse module. - The coordinates from bge.logic.mouse run from 0.0 to 1.0 and can be read anytime. (You can even link your script to an Always sensor, leaving the Mouse sensor for the times where you are using more logic bricks.) - You can read about this in the "bge.logic API" section in this chapter or on the online API page: _http://www.blender.org/documentation/blender_python_api_2_66_release/bge.logic.html#bge.logic.keyboard_ + It's important to always use normalized coordinates for your screen operations. Otherwise, different desktop resolutions will produce different results in a game. As a counter edge case, you may need the absolute coordinates for mouse events if you want to assure minimum clickable areas for your events. You don't always need to normalize the mouse coordinates manually. Like the keyboard sensor, you can replace the mouse sensor by an internal instance of the mouse module. The coordinates from bge.logic.mouse run from 0.0 to 1.0 and can be read anytime. (You can even link your script to an Always sensor, leaving the Mouse sensor for the times where you are using more logic bricks.) You can read about this in the "bge.logic API" section in this chapter or on the online API page: _http://www.blender.org/documentation/blender_python_api_2_66_release/bge.logic.html#bge.logic.keyboard_ Now a simple operation to convert the normalized value into a value inside our horizontal angle range (-220º to 220º): @@ -579,14 +514,14 @@ Next find in the .blend file the pivot empty (ORB_PIVOT) and play with its rotat .. code-block:: python - 250 y = m.pi / 2 – y + 250 y = m.pi / 2 – y .. figure:: /images/Chapter7/Fig07-11.png Orbit pivot rotation scripts.look_camera -~~~~~~~~~~~~~~~~~~~~ +------------------------------ The function to rotate the walk/fly camera is quite different from the orbit one. We don't have a direct relation between mouse coordinate and camera rotation anymore. Here we get the relative position of the cursor (from the center) and later force the mouse to be re-centered[md]to avoid continuous movement unless the mouse is moved again. @@ -615,7 +550,7 @@ The solution is to get the current camera vertical angle and see if by adding th For the actual project this was originally designed for, we ended up moving the orbit camera code to be a subset of the walk/fly. Having the mouse always centered comes in handy when you have a user interface on top of that, and it needs to alternate between mouse clicking and camera rotating. Although the methods are different, the results are the same. Game Interaction -**************** +++++++++++++++++++++++++++++++ .. code-block:: python @@ -632,7 +567,7 @@ And the outcome of the functions: In the previous section, we saw how the angles and directions were calculated with Python. However, we deliberately skipped the most important part: applying it to the game engine elements. It includes activating actuators (as we do in the change_view() function) or directly interfering in our game elements (cameras and pivots). Outcome of the functions: scripts.move_camera, scripts.look_camera, and scripts.orbit_camera -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +-------------------------------------------------------------------------------------------- Let's put the pieces together now. We already know the camera future orientation and position. Therefore, there is almost nothing left to be calculated here. Nevertheless, there are distinct ways to change the object position and orientation. @@ -683,11 +618,12 @@ The orientation is a Python built-in variable that can be read and written direc 263 pivot.orientation = ori scripts.change_view -~~~~~~~~~~~~~~~~~~~~ +------------------------------ After the user presses a key (1, 2, or 3) to change the view, we call the change_view() function to switch to the new camera (with a parameter specifying which camera to use). This function consists of two parts: first, we set the correct position and orientation for the camera and pivot; secondly, we change the current camera to the new one. -.. note:: **Decomposing the View Orientation** +.. note:: + **Decomposing the View Orientation** Keep in mind that the desired orientation (stored in the empty and accessed through the G.views dictionary) represents the new view orientation. In our system, this view orientation is the combination of the parent object (pivot) orientation with the child one (camera). @@ -725,9 +661,10 @@ For that, we need to rotate it a few degrees to align with the horizon. The came 198 pivot.applyRotation([-angle,0,0],1) 199 camera.applyRotation([angle,0,0],1) -.. note:: **Reasoning Behind the Design** +.. note:: + **Reasoning Behind the Design** - There is another reason for keeping this as a separate function. Originally, I was planning to switch modes (walk/fly) while keeping the same camera position and view. Although I dropped the idea, I decided to keep the system flexible in case of any turn of events (clients[md]who understands their minds?). + There is another reason for keeping this as a separate function. Originally, I was planning to switch modes (walk/fly) while keeping the same camera position and view. Although I dropped the idea, I decided to keep the system flexible in case of any turn of events (clients who understands their minds?). Now that the new camera and pivot have the correct position and orientation, we can effectively switch cameras. For that, we first set the new camera in the Scene Set Camera actuator. Next, we activate the actuator and the camera will change: @@ -737,7 +674,7 @@ Now that the new camera and pivot have the correct position and orientation, we 182 cont.activate(act_camera) More Python -*********** +++++++++++++++++++++++++++++++ .. code-block:: python @@ -765,12 +702,12 @@ If the collision_check() test finds any obstacle in front of the camera, it retu The code of those functions is very particular to this project; therefore, we're not going into more detail here. (You are encouraged to take a look at the complete code in the book file, though). Nevertheless, the key point is to understand the role of those functions in the script architecture. Those scripts can complement the functionality of other functions, to rule your game in a global and direct way, or simply to tie things together. Reusing Your Script -+++++++++++++++++++ +++++++++++++++++++++++++++++++ One of the reasons this system was designed so carefully is because of the need for portability. You don't want to rewrite a navigation system every time you have a new project. This is not particular to this script example. Very often, you will be recycling your own scripts to adapt them to new files. Let's go over some principles you should know. File Organization - Groups and Layers -************************************* ++++++++++++++++++++++++++++++++++++++ The first thing to have in mind is how your final file will look. Do you want the script system to be merged with the rest of the existent Blender file? Do you want to keep them in separated scenes (very common for user interfaces)? Will you need to access/edit the script system elements later? @@ -779,7 +716,7 @@ In our case, there is no need for an extra scene. However, we need to make sure If it's not possible to have all your elements in a single layer, you can create a group for them. That way, you can always quickly isolate them to be listed in the outliner and selected individually. The other advantage of using groups is during importing. It's easier to select a group to be imported than to go over all the individual objects, determining which one should be imported and which one is part of the test environment (which usually doesn't have to be imported). Tweaks and Adjustments - Getting Your Hands Dirty -************************************************* ++++++++++++++++++++++++++++++++++++++++++++++++++ Open the file /Book/Chapter7/4_navigation_system/walkthrough_1_base/walkthrough.blend @@ -792,7 +729,7 @@ This small file is part of the presentation of an architectural walkthrough of a It's time for redemption. Let's replace its navigation system with the Python system we just studied. For convenience, this file was already organized to receive the navigation elements (cameras, empties, and so on.). Organize and Append Your File -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +------------------------------ In this case, we decided to group all the navigation elements in a group called NAVIGATIONSYSTEM and to make sure they are all in layer 1. You can use the Outliner to make sure you didn't miss any object out of the group. Leave the lamps and the collision objects out of the group. @@ -803,7 +740,7 @@ Now open the walkthrough file again and append the NAVIGATIONSYSTEMwe created. I #. Open the Append Objects Dialog (Shift+F1). #. Find the NAVIGATIONSYSTEM group inside the camera_navigation file. #. Make sure the option "Instance Groups" is not checked. (This would insert the group, not the individual elements.) -#. Click on the "Link/Append from Library." (This will add the group.) +#. Click on the "Link/Append from Library". (This will add the group.) #. Set CAM_Orbit as the default camera. (Tip: Use the Outliner to find the object; it's inside the ORB\_PIVOT.) A snapshot with those changes can be found at: @@ -817,7 +754,7 @@ Now if you run the application, the navigation system should work - kind of (see Still not there Adjustments in Loco -~~~~~~~~~~~~~~~~~~~ +------------------------------ As you can see in Figure 7.13, the new camera system looks absurdly wrong. There are two main reasons for that: the walkthrough file elements are far away from the file origin [0, 0, 0], and the cameras are not prepared for a project with this magnitude (their clipping parameters are way too low). We will need to move the objects to their new correct places, adjust the camera parameters, and do a small intervention in the script file: @@ -827,15 +764,15 @@ Move them 2000 in X and 350 in Y. **Empties** : -* CAM_front and CAM_back - Those empties will hold the position for walk cameras. Make sure their position from the ground is at the human eyes (~1.68). -* CAM_top and CAM_side - Those empties will be used in Fly Mode. Here, we should also make sure their initial orientation looks good. The easiest way to do that is by using the Fly Mode (select the object, set it as current camera, and use Shift+F). +- CAM_front and CAM_back - Those empties will hold the position for walk cameras. Make sure their position from the ground is at the human eyes (~1.68). +- CAM_top and CAM_side - Those empties will be used in Fly Mode. Here, we should also make sure their initial orientation looks good. The easiest way to do that is by using the Fly Mode (select the object, set it as current camera, and use Shift+F). The one thing missing for the camera is to increase the clipping distance. That way, we can see all the skydome around the camera (see before and after in Figure 7.14). **Cameras** : -* CAM_Orbit - Adjust initial Z, change clip ending to 1000. -* CAM_Move - change clip ending to 1000. +- CAM_Orbit - Adjust initial Z, change clip ending to 1000. +- CAM_Move - change clip ending to 1000. A snapshot with those changes can be found at: @@ -854,7 +791,7 @@ A snapshot with those changes can be found at: All the houses, the ground, and the other 3D objects already have collision enabled in this file. In other situations, however, you may need to change the collision objects, enabling or disabling their collisions accordingly. The Python raycast uses the internal Bullet Physics engine under the hood. In order to prevent the camera from going through the walls and the ground, set enough collision surfaces (but not too much, so that you don't compromise the performance of your game). Script Tweaks -~~~~~~~~~~~~~ +------------------------------ Finally, it's good to fiddle a bit with the script. Due to the particularities of this project (mainly its scale), you may feel that everything happens a bit too fast. It's up to you to change the settings in the `init_world` function. Also, it would be interesting to explore multiple viewpoints for this presentation. We have already positioned the side and back empties. Although we were not using them previously, their names are present in the script as part of the available cameras list: @@ -880,7 +817,7 @@ The final file is on the book files as: /Book/Chapter7/4_navigation_system/walkthrough_4_final/walkthrough.blend. Using the Game Engine API - Application Programming Interface -------------------------------------------------------------- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ The game engine API is a bridge connecting your Python scripts with your game data. Through those modules, methods, and variables you can interact with your existent logic bricks, game objects, and general game functions. @@ -892,28 +829,28 @@ We will now walk through the highlights of the modules. After you are familiar w **Game Engine Internal Modules** -* Game Logic (bge.logic) -* Game Types (bge.types) -* Rasterizer (bge.render) -* Game Keys (bge.events) -* Video Texture (bge.texture) -* Physics Constraints (bge.constraints) -* Application Data (bge.app) //TODO +- Game Logic (bge.logic) +- Game Types (bge.types) +- Rasterizer (bge.render) +- Game Keys (bge.events) +- Video Texture (bge.texture) +- Physics Constraints (bge.constraints) +- Application Data (bge.app) //TODO **Stand-Alone Modules** -* Audio System (aud) -* Math Types and Utilities (mathutils) -* OpenGL Wrapper (bgl) -* Font Drawing (blf) +- Audio System (aud) +- Math Types and Utilities (mathutils) +- OpenGL Wrapper (bgl) +- Font Drawing (blf) bge.logic -+++++++++ +------------------------------ The main module is a mix of utility functions, global game settings, and logic bricks replacements. Some of those functions were already covered in the tutorial, but they are here again for convenience sake. We will look at some of the highlights. getCurrentController() -********************** +------------------------------ Returns the current controller. This is used to get a list of sensors and actuators (to check status and deactivate respectively), and the object the controller belongs to: @@ -932,7 +869,7 @@ If you are using Python modules instead of Python scripts directly (see Python C sensor = cont.sensors['mysensor'] getCurrentScene() -***************** +------------------------------ This function returns the current scene the script was called from. The most common usage is to give you a list of all the game objects: @@ -941,7 +878,7 @@ This function returns the current scene the script was called from. The most com for object in bge.logic.getCurrentScene().objects: print(object) expandPath() -************ +------------------------------ If you need to access an external file (image, video, Blender, etc.), you need to first get its absolute path in the computer. Use single backslash (/) to separate folders and double backslash (//) if you need to refer to the current folder: @@ -950,12 +887,12 @@ If you need to access an external file (image, video, Blender, etc.), you need t video_absolute_path = bge.logic.expandPath('//videos/video01.ogg') sendMessage(), addScene(), start/restart/endGame() -************************************************** +-------------------------------------------------- These functions copy the functionality of existent actuators. They are Python replacement for those global events when you need a direct way to call them, bypassing the logic bricks. LibLoad(), LibNew(), LibFree(), LibList() (TODO to be replaced with new ones) -***************************************************************************** ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ There are cases when you need to load the content of an external Blender file at runtime. This is known as _dynamic loading._ The game engine supports dynamic loading of actions, meshes, or complete scenes. The new data blocks are merged into the current scene and behave just like internal objects: @@ -968,7 +905,7 @@ There are cases when you need to load the content of an external Blender file at New Lamp objects can be dynamically loaded from external files. However, in GLSL mode, they will not work as a light source for the material shaders, since the shaders would need to be recompiled for that. globalDict, loadGlobalDict(), saveGlobalDict() -********************************************** +++++++++++++++++++++++++++++++++++++++++++++++ The bge.logic.globalDict is a Python dictionary that is alive during the whole game. It's a game place to store data if you need to restart the game or load a new file (level) and need to save some properties. In fact, you can even save the globalDict with the Blender file during the game and reload later. @@ -979,7 +916,7 @@ The bge.logic.globalDict is a Python dictionary that is alive during the whole g bge.logic.loadGlobalDict() # replace the current globalDict with the saved one keyboard -******** +------------------------------ You can handle all the keyboard inputs directly from a script. The usage and syntax are very similar to the Keyboard sensor. You need a script running every logic tic (Always sensor pulsing with a frequency of 0 or every time a key is pressed; Keyboard sensor with "All Keys" set) where you can read the status of all the keys in the bge.logic.keyboard. events dictionary. If instead of inquiry for the status of a particular key (e.g., if spacebar is pressed), you want to list all the pressed keys, you can use the dictionary bge.logic.keyboard.active\_events. @@ -1001,16 +938,16 @@ The keys for both event dictionaries are the same you use with the Keyboard sens A sample file can be seen at \Book\Chapter7\5_game_keys\key_detector_python.blend . This shows the more Python-centric way of handling keyboard. For the classic method of using a Keyboard sensor, look further in this chapter into the "bge.events" section. mouse -***** +------------------------------ Similar to the keyboard, this Python object can work as a replacement for the Mouse sensor. There are a few differences that make it even more appealing for scripting[md]in particular, the fact that the mouse coordinates are already normalized. As we explained in the tutorial, this helps you get consistent results, regardless of the desktop resolution. The available attributes are: -* **events:** A dictionary with all the events of the mouse (left-click, wheel up, and so on) and their status (for example, bge.logic.KX_INPUT_JUST_ACTIVED). -* **position** : Normalized position of the mouse cursor in the screen (from [0,0] to [1,1]). -* **visible** : Dhow/hide the mouse cursor (can also be set in the Render panel for the initial state). +- **events** - a dictionary with all the events of the mouse (left-click, wheel up, and so on) and their status (for example, bge.logic.KX_INPUT_JUST_ACTIVED). +- **position** - normalized position of the mouse cursor in the screen (from [0,0] to [1,1]). +- **visible** - show/hide the mouse cursor (can also be set in the Render panel for the initial state). joysticks -********* +------------------------------ This is a list of all the joysticks your computer supports. That means the list is mainly populated by None objects, and a few, if any, joystick Python objects. To print the index, name, number of axis, and active buttons of the connected joysticks, you can do: @@ -1021,7 +958,6 @@ This is a list of all the joysticks your computer supports. That means the list if joystick and joystick.connected: print(i, joystick.name, joystick.numAxis, joystick.activeButtons) - .. For the complete list of all the parameters supported by the Joystick python object, visit the official API: _http://www.blender.org/documentation/blender_python_api_2_66_release/bge.types.SCA_JoystickSensor.html_ @@ -1029,12 +965,12 @@ This is a list of all the joysticks your computer supports. That means the list A sample file can be found on \Book\Chapter7\joystick.blend. Others -****** +------------------------------ There are even more functions available in this module (setMist, getLogicTicRate, and setGravity, for example). Make sure that you visit the online documentation (or the documentation included on the book files) to see them all. bge.types -+++++++++ +++++++++++++++++++++++++++++++ Objects, meshes, logic bricks, and even shaders are all different game types. Every time you call an internal function from one of them, you are accessing one of those functions. This happens when you get a position of an object, change an actuator value, and so on. @@ -1043,7 +979,7 @@ Each one of the classes has the same anatomy. You can access instance methods an Some of the variables will only work inside the correct context. Therefore, you can't get the mouse position of a Mouse sensor if the sensor was not triggered yet. Be aware of the right context and the game type. Class KX_GameObject -******************** +++++++++++++++++++++++++++++++ If you run a print(dir (object)) inside your script, you will get a very confusing list. It includes Python internal methods, instance methods, and instance variables. Most of them are common to all objects, so we are going to talk about them first. However, lamps and cameras not only inherit all the game object methods but also extend them with specific ones. @@ -1052,42 +988,43 @@ If you run a print(dir (object)) inside your script, you will get a very confusi In order to see all available methods, please refer to the documentation. We are only covering a few of them here. Python Internal Methods -~~~~~~~~~~~~~~~~~~~~~~~ +------------------------------ -`__class__, __doc__, __delattr__ . . .` +`__class__, __doc__, __delattr__ ...` Most of those methods are inherited from the Python object we are dealing with. However, given the nature of the Python classes presented in Blender, some of those methods may not be fully accessible. It's unlikely you will be using them. So for now it's safe to ignore any method starting and ending with double underlines (__ignoreme__). Instance Methods -~~~~~~~~~~~~~~~~ +------------------------------ -`endObject(), rayCast(), getAxisVect(), suspendDynamics(), getPropertyNames() . . .` +`endObject(), rayCast(), getAxisVect(), suspendDynamics(), getPropertyNames() ...` If it looks like a function, it should be one. Every game engine object provides you with a set of functions to interact with them or from them to the others. Here are some methods you should know about: -* **rayCast (objto, objfrom, dist, prop, face, xray, poly)** +- **rayCast (objto, objfrom, dist, prop, face, xray, poly)** *"Look from a point/object to another point/object and find first object hit within dist that matches prop."* This method is a more complete version of the rayCastTo(). It has so many applications that it becomes hard to delimitate its usage. For instance, this was the method used to calculate the collision in the navigation system script we studied previously. -* **getPropertyNames()** +- **getPropertyNames()** *"Get a list of all property names."* Once you retrieve the list of property names, you can use it to see if the object has a specific property before using it. To get individual properties, you can use *if "prop" in object*: or *object.get("prop", default=None)*. -.. note:: **A Use for Properties** +.. note:: + **A Use for Properties** Properties have multiple uses in the game engine. One of those uses is to mark an object to be identified by the Python script. Why not use their names instead? While names work fine to retrieve individual objects, properties allow you to easily mark and access multiple objects at once. Frankly, it's easier to create an organized, named, and tagged MP3 collection than it is to find time to properly name all your Blender data blocks[ms]objects, meshes, materials, textures, images, and so on. -- **endObject()** +- **endObject()** *"Delete this object can be used in place of the EndObject Actuator."* This method is one of the functions that mimic existent actuators. You will also find this design in methods such as sendMessage(), setParent(), and replaceMesh(). -- **applyRotation()** +- **applyRotation()** *"Set the game object's movement/rotation."* @@ -1096,9 +1033,9 @@ There are a few methods that will free you from doing 3D math manually. This par Other methods are applyMovement(), applyForce(), applyTorque(), getDistanceTo(), getVectTo(), getAxisVect(), and alignAxisToVect(). Instance Variables -~~~~~~~~~~~~~~~~~~ +------------------------------ -`_name, position, mass, sensors, actuators . . ._` +`_name, position, mass, sensors, actuators ..._` Last but definitively not least, we have the built-in variables. They work as internal parameters of the object (for example, name, position, orientation) or class objects linked to it (for example, parent, sensors, actuators). In Blender versions prior to 2.49, those variables were only accessible through a conjunct of get and set statements (setPosition(), getOrientation(), and so on). In Blender 2.5, 2.6 and on, they not only can be accessed directly, but also manipulated as any other variable, list, dictionary, vector, or matrix you may have: @@ -1110,43 +1047,43 @@ Last but definitively not least, we have the built-in variables. They work as in obj.worldOrientation.transpose() print(obj.worldTransform) -* **position, localPosition, worldPosition** +- **position, localPosition, worldPosition** Position is a vector [x, y, z] with the location of the object in the scene. We can get the absolute position (worldPosition) or the position relative to the parent of the object (localPosition). And what about accessing the position variable directly? This is deprecated, but you may run into it in old files you find online. If you access the position variable directly, you get the world position on reading and set the local position on writing. Confusing? That is why this is deprecated ;) -* **orientation, localOrientation, worldOrientation** +- **orientation, localOrientation, worldOrientation** This variable gives you access to a matrix 3x3 with the orientation of the object. The orientation matrix is the result of the rotation transformation of an object and the influence of its parent object. As with position, the orientation variable will give you the world orientation on reading and set the local orientation on writing. As with position, you should always specify whether you want the local or world orientation. -* **visible** +- **visible** We have different ways to set the visibility of an object. If your material is not set to invisible in the game panel, you can use this method. To change the visibility recursively (to the children of the object), you must use the method setVisibility. -* **sensors, controllers, actuators** +- **sensors, controllers, actuators** All the logic bricks of an object can be accessed through those dictionaries. The name of the sensor/controller/actuator will be used as the dictionary key, for it's important to name them correctly. Sub-Class KX_Camera -~~~~~~~~~~~~~~~~~~~ +------------------------------ Not all the objects have access to the same methods and variables. For example, an empty object doesn't have mass, and a static object doesn't have torque. When the object is a camera, the difference is even more distinct. The camera object has its own class derived from KX_GameObject. It inherits all the instance variables and methods and expands it with its own. You will find some screen space functions (getScreenPosition(),getScreenVect(), getScreenRay()), some frustum methods (sphereInsideFrustum(), boxInsideFrustum(), pointInsideFrustum()), and some instance variables (lens, near, far, frustum_culling, world_to_camera, camera_to_world). Sub-Class KX_Lamp -~~~~~~~~~~~~~~~~~ +------------------------------ Like cameras, lamps also have their own subclass. It inherits all the instance variables and methods, and only expands the available variables. The parameters that can be changed with Python include all that can be animated with the Action actuator: energy, color, distance, attenuation, spot size, and spot blend. Additionally, you can change the lamp layer in runtime. bge.render -++++++++++ +++++++++++++++++++++++++++++++ If we compare gaming with traditional 3D artwork, rasterizer would be the rendering phase of the process. Internally, it's when all the geometry is finally drawn to the screen with the light calculation, the filters applied, and the canvas set. For this reason, the Rasterizer module presents functions related to stereoscopy, windows and mouse management, world settings, and global GLSL material settings. Window and Mouse -**************** +++++++++++++++++++++++++++++++ `getWindowWidth() / getWindowHeight()` @@ -1161,7 +1098,7 @@ Enable or disable the operating system mouse cursor. Set the mouse cursor position (in pixels). World Settings (TODO to be removed/changed) -******************************************* ++++++++++++++++++++++++++++++++++++++++++++ `setBackgroundColor(rgba), setAmbientColor(rgb)` @@ -1172,7 +1109,7 @@ Set the ambient and background color. Configure the mist (fog) settings. Stereo Settings (TODO to be changed) -************************************ +++++++++++++++++++++++++++++++++++++ `getEyeSeparation() / setEyeSeparation(eyesep)` @@ -1183,7 +1120,7 @@ Get the current eye separation for stereo mode. Usually focal length/30 provides Get the current focal length for stereo mode. It uses the current camera focal length as initial value Material Settings (TODO to be changed) -************************************** +++++++++++++++++++++++++++++++++++++++ `getMaterialMode(mode) / setMaterialMode(mode)` @@ -1198,7 +1135,7 @@ Get/set the state of a GLSL material setting. The available settings are: `"lights", "shaders", "shadows", "ramps", "nodes", "extra_textures"` Others -****** +++++++++++++++++++++++++++++++ `drawLine(fromVec, toVec, color)` @@ -1213,7 +1150,7 @@ Enable/disable the motion blue effect. Write a screenshot to the given filename. bge.events -++++++++++ +++++++++++++++++++++++++++++++ The Keyboard sensor allows you to set individual keys. As you can see in Figure 7.15, it can also be triggered by any key once you enable the option "All Keys." This is very useful to configure text input in your game or to centralize all keyboard events with a single sensor and script. @@ -1253,7 +1190,6 @@ This line stores the integer that identifies the pressed key. However, we usuall text += "the key value is: %s\n" % events.EventToString(pressed_key) text += "the character is: %s" % events.EventToCharacter(pressed_key, 0) - After that, we are checking for a specific key (spacebar). bge.events.SPACEKEY is actually an integer (to find the other keys' names, visit the API page): @@ -1279,7 +1215,7 @@ And, voilà, now we only need to visualize the pressed key: 3 = bge.logic.KX_INPUT_JUST_RELEASED bge.texture -+++++++++++ +++++++++++++++++++++++++++++++ The texture module was first discussed in the Chapter 5, "Graphics." With the texture module, you can change any texture from your game while the game is running. The texture can be replaced by a single image, a video, a game camera, and even a webcam stream. @@ -1327,20 +1263,20 @@ With this ID, we can create a Texture object that controls the texture to be use .. code-block:: python - dynamic_texture = texture.Texture(object, ID) + dynamic_texture = texture.Texture(object, ID) The next step is to create the source to replace the texture with. The bge.texture module supports the following sources: ImageFFmpeg (images), VideoFFmpeg (videos), ImageBuff (data buffer), ImageMirror (mirror), ImageRender (game camera), ImageViewport (current viewport), and ImageMix (a mix of sources). .. code-block:: python - new_source = texture.ImageFFmpeg(url) + new_source = texture.ImageFFmpeg(url) Now we only need to assign the new source to be used by the object texture and to refresh the latter. The refresh function has a Boolean argument for advanced settings. A rule of thumb is: for videos, use refresh (True); for everything else, try refresh (False) first. .. code-block:: python - dynamic_texture.source = new_source - dynamic_texture.refresh(False) + dynamic_texture.source = new_source + dynamic_texture.refresh(False) For the image to be permanent, we have to make sure the new dynamic_texture is not destructed after we leave our Python function. Therefore, we store it in the global module bge.logic. If you need to reset the texture to its original source, simply delete the stored object (for example, *del logic.dynamic_texture*). @@ -1377,7 +1313,7 @@ Webcam sample: /Book/Chapter7/6_texture/webcam.blend bge.constraints -+++++++++++++++ +++++++++++++++++++++++++++++++ The Bullet Physics engine allows for advanced control over the physics simulation in your game. Using Bullet as a backend, this module (formerly known as *Physics Constraints*) allows you to create and set up rigid joints, dynamic constraints, and even a vehicle wrapper. The constraints' functionalities make sense only when you understand the context in which they are to be used (with physic dynamic objects). Therefore, this module is covered in the previous chapter on game physics. @@ -1391,7 +1327,7 @@ Unless your background is in math, physics, or engineering, you won't use this m We are going to present the four available classes in this module: vector, matrix, Euler, and quaternion. For a list of the available methods, refer to the API documentation. Vector -****** +++++++++++++++++++++++++++++++ This class was already present in the KX_GameObject class and in the script example. It behaves like a list object, with some advanced features (for example, swizzle and slicing) expanded with its instance methods. Some of those methods are: reflect, dot, cross, and normalize. @@ -1412,7 +1348,7 @@ new_vector is a new independent list object initialized with the old_vector valu new_vector is a new Vector, an independent copy of the old_vector object. Matrix -****** +++++++++++++++++++++++++++++++ While vectors behave similarly to lists, matrices behave similarly to multidimensional lists. A multidimensional list is a list of a list, organized either in columns or rows. @@ -1437,19 +1373,23 @@ It's important to be aware of the ordering of your matrices; otherwise, you end If your matrix represents a transformation matrix (rotation, translation, and scale) you can get its values separately. Matrix.to_quaternion() and Matrix.to_euler() will give you the rotation part of the matrix in the form you prefer (see next section), and Matrix.to_translation() and Matrix.to_scale () will give you the translation and the scale vector, respectively. Euler and Quaternion -******************** +++++++++++++++++++++++++++++++ Euler and quaternion are different rotation systems. The same rotation can be represented using Euler, quaternion, or an orientation matrix. -.. note:: **Guerrilla CG** +.. note:: + **Guerrilla CG** You can find two great video tutorials on the Guerrilla CG vimeo channel that explain and compare the two rotation system: + Euler Rotations Explained: http://vimeo.com/2824431 + The Rotation Problem: http://vimeo.com/2649637 When you convert an orientation matrix to Euler (`Matrix.to_euler()`), you get a list with three angles. They represent the rotation in the x, y, z axis of the object. In the navigation system script example, we are using this exact method to determine the horizontal camera angle. You can find this usage in the function `fly_to_walk()` (lines 190 to 199 of navigation_system.py or in the early pages of this chapter). Conversion Between Different Rotation Forms + You can convert an orientation matrix to Euler, an Euler to a quaternion, a quaternion to an orientation matrix, and on and on and on: .. code-block:: python @@ -1458,17 +1398,17 @@ Euler and quaternion are different rotation systems. The same rotation can be re converted_matrix=original_matrix.to_euler().to_quaternion().to_matrix().to_euler().to_matrix().to_quaternion().to_euler().to_matrix().to_quaternion().to_euler().to_quaternion().to_matrix() ->In this example, converted_matrix ends up as the same matrix as original_matrix. +In this example, converted_matrix ends up as the same matrix as original_matrix. aud - Audio System -++++++++++++++++++ +++++++++++++++++++++++++++++++ This module allows you to play sounds directly from your scripts. There are three classes you will be working with: Device, Factory, and Handle. The audaspace module in a nutshell: you need to create one audio Device per game. You need one Factory per audio file (which can also be any video file containing a sound track). And every time you need to play a sound, a new Handle object will be generated from the Factory (this is where its name comes from). Example: Basic Audio Playback (TODO to be adapted to new API) -************************************************************* ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ .. code-block:: python @@ -1503,10 +1443,10 @@ Example: Basic Audio Playback (TODO to be adapted to new API) We start by creating an audio device. This is simply a Python object you will use to play your sounds. Next, we create a Factory object. A factory is a container for a sound file. When we pass the Factory object into the device play function, it will start playing the sound and return a handle. Handles are used to control pause/resume and to stop an audio. -.. note:: **When Will This Music Stop?** +.. note:: + **When Will This Music Stop?** - After you initialize a sound, you can get its current position in seconds with the handle.position Python property. This is especially useful to keep videos and audio in sync. If you need to check whether or not the audio is ended, you shouldn't rely on the position, though. Instead, you can get the status of the sound by the property handle.status. If you are using the sound position to control a video playback, the sound status will also tell you if the video is over (handle.status = aud.AUD_STATUS_INVALID). - The possible statuses are: + After you initialize a sound, you can get its current position in seconds with the handle.position Python property. This is especially useful to keep videos and audio in sync. If you need to check whether or not the audio is ended, you shouldn't rely on the position, though. Instead, you can get the status of the sound by the property handle.status. If you are using the sound position to control a video playback, the sound status will also tell you if the video is over (handle.status = aud.AUD_STATUS_INVALID). The possible statuses are: .. code-block:: python @@ -1515,18 +1455,19 @@ We start by creating an audio device. This is simply a Python object you will us 2 = aud.AUD_STATUS_PAUSED bgl - OpenGL Wrapper -++++++++++++++++++++ +++++++++++++++++++++++++++++++ This module is a wrapping of OpenGL constants and functions. It allows you to access low-level graphic resources within the game engine. You can use this module to draw directly to the screen or to read OpenGL matrices and buffers directly. Sometimes, you will need to run your OpenGL code specifically before or after the game engine drawing routine, so you can store your Python function as a list element either in the scene attributes pre_draw and/or in the post_draw. This will be demonstrated in our first example. -.. note:: **To Learn OpenGL** +.. note:: + **To Learn OpenGL** You can find good OpenGL learning material on the Internet or in a bookstore. *The Official Guide to Learning OpenGL* (also known as *The Red Book*) is highly recommended, and some older versions of it can be found online for download. Example 01: Line Width Changing -******************************* +------------------------------- Open the file /Book/Chapter7/7_bgl/line_width.blend. @@ -1548,7 +1489,7 @@ This code needs to run only once per frame and will change the line width of the You will find on the book files another example where the line width changes dynamically - /Book/Chapter7/7_bgl/line_width_animate.blend. Example 02: Color Picker -************************ +------------------------------ Open the file /Book/Chapter7/7_bgl/color_pickup.blend. @@ -1612,7 +1553,7 @@ And, finally, let's apply the pixel color to the lamp: lamp.color = [pixels[0], pixels[1], pixels[2]] blf - Font Drawing -++++++++++++++++++ +++++++++++++++++++++++++++++++ If you need to control text drawing directly from your scripts, you may need to use this module. Be aware, though, that this module is a low-level API that has to be combined with the OpenGL wrapper to handle texts properly. @@ -1623,7 +1564,7 @@ The blf module works in three stages: #. Draw the text on the screen. Example: Writing Hello World -**************************** +------------------------------ Open the file /Book/Chapter7/8_blf/hello_world.blend. diff --git a/source/manual/python_scripting/understanding_inheritance.rst b/source/manual/python_scripting/understanding_inheritance.rst new file mode 100644 index 00000000..47a232ab --- /dev/null +++ b/source/manual/python_scripting/understanding_inheritance.rst @@ -0,0 +1,435 @@ +.. _understanding-inheritance-and-composition-in-game-scripting: + +============================== +Inheritance And Composition +============================== + +Introduction +++++++++++++++++++++++++++++++ + +Let us imagine we are making a video game in which characters can attack each other and receive damage. You will likely want to add a few properties like health or max_health to each object and write simple scripts to calculate them when the character gets hit or drinks a potion. Pretty simple, isn't it? + +In many cases, writing game scripts doesn't require much more knowledge than that. A game engine is supposed to handle most of the heavy lifting for you, and all you need to do is declaring a few such variables, or writing a few conditional statements, loops, or functions to stitch them together. There is a reason why writing game logic is called 'scripting' even when it's done with a compiled language like C#, after all. + +But what if you want to try something more complex, like creating an RPG where you can bash a door or a chest until it breaks open? Do you see the resemblance between hitting an enemy with a sword and doing the same to a crate? + +Of course, you can simply add the same variables to the crate and copy and paste the same code you used to calculate a character's health. But what if there are many similar cases and you have to paste the same code to hundreds of them? Wouldn't it make your project challenging to understand or modify? + +Although software engineering is not a popular topic among most game developers, some of its principles like DRY or SOLID can offer a helpful guide in such a situation. + +And with slight exaggeration, we can say that the entire idea of software design revolves around the concept of generalisation and abstraction, which is a tool invented to solve precisely such a kind of problem. In other words, how can we generalise the idea of something that can be damaged into a reusable code so that we don't have to repeatedly copy and paste the same code over and over? + +Object-Oriented Programming or OOP is a software paradigm that provides powerful tools we can utilise to solve such a problem. Even though it has seen increasing challenges over the years, it remains one of the most widely used software paradigms, well supported by popular languages like Python or C#. So, let's look into the concept briefly in the next chapter. + +Type and Inheritance +-------------------- + +To put it simply, a type in an OOP language determines an object's nature (i.e. properties and behaviours). It also applies to a dynamically typed language like Python, which allows you to write code without caring too much about types. You know that you can change the value of a variable from abc to ABC by invoking its 'upper()' API because it has the type of str which declares upper() as its method. + +But the real benefit of having a type system goes further than allowing you to figure out what functions an existing object provides. It can also serve as a tool to express a set of common characteristics that things can share, like the fact that they can be damaged, for example. + +A character can be attacked and receives damage, and so can a crate. In other words, they are both something capable of being damaged and probably also destroyed after getting hit repeatedly. Let's generalise this idea as Damageable type as follows: + +.. code-block:: python + + class Damageable: + def __init__(self, init_health: int = 100): + self.health = init_health + + def damage(self, amount: int) -> None: + self.health = max(0, self.health - amount) + + @property + def destroyed(self) -> bool: + return self.health == 0 + +But how can you use (or 'reuse') it to eliminate the repetition? And that is where the concept of 'inheritance' comes in. + +If you want to make your character or a crate class damageable, you can simply make them 'inherit' or derive from 'Damageable' type like this: + +.. code-block:: python + + class Character(Damageable): + pass + + class Crate(Damageable): + pass + + character = Character() + + character.damage(40) + crate.damage(120) + + print(character.health) # Prints "60" + print(character.destroyed) # Prints "False" + + print(crate.health) # Prints "0" + print(crate.destroyed) # Prints "True" + +As you can see, inheritance is a powerful tool to generalise ideas and promote code reuse. But it is not without problems which we will discuss in the following chapter. + +Problems of Inheritance +----------------------- + +We just made a crate damageable by deriving it from Damageable type. But what if we also want to add some other features, like being able to be opened? Maybe we could define another class Openable to describe the concept of something which can be opened. But can an object inherit from both of those types? + +This can pose a serious issue in a language that does not allow multiple inheritance like C#. And even with languages that do, deriving from multiple parents may bring more headaches than benefits sometimes, causing issues like the infamous Diamond Problem. + +Furthermore, it can also introduce additional challenges in the context of game development. Typically a game engine handles all performance-critical operations in its native layer while exposing a small set of features as a scripting API in a higher-level language like C# or Python to offer better productivity and ease of use for its users. + +Because of this, some game engines (e.g. a famous private one that keeps them "united" :-)) do not allow instantiating such game-related classes directly in the scripting layer, making it difficult or even impossible to extend them by subtyping, as we discussed in the previous chapter. + +And even those that do (e.g. Godot), the typical workflow they provide involves providing initial parameters from the editor, which the engine uses to instantiate objects for the user. So, if you create game objects directly in code, you'll lose all the conveniences the editor provides. (This, however, is not the case in UPBGE as it has a unique feature that allows you to combine both approaches. We will discuss this feature later.) + +Due to such limitations, it is often desirable to take a different approach to promote code reuse when working on a game project. Fortunately, a design principle can be used to overcome this particular problem called Composition Over Inheritance, which also works well when writing game scripts. + +Composition Over Inheritance +---------------------------- + +The basic idea of composition is implementing each feature of an object as a modular 'component'. By doing so, we can compose such elements to describe the behaviours and properties of the whole. + +For example, instead of making the Crate class inherit from Damageable type, we can rename the latter to HitBox and make it a property of the enclosing class: + +.. code-block:: python + + class HitBox: + def __init__(self, init_health: int = 100): + self.health = init_health + + def damage(self, amount: int) -> None: + self.health = max(0, self.health - amount) + + @property + def destroyed(self) -> bool: + return self.health == 0 + + class Crate: + def __init__(self): + self.hit_box = HitBox() + + crate = Crate() + + crate.hit_box.damage(80) + + print(crate.hit_box.health) # Prints "20" + print(crate.hit_box.destroyed) # Prints "False" + + crate.hit_box.damage(50) + + print(crate.hit_box.health) # Prints "0" + print(crate.hit_box.destroyed) # Prints "True" + +Similarly, we can also make the crate 'openable' by creating a Door component and assign an instance of it as a property of Crate: + +.. code-block:: python + + class Door: + def __init__(self, opened: bool = True): + self.opened = opened + + def open(self) -> None: + self.opened = True + + def close(self) -> None: + self.opened = False + + class Crate: + def __init__(self): + self.hit_box = HitBox() + self.door = Door() + + crate = Crate() + + crate.door.open() + print(crate.door.opened) # Prints "True" + + crate.door.close() + print(crate.door.opened) # Prints "False" + +In this way, you can add as many features to an object as you like without the concern of introducing potential conflict in the type hierarchy. + +Dynamic Component Model +----------------------- + +Let's take the idea one step further and generalise the concept of components itself. What if we replace individual properties like door or hit_box with a generic list? + +.. code-block:: python + + class Crate: + def __init__(self): + self.components = dict() + + crate = Crate() + + crate.components["hit_box"] = HitBox() # Now the crate can be damaged. + crate.components["door"] = Door() # And it becomes openable. + +As you see, now we can attach an arbitrary behaviour to an existing object without modifying the class definition. And what if we make the Character class damageable in the same manner? Wouldn't it make Character look almost identical with Crate? + +.. code-block:: python + + class Character: + def __init__(self): + self.components = dict() + + character = Character() + + character.components["hit_box"] = HitBox() + +They look similar indeed! Then why not replace them both with something more generic, like GameObject? + +.. code-block:: python + + class GameObject: + def __init__(self, name: str): + self.name = name + self.components = dict() + + character = GameObject("Character") + character.components["hit_box"] = HitBox() + + crate = GameObject("Crate") + crate.components["hit_box"] = HitBox() + crate.components["door"] = Door() + +If you want to make it a bit more precise, you can define a common base type to represent a component, like Component and derive both HitBox and Door from it. Using Python's typing support for clarity, the code would look like the following example: + +.. code-block:: python + + from abc import ABC + from typing import Dict + + class Component(ABC): # Indicates that this is an abstract base class + pass + + class GameObject: + def __init__(self, name: str): + self.name = name + self.components: Dict[str, Component] = dict() + + class Door(Component): + ... + + class HitBox(Component): + ... + +In fact, this is what objects and components in game engines are all about. They may be named differently or have slightly different APIs, depending on the game engine you choose. But be it GameObject/MonoBehaviour in other game engine or KX_GameObject/KX_PythonComponent in UPBGE, the core idea behind it remains the same nonetheless. + +The dynamic nature - namely, the ability to define arbitrary behaviour as a component and attach it to an object without modifying its source - of the compositional pattern fits game development so well that many game engines enforce it as the only viable method to write game scripts. + +But could it be a 'silver bullet' of software design pattern? If composition is so good for everything, why almost all major OOP languages still support inheritance? + +Why Inheritance Still Matters? +------------------------------ + +One prominent case where using inheritance over composition would make sense is when the concepts you want to represent as types have an is-a relationship with each other. + +Suppose you want to make an inventory system that can store things like food or weapons. Both an apple and a dagger may take up some space if you put them in your inventory, and they may also have other common traits like having specific weight and so on. + +In other words, we can say that any item has a specific inventory slot size and weight. As long as Potion or Weapon is an Item, it inherits common properties like inventory_size or weight from its parent type. Bearing that in mind, it shouldn't be difficult to see how saying that "a dagger is an item" is much more intuitive than saying that "it contains a component with item-specific properties and behaviours". + +Another disadvantage of using the compositional pattern could be its dynamic nature itself. As with most things in software development, there is a trade-off relationship between dynamically attaching properties or behaviours of an object and statically defining them. + +Remember our first version of Character class that directly extends Damageable? + +.. code-block:: python + + character = Character() + character.damage(50) + +Now, compare that with a componentised version: + +.. code-block:: python + + character = GameObject("Character") + + # Let's assume that the engine added HitBox component automatically. + character.components["hit_box"].damage(50) + +Can you see the difference? Aside from being slightly more verbose, the latter version is also much more prone to errors. With the former example, a decent Python IDE with a proper setup will autocomplete methods like damage and warn you if you accidentally make a typo, like when you type character.destroeyd instead of character.destroyed, for example. + +And in case you want to rename a method or property, like changing damage to hit, for instance, you rely on refactoring support that most IDEs provide to perform the task without an error. + +However, you will lose all such conveniences with the dynamic approach as your IDE won't be able to infer proper types in that case, which could become a significant issue if your project grows larger and more complex. + +Now, examine this method signature: + +.. code-block:: python + + def heal(target, amount) + +Can you guess the proper usage of that API or how to implement its body if you are a developer? If you are not sure, how about this version? + +.. code-block:: python + + def heal(target: GameObject, amount: float) -> None + +Now you know that you are expected to pass a GameObject instance as the first parameter and specify the amount you want to heal as a float value. But what is a GameObject really? + +As we learned from the previous chapter, it's just something that contains components. It may mean anything - anything from a character to a house. You may make a good guess from the method name and assume it would expect a GameObject with a Hitbox attached to it, but nobody will stop you if you pass an actual house as long as it's also a GameObject. + +Also, others may not be as smart as you and may have difficulty guessing the proper type of object to pass as the first parameter without having good documentation. + +But what if we haven't adopted the component approach but just used the plain inheritance model instead? + +.. code-block:: python + + def heal(target: Damageable, amount: float) -> None: + +Now it became immediately apparent what the function expects as its first parameter. If you use an IDE, it will also let you know that the target argument supports damage method, which you can use to implement the function body as target.damage(-amount). Furthermore, it will also warn you if you attempt to pass a non-Damageable type object like a House, all of which can help you maintain your codebase as it grows in size. + +However, there was a good reason why we considered adopting the more dynamic approach before, and we may still want to keep some of its benefits. + +Suppose you want to derive your Crate class directly from Openable type instead of attaching a Door component to it as we did before. Wouldn't it be still nice if you can assign different kinds of doors - like one with an animation, or another with a locking mechanism, and so on - without having to rewrite the Crate class every time? + +A language feature or a design pattern called mixin can provide an answer to this question. + +Mixins And Traits +----------------- + +According to a relevant Wikipedia article, a mixin is "a class that contains methods for use by other classes without having to be the parent class of those other classes". + +Such a class is sometimes called a trait and often named as an adjective like Damageable or Openable to describe a specific aspect or characteristic of the target object. + +The idea is, you can define various aspects of an object as "traits" and "mix them in" as needed. It is a powerful tool that provides a way to add behaviours to an existing class in a compositional manner without erasing the type information as the component pattern does. + +Let's make our Crate class again using the technique: + +.. code-block:: python + + # The same class we saw at the beginning, now acting as a 'trait'. + class Damageable: + def __init__(self): + self.health = 100 + + def damage(self, amount: int) -> None: + self.health = max(0, self.health - amount) + + @property + def destroyed(self) -> bool: + return self.health == 0 + + # Tha same Door class, now renamed as appropriate for a trait + class Openable: + def __init__(self): + self.opened = True + + def open(self) -> None: + self.opened = True + + def close(self) -> None: + self.opened = False + + # Let's assume there is a base class for all items, named as `Item`. + # Now you can "mix" useful traits into Item as follows: + class Crate(Damageable, Openable, Item): + pass + + crate = Crate() + + print(isinstance(crate, Damageable)) # Returns "True" + + crate.damage(50) # Much better than crate.components["hit_box"].damage(50) + crate.open() + +You may have noticed how intuitive the class definition reads now. Even without any comment or having to read the source code, you can immediately see the purpose of the Crate class as it's a "damageable and openable item", indeed. + +Also, because the class is a proper subtype of both Damageable and Openable, an IDE will be able to autocomplete such methods like damage(amount) or open() for you. It also enables you to tighten the type signature when you write an API like def heal(damageable: Damageable, amount: Float) -> None so that an IDE can warn you if you attempt to pass an object with a wrong type by mistake. + +But how can we preserve the dynamic nature of the component model? What if I want to add crates in the game editor and make some of them have a unique animation when they open? + +Of course, you can still benefit from the dynamic nature of using components, well, by using components! In fact, mixins and components are not mutually exclusive concepts since you can write a trait that relies on a component to implement a behaviour. + +.. code-block:: python + + class Door(Component): + def __init__(self): + self.opened = True + + class Openable: + + @property + def door(self) -> Door: + return next(filter(lambda o: isinstance(o, Door), self.components)) + + @property + def opened(self)-> bool: + return self.door.opened + + def open(self) -> None: + self.door.opened = True + + def close(self) -> None: + self.door.opened = False + + class Crate(Openable, GameObject): + pass + +As the trait is now mixed into a GameObject, it can reference its components property from which it can find a suitable component to work with, in this case, a Door. And the fact that the Door class is a component means that you can dynamically assign a specific implementation of it from the game editor without modifying the source code of either Crate or Openable. + +If you want to add an animation to some of the crates, for example, you can write a special subtype of Door like class AnimatedDoor(Door) and attach it to a game object with the Openable trait. As long as the target object has the trait, it wouldn't matter if it's a crate or a gate. And as long as the component derives from Door, it will work perfectly fine with any Openable object, be it an animated door or one that requires a key to open it, for instance. + +Mixins and Components in UPBGE +------------------------------ + +As shown in the previous chapters, the component model and mixins are powerful tools to design your software while maintaining a clean separation of concern between classes responsible for different functionalities. + +To reap the full benefits of these design patterns, however, it is necessary to have a proper programming environment that supports such concepts. + +An older version of C# (before 8.0), for example, didn't allow providing a default implementation of a method defined in an interface, thus severely limiting its usefulness when used as a trait. + +And while most of the game engines enforced either the component model (e.g. private one that keeps them united) or the inheritance model (e.g. Godot) on their users, few, if any, support both of them like UPBGE now does. + +With its recent introduction of the custom game object feature, you can define either static or dynamic (i.e. component-based) traits and mix them into any game object in UPBGE. It provides programmers with a powerful tool to design and organise game-related classes without sacrificing the ability to configure them graphically within UPBGE. + +The example code shown above will work almost verbatim on UPBGE if you simply replace GameObject with KX_GameObject and Component with KX_PythonComponent like this: + +.. code-block:: python + + class Door(KX_PythonComponent): + args = OrderedDict(( + ("Open", True), + )) + + def start(self, args) -> None: + self.opened = args["Open"] + + # A dynamic trait based on component + class Openable: + + @property + def door(self) -> Door: + return next(filter(lambda o: isinstance(o, Door), self.components)) + + @property + def opened(self)-> bool: + return self.door.opened + + def open(self) -> None: + self.door.opened = True + + def close(self) -> None: + self.door.opened = False + + # An example of a static trait + class Damageable: + health: float + + def damage(self, amount: int) -> None: + self.health = max(0, self.health - amount) + + @property + def destroyed(self) -> bool: + return self.health == 0 + + class Crate(Openable, Damageable, KX_GameObject): + args = OrderedDict(( + ("Health", 100), + )) + + def start(self, args) -> None: + self.health = args["Health"] + +Now you can assign different initial health values to each crate in UPBGE or add an animated door to some of them without writing a new class for such cases. Also, when you write scripts, you can directly invoke any API they define without having to look up nested components or losing the valuable type information. + +Those are some of the few unique advantages that UPBGE has over its competitors. diff --git a/source/manual/release/blender_player.rst b/source/manual/release/blender_player.rst deleted file mode 100644 index 460bd819..00000000 --- a/source/manual/release/blender_player.rst +++ /dev/null @@ -1,44 +0,0 @@ - -***************** -Standalone Player -***************** - -The standalone player allows a Blender game to be run without having to load the Blender system. -This allows games to be distributed to other users, without requiring them a detailed knowledge of Blender -(and also without the possibility of unauthorized modification). Note that the Game Engine -*Save as Runtime* is an add-on facility which must be pre-loaded before use. - -The following procedure will give a standalone version of a working game. - -#. :menuselection:`File --> User Preferences --> Add-ons --> Game Engine --> Save As Game Engine Runtime` - enable the checkbox. (You can also *Save User Settings*, - in which case the add-on will always be present whenever Blender is re-loaded). -#. :menuselection:`File --> Export --> Save As Game Engine Runtime` - (give appropriate directory/filename) confirm with *Save as Game Engine Runtime*. - -The game can then be executed by running the appropriate ``.exe`` file. -Note that all appropriate libraries are automatically loaded by the add-on. - -If you are interested in licensing your game, -read `Licensing `__ -for a discussion of the issues involved. - -.. tip:: Exporting... - - If the game is to be exported to other computers, - make a new empty directory for the game runtime and all its ancillary libraries, etc. - Then make sure the **whole** directory is transferred to the target computer. - -Personalize The Game Icon -------------------------- - -This is option is available for Windows only. You can personalize the icon using the option shown -in the figure below. - -.. figure:: /images/Release/standalone_player-personalize01.png - - Personalize game icon - -Here is a small video tutorial showing all the process, from .ico creation to its use in an example game: - -.. youtube:: 6r2749ldNC4 diff --git a/source/manual/release/licensing.rst b/source/manual/release/licensing.rst deleted file mode 100644 index 4c687170..00000000 --- a/source/manual/release/licensing.rst +++ /dev/null @@ -1,34 +0,0 @@ - -************************** -Licensing of Games -************************** - -Blender and the UPBGE/BGE are licensed as GNU GPL, which means that your games -(if they include Blender software) have to comply with that license as well. -This only applies to the software, or the bundle if it has software in it, not -to the artwork you make with Blender. All your Blender creations are your sole property. - -GNU GPL -- also called "Free Software" -- is a license that aims at keeping the licensed -software free, forever. GNU GPL does not allow you to add new restrictions or limitations -on the software you received under that license. That works fine if you want your clients -or your audience to have the same rights as you have (with Blender). - -In summary, the software and source code are bound to the GNU GPL, but the blend-files -(models, textures, sounds) are not. - - -Standalone Games -================ - -In case you save out your game as a single standalone (using addons for this purpose, -for example), the blend-file gets included in the binary (the Blender Player). That requires -the blend-file to be compatible with the GNU GPL license. - -In this case, you could decide to load and run another blend-file game (using the Game Actuator logic brick). -That file then is not part of the binary, so you can apply any license you wish on it. - - -More Information -================ - -More information you can find in the `blender.org FAQ `__. diff --git a/source/manual/release/performance.rst b/source/manual/release/performance.rst deleted file mode 100644 index 6487cf46..00000000 --- a/source/manual/release/performance.rst +++ /dev/null @@ -1,29 +0,0 @@ - -************************** -Performance Considerations -************************** - -When developing games, game engineers, software and hardware developers uses some tools to -fine-tune their games to specific platforms and operating systems, defining a basic usage -scenario whereas the users would have the best possible experience with the game. - -Most of these tools, are software tools available for the specific Game Engines whereas -the games were being developed and will run. - -Blender Game Engine also comes with some visual tools to fine-tune the games being developed, -so the game developers could test the best usage scenario and minimum software and -hardware requirements to run the game. - -In Blender, those tools are available at the *System* and *Display* panel -of *Render* tab in the *Properties editor*. -There are options for specific performance adjusts and measurements, -ways to control the frame rate or the way the contents are rendered in Blender window -(game viewport) while the game runs, -as well as controls for maintaining geometry allocated in graphic cards memory. - -Blender Game Engine rendering system controls: - :ref:`System ` -- - Controls for Scene rendering while the game is running. -Blender Game Engine Performance measurements: - :ref:`Display ` -- - Controls for showing specific data about performance while the game is running. diff --git a/source/manual/release/release_procedure.rst b/source/manual/release/release_procedure.rst deleted file mode 100644 index d5dc22d0..00000000 --- a/source/manual/release/release_procedure.rst +++ /dev/null @@ -1,6 +0,0 @@ - -************************** -Release Procedure -************************** - -TODO \ No newline at end of file diff --git a/source/manual/tools/api_stubs.rst b/source/manual/tools/api_stubs.rst index 08025a0d..7deeaef7 100644 --- a/source/manual/tools/api_stubs.rst +++ b/source/manual/tools/api_stubs.rst @@ -1,43 +1,38 @@ -.. _tools-api-stubs: +.. _tools-api_stubs: -********* +============================== API Stubs -********* +============================== What Are They? -============== +++++++++++++++++++++++++++++++ Python is a dynamically-typed language, but that doesn't mean you can't have such quality-of-life features like auto-completion or type information for APIs, which all modern IDEs provide. -The only reason you can't have them for UPBGE projects is that the relevant modules (namely, `bpy.*` and `bge.*`) are only available inside UPBGE. +The only reason you can't have them for UPBGE projects is that the relevant modules (namely, ``bpy.*`` and ``bge.*``) are only available inside UPBGE. -There are two possible options to deal with this problem. Firstly, you can -`build UPBGE/Blender as a Python module `__, -which would give your IDE the most accurate and up-to-date API information as possible. +There are two possible options to deal with this problem. Firstly, you can `build UPBGE/Blender as a Python module `__, which would give your IDE the most accurate and up-to-date API information as possible. -But it's not always easy to build UPBGE from source, especially if you are not -familiar with the task. In this case, using API stubs could be a good alternative. +But it's not always easy to build UPBGE from source, especially if you are not familiar with the task. In this case, using API stubs could be a good alternative. UPBGE-stubs -=========== +++++++++++++++++++++++++++++++ An utility to generate Python API stubs from documentation files in reStructuredText format called `BPY Stub Generator (bpystubgen) `__ can help us to get the UPBGE python API stubs. The main usage of the program is to create Python API stubs from the documentation generated during the build process of UPBGE so that an IDE can provide autocompletion support and type hints for relevant modules like bpy or bge. -There are already a number of tools created with a similar goal in mind, notably -`fake-bpy-module `__ and -`fake-bge-module `__ which can be a good alternative to this project. +There are already a number of tools created with a similar goal in mind, notably `fake-bpy-module `__ and `fake-bge-module `__ which can be a good alternative to this project. However, ``bpystubgen`` has a few advantages over the others: -* It's very fast - some of those tools may take over an hour to generate the entire stubs for blender. but bpystubgen can do it under a minute (1,593 source documents). -* the generated stub modules preserve most of the source documentation, so you can use them as a manual as well. -* it generates pep-561 compliant stub modules, so it's safe to include them in your runtime module path. -* along with its fast execution speed, the project also provides well-organised api and test suites to make it easier to fix bugs or improve the output quality. +* It's very fast - some of those tools may take over an hour to generate the entire stubs for blender, but *bpystubgen* can do it under a minute (1,593 source documents). +* The generated stub modules preserve most of the source documentation, so you can use them as a manual as well. +* It generates pep-561 compliant stub modules, so it's safe to include them in your runtime module path. +* Along with its fast execution speed, the project also provides well-organised api and test suites to make it easier to fix bugs or improve the output quality. Using UPBGE-stubs -+++++++++++++++++ +++++++++++++++++++++++++++++++ If you just want to use the API stubs, you can install them from PyPI without having to generate them yourself. As for UPBGE, stubs are available for the 0.3 release, which you can install as follows: @@ -45,20 +40,17 @@ If you just want to use the API stubs, you can install them from PyPI without ha pip install upbge-stubs==0.3.* -Once you install it via pip (or any other package manager you may prefer), you can -configure the IDE of your choice as described in the project page -`BPY Stub Generator (bpystubgen) `__. +Once you install it via pip (or any other package manager you may prefer), you can configure the IDE of your choice as described in the project page `BPY Stub Generator (bpystubgen) `__. -After that, you can enjoy nice auto-completion and type information for most of the -UPBGE's Python API. +After that, you can enjoy nice auto-completion and type information for most of the UPBGE's Python API. Examples -++++++++ +++++++++++++++++++++++++++++++ -.. figure:: /images/Tools/tools-examples-01.png +.. figure:: /images/tools/tools-examples_1.png Auto-completion at work in PyCharm -.. figure:: /images/Tools/tools-examples-02.png +.. figure:: /images/tools/tools-examples_2.png Pop-up documentation support in VSCode diff --git a/source/manual/tools/index.rst b/source/manual/tools/index.rst index b6327e9a..d487359f 100644 --- a/source/manual/tools/index.rst +++ b/source/manual/tools/index.rst @@ -1,18 +1,12 @@ .. _tools-index: -+++++ +============================== Tools -+++++ - -For a small project, editing Python scripts using Blender's source editor could be -the most straightforward option to develop a UPBGE game. However, you may find an -external, more dedicated development setup to be more desirable as your project grows -in size and complexity. - -This section introduces several Python-related tools you can use in conjunction with -your project and explains how to prepare them for UPBGE development. +============================== +For a small project, editing Python scripts using Blender's source editor could be the most straightforward option to develop a UPBGE game. However, you may find an external, more dedicated development setup to be more desirable as your project grows in size and complexity. +This section introduces several Python-related tools you can use in conjunction with your project and explains how to prepare them for UPBGE development. .. toctree:: :maxdepth: 2 diff --git a/source/manual/tutorials/getting_started/3D_basic_concepts.rst b/source/manual/tutorials/getting_started/3D_basic_concepts.rst index 9e5da784..dad4b214 100644 --- a/source/manual/tutorials/getting_started/3D_basic_concepts.rst +++ b/source/manual/tutorials/getting_started/3D_basic_concepts.rst @@ -14,7 +14,7 @@ The knowledge in this section is universal and applies to all other 3D applicati Coordinate System ------------------------------ -.. figure:: /images/Tutorials/getting_started/01-coordinate_system.png +.. figure:: /images/tutorials/getting_started/01-coordinate_system.png :figwidth: 40% Coordinate system @@ -26,17 +26,17 @@ Points, Edges, Triangles, and Meshes Although we can define a position in space using the XYZ coordinates, a single *point* (or a :term:`vertex`, as it's more commonly known in computer graphics) is not terribly useful; after all, you can't see a dot that is infinitesimally small. But you can join this vertex with another vertex to form a *line* (also known as an :term:`edge`). An *edge* by itself still wouldn't be very visible, so you create another vertex and join all three vertices together with lines and fill in the middle. Suddenly, something far more interesting is created - a triangle (also known as a :term:`face`)! By linking multiple faces together, you can create any shape, the result of which is called a :term:`mesh` or *model*. Figure below shows how a *mesh* can be broken down into *faces*, then *edges*, and ultimately, into *vertices*. -.. figure:: /images/Tutorials/getting_started/02-teapot_cube.jpg +.. figure:: /images/tutorials/getting_started/02-teapot_cube.jpg :figwidth: 80% Teapot, cube, face, edge and vertex Why is the :term:`triangle` so important? Turns out, modern computer graphics use the *triangle* as the basic building block for almost any shape. A rectangular *plane* (also known as a *quadrangle*, or more commonly a *quad*) is simply two triangles arranged side by side. A cube is simply six squares put together. Even a *sphere* is just made of tiny facelets arranged into a ball shape. -.. figure:: /images/Tutorials/getting_started/03-cylinder_cap.jpg +.. figure:: /images/tutorials/getting_started/03-cylinder_cap.jpg :width: 70% - The cylinder cap can be made up of triangles, quads, or an n-gon + The cylinder cap can be made up of triangles, quads, or a n-gon In Blender, a mesh can be made from a combination of triangles, quads, or n-gons. The benefit of n-gons is their ability to retain a clean topology while modeling. Without n-gons, certain areas of a model (such as a window on a wall) would require a higher number of triangles or quads to approximate, as shown below. While n-gons make modeling easier in some cases, Blender still converts them to triangles when you start the game. @@ -44,12 +44,12 @@ The process of creating a mesh by rearranging vertices, edges, and faces is call It is worth noting that unlike the real world, polygonal models do not have volumes. They are just a shell made of interconnected faces that take the shape of the object, but the inside of the object is always "hollow." -.. figure:: /images/Tutorials/getting_started/04-normals.jpg +.. figure:: /images/tutorials/getting_started/04-normals.jpg :width: 70% Surface normals are displayed as cyan lines protruding from the faces -Another concept that a modeler will likely encounter is surface normals, or "normals" for short. Normal is a property of each face that indicates the direction a polygon is facing. Because normals are used for shading computation of the surface, ideally all the normals for a mesh should be pointed "outward". Wrongly oriented normals can cause the mesh to show up as black or invisible. Fortunately, there is a Make Normals Consistent function in Blender that can usually resolve the issue. Figure 1.8 shows how normals are presented in Blender. +Another concept that a modeler will likely encounter is surface normals, or "normals" for short. Normal is a property of each face that indicates the direction a polygon is facing. Because normals are used for shading computation of the surface, ideally all the normals for a mesh should be pointed "outward". Wrongly oriented normals can cause the mesh to show up as black or invisible. Fortunately, there is a Make Normals Consistent function in Blender that can usually resolve the issue. Figure above shows how normals are presented in Blender. .. topic:: **Beyond Polygons** @@ -60,13 +60,13 @@ Basic Transforms The three basic transforms that you should be familiar with are: -* **Translation:** The moving of an object in any direction, without rotating it. -* **Scaling:** The resizing of an object around a point. -* **Rotation:** The rotating of an object around a point. +- **Translation:** The moving of an object in any direction, without rotating it. +- **Scaling:** The resizing of an object around a point. +- **Rotation:** The rotating of an object around a point. These three are the most common manipulations you will encounter. They are illustrated below. -.. figure:: /images/Tutorials/getting_started/05-translation.jpg +.. figure:: /images/tutorials/getting_started/05-translation.jpg :figwidth: 95% Translation, scaling, and rotation @@ -76,16 +76,16 @@ Materials and Textures Using polygons, you can define the shape of a mesh. To alter the color and appearance of it, you need to apply materials to the object. Material controls the color, shininess, bumpiness, and even transparency of the object. These variables ultimately all serve to add details to the object. -Often, changing the color is not enough to make a surface look realistic. This is where textures come in. Texturing is a common technique used to add color and detail to a mesh by wrapping the mesh with an image, like a decal. Imagine a toy globe: if you carefully peel off the paper map that is glued onto the plastic ball and lay it out flat on the table, that map would be the texture, and the plastic ball would be the mesh. The projection of the 2D image onto a 3D mesh is called **texture mapping**. Texture mapping can be an automatic process, using one of the predefined projections, or a manual process, which uses a UV layout to map the 2D image onto the 3D mesh. Figure 1.10 illustrates how an image is mapped onto a model. +Often, changing the color is not enough to make a surface look realistic. This is where textures come in. Texturing is a common technique used to add color and detail to a mesh by wrapping the mesh with an image, like a decal. Imagine a toy globe: if you carefully peel off the paper map that is glued onto the plastic ball and lay it out flat on the table, that map would be the texture, and the plastic ball would be the mesh. The projection of the 2D image onto a 3D mesh is called **texture mapping**. Texture mapping can be an automatic process, using one of the predefined projections, or a manual process, which uses a UV layout to map the 2D image onto the 3D mesh. Figure below illustrates how an image is mapped onto a model. -.. figure:: /images/Tutorials/getting_started/06-mesh_with_texture.jpg +.. figure:: /images/tutorials/getting_started/06-mesh_with_texture.jpg :figwidth: 86% Meshes with texture applied Traditionally, a texture changes the color of a surface. But that's not all it can do: textures can also be used to alter other properties of the surface such as its transparency, reflectivity, and even bumpiness to create the illusion of a much more detailed surface. -.. figure:: /images/Tutorials/getting_started/07-diffuse_map.jpg +.. figure:: /images/tutorials/getting_started/07-diffuse_map.jpg :figwidth: 85% Diffuse map, normal map, and specular map @@ -99,19 +99,19 @@ Lights Everything you see is the result of light hitting your eyes-without lights, the world would be pitch black. Likewise, light is just as important in a virtual world. With light comes shadow as well. Shadow might not be something that you think about every day, but the interplay of shadow and light makes a huge difference in how the scene is presented. -.. figure:: /images/Tutorials/getting_started/08-lamp_sun.png +.. figure:: /images/tutorials/getting_started/08-lights.png :width: 70% - Lamp, Sun, Spot lamp, Hemi lamp, and Area lamp + Point, Sun, Spot and Area light -In most 3D applications, there are several different types of light available to the artist; each type has its advantages and disadvantages. For example, a Spot lamp approximates a lamp with a conical influence; a sun lamp approximates a light source from infinitely far away. Lamps in Blender are treated like regular objects: they can be positioned and rotated just like any other object. Figure 1.12 shows how different lamps look in Blender. +In most 3D applications, there are several different types of light available to the artist; each type has its advantages and disadvantages. For example, a spot lamp approximates a lamp with a conical influence; a sun lamp approximates a light source from infinitely far away. Lamps in Blender are treated like regular objects: they can be positioned and rotated just like any other object. Figure above shows how different lamps look in Blender. Think of lighting as more than something that makes your scene visible. Good lighting can enhance the purpose of the scene by highlighting details while hiding irrelevant areas in shadow. Skillful placement of lighting also adds drama and realism to the scene, making an otherwise boring scene look visually exciting. Camera ------------------------------ -.. figure:: /images/Tutorials/getting_started/09-camera_object.png +.. figure:: /images/tutorials/getting_started/09-camera_object.png :figwidth: 50% Camera object @@ -120,8 +120,8 @@ When you are creating a 3D scene, you are looking at the virtual world from an o A camera is also treated as a regular object in Blender, so you can manipulate its location and orientation just as you can with any other object. - -.. topic:: **Drawing and Composition for Visual Storytellers** +.. topic:: + **Drawing and Composition for Visual Storytellers** Speaking of lights and cameras, this is the part where we point out the wonderful book by Marcos Mateu-Mestre called Framed Ink. The book uses tons of beautiful drawings to illustrate the many key principles in visual storytelling. @@ -130,35 +130,35 @@ Animation In this context, *animation* refers to the technique of making things change over time. For example, animation can involve moving an object, deforming it, or changing its color. To set up an animation, you create "keyframes," which are snapshots in time that store specific values pertaining to the animation. The software can then automatically interpolate in between those values to create a smooth transition. The image below shows Blender's Dopesheet Editor. The Dopesheet allows you to see the various properties that change during an animation: the horizontal axis represents time; the vertical axis shows the various properties, such as location or rotation that are keyframed. -.. figure:: /images/Tutorials/getting_started/10-dopesheet.png +.. figure:: /images/tutorials/getting_started/10-dopesheet.png :figwidth: 90% Dopesheet Editor keyframes The easiest way to animate is to alter the location, rotation, and scaling of an object over time. For example, by altering these variables, you can realistically animate the movement of a bouncing ball. Keep in mind that the curves represent the value of the channels (in this case xyz location) of the ball, not the actual motion path of the ball itself. -.. figure:: /images/Tutorials/getting_started/11-bounce_animation.png +.. figure:: /images/tutorials/getting_started/11-bounce_animation.png :width: 80% Bouncing ball animation To animate something more complicated, such as a human, it's not enough to just move, rotate, and scale the object as a whole. This is where armatures come in. Armatures are skeletons that can be "inserted" into a model to control the model's deformation. Using this system, you can create complex yet organic-looking animations. -.. figure:: /images/Tutorials/getting_started/12-armature.png +.. figure:: /images/tutorials/getting_started/12-armature.png :width: 40% Armature animation A third way to animate is using shape keys. Shape keys are snapshots of the mesh in different shapes. They are often used to animate nuanced changes that cannot be otherwise easily animated with armatures. -.. figure:: /images/Tutorials/getting_started/13-shape_keys.jpg +.. figure:: /images/tutorials/getting_started/13-shape_keys.jpg :width: 70% Shape keys animation Finally, keep in mind that making objects move doesn't always have to be a manual process. You can also make objects move by using the physics engine. -.. figure:: /images/Tutorials/getting_started/14-physics_motion.jpg +.. figure:: /images/tutorials/getting_started/14-physics_motion.jpg :width: 70% Procedural physics-based motion diff --git a/source/manual/tutorials/getting_started/blender_basic.rst b/source/manual/tutorials/getting_started/blender_basic.rst index d0a5a4b2..ab776d37 100644 --- a/source/manual/tutorials/getting_started/blender_basic.rst +++ b/source/manual/tutorials/getting_started/blender_basic.rst @@ -1,4 +1,4 @@ -.. _blender_upbge_basics: +.. _gs-blender_upbge_basics: ============================== Blender/UPBGE Basics @@ -7,74 +7,85 @@ Blender/UPBGE Basics Blender/UPBGE ++++++++++++++++++++++++++++++ -When you start Blender/UPBGE, you will be greeted with the splash screen. Although you can customize all aspect of Blender/UPBGE, in this manual, we will assume you are using the default Blender/UPBGE settings and shortcuts. +When you start Blender/UPBGE, you will be greeted with the splash screen. Although you can customize all aspect of Blender/UPBGE, in this manual we will assume you are using the default Blender/UPBGE settings and shortcuts. -Clicking anywhere else to dismiss the splash screen, you are presented with a default workspace: +Clicking anywhere else to dismiss the splash screen, you are presented with a default workspace. -.. figure:: /images/Tutorials/getting_started/19-default_workspace.png +.. _gs-3d_viewport: + +.. figure:: /images/tutorials/getting_started/19-default_workspace.png :figwidth: 95% - Blender/UPBGE default workspace + Blender/UPBGE workspace Blender/UPBGE window is divided into Editors. Each Editor region can be resized, moved, and changed to display a specific set of content. For now, let's focus on the default setup. Main Menu ++++++++++++++++++++++++++++++ -At the top of the screen is the main menu, which offers basic functionalities such as Open, Save, and Help. Furthermore, the main menu controls the view for the rest of the Blender/UPBGE window. The Render Engine option in the middle of the menu controls how the interface is configured. +At the top of the screen is the main menu, which offers basic functionalities such as File, Edit, Render and Help. -.. figure:: /images/Tutorials/getting_started/20-game_engine.png +.. figure:: /images/tutorials/getting_started/20-game_engine.png :figwidth: 40% :align: right Selecting the Game Engine -By default, EEVEE is selected. This engine enables certain features that are not visible normally, and it also hides features that are not available in the Blender. +By default, EEVEE render engine is selected. This engine enables certain features that are not accessible normally, and also disables features that are not available in UPBGE. 3D Viewport ++++++++++++++++++++++++++++++ -Occupying the majority of the screen is a 3D Viewport. Here you can see the 3D world you created and test the game. For now, feel free to explore the 3D Viewport by holding down your middle mouse button over the 3D Viewport and dragging the mouse; the view should rotate with the mouse movement. (Mac users can use the two-finger rotate gesture on the trackpad) The default scene contains three objects: a cube, a camera, and a light. To select one of the objects, right-click on it. The selected object is highlighted in yellow. +Occupying the majority of the screen is a 3D Viewport. Here you can see the 3D world you created and test the game. For now, feel free to explore the 3D Viewport by holding down your middle mouse button over the 3D Viewport and dragging the mouse; the view should rotate with the mouse movement. (Mac users can use the two-finger rotate gesture on the trackpad.) The default scene contains three objects: an immortal Cube, a camera, and a light. To select one of the objects, click on it. -.. note:: **Basic Navigation Controls** +.. note:: + Basic Navigation Controls - Press and hold the middle mouse button to rotate the 3D view. Scroll the mouse wheel to zoom in the 3D view. Right-click to select a 3D object. Selected objects are highlighted in yellow. + There are more than one way to navigate in UPBGE. Hold :kbd:`MMB` to rotate the 3D view, scroll the :kbd:`Wheel` to zoom in/out the 3D view. :kbd:`LMB` to select a 3D object. Selected objects are highlighted in yellow. :kbd:`RMB` to open *context menu*. Another way is :kbd:`Ctrl-MMB > move mouse` to zoom, :kbd:`Shift-MMB > move mouse` to pan. Not much new here, those are standard application navigation actions. -.. figure:: /images/Tutorials/getting_started/21-numpad.png +.. figure:: /images/tutorials/getting_started/21-numpad.png :figwidth: 40% + :align: right - Numberpad keyboard layout + Numpad with default assigned views -Another common setup for the 3D Viewport is to split the view into four quadrants: top view, side view, front view, and a perspective view. You can turn on Quad view by pressing Ctrl+Alt+Q with the mouse over the 3D Viewport (see Figure 1.22). Press the same key combination to go back to the single view. +Another common setup for the 3D Viewport is to split the view into four quadrants: top (:kbd:`Numpad 7`), front (:kbd:`Numpad 1`), side (:kbd:`Numpad 3`) and a perspective/orthographic (:kbd:`Numpad 5`) view. Turn on Quad view by :kbd:`Ctrl-Alt-Q` with the mouse over the 3D Viewport. Press the same key combination to go back to the single view. To quickly snap to one of the predetermined views (side, top, front, and so on), the number pad is the way to go. -Outliner +.. _gs-outliner_editor: + +Outliner Editor ++++++++++++++++++++++++++++++ -.. figure:: /images/Tutorials/getting_started/22-editor_outliner.png +.. figure:: /images/tutorials/getting_started/22-editor_outliner.png :figwidth: 50% Outliner editor To the right of the screen are two editors. The top portion is the Outliner, which contains a listing of all the data in the current Blender file. For a large project, the Outliner is an indispensable tool for organizing your scene. For now, you can safely ignore it. +.. _gs-properties_editor: + Properties Editor ++++++++++++++++++++++++++++++ -.. figure:: /images/Tutorials/getting_started/23-editor_properties.png +.. figure:: /images/tutorials/getting_started/23-editor_properties.png :figwidth: 50% + :align: right Properties editor -Under the Outliner on the right, you have the Properties Editor. Here you can access global settings for the file, as well as settings for individual objects. This is one of the most frequently used panels in Blender, after the 3D view perhaps. The *Properties Editor* is context sensitive, which means it will automatically display different content, depending on the object that is active. Take a closer look at the row of icons at the top of the *Properties Editor*, as shown in Figure 1.24. These tabs organize the properties into groups, with the more general settings on the left-most tab, and the more specific settings on the right. +Under the Outliner on the right, you have the Properties. Here you can access global settings for the file, as well as settings for individual objects. This is one of the most frequently used panels in Blender, after the 3D view perhaps. The *Properties Editor* is context sensitive, which means it will automatically display different content, depending on the object that is active. Take a closer look at the icons on the left side of the *Properties*, as shown in figure. These tabs organize the properties into groups, with the more general settings on top, and more specific settings at the bottom. Mouse-over the tab, the popup will tell the name of it (:menuselection:`Edit > Preferences > Interface > Display > User Tooltips` to enable the popup). + +.. _gs-timeline_editor: -Timeline +Timeline Editor ++++++++++++++++++++++++++++++ -At the very bottom of the screen is a timeline window, which will be useful when you start making animations. +At the very bottom of the screen is a *Timeline* window, which will be useful when you start making animations. -.. figure:: /images/Tutorials/getting_started/24-editor_timeline.png +.. figure:: /images/tutorials/getting_started/24-editor_timeline.png :figwidth: 100% Timeline @@ -82,140 +93,148 @@ At the very bottom of the screen is a timeline window, which will be useful when Workspace Customization ++++++++++++++++++++++++++++++ -The default screen, as described previously, is set up for general use. At some point, it becomes necessary to change the screen layout to accomplish other tasks. To select a different layout, use the Screens layout drop-down menu from the main menu. - -Apart from the predefined screen layouts, you can customize the screen layout however you like. You can either split an existing editor into two or merge two adjacent editors together. +The default screen, as described previously, is set up for general use. At some point, it becomes necessary to change the screen layout to accomplish other tasks. To select a different workspace, click the workspace tabs at the top. -.. note:: **Editor, Region, and Area** +Apart from the predefined workspaces, you can customize each one however you like. You can either split an existing editor into two or merge two adjacent editors together. - A region within the Blender/UPBGE windows is called an *editor*. An editor displays a specific set of content and tools. Common areas include: *3D View*, *Properties Editor*, *UV/Image Editor*, and *Logic Brick Editor*. +.. note:: + Editor, Region, and Area -Figure below shows one area split into two. You can do it by dragging the top corner of the area to the right or bottom: + A region within the Blender/UPBGE window is called an *editor*. An editor displays a specific set of content and tools. Common areas include: *3D Viewport*, *Properties*, *UV/Image Editor* and more. Specific to UPBGE are *Logic Brick Editor*, *Logic Brick Node View* and *Logic Node Editor*. -.. figure:: /images/Tutorials/getting_started/25-area_split.png +.. figure:: /images/tutorials/getting_started/25-area_split.png :figwidth: 60% + :align: right + + Area/window splitting - Area splitting +Figure shows one area split into two. You can do it by dragging the top corner of the area to the right or bottom. -To merge two adjacent areas into one is exactly the same as shown in Figure, but it is done in reverse order. Optionally, you can click with the right mouse button in the edge of the area you want to split or join, and select the option in the Area Options pop-up menu. +To merge two adjacent areas into one is exactly the same as shown in figure, but it is done in reverse order. Optionally, :kbd:`RMB` on the edge between area(s) you want to split or join, and select the option in the :menuselection:`Area Options` pop-up menu. -.. figure:: /images/Tutorials/getting_started/26-editor_selection.png +.. figure:: /images/tutorials/getting_started/26-editor_selection.png :figwidth: 90% Editor selection -Not only can you change the size and layout of the editor, but the type of editor can also be changed. As you can see in Figure 1.27, the left-most icon in the header can be used to change the editor type. +Not only can you change the size and layout of the editor, but the type of editor can also be changed. As you can see in above figure, the left-most icon in the header can be used to change the editor type. -.. figure:: /images/Tutorials/getting_started/27-dopsheet_image_brick.png +.. figure:: /images/tutorials/getting_started/27-dopsheet_image_brick.png :figwidth: 95% Dopesheet, Image Editor, and Logic Brick Editor -Almost everything a studio needs to create the game is integrated into a single interface: you can create the game, test the game, and play the game all from the same program. This means that, as an artist, you can create a game in the shortest time possible, without having to worry about importing and exporting files between different applications. As a programmer, you won't have to switch back and forth between different software just to test your code. Figure 1.28 shows some screenshots of different editors that you will be using throughout the manual. +Almost everything a studio needs to create the game is integrated into a single interface: you can create the game, test the game, and play the game all from the same app. This means that, as an artist, you can create a game in the shortest time possible, without having to worry about importing and exporting files between different applications. As a programmer, you won't have to switch back and forth between different software just to test your code. Figure above shows some screenshots of different editors that you will be using throughout the manual. More on the 3D View ++++++++++++++++++++++++++++++ -The 3D view is where you will spend most of your time, so let's take a look at it in a bit more detail. You've already learned a few ways to navigate around the scene earlier in this chapter, using both the mouse and the keyboard. +3D view is where you will spend most of your time, so let's take a look at it in a bit more detail. You've already learned a few ways to navigate around the scene earlier in this chapter, using both mouse and the keyboard. + +.. _gs-viewport_shading: Viewport Shading Modes -++++++++++++++++++++++++++++++ +------------------------------ -.. figure:: /images/Tutorials/getting_started/28-viewport_shading.png - :figwidth: 55% +.. figure:: /images/tutorials/getting_started/28-viewport_shading.png + :width: 95% + :align: right - Viewport Drawing Modes + Viewport Shading Modes -Let's look at the four different Viewport Shading modes available in the 3D view. They are used to change the way the scene is displayed onscreen. The four modes are: +Four different Viewport Shading modes available are used to change the way the scene is displayed onscreen. Those are: -- **Bounding Box** : Represents all objects as a wireframe boundary. Useful for when the scene gets really complex. +- **Toggle X-Ray** - enables X-ray of all objects; useful when the scene gets really complex; not a Viewport mode per se, rather an option. -- **Wireframe** : Draws all objects as wireframe, which allows you to see through objects. +- **Wireframe** - draws all objects as wireframe, which allows you to see through objects. -- **Solid** : Draws all objects as solid faces, which is commonly used when modeling. +- **Solid** - draws all objects as solid faces, which is commonly used when modeling. -- **Textured** : Draws all objects as solid faces, also with texture and accurate lighting. This is useful for previewing the scene. +- **Material Preview** - draws all objects as solid faces, with texture and accurate lighting. This is useful for previewing the scene. +- **Rendered** - draws all objects as they will be rendered, also with texture and accurate lighting. This is how final rendered scene will look like. -The two most commonly used Shading modes are Wireframe and Solid. Therefore, they are assigned to a keyboard toggle for easy access. Press the ``Z`` key to toggle between Wireframe and Solid View modes. Additionally, you can Press ``Alt+Z`` to toggle between Solid and Textured view modes. +Two most commonly used Shading modes are Solid and Material Preview. Press the :kbd:`Z > number/hotkey` (underlined) to pop-up a circular selector and select desired mode. :kbd:`Alt-Z` to toggle X-ray on and off - only available in Wireframe and Solid Shading mode. -.. note:: **Standing Out** +.. note:: + Standing Out - Individual objects can also override the Viewport Shading mode via a setting under the :menuselection:`Properties Editor > Object > Viewport Display > Display As`. + Individual objects can override the Viewport Shading mode via :menuselection:`Properties > Object > Viewport Display > Display As`. Editing Modes -++++++++++++++++++++++++++++++ +------------------------------ Far to the left of the Shading mode selector is the Editing Mode selector. -- **Object Mode** : The default mode, which allows the manipulation of objects in the scene as a whole. From this mode, you can select any of the objects in the scene, and move, rotate, and scale them. In fact, almost everything apart from modeling can be done from Object mode. +- **Object Mode** - the default mode, which allows the manipulation of objects in the scene as a whole. From this mode, you can select any object in the scene, then move, rotate and scale it. In fact, almost everything apart from modeling can be done from Object mode. -- **Edit Mode**: This mode can be seen as the counterpart to Object mode. It allows you to edit the underlying geometry of the object. If you are modeling, you'll probably want to be in Edit mode. For this reason, Edit mode is not available when a non-editable object is selected (for example, a camera or light). +- **Edit Mode** - this mode can be seen as the counterpart to Object mode. It allows you to edit the underlying geometry of the object. If you are modeling, you'll probably want to be in Edit mode, except if you are sculpting. For this reason, Edit mode is not available when a non-editable object is selected (for example, a camera or light). To switch between Object mode and Edit mode, press the :kbd:`Tab` key. In addition to the two editing modes we just discussed, there are a few other modes that are less commonly used. -- **Sculpt Mode** : Only available for Mesh objects. Allows modifications to the mesh as if it were clay. +- **Sculpt Mode** - only available for Mesh objects. Allows modeling the mesh as if it were clay. -- **Vertex** , **Weight,** and **Texture Paint Mode** : Only available for Mesh objects. These modes allow the assignment of color or weight to the mesh. +- **Vertex**, **Weight** and **Texture Paint Mode** - only available for Mesh objects. These modes allow the assignment of color or weight to the mesh. -- **Pose Mode** : Is used to animate bones in an armature. Only visible when Object has bones attached. +- **Pose Mode** - is used to animate bones in an armature. Only visible when Object has bones attached. -Edit mode and Object mode are by far the most commonly used editing modes, so we will refrain from diving too deeply into the other modes for now. +Edit and Object mode are by far the most commonly used editing modes, so we will refrain from diving too deeply into the other modes for now. Keyboard and Mouse -++++++++++++++++++++++++++++++ +------------------------------ -The joke is that to move an object in Blender, you have to press the ``G`` key, which stands for *movinG*. This gag stems from the fact that to a beginner, many of the shortcuts in Blender/UPBGE seem counterintuitive. However, there is a very good reason why :kbd:`G` is preferred over :kbd:`M`. In this case, the :kbd:`G` key can be easily accessed on the keyboard by the left hand while the right hand is on the mouse. Also, officially, G stands for Grab. +The joke is that to move an object in Blender, you have to press the :kbd:`G` key, which stands for *movinG*. This gag stems from the fact that to a beginner, many of the shortcuts in Blender/UPBGE seem counter-intuitive. However, there is a very good reason why :kbd:`G` is preferred over :kbd:`M` - it can be easily accessed on the keyboard by the left hand while the right hand is on the mouse. Also, officially, G stands for *Grab*. -.. note:: **Think Different** +.. note:: + Think Different - By default, the Mac keyboard uses Command instead of Control as the default modifier key. So whenever you see :kbd:`Ctrl-Something`, mentally map it to :kbd:`Cmd` if you are using a Jobsian product. + By default, Mac keyboard uses Command instead of Control as the default modifier key. So whenever you see :kbd:`Ctrl-Something`, mentally map it to :kbd:`Cmd` if you are using a Jobsian product. Additionally, Blender/UPBGE has good support for multi-touch gestures on OS X. You can pinch to zoom, rotate to orbit around, and pan around. -Let's start with some shortcuts that work the way you would expect: +Shortcuts that work the way you would expect: -* :kbd:`Ctrl-S`: save file; -* :kbd:`Ctrl-O`: open file; -* :kbd:`Ctrl-N`: new file; -* :kbd:`Ctrl-Z`: undo; -* :kbd:`Ctrl-Shift-Z`: redo; -* :kbd:`Ctrl-Q`: close(quit) application. +- :kbd:`Ctrl-S` - save file; +- :kbd:`Ctrl-O` - open file; +- :kbd:`Ctrl-N` - new file; +- :kbd:`Ctrl-Z` - undo; +- :kbd:`Ctrl-Shift-Z` - redo; +- :kbd:`Ctrl-Q` - close (quit) application. -The above shortcuts work anywhere within Blender: they are effectively global. Unfortunately, the familiarity ends here. +Those shortcuts work anywhere within Blender: they are effectively global. Unfortunately, the familiarity ends here. -To manipulate an object in the 3D view, generally you have to select it at first: +To manipulate an object in the 3D view, generally you have to select it first: -- :kbd:`RMB`: select object; -- :kbd:`Shift-RMB`: extend selection to multiple objects; -- :kbd:`A``: select all. +- :kbd:`LMB` - select object; +- :kbd:`Shift-LMB` - extend selection to multiple objects; +- :kbd:`A`` - select all; +- :kbd:`Shift-A` - deselect all. -All of the actions above are "reversible." If something is already selected, right-clicking on it will deselect it. If all the objects are already selected, pressing :kbd:`A` will deselect all. +All actions above are "reversible". If something is already selected, :kbd:`LMB` on it will deselect it. If all the objects are already selected, double-tapping :kbd:`A` will deselect all. -Once an object is selected, you can start manipulating it. The keyboard shortcuts below correspond to the three most basic transforms: +Once an object is selected, you can manipulate it. The keyboard shortcuts below correspond to the three most basic transforms: -- :kbd:`G`: start grabbing; -- :kbd:`S`: start scaling; -- :kbd:`R`: start rotating; -- :kbd:`Move mouse`: carry out transform action; -- :kbd:`LMB`: confirm transformation; -- :kbd:`Enter``: confirm transformation. +- :kbd:`G` - start grabbing; +- :kbd:`S` - start scaling; +- :kbd:`R` - start rotating; +- :kbd:`Move mouse` - carry out transform action; +- :kbd:`LMB` - confirm transformation; +- :kbd:`Enter` - confirm transformation. -Pressing one of the keys will start the transformation, and then you can move your mouse to control the degree of the effect. To finalize the transformation, left-click the mouse or press Enter. +Pressing one of the keys will start the transformation, and then you can move a mouse to transform/move the object. To finalize the transformation, :kbd:`LMB` or :kbd:`Enter`. Search -++++++++++++++++++++++++++++++ +------------------------------ -.. figure:: /images/Tutorials/getting_started/29-search_pupup.png +.. figure:: /images/tutorials/getting_started/29-search_pupup.png :figwidth: 60% + :align: right - The F3 Search Box - -The final tip that you will learn is the search functionality in Blender. If you are unable to recall how to invoke a certain operation, whether through a button or a keyboard shortcut, a quick way to find it is by using the search functionality. Press :kbd:`F3` key and start typing in what you are looking for, and the result should appear. + F3 Search Box -A word of caution, though: the current implementation of the search is not very context-aware, so sometimes operations that are not permitted in the active context might show up. +The final tip that you will learn is the search functionality. If you are unable to recall how to invoke a certain operation, whether through a button or a keyboard shortcut, a quick way to find it is by using the search functionality. Press :kbd:`F3` key and start typing in what you are looking for, and the result should appear. Blender/UPBGE Philosophy ++++++++++++++++++++++++++++++ @@ -225,90 +244,92 @@ Blender/UPBGE is designed with certain philosophies in mind. Understanding these Let the brainwashing begin! Interface -++++++++++++++++++++++++++++++ +------------------------------ Because Blender was originally created as an in-house software, its interface is designed to maximize speed and efficiency for users who have mastered it. Since Blender 2.5, a lot of work has been done to make the interface more user-friendly. That said, Blender is probably unlike any other program you've used before, including other kinds of 3D software. Luckily, the Blender interface is very consistent within the application. This means that once you learn to do something, you'll be able to use it in another part of the program. Keyboard -++++++++++++++++++++++++++++++ +------------------------------ Because of the large number of commands Blender is capable of performing, invoking a function through a quick tap on the keyboard is generally faster than using the mouse to find the menu entry. As you follow through the rest of this section, pay special attention to the shortcut keys that are used, because Blender is designed to let you work fast once you learn the shortcuts. -.. figure:: /images/Tutorials/getting_started/30-3d_navigation.png +.. figure:: /images/tutorials/getting_started/30-3d_navigation.png :figwidth: 30% :align: right - Side N-panel > View tab > 3D Navigation + N-panel > View > 3D Navigation -Blender's keyboard shortcuts are optimized for a full-sized English QWERTY keyboard. The number pad (which, unfortunately, is not present on many laptops) is used to quickly navigate around the 3D scene. Laptop users usually have to press extra keys on their keyboard (such as the :kbd:`Fn` key or a toggle) in order to simulate a number pad key. As a solution, go to :menuselection:`Edit > Preferences > Input > Keyboard` tab and enable :menuselection:`Emulate Numpad` option to use main 1 to 0 keys instead of Numpad keys. +Blender's keyboard shortcuts are optimized for a full-sized English QWERTY keyboard. The number pad (which, unfortunately, is not present on many laptops) is used to quickly navigate around the 3D scene. Laptop users usually have to press extra keys on their keyboard (such as the :kbd:`Fn` or a toggle) in order to simulate a number pad key. As a solution, go to :menuselection:`Edit > Preferences > Input > Keyboard` tab and enable :menuselection:`Emulate Numpad` option to use main 1 to 0 keys instead of Numpad keys. -Alternatively, Blender also has an add-on called *3D Navigation* that provides an easier way to navigate around the world for people without a number pad. To enable the 3D navigation plug-in, check :menuselection:`Edit > Preferences > Add-Ons > 3D Views: 3D Navigation` checkbox. Then you can switch views quickly from the 3D view's Toolshelf. +Alternatively, Blender also has an add-on called *3D Navigation* that provides an easier way to navigate around the world for people without a number pad. To enable the 3D navigation plug-in, enable :menuselection:`Edit > Preferences > Add-Ons > 3D Views: 3D Navigation` add-on. Then you can switch views quickly from the 3D view's Toolshelf. Mouse -++++++++++++++++++++++++++++++ +------------------------------ Blender is designed for a three-button mouse: a mouse with two buttons and a scroll wheel. Although there is an option to emulate the middle-mouse button (when you click on the scroll wheel), this book will assume that you are working with a three-button mouse for convenience. -.. note:: **How to Emulate a Three-Button Mouse** +.. note:: + How to Emulate a Three-Button Mouse - If you don't have a three-button mouse, you can use the :kbd:`Alt+LMB` combination to emulate the middle mouse button. To enable this feature, go to :menuselection:`Edit > Preferences > Input > Mouse` and turn on :menuselection:`Emulate 3 Button Mouse`. + If you don't have a three-button mouse, you can use the :kbd:`Alt-LMB` combination to emulate the middle mouse button. To enable this feature, go to :menuselection:`Edit > Preferences > Input > Mouse` and turn on :menuselection:`Emulate 3 Button Mouse`. On some Linux distros, it is possible to press :kbd:`LMB` & :kbd:`RMB` at the same time to emulate :kbd:`MMB` press. Context -++++++++++++++++++++++++++++++ +------------------------------ -In Blender, the actions you can perform at any given time are limited to the current state of Blender, also known collectively as the " context." For example, certain operations can only be invoked when you have an object selected; the Property Editors change, depending on which object is selected; the effect of the keyboard shortcuts even changes, depending on where your mouse is positioned. This context-sensitive nature lets you focus on the task at hand by only providing you with options that makes sense at the time. This is Blender's way of preventing the interface from getting too cluttered. +In Blender, the actions you can perform at any given time are limited to the current state of Blender, also known collectively as the "context". For example, certain operations can only be invoked when you have an object selected; the Property Editors change, depending on which object is selected; the effect of the keyboard shortcuts even changes, depending on where your mouse is positioned. This context-sensitive nature lets you focus on the task at hand by only providing you with options that makes sense at the time. This is Blender's way of preventing the interface from getting too cluttered. The "context" usually refers to one or a combination of the following: -- **Active rendering engine:** Blender Render, Blender Games, and Cycles Render are the default three. +- **Active rendering engine** - EEVEE and Workbench are available. -- **Active editor:** The active editor is defined as the window subdivision that the mouse cursor is hovering over. Shortcut keys often have different effects, depending on which editor the mouse is over. +- **Active editor** - is defined as the window subdivision that the mouse cursor is hovering over. Shortcut keys often have different effects, depending on which editor the mouse is over. -- **Active object:** The active object is defined as the object that is most recently selected. +- **Active object** - is defined as the object that is most recently selected. -- **Selected object:** All the objects that have been selected (highlighted). Keep in mind that there can be more than one selected object, but only one active object. +- **Selected object** - all the objects that have been selected (highlighted). Keep in mind that there can be `more than one selected` object, but `only one active object`. -- **Editing mode:** Blender has six different modes of editing. Two of the most commonly used are the Edit mode and the Object mode. In Object mode, you can manipulate objects as a whole. In Edit mode, you can change the shape of a mesh. In each mode, there is a unique set of tools and options at your disposal. You will learn about the other four modes (Sculpt, Vertex Paint, Texture Paint, Weight Paint) in later chapters. +- **Editing mode** - Blender has six different modes of editing; most commonly used are the Edit mode and the Object mode. In Object mode, you can manipulate objects as a whole. In Edit mode, you can change the shape of a mesh. In each mode, there is a unique set of tools and options at your disposal. You will learn about the other four modes (Sculpt, Vertex Paint, Texture Paint, Weight Paint) in later chapters. Datablocks -++++++++++++++++++++++++++++++ +------------------------------ Often, a single Blender file contains hundreds of objects, each with different colors, textures, and animations. How is all this organized? -Blender uses "data blocks" to represent content stored within a Blender file. Each data block represents a collection of data or settings. Some common datablock types you will encounter are Object datablock, Mesh datablock, Material datablock, Texture datablock, and Image datablock. +Blender uses "data blocks" to represent content stored within a Blender file. Each data block represents a collection of data or settings. Some common datablock types you will encounter are Object, Mesh, Material, Texture and Image datablock. -.. figure:: /images/Tutorials/getting_started/31-datablock_hierarchy.png +.. figure:: /images/tutorials/getting_started/31-datablock_hierarchy.png :figwidth: 50% + :align: right Datablock hierarchy In order to reduce the apparent complexity of the program, Blender further organizes data blocks into hierarchies. At the top level are scenes, which can have a number of worlds, each of which can have any number of objects (objects can be a mesh, a light, a camera, and so on). If the object is a mesh, then a Mesh datablock is attached to it. If the object is a light, then a Light datablock is attached to the object. -Throughout the Blender interface, you will run into many datablock managers. They all look like Figure above. +Throughout the Blender interface, you will run into many datablock managers. They all look like the figure aside. Because datablocks can be shared, copied, and reused, large scenes can be managed efficiently through the use of shared datablocks. -Parenting and Grouping -++++++++++++++++++++++++++++++ +Parenting and Collections +------------------------------ -Grouping and parenting both allow you to introduce some form of order to the scene by setting up arbitrary relationships between different objects. But grouping and parenting work in different ways. +Collections and parenting both allow you to introduce some form of order to the scene by setting up arbitrary relationships between different objects. But collections and parenting work in different ways. Parenting is used to establish links between multiple objects so that basic transformations like location, rotation, and scaling are propagated from the parent to its children. This way, any transformation applied to the parent is automatically applied to all the children. Parenting is a useful way to "glue" different objects together so they behave as one. -To parent one object to another, simply select the object you want to be the child first. If more than one object is to be a child, select all of them now. Lastly, select the object that you want to be the parent. Then press Ctrl+P to set parent. +To parent one object to another, simply select the object you want to be the `child first`. If more than one object is to be a child, select all of them. Select the object that you want to be the `parent last`. :kbd:`Ctrl-P` to parent them. -An object can only have one parent object, but a parent object can have many children. +An object can only have one parent object, but a parent object can have many children. Manage parent/child relations from :menuselection:`Properties > Object > Relations`. -Grouping can also be used to logically link objects in the scene together without any transformation constraints to the objects. Unlike parenting, grouping does not have a parent-child relationship; objects are simply members of a group. +Collections can also be used to logically link objects in the scene together without any transformation constraints to the objects. Unlike parenting, collection does not have a parent-child relationship; objects are simply members of a collection. -Select all the objects you want to group. Then press Ctrl+G to add them to a new group. You can also manage group membership from the Object Properties Editor. +Select all the objects you want to group, :kbd:`Ctrl-G` to add them to a new collection. You can also manage collection membership from :menuselection:`Properties > Object > Collections`. -Grouping, by itself, it not very useful. But groups can be quickly "instanced" as group instances. Group Instance is a very useful way to create multiple copies of objects without making actual copies of the objects. Grouping will also come in handy for asset management, which will be discussed in the next chapter. +Collection, by itself, it not very useful. But collection can be quickly "instanced". *Collection Instance* is a very useful way to create multiple copies of objects without making actual copies of the objects. Collection will also come in handy for asset management, which will be discussed in another chapter. -A single object can be in multiple groups. A group can have multiple objects. +A single object can be in multiple collections. A collection can have multiple objects. Backward Compatibility -++++++++++++++++++++++++++++++ +------------------------------ Blender is designed so that older files can be opened with newer versions of Blender. But due to the rate that Blender matures, some unexpected behaviors are to be expected when you least expect them. diff --git a/source/manual/tutorials/getting_started/game_basic_concepts.rst b/source/manual/tutorials/getting_started/game_basic_concepts.rst index 6b12cd64..2e9145e9 100644 --- a/source/manual/tutorials/getting_started/game_basic_concepts.rst +++ b/source/manual/tutorials/getting_started/game_basic_concepts.rst @@ -4,91 +4,91 @@ Game Basic Concepts ============================== -++++++++++++++++++++++++++++++ Game ++++++++++++++++++++++++++++++ So far, we have talked about 3D at length. But how does the game engine fit into? Well, a game engine simply takes the existing 3D assets and attaches a "brain" to them so the objects know how to respond to events. The "brain" can be in the form of logic bricks (which can perform different actions depending on the user input), scripts (which can extend the functionality of logic bricks), or other physical properties of an object (such as rigid body settings to make an object tumble and fall realistically). -.. figure:: /images/Tutorials/getting_started/15-object_logic_game.jpg +.. figure:: /images/tutorials/getting_started/15-object_logic_game.jpg :figwidth: 80% Object + logic = game A game engine is made up of many distinct components: -* **Rendering Engine** : Turns the 3D scene you've built (including models, lights, and camera) into an image to be displayed onscreen. -* **Physics** : Handles collisions and physical simulations of objects. -* **Logic/Scripting** : The brain behind a game, it reacts to the user input, makes decisions, and keeps track of what's going on in the game. -* **Sound** : Produces the audio events. +- **Rendering Engine** - turns the 3D scene you've built (including models, lights, and camera) into an image to be displayed onscreen. +- **Physics** - handles collisions and physical simulations of objects. +- **Logic/Scripting** - the brain behind a game, it reacts to the user input, makes decisions, and keeps track of what's going on in the game. +- **Sound** - produces the audio events. The above list is not meant to be exhaustive, but it should give you an idea of what a game engine does. The Blender game engine gives you a lot of control over each of these components, which you will learn one by one in later chapters. -.. topic:: **Quality vs. Performance** +.. topic:: + **Quality vs. Performance** Making a video game is a constant balancing act between quality and performance. As artists, you want to make the virtual world as rich and detailed as possible; on the other hand, you need to make sure the game can run smoothly for people who might not have top-of-the-line computers. Throughout the process of game-making, you will run into cases where you have to make a decision whether to prioritize the visual quality or the performance of the game. You will also learn tricks to achieve high-quality visual without compromising the performance, as well as how to optimize the game by identifying what is slowing it down. ------------------------------- Game Loop ------------------------------ The game loop is something that every game or general software has: it consists of several processing steps and then, repeating it. To make it clear, think of a video player processing steps: -- It reads a portion of the video file from disk. -- It decodes the read file portion into a image. -- It shows the decoded image in the screen as a single frame. -- It repeats everything from the start. +- It reads a portion of the video file from disk. +- It decodes the read file portion into a image. +- It shows the decoded image in the screen as a single frame. +- It repeats everything from the start. Nevertheless, this article will present you how the game loop is built in UPBGE. It is essential to know how it works: if you keep that in mind, it will explain a lot of mysterious behavior that you might discover. -.. figure:: /images/Tutorials/getting_started/16-game_loop.png +.. figure:: /images/tutorials/getting_started/16-game_loop.png :figwidth: 60% Game loop diagram Each cycle in the game loop represents a logical frame, also known as logic tick. It is the smallest time unit within your game. In each loop: -- The scenes are processed. -- The devices are checked for input. -- The final image is rendered. +- The scenes are processed. +- The devices are checked for input. +- The final image is rendered. It is important to know that the render part might be skipped if the last frame was spending too much processing time , resulting in lag. There is a limit on how much renders can be skipped (default = 5). If this limit exceeds, a render will take place regardless how long it takes. Such 'render' lags will result in 'logic' lags, making the game run slower than expected. ------------------------------- Scene Loop ------------------------------ -.. figure:: /images/Tutorials/getting_started/17-scene_loop.png +.. figure:: /images/tutorials/getting_started/17-scene_loop.png :figwidth: 80% Scene loop diagram This loop is a bit more complex. The scenes loop cycles through all active scenes performing the following steps for each scene: -- Logic processing - This first step processes the logic of the game, be it visual or Python. -- Physics update - The physics update will be done after the logic runs, but before the render is drawn. -- Sound playing - The sound playing is put in the last step of the scene loop. +- Logic processing + + This first step processes the logic of the game, be it visual or Python. + +- Physics update + + The physics update will be done after the logic runs, but before the render is drawn. + +- Sound playing + + The sound playing is put in the last step of the scene loop. Once all these steps are taken for all active scenes, the main loop continues. ------------------------------- Logic Ticks ------------------------------ The logic processing works through frames called *logic ticks*. By default, a game running at 60 frames per second also can run 60 logic ticks per second. In practical examples: -- If I have a number 0 and increase it by 1 each frame, after 1 second its value - will be 60. +- If I have a number 0 and increase it by 1 each frame, after 1 second its value will be 60. -- If I have an object and move it 0.1 meters each frame, after 1 second it - should have been moved 6 meters. +- If I have an object and move it 0.1 meters each frame, after 1 second it should have been moved 6 meters. In UPBGE you can control the logic tick intervals for each object by skipping a given ammount of ticks, allowing you to run logic at exact custom time intervals or optimize logic which doesn't need to run each frame. The following diagram shows how logic tick skipping work. -.. figure:: /images/Tutorials/getting_started/18-logic_tick_skipping_dark.png +.. figure:: /images/tutorials/getting_started/18-logic_tick_skipping_dark.png :figwidth: 50% Logic tick skipping diagram diff --git a/source/manual/tutorials/getting_started/index.rst b/source/manual/tutorials/getting_started/index.rst index ff980220..74bea72f 100644 --- a/source/manual/tutorials/getting_started/index.rst +++ b/source/manual/tutorials/getting_started/index.rst @@ -1,15 +1,12 @@ .. _getting_started-index: -+++++++++++++++ +++++++++++++++++++++++++++++++ Getting Started -+++++++++++++++ +++++++++++++++++++++++++++++++ -This tutorial aims to show the basic concepts of UPBGE, from the game loop behavior to -the most common operations used in game development. This will give you important notions -on how UPBGE works and how are its procedures. +This tutorial aims to show the basic concepts of UPBGE, from the game loop behavior to the most common operations used in game development. This will give you important notions on how UPBGE works and how are its procedures. -Keep in mind that the focus of this tutorial are UPBGE and its game engine behavior, although -basic Blender navigation (like selection, shortcuts, etc) and panels will be explained. +Keep in mind that the focus of this tutorial are UPBGE and its game engine behavior, although basic Blender navigation (like selection, shortcuts, etc.) and panels will be explained. .. toctree:: :maxdepth: 2 diff --git a/source/manual/tutorials/index.rst b/source/manual/tutorials/index.rst index 6c4bb4ec..7d528431 100644 --- a/source/manual/tutorials/index.rst +++ b/source/manual/tutorials/index.rst @@ -1,8 +1,8 @@ .. _tutorials-index: -+++++++++ +============================== Tutorials -+++++++++ +============================== .. toctree:: :maxdepth: 2 @@ -10,5 +10,5 @@ Tutorials getting_started/index introducing_logic_bricks/index introducing_logic_nodes/index - introducing_python/index + introducing_python_scripting/index introducing_python_components/index diff --git a/source/manual/tutorials/introducing_logic_bricks/first_person_camera.rst b/source/manual/tutorials/introducing_logic_bricks/first_person_camera.rst index 41e2803d..3ae4a7f3 100644 --- a/source/manual/tutorials/introducing_logic_bricks/first_person_camera.rst +++ b/source/manual/tutorials/introducing_logic_bricks/first_person_camera.rst @@ -2,8 +2,8 @@ First Person Camera ==================== ------- +++++++++++++++++++++++++++++++ Camera ------- +++++++++++++++++++++++++++++++ -TODO. \ No newline at end of file +TODO diff --git a/source/manual/tutorials/introducing_logic_bricks/index.rst b/source/manual/tutorials/introducing_logic_bricks/index.rst index 232ecd2c..b97be19f 100644 --- a/source/manual/tutorials/introducing_logic_bricks/index.rst +++ b/source/manual/tutorials/introducing_logic_bricks/index.rst @@ -1,8 +1,8 @@ .. _introducing_logic_bricks-index: -++++++++++++++++++++++++ +============================== Introducing Logic Bricks -++++++++++++++++++++++++ +============================== .. toctree:: :maxdepth: 2 diff --git a/source/manual/tutorials/introducing_logic_bricks/linked_libraries.rst b/source/manual/tutorials/introducing_logic_bricks/linked_libraries.rst index b6a3ca5c..0a7062cd 100644 --- a/source/manual/tutorials/introducing_logic_bricks/linked_libraries.rst +++ b/source/manual/tutorials/introducing_logic_bricks/linked_libraries.rst @@ -19,7 +19,7 @@ lib_scenery.blend Both files should be set up somewhat like this: -.. figure:: /images/Tutorials/introducing_logic_bricks/08-linked_libraries.png +.. figure:: /images/tutorials/introducing_logic_bricks/08-linked_libraries.png :figwidth: 60% Split view of the two files @@ -35,14 +35,14 @@ Now, we'll create a blend file named *game.blend* on the same directory as our p - Select corresponding collection and double click it/click :menuselection:`Link`. - Repeat linking the other collection. -.. figure:: /images/Tutorials/introducing_logic_bricks/09-linked_libraries-linking.png +.. figure:: /images/tutorials/introducing_logic_bricks/09-linked_libraries-linking.png :figwidth: 60% Linking procedure -If everything went right, you should see in the *3D Viewport* the collection instances added. They are not editable as they are only :ref:`datablock-empty` objects referencing collections from the original files. The Outliner shows chain icons, signifying those collections are linked. +If everything went right, you should see in the *3D Viewport* the collection instances added. They are not editable as they are only *Empty* objects referencing collections from the original files. The Outliner shows chain icons, signifying those collections are linked. -.. figure:: /images/Tutorials/introducing_logic_bricks/10-linked_libraries-linked.png +.. figure:: /images/tutorials/introducing_logic_bricks/10-linked_libraries-linked.png :figwidth: 80% Collections instanced in game.blend scene @@ -52,18 +52,18 @@ With the instances added, all you have to do is place them with the desired tran Managing the Links ++++++++++++++++++++++++++++++ -If you rename or move any of your libraries to another folder, you will face a common problem: broken links. There are several ways to deal with this problem, and this section will present you the use of the *Outliner* to manage links (and :ref:`datablock-index`). +If you rename or move any of your libraries to another folder, you will face a common problem: broken links. There are several ways to deal with this problem, and this section will present you the use of the *Outliner* to manage links. -I have renamed the library files to `LibCharacter` and `LibScenery`, which are different names from the previous ones (with underlines and only lower case characters). When opening `game.blend`, the editor will complain about the non-existing libraries, and our instances will be shown only as :ref:`datablock-empty` objects. +I have renamed the library files to `LibCharacter` and `LibScenery`, which are different names from the previous ones (with underlines and only lower case characters). When opening `game.blend`, the editor will complain about the non-existing libraries, and our instances will be shown only as *Empty* objects. -.. figure:: /images/Tutorials/introducing_logic_bricks/11-linked_libraries-broken_links.png +.. figure:: /images/tutorials/introducing_logic_bricks/11-linked_libraries-broken_links.png :figwidth: 100% Opening game.blend after libraries be renamed -To fix this, we must go to the *Outliner* and select the *Blend File* mode. On this mode we'll see all :ref:`datablock-index` on our blend file. +To fix this, we must go to the *Outliner* and select the *Blender File* mode. On this mode we'll see all *Data-blocks* in our .blend file. -.. figure:: /images/Tutorials/introducing_logic_bricks/12-linked_libraries-outliner.png +.. figure:: /images/tutorials/introducing_logic_bricks/12-linked_libraries-outliner.png :figwidth: 50% Blender File mode in Outliner @@ -71,9 +71,11 @@ To fix this, we must go to the *Outliner* and select the *Blend File* mode. On t The important elements here are the references to our libraries at the bottom: they are being shown as cracked icons and their previous names. To fix this issue: Relocating the references - Right click the references, select :menuselection:`Relocate` and select the corresponding file. +------------------------------ + +Right click the references, select :menuselection:`Relocate` and select the corresponding file. -.. figure:: /images/Tutorials/introducing_logic_bricks/13-linked_libraries-relocate_broken.png +.. figure:: /images/tutorials/introducing_logic_bricks/13-linked_libraries-relocate_broken.png :figwidth: 60% Broken references fix modes in Outliner diff --git a/source/manual/tutorials/introducing_logic_bricks/move_object.rst b/source/manual/tutorials/introducing_logic_bricks/move_object.rst index 3ee477a2..e8fac3bd 100644 --- a/source/manual/tutorials/introducing_logic_bricks/move_object.rst +++ b/source/manual/tutorials/introducing_logic_bricks/move_object.rst @@ -26,7 +26,7 @@ Cube Once all objects were added, place them somewhat like the picture below: -.. figure:: /images/Tutorials/introducing_logic_bricks/01-move_object-initial_scene.png +.. figure:: /images/tutorials/introducing_logic_bricks/01-move_object-initial_scene.png :figwidth: 90% Cube at the center of the scene @@ -53,7 +53,7 @@ Now we must fill some information on the bricks: The :ref:`bpy.types.SpaceLogicEditor` should look like this: -.. figure:: /images/Tutorials/introducing_logic_bricks/02-move_object-logic_editor.png +.. figure:: /images/tutorials/introducing_logic_bricks/02-move_object-logic_editor.png :figwidth: 100% :ref:`sensor-keyboard` > :ref:`controller-and` > :ref:`actuator-motion` @@ -79,7 +79,7 @@ To continue, perform the following steps: - Next add a :ref:`sensor-property`, set its evaluation type to *Greater Than*, the Property to *fuel* and the value to ``0``. - Connect the :ref:`sensor-property` to the :ref:`controller-and`, along with the :ref:`sensor-keyboard`. -.. figure:: /images/Tutorials/introducing_logic_bricks/03-move_object-property_2x.png +.. figure:: /images/tutorials/introducing_logic_bricks/03-move_object-property_2x.png :figwidth: 100% Property Sensor (left side) properly filled and Fuel property added (right side) @@ -90,7 +90,7 @@ This makes our Cube move only if the value of *fuel* is greater than ``0``. You - Set the mode of :ref:`actuator-property` to **Add**, its property to *fuel* and its value to ``-1``. - Enable the pulse mode on :ref:`sensor-keyboard`. -.. figure:: /images/Tutorials/introducing_logic_bricks/04-move_object-fuel_consumption.png +.. figure:: /images/tutorials/introducing_logic_bricks/04-move_object-fuel_consumption.png :figwidth: 100% Fuel consumption logic: Sensors > And Controller > Property Actuator @@ -99,7 +99,7 @@ There's a new factor involved here: the pulse mode on :ref:`sensor-keyboard` (bl Go ahead and play the game. The Cube will move and, after some time, it stops. It happens because the :ref:`actuator-property` has decreased ``1`` unit of *fuel* each frame, according to the :ref:`sensor-keyboard` pulse mode, and when *fuel* reaches ``0``, the logic of the :ref:`actuator-motion` doesn't respond anymore. It would be good, however, to see the value of *fuel* be decreased over time. You can do this by enabling the debug flag on the *fuel* property (:menuselection:`Properties Editor > Game > Game Properties`), or :menuselection:`Logic Bricks Editor > N-panel > Properties`, as shown in the figure below. -.. figure:: /images/Tutorials/introducing_logic_bricks/05-move_object-debug.png +.. figure:: /images/tutorials/introducing_logic_bricks/05-move_object-debug.png :figwidth: 100% Debug settings and display on screen diff --git a/source/manual/tutorials/introducing_logic_bricks/play_animation.rst b/source/manual/tutorials/introducing_logic_bricks/play_animation.rst index 794aaa76..e1288bc7 100644 --- a/source/manual/tutorials/introducing_logic_bricks/play_animation.rst +++ b/source/manual/tutorials/introducing_logic_bricks/play_animation.rst @@ -4,18 +4,18 @@ Playing An Animation ============================== -In games, animations can be used in many places other than characters - a sliding menu, a opening door, coins rotating, etc. In UPBGE, an animation can be played through the use of an :ref:`datablock-action`. This tutorial will show you how to play an animation of an object and the concept of animation layering, allowing you to play and blend multiple animations at once in a single object. +In games, animations can be used in many places other than characters - a sliding menu, a opening door, coins rotating, etc. In UPBGE, an animation can be played through the use of an Action. This tutorial will show you how to play an animation of an object and the concept of animation layering, allowing you to play and blend multiple animations at once in a single object. Before We Start ++++++++++++++++++++++++++++++ -Before we start using animations through logic, we need some animations. As we said before, UPBGE animations work through the use of :ref:`datablock-action`, so we need to set our default *Dope Sheet* editor from *Dope Sheet* mode to *Action Editor* mode. Now, assuming you already know how to make simple animations adding keyframes, we'll make two simple actions on a cube of a total 50 frames each, with the following settings: +Before we start using animations through logic, we need some animations. As we said before, UPBGE animations work through the use of Action, so we need to set our default *Dope Sheet* editor from *Dope Sheet* mode to *Action Editor* mode. Now, assuming you already know how to make simple animations adding keyframes, we'll make two simple actions on a cube of a total 50 frames each, with the following settings: - Rotation action named *rotate*: No rotation at frame 1, 180° at ``Z`` axis on frame 25, more 180° at ``Z`` axis on frame 50 (that is, a full 360°). - Scaling action named *scale*: 0 scale at frame 1, double scale at frame 25 and 0 scale at frame 50 again. -.. figure:: /images/Tutorials/introducing_logic_bricks/06-play_animation-rotate_scale.png +.. figure:: /images/tutorials/introducing_logic_bricks/06-play_animation-rotate_scale.png :figwidth: 100% Action Editor showing both actions @@ -41,7 +41,7 @@ Now we must fill some fields: The setup should look somewhat like the figure below: -.. figure:: /images/Tutorials/introducing_logic_bricks/07-play_animation-editor_setup.png +.. figure:: /images/tutorials/introducing_logic_bricks/07-play_animation-editor_setup.png :figwidth: 100% Logic Bricks Editor with the given logic set diff --git a/source/manual/tutorials/introducing_logic_nodes/2d_side_scroller/camera_movement.rst b/source/manual/tutorials/introducing_logic_nodes/2d_side_scroller/camera_movement.rst new file mode 100644 index 00000000..d9040ca0 --- /dev/null +++ b/source/manual/tutorials/introducing_logic_nodes/2d_side_scroller/camera_movement.rst @@ -0,0 +1,39 @@ +.. _2d_scroller-camera_movement: + +============================== +1. Camera Movement +============================== + +In 2d scroller games, camera is usually showing player from the side, and it moves perpendicularly together with the player. If you press :kbd:`Numpad 0` (zero - camera perspective), or :kbd:`Numpad 3`, you should see player from same perspective (press :kbd:`Numpad ,` (comma) to focus the player). + +- Add a new logic tree, name it 'player_2d_camera', and set 'Fake User'. + +- Next add, from left to right, :ln:`Get World Position`, set 'player' as Object - it will get player's position, so camera knows where to go, following the player. + +- Add :ln:`Separate XYZ` vector node, to separate 3D vector into separate XYZ coordinates from 'World Position'; connect the sockets. + +- Under above node, add 2 :ln:`Float` nodes - one will set camera distance from player, the other will set following speed. Select both 'Float' nodes, hit :kbd:`Ctrl-J` - this will group both nodes into a frame, for better organization. Rename top node to 'camera distance', and set value to i.e. ``30.0``; rename bottom one to 'slow camera', set value to i.e. ``0.15`` (with node selected - side :menuselection:`N-panel > Node > Label`). Also, with frame selected, rename it i.e. into 'camera custom', and also change frame color (below 'Label'). + +- Next add :ln:`Math` node, set operation to ``Add``, connect ``X`` coordinate from :ln:`Separate XYZ` into ``A`` socket, and ``Float`` output socket from :ln:`camera distance` into ``B`` socket. This will get player's ``X`` position (horizontal) and set camera's ``X`` position accordingly. + +- Add another :ln:`Math` node under the first one, connect ``Z`` coordinate from :ln:`Separate XYZ` into ``A`` socket, and set ``B`` value to ``1.0``. + +- Add :ln:`Combine XYZ` node, connect top :ln:`Math` node into ``X``, bottom :ln:`Math` node into ``Z``, and ``Y`` socket from :ln:`Separate XYZ` directly into ``Y`` socket. + +- Above first :ln:`Math` node, add :ln:`Active Camera`, next another :ln:`Get World Position` above :ln:`Combine XYZ`, and connect ``Camera`` as Object. + +- Next add :ln:`Vector Math` node, set 'Operation' to ``Add``, connect :ln:`Get World Position` into top ``Vector 1`` socket, :ln:`Combine XYZ` into ``Vector 2`` socket. + +- Next add another :ln:`Vector Math`, set 'Operation' to ``Scale``, connect previous node into ``Vector 1``, and :ln:`slow follow` into ``Scale``. + +- Add :ln:`On Update` above last node, next :ln:`Set World Position` node; connect :ln:`On Update` into ``Condition`` socket, :ln:`Active Camera` as Object, and last :ln:`Vector Math` into ``Value`` socket. + +- With 'player' selected, :menuselection:`Apply To Selected`. + +Done. + +.. figure:: /images/tutorials/introducing_logic_nodes/2d_side_scroller/ln-2d-player_camera.png + :figwidth: 100% + :align: center + + 2D player camera nodes setup diff --git a/source/manual/tutorials/introducing_logic_nodes/2d_side_scroller/index.rst b/source/manual/tutorials/introducing_logic_nodes/2d_side_scroller/index.rst new file mode 100644 index 00000000..4c7f175a --- /dev/null +++ b/source/manual/tutorials/introducing_logic_nodes/2d_side_scroller/index.rst @@ -0,0 +1,24 @@ +.. _2d_scroller-index: + +============================== +2D Side Scroller +============================== + +In this tutorial we will: + +- Open .blend file with level; + +- Fix and clean the file, to reflect our inner 'zen' state; + +- Add *logic nodes* game logic; + +- Update and upgrade efficient UPBGE workflow on-the-go. + +.. toctree:: + :maxdepth: 1 + + preparation + camera_movement + player_movement + player_properties + player_animations diff --git a/source/manual/tutorials/introducing_logic_nodes/2d_side_scroller/player_animations.rst b/source/manual/tutorials/introducing_logic_nodes/2d_side_scroller/player_animations.rst new file mode 100644 index 00000000..fde248ca --- /dev/null +++ b/source/manual/tutorials/introducing_logic_nodes/2d_side_scroller/player_animations.rst @@ -0,0 +1,9 @@ +.. _2d_scroller-player_animations: + +============================== +4. Player Animations +============================== + +In this chapter we add animations of player body, so it looks alive. + +Animations are pre-made for you, as part of initial .blend file. diff --git a/source/manual/tutorials/introducing_logic_nodes/2d_side_scroller/player_movement.rst b/source/manual/tutorials/introducing_logic_nodes/2d_side_scroller/player_movement.rst new file mode 100644 index 00000000..94818340 --- /dev/null +++ b/source/manual/tutorials/introducing_logic_nodes/2d_side_scroller/player_movement.rst @@ -0,0 +1,69 @@ +.. _2d_scroller-player_movement: + +============================== +2. Player Movement +============================== + +From the game logic perspective, player can do few movements: + +- It can walk/run, either to the left, or to the right, relative to the screen space. + +- It can jump up. + +- It can fall off the rock into the void. + +For this reason, we need to know what state/movement a player is in. We need properties to keep those states updated while the game is running. + +- With player selected, first add :menuselection:`Properties > Game > Game Properties > Add Game Property`, name it ``running``, leave default type ``Float``, and also default value ``0.0``. Save often. + +- In *Logic Node Editor*, add new node tree, name it ``player_2d_movement``, and set 'Fake User'. + +- Next add :ln:`Get Object Property`, ``Object`` > ``player``, and ``Property`` > ``running``. + +- Connect above node ``Property Value`` socket into :ln:`Math` > ``A`` socket, set ``B`` to ``0.20``, set ``Operation`` > ``Multiply``. + +- Connect :ln:`Math` ``Result`` > :ln:`Combine XYZ` ``Y`` socket, leave ``X`` and ``Z`` at default value (``0.0``). + +- Below :ln:`Combine XYZ` node add :ln:`Get Attribute - World Position`, and ``Object`` > ``player``. + +- Next add :ln:`Vector Math`, connect :ln:`Combine XYZ` ``Vector`` > ``Vector 1``, :ln:`World Position` > ``Vector 2``, ``Operation`` > ``Add``. + +- Above :ln:`Vector Math` add :ln:`On Update`, next :ln:`Rotate To`, connect ``Out`` > ``Condition`` (*red* to *red* socket), and ``Result`` > ``Target`` (*blue* to *blue* socket). + +- Next add :ln:`Walk`, and above it :ln:`Set Attribute - World Position`; :ln:`Rotate To` ``Done`` > ``Condition`` - both nodes, :ln:`Combine XYZ` ``Vector`` > :ln:`Walk` ``Vector``, uncheck :ln:`Set World Position` ``Y`` and ``Z``, both nodes ``Object`` > ``player``, also uncheck :ln:`Walk` ``Local``. + +- For organizing purpose, select all > :kbd:`Ctrl-J` to put all into a frame, with frame still selected > :menuselection:`N-panel > Node > Node > Label` > ``Change player rotation based on 'running' property``. + +This part is done. + +.. figure:: /images/tutorials/introducing_logic_nodes/2d_side_scroller/ln-2d-player_movement-1.png + :figwidth: 100% + :align: center + + Player movement setup - rotation part + +Next we add collision detection - if player falls into the void, when it collides with *Bedrock* object, it will be 'teleported' back to the beginning. This is the sole purpose of Bedrock object. + +- First we need to add a property to *Bedrock* object > select it in :menuselection:`Outliner`, then :menuselection:`Add Game Property`, same as we did above for the player; name it ``bedrock``, leave the rest as default. + +.. figure:: /images/tutorials/introducing_logic_nodes/2d_side_scroller/ln-2d-bedrock.png + :figwidth: 60% + :align: center + + Bedrock property + +- In *Logic Node Editor*, under *Player movement* frame, add :ln:`Collision`, and :ln:`Set Attribute - World Position` - it makes sense, doesn't it, because when player will fall into the void, and touch (collide) with the *Bedrock*, we will reset its position, otherwise player would keep falling deeper and deeper into the void - forever. + +- Set :ln:`Collision` ``Property`` > ``bedrock``, check ``Continuous``, connect ``On Collision`` output to :ln:`Set World Position` > ``Condition``, and last node ``Object`` > ``player``. + +Done. Simple as that. + +.. figure:: /images/tutorials/introducing_logic_nodes/2d_side_scroller/ln-2d-player_movement-2.png + :figwidth: 60% + :align: center + + Reset player position nodes setup + +In case you need to 'teleport' player somewhere else than at the beginning, change :ln:`Set World Position` ``Value`` fields (from top to bottom - X, Y, Z). This is used in case when player manages to advance to some 'checkpoint' inside the level, but it fails to make it to the end - it is 'teleported' to last 'checkpoint'. + +If you run the game, not much will happen - the game is not yet functional. We need to add more functionality to the player. And ``Apply To Selected`` all logic trees to player, of course. diff --git a/source/manual/tutorials/introducing_logic_nodes/2d_side_scroller/player_properties.rst b/source/manual/tutorials/introducing_logic_nodes/2d_side_scroller/player_properties.rst new file mode 100644 index 00000000..2cb4b452 --- /dev/null +++ b/source/manual/tutorials/introducing_logic_nodes/2d_side_scroller/player_properties.rst @@ -0,0 +1,119 @@ +.. _2d_scroller-player_properties: + +============================== +3. Player Properties +============================== + +Previously we added a single property to the player - ``running``. In this chapter we will add some more properties, and use them with the game logic. + +First, let's add game properties to player. + +- :menuselection:`Add Game Property` > ``grounded`` > ``Float`` > ``0.0`` (default values), ``falling`` > ``Timer`` > ``0.0``, ``jumped`` > ``Boolean`` > unchecked, ``landed`` > ``Boolean`` > unchecked, ``start_falling`` > ``Boolean`` > unchecked. + +.. figure:: /images/tutorials/introducing_logic_nodes/2d_side_scroller/ln-2d-player_properties-added_properties.png + :figwidth: 60% + :align: center + + Added player game properties + +- Next we add new logic tree, name it ``player_2d_properties``. Be kindly informed, this logic tree is a bit larger than previous ones. Did you remember to set 'Fake User'? + +.. tip:: + It is recommended to switch to 'fullscreen area/window' mode - mouse over *Logic Node Editor* > :kbd:`Ctrl-Space` (toggle fullscreen). + +From left to right: + +- First we add :ln:`Float`, set its value ``Float`` > ``0.1``. If player is on the ground, this value will be used. + +- Below it add :ln:`Get Physics Info`, ``Object`` > ``player``. This node will provide physics data for player. + +- Next add :ln:`Value Switch`, connect :ln:`Float` to top ``Type/Value`` input (second input socket from top), set bottom ``Type/Value`` to ``Float`` > ``0.03``, and :ln:`Get Physics Info` ``On Ground`` > ``A if True, else B`` (top conditional input). + +.. figure:: /images/tutorials/introducing_logic_nodes/2d_side_scroller/ln-2d-player_properties-1.png + :figwidth: 60% + :align: center + + Player properties - first chunk of nodes + +Approximately four node heights higher, we will start second nodes chunk. From now on, unless indicated otherwise, all ``Object`` fields should be set to ``player``, and this will not be indicated for each node explicitly. Also previous node will be not named, just its output, for a sake of simplicity, except in case of ambiguity. If unclear, refer to relevant image, usually below the text. + +- Add :ln:`Get Object Property`, ``Property`` > ``start_falling``. + +- Add :ln:`On Value Changed To`, ``Property Value`` > ``Value``, ``Bool`` checked. + +- Add :ln:`Set Object Property`, ``Result`` > ``Condition``, ``Property`` > ``falling``, ``Float`` > ``0.0``. + +This is one row. Below it add another row. + +- :ln:`On Value Changed To`, ``Bool`` checked > ``Value`` of :ln:`On Value Changed`, ``If Changed`` > ``Condition`` of :ln:`Set Object Property`, ``Property`` > ``landed``, ``New`` > bottom most input socket. + +Copy last row one row below. + +- :ln:`On Value Changed To` ``Bool`` uncheck, :ln:`Set Object Property` ``Property`` > ``start_falling``. + +One row lower: + +- :ln:`Get Object Property` ``Property`` > ``Grounded``, below it add :ln:`Value Switch`, bottom field ``Float`` > ``0.0``, next one above ``Float`` > ``1.0``, connect ``On Ground`` > ``A if True, else B``. + +- Add :ln:`Interpolate`, ``Property Value`` > ``From``, ``Result`` > ``To``, ``Factor`` > ``0.3``. + +- Above :ln:`Interpolate` add :ln:`On Update`, ``Out`` > ``Condition`` of :ln:`Set Object Property`, ``Property`` > ``Grounded``. + +- Also connect ``On Ground`` > *On take off* & *When landed* (left-most, see image below) ``Value`` sockets. Use *Reroute* utility, if you desire so. + +.. tip:: + Using *Reroute* utility + + :kbd:`Shift-RMB` over existing noodle, and you get *Reroute* socket for free. :kbd:`LMB` the noodle from it just the same as you would from output socket, drag it to input socket. To move it around - :kbd:`LMB`-select it, :kbd:`G` to grab, move with mouse, :kbd:`LMB` to 'land it' wherever you wish. :kbd:`Shift-Tab` to toggle grid snapping. + +.. figure:: /images/tutorials/introducing_logic_nodes/2d_side_scroller/ln-2d-player_properties-2.png + :figwidth: 100% + :align: center + + Second chunk of nodes + +One but last chunk. This one is for player walking. Same as before - from left to right, below existing noodle soup, sorry, group. + +- Add 2 x :ln:`Keyboard Key`, one below the other, :kbd:`A` for left, :kbd:`D` for right movement. + +- :ln:`Gate`, ``Gate Type`` > ``Or``, connect the red dots. + +- Below it, add :ln:`Value Switch`, bottom field ``Float`` > ``1.0``, field above ``Float`` > ``-1.0``, ``If Pressed`` ``A`` > ``A if True, else B``. + +- Add/duplicate :ln:`Value Switch`, :ln:`Gate` ``Result`` > ``A if True, else B``, ``Result`` > next (middle) socket, bottom socket ``Float`` > ``0.0``. + +- Above last node add :ln:`Get Object Property`, ``Property`` > ``running``. + +- Next :ln:`Interpolate`, ``Property Value`` > ``From``, ``Result`` > ``To``, first :ln:`Value Switch`` > ``Factor``. + +- At the end, :ln:`Set Object Property`, from above :ln:`On Update` > ``Condition``, ``Property`` > ``running``, ``Value`` > bottom input socket. + +.. figure:: /images/tutorials/introducing_logic_nodes/2d_side_scroller/ln-2d-player_properties-3.png + :figwidth: 100% + :align: center + + One-but-last chunk of nodes + +Ignore left yellow arrow in above image, this connection is not from ``On Ground``. + +And the last chunk, this one for jumping. + +- :ln:`Keyboard Key`, ``Space`` for jumping. + +- :ln:`Gate`, above :ln:`Get Physics Info` ``On Ground`` > ``Condition A``, ``If Pressed`` > ``Condition B``. + +- :ln:`Jump`, ``Result`` > ``Condition``. + +- :ln:`On Value Changed`, ``Done`` > ``Value``. + +- Yes, last one, :ln:`Set Object Property`, ``If Changed`` > ``Condition``, ``New`` > bottom-most input socket. + +Yes, finally, we are done with this logic tree. + +.. figure:: /images/tutorials/introducing_logic_nodes/2d_side_scroller/ln-2d-player_properties-4.png + :figwidth: 100% + :align: center + + The last chunk + +Next we add player animations, so it will look like it is walking. diff --git a/source/manual/tutorials/introducing_logic_nodes/2d_side_scroller/preparation.rst b/source/manual/tutorials/introducing_logic_nodes/2d_side_scroller/preparation.rst new file mode 100644 index 00000000..e7ddb806 --- /dev/null +++ b/source/manual/tutorials/introducing_logic_nodes/2d_side_scroller/preparation.rst @@ -0,0 +1,69 @@ +.. _2d_scroller-preparation: + +============================== +Preparation +============================== + +Many times free asset files are available on Internet, for you to be used freely, as a starting point. They may include single object, i.e. a spaceship, or complete levels with hundred of objects. In both cases, they are usually poorly organized, with unclear names, and also often with missing data, mostly materials. + +If we want them to be better organized, some renaming and cleaning is necessary. This becomes very important when game includes many scenes or levels. Let's see how this can be achieved efficiently. + +.. note:: + Naming Conventions + + There are many `naming conventions `__ in computer programming - snake_case, camelCase etc. We use *snake_case* in our tutorials. + + Keyboard + + It is assumed that reader has a keyboard with Numpad - using Blender/UPBGE, this is highly recommended. + +In our :download:`.blend assets ` file, find a ``player`` object. Not a simple task, since there is no object with that name - names in Outliner are all cryptic/default. Although there is a hint, if you search the Outliner, we'll assume this is not the case. + +- Switch to :menuselection:`layout` workspace, select the 'egg' object. + +- Mouse-over Outliner > :kbd:`Numpad ,` (comma) - currently selected object is focused in Outliner. Rename to ``player`` or whatever you prefer. This works also in reverse - select object in Outliner > mouse-over ``3D Viewport`` > :kbd:`Numpad ,`. + +Next, there are many objects with same name (except for end numbering). Let's rename those too. Lucky we, Blender has a built-in tool for batch renaming. + +.. figure:: /images/tutorials/introducing_logic_nodes/2d_side_scroller/ln-2d-batch_rename.png + :figwidth: 50% + :align: right + + Batch Rename window + +- ``3D Viewport`` > click big object (rock) under *player*, and find it in Outliner (hotkey above) - should be named 'Icosphere.002'. + +- :kbd:`F3` for Search pop-up > type 'batch rename' > :kbd:`Enter` (there is also hotkey indicated in Search pop-up). + +- Search pop-up > :menuselection:`All` (also hotkey is indicated - :kbd:`Alt-A`). If you want to only rename selected objects > :menuselection:`Selected`. + +- Leave next field as 'Objects', since we are renaming objects. But do feel free to explore other available options in dropdown menu. This goes for next 'Type' field too. + +- 'Find' field > type 'icosphere' (:menuselection:`Case Sensitive` is unchecked) > 'Replace' field > type 'big_rock' (or whatever you prefer). For the sake of this tutorial, we will rename the Cube objects at the same time. + +- Click :menuselection:`+` button at the right side - this will add another sub-window. 'Find' > 'Cube' > 'Replace' > 'rock'. Hit :menuselection:`OK`. + +The result is not ok, because we also renamed all trees into rock. :kbd:`Ctrl-Z` few times to undo. You now know how to quickly rename objects. If you want to do it properly: + +- Shift-select all trees in 3D Viewport > Batch Rename > 'Selected' > 'Find' > 'cube' > 'Replace' > 'tree'. Repeat for big rocks and small rocks, rename accordingly. + +.. tip:: + Can not zoom enough + + Blender will sometimes not zoom enough into the object. Solution: select an object > :kbd:`Numpad ,` - object is centered and focused, now you can zoom in. This procedure works best with single object selected. + +Let's move on. + +++++++++++++++++++++++++++++++ +Adding Game Logic +++++++++++++++++++++++++++++++ + +In general, it is recommended that game logic is split into small chunks/logic trees - this way it is easier both to write and to manage a game logic. + +For above reason, we'll altogether add five logic node trees: + +#. Camera movement; +#. Player movement; +#. Player properties; +#. Player animations; +#. Movement sounds. diff --git a/source/manual/tutorials/introducing_logic_nodes/first_person_shooter.rst b/source/manual/tutorials/introducing_logic_nodes/first_person_shooter.rst new file mode 100644 index 00000000..08cb443a --- /dev/null +++ b/source/manual/tutorials/introducing_logic_nodes/first_person_shooter.rst @@ -0,0 +1,220 @@ +.. _lntut-first_person_camera: + +============================== +First Person Shooter +============================== + +In this tutorial we will: + +- Open .blend file with level assets - barrels and cubes, a brick walls, and a player with camera; + +- Use *Logic Nodes* to add :kbd:`W S A D` movement and a jump with some extras; + +- Upgrade with *Logic Nodes* into a FPS game; + +.. figure:: /images/tutorials/introducing_logic_nodes/ln-fps-annotations.png + :figwidth: 45% + :align: right + + Placement options for Annotation tool + +We will also learn few handy shortcuts on-the-go. Shall we? + +Download/open :download:`level with assets ` .blend file. Follow the instructions precisely. :) + +.. _fps-annotations: + +- :kbd:`Shift-Space` > :kbd:`D` for on-screen scribble tool, called *Annotation* in blenderland. + +Annotation tool is useful for quick sketch, storyboard, and transferring ideas to collaborators. Also for annotations. He he he. Try all three :menuselection:`Placement` options for *Annotation* tool, rotate 3D viewport in-between, to see different placements of your scribbles. Go to :menuselection:`N-panel > View > Annotations` and select individual colors to be able to erase them. Or click :menuselection:`X` to delete all at once quickly. + +Ok, enough chit-chat - let's fight! + +.. figure:: /images/tutorials/introducing_logic_nodes/ln-fps-player_hierarchy.png + :figwidth: 50% + :align: right + + Player as parent of many children + +In :ref:`gs-outliner_editor` top > search for ``Player``. + +Take a look of the *level* objects, particularly the hierarchy of *Player* object. Below *Player* object there is a bunch of other objects, being a *children* of *Player*, our main *Parent* object. Wherever *Player* goes, all children will follow. Also take a look at :ref:`gs-properties_editor` - under *Object* tab (orange square) there are *Relations* and *Collections* sub-panels, and close to the bottom, a *Viewport Display* sub-panel - under *Display As* a :menuselection:`Wire` is selected, and this is why *Player* looks underfed, sorry, wireframed. Since during the gameplay the *Player* is actually not visible, this will save some computer power. Not much though. :) + +Of our main interest is a ``Head`` object, which is of type *Empty* object - those are commonly used as *Parent* object. In our case, *Head* is a parent of ``Camera`` object - this is the "eyes" of our player. No camera - no image on our screen. + +Next, under the *Camera*, there is a ``Gun`` object, and this one has an ``Animation`` object with *Action* assigned to it. + +Those are main building blocks of the game development, which we will incorporate into *Logic Nodes* workflow. Let the party begin! + +Delete ``Text`` object (it was showing > :kbd:`W` to exit Annotation tool), we do not need it. Switch to *Logic Nodes* workspace (top-most header). Arrange the editors as you see fit, the one we will use most is *Logic Node Editor*. + +.. tip:: + Both game and 3D model development require use of multiple editors at once. This can clutter the screen, particularly small one, quickly. To remedy this, few workflows are at our disposal. + + 1. Dedicate each workspace, like default Blender startup file. In this case there are *workspaces*, which can be switched by clicking top-most header, in our example: + + :menuselection:`Layout | Logic Nodes | Animation | Scripting` + + There is also :menuselection:`+` tab, if you want to add another workspace. And you can assign hotkeys for switching previous/next workspace: :menuselection:`Edit > Preferences > Keymap` - search for ``Screen > Cycle Workspace``. Assign 2 keyboard keys, one for *previous* and one for *next* workspace. + + I trust you can figure out how to delete a workspace by yourself. + + 2. Use Blender/UPBGE handy shortcut, :kbd:`Ctrl-Space`, which will toggle-maximize the editor window under the mouse cursor. This was a preferred workflow of now late Johnny Maccarony, world-known heavy consumer of *Logic Node noodles*. + +In :ref:`Logic Node Editor `, first create new logic tree, click ``Logic Node Editor``, rename to ``player``, and mark :ref:`dbl-protected` (Fake User); next add basic movement nodes, same as for :ref:`ln-moving_cube` chapter. + +- Add 5 :ref:`ln-keyboard_key` nodes, assign :kbd:`D A W S` keys for right/left and forward/backward movement, and :kbd:`Space` for jumping. + +- Add 2 :ref:`ln-math` nodes and connect with above 4 movement nodes. + +- Add :ref:`ln-apply_force` node, connect remaining :ln:`Keyboard Key` node ``If Pressed`` output socket to ``Condition`` input socket, add ``Player`` as object, set ``vector Z`` (up/down axis) to ``200.0`` - this much force will be applied. ``Local`` ? Judge yourself, or use time-tested very successful procedure - `trial & error`. Lucky you, just 2 options are available. + +- Add :ref:`ln-combine_xyz` node, connect above :ln:`Math` nodes. Leave `Z` at default `0.0` value. + +- Add :ref:`ln-vector_math` node, set to ``Normalize``, connect those 2 cute blue-ish dots. + +- Add another :ln:`Vector Math` node, set *Operation* to ``Scale``. This node will determine speed of the Player. Connect ``Result`` from above node to ``Vector 1`` input socket. + +.. _fps-snap_ln: + +.. tip:: + If you want nodes to be aligned, turn on *magnet* icon in top-right corner of *Logic Node Editor*, above N-panel. Nodes will now snap to invisible grid. Hotkey is :kbd:`Shift-Tab`. + +.. figure:: /images/tutorials/introducing_logic_nodes/ln-fps-speed_property-apply_tree.png + :width: 100% + :align: center + + Add Game Property and Apply To Selected + +Before we continue with nodes, we need to add *Game Property*. With *Player* selected: + +- In :menuselection:`Properties > Game > Game Properties`, click :menuselection:`Add Game Property`, name it ``speed``, leave default ``Float`` type, and set value to ``1.0``. + +:menuselection:`Apply To Selected` - this will create ``NL__player`` game property, ``player`` object tree, and a :py:`nl_player.py` script. *NL/nl* stands for *node logic*. + +Good job. Now we can continue with nodes. + +- Add :ref:`ln-get_object_property` node; if not already, select ``Game Property`` from dropdown, and in ``Property`` field type ``speed`` - this is the *speed* property that we just created above. Connect this node to ``Scale`` input socket of the last :ln:`Vector Math` node, and add ``Player`` as owner object - click :menuselection:`Object` and select from menu. + +- Add :ref:`ln-on_update` and a :ref:`ln-apply_movement` node - connect ``Out`` to ``Condition``, and last :ln:`Vector Math` into ``Vector``; also set ``Player`` as object, and yes, check ``Local``. + +This is our node setup so far: + +.. figure:: /images/tutorials/introducing_logic_nodes/ln-fps-setup_so_far.png + :figwidth: 100% + :align: center + + Player movement nodes setup so far + +.. tip:: + Another very useful Blender habit to grow - almost all buttons & commands have option to ``Add to Quick Favorites`` or ``Assign Shortcut``: + + - Go to :menuselection:`Properties > Render > Game Resolution`; + + - Hover mouse over :menuselection:`Embedded Start` button, :ref:`RMB ` and select ``Add to Quick Favorites``. + + - Use this tip whenever you find yourself using/repeating same actions over and over. It is a great time saver. + +.. _fps-quick_favorites: + +.. figure:: /images/tutorials/introducing_logic_nodes/ln-fps-quick_favorites.png + :figwidth: 40% + :align: right + + Q for Quick Favorites > E for Start + +According to the Holy Blender Bible, Embedded Start can be invoked with hotkey :kbd:`P`, which seems to be not working in current UPBGE by default. So we added it into Quick Favorites, although we could as easily assign a `P` shortcut. We will now run game and test if node setup is working as expected. With mouse over :ref:`3D-Viewport `: + +:kbd:`Numpad 0 > Home > Q` will move into 'camera view' > zoom-in/maximize/center the camera view > open *Quick Favorites* menu; there, another hotkey is offered for the *Embedded Start* - this depends on various factors, and is recognizable by any of the letters being underscored - `E` in figure; in your case might be something else. Pressing that key should start the game. :kbd:`Esc` to end the game. + +While the game is running, press movement keys and observe Player behavior. + +- First of all, it is moving way to fast > reduce the ``speed`` property; trial & error is the name of the game, until you find comfortable settings. `Hint` - halve the *speed* value for a start, and do not forget - Player should be selected in order to change its speed property. + +- Second of all, keys are wrong > fix them until character moves properly relative to pressed keys > :kbd:`W` forward; :kbd:`S` backward; :kbd:`A` left; :kbd:`D` right. + +.. _fps-mouse_moves_head: + +.. figure:: /images/tutorials/introducing_logic_nodes/ln-fps-mouse_moves_head.png + :figwidth: 40% + :align: right + + Mouse Look settings + +If you're done fixing, let's continue. + +- Add :ref:`ln-mouse_look` and connect ``Out`` from :ln:`On Update` to ``Condition``, set ``Player`` as ``Object`` and ``Head`` as ``Head``. Run the game, test, if needed, adjust settings in :ln:`Mouse Look` node: ``Cap Up/Down`` will limit *Head* movement, ``Smoothing`` will smooth mouse moves. + +.. _fps-value_switch: + +Next we upgrade walking to run: + +- Add/duplicate :ln:`Keyboard Key` & :ln:`Math`, add :ref:`ln-value_switch`. The logic here is: + + - When :kbd:`Shift` is pressed, add some *float* value to *speed*, and use resulting value for movement; + + - If not pressed, use existing *speed* value. + +Test the game, adjust values as you see fit. + +.. figure:: /images/tutorials/introducing_logic_nodes/ln-fps-value_switch.png + :figwidth: 80% + :align: center + + Value Switch for running + +Now it is time for some actions - we'll add gun shooting. Switch to :menuselection:`Animation` workspace, in the left editor/window > top-right, check :ref:`Shading ` options - little arrow at far right side will dropdown some setting, which you are free and advised to change. + +.. tip:: + With object selected, you can 'focus' it with :kbd:`Numpad ,` (comma); this works in :menuselection:`3D Viewport`, :menuselection:`Outliner`, and other editors. Use this if you 'loose' the object from sight. + +.. figure:: /images/tutorials/introducing_logic_nodes/ln-fps-action_editor.png + :figwidth: 50% + :align: right + + Action Editor context with action dots + +- Expand/enlarge bottom :menuselection:`Dope Sheet Editor`, select/expand ``Gun`` object (Outliner > Search if needed), and you shall see some orange dots in *Dope Sheet* - this is gun ``Action`` - when gun is fired, bullet pushes it back and up. Hit :kbd:`Space` to toggle animation playing. We need to attach this action to Player and connect it with an input. + +- Switch *Editing context* from :menuselection:`Dope Sheet` to :menuselection:`Action Editor` - name of our action is shown in the header > ``Shot``. + +- Back to :menuselection:`Logic Nodes` workspace (or modify workspace to include *Logic Node Editor* window/area). Add :ref:`ln-mouse_button`, :ref:`ln-pulsify`, :ref:`ln-stop_animation` and :ref:`ln-play_animation` nodes, connect them red-to-red dot. + +- ``Shot`` action is how long? Set :ln:`Play Animation` to ``Object`` > ``Gun``, and ``Action`` > ``Shot``, ``End`` > last action frame. Test the game, adjust settings. + +Gun is moving when shooting now, but still needs to actually shoot something. And the sound is missing. + +- Add below :ref:`ln-active_camera`, :ref:`ln-get_world_position`, and :ref:`ln-get_axis_vector` - connect ``Camera`` to both :ln:`Get World Position` > ``Object``, and :ln:`Get Axis Vector` > ``Object``, set ``Axis`` > ``-Z Axis`` (object/player forward-facing direction). + + - :ln:`Get Axis Vector` will take :ln:`Active Camera` orientation and feed it to :ln:`Raycast` for aiming direction. + + - :ln:`Get World Position` will take :ln:`Active Camera` (player body/head) position and feed it to :ln:`Raycast` as shooting origin point/position. + +- Add :ref:`ln-raycast`, connect :ln:`Get World Position` > ``Origin``, :ln:`Get Axis Vector` > ``Aim``, and above :ln:`Stop Animation` > ``Condition``, check ``Custom Distance`` and ``Local``. + +- Add :ref:`ln-apply_impulse`, connect :ln:`Raycast` top two output sockets color-to-color, and ``Picked Point`` > ``Vector``, ``Ray Direction`` > ``Direction``. + +- Add :ref:`ln-draw` node, set to ``Cube``, connect :ln:`Apply Impulse` > ``Condition``, :ln:`Raycast` ``Picked Point`` > ``Origin``, set ``Width`` to something small, i.e. `0.02`, and check ``Use Volume Origin``. + + - ``Cube`` will act as improvised bullet. In final game this bullet would probably best be hidden. + +Done - test and adjust settings. + +.. figure:: /images/tutorials/introducing_logic_nodes/ln-fps-shoot_nodes.png + :figwidth: 90% + :align: center + + Shot action nodes + +.. figure:: /images/tutorials/introducing_logic_nodes/ln-fps-shot_sound.png + :figwidth: 50% + :align: right + + Shot audio clip node + +Final touch: + +- Search/download 'machine gun shot single audio', a short sound clip, save to disk, somewhere close to our working *.blend* file. + +- Next to above :ln:`Play Animation` add :ref:`ln-start_sound`, set as ``2D Sample``, connect :ln:`Play Animation` ``Started`` > ``Condition``, ``Sound`` attribute > *folder* icon > load shot audio clip, *note* icon > load from dropdown. Test the game, take a break. + diff --git a/source/manual/tutorials/introducing_logic_nodes/index.rst b/source/manual/tutorials/introducing_logic_nodes/index.rst index be03cb92..7f4e5d91 100644 --- a/source/manual/tutorials/introducing_logic_nodes/index.rst +++ b/source/manual/tutorials/introducing_logic_nodes/index.rst @@ -7,5 +7,6 @@ Introducing Logic Nodes .. toctree:: :maxdepth: 2 - a_first_example moving_cube + first_person_shooter + 2d_side_scroller/index diff --git a/source/manual/tutorials/introducing_logic_nodes/moving_cube.rst b/source/manual/tutorials/introducing_logic_nodes/moving_cube.rst index 0e9b484f..a1c131c9 100644 --- a/source/manual/tutorials/introducing_logic_nodes/moving_cube.rst +++ b/source/manual/tutorials/introducing_logic_nodes/moving_cube.rst @@ -4,31 +4,43 @@ Moving A Cube ============================== +See :ref:`logic_node_editor-index` for *node* basics. + Moving an object requires input from user, processing this input, and applying movement to object. To run the game, a *Camera* object is also required. - Add 4 :ref:`ln-keyboard_key` nodes, and assign :kbd:`A` for left, :kbd:`D` for right, :kbd:`W` for forward, and :kbd:`S` for backward movement. -- Add 2 :ref:`ln-math` nodes, set both to ``Subtract``, and connect 2 above nodes to each *Math* node, i.e. :kbd:`A` and :kbd:`D` nodes to one *Math* node, :kbd:`W` and :kbd:`S` to the other *Math* node. -- Next add a :ref:`ln-combine_xy`, connect above *Math* nodes to ``X`` and ``Y`` input sockets. + +- Add 2 :ref:`ln-math` nodes, set both to ``Subtract``, and connect 2 above nodes to each :ln:`Math` node, i.e. :kbd:`A` and :kbd:`D` nodes to one :ln:`Math` node, :kbd:`W` and :kbd:`S` to the other :ln:`Math` node. + +- Next add a :ref:`ln-combine_xy`, connect above :ln:`Math` nodes to ``X`` and ``Y`` input sockets. + - Connect to :ref:`ln-vector_math` ``Vector 1`` socket, set ``Normalize`` property from dropdown menu. -- Connect the ``Result`` output to another *Vector Math* node > ``Vector 1`` socket. Set property to ``Scale``. + +- Connect the ``Result`` output to another :ln:`Vector Math` node > ``Vector 1`` socket. Set property to ``Scale``. - .. tip:: Either add new node, or select existing one > :kbd:`Shift-D` to duplicate > move with mouse > :kbd:`LMB` to 'land' it. Keep mouse cursor close to the node while duplicating. + .. tip:: + Either add new node, or select existing one > :kbd:`Shift-D` to duplicate > move with mouse > :kbd:`LMB` to 'land' it. Keep mouse cursor close to the node while duplicating. + +- Add :ref:`ln-float` node, set value to ``0.1``, and connect it to the last :ln:`Vector Math` node, ``Scale`` input. This will determine movement *speed* for the object. -- Add :ref:`ln-float` node, set value to ``0.1``, and connect it to the last *Vector Math* node, ``Scale`` input. This will determine movement *speed* for the object. -- Add :ref:`ln-apply_movement` node; output from above *Vector Math* node goes into ``Vector`` input. Check ``Local`` box, and in the *Object* input select an object to move, i.e. *Cube*. -- Last, add :ref:`ln-on_update` node, and connect to above *Apply Movement* > ``Condition`` socket. +- Add :ref:`ln-apply_movement` node; output from above :ln:`Vector Math` node goes into ``Vector`` input. Check ``Local`` box, and in the *Object* input select an object to move, i.e. *Cube*. + +- Last, add :ref:`ln-on_update` node, and connect to above :ln:`Apply Movement` > ``Condition`` socket. Alright, now we apply this *logic tree* to an object. -- Select (or add) any object, in *Logic Nodes Editor* select all nodes (:kbd:`A`), and in :menuselection:`N-panel > Dashboard > Administration` click :menuselection:`Apply To Selected` button. If the game does not run as expected, also click :menuselection:`Force Compile`. +- Select (or add) any object, in *Logic Nodes Editor* select all nodes (:kbd:`A`), and in :menuselection:`N-panel > Dashboard > Administration` click :menuselection:`Apply To Selected` button. + +If the game does not run as expected, also click :menuselection:`Force Compile`. Logic tree should look like this: -.. figure:: /images/Tutorials/introducing_logic_nodes/15_move_object.png +.. figure:: /images/tutorials/introducing_logic_nodes/15_move_object.png :figwidth: 100% + :align: center Logic tree for moving an object with keyboard Run the game, use the keyboard keys we set in first step to move the Cube. -If object is moving in wrong direction, either swap keys in *Keyboard Key* nodes (i.e. ``A`` > ``D`` and ``D`` > ``A``), or swap ``A`` and ``B`` inputs in *Math* node. +If object is moving in wrong direction, either swap keys in :ln:`Keyboard Key` nodes (i.e. ``A`` > ``D`` and ``D`` > ``A``), or swap ``A`` and ``B`` inputs in :ln:`Math` node. diff --git a/source/manual/tutorials/introducing_python/group_instances.rst b/source/manual/tutorials/introducing_python/group_instances.rst deleted file mode 100644 index 7ac2b156..00000000 --- a/source/manual/tutorials/introducing_python/group_instances.rst +++ /dev/null @@ -1,6 +0,0 @@ - -############################ -Dealing With Group Instances -############################ - -TODO \ No newline at end of file diff --git a/source/manual/tutorials/introducing_python/move_object.rst b/source/manual/tutorials/introducing_python/move_object.rst deleted file mode 100644 index 248fec8d..00000000 --- a/source/manual/tutorials/introducing_python/move_object.rst +++ /dev/null @@ -1,6 +0,0 @@ - -#################### -Moving A Cube -#################### - -TODO \ No newline at end of file diff --git a/source/manual/tutorials/introducing_python/play_animation.rst b/source/manual/tutorials/introducing_python/play_animation.rst deleted file mode 100644 index 85690d83..00000000 --- a/source/manual/tutorials/introducing_python/play_animation.rst +++ /dev/null @@ -1,6 +0,0 @@ - -#################### -Playing An Animation -#################### - -TODO \ No newline at end of file diff --git a/source/manual/tutorials/introducing_python_components/index.rst b/source/manual/tutorials/introducing_python_components/index.rst index 7041e6bd..a354b4a0 100644 --- a/source/manual/tutorials/introducing_python_components/index.rst +++ b/source/manual/tutorials/introducing_python_components/index.rst @@ -1,8 +1,8 @@ .. _introducing_python_components-index: -+++++++++++++++++++++++++++++ +============================== Introducing Python Components -+++++++++++++++++++++++++++++ +============================== .. toctree:: :maxdepth: 2 diff --git a/source/manual/tutorials/introducing_python_components/python_component.rst b/source/manual/tutorials/introducing_python_components/python_component.rst index 26cffbd2..203fff2a 100644 --- a/source/manual/tutorials/introducing_python_components/python_component.rst +++ b/source/manual/tutorials/introducing_python_components/python_component.rst @@ -1,6 +1,6 @@ -############################# +============================== Setting Up A Python Component -############################# +============================== -TODO \ No newline at end of file +TODO diff --git a/source/manual/tutorials/introducing_python/basic_concepts.rst b/source/manual/tutorials/introducing_python_scripting/basic_concepts.rst similarity index 94% rename from source/manual/tutorials/introducing_python/basic_concepts.rst rename to source/manual/tutorials/introducing_python_scripting/basic_concepts.rst index ebe18a3f..94f2da04 100644 --- a/source/manual/tutorials/introducing_python/basic_concepts.rst +++ b/source/manual/tutorials/introducing_python_scripting/basic_concepts.rst @@ -1,8 +1,8 @@ .. _py-basic_concepts: -============== +============================== Basic Concepts -============== +============================== This tutorial will give you a quick introduction about how to use Python within the Game Engine. Basically, it will enable you to start with Python scripting avoiding typical errors and wrong paths. @@ -27,7 +27,7 @@ Just pick your poison. Take your time and learn the basics :-). If you go throug Logic Bricks: Python Controller +++++++++++++++++++++++++++++++ -.. figure:: /images/Tutorials/Introducing_Python/tutorials-introducing-python-01.png +.. figure:: /images/tutorials/introducing_python_scripting/introducing_python_1.png Controller brick at Logic Bricks editor @@ -44,7 +44,7 @@ These are all basic logic gates, but what if you want more control? What if you This is when you use a Python controller: -.. figure:: /images/Tutorials/Introducing_Python/tutorials-introducing-python-02.png +.. figure:: /images/tutorials/introducing_python_scripting/introducing_python_2.png Python controller at Logic Bricks editor diff --git a/source/manual/tutorials/introducing_python_scripting/group_instances.rst b/source/manual/tutorials/introducing_python_scripting/group_instances.rst new file mode 100644 index 00000000..eb6eba2d --- /dev/null +++ b/source/manual/tutorials/introducing_python_scripting/group_instances.rst @@ -0,0 +1,6 @@ + +============================== +Dealing With Group Instances +============================== + +TODO diff --git a/source/manual/tutorials/introducing_python/index.rst b/source/manual/tutorials/introducing_python_scripting/index.rst similarity index 59% rename from source/manual/tutorials/introducing_python/index.rst rename to source/manual/tutorials/introducing_python_scripting/index.rst index cadd8dae..ff53dd06 100644 --- a/source/manual/tutorials/introducing_python/index.rst +++ b/source/manual/tutorials/introducing_python_scripting/index.rst @@ -1,8 +1,8 @@ .. _introducing_python-index: -++++++++++++++++++ -Introducing Python -++++++++++++++++++ +============================== +Introducing Python Scripting +============================== .. toctree:: :maxdepth: 2 diff --git a/source/manual/tutorials/introducing_python_scripting/move_object.rst b/source/manual/tutorials/introducing_python_scripting/move_object.rst new file mode 100644 index 00000000..ece8ee5d --- /dev/null +++ b/source/manual/tutorials/introducing_python_scripting/move_object.rst @@ -0,0 +1,6 @@ + +============================== +Moving A Cube +============================== + +TODO diff --git a/source/manual/tutorials/introducing_python_scripting/play_animation.rst b/source/manual/tutorials/introducing_python_scripting/play_animation.rst new file mode 100644 index 00000000..0e5ac0ec --- /dev/null +++ b/source/manual/tutorials/introducing_python_scripting/play_animation.rst @@ -0,0 +1,6 @@ + +============================== +Playing An Animation +============================== + +TODO