Skip to content

Instantly share code, notes, and snippets.

@xriss
Last active Aug 10, 2017
Embed
What would you like to do?
Fun64 Hello World test code
--
-- This is fun64 code, you can copy paste it into https://xriss.github.io/fun64/pad/ to run it.
--
hardware,main=system.configurator({
mode="fun64", -- select the standard 320x240 screen using the swanky32 palette.
update=function() update() end, -- called repeatedly to update+draw
})
-- we will call this once in the update function
setup=function()
-- system.components.screen.bloom=0
-- system.components.screen.filter=nil
-- system.components.screen.shadow=nil
print("Setup complete!")
end
-- updates are run at 60fps
update=function()
if setup then setup() setup=nil end
local ctext=system.components.text
local bg=9
local fg=system.ticks%32 -- cycle the foreground color
ctext.text_clear(0x01000000*bg) -- clear text forcing a background color
ctext.text_print("Hello World!",34,15,fg,bg) -- (text,x,y,color,background)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment