Github Repo: https://github.com/MichaelHabib/GenericIdelGame_FireBase
Live Game : https://michaelhabib.github.io/GenericIdelGame_FireBase/
FireBase Studio : https://studio.firebase.google.com/studio-12911206
Github Repo: https://github.com/MichaelHabib/GenericIdelGame_FireBase
Live Game : https://michaelhabib.github.io/GenericIdelGame_FireBase/
FireBase Studio : https://studio.firebase.google.com/studio-12911206
= TBD
– Artifacts drop from specific generators using:
`dropRate = log(GeneratorTotalPurchases) / 10`
= How to structure instructions for game design prompt ?
– UI elements, positions & values to display
– Base currency & values for everything.
– Cost of each action. Explicit instructions around scaling costs & dependencies
– Everything should be configurables & infinitly scalable.
– Each game objects has Properties, with minimum being : DisplayName for UI use & CodeName for reference within code,
= Latest ChatGPT Optimised Plan / Prompt
== Game Theme
– Time & Space : Planets & Astroides provide resources. Time shards used as energy/
== Technical Requirements
– HTML/CSS/JS Single page app that does not depend on a server and works entierly on the front-end. This is a very important requiement that should not be ignored without explicit instruction.
– Use NextJs and generate static site on build that works 100% offline client side.
–
– JSON config for everything.
– All game objects, entiries and game elements should use generic internal name, with display names being configurable.
– File structure should support modular expansion.
– Support for expanding game logic without major rewrites
– All systems must be configurable, with all possible configurable values in a config file.
– Game objects definition should be seperated from logic, with a system for convering json config into the relevant game objects & items.
– Keep functions small with meaningful names, avoid abberviations and keep names meaningful, accurate & easy to read.
– Seperate config, templates & game logic into their own files.
– Each game objects has Properties, with minimum being : DisplayName for UI use & CodeName for reference within code,
– Game State Managment with Save & Persistence
– Only create requested systems & tabs. Do not add more without confirmation.
– Do not create any depedency on thirdt party API without explicit request .
– Do not create a dependency on a server or AI.
== Design & UI
– Mobile-first design, with a fixed floating left-side menu to switch tabs, Resource Cards at the top of every page.
– Clicking “Generate Primary Resource” button to generate primary resource.
– Passive income from generators and all other relevant sources every second.
– Make use of tabs where it makes sense to switch context.
– Tabs are listed vertically on the left, that auto collaps on mobile view with burger button to expand them.
– Add “Purchase Multiplier” with 1,5,10,25,50,250,1k,10k,100k,1m, MAX, that multiple quantity of all upgrade, purchase or item use.
– Ability to trigger actions such as purchase or craft should be factor in available resources & Purchase Multiplier
– Resource Details bar at the top : list all resources name, total, loss/gain per second within a simple table.
– Stats dashboard : Resources totals & generation rates.
== Save System
– Auto-save via `localStorage`
– Allow Save history, listing all saves and ability to download or delete each one on demeand.
– Allow save import & export.
– Auto save every 10 seconds to the “Latest Auto Save”.
– Auto save every 5 minutes & keep latest 5 of those “Schedule Auto Save”
== Core Play Loop
– Click to generate primary resource, with per-click reward to be 1% of total primary resource generation per second.
– Generators auto generate every second
– Purchasing costs resources, with cost scaling based on quanitity purchased.
== Generators system
– Display Generators in Generators tab
– Generator Card should show all proprties
– Generator Card should show a “More Info” icon that triggers a modal showing all proprtties, in addition to list of all related modifiers affecting the generator.
– Generator Properties: Name, short description, quantity purchased, generation per sec of each relevant resource, purchase cost, total puchese spend,
– Generators auto generate 1 or more resource
== Resources system
– Display Resources in Resources tab.
– Resources are game a form of currency that is used to purchase, craft and upgrade through out the game.
– Resource Types : 12 generic resource types named Resource# . The first being considered Primary Resource and used where referenced in the game design instructions.
– Each Resource card should contain : Name, quantity, loss/gain per second
– Each Resource Type has a `ResourceIndex` number that increments with every new resource type added, starting from 1. PrimaryResource will always have ResourceIndex 1
– Each resource has a value releative to Primary Resource, starting at 1 then multiply by `ResourceValueIncrement`*`ResourceIndex`
== Prestige system
– Display Prestige in Prestige tab
– Prestige is an optional reset mechanic for permanent bonuses.
– Prestiege Points gained = LOG(TOTAL PrimaryResource (value of all reset game objects))
– Prestige Tier 1 : Reset resources & upgrades only.
– Prestige Tier 2 : Reset items, resources & upgrades only.
– Prestige Tier 3 : Reset artifacts, items, resources & upgrades only.
– Expandable system allows PrestigeTiers with different cost & rewards
== Acheivement System
– Triggered on milestone events.
– Rewards: items, resources, artifacts.
– Create 10 Acheivements
== Items System
– Item Types: Armour, Weapons, Acessories. Consumable
– All item belong to an Item Group.
– Armour Groups: Helmet,Leggings. Boots
– Armour Materials: Leather,Copper, Iron, Gold, Diamond
– Weapons Groups: Knife, Sword, Bow, Staff
– Weapn Materials: Wood,Copper, Iron, Gold, Diamond
– Acessories: Necklace, Ring
– Consumables:
== Inventory System
– Display Invnetory in Inventory Tab
– Inventory stores all dropped & crafted items.
– Item Types: equipable, consumable, ingrediant, quest.
– Equip/unequip per character.
– Max equipped limited by character slots.
– Drops defined in config JSON.
– Equip logic: character-specific, with slot limit.
== Character System
– Character Properties: Name, Bonus Effects, Equipment Slots
– One or more characters can be active at once, based on Active Characters Limit, which starts at 2.
== Resource calculations & modifier logic
– PPS = Σ(upgrade.pps × upgrade.qty) × character.bonus
– RandomDrop chance = baseChance × character.dropRateBoost
– All modifiers and item stats stored in JSON config.
== Drop & Loot System
– Random drops use predefined item list in JSON.