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

Server and ServerGamestate integration. #58

Merged
merged 5 commits into from
Apr 26, 2024
Merged

Server and ServerGamestate integration. #58

merged 5 commits into from
Apr 26, 2024

Conversation

jhparkt
Copy link
Contributor

@jhparkt jhparkt commented Apr 25, 2024

Moved event handling to servergamestate.
Currently have a temporary version of movement but should be changed keydown/keyup events for optimized networking.
Added basic item class.

Copy link
Contributor

@gilkeidar gilkeidar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like a good start for the Item implementation and event queue refactoring. There are a few small things I mentioned in file comments but they're pretty negligible.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good here, though one thing regarding the vector naming - I originally used base_objects as a name for the SmartVector<Object *> since it should only include objects that are instances of the base Object class. I think for all derived classes we can just use their names directly - e.g., SmartVector<Item *> items in this case, and later SmartVector<Player *> players, SmartVector<Wall *> walls, etc.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Small change: In line 88, I think object->physics.velocity = glm::vec3(0.0f, 0.0f, 0.0f); would be cleaner, but besides that looks good

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the intended use of the scalar property in ItemInfo?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It may be used for the strength of different potions, (e.g scalar = 100 for health, 2 for doubling speed) but it is just a filler.

…ently empty; will need to add debugger functionality to simulate incoming player events)
@gilkeidar
Copy link
Contributor

I just added a small fix to the debugger since the ServerGameState::update() method was updated to take an EventList argument.

@jhparkt jhparkt marked this pull request as ready for review April 26, 2024 15:59
@jhparkt jhparkt merged commit c964ba3 into dev Apr 26, 2024
11 checks passed
@Tyler-Lentz Tyler-Lentz deleted the feat/items branch May 2, 2024 16:51
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