Commit Graph

22 Commits

Author SHA1 Message Date
Sage Vaillancourt 80015dbe62 Extract draw/characters.lua
Pulls a bunch of draw logic out of main.lua; handles z-ordering.
Expand on save/load - though it's certainly not complete yet.
2025-02-26 13:04:38 -05:00
Sage Vaillancourt b003c148a4 Extract more into pitching.
More consistent (and visible!) throw meter.
It's still imperfect (by a lot!) but it feels much more controlled.
Throws are a little too soft right now, but it's in a halfway decent state.
2025-02-19 22:32:10 -05:00
Sage Vaillancourt ad82035ccc Pan back from home runs
Move secondsSinceLastRunnerMove into Baserunning
Tweak draw offset logic - a little jumpy, but better at following the long ball
Taller GrassBackground
Move secondsSinceLastPitch into pitchTracker
Extract pitchTracker and throwMeter
Slightly more truthful utils.moveAtSpeed()
2025-02-19 17:13:06 -05:00
Sage Vaillancourt 2d812f2046 Add basic home-run handling
Still needs to pan the camera back from the home run while the runners circle the bases.
Also add a wrapping-pattern.png, though I'm not sure if it's actually used?
2025-02-18 13:58:44 -05:00
Sage Vaillancourt 1ccf8765ee Remove some outdated TODOs and comments 2025-02-17 13:26:51 -05:00
Sage Vaillancourt 5c45b7bba0 Add box score and transitions
Add constants defining the top of the outfield wall (not used yet)
Take scores out of mutable global state (that might be just about all of it sewn up)
Finish switching batttingTeam to a TeamId value
2025-02-17 13:21:28 -05:00
Sage Vaillancourt db1409d94d selene -> luacheck
Greatly simplifies the Makefile.
2025-02-16 15:14:59 -05:00
Sage Vaillancourt bbaaca4a2d Sort runners/fielders by `y` for draw order
Pulled Fielding:drawFielders() back out into main.lua for this.
Also switching some table-keyed enums to string literal types.
2025-02-15 22:13:37 -05:00
Sage Vaillancourt 027bb31bff A bit of testing for baserunning and fielding.
Required minor reworking to get those test harnesses in place.
2025-02-12 22:49:37 -05:00
Sage Vaillancourt a801b64f55 Fielders can catch passing balls.
Implemented with a new catchEligible field. Should be easy enough to add some erroring to those catches, too.
Allow npc to control individual baserunners.
Add a bit more dirt to the infield.

This commit *does* introduce some entanglement between files. E.g. the markIneligible() calls, and overriding ball.heldBy from within Fielding
2025-02-12 17:18:18 -05:00
Sage Vaillancourt 0646663e5e Faster fielders
Adjust left and right field positions.
Bouncy baserunners.
Patched npc nil index issue.
2025-02-11 00:01:36 -05:00
Sage Vaillancourt 90f792ff4e More aggressive NPC running
Less aggressive NPC batting :D
Updated Player sprites - now with belt!
2025-02-10 23:25:19 -05:00
Sage Vaillancourt fbbfc3c2e7 Move fielder-draw iteration and dance to fielding.lua
Move PlayerImageBlipper to graphics.lua
2025-02-10 22:36:17 -05:00
Sage Vaillancourt f67d6262ac Fix some NPC positioning.
Basic foul-ball implementation.
Some balance tweaks. Generally faster play.
Move pitchMeter to utils.
Player -> User when talking about the human player instead of a baseball player.
Slightly delay scoreboard changes.
Animate ball-strike entry and exit.
2025-02-10 21:22:21 -05:00
Sage Vaillancourt c56cae6527 batter -> baserunning.batter 2025-02-09 10:12:56 -05:00
Sage Vaillancourt 1a68521bd4 Extract baserunning.lua
field.lua -> fielding.lua
npcFielderAction() -> npc.fielderAction()
Generally, a pinch of additional or stricter typing
2025-02-09 10:06:57 -05:00
Sage Vaillancourt 30f2eada72 Extract almost all NPC fielding logic 2025-02-08 19:04:10 -05:00
Sage Vaillancourt 80c15161e3 Move more logic into field.lua 2025-02-08 18:28:17 -05:00
Sage Vaillancourt 66bd97499a Try to cluster global state together.
Start peeling out fielder functions into a new file.
A bit more constant use.
In Makefile, parse main.lua imports for source files.
2025-02-08 11:52:39 -05:00
Sage Vaillancourt 324673ea98 Add music + sound effects to assets.lua2p 2025-02-08 09:39:56 -05:00
Sage Vaillancourt 4a4049996f Much more fleshed-out constants.lua
* Move scoreboard.lua to draw/overlay.lua
* Move minimap drawing into overlay.lua
* Remove playdate imports from utils.lua
2025-02-08 00:49:03 -05:00
Sage Vaillancourt 881ff0e734 Implementing walks and strike-outs
* Look at limiting batting/throw power with math.log()
* Extract draw/fielder.lua
* Extract some values into constants.lua
* Extract npc.lua for computer batting (and eventually probably more CPU behavior)
* pitchTracker in utils
2025-02-07 20:29:40 -05:00