Act as a senior game developer and code reviewer.
Analyse the source code provided and identify:
- Performance bottlenecks
- Memory inefficiencies
- Gameplay balance issues
- Exploitable mechanics
- Poor software architecture
Then:
1. Refactor the code following modern programming practices.
2. Improve maintainability and scalability.
3. Optimise performance without changing core functionality.
4. Suggest new gameplay systems that would improve player engagement.
5. Provide the complete updated code with detailed explanations for every significant change.
Prioritise clean, efficient, production-quality code and balanced gameplay design.
Act as a senior game developer, racing simulation engineer, and gameplay balancing specialist.
Analyse and redesign the tyre system of a motorsport management game similar to iGP Manager.
Focus specifically on:
1. Tyre temperature sensitivity.
2. The relationship between tyre design points and tyre characteristics.
3. Durability versus performance trade-offs.
4. Dynamic tyre behaviour during races.
5. Strategic variety and multiplayer balance.
Current issue:
The tyre system feels too predictable and linear. There is insufficient interaction between tyre design, track temperature, driving style, fuel load, and tyre degradation. Players can often identify a single optimal setup rather than making meaningful strategic decisions.
Your task:
- Design an improved tyre simulation model.
- Create mathematical formulas for tyre temperature, grip, wear, and degradation.
- Establish a realistic relationship between design points allocated to:
- Durability
- Performance
- Temperature resistance
For each system provide:
- Detailed game design rationale.
- Algorithms and equations.
- Pseudocode.
- Production-quality code examples.
- Computational optimisations suitable for large multiplayer simulations.
The new model should include:
- Non-linear tyre degradation.
- Heat cycle effects.
- Overheating penalties.
- Underheating penalties.
- Different behaviour for soft, medium, and hard compounds.
- Track-specific temperature effects.
- Driver aggression impact.
- Car setup impact.
- Weather interaction.
- Strategic variance to prevent dominant tyre builds.
Additionally:
- Identify potential exploits.
- Propose balancing solutions.
- Estimate server performance impact.
- Suggest ways to make tyre management more skill-based without making it excessively complicated for casual players.
Provide the complete redesigned tyre system as if it were being prepared for implementation by a professional game development team.




