Skip to content

basteez/gog-library-plot-analysis

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

1 Commit
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Video Game Story Analysis

A comprehensive Jupyter notebook that analyzes your personal video game library to identify games with exceptional storytelling and narrative quality.

๐ŸŽฏ Overview

This project helps you discover hidden narrative gems in your game collection by analyzing game descriptions, genres, and themes to identify titles with compelling stories. Perfect for gamers who love story-driven experiences!

๐Ÿ“Š What It Does

  • Analyzes your entire game library from GOG Galaxy exports
  • Scores games based on narrative elements and story-rich characteristics
  • Categorizes games into Excellent, Good, and Decent story quality tiers
  • Generates comprehensive visualizations with 6 detailed charts and statistical insights
  • Exports results to CSV for further analysis
  • Provides detailed listings of top story-driven games with summaries and metadata

๐Ÿš€ Getting Started

Prerequisites

  • Python 3.7+
  • Jupyter Notebook or VS Code with Jupyter extension
  • GOG Galaxy (for exporting your game library)

Required Python Libraries

pip install pandas numpy matplotlib seaborn

Step 1: Export Your Game Library

  1. Install GOG Galaxy Export Script:

  2. Generate gameDB.csv:

    • The export script will create a gameDB.csv file
    • Place this file in the same directory as the notebook

Step 2: Run the Analysis

  1. Open game-plot-analysis.ipynb in Jupyter or VS Code
  2. Run all cells sequentially
  3. View results and generated visualizations

๐Ÿ“ˆ Analysis Methodology

Scoring Algorithm

The notebook uses a sophisticated scoring system that evaluates:

๐Ÿ“ Narrative Keywords (Weight: 2x)

  • Story, plot, narrative, character development
  • Quest systems, dialogue, choices
  • World-building, lore, backstory elements
  • Epic, cinematic, immersive experiences

๐ŸŽฎ Story-Rich Genres (Weight: 3x)

  • RPG, Adventure, Visual Novels
  • Interactive Fiction, Point & Click
  • Story-driven and narrative-focused games

๐ŸŽจ Thematic Elements (Weight: 1x)

  • Drama, mystery, horror, thriller
  • Fantasy, sci-fi, historical settings
  • Atmospheric and immersive themes

Categories

  • ๐Ÿ† Excellent Stories (Score โ‰ฅ 8): Games with outstanding narrative quality
  • ๐Ÿ“š Good Stories (Score 5-7): Solid story-driven experiences
  • ๐Ÿ“„ Decent Stories (Score 3-4): Games with notable narrative elements

๐Ÿ“ Output Files

  • games_with_great_stories.csv - Complete analysis results with scores and metadata
  • Interactive visualizations including:
    • Score distribution with threshold indicators
    • Category breakdown pie charts
    • Top games horizontal bar charts
    • Score vs summary length correlation
    • Detailed statistical insights
  • Categorized game listings with summaries
  • Summary statistics and insights

๐Ÿ“Š Visualization Features

The notebook generates comprehensive visualizations:

๐Ÿ“ˆ Primary Charts (2x2 Grid)

  1. Score Distribution Histogram - Overall narrative score spread
  2. Category Pie Chart - Percentage breakdown by quality tiers
  3. Top 10 Games Bar Chart - Highest-scoring titles
  4. Score vs Summary Length - Correlation analysis

๐Ÿ“Š Enhanced Charts (2x3 Grid)

  1. Score Distribution with Thresholds - Histogram with quality cutoff lines
  2. Detailed Category Breakdown - Four-tier classification
  3. Top 15 Games Extended View - More detailed top games list
  4. Color-Coded Correlation Plot - Enhanced summary length analysis
  5. Games per Score Value - Exact count distribution
  6. Cumulative Score Distribution - Percentile analysis

๐Ÿ“‹ Statistical Insights

  • Average and median scores
  • Standard deviation analysis
  • Top 10% threshold calculation
  • Comprehensive percentage breakdowns

