Open
Conversation
This commit technically does not work because for some reason at the start of the program the framerate acts a bit weird. It causes everything effected by gravity (player and enemies) to fall directly through the platforms and therefore go beneath the screen. This then immediately fixes itself as the framerate stabalises. I am not going to try to fix this because when there is a menu beforehand, it will allow time before the players and enemies are placed, meaning that issue should never occur.
# Conflicts: # src/main.cpp
# Conflicts: # src/main.cpp
This is a temporary commit, as currently the user stays in the menu stage and can't progress to the game due to the buttons not being fully functional.
# Conflicts: # src/Enemy.cpp # src/Enemy.hpp # src/Menu.cpp # src/Menu.hpp # src/Player.cpp # src/Player.hpp # src/main.cpp
egorvert
requested changes
Feb 7, 2022
Collaborator
egorvert
left a comment
There was a problem hiding this comment.
Code is good and functional on Mac. It would be appreciated if you could add comments to your code to explain what it does so the rest of the team doesn't have to spend their precious time on figuring out what the hell you're doing.
Some bugs I noticed:
- Hitboxes are always shown and control / command B does not turn them off
- Resizing a window causes the character to fly off the screen
Tl;Dr
★★★★☆
Good feature rich commit but with little annotation and a few bugs. Also needs testing on Windows.
Member
Author
|
Woops closed it by accident. Also I see the bug with resizing the window, but the hitbox outlines work perfectly find for me? They don't show up to begin with and toggle visibility with Ctrl-B. |
…ough ground on gamestart
73b8f8c to
3ca3c02
Compare
Member
Author
|
All bugs and changes requested by Egor have been implemented. |
std::vector is dynamic so it can be freely added to, which will be important later on. It's also much easier to iterate through. I needed the vectors to be of the class pointers as sometimes (by that I mean all the time) the textures of the sprites would unload since the vector would keep trying to move the memory around which would break the reference between the texture and the sprite causing it to show a tan rectangle instead of the actual picture.
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 feature branch creates a FSM framework for the program that will make it much easier to have different views that can be switched between such as the menu and the game. This also involved clearing up the code for the menu and modularising some of the features in it like the button.
The most recent commits in main have been merged into it, meaning it includes the new additions of player health and the background.
This version is also fully functional on macOS amd64, so it needs testing on windows before mergining into the main branch.