Skip to content

deprimus/CodeForEurope

Repository files navigation

๐Ÿ›๏ธ Parliament Hero

Parliament Hero is an educational role-playing game that places players in the heart of the European democratic process. It teaches critical civic skills such as identifying disinformation, researching laws, and making informed decisions โ€” all through an engaging game loop based on real EU values, structures, and challenges.

Parliament here representing picture

๐Ÿ”— Quick Links


๐Ÿ“‘ Table of Contents


๐ŸŽฏ What You'll Learn

Through interactive missions and dynamic NPC interactions, players will explore:

  • ๐Ÿ“œ The role and responsibilities of the European Parliament
  • ๐Ÿ—ณ๏ธ The importance of civic participation and informed voting
  • ๐Ÿ•ต๏ธ Strategies to recognize, prebunk, and debunk disinformation through research and critical thinking

๐ŸŒˆ Value perspectives: democratic orientations

Players engage with four broad value perspectives that reflect the diversity of views in the European Parliament (in code and data these map to orientation types; the goal is inclusive framing in learning materials):

  • ๐ŸŸฆ Traditionalist โ€“ heritage, stability, continuity
  • ๐ŸŸจ Libertarian / liberal โ€“ individual freedoms, market economy, reform
  • ๐ŸŸฉ Left / green โ€“ sustainability, climate action, social justice
  • ๐ŸŸฅ Right / progressive โ€“ innovation, equality, inclusive growth

Each perspective offers a lens for laws, debates, and choices. How you vote and whom you listen to shapes relationships and outcomesโ€”not a single โ€œcorrectโ€ ideology, but informed trade-offs.


๐Ÿ” Gameplay Loop: The Four Steps of Democracy

๐Ÿงพ Step 1 โ€“ A Law Appears

Each round begins with a new law proposal from one of the major policy areas. These laws simulate real-life situations where people may only hear headlines or partial information โ€” and must decide what to do next.

NPCs react immediately, with mood bars showing their opinions. These quick impressions mimic how real citizens and politicians may initially react without full context. Itโ€™s now up to the player to learn more.

โžก๏ธ This step highlights the challenge of limited knowledge and encourages curiosity, skepticism, and further inquiry.

Step one


๐Ÿข Step 2 โ€“ The Office

Players are then placed in a more interactive environment: the Office, where they meet a variety of individuals and institutions who present their opinions or lobby for or against proposed laws.

This mirrors day-to-day real-world information exposure: news articles, conversations, influencers, and social media posts.

Some of these sources are trustworthy โ€” others are not.

Players must:

  • Examine biases and stated viewpoints
  • Distinguish between reliable and unreliable information
  • Begin to suspect potential disinformation or manipulation

โžก๏ธ This stage develops information filtering and teaches players to question sources before accepting them as fact.

๐Ÿ‘‰ View "Step Two" as a GIF (opens in new tab)


๐Ÿ“š Step 3 โ€“ The Library

This is the debunking and prebunking phase. Players take a deep dive into information: reading books, comparing media sources, and using online tools inside the Library.

Tools available:

  • ๐Ÿ“– Click bookshelves to access historical context and data
  • ๐Ÿ’ป Use the laptop to simulate online research

Players are encouraged to consult multiple sources, compare conflicting narratives, and draw their own conclusions. Critical thinking is essential โ€” and rewarded.

โžก๏ธ This phase teaches media literacy and source triangulation, helping players learn to verify before acting.

All these steps are repeated multiple times until an ending in reached.

Step three


๐ŸŽฌ Endings โ€“ Your Votes Shape the World

After a predefined number of rounds, the game concludes with one of five possible endings based on the player's voting patterns and how orientation influence shifted:

  • ๐ŸŸฆ A Traditionalist-leaning ending
  • ๐ŸŸจ A liberal-leaning ending
  • ๐ŸŸฉ A green / left-leaning ending
  • ๐ŸŸฅ A progressive / right-leaning ending
  • โš–๏ธ A Harmony ending โ€“ where influence was relatively balanced across perspectives

This outcome depends on:

  • Which perspectives you supported most through votes
  • The NPCs you interacted with and influenced
  • The laws you chose to support or reject
  • Societal indicators (economy, inequality, education, health) tracked via welfare effects

โžก๏ธ At this final point, the game highlights a key civic message: Every vote matters. Every interaction counts.

Players reflect on how their individual choices shaped the political landscape, emphasizing the importance of participation, presence, and informed decision-making in a democracy.


