Skip to content

Instantly share code, notes, and snippets.

View Achie72's full-sized avatar
💻
Probably doing some game jam

Achie Game Dev Achie72

💻
Probably doing some game jam
View GitHub Profile
@Achie72
Achie72 / map_digger.p8
Last active December 29, 2023 11:29
Crumbling Crypt - PICO-8 Map Generation with a digger/walker
-- General walker for dungeon template generation
-- Made for Crumbling Crypt: https://ko-fi.com/Post/Crumbling-Crypt-1--A-minimalist-Roguelike-B0B1SPL7E
function generate_dungeon()
-- random walker on an 8x8 grid on map
-- set rooms to 1 if there should be something
-- move randomly on if we are good
local roomNumber = 4+flr(player.level/2)
local xStart,yStart = flr(rnd(8)),flr(rnd(8))
mset(xStart,yStart,1)
@Achie72
Achie72 / scene.p8
Created November 5, 2023 10:52
Lina: Suika Hunt - Scene System
-- we start with the scene variable in init
scene = "menu"
-- then in update
function _update()
-- increase the tick
t+=1
if t > 29 then
t = 0
seconds += 1
@Achie72
Achie72 / coloring_the_combo_strings.p8
Created November 5, 2023 10:44
Lina: Suika Hunt - Coloring Combo Strings in PICO-8
-- color table to define which direction should have
-- which color during the printing
local colorTable = {
⬅️ = 9,
⬇️ = 10,
⬆️ = 11,
➡️ = 12
}
-- iterate through all elemenets in the fruitCollection
@Achie72
Achie72 / combo_string_system.p8
Created November 5, 2023 10:37
Lina: Suika Hunt - Combo System for PICO-8
-- function to build directional combo
-- with lenght of the parameter
-- 11 fruit types
function create_combo(_length)
-- combo options
local comboTable = {"⬅️","⬇️","⬆️","➡️"}
-- combo string in build
local combo=""
-- create string equal to combo lenght
for i=1,_length do
@Achie72
Achie72 / gist:eb41737e34cf7cfdef2366099546e660
Last active September 22, 2023 20:58
Release Radar - August | PICO-8
Penguin Rush by m4ttbit - Race the iceberg to you den! Gather fish and escape the ever approaching glacier! - https://www.lexaloffle.com/bbs/?pid=133805#p
Another Tetris by Luife - Another Tetris clone - https://www.lexaloffle.com/bbs/?pid=133813#p
Gun Potato by RageBarbaari - Score Chaser Shmup where you shoot food - https://www.lexaloffle.com/bbs/?pid=133822#p
Vacay Volley by ejreyes - Help Ollie to juggle the volleyball as long as you can - https://www.lexaloffle.com/bbs/?pid=133840#p
Star Addict by Davi_Dash - Use your time to gather stars, dash and slide - https://www.lexaloffle.com/bbs/?pid=133841#p
DriftBomb by jnjbaggott1 - Asteroid like score chaser - https://www.lexaloffle.com/bbs/?tid=53970
Sine Surf by RoverKibb - Surf along a sine wave in this score chaser dodge'em up - https://www.lexaloffle.com/bbs/?pid=133936#p
Labyrint Runner by Witcherchan - An Impossible Game like maze runner - https://www.lexaloffle.com/bbs/?pid=133946#p
Pling Plong Galaxy! by EinarBrown - Circular Pong+Breakout mashup -
@Achie72
Achie72 / crea8_textbox.p8
Created September 20, 2023 19:03
TextBoxes for Crea8
function draw_box(x, y, w, h, style)
-- chip
if style == 0 then
-- the top-corner decal sprite
spr(240, x-1, y)
-- top
line(x, y, x+w-4, y, 7)
--left
line(x, y, x, y+h, 7)
-- bot
@Achie72
Achie72 / 1k_shmup.p8
Created September 3, 2023 13:48
PICO-8 1k byte shmup rundown
pico-8 cartridge // http://www.pico-8.com
version 36
__lua__
--[[
a - ammo
h,v - ship coord
t - frames (ticks) 0-30
w - wave spawner, holds when the next wave will spawn
d - difficulty counter
l - lifes
@Achie72
Achie72 / raycaster.p8
Created August 27, 2023 18:41
Lodev PICO-8
player = {
posX=1,
posY=1,
dirX = -1,
dirY = 0,
planeX=0,
planeY=0.66
}
function raycast()
@Achie72
Achie72 / lowres_custom_font.p8
Last active August 9, 2023 14:31
Siege of Muldyr - Unit placement and combat logic
-- made for my Lowrezjam2023 entry - Siege of Muldyr!
-- you can read the corresponding devlog on:
-- kofi article: https://ko-fi.com/post/Siege-Devlog-1--Lowrezjam-2023-How-to-Start-Wh-I2I3O14RM
-- itch devlogs: https://itch.io/t/3057134/siege-devlog-series
function add_defender(unitType, place)
local unitHealth = {10,10,10,3}
local isTrapTable = {false, false, false, true}
local rangeTable = {3, 20, 20, 2}
@Achie72
Achie72 / lowres_custom_font.p8
Last active August 9, 2023 14:31
PICO-8 Lowres Mode and Custom font setup
-- made for my Lowrezjam2023 entry - Siege of Muldyr!
-- you can read the corresponding devlog on:
-- kofi article: https://ko-fi.com/post/Siege-Devlog-1--Lowrezjam-2023-How-to-Start-Wh-I2I3O14RM
-- itch devlogs: https://itch.io/t/3057134/siege-devlog-series
function _init()
-- init up data
-- lowres mode
poke(0x5f2c,3)