Reincarnation Diary is a text-based RPG featuring a story-branching system and turn-based combat.
Players make meaningful choices that shape the storyline while facing enemies in strategic battles.
The game is managed by GameManager.js, which integrates all core modules such as Player, Enemy, Combat, UI, Story, and more.
๐ฆ How to Convert to Electron (Desktop App)
- Description
- Installation
- Usage
- Technologies
- Game Features
- Planned Future Improvements
- File Descriptions
- Game Startup Process
- Summary
- Contributing Guidelines
- Further Support
- Contact
- Contributions
- Download or clone this project to your local machine.
- Ensure all files remain in the same project folder.
- Open
index.htmlin your web browser.
- The game will automatically start when you open
index.html. - Click the choice buttons to progress through the story.
- During combat, click the Attack button to fight the enemy.
- The game will handle scene transitions, battles, and player stats.
- HTML
- CSS
- JavaScript (ES6 Modules)
- Story-branching system with multiple choices
- Turn-based combat with enemy dodge and critical hit mechanics
- Modular and expandable game structure
- LocalStorage-based account system
- Automatic save system (prevents progress loss on refresh)
- Import/Export player account data
- expanded Job Class system
- Character ranking and lifetime progression system
- Sound effects and background music
- Visual story summary and achievement showcase at game end
- Packaging the game as a standalone desktop app using Electron
MvPorcalla
# ๐ Project Structure
Reincarnation_Diary
โ
โโโ assets
โ โโโ data
โ โ โโโ enemyData.json # Enemy data in JSON format
โ โโโ images # Game image assets
โ โโโ background # Background image
โ โโโ enemies # Enemy character images
โ
โโโ css
โ โโโ uiStyle.css # Game UI styles
โ
โโโ js # All JavaScript files
โ โโโ gameManager.js # Main game controller
โ โโโ player.js # Handles player data and actions
โ โโโ combat.js # Manages combat logic
โ โโโ ui.js # Handles UI rendering and updates
โ โโโ story.js # Story content and scene management
โ โโโ debugger.js # Debugging tools and story validator
โ โโโ enemy.js # Enemy class and enemy data handling
โ โโโ combatUtils.js # Combat utility functions
โ
โโโ endScreen.html # End screen page
โโโ index.html # Game starting page
โโโ mainGame.html # Main game interface
โโโ README.md # Project documentation
- Acts as the main game controller.
- Starts the game, manages game state and scene transitions.
- Handles combat logic and scene rendering.
- Contains the gameโs story content.
- Manages scenes, transitions, and story structure.
- Updates the user interface (UI).
- Displays the story, player stats, enemy visuals, and interactive choices.
- Manages turn-based combat between the player and enemies.
- Handles attack sequences and combat flow.
- Provides combat-related utility functions.
- Calculates:
- Attack damage
- Critical hit chance
- Bonus damage
- Defines the Enemy class and enemy combat interactions.
- Manages:
- Enemy attacks
- Damage-taking and dodge chance
- Enemy data loading from JSON
- Random enemy selection based on tier
- Manages player creation and player stats.
- Controls player health and reset functions.
- Provides debugging tools.
- Validates story structure during development.
- Controls whether debug logs are displayed.
- When the game loads,
startGame()is automatically called. - The
goToScene('start')function is triggered to load the starting scene. - The game displays:
- Story text
- Choices or combat (if an enemy is present)
- The player clicks buttons to make choices or to fight enemies.
- The game progresses based on player interactions.
- The project is modular: each file has a specific role (player, combat, UI, story, debug).
- The gameManager.js is the central hub of the system.
- Easy to maintain and expand by adding new features like scenes, enemies, and player mechanics.
Thank you for your interest in contributing! You can help by:
- Suggesting new features
- Fixing bugs
- Improving or expanding the documentation
- Adding new story branches or combat mechanics
- Fork this repository.
- Create a new branch:
git checkout -b feature/YourFeature - Commit your changes:
git commit -m 'Add YourFeature' - Push to your branch:
git push origin feature/YourFeature - Submit a pull request.
Please open an issue or pull request if you would like to contribute.
All contributions are welcome and appreciated!
If you'd like to enhance or improve this project, here are some great areas to contribute:
- โจ Adding inline comments and function headers to improve code readability
- ๐ Creating detailed per-file documentation in Markdown
- ๐๏ธ Refining the project folder structure for better scalability and maintainability
๐ Feel free to reach out, submit feedback, or contribute to make this project even better! ๐
- Email: digitalmelvs@gmail.com
- GitHub: MvPorcalla
For any issues or feedback, you can open a GitHub Issue.
Contributions, suggestions, and improvements are always welcome!
Feel free to fork this project and submit a pull request.
All contributions are appreciated and will help this project grow! ๐
This project is licensed under the MIT License.
You are free to use, modify, and distribute this project, provided that you give proper credit.
If you use, modify, or reference this project, please include the following attribution:
Copyright (c) 2024 MvPorcalla
โ๏ธ Proper credit helps support the developer and acknowledges the original creator.
โ ๏ธ Note: Even modified or rebranded versions must retain proper attribution, as required by the MIT License.
See the full LICENSE file for more details.
