All Projects → lieff → lvg

lieff / lvg

Licence: CC0-1.0 license
Lion Vector Graphics

Programming Languages

c
50402 projects - #5 most used programming language
actionscript
884 projects
AngelScript
46 projects
C++
36643 projects - #6 most used programming language
shell
77523 projects
Meson
512 projects

Projects that are alternatives of or similar to lvg

Gapid
GAPID is a collection of tools that allows you to inspect, tweak and replay calls from an application to a graphics driver.
Stars: ✭ 1,975 (+1763.21%)
Mutual labels:  gles, opengl-es, gles2
Glad
Multi-Language Vulkan/GL/GLES/EGL/GLX/WGL Loader-Generator based on the official specs.
Stars: ✭ 2,296 (+2066.04%)
Mutual labels:  gles, gles2
Jpexs Decompiler
JPEXS Free Flash Decompiler
Stars: ✭ 2,939 (+2672.64%)
Mutual labels:  flash, swf
guepard
flash to html5 converter, as3 to javascript translator
Stars: ✭ 58 (-45.28%)
Mutual labels:  flash, swf
swiffas
SWF parser and AVM2 (Actionscript 3) bytecode parser
Stars: ✭ 15 (-85.85%)
Mutual labels:  flash, swf
flashmingo
Automatic analysis of SWF files based on some heuristics. Extensible via plugins.
Stars: ✭ 117 (+10.38%)
Mutual labels:  flash, swf
yupi
🎲 open source gaming emulator for flash based games
Stars: ✭ 28 (-73.58%)
Mutual labels:  flash, swf
Ruffle
A Flash Player emulator written in Rust
Stars: ✭ 9,128 (+8511.32%)
Mutual labels:  flash, swf
Pigs-In-A-Blanket
A Piglet/ShaccCg Wrapper Library for OpenGL ES 2.0 Support on the Vita
Stars: ✭ 37 (-65.09%)
Mutual labels:  opengl-es, gles2
accumulator
Cryptographic accumulators in Rust.
Stars: ✭ 115 (+8.49%)
Mutual labels:  vector
Virtual Controllers
Virtual controls for use in Flash based games on touch devices. Includes thumbstick and button ui elements
Stars: ✭ 16 (-84.91%)
Mutual labels:  flash
cogj-spec
Cloud Optimized GeoJSON spec
Stars: ✭ 36 (-66.04%)
Mutual labels:  vector
elm-3d-camera
Camera type for doing 3D rendering in Elm
Stars: ✭ 12 (-88.68%)
Mutual labels:  vector
rrbit
An Immutable vectors/lists/arrays library using the Relaxed Radix Balancing(RRB) technique
Stars: ✭ 12 (-88.68%)
Mutual labels:  vector
magnum-extras
Extras for the Magnum C++11/C++14 graphics engine
Stars: ✭ 26 (-75.47%)
Mutual labels:  opengl-es
ConvectionKernels
Fast, high-quality texture compression library for many formats
Stars: ✭ 40 (-62.26%)
Mutual labels:  opengl-es
PyGLM
Fast OpenGL Mathematics (GLM) for Python
Stars: ✭ 167 (+57.55%)
Mutual labels:  vector
remote-pinetime-bot
Telegram Bot to flash and test PineTime firmware remotely
Stars: ✭ 23 (-78.3%)
Mutual labels:  flash
kendryte-flash-windows
Kendryte flash utility for Windows
Stars: ✭ 28 (-73.58%)
Mutual labels:  flash
tinyusd
A really small getting-started project for USD on Windows.
Stars: ✭ 29 (-72.64%)
Mutual labels:  tiny

LVG (Lion Vector Graphics)

Build Status CircleCI Build Status Coverity Scan Build Status

LVG is a lightweight flash player replacement. Basic idea: we have some assets in a package and sctipts that renders them. It's designed to use a very small runtime (around 200kb without video codecs) for player and runs on android, ios, web and more.

