Cite as
projectPiki/pikmin
Original
https://github.com/projectPiki/pikmin
Pinned
projectPiki/pikmin @ 9a2163626a269ae7c699fc195cf91a5ca791044d
Accessed
2026-10-22
Licence
CC0 1.0 (LICENSE.MD; the GitHub API reports CC0-1.0); the game is Nintendo's
Credit
The projectPiki contributors' C++ decompilation of Pikmin for the GameCube. Names and comments quoted in pikmin claims are theirs.
Notes
The README calls it "A complete matching decompilation of Pikmin (GameCube, 2001)" and lists five versions as 100% matching; configure.py builds `GPIE01_01` (USA Rev 1, DEFAULT_VERSION = 5) unless told otherwise, and its build.sha1 for that version (config/GPIE01_01, not fetched) gives main.dol SHA-1 02204260b7efe8742d34572e58ba3dfecd92e4e9. Every file the pikmin claims cite is `Object(Matching, ...)` in configure.py. Version differences sit behind `VERSION_` macros. Most tuning isn't in the code: parameter blocks (`Parm<>` fields with a code default, an id such as `p00`, and a name) are overwritten by disc files the repo doesn't hold, among them parms/gamePrms.bin (the day clock), parms/pikiMgr.bin (Pikmin timings and ranges), and parms/pelMgr.bin (pellet and body configs). The day clock is in plugPikiColin/gameflow.cpp and include/gameflow.h, the day's end in plugPikiColin/newPikiGame.cpp and plugPikiKando/gameCoreSection.cpp, sprouts in plugPikiKando/itemAI.cpp, Pikmin states in plugPikiKando/pikiState.cpp and piki.cpp, and the Onion in plugPikiKando/goalItem.cpp.

Cited on

Claims (8)

projectPiki/pikmin is "A complete matching decompilation of Pikmin (GameCube, 2001)" that builds five releases; its configure.py builds USA Rev 1 (GPIE01_01) by default, and every file the atlas cites is marked Matching there. The repo holds "no game assets", and the game's tuning parameters are read at run time from disc files it doesn't include, so their code defaults can differ from the shipped values.README.MD L14–18README.MD L28configure.py L29–37include/gameflow.h L596src/plugPikiColin/gameflow.cpp L594src/plugPikiKando/pikiMgr.cpp L81src/plugPikiKando/pelletMgr.cpp L1581Code
The clock advances by the frame's real time (gsys->getFrameTime()), and a 24-hour game day lasts 60 × daySpeed × day_multiply real seconds: daySpeed (p00) comes from parms/gamePrms.bin, with a code default of 20 minutes that a decompilation comment gives as 27 in the file, and day_multiply comes from the stage file, 1 if it has none. Each day starts at startHour (t00, default 7.0) and ends when the time of day reaches endHour (t01, default 19.0), so the playable span is 12 ÷ 24 of a game day (computed): with day_multiply at 1, 10 real minutes at the code defaults and 13.5 at the comment's 27. The clock advances only while no reset is pending (gsys->resetPending()), no menu is open outside a cutscene, nothing is paused (mPauseAll), no window is over the screen (mIsUIOverlayActive), no cutscene plays, the section's update flags include UPDATE_WORLD_CLOCK, and the game isn't in the tutorial (isTutorial()).include/gameflow.h L599–601include/gameflow.h L619src/plugPikiColin/gameflow.cpp L594include/gameflow.h L737–738src/plugPikiColin/newPikiGame.cpp L2226–2237src/plugPikiColin/gameflow.cpp L204–215src/plugPikiColin/newPikiGame.cpp L2155–2159src/plugPikiColin/mapSelect.cpp L286–302src/plugPikiColin/newPikiGame.cpp L864–870Code
When a day ends (GameCoreSection::cleanupDayEnd), outside challenge mode, the tutorial, and the game's ending (isEnding(): the 30th day, or all 30 ship parts), every Pikmin is killed and counted as left behind unless it is entering or leaving an Onion, or in its LookAt state, or following the captain (formation mode) in a state other than drowning, burning, swallowed, bubbled, dying, or flicked, or in free mode (FreeMode, in any state) within mSunsetSafetyRange (p60, "日没生き残り範囲", code default 200, read from parms/pikiMgr.bin) of an Onion or of the ship, measured by qdist2's ground-plane approximation (|dx| + |dz| − ½ min). Pikmin with mushroom heads die too. If any were left behind, the take-off cutscene plays its enemy-attack version. The survivors then all go into their color's Onion (exitDayEnd), and a Pikmin with no Onion of its color is killed.src/plugPikiKando/gameCoreSection.cpp L598–618src/plugPikiKando/gameCoreSection.cpp L629–676include/PikiMgr.h L112src/plugPikiKando/pikiMgr.cpp L81src/sysCommon/sysMath.cpp L511–517src/plugPikiKando/playerState.cpp L110–118src/plugPikiColin/newPikiGame.cpp L1507–1512src/plugPikiKando/gameCoreSection.cpp L362–369Code
The game allows MAX_DAYS = 30 days, counted by mCurrentDay (getCurrDay() returns it minus 1). At the end of a day with all 30 ship parts (MAX_UFO_PARTS) the good ending plays. Otherwise, a day count below 30 goes up by 1 with the end-of-day results, and once it has reached 30, the ending is the neutral one if the player holds at least MIN_HAPPY_END_PARTS = 25 parts, counted without five named parts (the Nova Blaster, Space Float, Massage Machine, Secret Safe, and UV Lamp), and the bad one if not. Computed: of 30 parts with 5 not counted, 25 means every one of the other 25.include/GlobalGameOptions.h L9–13src/plugPikiColin/newPikiGame.cpp L1565–1569src/plugPikiColin/newPikiGame.cpp L1586–1587src/plugPikiColin/newPikiGame.cpp L1624–1631src/plugPikiKando/playerState.cpp L273–275src/plugPikiKando/playerState.cpp L1090–1092src/plugPikiKando/playerState.cpp L778–780Code
A buried sprout (PikiHeadItem) waits mGrowUpTime (p51, "growupTime(秒)") plus 0 to 2 seconds at random, then plays its growth animation and moves one stage, leaf to bud or bud to flower ((mFlowerStage + 1) % 3). A flower waits mWiltTime (p52, "kareTime(秒)") plus 0 to 2 seconds, then wilts: it becomes a leaf, and after mRebirthSeedTime (p53) plus 0 to 2 seconds it goes back to the buried state. The three times are read from parms/pikiMgr.bin; their code defaults are 4, 4, and 1 seconds. A plucked Pikmin keeps its sprout's stage.src/plugPikiKando/itemAI.cpp L305–313src/plugPikiKando/itemAI.cpp L326–332src/plugPikiKando/itemAI.cpp L163–175src/plugPikiKando/itemAI.cpp L349src/plugPikiKando/itemAI.cpp L381–393include/PikiMgr.h L101–103include/GlobalGameOptions.h L66–69src/plugPikiKando/naviState.cpp L2581Code
A Pikmin that isn't yet a flower drinks when it touches a nectar puddle in its normal state, unless it is damaged, carrying (transport mode), or mushroom-headed; the puddle is an OBJTYPE_Water object, which a decompilation comment calls nectar. If it drank, its growth animation makes it a flower (setFlower(Flower)) at once, from leaf or bud.src/plugPikiKando/pikiState.cpp L407–420src/plugPikiKando/pikiState.cpp L516–517src/plugPikiKando/pikiState.cpp L2402–2406Code
When a pellet or an enemy body (both Pellets with a config from parms/pelMgr.bin) finishes being drawn into an Onion, GoalItem::suckMe adds the config's mMatchingOnyonSeeds (p06) to the Onion's pending count if the config's type (p00) equals the Onion's color, and mNonMatchingOnyonSeeds (p07) otherwise; the code defaults are 1 and 1, and a negative value sets off fireworks instead. The Onion then fires one sprout of its own color per pending count, which lands and buries itself as a leaf; when no sprout object can be created, it stores a leaf Pikmin inside instead. Ship parts take the ship's path, not this one. In the decompilation's enum the type for bodies, PELTYPE_Corpse, is 0, the same value as PELTYPE_Blue, which the comparison would read as a blue match; the shipped configs' p00 values are data.src/plugPikiKando/goalItem.cpp L344–365src/plugPikiKando/pelletMgr.cpp L110–119src/plugPikiKando/pelletMgr.cpp L1581src/plugPikiKando/pelletState.cpp L346–350src/plugPikiKando/itemAI.cpp L853–886src/plugPikiKando/itemAI.cpp L170–171src/plugPikiKando/pelletMgr.cpp L147–154include/Pellet.h L37–44include/GlobalGameOptions.h L52–55Code
Fire (InteractFire) sets a live Pikmin burning (startFire) unless it is red. A bubble attack (InteractBubble) puts a live Pikmin in its bubble state unless it is blue, or already bubbled, dying, or dead. A Pikmin that lands on a water surface, or rides an object standing on water within 10 units of its height, starts drowning unless it is blue, its mInWaterTimer isn't 0 (it has already touched water), or it is dying, dead, pressed (PIKISTATE_Pressed), or hanging over water (PIKISTATE_WaterHanged). Yellow Pikmin get no exemption in these three checks.src/plugPikiKando/interactBattle.cpp L168–199src/plugPikiKando/piki.cpp L1790–1812Code