Giter VIP home page Giter VIP logo

shy's Introduction

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 [email protected]:Larpon/shy.git ~/.vmodules/shy
v ~/.vmodules/shy # Builds the `shy` CLI tool

Windows

git clone [email protected]: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.

shy's People

Contributors

larpon avatar lmptg avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

Forkers

topcheese lmptg

shy's Issues

Fails to run on Mac SDL2 dependency and OpenGL

I forgot the exact command, but I think it's -glcore33 or something like it that I have to add in order to use any Sokol related libraries. I'm using an older Mac from 2011, so you may not want to support it.
I also had to do a "brew install pkg-config sdl2" for the first error.

Here is the last error.
Assertion failed: (desc->context.metal.device), function _sg_mtl_setup_backend, file sokol_gfx.h, line 10752.

Edit: It does run with the proper command. v -d darwin_sokol_glcore33

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.