๐Ÿ—ณ๏ธ Step 4 โ€“ Voting Time - Going back to step 1

With everything they've seen and researched, players now face the final decision: vote yes or no on the proposed law.

They must consider:

  • Public mood
  • Alignment with different value perspectives
  • What they uncovered in the Library
  • Long-term effects on reputation, societal indicators, and future laws

Every vote matters and will influence how characters respond, how the public views your performance, and how future laws develop.

โžก๏ธ This step emphasizes the power and responsibility of voting, and the need to make informed, self-driven choices โ€” not emotional or misled ones.


๐Ÿง  Mechanics & Game Framework

To manage the interplay of laws, NPCs, value perspectives, societal welfare indicators, and outcomes, we combine Unity editor tools with a data-driven JSON pipeline. Together they make the project a reusable educational framework.

๐ŸŒ Web content editor (JSON)

Live editor: CodeForEurope Data Editor โ€” a static, browser-only tool to load game_database.json, edit structured content with guidance, and download a compatible file. Nothing is uploaded; all processing stays on the userโ€™s device.

Use it to adjust text, links between laws and interactions, EuroChat posts, opinions (pro / neutral / against summaries), law effects, and welfare effectsโ€”without hand-editing raw JSON. Enum reference fields (FactionType, InteractionEffectType) are documented in the data file; full in-browser editing of those definitions is work in progress for a future version.

Models and prefabs: the web editor does not create new 3D models or Unity prefabs. You still author assets in Unity. The app maps existing content by prefabPath and IDs: as long as paths point to resources the build already includes, NPCs and scenes resolve correctly.

๐Ÿ”ง 1. NPC Creator (Unity)

Creating and wiring new NPC prefabs, meshes, and ScriptableObject setup remains Unity-first. The NPC Creator editor window is the primary tool for:

  • Personal value orientations (mapped to internal orientation types)
  • Display names, visuals, traits
  • Linking to prefabs under Resources

A richer NPC workflow in the web editor is work in progress; today, the site is ideal for reusing and retargeting existing NPC definitions and paths.

๐Ÿ’ฌ 2. NPC Interaction Creator

Used for defining:

  • Dialogue lines for office visits
  • Effect types and magnitudes (mapped to internal InteractionEffectType values)
  • Which NPC each interaction belongs to

Interactions used in Step 2 (Office) are authored here in Unity; the same interaction names are referenced from JSON for laws and validation.

๐Ÿ›๏ธ 3. Law Manager & welfare indicators

Used to:

  • Add law proposals and link them to NPC interactions by name
  • Define short and long descriptions and icon paths (icon support may evolve)
  • Law effects โ€“ shifts along orientation axes (personal-value / coalition-style influence in gameplay)
  • Welfare effects โ€“ changes to societal indicators when a law passes: GDP per capita, Gini (inequality), human capital, and life expectancy (WelfareIndicator in code)

WelfareManager applies these effects after votes, updates on-screen indicators, and feeds into composite welfare outcomes at the end of a run.

๐Ÿ—ƒ๏ธ 4. Game data (game_database.json)

Runtime content is loaded from Assets/Resources/GameData/game_database.json via GameDatabase:

Section Role
fieldDetails Human-readable enum reference for data authors (orientation & interaction effect types)
npcs IDs, names, prefabPath, orientation indices
interactions Named office scenes: npcId, dialogue lines, typed effects
laws Titles, descriptions, optional long text (include in LawJson if you need it in Unity), iconPath, law effects, welfareEffects, interactionNames
posts EuroChat feed grouped by lawName
opinions Short pro / neutral / against copy keyed by law name (used by the web editor and content workflow; add fields to GameDatabaseRoot in code if you need them loaded at runtime)

Keeping this file consistent preserves compatibility with GameDatabaseRoot and the Unity parsers. Extra keys not yet mirrored in C# are ignored by JsonUtility until wired up.


These tools combine so Parliament Hero stays a full framework, not a single-use product. Educators and developers can:

  • Replace or extend scenarios (e.g., climate, rights, digital policy)
  • Tune welfare and orientation balance via JSON or Unity tools
  • Reuse the platform for other democratic learning contexts

โžก๏ธ Our goal is repeatable, adaptable educational experiences accessible to many audiences.


๐Ÿ“– Code & Tooling Documentation

We provide detailed documentation for our codebase and Unity tools in the Scripts/README.md file.
It covers managers (GameManager, WelfareManager, GameDatabase, etc.), editor windows, and how JSON data connects to runtime systems.

