UI and other changes
This commit is contained in:
parent
87b5c11fcf
commit
215e24e246
79 changed files with 70023 additions and 2201 deletions
51
README.md
51
README.md
|
|
@ -98,9 +98,10 @@ pack (`assets/farm/ithappy/farm/prefabs/assets/`).
|
|||
with the **pitchfork** (melee: a stab every 0.5 s at the nearest few enemies in reach and in
|
||||
front). The **corn shooter** (the prototype's gun, through `FarmProjectiles`) and **pumpkin
|
||||
bombs** (thrown, bursting over 3 m: `PumpkinBombs`) are workbench upgrades. The pitchfork and
|
||||
corn shooter are main weapons (fire; switch with Tab / d-pad down or 1-2 outside build mode);
|
||||
corn shooter are main weapons (fire; switch with Tab / d-pad down, or the number keys 1-6 outside
|
||||
build mode, key k picking the k-th weapon owned);
|
||||
the bombs sit in the off-hand, thrown with right mouse / LT. The models are the user's (`assets/weapons/`, posed on
|
||||
the scarecrow by `WeaponModels`); the HUD's weapon panel (bottom right) shows them. Shots, the
|
||||
the scarecrow by `WeaponModels`); the HUD's hotbar (bottom center) shows the ones owned. Shots, the
|
||||
corn shooter, and enemy hit proxies sit at 1.8 m, above the sunflowers and the pen fence.
|
||||
* **Campaign** — `CampaignController` (`game/scripts/campaign_controller.gd`) runs the thirty-night
|
||||
vacation (`GameConfig.campaign_nights`): Morning → Day → Dusk → Night → Dawn per night, then
|
||||
|
|
@ -108,9 +109,9 @@ pack (`assets/farm/ithappy/farm/prefabs/assets/`).
|
|||
persists; settings are in `game/resources/game_config.tres` (`GameConfig`). The rules are in
|
||||
[`game/RULES.md`](game/RULES.md) and the development plan in
|
||||
[`first-game-plan.md`](first-game-plan.md). `CampaignDebug` is a debug readout of the phase and
|
||||
farm state, hidden until F1. Debug keys: F6 ends the current phase, F7 cycles 1× / 5× / 20×
|
||||
speed, F8 unlocks everything (every upgrade and shop item at its last level, free;
|
||||
`CampaignDebug.unlock_all`), F9 sets the scarecrow to 0 HP, F10 strips the farm (every category), R retries after a
|
||||
farm state, hidden until F1. Debug keys: F4 unlocks everything (every upgrade and shop item at
|
||||
its last level, free; `CampaignDebug.unlock_all`; not F8, Godot's Stop shortcut when run from
|
||||
the editor), F6 ends the current phase, F7 cycles 1× / 5× / 20× speed, F9 sets the scarecrow to 0 HP, F10 strips the farm (every category), R retries after a
|
||||
Game Over, and T / G / H send in a thief / a crow / a fence breaker. F2 cycles tonight's plan
|
||||
through the debug scenarios (`game/resources/scenarios/`). They introduce the enemies one type at
|
||||
a time (crows, thieves, fence breakers), then pairs, then all three. In the morning review,
|
||||
|
|
@ -123,8 +124,9 @@ pack (`assets/farm/ithappy/farm/prefabs/assets/`).
|
|||
of invulnerability after a hit (the model blinks, the screen tints), fear (Q / LB: enemies
|
||||
within 6 m flee for 2 s, carriers drop their loot, 12 s cooldown), patching up (hold F / Y:
|
||||
rooted 2 s for +3 HP, cancelled by a hit or letting go), and the fall at 0 HP. Thieves hit it
|
||||
when touching it, and fence breakers when fighting it (`EnemySystem.evaluate_attacks`). `ScarecrowHud` shows health pips, the fear
|
||||
cooldown, and the patch hint. The scarecrow still looks like the farmer mannequin;
|
||||
when touching it, and fence breakers when fighting it (`EnemySystem.evaluate_attacks`). `ScarecrowHud` shows the portrait (top
|
||||
left) in a ring that is fear's charge, a health bar with a segment per point of max health, and
|
||||
(once Sprint is bought) the sprint's stamina. The scarecrow still looks like the farmer mannequin;
|
||||
its look comes later. `game/tools/soak_night.gd` plays nights headless with a scripted
|
||||
scarecrow (`--mode=idle | guard`, `--thieves=N`) and prints what was stolen, recovered, and
|
||||
lost; `--mode=gather` plays a day of gathering everything and reports the time and yield;
|
||||
|
|
@ -138,7 +140,8 @@ pack (`assets/farm/ithappy/farm/prefabs/assets/`).
|
|||
`Interactions` (`game/scripts/interactions.gd`) handles the interact action: hold at a
|
||||
`GatherNode` (4 per material, made of the zone's props) to gather by day; press at the
|
||||
`Workbench` (work area table) to open the upgrade menu (`UpgradePanel`). Patching costs 2 straw.
|
||||
Points grow back overnight; `ResourceHud` (top right) shows the shed and pouch. Costs live in
|
||||
Points grow back overnight; `ResourceHud` (bottom left) is the backpack with the pouch's count;
|
||||
I / R3 opens the pouch panel (what's carried, and the shed's stock). Costs live in
|
||||
`GameConfig.costs`.
|
||||
|
||||
* **Upgrades** — `Upgrades` (`upgrades.gd`) holds the eleven upgrades in `GameConfig.upgrades`:
|
||||
|
|
@ -158,7 +161,7 @@ pack (`assets/farm/ithappy/farm/prefabs/assets/`).
|
|||
open pen lets one wander out every few seconds; the pen's gate is a normal gate structure, standing
|
||||
from the start (`GameConfig.start_structures`). `ShedStock` (`shed_stock.gd`) shows the shed's
|
||||
stock as piles of logs, crates, and hay that grow and shrink with it, and gives supply thieves a
|
||||
spot at each pile. `AssetHud` (top center) shows "Crops · Animals · Supplies", flashing on change.
|
||||
spot at each pile. The pause menu shows "Crops · Animals · Supplies".
|
||||
Rules: `game/RULES.md`; the piles: `game/LAYOUT.md`.
|
||||
|
||||
* **Construction** — `StructureSystem` (`game/scripts/structure_system.gd`) validates, places,
|
||||
|
|
@ -190,8 +193,9 @@ pack (`assets/farm/ithappy/farm/prefabs/assets/`).
|
|||
farm itself). `DayNight` (`day_night.gd`) eases the sun, sky,
|
||||
ambient light, and a whole-picture brightness / saturation between day, sunset, night (moonlight),
|
||||
and sunrise; the scarecrow carries a lantern that lights up as it gets dark, and thieves glow
|
||||
faintly at night. `PhaseHud` (top left) is the sun / moon dial with "Night N of 30", the phase and
|
||||
its time left, a hint line (what tonight brings, enemies on the farm), and a banner at each phase
|
||||
faintly at night. `PhaseHud` (top right) is the sun / moon with "Day N of 30", the time left
|
||||
until the next phase and a line filling over it, a hint line under it (what tonight brings,
|
||||
enemies on the farm), and a banner at each phase
|
||||
change ("Night 3: Breakers at the fences"), with the dusk hint under it from dusk into the
|
||||
night. `ReviewPanel` is the morning review: last night's losses per category, what's left, what
|
||||
needs repair, materials, and tonight's title; "Start the day" ends it. Playtest findings
|
||||
|
|
@ -207,7 +211,25 @@ pack (`assets/farm/ithappy/farm/prefabs/assets/`).
|
|||
the reason, and older ones are upgraded (`SaveGame.migrate`). Continue resumes at that morning;
|
||||
finishing the vacation deletes the save. `GameSettings` (`game_settings.gd`) keeps the
|
||||
settings in `user://settings.cfg`: volumes per audio bus, stick dead zones, fullscreen, VSync,
|
||||
3D resolution scale, and tips; `SettingsMenu` edits them and shows every binding.
|
||||
pixel size, 3D resolution scale, and tips; `SettingsMenu` edits them and shows every binding.
|
||||
|
||||
* **Look** — `ToonLook` (`game/scripts/toon_look.gd`), added by `Main`, gives everything 3D a
|
||||
toon-shaded pixel-art look at runtime. Every lit, opaque StandardMaterial3D on the farm
|
||||
(imported props, KayKit characters, weapons, primitives built in code, and nodes added later)
|
||||
is swapped for a toon ShaderMaterial with the same color and texture (`toon.gdshader` /
|
||||
`toon_double_sided.gdshader`, lighting in `toon_light.gdshaderinc`, which the crow and UFO
|
||||
shaders include too); unshaded and transparent effects keep their own materials. A
|
||||
full-screen quad (`pixel_outline.gdshader`) darkens depth edges and lightens creases. The
|
||||
pixel size setting (default 4) renders the 3D view that many times smaller and scales it back
|
||||
up with sharp pixels and no MSAA, while the HUD stays at full resolution. Label3Ds would be
|
||||
pixelated too, so they don't render in 3D: `ScreenLabels` (`screen_labels.gd`) draws them as
|
||||
sharp text over the 3D view (under the HUD) where they project, at least 16 px tall, nudging
|
||||
overlapping ones apart. Game code keeps setting the Label3Ds' text, color, and visibility.
|
||||
The HUD is hand-drawn (`Sketch`, `sketch.gd`): a handwritten font (Gochi Hand,
|
||||
`assets/fonts/`, SIL OFL), wobbly sketched outlines, and painted icons drawn in code. The
|
||||
pouch panel, the build bar, the pause menu and its questions, and the workbench and shed shops
|
||||
share one panel look (a dark wash in a sketched ink frame, slots with a gold focus frame):
|
||||
`UiTheme.sketch()` is that look as a theme, its boxes drawn by `SketchBox` (`sketch_box.gd`).
|
||||
`UiTheme` (`ui_theme.gd`, written to `game/resources/ui_theme.tres` by
|
||||
`game/tools/build_ui_theme.gd`) is the project's default theme, with a gold focus ring so
|
||||
keyboard and gamepad players always see where they are.
|
||||
|
|
@ -308,7 +330,7 @@ game/
|
|||
end_panel.gd, resource_store.gd, gather_node.gd, workbench.gd,
|
||||
interactions.gd, resource_hud.gd, structure_system.gd, build_mode.gd,
|
||||
build_hud.gd, action_edges.gd, night_plan.gd, wave_director.gd, day_night.gd,
|
||||
phase_hud.gd, review_panel.gd, animal_system.gd, shed_stock.gd, asset_hud.gd,
|
||||
phase_hud.gd, review_panel.gd, animal_system.gd, shed_stock.gd, sketch.gd, sketch_box.gd,
|
||||
enemy_characters.gd, upgrades.gd, upgrade_panel.gd, main.gd, main_menu.gd,
|
||||
pause_menu.gd, settings_menu.gd, confirm_box.gd, save_game.gd, game_settings.gd,
|
||||
ui_theme.gd, assessment.gd, farmers_return.gd, tutorial.gd, farm_audio.gd, avatar.gd,
|
||||
|
|
@ -355,7 +377,8 @@ All tunables live in one resource: **`res://prototype/resources/default_config.t
|
|||
| Combat height | 1.1 m (gun muzzle, bullets, bird bodies) |
|
||||
|
||||
Project settings written by `prototype/tools/configure_project.gd` (re-runnable, editor closed):
|
||||
main scene, 1920 × 1080 reference resolution, Mobile renderer, MSAA 2×, physics interpolation,
|
||||
main scene, 1920 × 1080 reference resolution, Forward+ renderer (the game's pixel outlines need
|
||||
its normal buffer; the prototype began on Mobile), MSAA 2×, physics interpolation,
|
||||
InputMap actions (`move_*`, `aim_*`, `fire`, `restart`, `toggle_overlay`; the built-in
|
||||
`ui_accept` / `ui_cancel` cover UI confirm/cancel on keyboard and gamepad), and physics layer
|
||||
names. All pre-existing settings (Jolt Physics, D3D12 on Windows, stretch mode) are preserved.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue