port back to 1x64x64 matrix
This commit is contained in:
parent
75801332e0
commit
59735323a0
|
@ -9,9 +9,9 @@ namespace FlappyBird {
|
|||
private static string scoreText = "Your score is: ";
|
||||
private static float factor = 32/1.4f;
|
||||
private static int pipeInterval = 60;
|
||||
private static int sw = 6, sh = 6;
|
||||
private static int height = 96;
|
||||
private static int width = 96;
|
||||
private static int sw = 2, sh = 2;
|
||||
private static int height = 32;
|
||||
private static int width = 32;
|
||||
private static int FPS = 60;
|
||||
|
||||
// Game variables
|
||||
|
@ -44,9 +44,12 @@ namespace FlappyBird {
|
|||
} else {
|
||||
matrix = new(
|
||||
new RGBLedMatrixOptions {
|
||||
HardwareMapping = "adafruit-hat",
|
||||
LimitRefreshRateHz = 0,
|
||||
GpioSlowdown = 5,
|
||||
ChainLength = 3,
|
||||
Parallel = 3,
|
||||
ChainLength = 1,
|
||||
Parallel = 1,
|
||||
ScanMode = 1,
|
||||
Rows = 64,
|
||||
Cols = 64,
|
||||
});
|
||||
|
@ -59,7 +62,7 @@ namespace FlappyBird {
|
|||
Color green = new(0, 255, 0);
|
||||
|
||||
// Initialize Console Color and Text-Font and -Color
|
||||
RGBLedFont font = new("fonts/9x18B.bdf");
|
||||
RGBLedFont font = new("fonts/5x8.bdf");
|
||||
Console.ForegroundColor = ConsoleColor.White;
|
||||
Color textCol = new(255, 255, 255), grey = new(127, 127, 127);
|
||||
|
||||
|
@ -217,12 +220,12 @@ namespace FlappyBird {
|
|||
while (selection) {
|
||||
// Display Options and Cursor on Matrix
|
||||
canvas.Clear();
|
||||
canvas.DrawText(font, 0, 18, textCol, "Game Over!");
|
||||
canvas.DrawText(font, 0, 54, textCol, " ) Weiter");
|
||||
canvas.DrawText(font, 0, 72, textCol, " ) Beenden");
|
||||
canvas.DrawText(font, 0, 108, textCol, $"Score: {score/2}");
|
||||
canvas.DrawText(font, 0, 8, textCol, "Game Over!");
|
||||
canvas.DrawText(font, 0, 24, textCol, " ) Weiter");
|
||||
canvas.DrawText(font, 0, 32, textCol, " ) Beenden");
|
||||
canvas.DrawText(font, 0, 48, textCol, $"Score: {score/2}");
|
||||
// Cursor is a '#' at (0, 24 + i * 8) where i may be [0, 1]
|
||||
canvas.DrawText(font, 0, 54+selectionIndex*18, textCol, "#");
|
||||
canvas.DrawText(font, 0, 24+selectionIndex*8, textCol, "#");
|
||||
canvas = matrix.SwapOnVsync(canvas);
|
||||
|
||||
// Handle key presses for continue game or exit
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
<OutputType>Exe</OutputType>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<SelfContained>true</SelfContained>
|
||||
<RuntimeIdentifier>linux-arm64</RuntimeIdentifier>
|
||||
<RuntimeIdentifier>linux-arm</RuntimeIdentifier>
|
||||
<PublishReadyToRun>true</PublishReadyToRun>
|
||||
<IncludeAllContentForSelfExtract>true</IncludeAllContentForSelfExtract>
|
||||
</PropertyGroup>
|
||||
|
|
BIN
librgbmatrix.so
BIN
librgbmatrix.so
Binary file not shown.
Loading…
Reference in New Issue
Block a user