Artefactum Games Website
Artefactum Games Website
Status: 70% Complete π¨ Framework: Astro + Tailwind CSS Languages: Portuguese + English (bilingual) Vibe: Vintage horror meets murder mystery elegance
What Is This?
A marketing website for Artefactum Gamesβshowcasing the murder mystery games and serving as a potential future sales platform.
Live soon at: artefactum.games (or similar)
The Challenge
How do you make a website that feels like opening a sealed envelope from 1926? That has blood dripping down the sides? That switches seamlessly between Portuguese and English?
And do it all in a week while also finishing two actual games?
What I Built
1. Flipping Envelope Cards
The hero feature: sealed envelopes with wax seals that flip to reveal vintage postcards.
βββββββββββββββββββββββ click βββββββββββββββββββββββ
β β βββββββ> β Postcard inside: β
β π΄ Wax Seal β β - Game description β
β β β - Stamps β
β "tap to open" β β - Address lines β
βββββββββββββββββββββββ βββββββββββββββββββββββ
The CSS challenge: 3D transforms, backface-visibility, perspective. Getting it smooth on mobile was… fun.
2. Blood Splatter Layer
15+ blood splatters positioned absolutely across the page. Different sizes, opacities, rotations. Subtle but unsettling.
<img src="/images/splatter_lg1.png"
class="absolute opacity-50"
style="top: 8%; right: 5%; width: 180px; transform: rotate(25deg);" />
3. Claw Scratches on Scroll
Scratches that reveal as you scroll downβlike something is clawing at the page.
// Reveal scratches based on scroll position
const revealPercent = (scrollY / (maxScroll * 0.65)) * 100;
scratchImg.style.clipPath = `inset(${100 - revealPercent}% 0 0 0)`;
4. Bilingual i18n System
Custom TypeScript i18n without heavy libraries:
export function t(lang: Lang, key: string): string {
// Nested key support: 'home.hero.title'
// Automatic fallback to English
}
Route mapping:
/pt/jogos/β/en/games//pt/sobre/β/en/about//pt/contacto/β/en/contact/
5. Design System
Dark theme with vintage accents:
--color-bg-deep: #0a0a0a;
--color-accent-gold: #C9A961;
--color-accent-red: #8B3A3A;
Fonts: Cherish (display), Pinyon Script (elegant), JetBrains Mono (body).
What’s Been Difficult
1. CSS 3D Transforms on Mobile
The envelope flip animation looked perfect on desktop. On mobile Safari? Flickering, z-index wars, backface bleeding through.
Solution: Explicit backface-visibility: hidden on BOTH sides, higher perspective values, and careful transform-origin placement.
2. i18n Without Over-Engineering
Didn’t want to add a heavy i18n library for 2 languages. Built a minimal system, but then discovered I needed:
- Route translation (
/jogosvs/games) - Content collections with language variants
- Language switcher that preserves current page
Current solution: 50 lines of TypeScript + JSON files. Works, but feels fragile.
3. Astro Content Collections + i18n
Each game needs pt.md and en.md. The content collection config was tricky:
src/content/games/
βββ christmas-murder-1926/
β βββ pt.md
β βββ en.md
βββ orfanato/
βββ pt.md
βββ en.md
Dynamic routes ([slug].astro) had to filter by language AND slug.
4. Asset Generation
Blood splatters, wax seals, claw scratchesβall needed to be:
- Transparent PNGs
- Multiple sizes for variety
- Consistent style
Used AI image generation (DALL-E, Midjourney) but lots of iteration to get the right “vintage horror” feel.
5. Performance vs Aesthetics
15 blood splatters = 15 image requests. Each PNG is 50-100KB.
Partial solution: Lazy loading, optimized PNGs, but still working on this.
Current Progress
Done β
- Homepage with envelope cards
- Bilingual routing (PT/EN)
- Blood splatter decorations
- Claw scratch scroll effect
- Header with language switcher
- Footer with links
- Design tokens and dark theme
- Game content pages (basic)
In Progress π§
- About page content
- Contact form
- Newsletter signup (backend needed)
- SEO meta tags
- Image optimization
Not Started β³
- Custom game inquiry form
- Pricing/booking flow
- Blog integration
- Analytics
Tech Stack
| Layer | Choice | Why |
|---|---|---|
| Framework | Astro | Fast, component islands, great for content sites |
| Styling | Tailwind CSS | Rapid iteration, design tokens |
| i18n | Custom TypeScript | Minimal, fits the need |
| Deployment | TBD | Probably Netlify or Vercel |
| Domain | artefactum.games | (Pending) |
File Structure
site/
βββ src/
β βββ components/
β β βββ Header.astro
β β βββ Footer.astro
β β βββ ScrollToTop.astro
β βββ content/
β β βββ games/
β β βββ christmas-murder-1926/
β β βββ orfanato/
β βββ i18n/
β β βββ utils.ts
β β βββ en.json
β β βββ pt.json
β βββ layouts/
β β βββ BaseLayout.astro
β β βββ PageLayout.astro
β βββ pages/
β β βββ en/
β β βββ pt/
β βββ styles/
β βββ global.css
βββ public/
βββ images/
βββ splatter_*.png
βββ claw_scratches.png
βββ wax_seal.png
βββ stamp*.jpg
Learnings So Far
1. Astro is Perfect for This
Zero JS shipped by default. Component islands when needed. Content collections for structured data. Fast builds.
2. i18n is Harder Than It Looks
Even with 2 languages, edge cases multiply:
- What’s the “canonical” URL?
- How do you handle missing translations?
- Should
/redirect or show default language?
3. CSS Can Do A Lot
The envelope flip, scroll reveals, layered decorationsβall pure CSS + vanilla JS. No animation libraries needed.
4. AI-Generated Assets Need Curation
Generated 50+ blood splatters. Used maybe 15. The curation takes longer than the generation.
Development Log
| Date | Update |
|---|---|
| Dec 10, 2024 | Initial Astro setup |
| Dec 13, 2024 | i18n system implemented |
| Dec 13, 2024 | Envelope card prototype |
| Dec 13, 2024 | Blood splatters and claw scratches |
| Dec 13, 2024 | Major redesign: Vintage postcard aesthetic |
| Dec 14, 2024 | Stamps, address lines, postcard polish |
What’s Next
- Finish content pages - About, Contact, individual game pages
- Contact form - Either Netlify Forms or custom backend
- Newsletter - Integrate with email service
- Deploy - Get it live at artefactum.games
- Analytics - Plausible or similar (privacy-respecting)
Links
- Repository: github.com/marialu1/artefactum_games (site/ folder)
- Live preview: Coming soon
This project is part of the Artefactum Mystery Crimes series.
Comments