4
0

Compare commits

...

31 Commits

Author SHA1 Message Date
a523951207 branch into version
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
2026-01-29 20:17:02 +01:00
429857e7cb inc fix
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
2026-01-29 19:29:52 +01:00
07fe9ee150 header tweak
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
2026-01-28 00:10:37 +01:00
d5becf0fdc add name to header
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
2026-01-27 22:02:17 +01:00
e4ed56a9d3 meta.header.lua
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
2026-01-27 15:25:57 +01:00
e4241fc2d2 pipeline update
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
2026-01-27 15:21:04 +01:00
72ac79bd81 tic80 image change
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
2025-12-13 22:52:12 +01:00
ec3f7a91ae pipeline local registry
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
2025-12-10 00:47:32 +01:00
c150711514 pipeline fix
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
2025-12-07 10:24:42 +01:00
24c56ad23d pipeline fix
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
2025-12-07 10:21:38 +01:00
601a9aa1ad pipeline fix
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
2025-12-07 10:12:21 +01:00
b48e3b88a4 pipeline fix
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
2025-12-07 10:03:42 +01:00
94deee7154 pipeline fix
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
2025-12-07 10:01:58 +01:00
ddabdaaa29 pipeline fix
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
2025-12-07 09:54:39 +01:00
30e160a94b pipeline fix
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
2025-12-07 09:53:14 +01:00
89519cb7a3 pipeline fix
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
2025-12-07 09:28:27 +01:00
408c56a421 pipeline fix
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
2025-12-07 09:25:54 +01:00
c43156e95f pipeline fix
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
2025-12-07 09:24:20 +01:00
2a7d6fccfc pipeline fix
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
2025-12-07 09:05:31 +01:00
f564bb4616 pipeline fix
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
2025-12-07 01:21:36 +01:00
a855c37128 pipeline fix
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
2025-12-07 01:19:03 +01:00
a3b614400b html content
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
2025-12-07 01:08:15 +01:00
570e57371f pipeline fix
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
2025-12-06 23:45:15 +01:00
e8c3e41988 pipeline fix
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
2025-12-06 23:06:13 +01:00
1e1fa3f538 pipeline fix
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
2025-12-06 22:52:26 +01:00
182623a846 pipeline fix
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
2025-12-06 22:49:50 +01:00
727d011601 pipeline fix
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
2025-12-06 21:57:20 +01:00
c89f5bd7dc readme fix
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
2025-12-06 17:43:25 +01:00
5e78f275c1 remove serve
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
2025-12-06 16:49:03 +01:00
698b274d05 pipeline fix
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
2025-12-06 16:02:23 +01:00
98ad8458fa remove prebuild game 2025-12-06 15:58:56 +01:00
9 changed files with 144 additions and 56 deletions

4
.gitignore vendored
View File

