From 6f318c034e0f6aa79e8854c8cae14f2958c312f1 Mon Sep 17 00:00:00 2001 From: Kazhnuz Date: Sat, 16 Mar 2019 12:42:18 +0100 Subject: [PATCH] readme: improve the readme with some base exemple --- README.md | 63 ++++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 62 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 4a09d57..564ff94 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,64 @@ # gamecore -A basic love2D game core system \ No newline at end of file +Gamecore aim to be an integrated, simple core system for love2D. It aim to make work in a integrated way several managers to automatically handle inputs, screen, and several utilities to make game developpement easier and less repetitive. + +Gamecore use [Classic](https://github.com/rxi/classic/) as its base Object + +## How to load GameCore + +To load gamecore, you basically need the following code. + +```` +utils = require "libs.loveutils" +Object = require "libs.classic" +Core = require "core" + +scenes = require "scenes" + +function love.load() + core = Core() +end + +function love.update(dt) + core:update(dt) + game:update(dt) +end + +function love.draw() + core:draw() +end + +function love.mousemoved(x, y, dx, dy) + core:mousemoved(x, y, dx, dy) +end + +function love.mousepressed( x, y, button, istouch ) + core:mousepressed(x, y, button, istouch) +end +```` + +Then you have to create some scene object, + +## Gamecore managers + +- Debug + +- Input + +- Lang + +- Options + +- Screen + +- Scene Manager + +## GameCore modules + +Modules are utilies that you can load everywhere in your code and that aren't loaded specifically inside the core. + +- Scene Object + +- Assets + +- Menu System