For content editing without Unity, use the web data editor and the game_database.json layout described under Mechanics & Game Framework.


๐Ÿ“š Educational Impact

Parliament Hero delivers powerful learning outcomes by blending real EU content with fun, interactive storytelling:

  • ๐Ÿง  Understanding of democratic institutions and law-making
  • ๐Ÿ”Ž Skills in research, evidence comparison, and narrative analysis
  • ๐Ÿ—ณ๏ธ Empowerment through knowledge of how and why to vote
  • ๐Ÿง Awareness of personal biases and the manipulation of information

All while staying approachable for young learners and meaningful for adults.


๐Ÿง‘โ€๐Ÿซ Techniques & Educational Design

To make democratic education more accessible and impactful, Parliament Hero uses a variety of innovative techniques:

  • ๐ŸŽฎ Gamification
    Complex concepts such as legislation, civic engagement, and EU institutions are translated into interactive game mechanics suitable for all age groups.

  • ๐Ÿ“– Progressive Storytelling
    The game narrative evolves based on the playerโ€™s decisions, making each playthrough unique.

  • ๐Ÿ•ต๏ธ Debunking & Prebunking Mechanics
    Players are exposed to misinformation through law proposals and NPCs. In the Library, they can uncover the truth, fostering critical thinking and media literacy.

  • ๐Ÿค Plural perspectives
    Players interact with diverse viewpoints and influences, reflecting the pluralism of real democratic institutions.

  • ๐Ÿ‡ช๐Ÿ‡บ Integrated EU Content
    All missions and storylines are based on real EU information, ensuring authenticity and relevance.


โš ๏ธ Challenges We Faced

Designing Parliament Hero came with important challenges:

๐Ÿงฉ Gamifying Real Processes

  • Turning complex, dry procedures into accessible and entertaining mechanics
  • Balancing fun with educational value

๐Ÿ”„ Managing Complexity

  • Simulating political diversity with dynamic NPC behavior
  • Maintaining consistent logic across numerous interactions

๐Ÿง  Pedagogical Alignment

  • Ensuring each decision teaches a real-world skill
  • Designing systems that promote learning by doing, not lecturing

๐Ÿงช Disinformation Design

  • Creating misleading but realistic fake news examples
  • Encouraging skepticism without promoting cynicism or conspiracy thinking

๐Ÿงฐ Framework Modularity

  • Making tools robust enough for reusability, yet simple for non-programmers
  • Balancing flexibility and structure in the Unity Editor

๐Ÿ”ฎ Future Plans

We're excited about the future of Parliament Hero and committed to making it even more accessible, engaging, and educational. Here's what's on our roadmap:

๐Ÿ“ฑ Mobile Support We plan to port the game to Android and iOS platforms, bringing civic education to more users in a portable, touch-friendly format.

๐ŸŽฎ Controller Accessibility We aim to add support for game controllers to ensure players with physical disabilities can interact with the game more comfortably and inclusively.

๐ŸŽจ Enhanced Visual Accessibility Weโ€™ve already taken steps to ensure good color contrast for players with visual impairments. In future updates, we plan to introduce specially designed accessible color palettes to improve clarity and readability.

๐Ÿ“ˆ Expanded Content Our vision includes the addition of more law proposals, characters, value perspectives, NPCs, and decision paths to increase replayability and educational value.

๐Ÿง  Deeper Interactions and Scenarios We aim to enrich gameplay with more nuanced dilemmas, branching narratives, and unexpected consequences to better mirror real-world complexities in civic life and policymaking.

๐ŸŽต Assets

๐Ÿ”Š Audio

Third-party sounds are from freessound.org as follows:

  • ๐Ÿฑ ANMLCat_Cat Meow Request 01_KVV AUDIO_FREE, by KVV_Audio (CC BY 4.0)
  • ๐Ÿ“„ Paper rip 1, by omgitsjo (CC0)
  • ๐Ÿฆ‡ bat swoosh, by MrGungus (CC0)
  • ๐Ÿ•น๏ธ Menu_Select, by SomeUsername0 (CC0)
  • ๐ŸŽถ Voice Male humming sounds, by bolkmar (CC0)

๐ŸงŠ 3D Models

The 3D models were generated by using AI via meshy with a premium subscription.


Go back to Quick Links to view other resources or play our game!


๐Ÿ—ณ๏ธ Your vote is your voice. Your knowledge is your shield.
Learn. Think. Decide. Be a Parliament Hero.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors