Skip to content

Instantly share code, notes, and snippets.

💭
Rarely around

Felix felixplesoianu

💭
Rarely around
Block or report user

Report or block felixplesoianu

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@felixplesoianu
felixplesoianu / slimvaders.py
Last active Jul 11, 2019
Ultra-minimal shoot'em up in Python and Pygame, for teaching purposes.
View slimvaders.py
#!/usr/bin/python
import random
import pygame
WIDTH = 800
HEIGHT = 600
UNIT_GRID = 100
HALF_GRID = 50
@felixplesoianu
felixplesoianu / events.sdlbas
Last active Jul 27, 2019
sdlBasic library to poll input devices and generate discrete events like key_down, key_up & co.
View events.sdlbas
' events.sdlbas: sdlBasic library to poll input devices
' and generate discrete events like key_down, key_up & co.
' 2019-05-07 No Time To Play <https://notimetoplay.org/>
' Use as you like; please keep the attribution if you will.
const no_event = 0
const key_down_event = 1
const key_up_event = 2
const mouse_down_event = 3
@felixplesoianu
felixplesoianu / textalign.sdlbas
Created May 7, 2019
sdlBasic library to render text on the fly with various alignments relative to the given coordinates.
View textalign.sdlbas
' textalign.sdlbas: sdlBasic library to render text on the fly
' with various alignments relative to the given coordinates.
' 2019-05-06 No Time To Play <https://notimetoplay.org/>
' Use as you like; please keep the attribution if you will.
' Set to a number the game leaves unused otherwise.
' Slot 0 (zero) is the mouse cursor in full screen.
dim common _temp_text_slot = 1
@felixplesoianu
felixplesoianu / orion.py
Last active May 25, 2019
Space Cruiser Orion: a text-based strategy game... in spaaace!
View orion.py
#!/usr/bin/env python3
# coding=utf-8
#
# Space Cruiser Orion: a text-based strategy game... in spaaace!
# 2019-05-02 Felix Pleșoianu <https://felix.plesoianu.ro/>
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
@felixplesoianu
felixplesoianu / land-lord.sh
Last active Oct 3, 2018
Shell script port of LAND/LORD, a clone of the classic game Hamurabi.
View land-lord.sh
#!/usr/bin/env bash
# This is a shell script port of LAND/LORD, by No Time To Play,
# itself a clone of the classic game Hamurabi. Use as you wish.
# Tested in bash, zsh and pdksh as of 2018-10-03. Beware of bugs.
typeset -i population land grain starved immigrants
typeset -i rats planted yield price year plague
population=100
@felixplesoianu
felixplesoianu / tb.lua
Created May 4, 2018
Beginning of a Tinycat Basic port to Lua.
View tb.lua
-- Minimal BASIC in Lua using only # and string.sub for lexing.
-- Goal is a compact implementation that can run on the Pico-8.
local char = {
digit = {"0", "1", "2", "3", "4", "5", "6", "7", "8", "9"},
lower = {"a", "b", "c", "d", "e", "f", "g", "h", "i", "j",
"k", "l", "m", "n", "o", "p", "q", "r", "s", "t",
"u", "v", "w", "x", "y", "z"}
}
@felixplesoianu
felixplesoianu / voxeldesc.cpp
Last active May 2, 2018
UI mockup for a native port of VoxelDesc using FLTK.
View voxeldesc.cpp
#include <FL/Fl.H>
#include <FL/fl_ask.H>
#include <FL/Fl_File_Chooser.H>
#include <FL/Fl_Color_Chooser.H>
#include <FL/Fl_Window.H>
#include <FL/Fl_Pack.H>
#include <FL/Fl_Button.H>
#include <FL/Fl_Menu_Button.H>
#include <FL/Fl_Box.H>
#include <FL/Fl_Input.H>
@felixplesoianu
felixplesoianu / retro-sf-tower.stl
Last active Oct 7, 2017
Retro-futuristic building in a Brutalist style.
View retro-sf-tower.stl
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@felixplesoianu
felixplesoianu / tosm.css
Last active Sep 12, 2017
Custom CSS for the Sugarcane Twine format.
View tosm.css
@import url("https://fontlibrary.org/face/germano");
body {
Font-size: 15pt;
Font-family: GermanoRegular, sans-serif;
Background-color: white;
}
#passages {
Background-color: white;
Color: black;
@felixplesoianu
felixplesoianu / jungle.lua
Last active Oct 3, 2018
Silly little survival game you can play on a coffeebreak.
View jungle.lua
-- Lost in the Jungle: a silly little survival game.
-- 2017-07-06 Felix Pleşoianu <https://felix.plesoianu.ro/>
-- Use as you like, and enjoy!
math.randomseed(os.time())
local fatigue = 0
local health = 5
local bullets = 6
You can’t perform that action at this time.