Difference between revisions of "Lovetoys"

(updating texts)
Line 1: Line 1:
 
{{#set:Name=Lovetoys}}
 
{{#set:Name=Lovetoys}}
{{#set:LOVE Version=0.9.1}}
+
{{#set:LOVE Version=0.10}}
{{#set:Description= A neat Entity Component System for Lua and some nice manager for collisions and events}}
+
{{#set:Description= It's a full-featured Entity-Component-System framework for making games with lua}}
 +
 
 +
 
 +
'''Lovetoys''' is an Entity Component System framework for game development with lua. Originally written for the LÖVE 2D game engine it is now compatible with pretty much any game that uses lua! It is loosely based on [http://www.richardlord.net/blog/what-is-an-entity-framework Richard Lords Introduction] to ECS's. If you don't have any idea what this entity component stuff is all about, click that link and give it a read! It's totally worth it!
 +
 
 +
Lovetoys is a full-featured game development framework, not only providing the core parts like Entity, Component and System classes but also containing a Publish-Subscribe messaging system as well as a Scene Graph, enabling you to build even complex games easily and in a structured way.
 +
 
 +
Though we have not reached version 1.0 yet, the software is tested, used in multiple games and definitely stable. If you find any bugs please create an issue and report them. Or just create a pull request :).
  
'''Lovetoys''' is a small bundle of helper classes and libraries consisting of 3 packages. <br/>
 
The most important one is the Entity Component System which is based on [http://www.richardlord.net/blog/what-is-an-entity-framework Richard Lords Introduction] to ECS's. <br/>
 
If you don't have any idea what this entity component stuff is all about, click that link and give it a read! It's totally worth it! <br/>
 
The Software is published under MIT License. Feel free to use it in your projects.
 
  
 
A simple example for implementation:
 
A simple example for implementation:
Line 12: Line 15:
 
<source lang="lua">
 
<source lang="lua">
 
-- Importing lovetoys
 
-- Importing lovetoys
require("lovetoys/engine")
+
require("lovetoys/lovetoys")
  
 
function love.load()
 
function love.load()
Line 43: Line 46:
 
<br/>
 
<br/>
 
<br/>
 
<br/>
Grab it or give it a look on [https://github.com/Lovetoys/lovetoys Github].
+
Grab it and give it a try on [https://github.com/Lovetoys/lovetoys Github].
  
If you want to see a proper way of implementation or some nice examples for events and collisions, have a look at our [https://github.com/Lovetoys/Lovetoys-examples Example-project] or our [https://github.com/Lovetoys/Lovetoys-games Games].
+
If you want to see a proper way of implementation and some examples, have a look at our [https://github.com/Lovetoys/examples Example-project] or our [https://github.com/Lovetoys/Lovetoys-games Games].
  
  
 
[[Category:Libraries]]
 
[[Category:Libraries]]

Revision as of 15:59, 8 February 2016



Lovetoys is an Entity Component System framework for game development with lua. Originally written for the LÖVE 2D game engine it is now compatible with pretty much any game that uses lua! It is loosely based on Richard Lords Introduction to ECS's. If you don't have any idea what this entity component stuff is all about, click that link and give it a read! It's totally worth it!

Lovetoys is a full-featured game development framework, not only providing the core parts like Entity, Component and System classes but also containing a Publish-Subscribe messaging system as well as a Scene Graph, enabling you to build even complex games easily and in a structured way.

Though we have not reached version 1.0 yet, the software is tested, used in multiple games and definitely stable. If you find any bugs please create an issue and report them. Or just create a pull request :).


A simple example for implementation:

-- Importing lovetoys
require("lovetoys/lovetoys")

function love.load()
    engine = Engine()
    world = love.physics.newWorld(0, 9.81*80, true)
    world:setCallbacks(beginContact, endContact)
    eventmanager = EventManager()
end

function love.update(dt)
    -- Engine update function
    engine:update(dt)
    world:update(dt)
end

function love.draw()
    -- Engine draw function
    engine:draw()
end 

function love.keypressed(key, isrepeat)
    eventmanager:fireEvent(KeyPressed(key, isrepeat))
end

function love.mousepressed(x, y, button)
    eventmanager:fireEvent(MousePressed(x, y, button))
end



Grab it and give it a try on Github.

If you want to see a proper way of implementation and some examples, have a look at our Example-project or our Games.