Просмотр исходного кода

Added short workflow manuals for writing code and creating application bundles

Björn Ritzl 6 лет назад
Родитель
Сommit
47a53e6157

+ 8 - 0
docs/en/en.json

@@ -154,6 +154,10 @@
                         "path": "/manuals/workflow",
                         "name": "Workflow"
                     },
+                    {
+                        "path": "/manuals/writing-code",
+                        "name": "Writing code"
+                    },
                     {
                         "path": "/manuals/hot-reload",
                         "name": "Hot reloading"
@@ -170,6 +174,10 @@
                         "path": "/manuals/profiling",
                         "name": "Profiling"
                     },
+                    {
+                        "path": "/manuals/bundling",
+                        "name": "Bundling an application"
+                    },
                     {
                         "path": "/manuals/flash",
                         "name": "Defold for Flash users"

+ 54 - 0
docs/en/manuals/bundling.md

@@ -0,0 +1,54 @@
+---
+title: Bundling an application
+brief: This manual covers how to create an application bundle.
+---
+
+# Bundling an application
+
+While developing your application you should make a habit of testing the game on the target platform(s) as often as possible. You should do this to detect performance issues early in the development process where these things are much easier to fix than when the application is almost finished. It is also good to test on all target platforms to find discrepancies in for instances shaders early on. When developing on mobile you have the option to use the [mobile development app](/manuals/dev-app/) to push content to the app, instead of having to do a full rebuild and uninstall/install cycle.
+
+You can create an application bundle for all platforms that Defold supports from within the Defold editor itself, with no external tools needed. You can also bundle from the command line using our command line tools.
+
+## Bundling from within the editor
+
+You create an application bundle from the Project menu and Bundle option:
+
+![](images/bundling/bundle_menu.png)
+
+Selecting any of the menu options will bring up the Bundle dialog for that specific platform.
+
+### Android
+
+Creating an Android application bundle (.apk file) as well as the prerequisite setup is documented in the [Android manual](/manuals/android/#_creating_an_android_application_bundle).
+
+### iOS
+
+Creating an iOS application bundle (.ipa file) as well as the prerequisite setup is documented in the [iOS manual](/manuals/ios/#_creating_an_ios_application_bundle).
+
+### OSX
+
+Creating an OSX application bundle (.app file) requires no specific setup, but optional platform specific configuration is done in the "game.project" [project settings file](/manuals/project-settings/#_macos_os_x).
+
+### Linux
+
+Creating a Linux application bundle requires no specific setup and no optional platform specific configuration in the "game.project" [project settings file](/manuals/project-settings/).
+
+### Windows
+
+Creating a Windows application bundle (.exe file) requires no specific setup, but optional platform specific configuration is done in the "game.project" [project settings file](/manuals/project-settings/#_windows).
+
+#### Facebook Gameroom
+
+It is possible to create a special version of a Windows application bundle specifically for Facebook Gameroom. This process is documented in the [Facebook Gameroom manual](/manuals/gameroom/).
+
+### HTML5
+
+Creating an HTML5 application bundle as well as optional setup is documented in the [HTML5 manual](/manuals/html5/#_creating_html5_content).
+
+#### Facebook Instant Games
+
+It is possible to create a special version of an HTML5 application bundle specifically for Facebook Instant Games. This process is documented in the [Facebook Instant Games manual](/manuals/instant-games/).
+
+## Bundling from the command line
+
+While doing day to day development of your application it is likely that you build and bundle from within the Defold editor. In other circumstances you may wish to automatically generate application bundles, for instance batch building for all targets when releasing a new version or when creating nightly builds of the latest version of the game, perhaps in a CI environment. Building and bundling of an application can be done outside the normal editor workflow using the [Bob command line tool](/manuals/bob/).

BIN
docs/en/manuals/images/bundling/bundle_menu.png


+ 24 - 0
docs/en/manuals/writing-code.md

@@ -0,0 +1,24 @@
+---
+title: Writing code
+brief: This manual briefly covers how to work with code in Defold.
+---
+
+# Writing code
+
+While Defold allows you to create a lot of your game content using visual tools such as the tilemap and particle effect editors you still create your game logic using a code editor. Game logic should mainly be written using the [Lua programming language](https://www.lua.org/) while extensions to the engine itself is written using the native language(s) for the target platform.
+
+Defold has a built in text editor that allows you to open and edit Lua files (.lua extension), Defold script files (.script, .gui_script and .render_script) as well as any other file that with a file extension not natively handled by the editor. Additionally the editor provides syntax highlighting for Lua and script files.
+
+## Writing Lua code
+
+Defold uses Lua 5.1 and LuaJIT (depending on target platform) and you need to follow the language specification for those specific versions of Lua when writing your game logic. For more details on how to work with Lua in Defold see our [Lua in Defold manual](/manuals/lua).
+
+## Writing native code
+
+Defold allows you to extend the game engine with native code to access platform specific functionality not provided by the engine itself. You can also use native code when the performance of Lua isn't enough (resource intensive calculations, image processing etc). Refer to our [manuals on Native Extensions](/manuals/extensions/) to learn more.
+
+## Using an external code editor
+
+The code editor in Defold provides the basic functionality you need to write code, but for more advanced use cases or for power users with a favorite code editor it is possible to let Defold open files using an external editor. In the Preferences window under the Code tab it is possible to define an external editor that should be used when editing code.
+
+The Defold community has created auto-complete plugins for popular editors such as [Atom](https://atom.io/packages/defold-ide), [Visual Studio Code](https://marketplace.visualstudio.com/items?itemName=selimanac.defold-vsc-snippets) and [Sublime](https://forum.defold.com/t/full-autocomplete-defold-api-for-sublime-text-3/10910). In addition to these there is also API reference packages for [Dash and Zeal](https://forum.defold.com/t/defold-docset-for-dash/2417).