惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
爱范儿
爱范儿
H
Help Net Security
V
Visual Studio Blog
J
Java Code Geeks
Stack Overflow Blog
Stack Overflow Blog
Microsoft Security Blog
Microsoft Security Blog
Apple Machine Learning Research
Apple Machine Learning Research
MyScale Blog
MyScale Blog
The Cloudflare Blog
Martin Fowler
Martin Fowler
D
Docker
腾讯CDC
F
Fortinet All Blogs
雷峰网
雷峰网
GbyAI
GbyAI
G
Google Developers Blog
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Recent Announcements
Recent Announcements
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
Blog — PlanetScale
Blog — PlanetScale
Engineering at Meta
Engineering at Meta
博客园 - 聂微东
博客园 - 叶小钗

DEV Community

Authentication Security Deep Dive: From Brute Force to Salted Hashing (With Java Examples) Why AI Systems Don’t Fail — They Drift Spilling beans for how i learn for exam😁"Reinforcement Learning Cheat Sheet" I Replaced Chrome with Safari for AI Browser Automation. Here's What Broke (and What Finally Worked) How Python Borrows Other People's Work The $40 Architecture: Processing 1 Billion API Requests with 99.99% Uptime Vibe Coding: A Workflow Guide (From Zero to SaaS) Most webhook security guides protect the wrong side. The scary part is delivery. Headless CMS for TanStack Start: Build a Blog with Cosmic EU Age Verification App "Hacked in 2 Minutes" — What Actually Happened Comfy Cloud’s delete function does not actually remove files Running AI Models on GPU Cloud Servers: A Beginner Guide Event-driven media intelligence with AWS Step Functions and Bedrock I scored 500 AI prompts across 8 quality dimensions — here's what broke How to Call Google Gemini API from Next.js (Free Tier, No Backend Needed) The Portal Protocol: Reclaiming Human Connection in the Age of AI How to Fix Your Team's Scattered Knowledge Problem With a Self-Hosted Forum Intro to tc Cloud Functors: A Graph-First Mental Model for the Modern Cloud Designing Multi-Tenant Backends With Both Ownership and Team Access I Built a Neumorphic CSS Library with 77+ Components — Here's What I Learned PostgreSQL Performance Optimization: Why Connection Pooling Is Critical at Scale Cómo construí un SaaS multi-rubro para gestionar expensas en Argentina con FastAPI + Vue 3 🚀 I Built an Ethical Hacking Scanner Tool – Open Source Project I Replaced /usage and /context in Claude Code With a Single Statusline A Pythonic Way to Handle Emails (IMAP/SMTP) with Auto-Discovery and AI-Ready Design I Collected 8.9 Million Polymarket Price Points — Here's What I Found About How Markets Really Move EcoTrack AI — Carbon Footprint Tracker & Dashboard Everyone's Using AI. No One Agrees How. 5 self-hosted ebook managers worth trying in 2026 Building Your First AI Agent with LangChain: From Chatbot to Autonomous Assistant
SOLSTICE, A shadow capture game in C
Eliott · 2026-06-22 · via DEV Community

Eliott

June Solstice Game Jam Submission

What I Built

A two-player terminal strategy game written in C. No libraries, no graphical engin, just ANSI colors and printf.

Two players place stones on a 9×9 grid. Each stone casts a shadow away from the sun. The shadow captures every cell it crosses, and can recapture enemy territory too. The catch: the sun moves to a new position every turn, constantly shifting shadow directions.

9 stones each, 18 turns. Most cells captured wins.

Video Demo

Code

SOLSTICE — Shadow Capture

A submission for the June Solstice Game Jam 2026


What I Built

SOLSTICE is a two-player terminal strategy game written in C. It runs entirely in the terminal with ASCII rendering and ANSI colors — no external libraries, no graphical engine, just pure C and a bit of sunlight.

The concept is simple: two players, a grid, and a sun that never stays still. Each turn, the sun moves to a new position along the border of the board. You place a stone, and that stone casts a shadow — a long streak of captured territory projected directly away from the sun. The longer the distance between your stone and the sun, the longer the shadow it casts. Place well, and a single stone can sweep across half the board in one move.

After 18 turns, the player who controls the most cells wins.


The Story

How I Built It

Pure C, split across 6 files (main.c, game.c, board.c, player.c, utils.c, game.h). Compile with make, run with ./solstice.

The shadow casting works by computing a direction vector from the sun through the stone, then casting a ray in that direction. The length equals the Chebyshev distance between the stone and the sun — farther sun, longer shadow, just like real life.

The sun follows a precomputed clockwise path around the board with a small random drift each turn, so it's predictable enough to strategize around but never perfectly calculable.

The whole game is basically a simulation of what makes the solstice visually striking — a sun that moves and shadows that follow. The 18-turn structure represents the days around June 21st, and the two-player tension mirrors the solstice duality: longest day for one hemisphere, shortest for the other.