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

Method for In-game node texture changes #9019

Closed
Extex101 opened this issue Oct 6, 2019 · 12 comments
Closed

Method for In-game node texture changes #9019

Extex101 opened this issue Oct 6, 2019 · 12 comments
Labels
Feature request Issues that request the addition or enhancement of a feature Won't add The feature request was rejected and will not be added.

Comments

@Extex101
Copy link

Extex101 commented Oct 6, 2019

So first of all, get the fact into mind about how Minetest does animated textures on nodes.
How it works is it moves the image to create the animation.
My idea is to use the same method to dynamically change a nodes texture in-game

Setting the offset of the image via a number

        tiles = {
		{
			name = "texture.png",
			data = {
				type = "vertical",
				aspect_w = 16,
				aspect_h = 16,--basically the same as animated
                                start_at_frame = 1,
                        },
		}
        }

And you can set the offset via lua

Could possibly close the oldest open issue #36
Other issues (duplicates of 36) #323 #2887 #7848

@Extex101 Extex101 added the Feature request Issues that request the addition or enhancement of a feature label Oct 6, 2019
@benrob0329
Copy link
Member

So, being able to store the animation frame in meta?

@Extex101
Copy link
Author

Extex101 commented Oct 6, 2019

Yeah, but optional and it doesn't increase
So you can set it at will opening up the ability to change a nodes texture in-game

Also maybe being able to choose which texture uses what meta value so you can have multiple textures that can be altered in different ways

@paramat
Copy link
Contributor

paramat commented Oct 6, 2019

Related #2746

Storing in meta is problematic (which is the problem that has halted 'meta-set-nodedef') as meta is per-node so is very intensive, you would not be able to use this for many nodes. -1 for using meta.
So the chosen tile would probably be specified by param2, you would not be able to use rotation or hardware colouring as well.

This doesn't close #36 as that is for many properties.

@SmallJoker
Copy link
Member

From #36:

But to change property such as texture you need to remove node from the world and place another node with desired property on the same place.

This request is already covered in that old issue.

@paramat paramat added Request / Suggestion The issue makes a suggestion for something that should be done but isn't a new feature. and removed Feature request Issues that request the addition or enhancement of a feature labels Oct 6, 2019
@paramat
Copy link
Contributor

paramat commented Oct 6, 2019

I don't think this is a duplicate, as this also contains a suggestion for a different implementation.

@paramat paramat reopened this Oct 6, 2019
@paramat paramat removed the Duplicate label Oct 6, 2019
@Extex101
Copy link
Author

Extex101 commented Oct 6, 2019

Okay maybe not meta but something else could be implemented

@style-nine
Copy link

Am I right in assuming that the most notable use case would be the furnace, so that you could animate the front of the node as well as the image in the formspec without needing several nodes and liberal use of swap_node()? If so, this could have a huge impact on mods like Technic.

@tacotexmex
Copy link
Contributor

tacotexmex commented Oct 15, 2019

the chosen tile would probably be specified by param2, you would not be able to use rotation or hardware colouring

I’m just wondering what the upper limit of this param cramming looks like? When is it regarded no longer useful to add more features to?

More features added means even harder choices between node param2 features. When is it time for, say, param3? Or do we stop adding features when param2 is completely crammed? I don’t mean to come off too strong, sorry. I’m genuinely curious!

@paramat
Copy link
Contributor

paramat commented Oct 15, 2019

There is no harm in adding new uses for param2, if they are justified. Modders just have to work within the limitations and make the choice of what to use param2 for, instead of having unreasonable expectations and wanting to use everything at once.

@sfan5
Copy link
Member

sfan5 commented Oct 15, 2019

see also #6663

@tacotexmex
Copy link
Contributor

"should I use hardware coloring or meshoptions for grass?"

To expect availability of hardware coloring and meshoptions at the same time is not unreasonable though. I’m sure there are several more reasonable examples. It’s too bad, because it stifles the uses to small, individual cases instead of being able to using it on a systematic scale. Now I’ve said my piece, sorry for the offtopicness.

@paramat paramat added Feature request Issues that request the addition or enhancement of a feature No core dev support long term Possible close and removed Request / Suggestion The issue makes a suggestion for something that should be done but isn't a new feature. labels Sep 2, 2020
@paramat paramat closed this as completed Sep 30, 2020
@Extex101
Copy link
Author

Coming back to this idea, I thought maybe it could be done as a paramtype2, similar to the way the color paramtype works

@rubenwardy rubenwardy added Won't add The feature request was rejected and will not be added. and removed No core dev support long term labels May 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature request Issues that request the addition or enhancement of a feature Won't add The feature request was rejected and will not be added.
Projects
None yet
Development

No branches or pull requests

8 participants