{"id":221,"date":"2021-08-04T21:04:16","date_gmt":"2021-08-04T19:04:16","guid":{"rendered":"https:\/\/workerbase.org\/wordpress\/?p=221"},"modified":"2021-11-20T15:52:02","modified_gmt":"2021-11-20T14:52:02","slug":"love2d-intro-notes","status":"publish","type":"post","link":"https:\/\/arkenidar.com\/wordpress\/2021\/08\/04\/love2d-intro-notes\/","title":{"rendered":"Love2D intro notes"},"content":{"rendered":"\n<p>Love2D is a way to build apps. It is based on the distribution of compressed bundles of files, usually a &#8220;main.lua&#8221; Lua script file plus other Lua scripts and optionally other files, tipically images and sounds.<\/p>\n\n\n\n<p>Love2D is mainly a way to build game apps with 2D graphic. It can leverage some of its cross-platform ability, both mobile and classic desktop systems.<\/p>\n\n\n\n<p>To activate a Love2D app you must use an installer with file extension association (or install its package). Extension association is a way to usually launch such apps, the other is in this form: &#8220;love gamefile.love&#8221;. The extension of the zipped compressed app bundle is &#8220;.love&#8221; in fact, and the above way is meant to launch the love2d app using the &#8220;love&#8221; runtime executable and the file to open as a &#8220;command line argument&#8221;, usable both in consoles and in desktop app launcher files (e.g. Windows or Linux app Icons).<\/p>\n\n\n\n<p>The &#8220;love&#8221; executable file is a runtime that can run both zipped &#8220;.love&#8221; files and directories containing Lua\/Love2D scripts also. Such directories must contain at least the &#8220;main.lua&#8221; file as app entry-point for program execution, and such directories can be distributed by zipping such contents with a zip compression program\/command and renaming such zip file to a love file extension: app.zip -&gt; app.love.<\/p>\n\n\n\n<p>To write such script textual files describing the program you can use a Lua IDE such as ZeroBrane Studio (written in wxlua) or Microsoft&#8217;s Visual Studio Code extendible IDE with Lua specific &#8220;extensions&#8221; from the &#8220;VSCode Extension Marketplace&#8221; (BTW VSCode is built mainly in JavaScript).<\/p>\n\n\n\n<figure class=\"wp-block-gallery columns-3 is-cropped wp-block-gallery-1 is-layout-flex wp-block-gallery-is-layout-flex\"><ul class=\"blocks-gallery-grid\"><li class=\"blocks-gallery-item\"><figure><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"576\" src=\"https:\/\/workerbase.org\/wordpress\/wp-content\/uploads\/2021\/08\/Screenshot_20210805_223932-1024x576.png\" alt=\"\" data-id=\"223\" data-full-url=\"https:\/\/workerbase.org\/wordpress\/wp-content\/uploads\/2021\/08\/Screenshot_20210805_223932.png\" data-link=\"https:\/\/workerbase.org\/wordpress\/2021\/08\/04\/love2d-intro-notes\/screenshot_20210805_223932\/\" class=\"wp-image-223\" srcset=\"https:\/\/arkenidar.com\/wordpress\/wp-content\/uploads\/2021\/08\/Screenshot_20210805_223932-1024x576.png 1024w, https:\/\/arkenidar.com\/wordpress\/wp-content\/uploads\/2021\/08\/Screenshot_20210805_223932-300x169.png 300w, https:\/\/arkenidar.com\/wordpress\/wp-content\/uploads\/2021\/08\/Screenshot_20210805_223932-768x432.png 768w, https:\/\/arkenidar.com\/wordpress\/wp-content\/uploads\/2021\/08\/Screenshot_20210805_223932.png 1366w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure><\/li><li class=\"blocks-gallery-item\"><figure><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"576\" src=\"https:\/\/workerbase.org\/wordpress\/wp-content\/uploads\/2021\/08\/Screenshot_20210805_224000-1024x576.png\" alt=\"\" data-id=\"224\" data-full-url=\"https:\/\/workerbase.org\/wordpress\/wp-content\/uploads\/2021\/08\/Screenshot_20210805_224000.png\" data-link=\"https:\/\/workerbase.org\/wordpress\/2021\/08\/04\/love2d-intro-notes\/screenshot_20210805_224000\/\" class=\"wp-image-224\" srcset=\"https:\/\/arkenidar.com\/wordpress\/wp-content\/uploads\/2021\/08\/Screenshot_20210805_224000-1024x576.png 1024w, https:\/\/arkenidar.com\/wordpress\/wp-content\/uploads\/2021\/08\/Screenshot_20210805_224000-300x169.png 300w, https:\/\/arkenidar.com\/wordpress\/wp-content\/uploads\/2021\/08\/Screenshot_20210805_224000-768x432.png 768w, https:\/\/arkenidar.com\/wordpress\/wp-content\/uploads\/2021\/08\/Screenshot_20210805_224000.png 1366w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure><\/li><li class=\"blocks-gallery-item\"><figure><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"576\" src=\"https:\/\/workerbase.org\/wordpress\/wp-content\/uploads\/2021\/08\/Screenshot_20210805_224019-1024x576.png\" alt=\"\" data-id=\"225\" data-full-url=\"https:\/\/workerbase.org\/wordpress\/wp-content\/uploads\/2021\/08\/Screenshot_20210805_224019.png\" data-link=\"https:\/\/workerbase.org\/wordpress\/2021\/08\/04\/love2d-intro-notes\/screenshot_20210805_224019\/\" class=\"wp-image-225\" srcset=\"https:\/\/arkenidar.com\/wordpress\/wp-content\/uploads\/2021\/08\/Screenshot_20210805_224019-1024x576.png 1024w, https:\/\/arkenidar.com\/wordpress\/wp-content\/uploads\/2021\/08\/Screenshot_20210805_224019-300x169.png 300w, https:\/\/arkenidar.com\/wordpress\/wp-content\/uploads\/2021\/08\/Screenshot_20210805_224019-768x432.png 768w, https:\/\/arkenidar.com\/wordpress\/wp-content\/uploads\/2021\/08\/Screenshot_20210805_224019.png 1366w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure><\/li><\/ul><figcaption class=\"blocks-gallery-caption\">Showing integration with GNU\/Linux classic open desktop, KDE Plasma on Ubuntu in this case, others are similar.<\/figcaption><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>Love2D is a way to build apps. It is based on the distribution of compressed bundles of files, usually a &#8220;main.lua&#8221; Lua script file plus other Lua scripts and optionally other files, tipically images and sounds. Love2D is mainly a way to build game apps with 2D graphic. It can leverage some of its cross-platform [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[22],"tags":[],"class_list":["post-221","post","type-post","status-publish","format-standard","hentry","category-computer"],"_links":{"self":[{"href":"https:\/\/arkenidar.com\/wordpress\/wp-json\/wp\/v2\/posts\/221","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/arkenidar.com\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/arkenidar.com\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/arkenidar.com\/wordpress\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/arkenidar.com\/wordpress\/wp-json\/wp\/v2\/comments?post=221"}],"version-history":[{"count":3,"href":"https:\/\/arkenidar.com\/wordpress\/wp-json\/wp\/v2\/posts\/221\/revisions"}],"predecessor-version":[{"id":227,"href":"https:\/\/arkenidar.com\/wordpress\/wp-json\/wp\/v2\/posts\/221\/revisions\/227"}],"wp:attachment":[{"href":"https:\/\/arkenidar.com\/wordpress\/wp-json\/wp\/v2\/media?parent=221"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/arkenidar.com\/wordpress\/wp-json\/wp\/v2\/categories?post=221"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/arkenidar.com\/wordpress\/wp-json\/wp\/v2\/tags?post=221"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}