Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: Thumgeon v2.1 fixes #243

Draft
wants to merge 11 commits into
base: master
Choose a base branch
from
Draft

Conversation

ace-dent
Copy link
Contributor

@ace-dent ace-dent commented Jun 26, 2024

Draft ~

- Use button API.
- Simplify rendering.
@ace-dent ace-dent marked this pull request as draft June 26, 2024 09:32
- Optimize code for end of game.
- Remove unnecessary garbage collection.
- Use Thumby API for button poling.
ace-dent added 3 commits June 28, 2024 11:15
- Simplify code and use Thumby button API where possible.
- Combine `monsterUpdate()` with `turnCounter` into new `updateTurn` function, to reduce code duplication.
-  Performance: Monster updates iterate over smaller 3x7 active area (not 5x9).
- Refactor monster movement code.
- Refactor player movement code and some menu navigation.
- Refactor inventory item dropping code.
- Shorten code where menu items are highlighted.
- Remove reference to GP since we now use `$`.
ace-dent and others added 6 commits July 3, 2024 00:12
Ultimate fix for exits and other great things by @AyreGuitar !  Supported by @seriuqS-nitsuA (A.G.S).

- Spawn floor exit (stairs) first, using the last room generated. Also fix position to lower-right corner. This ensures the exit is always viable.
- Remove `ensureExit()` function.
- Refactor door generation for readability and code size. @ace-dent.
- Prevent spawning a shop in the first room, to avoid overwriting the Welcome sign.
- Simplify placement of treasure chests; use `getRandomFreePosition()`.
- Populate all fixed position objects first in a room (exit > shop > sign), to prevent overwriting randomly placed ones.

Co-authored-by: AyreGuitar <[email protected]>
- Pre-equip `basicswd` and `pants` at the start of the game. By @AyreGuitar and @seriuqS-nitsuA (A.G.S).
- Restore chests to 10% chance of spawning.
- Tweak probabilities for enemy spawning. First enemy is reduced to 40% chance (was 50%). This gives overall odds of: 0 Enemies ~47% or ~9 rooms in 18 room level; 1 Enemy ~44% / ~8 in 18 rooms; 2 Enemies ~8% / ~1 in 18 rooms.

Co-authored-by: AyreGuitar <[email protected]>
- When moving the player to a new floor, use the existing `getRandomFreePosition()`.
- Use less code to check for doors.
- Simplify and de-duplicate code for spawning loot. Now only generate *one* piece of loot in a room, with three possible tiers: basic (88% chance), good (10%) or ultra (2%). Overall chance of any loot spawning is 35% per room.
- Add some lists of items with separate `itemLevel`s. This may help future refactoring.
- Bonus: Trial slower clock speed (24 vs 48MHz), to extend battery life.
- Fix gold to 4 digits `9999`max, to prevent overdrawing a South doorway.
- Reduce gold from chests, but add a 1 in 100 jackpot!
- Bonus: overclock CPU when ascending stairs to next floor; removes slight delay.
- Difficulty tuning for monsters: Now 50% chance of a monster, and 1 in 10 monster rooms can have a ‘horde’ (1-2 extra monsters based on Floor). Hordes cannot occur in the first dungeon room.
- Combined `a` and `b` monster spawning code, to give better control over statistics.
- Increase chance of a Chest from 10 > 15%. The gold yield was decreased in an earlier commit to keep balance.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update Thumgeon button code to use API
1 participant