@@ -1,5 +1,5 @@
.local .local
.vscode .vscode
.DS_Store .DS_Store
bomberman.zip bombexpert.lua
bomberman/* bombexpert/*

View File

@@ -1,16 +1,16 @@
environment:
GAME_NAME: bombexpert
GAME_LANG: lua
steps: steps:
- name: version
image: alpine
commands:
- 'apk add --no-cache make'
- 'make ci-version'
- name: build - name: build
image: rastasi/tic80pro:latest image: git.teletype.hu/internal/tic80pro:latest
environment: environment:
GAME_NAME: bombexpert
GAME_LANG: lua
XDG_RUNTIME_DIR: /tmp XDG_RUNTIME_DIR: /tmp
commands: commands:
- tic80 --cli --skip --fs=. --cmd="load $GAME_NAME.$GAME_LANG & save $GAME_NAME & exit" - 'make ci-export'
- name: artifact - name: artifact
image: alpine image: alpine
@@ -22,9 +22,8 @@ steps:
DROPAREA_SSH_PASSWORD: DROPAREA_SSH_PASSWORD:
from_secret: droparea_ssh_password from_secret: droparea_ssh_password
commands: commands:
- apk add --no-cache openssh-client sshpass - 'apk add --no-cache make openssh-client sshpass'
- mkdir -p /root/.ssh - 'make ci-upload'
- sshpass -p $DROPAREA_SSH_PASSWORD scp -o StrictHostKeyChecking=no -P $DROPAREA_PORT $GAME_NAME.$GAME_LANG $GAME_NAME.tic $DROPAREA_USER@$DROPAREA_HOST:$DROPAREA_TARGET_PATH
- name: update - name: update
image: alpine image: alpine
@@ -33,5 +32,5 @@ steps:
UPDATE_SECRET: UPDATE_SECRET:
from_secret: update_secret_key from_secret: update_secret_key
commands: commands:
- apk add --no-cache curl - 'apk add --no-cache make curl'
- curl "$UPDATE_SERVER/update?secret=$UPDATE_SECRET" - 'make ci-update'

115
Makefile Normal file
View File

@@ -0,0 +1,115 @@
# -----------------------------------------
# Makefile TIC-80 project builder
# -----------------------------------------
PROJECT = bombexpert
ORDER = $(PROJECT).inc
OUTPUT = $(PROJECT).lua
OUTPUT_ZIP = $(PROJECT).html.zip
OUTPUT_TIC = $(PROJECT).tic
SRC_DIR = inc
SRC = $(shell sed 's|^|$(SRC_DIR)/|' $(ORDER))
ASSETS_LUA = inc/meta/meta.assets.lua
# CI/CD variables
VERSION_FILE = .version
GAME_LANG ?= lua
DROPAREA_HOST ?= vps.teletype.hu
DROPAREA_PORT ?= 2223
DROPAREA_TARGET_PATH ?= /home/drop
DROPAREA_USER ?= drop
UPDATE_SERVER ?= https://games.vps.teletype.hu
all: build
build: $(OUTPUT)
$(OUTPUT): $(SRC) $(ORDER)
@rm -f $(OUTPUT)
@while read f; do \
cat "$(SRC_DIR)/$$f" >> $(OUTPUT); \
echo "" >> $(OUTPUT); \
done < $(ORDER)
export: build
@if [ -z "$(VERSION)" ]; then \
echo "ERROR: VERSION not set!"; \
exit 1; \
fi
@echo "==> Exporting HTML for version $(VERSION)"
@tic80 --cli --skip --fs=. \
--cmd="load $(OUTPUT) & save $(PROJECT)-$(VERSION) & export html $(PROJECT)-$(VERSION).html & exit"
@echo "==> Creating versioned files"
@if [ -f "$(PROJECT)-$(VERSION).tic" ]; then \
cp $(PROJECT)-$(VERSION).tic $(PROJECT).tic; \
fi
@if [ -f "$(PROJECT)-$(VERSION).html.zip" ]; then \
cp $(PROJECT)-$(VERSION).html.zip $(PROJECT).html.zip; \
fi
@echo "==> Generated files:"
@ls -lh $(PROJECT)-$(VERSION).* $(PROJECT).tic $(PROJECT).html.zip 2>/dev/null || true
watch:
make build
fswatch -o $(SRC_DIR) $(ORDER) assets | while read; do make build; done
import_assets:
@for t in $(ASSET_TYPES); do \
for f in $(ASSETS_DIR)/$$t/*.png; do \
[ -e "$$f" ] || continue; \
echo "==> Importing $$f as $$t..."; \
tic80 --cli --skip --fs=. --cmd="import $$t $$f & exit"; \
done; \
done
export_assets: build
@echo "==> Exporting TIC-80 asset sections"
@mkdir -p inc/meta
@sed -n '/^-- <PALETTE>/,/^-- <\/PALETTE>/p;\
/^-- <TILES>/,/^-- <\/TILES>/p;\
/^-- <SPRITES>/,/^-- <\/SPRITES>/p;\
/^-- <MAP>/,/^-- <\/MAP>/p;\
/^-- <SFX>/,/^-- <\/SFX>/p;\
/^-- <MUSIC>/,/^-- <\/MUSIC>/p' \
$(OUTPUT) > $(ASSETS_LUA)
clean:
@rm -f $(PROJECT)-*.tic $(PROJECT)-*.html.zip $(OUTPUT)
@echo "==> Cleaned build artifacts"
# CI/CD Targets
ci-version:
@VERSION=$$(sed -n "s/^-- version: //p" inc/meta/meta.header.lua | head -n 1 | tr -d "[:space:]"); \
BRANCH=$${CI_COMMIT_BRANCH:-$${WOODPECKER_BRANCH}}; \
if [ "$$BRANCH" != "main" ] && [ "$$BRANCH" != "master" ] && [ -n "$$BRANCH" ]; then \
VERSION=dev-$$VERSION-$$BRANCH; \
fi; \
echo "VERSION is: $$VERSION"; \
echo $$VERSION > $(VERSION_FILE)
ci-export:
@VERSION=$$(cat $(VERSION_FILE)); \
echo "==> Building and exporting version $$VERSION"; \
$(MAKE) export VERSION=$$VERSION
ci-upload:
@VERSION=$$(cat $(VERSION_FILE)); \
echo "==> Uploading artifacts for version $$VERSION"; \
ls -lh $(PROJECT)-$$VERSION.* $(PROJECT).tic $(PROJECT).html.zip 2>/dev/null || true; \
cp $(PROJECT).lua $(PROJECT)-$$VERSION.lua; \
FILE_LUA=$(PROJECT)-$$VERSION.lua; \
FILE_TIC=$(PROJECT)-$$VERSION.tic; \
FILE_HTML_ZIP=$(PROJECT)-$$VERSION.html.zip; \
SCP_TARGET="$(DROPAREA_USER)@$(DROPAREA_HOST):$(DROPAREA_TARGET_PATH)/"; \
sshpass -p "$(DROPAREA_SSH_PASSWORD)" scp -o StrictHostKeyChecking=no -P $(DROPAREA_PORT) $$FILE_LUA $$FILE_TIC $$FILE_HTML_ZIP $$SCP_TARGET
ci-update:
@VERSION=$$(cat $(VERSION_FILE)); \
echo "==> Triggering update for version $$VERSION"; \
curl "$(UPDATE_SERVER)/update?secret=$(UPDATE_SECRET)&name=$(PROJECT)&platform=tic80&version=$$VERSION"
.PHONY: all build export watch import_assets export_assets clean ci-version ci-export ci-upload ci-update

View File

@@ -1,6 +1,7 @@
# BombExpert # BombExpert
A classic BombExpert for [TIC-80](https://tic80.com/) fantasy console. A classic Bomberman clone for [TIC-80](https://tic80.com/) fantasy console.
## Features ## Features
@@ -64,15 +65,6 @@ Then open http://localhost:3333 in your browser.
- [TIC-80](https://tic80.com/) fantasy console (free version works) - [TIC-80](https://tic80.com/) fantasy console (free version works)
- Or any modern web browser (for HTML export) - Or any modern web browser (for HTML export)
## Project Structure
```
bomberman/
├── bombexpert.lua # Main game source code
├── serve.py # Simple HTTP server for browser testing
└── README.md # This file
```
## Credits ## Credits
- **Author**: Zsolt Tasnadi - **Author**: Zsolt Tasnadi

2
bombexpert.inc Normal file
View File

@@ -0,0 +1,2 @@
meta/meta.header.lua
system/system.allin.lua

Binary file not shown.

11
inc/meta/meta.header.lua Normal file
View File

@@ -0,0 +1,11 @@
-- title: BombExpert
-- name: bombexpert
-- author: Zsolt Tasnadi
-- desc: Simple BombExpert for TIC-80
-- site: http://teletype.hu
-- license: MIT License
-- version: 0.2
-- script: lua
-- luacheck: globals TIC btn btnp cls rect spr print exit sfx keyp key
-- luacheck: max line length 150

View File

@@ -1,14 +1,3 @@
-- title: BombExpert
-- author: Zsolt Tasnadi
-- desc: Simple BombExpert for TIC-80
-- site: http://teletype.hu
-- license: MIT License
-- version: 0.2
-- script: lua
-- luacheck: globals TIC btn btnp cls rect spr print exit sfx keyp key
-- luacheck: max line length 150
-------------------------------------------------------------------------------- --------------------------------------------------------------------------------
-- Constants -- Constants
-------------------------------------------------------------------------------- --------------------------------------------------------------------------------

View File

@@ -1,20 +0,0 @@
#!/usr/bin/env python3
"""Simple static file server for Bomberman HTML export."""
import http.server
import socketserver
import os
import webbrowser
PORT = 3333
DIRECTORY = "bombexpert"
os.chdir(os.path.join(os.path.dirname(os.path.abspath(__file__)), DIRECTORY))
Handler = http.server.SimpleHTTPRequestHandler
with socketserver.TCPServer(("", PORT), Handler) as httpd:
url = f"http://localhost:{PORT}"
print(f"Serving at {url}")
webbrowser.open(url)
httpd.serve_forever()