Skip to content

gly-engine/core-native-tic

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

core-native-tic

create your own game-engine with just lua for tic80.

How to Use

Download CLI tool

wget -O tic_cli.lua https://cdn.jsdelivr.net/gh/gamelly/core-native-tic/tools/build.lua

Create/Download Engine

You can also create one following the specification.

wget -O engine.lua https://cdn.jsdelivr.net/npm/@gamely/gly-engine@0.0.20

Write a simple game

local function init(std, game)
    game.player = {
        x = 60,
        y = 60,
        size = 30
    }
end

local function loop(std, game)
    game.player.x = game.player.x + std.key.axis.x
    game.player.y = game.player.y + std.key.axis.y
end

local function draw(std, game)
    std.draw.clear(std.color.lightgray)
    std.draw.color(std.color.skyblue)
    std.draw.rect(0, game.player.x, game.player.y, game.player.size, game.player.size)
end

return {
    meta = {
        title = 'TIC80 example',
        author = 'RodrigoDornelles',
        version = '1.0.0',
        description = 'an game written in gly engine for tic80'
    },
    callbacks = {
        init = init,
        loop = loop,
        draw = draw
    }
}

Build the cartbridge

lua tic_cli.lua engine.lua game.lua pong.tic

About

create your own game-engine with just lua for tic80.

Topics

Resources

Stars

Watchers

Forks

Sponsor this project

 

Contributors