๐Ÿ“Š Sample Results

The analysis typically identifies:

  • ~80-85% of games with some narrative elements
  • Top-tier story games with detailed breakdowns and scores
  • Hidden gems you might have overlooked in your library
  • Genre distribution of story-rich games with visual representations
  • Statistical insights including averages, medians, and percentiles
  • Correlation patterns between description length and story quality

๐ŸŽจ Features

โœจ Enhanced Analysis

  • 36 refined narrative keywords (English-only, no duplicates)
  • 13 story-rich genre categories for comprehensive coverage
  • 23 narrative themes for atmospheric classification
  • Intelligent scoring algorithm with weighted criteria

๐Ÿ“Š Advanced Visualizations

  • 6 detailed charts in enhanced visualization mode
  • Color-coded elements for easy interpretation
  • Statistical breakdowns with key metrics
  • Professional styling with grids and legends
  • Interactive insights for deep analysis

๐Ÿ“ Comprehensive Output

  • Detailed CSV export with all scores and metadata
  • Categorized listings (Excellent/Good/Decent)
  • Complete game catalog with easy-copy title lists
  • Summary statistics and distribution insights

๐Ÿ”ง Customization

Modify Scoring Criteria

Edit these sections in the notebook to adjust analysis:

# Add your own narrative keywords (English only)
narrative_keywords = [
    'your', 'custom', 'keywords', 'here'
]

# Adjust scoring weights in the function
def calculate_story_score(row):
    # Summary keywords: weight = 2
    # Story-rich genres: weight = 3
    # Narrative themes: weight = 1
    # Long summary bonus: weight = 1

Change Category Thresholds

excellent_threshold = 8  # Adjust for stricter/looser excellent criteria
good_threshold = 5       # Adjust for good story threshold
decent_threshold = 3     # Adjust for minimum story quality

Customize Visualizations

# Modify chart colors, sizes, or add new plots
colors = ['gold', 'lightcoral', 'lightskyblue', 'lightgray']
plt.figure(figsize=(15, 10))  # Adjust figure size

๐Ÿ“ Understanding Your Results

High-Scoring Games Usually Include:

  • Detailed character development
  • Branching storylines or multiple endings
  • Rich world-building and lore
  • Emotional or psychological themes
  • Choice-driven narratives

Categories Explained:

  • ๐Ÿ† Excellent: Must-play story experiences
  • ๐Ÿ“š Good: Strong narrative games worth your time
  • ๐Ÿ“„ Decent: Games with notable story elements

๐Ÿค Contributing

Feel free to:

  • Report issues or suggest improvements
  • Add new narrative keywords or themes
  • Enhance the scoring algorithm
  • Create additional visualizations

๐Ÿ“„ License

This project is open source and available under the MIT License.

๐Ÿ™ Acknowledgments

๐Ÿ› Troubleshooting

Common Issues:

CSV Parsing Errors:

  • Ensure gameDB.csv uses tab separation
  • Check for corrupted export files
  • Verify the file is in the same directory as the notebook

Missing Libraries:

pip install pandas numpy matplotlib seaborn

Empty Results:

  • Verify your CSV file contains summary/description data
  • Check if genre and theme columns are populated
  • Ensure your games have English descriptions for keyword matching

Jupyter Issues:

  • Restart kernel if cells fail to execute
  • Ensure all required packages are installed
  • Clear output and run cells in order

Visualization Problems:

  • Update matplotlib if charts don't display: pip install --upgrade matplotlib
  • Ensure seaborn is properly installed: pip install --upgrade seaborn
  • Check that your display supports the generated chart formats

๐Ÿ“ž Support

If you encounter issues:

  1. Check the troubleshooting section above
  2. Verify your gameDB.csv file format
  3. Ensure all dependencies are installed
  4. Review the GOG Galaxy Export Script documentation

Happy Gaming and Story Hunting! ๐ŸŽฎ๐Ÿ“š

About

Small jupyter notebook for gog library plot analysis

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published