A data-driven 2D RPG portfolio engine built with React, Kaplay.js, and Jotai.
Turn your resume into an interactive game world. The template is fully modular: logic is decoupled from content, which is supplied through JSON configuration files.
https://verosedai.github.io/portfolio-gamified/
Combines Kaplay.js for high-performance 2D rendering with React for UI overlays such as modals and HUD elements.
World elements (portals, positions, interactions) are generated dynamically from layoutData.json.
No hardcoded coordinates.
Runtime injection of CSS variables and GLSL shader uniforms through theme.json.
Includes configurable background music and sound effects.
Supports:
- 4-direction sprite sheets
- 8-direction advanced sprite sheets
Configured entirely through playerData.json.
Touch-to-move controls, virtual D-pad, and fully responsive UI.
Sprites, audio, textures, and more are loaded dynamically from JSON manifests.
Fully interactive NPCs with:
- Proximity Detection: Visual cues ("!") when near.
- Rich Dialogue: Typewriter effect, multiple pages of text.
- Interactive Choices: Support for Yes/No options that trigger in-game events (e.g., launching mini-games).
- Configurable: Defined via
npcData.json.
- React 18
- Kaplay.js
- Vite
- Jotai
- JSON configuration files
# 1. Clone the repository
git clone https://github.com/your-username/rpg-portfolio-template.git
cd rpg-portfolio-template
# 2. Install dependencies
npm install
# 3. Run development server
npm run devAll configuration files live in public/configs/.
| File | Description |
|---|---|
| aboutData.json | Personal info: Name, Bio, Stats, Education, Certifications. |
| layoutData.json | World entities: portals, icons, types, coordinates. |
| npcData.json | NPC definitions: position, sprites, dialogues, interactions. |
| theme.json | Colors, shaders/images, music playlist, SFX. |
| playerData.json | Player sprite configuration, sliceX/Y, animations, speed. |
| skillsData.json | Skills and icons used in the Memory Game modal. |
| projectsData.json | Project list for the Gallery modal. |
| experiencesData.json | Work experience entries. |
| socialsData.json | Social links. |
{
"colors": {
"background": "#0b0c15",
"primary": "#2de2e6",
"text": "#ffffff"
},
"background": {
"type": "shader", //or image
"asset": "tiledPattern"
},
"audio": {
"enabled": true,
"playlist": ["background-music.mp3"],
"sfx": { "flip": "flip.mp3", "match": "match.mp3" }
}
}{
"sprite": "hero_simple",
"directions": 4,
"sliceX": 3,
"sliceY": 4,
"anims": {
"idle": 0,
"walk-down": { "from": 0, "to": 2, "loop": true },
"walk-right": { "from": 3, "to": 5, "loop": true },
"walk-up": { "from": 6, "to": 8, "loop": true }
}
}{
"sprite": "hero_complex",
"directions": 8,
"sliceX": 4,
"sliceY": 8,
"anims": {
"walk-down": { "from": 0, "to": 3, "loop": true },
"walk-right-down": { "from": 28, "to": 31, "loop": true }
}
}โโโ public/
โ โโโ configs/ # JSON data layer
โ โโโ logos/
โ โโโ projects/
โ โโโ sprites/
โ โโโ audio/
โ โโโ fonts/
โโโ src/
โ โโโ components/ # Kaplay.js game objects
โ โโโ entities/ # Player logic & movement
โ โโโ reactComponents/ # React UI
โ โโโ initGame.js # Game initialization
โ โโโ store.js # Jotai state
โโโ ...
| Platform | Move | Interact |
|---|---|---|
| Desktop | Point & Click | Walk into portals |
| Mobile | Tap to move | Auto-trigger on collision |
- Fork the project
- Create a feature branch
- Commit your changes
- Push your branch
- Open a pull request
- Player asset: Modified version of 8-Directional Gameboy Character
- Sound effects: u_y3wk5ympz8, Shiden Beats Music, Maksym Malko (Pixabay)
- Inspiration: JSLegendDev