🍭 An awesome little fantasy computer designed to be simple.
Pinwheel is an all new fantasy computer, developed in Go and designed for ease of use and simplicity,
and highly customizable where applicable (and wanted..!).
It is currently in the VERY early alpha-ish stage, and isn't meant for normal, ordinary use yet.
Stay tuned though, I'm spending my entire holiday to work on this little thing as much I can.
- Customizable Palette of 64 COLORS (by program and/or user)
- Easily scriptable
- Simplicity
- Joypad, keyboard and mouse input
soon:tm:
- Go
- Git (optional)
- SDL2 (follow these steps)
- Currently only SDL2 itself is needed
- Download the repository
- From GitHub: https://github.com/PinwheelSystem/Pinwheel/archive/master.zip
- Or with Git:
git clone https://github.com/PinwheelSystem/Pinwheel
- Open a terminal, change to the downloaded repo and run:
go build -o Pinwheel .
- Windows users will have to add the
.exe
toPinwheel
- Assuming there are no errors, you should be able to run
./Pinwheel
.
The first argument is the Lua source to run, for example to run a program:./Pinwheel game.lua
Expected to change A LOT during development.
-
Spin()
- Called every CPU cycle -
termprint(text)
- Print text to the terminal -
vpoke(address, value)
- Writevalue
to VRAMaddress
-
plot(x, y, color)
- Place pixel atx, y
with palette color numbercolor
-
time()
->number
- Gets the amount of time since boot -
pchar(char, x, y)
- Placechar
acter atx, y
-
vertline(x, color)
- Draw a vertical line on the x axis -
horizline(y, color)
- Draw a horizontal line on the y axis -
clear()
- Clears the screen -
print(text, x, y, color)
- Print text starting atx, y
in the colorcolor
Pinwheel, unlike most FCs, is event driven.
To handle any event, you use events
:
events:On("eventName", function(arg1, arg2)
-- Inside here is our callback function
-- `arg1` and `arg2` are our callback arguments
end)
Events should be outside the Spin
function.
Callback arguments:
x
X coordinate of the location of the clicky
Y coordinate of the location of the click
Emitted when a user clicks the mouse.
⚠ The
x
andy
values must be divided by 4 to apply to Pinwheel's internal resolution!
Callback arguments:
x
X coordinate of the current cursor locationy
Y coordinate of the current cursor location
Emitted when a user holds a mouse button and moves the mouse.
⚠ The
x
andy
values must be divided by 4 to apply to Pinwheel's internal resolution!
Callback arguments:
x
X coordinate of the location of the cursory
Y coordinate of the location of the cursor
Emitted when a user moves the mouse.
⚠ The
x
andy
values must be divided by 4 to apply to Pinwheel's internal resolution!
- pixelbath#8145 from the Fantasy Console Discord for a Lua snippet of loading a Bitmap font.