v1.4 Performance optimisation
Artillery » Devlog
This release focuses on improving performance:
- All variables re-organised. Single letter names used for the most performance critical variables.
- Variables are defined in performance order for further speedups.
- Trajectory loop logic improvements. Technically some parts could be skipped more aggressively but I made a design choice that one projectile should not accelerate significantly when the other projectile lands.
- Trajectory drawing is now significantly faster - roughly double the previous speed - which has improved the feel of the game.
- Terrain generation speed improved.
- Sounds added for the shot and for the projectiles landing.
- Rendering of the castle hits has been switched to pre-created sprite strings of CHR$ control codes for each player. Hits are now drawn with very low latency, before colour clash from the shot can be seen.
- Castle sprites are now updated rather than being entirely redefined, and their colours are changed only as needed rather than for every screen re-draw.
1.4.1 minor update
- Fixed water bug in the terrain generation, and integrated the water extent detection into the main terrain generation loop
- Moved the terrain generation code further up the listing to improve performance
1.4.2 minor update
- Fixed magenta flicker as castles are overwritten during time of day change
- Faster time of day change when only brightness is changing
1.4.3 minor update
- Additional variable tidying, improved the CSV reference document to show context where vars are re-used
- Terrain traces edge to edge during generation before fill routine
- Sprite definitions moved to DATA statements to improve listing readability
1.4.4 minor update
- Fixed coordinate rounding regression in version 1.4.3
Files
Artillery 1.4.4.tap 26 kB
May 01, 2020
Artillery 1.4.4.bas.txt (BASIC program listing) 17 kB
May 01, 2020
Variables.csv (naming reference) 2 kB
May 01, 2020
Get Artillery
Artillery
Projectile Motion Simulation for ZX Spectrum
Status | Released |
Author | patters |
Genre | Simulation |
Tags | basic, Turn-Based Combat, ZX Spectrum |
Languages | English |
More posts
- Trajectory logic flow diagram68 days ago
- v1.3 Offscreen arrowsApr 24, 2019
- v1.2 Graphics tweaksApr 19, 2019
- v1.1 ImprovementsApr 06, 2019
- v1.0 Challenging constraintsMar 03, 2019