Improve game play#56
Merged
Merged
Conversation
maelemiel
approved these changes
Jan 18, 2026
Azertoxe
approved these changes
Jan 18, 2026
This file contains hidden or 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
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.
This pull request introduces several improvements and bug fixes to the space shooter game's level loading, background rendering, sound handling, score tracking, and menu system. The main focus is on supporting both solo and multiplayer modes more robustly, improving user interface elements, and ensuring sounds and scores are handled correctly depending on the game mode.
Multiplayer and Solo Mode Handling:
Level-1.luathroughLevel-5.lua) now dynamically select the background texture based on whether the game is in solo or multiplayer mode, ensuring the correct visuals are shown for each mode.Spawns.createBackground) now accepts optional scaling parameters, allowing backgrounds in multiplayer mode to be rendered larger for better screen coverage.Sound and Score System Enhancements:
Sound effects for player hits, explosions, power-ups, and game over are now correctly played locally in solo mode and broadcasted to all clients in multiplayer mode, ensuring consistent audio feedback.
Score tracking has been improved so that when an enemy is destroyed, the player who fired the bullet receives the appropriate score, in addition to the global score increment. Bullets now track their owner's ID.
Menu and UI Improvements:
The main menu's button colors, text centering, and spacing have been updated for better appearance and usability. The solo button is now purple, button widths are increased, and text centering is more precise.
A new helper function ensures a clean start when switching game modes (SOLO/MULTI), stopping music and destroying entities as needed.
Bug Fixes and Edge Case Handling:
Enemy deaths due to leaving the play area (boundary deaths) no longer trigger network broadcasts or local explosions, preventing unnecessary effects and network traffic.
Level 5 background handling is clarified to use the same texture for both solo and multiplayer modes.
Other Minor Improvements:
Quick metadata (pick one in each group)
Impact:
Priority:
Type / Area:
Checklist
Create or link an issue
If this PR addresses or depends on an issue, paste the issue number above or create one using a template below:
Paste the created issue number (for example
#123) into theRelated issuefield above so the PR and issue are linked.Reviewer notes
Files changed and quick description: