-
-
Notifications
You must be signed in to change notification settings - Fork 470
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
src/badguy/darttrap.cpp
Outdated
@@ -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.
I haven't checked this one in a while but I was thinking it would be a fun idea for the Vicious Ivy and Walking Leaf enemy to float on water rather than sink. |
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.
There seems to be quite a few things off, not gonna lie.
- Sticky objects lag (lack for a better term) behind the actual moving platform ever so slightly. Very rough for Dart Trap who on occasion is blocked from firing that way! They also get very easily pushed around by other sticky objects (or maybe it's the moving platforms, can't quite tell)
sticky_more_like_pushy.mp4
- The affect on objects by water is very weak. Horizontal speed for badguys remains the same and gravity is barely changed. Both should be affected much stronger.
- Throwing objects as well as Jumpy jumping is waaay more stronger underwater which doesn't make much sense. Both should only fall slower, not accelerate underwater.
- I like seeing submerged Ivy floating towards the top but once there, they move very weirdly. A very awkward up and down motion. It's even worse than that of the Fish. I know this is to give a sense of water waves affecting them but this needs to be way more subtle. Also when they reach the water surface they submerge again for a bit before coming up top again. Very weird looking. Once they reach the top of the water, they should remain there
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.