10000 GitHub - larpon/shy: Helps you being creative in V
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
/ shy Public

Helps you being creative in V

License

Notifications You must be signed in to change notification settings

larpon/shy

{"props":{"initialPayload":{"allShortcutsEnabled":false,"path":"/","repo":{"id":521920054,"defaultBranch":"master","name":"shy","ownerLogin":"larpon","currentUserCanPush":false,"isFork":false,"isEmpty":false,"createdAt":"2022-08-06T10:51:40.000Z","ownerAvatar":"https://avatars.githubusercontent.com/u/768942?v=4","public":true,"private":false,"isOrgOwned":false},"currentUser":null,"refInfo":{"name":"master","listCacheKey":"v0:1746787869.0","canEdit":false,"refType":"branch","currentOid":"48547d657a9c12000cf0c8949e274db37368399d"},"tree":{"items":[{"name":".github/workflows","path":".github/workflows","contentType":"directory","hasSimplifiedPath":true},{"name":"analyse","path":"analyse","contentType":"directory"},{"name":"assets","path":"assets","contentType":"directory"},{"name":"cli","path":"cli","contentType":"directory"},{"name":"cmd","path":"cmd","contentType":"directory"},{"name":"docs","path":"docs","contentType":"directory"},{"name":"ease","path":"ease","contentType":"directory"},{"name":"easy","path":"easy","contentType":"directory"},{"name":"embed","path":"embed","contentType":"directory"},{"name":"examples","path":"examples","contentType":"directory"},{"name":"export","path":"export","contentType":"directory"},{"name":"extras/ingrid","path":"extras/ingrid","contentType":"directory","hasSimplifiedPath":true},{"name":"fetch","path":"fetch","contentType":"directory"},{"name":"graph","path":"graph","contentType":"directory"},{"name":"lib","path":"lib","contentType":"directory"},{"name":"log","path":"log","contentType":"directory"},{"name":"mth","path":"mth","contentType":"directory"},{"name":"particle","path":"particle","contentType":"directory"},{"name":"patches","path":"patches","contentType":"directory"},{"name":"paths","path":"paths","contentType":"directory"},{"name":"platforms/wasm/emscripten","path":"platforms/wasm/emscripten","contentType":"directory","hasSimplifiedPath":true},{"name":"tests","path":"tests","contentType":"directory"},{"name":"thirdparty","path":"thirdparty","contentType":"directory"},{"name":"ui","path":"ui","contentType":"directory"},{"name":"utils","path":"utils","contentType":"directory"},{"name":"vec","path":"vec","contentType":"directory"},{"name":"vxt","path":"vxt","contentType":"directory"},{"name":"wraps","path":"wraps","contentType":"directory"},{"name":".editorconfig","path":".editorconfig","contentType":"file"},{"name":".gitattributes","path":".gitattributes","contentType":"file"},{"name":".gitignore","path":".gitignore","contentType":"file"},{"name":"LICENSE","path":"LICENSE","contentType":"file"},{"name":"README.md","path":"README.md","contentType":"file"},{"name":"shy.default.config.toml","path":"shy.default.config.toml","contentType":"file"},{"name":"shy.svg","path":"shy.svg","contentType":"file"},{"name":"shy.v","path":"shy.v","contentType":"file"},{"name":"v.mod","path":"v.mod","contentType":"file"}],"templateDirectorySuggestionUrl":null,"readme":null,"totalCount":37,"showBranchInfobar":false},"fileTree":null,"fileTreeProcessingTime":null,"foldersToFetch":[],"treeExpanded":false,"symbolsExpanded":false,"isOverview":true,"overview":{"banners":{"shouldRecommendReadme":false,"isPersonalRepo":false,"showUseActionBanner":false,"actionSlug":null,"actionId":null,"showProtectBranchBanner":false,"publishBannersInfo":{"dismissActionNoticePath":"/settings/dismiss-notice/publish_action_from_repo","releasePath":"/larpon/shy/releases/new?marketplace=true","showPublishActionBanner":false},"interactionLimitBanner":null,"showInvitationBanner":false,"inviterName":null,"actionsMigrationBannerInfo":{"releaseTags":[],"showImmutableActionsMigrationBanner":false,"initialMigrationStatus":null}},"codeButton":{"contactPath":"/contact","isEnterprise":false,"local":{"protocolInfo":{"httpAvailable":true,"sshAvailable":null,"httpUrl":"https://github.com/larpon/shy.git","showCloneWarning":null,"sshUrl":null,"sshCertificatesRequired":null,"sshCertificatesAvailable":null,"ghCliUrl":"gh repo clone larpon/shy","defaultProtocol":"http","newSshKeyUrl":"/settings/ssh/new","setProtocolPath":"/users/set_protocol"},"platformInfo":{"cloneUrl":"https://desktop.github.com","showVisualStudioCloneButton":false,"visualStudioCloneUrl":"https://windows.github.com","showXcodeCloneButton":false,"xcodeCloneUrl":"xcode://clone?repo=https%3A%2F%2Fgithub.com%2Flarpon%2Fshy","zipballUrl":"/larpon/shy/archive/refs/heads/master.zip"}},"newCodespacePath":"/codespaces/new?hide_repo_select=true\u0026repo=521920054"},"popovers":{"rename":null,"renamedParentRepo":null},"commitCount":"581","overviewFiles":[{"displayName":"README.md","repoName":"shy","refName":"master","path":"README.md","preferredFileType":"readme","tabName":"README","richText":"\u003carticle class=\"markdown-body entry-content container-lg\" itemprop=\"text\"\u003e\u003cp dir=\"auto\"\u003e\u003ca target=\"_blank\" rel=\"noopener noreferrer\" href=\"/larpon/shy/blob/master/shy.svg\"\u003e\u003cimg src=\"/larpon/shy/raw/master/shy.svg\" width=\"128\" style=\"max-width: 100%;\"\u003e\u003c/a\u003e\u003c/p\u003e\n\u003cdiv class=\"markdown-heading\" dir=\"auto\"\u003e\u003ch1 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\"\u003eShy\u003c/h1\u003e\u003ca id=\"user-content-shy\" class=\"anchor\" aria-label=\"Permalink: Shy\" href=\"#shy\"\u003e\u003csvg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"\u003e\u003cpath d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"\u003e\u003c/path\u003e\u003c/svg\u003e\u003c/a\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eAims to be an intuitive, opinionated and solid foundation for game development and\ncreative coding written in \u003ca href=\"https://vlang.io\" rel=\"nofollow\"\u003eV\u003c/a\u003e with which you can easily build and distribute small\nto medium sized 2D games or applications.\u003c/p\u003e\n\u003cp dir=\"auto\"\u003eThe \u003ccode\u003eshy\u003c/code\u003e project works both as a V module and a standalone CLI tool.\u003c/p\u003e\n\u003cdiv class=\"markdown-heading\" dir=\"auto\"\u003e\u003ch1 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\"\u003eGames made with Shy\u003c/h1\u003e\u003ca id=\"user-content-games-made-with-shy\" class=\"anchor\" aria-label=\"Permalink: Games made with Shy\" href=\"#games-made-with-shy\"\u003e\u003csvg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"\u003e\u003cpath d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"\u003e\u003c/path\u003e\u003c/svg\u003e\u003c/a\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003e\u003ca href=\"https://blackgrain.itch.io/puzzle-vibes\" rel=\"nofollow\"\u003ePuzzle Vibes\u003c/a\u003e (\u003ca href=\"https://github.com/larpon/puzzle_vibes\"\u003eSource\u003c/a\u003e)\u003c/p\u003e\n\u003cdiv class=\"markdown-heading\" dir=\"auto\"\u003e\u003ch1 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\"\u003eTargets\u003c/h1\u003e\u003ca id=\"user-content-targets\" class=\"anchor\" aria-label=\"Permalink: Targets\" href=\"#targets\"\u003e\u003csvg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"\u003e\u003cpath d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"\u003e\u003c/path\u003e\u003c/svg\u003e\u003c/a\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003ePlease note that export and developing/building/running from some\nof these platforms are still work-in-progress, but we aim to support\na wide range of targets like the following:\u003c/p\u003e\n\u003cp dir=\"auto\"\u003eWindows, macOS, Linux, Raspberry PI, Android, Web (WASM/emscripten) and likely more.\u003c/p\u003e\n\u003cdiv class=\"markdown-heading\" dir=\"auto\"\u003e\u003ch1 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\"\u003eHighlights\u003c/h1\u003e\u003ca id=\"user-content-highlights\" class=\"anchor\" aria-label=\"Permalink: Highlights\" href=\"#highlights\"\u003e\u003csvg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"\u003e\u003cpath d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"\u003e\u003c/path\u003e\u003c/svg\u003e\u003c/a\u003e\u003c/div\u003e\n\u003cul dir=\"auto\"\u003e\n\u003cli\u003eGet your creative ideas up and running relatively quick.\u003c/li\u003e\n\u003cli\u003eRich examples directory.\u003c/li\u003e\n\u003cli\u003eLive coding and runtime experimenting via V's \u003ccode\u003e-live\u003c/code\u003e flag.\u003c/li\u003e\n\u003cli\u003eAnimation and timer system - built right in.\u003c/li\u003e\n\u003cli\u003eEasy timers with \u003ccode\u003eshy.once(...)\u003c/code\u003e or \u003ccode\u003eshy.every(...)\u003c/code\u003e.\u003c/li\u003e\n\u003cli\u003e2D shape drawing with several levels, layers of control and performance.\u003c/li\u003e\n\u003cli\u003e2D shape collision detection.\u003c/li\u003e\n\u003cli\u003e3D capable (via \u003ccode\u003esokol_gfx.h\u003c/code\u003e)\u003c/li\u003e\n\u003cli\u003eMultiple, runtime switchable, render modes (immediate, UI, step).\u003c/li\u003e\n\u003cli\u003e\u003ca href=\"https://github.com/larpon/shy/blob/master/.github/workflows/ci_visual_tests.yml\"\u003eVisually tested\u003c/a\u003e for graphic regressions.\u003c/li\u003e\n\u003cli\u003eFairly sub-system agnostic. Bring your own ECS, physics engine etc.\u003c/li\u003e\n\u003cli\u003e[WIP] Assets system for easy loading (and freeing) of all kinds of assets: binary blobs, images,\nmusic, sounds etc.\u003c/li\u003e\n\u003cli\u003e[WIP] Export to different platforms via the \u003ccode\u003eshy export\u003c/code\u003e command.\u003c/li\u003e\n\u003cli\u003e[WIP] Intuitive Qt/Widgets/QML (scene graph) inspired \u003ccode\u003eui\u003c/code\u003e module\nsupporting \u003cem\u003ecustom\u003c/em\u003e UI items.\u003c/li\u003e\n\u003cli\u003e[WIP] ... much more :)\u003c/li\u003e\n\u003c/ul\u003e\n\u003cdiv class=\"markdown-heading\" dir=\"auto\"\u003e\u003ch1 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\"\u003eCurrently known downsides\u003c/h1\u003e\u003ca id=\"user-content-currently-known-downsides\" class=\"anchor\" aria-label=\"Permalink: Currently known downsides\" href=\"#currently-known-downsides\"\u003e\u003csvg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"\u003e\u003cpath d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"\u003e\u003c/path\u003e\u003c/svg\u003e\u003c/a\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eThe following points may turn you away from using \u003ccode\u003eshy\u003c/code\u003e at this point\nin time so use \u003ccode\u003eshy\u003c/code\u003e at your own risk and expense.\u003c/p\u003e\n\u003cul dir=\"auto\"\u003e\n\u003cli\u003e~100% Deterministic behaviour is [WIP].\u003c/li\u003e\n\u003cli\u003eMulti-window rendering support has relatively low priority and may never be supported.\u003c/li\u003e\n\u003cli\u003eThe \u003ccode\u003eshy.ui\u003c/code\u003e module's design goals can not currently be met 100% due to\nvery-hard-to-reproduce bugs in the V compiler - mileage may vary until these bugs are squashed.\u003c/li\u003e\n\u003cli\u003eExporting of finished games, for real world distribution, can currently be complex.\nIt has high priority to get the exporters working as painless as possible but it takes time.\u003c/li\u003e\n\u003cli\u003eNo visual editor(s), at the moment. Hopefully it'll come quick when the \u003ccode\u003eui\u003c/code\u003e module matures.\u003c/li\u003e\n\u003cli\u003eExport currently requires to be done from the target platform(s).\u003c/li\u003e\n\u003cli\u003eDocumentation is far from complete. Use the \u003ccode\u003eexamples\u003c/code\u003e for guidance.\u003c/li\u003e\n\u003cli\u003eC code vs. V code ratio leans towards C - this will improve over time as more and more\nfunctionality becomes available in V\u003c/li\u003e\n\u003c/ul\u003e\n\u003cdiv class=\"markdown-heading\" dir=\"auto\"\u003e\u003ch1 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\"\u003eInstall\u003c/h1\u003e\u003ca id=\"user-content-install\" class=\"anchor\" aria-label=\"Permalink: Install\" href=\"#install\"\u003e\u003csvg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"\u003e\u003cpath d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"\u003e\u003c/path\u003e\u003c/svg\u003e\u003c/a\u003e\u003c/div\u003e\n\u003cdiv class=\"markdown-heading\" dir=\"auto\"\u003e\u003ch2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\"\u003eDependencies\u003c/h2\u003e\u003ca id=\"user-content-dependencies\" class=\"anchor\" aria-label=\"Permalink: Dependencies\" href=\"#dependencies\"\u003e\u003csvg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"\u003e\u003cpath d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"\u003e\u003c/path\u003e\u003c/svg\u003e\u003c/a\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003e\u003ccode\u003eshy\u003c/code\u003e currently depend on \u003ca href=\"https://github.com/vlang/sdl.git\"\u003e\u003ccode\u003esdl\u003c/code\u003e\u003c/a\u003e and \u003ca href=\"https://github.com/vlang/vab.git\"\u003e\u003ccode\u003evab\u003c/code\u003e\u003c/a\u003e official V modules.\u003c/p\u003e\n\u003cp dir=\"auto\"\u003e\u003cstrong\u003esdl\u003c/strong\u003e\u003c/p\u003e\n\u003cp dir=\"auto\"\u003eDue to V's package management being in it's infancy it is recommended to install\nthe \u003ccode\u003esdl\u003c/code\u003e module via \u003ccode\u003egit\u003c/code\u003e:\u003c/p\u003e\n\u003cdiv class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"git clone https://github.com/vlang/sdl.git ~/.vmodules/sdl\nv ~/.vmodules/sdl/setup.vsh # this will try and detect the system installed version of SDL2\"\u003e\u003cpre\u003egit clone https://github.com/vlang/sdl.git \u003cspan class=\"pl-k\"\u003e~\u003c/span\u003e/.vmodules/sdl\nv \u003cspan class=\"pl-k\"\u003e~\u003c/span\u003e/.vmodules/sdl/setup.vsh \u003cspan class=\"pl-c\"\u003e\u003cspan class=\"pl-c\"\u003e#\u003c/span\u003e this will try and detect the system installed version of SDL2\u003c/span\u003e\u003c/pre\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eon Windows via \u003ccode\u003ecmd.exe\u003c/code\u003e:\u003c/p\u003e\n\u003cdiv class=\"highlight highlight-source-batchfile notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"git clone https://github.com/vlang/sdl.git %HOMEPATH%/.vmodules/sdl\ngit -C %HOMEPATH%/.vmodules/sdl checkout 2.26.0\"\u003e\u003cpre\u003egit clone https://github.com/vlang/sdl.git \u003cspan class=\"pl-smi\"\u003e%HOMEPATH%\u003c/span\u003e/.vmodules/sdl\ngit -C \u003cspan class=\"pl-smi\"\u003e%HOMEPATH%\u003c/span\u003e/.vmodules/sdl checkout 2.26.0\u003c/pre\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eThe \u003ccode\u003esdl\u003c/code\u003e dependency is needed for the default backend. It will likely\nbe moved to be part of another backend or opt-in once \u003ccode\u003eshy\u003c/code\u003e matures\nbut for now you'll need the SDL2 library at build and runtime.\u003c/p\u003e\n\u003cp dir=\"auto\"\u003e\u003cstrong\u003evab\u003c/strong\u003e\u003c/p\u003e\n\u003cdiv class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"v install vab\"\u003e\u003cpre\u003ev install vab\u003c/pre\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003e\u003ccode\u003evab\u003c/code\u003e is used by \u003ccode\u003eshy export\u003c/code\u003e and \u003cem\u003edoes not\u003c/em\u003e require you to have Java nor\nthe Android SDK/NDK installed. \u003ccode\u003eshy export\u003c/code\u003e need only \u003ccode\u003evab\u003c/code\u003e to be installed as a module.\u003c/p\u003e\n\u003cp dir=\"auto\"\u003eHowever if you intend to export your shy creations to the Android platform the aforementioned\ndependencies are thus needed at \u003cem\u003eruntime\u003c/em\u003e for \u003ccode\u003evab\u003c/code\u003e to work.\u003c/p\u003e\n\u003cdiv class=\"markdown-heading\" dir=\"auto\"\u003e\u003ch2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\"\u003eUnix (Linux, macOS)\u003c/h2\u003e\u003ca id=\"user-content-unix-linux-macos\" class=\"anchor\" aria-label=\"Permalink: Unix (Linux, macOS)\" href=\"#unix-linux-macos\"\u003e\u003csvg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"\u003e\u003cpath d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"\u003e\u003c/path\u003e\u003c/svg\u003e\u003c/a\u003e\u003c/div\u003e\n\u003cdiv class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"git clone git@github.com:Larpon/shy.git ~/.vmodules/shy\nv ~/.vmodules/shy # Builds the `shy` CLI tool\"\u003e\u003cpre\u003egit clone git@github.com:Larpon/shy.git \u003cspan class=\"pl-k\"\u003e~\u003c/span\u003e/.vmodules/shy\nv \u003cspan class=\"pl-k\"\u003e~\u003c/span\u003e/.vmodules/shy \u003cspan class=\"pl-c\"\u003e\u003cspan class=\"pl-c\"\u003e#\u003c/span\u003e Builds the `shy` CLI tool\u003c/span\u003e\u003c/pre\u003e\u003c/div\u003e\n\u003cdiv class=\"markdown-heading\" dir=\"auto\"\u003e\u003ch2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\"\u003eWindows\u003c/h2\u003e\u003ca id=\"user-content-windows\" class=\"anchor\" aria-label=\"Permalink: Windows\" href=\"#windows\"\u003e\u003csvg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"\u003e\u003cpath d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"\u003e\u003c/path\u003e\u003c/svg\u003e\u003c/a\u003e\u003c/div\u003e\n\u003cdiv class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"git clone git@github.com:Larpon/shy.git %USERPROFILE%/.vmodules/shy\nv %USERPROFILE%\\.vmodules\\shy # Builds the `shy` CLI tool\"\u003e\u003cpre\u003egit clone git@github.com:Larpon/shy.git %USERPROFILE%/.vmodules/shy\nv %USERPROFILE%\u003cspan class=\"pl-cce\"\u003e\\.\u003c/span\u003evmodules\u003cspan class=\"pl-cce\"\u003e\\s\u003c/span\u003ehy \u003cspan class=\"pl-c\"\u003e\u003cspan class=\"pl-c\"\u003e#\u003c/span\u003e Builds the `shy` CLI tool\u003c/span\u003e\u003c/pre\u003e\u003c/div\u003e\n\u003cdiv class=\"markdown-heading\" dir=\"auto\"\u003e\u003ch2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\"\u003eSymlink (optional)\u003c/h2\u003e\u003ca id=\"user-content-symlink-optional\" class=\"anchor\" aria-label=\"Permalink: Symlink (optional)\" href=\"#symlink-optional\"\u003e\u003csvg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"\u003e\u003cpath d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"\u003e\u003c/path\u003e\u003c/svg\u003e\u003c/a\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eYou can symlink \u003ccode\u003eshy\u003c/code\u003e to your \u003ccode\u003e$PATH\u003c/code\u003e so it works as a global shell command.\u003c/p\u003e\n\u003cdiv class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"sudo ln -s ~/.vmodules/shy/shy /usr/local/bin/shy\"\u003e\u003cpre\u003esudo ln -s \u003cspan class=\"pl-k\"\u003e~\u003c/span\u003e/.vmodules/shy/shy /usr/local/bin/shy\u003c/pre\u003e\u003c/div\u003e\n\u003cdiv class=\"markdown-heading\" dir=\"auto\"\u003e\u003ch2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\"\u003eShell tab completion (optional)\u003c/h2\u003e\u003ca id=\"user-content-shell-tab-completion-optional\" class=\"anchor\" aria-label=\"Permalink: Shell tab completion (optional)\" href=\"#shell-tab-completion-optional\"\u003e\u003csvg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"\u003e\u003cpath d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"\u003e\u003c/path\u003e\u003c/svg\u003e\u003c/a\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eYou can install tab completions for your shell by \u003ca href=\"https://github.com/larpon/shy/blob/fb26741/cmd/complete.v#L11-L38\"\u003efollowing the instructions\nhere\u003c/a\u003e.\u003c/p\u003e\n\u003cdiv class=\"markdown-heading\" dir=\"auto\"\u003e\u003ch1 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\"\u003eGamepad / Controller support\u003c/h1\u003e\u003ca id=\"user-content-gamepad--controller-support\" class=\"anchor\" aria-label=\"Permalink: Gamepad / Controller support\" href=\"#gamepad--controller-support\"\u003e\u003csvg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"\u003e\u003cpath d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"\u003e\u003c/path\u003e\u003c/svg\u003e\u003c/a\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eTo enable game controller support shy needs to be built with\nSDL2 version \u0026gt;= 2.26.0 in addition to the compile flag \u003ccode\u003e-d shy_gamepad\u003c/code\u003e.\u003c/p\u003e\n\u003c/article\u003e","loaded":true,"timedOut":false,"errorMessage":null,"headerInfo":{"toc":[{"level":1,"text":"Shy","anchor":"shy","htmlText":"Shy"},{"level":1,"text":"Games made with Shy","anchor":"games-made-with-shy","htmlText":"Games made with Shy"},{"level":1,"text":"Targets","anchor":"targets","htmlText":"Targets"},{"level":1,"text":"Highlights","anchor":"highlights","htmlText":"Highlights"},{"level":1,"text":"Currently known downsides","anchor":"currently-known-downsides","htmlText":"Currently known downsides"},{"level":1,"text":"Install","anchor":"install","htmlText":"Install"},{"level":2,"text":"Dependencies","anchor":"dependencies","htmlText":"Dependencies"},{"level":2,"text":"Unix (Linux, macOS)","anchor":"unix-linux-macos","htmlText":"Unix (Linux, macOS)"},{"level":2,"text":"Windows","anchor":"windows","htmlText":"Windows"},{"level":2,"text":"Symlink (optional)","anchor":"symlink-optional","htmlText":"Symlink (optional)"},{"level":2,"text":"Shell tab completion (optional)","anchor":"shell-tab-completion-optional","htmlText":"Shell tab completion (optional)"},{"level":1,"text":"Gamepad / Controller support","anchor":"gamepad--controller-support","htmlText":"Gamepad / Controller support"}],"siteNavLoginPath":"/login?return_to=https%3A%2F%2Fgithub.com%2FLarpon%2Fshy"}},{"displayName":"LICENSE","repoName":"shy","refName":"master","path":"LICENSE","preferredFileType":"license","tabName":"MIT","richText":null,"loaded":false,"timedOut":false,"errorMessage":null,"headerInfo":{"toc":null,"siteNavLoginPath":"/login?return_to=https%3A%2F%2Fgithub.com%2FLarpon%2Fshy"}}],"overviewFilesProcessingTime":0}},"appPayload":{"helpUrl":"https://docs.github.com","findFileWorkerPath":"/assets-cdn/worker/find-file-worker-7d7eb7c71814.js","findInFileWorkerPath":"/assets-cdn/worker/find-in-file-worker-4dde5cbad90b.js","githubDevUrl":null,"enabled_features":{"copilot_workspace":null,"code_nav_ui_events":false,"react_blob_overlay":false,"accessible_code_button":true,"github_models_repo_integration":false}}}}

Repository files navigation

Shy

Aims to be an intuitive, opinionated and solid foundation for game development and creative coding written in V with which you can easily build and distribute small to medium sized 2D games or applications.

The shy project works both as a V module and a standalone CLI tool.

Games made with Shy

Puzzle Vibes (Source)

Targets

Please note that export and developing/building/running from some of these platforms are still work-in-progress, but we aim to support a wide range of targets like the following:

Windows, macOS, Linux, Raspberry PI, Android, Web (WASM/emscripten) and likely more.

Highlights

  • Get your creative ideas up and running relatively quick.
  • Rich examples directory.
  • Live coding and runtime experimenting via V's -live flag.
  • Animation and timer system - built right in.
  • Easy timers with shy.once(...) or shy.every(...).
  • 2D shape drawing with several levels, layers of control and performance.
  • 2D shape collision detection.
  • 3D capable (via sokol_gfx.h)
  • Multiple, runtime switchable, render modes (immediate, UI, step).
  • Visually tested for graphic regressions.
  • Fairly sub-system agnostic. Bring your own ECS, physics engine etc.
  • [WIP] Assets system for easy loading (and freeing) of all kinds of assets: binary blobs, images, music, sounds etc.
  • [WIP] Export to different platforms via the shy export command.
  • [WIP] Intuitive Qt/Widgets/QML (scene graph) inspired ui module supporting custom UI items.
  • [WIP] ... much more :)

Currently known downsides

The following points may turn you away from using shy at this point in time so use shy at your own risk and expense.

  • ~100% Deterministic behaviour is [WIP].
  • Multi-window rendering support has relatively low priority and may never be supported.
  • The shy.ui module's design goals can not currently be met 100% due to very-hard-to-reproduce bugs in the V compiler - mileage may vary until these bugs are squashed.
  • Exporting of finished games, for real world distribution, can currently be complex. It has high priority to get the exporters working as painless as possible but it takes time.
  • No visual editor(s), at the moment. Hopefully it'll come quick when the ui module matures.
  • Export currently requires to be done from the target platform(s).
  • Documentation is far from complete. Use the examples for guidance.
  • C code vs. V code ratio leans towards C - this will improve over time as more and more functionality becomes available in V

Install

Dependencies

shy currently depend on sdl and vab official V modules.

sdl

Due to V's package management being in it's infancy it is recommended to install the sdl module via git:

git clone https://github.com/vlang/sdl.git ~/.vmodules/sdl
v ~/.vmodules/sdl/setup.vsh # this will try and detect the system installed version of SDL2

on Windows via cmd.exe:

git clone https://github.com/vlang/sdl.git %HOMEPATH%/.vmodules/sdl
git -C %HOMEPATH%/.vmodules/sdl checkout 2.26.0

The sdl dependency is needed for the default backend. It will likely be moved to be part of another backend or opt-in once shy matures but for now you'll need the SDL2 library at build and runtime.

vab

v install vab

vab is used by shy export and does not require you to have Java nor the Android SDK/NDK installed. shy export need only vab to be installed as a module.

However if you intend to export your shy creations to the Android platform the aforementioned dependencies are thus needed at runtime for vab to work.

Unix (Linux, macOS)

git clone git@github.com:Larpon/shy.git ~/.vmodules/shy
v ~/.vmodules/shy # Builds the `shy` CLI tool

Windows

git clone git@github.com:Larpon/shy.git %USERPROFILE%/.vmodules/shy
v %USERPROFILE%\.vmodules\shy # Builds the `shy` CLI tool

Symlink (optional)

You can symlink shy to your $PATH so it works as a global shell command.

sudo ln -s ~/.vmodules/shy/shy /usr/local/bin/shy

Shell tab completion (optional)

You can install tab completions for your shell by following the instructions here.

Gamepad / Controller support

To enable game controller support shy needs to be built with SDL2 version >= 2.26.0 in addition to the compile flag -d shy_gamepad.

0