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
Incorporate certain object dynamics #2846
base: master
Are you sure you want to change the base?
Conversation
Not sure about the consistency of this behaviour. Also, the objects should probably only move with the tilemap/fallblock/... that's behind them to avoid situations like on the right side in the first video. dynamics-2024-03-25_11.52.56.mp4Also, this completely breaks this level (there are many more switches like this in it) and pretty much any level that has a lift controlled by a switch. dynamics2-2024-03-25_11.54.44.mp4 |
Maybe objects should have the ability to be immovable |
In my personal opinion, this idea is great. It would serve a lot in puzzle levels. An idea like that wouldn't be bad, you could make more creative levels with that idea |
Not gonna lie this looks sick. I understand its technically broken but this would be a really cool thing to play around with.
I agree, like an "immobile" option on the objects. |
That is a lot of code duplication. Can this be done in other ways so we only have the same code once? |
I tried to find ways around it, but it appears the way each object is handled is done differently in such a way that at least I couldn't personally get it to work. |
How about moving this to a parent |
Are stalactites/yeti stalactites also sticky objects? And if not can they be? |
Now I am probably going to refactor the PR with this is mind. |
- Rocks now interact with bumpers, water, slick ice, and trampolines. - Rocks no longer hurt Tux.
- Now badguys can interact with bumpers, trampolines, and water.
Fixed a bug where if you threw a rock at a bumper on a moving platform it would reset to original position.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Functionality-wise, this seems to work really well!
Left some code-related comments.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Interesting, Dart traps don't shoot if too close to a platform, but if you put them a little bit far apart they do.
2024-04-28.16-05-28.mp4
@@ -147,11 +154,12 @@ DartTrap::get_settings() | |||
|
|||
result.add_float(_("Initial delay"), &m_initial_delay, "initial-delay"); | |||
result.add_bool(_("Enabled"), &m_enabled, "enabled", true); | |||
result.add_bool(_("Sticky"), &m_sticky, "sticky", false); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't you think this sticky setting can be moved to the superclass?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought the same, but turns out that for some objects it should be configurable, but for others - not.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you can use result.remove for those that shouldnt be configurable
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, that's also a way.
For my 100th PR, I decided to fix some old issues I had involving the dynamics between some objects. Included in this PR are the following:
Note: I was hoping to incorporate some more general method for point 4, where I didn't have to specify every single interaction and I could just label some objects as "sticky" and "sticked" objects, but this proved to be difficult as I don't think the game is currently capable of describing objects in such a way that I could do that, and I did not want to spend this PR refactoring some part of the game just to include that little thing. Each of the different possible interactions tends to have to some slight variation from one another, and there aren't very many of these possible interactions, anyway.