Currently it uses C script to load and render assets. Why C script? Because C compiler is small, and runtime written in C, so no other language is needed and script can be compiled in to a save the space. Another reason is compatibility: lvg only exposes small API and opengl, with other scripting laguages we must do all from scratch, including GUI. But there are huge amount of already-written C code. Usually author prefer C++, but there also some reasons to use pure C for whole project:

  • We do not need to include libstdc++ for Android shared objects, which saves some .apk space (shared objects libs also usually duplicated for each supported architectue in .apk).
  • This reduces size of emscripten compiled WASM code (it's already relatively heavy).
  • Native C++ builds needs some attention for small code too. It's definetly possible to write small code with C++, but we need something like minicrt for each platform/compiler. See farbrauch code for example or something similar.
  • C++ code produces much more noisy .map files which makes profile/map file analysis bit more complicated. Projects like chromium also uses objects analysis tools (like dump-static-initializers.py), there also less noise with such tools.
  • Code can be ported to specific OS'es more easily.

Following assets currently supported:

  • SVG vector images (loaded using NanoSVG)
  • Raster images (loaded using stb_image.h)
  • MP3 files (loaded using minimp3)
  • Flash SWF files (can contain vector, raster, video and audio). All swf video codecs (h263,vp6,flashsv,flashsv2,h264) costs additional ~600kb.
  • Scripts using tcc or picoc

Render can be done using following backends:

Current Status

Works:

  • SVG, image, mp3 resources with tcc scripting.
  • SWF: shapes, images, video, audio (mp3, adpcm, pcm), limited action script 2 support, limited morph shapes support.

Not works:

  • SWF: clip layers
  • SWF: interpret action script 3
  • SWF: bitmap filters
  • SWF: network access

Demos

Basic svg demo (images clickable):

SVG Screenshot

NanoVG demo incapsulated in lvg:

NanoVG Screenshot

Nuklear GUI demo:

Nuklear Screenshot

Flash swf demo:

Flash Screenshot

Building

For now windows executables builds only on linux host using mingw. For windows and linux install all build dependencies with the following command:

apt-get install -qq -y git cmake meson yasm libglfw3-dev libsdl2-dev libavcodec-dev mingw-w64 wget

For macos brew must be installed:

brew install meson upx glfw sdl2 ffmpeg tcc

LVG uses meson as build system. Actual building with the following commands in project directory:

mkdir build
cd build
meson ..
ninja

Configuring

LVG can be configured to use different backends for platform, audio and video. You can see current configuration by executing mesonconf (or meson configure for newer meson versions) in build directory:

meson configure
...
Project options:
  Option        Description   Current Value Possible Values
  ------        -----------   ------------- ---------------
  AUDIO_SDL     AUDIO_SDL     true          [True, False]
  ENABLE_AUDIO  ENABLE_AUDIO  true          [True, False]
  ENABLE_SCRIPT ENABLE_SCRIPT true          [True, False]
  ENABLE_VIDEO  ENABLE_VIDEO  true          [True, False]
  PLATFORM_GLFW PLATFORM_GLFW true          [True, False]
  PLATFORM_SDL  PLATFORM_SDL  false         [True, False]
  RENDER_NANOVG RENDER_NANOVG true          [True, False]
  RENDER_NVPR   RENDER_NVPR   true          [True, False]
  SCRIPT_TCC    SCRIPT_TCC    true          [True, False]
  VIDEO_FFMPEG  VIDEO_FFMPEG  true          [True, False]
...

You can change configuration using meson commands. Example:

mesonconf -DENABLE_SCRIPT=False

Future

  • Use other scripting lanuages like luajit, JerryScript, muJS, mu, avian, ImpalaJIT, mochascript and AngelScript.
  • Speed up action script with jit like sljit.
  • Shaders and 3D support.
  • Parallel shape\image decoding and use file compression with parallel decoding support (like pbzip2).
  • More audio\video\codec backends.
  • SWF frame interpolation to get more fps than encoded in file. [Done]
  • Better than swf storage format using draco-like compression based on ANS.

Interesting graphics libraries

Flash related projects

LVG is developed and maintained by https://github.com/lieff

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].