GithubHelp home page GithubHelp logo

srevrtt / lgf Goto Github PK

View Code? Open in Web Editor NEW

This project forked from lua-graphics-framework/lgf

0.0 0.0 0.0 21.57 MB

A simple, fast, lightweight framework for Lua that allows you to create games and display graphics onto the screen.

License: zlib License

C++ 70.65% CMake 5.45% Batchfile 0.23% Shell 0.07% Lua 23.60%

lgf's Introduction

Lua Graphics Framework

About

Lua Graphics Framework (LGF) is a cross platform library for Lua that allows you to create game engines with very little boilerplate code. It currently uses SDL2 under the hood to provide a fast experience. In the future, LGF aims to have its own renderer to improve runtime speeds. Demos of what you can make with LGF are shown in the examples/ directory.

Using

To use LGF, you need to install the CLI tools, which will install LGF automatically. You can also create projects with it, build and publish your game/application, etc.

Building

Windows

In order to build LGF on Windows, you need Git, CMake, and a C/C++ (preferably MSVC). These build instructions are for MSVC, but you can build with MinGW with some modifications.

Run these powershell commands to get the LGF source code (along with its dependencies):

  • git clone --recurse-submodules -j8 https://github.com/lua-graphics-framework/lgf
  • cd lgf
  • mkdir build
  • cd build
  • cmake ..
  • cmake --build . --config Release

In order to run LGF on Windows, it must be included with its DLLs. Run these commands:

  • mv external\lua-5.4.4\Release\*.dll Release
  • mv external\SDL\Release\*.dll Release
  • mv external\SDL_image\Release\*.dll Release
  • mv external\SDL_ttf\Release\*.dll Release

LGF can now be found in the release folder!

Linux

On Linux, building LGF is a lot easier. Enter the following commands:

  • sudo apt install cmake make gcc g++ -y - These are Debian/Ubuntu instructions; translate to your Linux distro
  • git clone https://github.com/lua-graphics-framework/lgf
  • cd lgf
  • mkdir build
  • cd build
  • cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_DEPENDENCIES=OFF ..
  • make

macOS

On macOS, building LGF is also easy. But, you will need Homebrew installed before proceeding. Enter the following commands:

  • brew install cmake
  • git clone https://github.com/lua-graphics-framework/lgf
  • cd lgf
  • mkdir build
  • cd build
  • cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_DEPENDENCIES=OFF ..
  • make

Now you can use LGF.

Changelog

  • v0.1.2

    • Fixed/rewrote the CLI
    • Fixed mouse events
    • Fixed segfault when drawing unloaded text
    • Fixed segfault when using an unloaded font
    • Fixed updateSize() and updatePosition()
    • Added macOS support
    • Added Linux support
  • v0.1.1

    • Fixed crashing when you change the position of a rectangle
    • Fixed crashing when you change the size of a rectangle
    • Removed unnecessary window.new() and rectangle.new() methods
    • Removed unnecessary mouse event variables
    • Renamed renderer.new() to renderer.create()
    • Added the ability to change the text of a font
    • Added the ability to change the position of a font
    • Added the ability to "crop" images using src rectangles
    • Added more keycodes
  • v0.1.0

    • The very first release of LGF!

Roadmap & Status

I currently do not recommend using LGF for commercial projects quite yet. It is a very new library with very little features. Here is a roadmap listed below:

  • Core modules (window, rectangle, mouse, image, etc.)
  • CLI tools
  • Linux support
  • OSX support
  • Multiple Lua scripts support
  • Packaging system
  • VSCode extension
  • Actual documentation
  • LuaJIT
  • Sound module
  • Custom LGF renderer
  • Custom underlying windowing system
  • Android & iOS support
  • Web support through WebAssembly

lgf's People

Contributors

srevrtt avatar

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.