-
Notifications
You must be signed in to change notification settings - Fork 148
Add multiplayer Player 2 controls (Play as Enermies) #328
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
Open
dhiegosilva
wants to merge
35
commits into
NagyD:master
Choose a base branch
from
dhiegosilva:master
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.
Conversation
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
… and joystick support. Update CMake configuration for optimization and SDL2 path adjustments. Enhance .gitignore for build artifacts and temporary files.
…ready present, reposition them correctly, and manage sword states for both characters. Implement auto-turning for Guards based on distance to opponents.
…le-step movement logic to prevent continuous movement on key holds, and ensure proper state management for forward and backward controls.
… to X, improve sword drawing mechanics when sheathed, and refine control state management for smoother gameplay.
…nt for Player 2 to prevent repeat actions when drawing the sword and during parries. Refine handling of attack button when sword is sheathed to ensure smoother gameplay.
…trol_shift2 to preserve IGNORE state during attack animations and prevent repeat actions. Update logic for transitioning between control states to improve gameplay responsiveness.
…ing of control states for parries and sheathing actions to preserve IGNORE state, preventing repeat actions during animations. Improve logic for transitioning between control states to enhance gameplay responsiveness.
Github workflow pipeline
Fix release workflow: only trigger on published releases and fix file…
Fix Windows build: use MSYS2 shell for DLL paths
…th better error handling
Add verification steps and fix binary path: prevent build failures wi…
Fix AppImage rename and Windows zip nesting issues
Fix Windows build: install zip package in MSYS2
…uild jobs, update artifact handling, and improve naming conventions for clarity.
Enhance GitHub Actions workflow: Add 32-bit Windows and ARM64 Linux b…
…ement SDL2_image package checks, and improve linking logic for static and dynamic libraries.
Enhance GitHub Actions workflow: Add ARM32 and ARM64 build jobs, impl…
…ld from source instead
Fix Windows 32-bit build: Remove non-existent SDL2_image package, bui…
…age installation errors
Fix ARM64 and Windows 32-bit builds: Unset PKG_CONFIG to prevent pack…
…r Linux 32-bit, fix tar symlink issue for Windows
Fix Linux 32-bit and Windows 32-bit builds: Build SDL2 from source fo…
Remove Windows x86 (32-bit) and Linux AppImage 32-bit build jobs
…age package installation and improve build process.
Fix Windows 32-bit build: Update workflow to correctly handle SDL2_im…
…g and improve SDL2 plugin detection logic. Remove obsolete build scripts for PowerShell and batch processing.
Enhance release workflow: Add curl for better plugin download handlin…
|
Hey can you try something similar to my project |
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.
Summary
This PR adds comprehensive Player 2 controls for multiplayer mode with single-step input handling to prevent action repetition when keys are held, matching Player 1's behavior.
Features Added
Player 2 Controls
Single-Step Input Mode
All Player 2 controls now use single-step mode, preventing continuous actions when keys are held:
Technical Changes
Modified Files
src/seg005.c:control_standing()andcontrol_guard_inactive()parry()to allow Player 2 parry regardless of opponent distance/framecontrol_shift2_p2,control_up_p2, andcontrol_down_p2insword_strike(),draw_sword(),parry(), and sword sheathing logicsrc/seg006.c:read_user_control_p2()user_control_p2()to prevent input repeatNew Files
src/build_and_run.ps1: Fast incremental build script for development (only compiles changed files)How It Works
read_user_control_p2()processes Player 2 input with single-step logicuser_control_p2()maps Player 2 controls to the game's control systemsword_strike(),parry(), etc.) set IGNORE state to prevent repeatTesting
Compatibility
is_multiplayer_modeis enabled