-
Notifications
You must be signed in to change notification settings - Fork 131
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
ace-dent
wants to merge
11
commits into
TinyCircuits:master
Choose a base branch
from
ace-dent:PR-Thumgeon21
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- Use button API. - Simplify rendering.
- Optimize code for end of game. - Remove unnecessary garbage collection. - Use Thumby API for button poling.
- 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 `$`.
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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Draft ~
Thumgeon
button code to use API #189.