Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

TIC-80

Fantasy computer for making, playing and sharing tiny games. · By Nesbox

A key test project

A topic by Rain_Effect created Jan 18, 2017 Views: 382
Viewing posts 1 to 1
(2 edits) (+1)

This project can be used to test the keys.
Maybe you'll need it.

--Key Test Project
--By Rain_Effect
local x=70
local y=25
local btnLabel={"Up","Down","Left","Right","Btn A","Btn B"}
function TIC()
    cls(0)
    print("Key Test Project",x,y)
 print("Btn",x,y+15,2)
    print("1P",x+50,y+15,2)
    print("2P",x+80,y+15,2)
    for i=1,6 do
     print(btnLabel[i],x,y+(i+1)*10+5)
        if btn(i-1) then
      print("On",x+50,y+(i+1)*10+5,11)
        else
      print("Off",x+47,y+(i+1)*10+5,6)
        end
        if btn(i+7) then
      print("On",x+80,y+(i+1)*10+5,11)
        else
      print("Off",x+77,y+(i+1)*10+5,6)
        end
    end
end