Giter Site home page Giter Site logo

example's Introduction

Lovetoys-example

This is a small example game that shows how to use the lovetoys in practice.

Component:

position.lua: Basic Structure of a component.

Entity:

main.lua Line 102-108: How to create an entity, add Components to it and finally add the entity to the engine.
mainKeySystem.lua Line 44: How to remove an Entity from the engine.

System:

circleDrawSystem.lua: Basic Structure of a system.
main.lua Line 94: How to add a system to the engine.
mainKeySystem.lua Line 47: How to remove a System.
multipleRequirementsSystem Line 5-19: How to write a System with multiple component requirements and how to access the different target lists.

Engine:

main.lua Line 54: How to create an engine.
Line 116: Engine update function.
Line 126: Engine draw function.

Eventmanagement:

keyPressed.lua Basic structure of an event.
mainKeySystem.lua This is a typical event system.
main.lua Line 78: How to add a system to an existing eventmanager.
Line 129: How to fire an event to the eventmanager.

Collisionmanagment:

main.lua Line 77: How to add the collisionmanager to the related event manager.
beginContact.lua: The beginContact event that's fired by the event manager.
main.lua Line 83: How to add a new collision to the collision manager.
Line 140: Firing the BeginContact event.
polygonCircleCollision.lua: Basic structure of a collision.

example's People

Contributors

nukesor avatar raffomania avatar

Watchers

 avatar  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.