-
Notifications
You must be signed in to change notification settings - Fork 63
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
Anything against making MapLayer::Chunk public? #156
Comments
I have to admit I haven't used this in a while so I've kind of forgotten how it works 😅 Just had a quick look at the source though - it seems |
Thanks for the reply.
There the Chunk is private and final inside a MapLayer declared final as well. I would like to know the rationale for the final keyword and would ask if I can remove it and make chunk public in a PR to help me with keeping my project better synchronized with upstream. This should not impact any project negatively. |
Oh! I apologise 😅 The SFML example is meant as just that - an example. It's mostly written by contributors now too. If you have something that you feel is useful and improves upon it (without breaking existing features) then any changes are welcome! 😁 Thanks |
I am working now for some time with this library, but recently I stumbled over a small detail which blocks my progress :
I am using properties on tiles and objects to mark in my level certain elements like keys, switches, switchable doors, enemies, etc. usually I add properties to these objects to customize the behavior.
I also want to use this principle for moving platforms and other decorations:
For example:
Here you see such a platform ("moving_platform") and its parameters(it will swing 40px up an down again). The advantage is that you can easily paint your level and even draw the paths of moving platforms and enemies inside the level editor.
But the problem is, that the code for rendering a part of the map is implemented in the Chunk class which is private to MapLayer.
From an Software architecture pov I would like to manage the moving platforms outside of the MapLayer, but then I cannot instantiate a Chunk. I cannot derive MapLayer nor Chunk as both are declared final(<--why?). Only possibility I see is to duplicate the code. But we are not using C++ to start to copy+paste methods into new classes, do we?
Would it be fine to make chunk public or the classes not final?
Or is there something else I miss?
The text was updated successfully, but these errors were encountered: