Skip to content

Instantly share code, notes, and snippets.

View johnsquibb's full-sized avatar

John johnsquibb

View GitHub Profile
@johnsquibb
johnsquibb / text_border.frem
Created August 25, 2024 17:17
Basic Text Border in FREM Sprite32!
# Draw text border around screen edges.
FUNCTION DrawBorder(string s)
EACH y IN Range(1,20) REPEAT
WriteLn("")
EACH x IN Range(1,40) REPEAT
IF y EQ 1 OR y EQ 20 OR x EQ 1 OR x EQ 40 THEN
Write(s)
ELSE
Write(" ")
OK
@johnsquibb
johnsquibb / signal.php
Created December 9, 2023 12:20
Concept of a Signal system for game objects, implemented with basic observer pattern.
<?php
/**
* Connector handles connections to Signals
*/
interface Connector
{
public function connect(string $signal, callable $handler): void;
}
@johnsquibb
johnsquibb / README.md
Last active December 4, 2023 23:12
Alternate approach to

Alternate approach to Godot 4 Tutorial - Space Shooter Using Components - P10 Enemy Generator https://youtu.be/_IVsoCltCUw?si=fzVZ4jtl5JMG4yD8

Approach

Adds a new SpawnerTypeComponent component that uses a bit of inheritance to extend Timer. The entity scene to spawn is attached to this component and a signal connects back to the SpawnerComponent to tell it which scene to spawn. The signal is emitted when the timeout() occurs. Note, that I've used the Node panel to connect the spawn_triggered(scene) and timeout() signals in this example vs. manually connecting them.

Scene Tree

@johnsquibb
johnsquibb / .frem
Created October 21, 2023 18:36
Procedurally generated walking simulator in FREMScript
# Procedurally generated walking simulator
# From FREM Sprite32! Live Stream
# October 21, 2023
Cls()
ClearGrid()
Sync()
# Enable the grid layer
SysPut("B", 20, true)
@johnsquibb
johnsquibb / Seven Segment Display data
Created October 21, 2022 04:01
Seven Segment Display data for FREMScript Real Time Clock Demo
1111
1 1
1 1
1 1
1111
1
1
1
1
@johnsquibb
johnsquibb / Real Time Clock Demo
Last active October 21, 2022 04:00
FREMScript Real Time Clock Demo
#############################
# System Real Time Clock Demo
#############################
# Clear screen, sprites
Cls()
ClearSprites()
Sync()
# Draw the border
@johnsquibb
johnsquibb / gist:acdffb03a2131929c2e2134320202075
Last active September 23, 2024 11:31
Getting the Altera Cyclone II EP2C5T144 Development Board working with Quartus II, USB-Blaster in Windows 10

Getting the Altera Cyclone II EP2C5T144 Development Board working with Quartus II, USB-Blaster in Windows 10

Components

Cyclone II Development Board

Development Board for the Altera Cyclone II EP2C5T144.

https://www.amazon.com/gp/product/B00LEMKR92