Sage Vaillancourt
17a30e9822
Extract 'Fielders' type and drop 'ignore 631'
2025-02-20 01:03:04 -05:00
Sage Vaillancourt
2d6f83a23f
Add some slight linger time to draw/throwMeter
2025-02-20 00:28:14 -05:00
Sage Vaillancourt
e45231dadd
Lower MinCharge and idealPower
...
Makes it easier to throw at top speed without having to flick the crank.
Added a bit of a multiplier on the returned powerRatio, to compensate.
2025-02-20 00:16:32 -05:00
Sage Vaillancourt
08a3189780
Start supporting less accurate pitches
...
Fix secondsSinceRunnerLastMove nil bug
2025-02-20 00:06:43 -05:00
Sage Vaillancourt
d77675b0cb
Fix initial throw to pitcher being counted as a pitch.
2025-02-19 23:48:19 -05:00
Sage Vaillancourt
56a5e197cd
Linting, and pitcherIsReady() timing tweak
2025-02-19 23:38:51 -05:00
Sage Vaillancourt
699dab8c7d
Fielder.catchEligible -> Ball.catchable
...
Much simpler
2025-02-19 23:06:22 -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
52434fe891
Correct and further consolidate returnToPitcher()
2025-02-19 17:26:05 -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
aebbc35bac
Add some quick MenuMusic
...
And extract a bit more pitchTracker logic
2025-02-18 15:50:22 -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
1bdcc62347
Runners smile instead of frown after scoring.
2025-02-17 20:55:35 -05:00
Sage Vaillancourt
c3a9122580
integer -> number
2025-02-17 20:42:44 -05:00
Sage Vaillancourt
e20ad0d3ad
Add swing-and-a-miss strikes
2025-02-17 20:37:16 -05:00
Sage Vaillancourt
4c9fbcdee7
More advanced statistics and displays.
2025-02-17 20:17:26 -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
6007ac971f
Add .luacheckrc, remove selene.toml
2025-02-16 18:43:09 -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
51855e13cf
Convert main into a Game object.
...
Much BATTER encapsulation of its dependencies and mutable state. Only the team scores are still global and mutable, but that shouldn't be too hard to fix.
2025-02-15 17:38:56 -05:00
Sage Vaillancourt
bb95ef5a63
Add inning count selection to main menu.
2025-02-15 09:40:07 -05:00
Sage Vaillancourt
8943eef73f
Add simple main menu (disabled for now)
...
String names on Logo assets
Add dbg.drawLine() - to use when defining outfield boundaries.
Allow flipped fielder draws.
2025-02-14 15:42:10 -05:00
Sage Vaillancourt
e710a79d9c
Unified test/setup.lua harness
2025-02-12 23:35:05 -05:00
Sage Vaillancourt
c8f128f277
Add alternate logos.
...
Tweak assets.lua2p to put them in their own table.
2025-02-12 23:10:38 -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
1926960c86
NPCs can play each other
...
Some timing tweaks and TODOs.
Cluster global state tighter together.
2025-02-11 13:50:03 -05:00
Sage Vaillancourt
b9d25e18d8
New black away uniforms!
...
Generate sprites from component images during load.
Should make it easy to swap out logos at runtime.
2025-02-11 08:32:51 -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
534a16ad67
Fix inning switching.
...
Add onThirdOut() as a baserunning dependency instead of relying on a wrapper function in main
Reset pitchTracker on side-switch
2025-02-10 12:47:24 -05:00
Sage Vaillancourt
fc4e12eddd
Updated bg and player sprites.
...
Player is taller now.
Fixed out handling.
2025-02-10 11:24:53 -05:00
Sage Vaillancourt
90fa692303
Fix linting
...
Use .styluaignore instead of Makefile hacks to ignore generated files.
2025-02-09 14:47:37 -05:00
Sage Vaillancourt
4d69e77d9f
Class-ify npc -> Npc
...
In the future, may keep a small memory of past pitches/plays, and use it to adjust swings, baserunning, etc.
2025-02-09 12:30:53 -05:00
Sage Vaillancourt
575c9e0a18
Explicitly set minimap draw sizes
2025-02-09 12:15:37 -05:00
Sage Vaillancourt
0f83298086
Only draw in-bounds fielders on minimap.
...
Inject animator into Ball, instead of entire gfx
2025-02-09 12:09:31 -05:00
Sage Vaillancourt
89c37eaf3d
Move Fielder type into fielding.lua
2025-02-09 11:50:31 -05:00
Sage Vaillancourt
476e0d54cb
Start extracting ball.lua
...
PseudoAnimator -> SimpleAnimator
2025-02-09 11:49:15 -05:00
Sage Vaillancourt
fed1151179
XYPair -> XyPair, throwBall() -> launchBall()
...
Add Point3d type.
2025-02-09 11:35:19 -05:00
Sage Vaillancourt
d74332f685
Store animators directly on the `ball` object
2025-02-09 11:26:24 -05:00
Sage Vaillancourt
9c0d263a29
Class-ify Announcer, Baserunning, and Fielding
...
Largely to enable dependency injection.
I am pushing AWAY the paranoia that metatable lookups will slow things down. (You've got like 20 entities, bud, chill.)
Field -> Fielding
2025-02-09 11:19:11 -05:00
Sage Vaillancourt
aadaa6e0d6
Use : instead of . in self function definitions
2025-02-09 10:31:32 -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
50ddd67730
Start drawing fielders in minimap
2025-02-09 00:04:59 -05:00
Sage Vaillancourt
fedf680626
Small action-queue.lua doc-comment tweaks
2025-02-08 22:08:42 -05:00