Giter Site home page Giter Site logo

l2df-engine's Introduction

About L2DF

Love2D Fighting Engine (L2DF) is a cross-platform game engine written in Lua.

L2DF is a perfect solution for:

  • 2D and 2.5D games
  • fightings
  • beat 'em ups
  • platformers
  • similar genres

The backstage of this engine is an old "Little Fighter 2" game, so if you are familiar with it you can dive in very fast because L2DF uses similar syntax and terms. But if you're not there're no problem as we are going to support more syntaxes like M.U.G.E.N. and make engine as flexible as it's possible.

If you're not that good in programming there're no problem since we have different presets which you can modificate without any single line of code! It was achieved with a flexible architecture and easy-to-read-and-write custom data files with our XML/HTML like syntax. We're going to release our custom editor for these files, so you won't need to edit data files manually in text-format :)

Right now L2DF uses LÖVE as "backend" for rendering, input and other stuff, but we also have plans to support CoronaSDK and Luce in future.

Features

  • Cross-platform. As soon as you use Lua and one of our backends it'll be available on mobile, desktop, TV and other devices.
  • Custom easy-to-learn syntax to make up / modificate rooms, objects, animations and etc.
  • Very flexible entity-component architecture.
  • Fast physics / collision detection - perfect for fighting games!
  • Frames based architecture - have a full control of your objects in each single frame.
  • Number of presets which you can use to rapidly start making your game.
  • Integrated Peer-to-Peer network support to bring you smooth, fast and responsive gameplay.
  • NAT traversal which excludes requirement of using VPN, Hamachi and other software to initialize connection under NAT.
  • "GGPO like" rollback networking instead of lockstep to make you feel an excellent netplay experience.

Installation

  1. Go to releases page

  2. Download one of packages in the latest available release:

    • l2df.lua - if you want just to import engine into your game with require 'l2df'
    • demo-x.x.x.exe - if you want just to test latest changes and features in Windows
    • demo-x.x.x.zip - if you want to see / modificate a single full-featured example
    • Source code.zip - everything is under your control, feel the full power of presets and modificate engine if you need it!
  3. Place engine in your project and require it:

require 'l2df'
-- ^ exposes _G.l2df / l2df variable, you can localize it:
local l2df = require 'l2df'
-- or in libs/:
local l2df = require 'libs.l2df'
-- or in libs/ with some "hacks":
local src = love.filesystem.getSource()
package.path = ('%s;%s/libs/?.lua;%s/libs/?/init.lua'):format(package.path, src, src)
-- if previous 2 lines don't work:
love.filesystem.setRequirePath('libs/?.lua;libs/?/init.lua;?.lua;?/init.lua')
local l2df = require 'l2df'
  1. Initialize engine with default init function. It's not needed if you want to use only some parts of L2DF.
function love.load()
	l2df:init()
end
  1. If you don't have your own game loop leave out the rest of it to L2DF. Else read documentation for more information on how to integrate L2DF into your already existen game loop.
function love.run()
	return l2df:gameloop()
end
  1. Now you are ready to start development!

Documentation

You can find it here: https://atom-tm.github.io/l2df-engine.

It's still in-progress but already covers some basics of development with our engine.

License

L2DF is an open-sourced software licensed under the MIT License.

This project also uses some parts of third-party libraries listed below.

|--------------------|--------------------------------------|-------------|---------------------|---------------|
| Project            | Distribution Files                   | Modificated | Copyright Holder    | License       |
|--------------------|--------------------------------------|-------------|---------------------|---------------|
| lua-rbtree         | src/external/rbtree.lua              |      +      | Soojin Nam          | Public Domain |
|--------------------|--------------------------------------|-------------|---------------------|---------------|
| gamera             | src/external/gamera.lua              |      -      | Enrique García Cota | MIT           |
|--------------------|--------------------------------------|-------------|---------------------|---------------|
| lua-struct         | src/external/packer.lua              |      +      | Iryont              | MIT           |
|--------------------|--------------------------------------|-------------|---------------------|---------------|
| JSON Encode/Decode | src/external/json.lua                |      -      | Jeffrey Friedl      | CC BY 3.0     |
| in pure Lua        |                                      |             |                     |               |
|--------------------|--------------------------------------|-------------|---------------------|---------------|
| bump-3dpd          | src/class/component/physix/cube.lua  |      +      | Enrique García Cota | MIT           |
|                    | src/class/component/physix/grid.lua  |      +      |                     |               |
|                    | src/class/component/physix/world.lua |      +      |                     |               |
|--------------------|--------------------------------------|-------------|---------------------|---------------|

You can find full license text for this software in THIRD-PARTY-LICENSE file.

Contributing

Currently we don't have appropriate contributing guide but if you really want to help our team in some improvements or bug fixes then dm one of the core developers in Discord to discuss the topic / your pull-request:

  • Abelidze#0109
  • Kasai#1590

Also if you've found a bug it'd be great if you can explain it on the issues page.

l2df-engine's People

Contributors

abelidze avatar rusfeniks 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

Watchers

 avatar

l2df-engine's Issues

Add gamepad / joystick and touchscreen buttons support

  • touch - создает полупрозрачные кнопки, к которым биндится код клавиши (произвольная строка). Кнопки нажимаются на тачскрине, их можно позиционировать, добавлять на них изображения и текст. Количество потенциально неограничено (мультиплеер поддерживает до 31 инпута);
  • gamepad - биндинг кнопок гейпада, ничего сложного, просто добавить дополнительных хуков. Однако для полноценной поддержки стиков нужно заморочиться и модифицировать InputManager.

Source: https://discordapp.com/channels/335951387877834754/571947749616910357/665167760946626560

Add repeatable keys for parsers.dat

В parsers.dat добавить поддержку повторяющихся ключей (должен создаваться массив)

Implement CollisionManager

Основные идеи:

  1. Массив текущих коллизий, который обновляется каждый тик;
  2. Добавление коллайдеров (компоненты) в менеджер. Виды коллайдеров: круги, прямоугольники и точки.
    В будущем еще полигоны / многоугольники;
  3. При добавлении коллайера, производится его сравнение со всеми, кто сейчас находится в списке (также это может использоваться как отдельные алгоритмы)
  4. Если происходит коллизия, то создаётся событие, в которое передаются два столкнувшихся коллайдера;
  5. Для оптимизации коллайдеры можно разделить на раздатчики и приёмники, однако нужно сохранить возможность взаимодействия коллайдеров одинакового типа.

Source: https://discordapp.com/channels/335951387877834754/571947749616910357/624733353609920543

Simplify room files

  1. Написать обертку для импорта базовых модулей в глобальные переменные или поля модуля-враппера (ui, translate/i18n и т.д.)
  2. Добавить в класс комнаты свойства с двойным связыванием.
    Например: room.music = val == sound:setMusic(val)
  3. Добавить методов в класс комнаты для удобного выполнения базовых операций: переходы, звук, видео, добавление объекта, спавн и т.д.

Source: https://discordapp.com/channels/335951387877834754/571947749616910357/623034114529820672

Optimize string.sub for all parsers

string.sub каждый раз создает новую строку и выделяет под нее память.
В данный момент для парсинга какого-то блока создается новая строка с помощью string.sub.
Вместо этого можно для одних исходных данных всегда использовать одну разделяемую строку и передавать отрезок для обработки, заданный с помощью числовых границ.


Source: https://discordapp.com/channels/335951387877834754/571947749616910357/628277419140186182

Optimize helper.hook with plane arrays

helper.hook сейчас делает перегрузку, плодя кучу новых функций.
Идея в том, чтобы вместо очередной перегрузки сохранить просто массив функций, который мы привязали к оригинальной функции, которая в свою очередь будет вызывать все функции из этого массива.
Хранить массив можно в некотором "скрытом" поле объекта, чья функция перегружается.

Add resources syncing for networking

Нужно добавить докачку чужих ресурсов при игре в мультиплеер.
Например, отсутствующий у одного из игроков персонаж должен быть докачан либо из общего репозитория, либо у другого игрока.

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.