Skip to content
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

Game main loop amendments #23

Closed
wants to merge 2 commits into from
Closed

Game main loop amendments #23

wants to merge 2 commits into from

Conversation

mjr4077au
Copy link
Member

@mjr4077au mjr4077au commented Mar 27, 2020

I've started on some input improvements for SW. The changes to the main game loop do make an noticable improvement to input performance.

I have more changes planned to bring things up to Duke 3D levels but submitting this now as the current crisis is starting to impact my ability to spend time on this.

Lastly, a slight tweak to my previous PR for Duke3D and RR.

Eliminating the if statement with the nested do/while loop by just using a while loop achieves the same result and simplifies the code by removing a near duplicate check.

The contents of the if statement always need calling at least once, so it might as well be called at least once in a while loop.

- Remove MoveLoop() as it's only ever called by RunLevel().
- Continuously call getinput() and domovethings() within the game's tic rate.
- Replace if statement containing nested do/while loop with a while loop.
@coelckers
Copy link
Member

Please split this in two, one update for Duke/RR and the SW update - I'd like to be able to do one without the other.

@coelckers coelckers closed this Mar 27, 2020
@mjr4077au mjr4077au deleted the Game_MainLoopAmendments branch March 29, 2020 11:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants