// NEON QUARRY: an entirely native PackLang / VELLUM game. // Click the canvas buttons to gather points across four connected scenes. // All actions below are supported by today's C++ PVM. No JS is used. Pack Main Neon Quarry. Using VELLUM.UI. Using LocalPack.State. Using LocalPack.Math. State Points as Number = 0. State Taps as Number = 0. State Charge as Number = 0. State Heat as Number = 0. State Crystals as Number = 0. State Comets as Number = 0. State Overdrives as Number = 0. State Prestiges as Number = 0. State Status as Text = "Reactor online. Tap to collect starlight!". Function TapSpark: Increase Points by 1. Increase Taps by 1. Increase Charge by 1. Increase Heat by 1. Clamp Heat between 0 and 100. Set Status to "SPARK! You gathered one starlight point.". End Function. Function TapPulse: Increase Points by 3. Increase Taps by 1. Increase Charge by 2. Increase Heat by 3. Clamp Heat between 0 and 100. Set Status to "PULSE! Three points added.". End Function. Function TapNova: Increase Points by 7. Increase Taps by 1. Increase Charge by 4. Increase Heat by 7. Clamp Heat between 0 and 100. Set Status to "NOVA! Seven points added.". End Function. Function CoolCore: Decrease Heat by 15. Clamp Heat between 0 and 100. Set Status to "Cooling systems engaged.". End Function. Function HarvestCrystal: Increase Crystals by 1. Increase Points by 2. Increase Taps by 1. Increase Charge by 2. Set Status to "Blue crystal extracted. Plus two points!". End Function. Function HarvestComet: Increase Comets by 1. Increase Points by 5. Increase Taps by 1. Increase Heat by 4. Clamp Heat between 0 and 100. Set Status to "Comet fragment secured. Plus five points!". End Function. Function LaunchOverdrive: Multiply Points by 2. Clamp Points between 0 and 100000000. Increase Overdrives by 1. Increase Heat by 10. Clamp Heat between 0 and 100. Set Status to "OVERDRIVE! Your total score was doubled.". End Function. Function TriggerBurst: Increase Points by 15. Increase Taps by 1. Increase Charge by 5. Increase Heat by 12. Clamp Heat between 0 and 100. Set Status to "STAR BURST! Fifteen points added.". End Function. Function RebootRun: Set Points to 0. Set Taps to 0. Set Charge to 0. Set Heat to 0. Set Crystals to 0. Set Comets to 0. Set Overdrives to 0. Increase Prestiges by 1. Set Status to "New run started. Prestige count increased!". End Function. Appearance MainTheme: Background Midnight. Accent ElectricBlue. Corners Rounded. Spacing Comfortable. End Appearance. // MAIN LOOP: repeatedly click to earn score, energy and heat. Scene Reactor: Surface ReactorDeck: Background #14203b. Layout Vertical. Padding 22. Spacing 11. Title "NEON QUARRY // REACTOR". Text "A native 2D clicker powered by PackLang and VELLUM.". Row ReactorArt: Gap 10. Circle LeftStar: Fill #ca77ff. Width 32. End Circle. Circle ReactorCore: Fill #4ca9ff. Width 105. End Circle. Circle RightStar: Fill #42e5c0. Width 32. End Circle. End Row. Text "THE CORE IS LIVE. EACH BUTTON FIRES A REAL PVM EVENT.". Display Points. Row MainControls: Gap 10. Button SparkClick: Text "SPARK +1". On Press: Call TapSpark. End Press. End Button. Button PulseClick: Text "PULSE +3". On Press: Call TapPulse. End Press. End Button. End Row. Button NovaClick: Text "NOVA CLICK +7". On Press: Call TapNova. End Press. End Button. Row ReactorStats: Gap 10. Column ClickStat: Display Taps. End Column. Column ChargeStat: Display Charge. End Column. Column HeatStat: Display Heat. End Column. End Row. Text "Heat is a tracked challenge stat; cooling is always free.". Button CoolFromReactor: Text "VENT HEAT -15". On Press: Call CoolCore. End Press. End Button. Display Status. Row ReactorNav: Gap 10. Button GoAsteroids: Text "ASTEROIDS". On Press: Navigate Asteroids. End Press. End Button. Button GoPowerGrid: Text "POWER GRID". On Press: Navigate PowerGrid. End Press. End Button. Button GoRecords: Text "RECORDS". On Press: Navigate Records. End Press. End Button. End Row. End Surface. End Scene. // SIDE LOOP: mine two different collectibles without losing the main score. Scene Asteroids: Surface MiningDock: Background #1d1738. Layout Vertical. Padding 22. Spacing 12. Title "ASTEROID FIELD // SECTOR 02". Text "Mine colorful space rocks. Collections and points persist.". Row AsteroidArt: Gap 16. Circle BlueOre: Fill #36bbf6. Width 95. End Circle. Circle MagentaOre: Fill #f27da7. Width 72. End Circle. Circle GreenOre: Fill #43d9bb. Width 46. End Circle. End Row. Display Points. Row OreRecords: Gap 10. Column CrystalCount: Display Crystals. End Column. Column CometCount: Display Comets. End Column. End Row. Row MineButtons: Gap 10. Button MineBlue: Text "CRYSTAL +2". On Press: Call HarvestCrystal. End Press. End Button. Button MinePink: Text "COMET +5". On Press: Call HarvestComet. End Press. End Button. End Row. Display Status. Button AsteroidReturn: Text "BACK TO REACTOR". On Press: Navigate Reactor. End Press. End Button. Button AsteroidGrid: Text "OPEN POWER GRID". On Press: Navigate PowerGrid. End Press. End Button. End Surface. End Scene. // BONUS LOOP: dramatic score powers built from real C++ math instructions. Scene PowerGrid: Surface GridDeck: Background #102a38. Layout Vertical. Padding 22. Spacing 13. Title "POWER GRID // ENERGY LAB". Text "Unleash bursts, double your score, or cool the reactor.". Row EnergyArt: Gap 9. Rectangle BeamOne: Fill #42e5c0. Height 18. End Rectangle. Rectangle BeamTwo: Fill #4ca9ff. Height 18. End Rectangle. Rectangle BeamThree: Fill #f27da7. Height 18. End Rectangle. End Row. Display Points. Display Overdrives. Row PowerControls: Gap 10. Button StartOverdrive: Text "DOUBLE SCORE x2". On Press: Call LaunchOverdrive. End Press. End Button. Button StartBurst: Text "STAR BURST +15". On Press: Call TriggerBurst. End Press. End Button. End Row. Display Heat. Button GridCooling: Text "COOL DOWN -15 HEAT". On Press: Call CoolCore. End Press. End Button. Text "These are free arcade powers; paid upgrades are not implemented in PackLang v1.". Display Status. Button GridReturn: Text "BACK TO REACTOR". On Press: Navigate Reactor. End Press. End Button. Button GridRecords: Text "VIEW RECORDS". On Press: Navigate Records. End Press. End Button. End Surface. End Scene. // LONG-RUN SCOREBOARD: track progress and voluntarily begin a new run. Scene Records: Surface ScoreDeck: Background #241a3d. Layout Vertical. Padding 22. Spacing 11. Title "YOUR RUN // SCOREBOARD". Text "A fully local PVM scorecard. Keep playing as long as you like.". Display Points. Row RecordRowA: Gap 10. Column RecordTaps: Display Taps. End Column. Column RecordCharge: Display Charge. End Column. End Row. Row RecordRowB: Gap 10. Column RecordCrystals: Display Crystals. End Column. Column RecordComets: Display Comets. End Column. End Row. Row RecordRowC: Gap 10. Column RecordHeat: Display Heat. End Column. Column RecordOverdrives: Display Overdrives. End Column. End Row. Display Prestiges. Text "Challenge: reach 500 points, then start a prestige run!". Text "Warning: prestige resets this run's points and collectibles.". Button StartPrestige: Text "PRESTIGE: RESET RUN". On Press: Call RebootRun. Navigate Reactor. End Press. End Button. Button RecordsReturn: Text "KEEP CLICKING". On Press: Navigate Reactor. End Press. End Button. End Surface. End Scene. End Pack.