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

Voxel metadata #98

Closed
Zylann opened this issue Jan 11, 2020 · 13 comments
Closed

Voxel metadata #98

Zylann opened this issue Jan 11, 2020 · 13 comments

Comments

@Zylann
Copy link
Owner

Zylann commented Jan 11, 2020

Voxels alone can store a very limited set of data. Even if we have up to 8 channels available with soon an option to choose how many bits they have each (between 1 and 64), they are not fit for more complex data such as strings, arrays or data dictionaries. Also, channels are fit for frequently used data. If they get used for rare data, it would waste memory.

Such metadata would largely be unused by the module, but more up to your game to interpret and use.

Voxel metadata

This allows, for specific voxels, to store aribtrary data (most of what can fit in Variant) for individual voxels. It could be accessed the same way, only with a different function, like so:

var items = voxel_tool.get_voxel_metadata(chest_position)
items.append({"type": "arrows", "count": 64})
voxel_tool.set_voxel_metadata(chest_position, items)

Of course, this may be used sparingly, as this metadata is often much heavier than voxels. It would be stored in the block as a dictionary, mapping voxel position to the piece of data.

Block metadata

While it would probably have less uses, I would also add per-block metadata. This would allow to store even more aribtrary data, tied to a block, not a particular voxel. Such data could be things like "visit count", "average temperature", biomes, cached fluid states or an array with tree positions.
Doing this one may need to have a block access API though.

Access by VoxelStream

Because such metadata is tied to voxels and blocks, it means it can be generated, loaded and saved by voxel streams. This is very handy when you want to include more than just voxels to the generating process, such as trees, storage chests or NPC locations. And of course, allows this data to be saved next to voxels when using a file-based stream.

@Zylann
Copy link
Owner Author

Zylann commented May 31, 2021

Closing as this feature is implemented

@WithinAmnesia
Copy link

WithinAmnesia commented Feb 23, 2024

"Access by VoxelStream

Because such metadata is tied to voxels and blocks, it means it can be generated, loaded and saved by voxel streams. This is very handy when you want to include more than just voxels to the generating process, such as trees, storage chests or NPC locations. And of course, allows this data to be saved next to voxels when using a file-based stream."
How do we do this one in multiplayer? Are there examples? Has anyone demonstrated and tested this? What must be done to do this in Blockygame for the community benefit from? How do we do NPCs and storage chests and user account data storage like inventories can banks with Blocklygame demo so we can make more games with working examples that play well with your massive Godot systems and multiplayer?

More information here: Zylann/voxelgame#103 (comment)

@Zylann
Copy link
Owner Author

Zylann commented Feb 23, 2024

How do we do this one in multiplayer?

I think it's just sent alongside voxels normally.

Are there examples?

Not yet. Haven't got the time to make one.

Has anyone demonstrated and tested this?

Not to my knowledge.

What must be done to do this in Blockygame for the community benefit from?

Spend time on it, which personally I dont have because of many other things, I do this on my free time, so unless someone else figures things out themselves, it will be done when I get to do it, no ETA

How do we do NPCs and storage chests

Storage chests can be some metadata that's just an array of items, which you can recognize as being chest inventory if the type of the voxel is a certain value. NPC is more complicated. Currently there is no entity system, you have to build this yourself using regular nodes, signals and virtual methods exposed by terrain nodes so you can hook up to chunk load/unloads to know when they should spawn/despawn. I'm thinking of it but got nothing solid yet.

and user account

Not in the scope of this project

@WithinAmnesia
Copy link

WithinAmnesia commented Feb 23, 2024

How do we do this one in multiplayer?

I think it's just sent alongside voxels normally.

Okay that is good to hear and get some confirmation for too. That should simplify things a lot by having everything already be together to work on. Multiplayer is key.

Are there examples?

Not yet. Haven't got the time to make one.

I'll try to make an example and share it as I work to prototype entities and storage systems.

Has anyone demonstrated and tested this?

Not to my knowledge.

I should work on getting this be a first then we can have things be in a better position for everyone with working multiplayer entities and storage system.

What must be done to do this in Blockygame for the community benefit from?

Spend time on it, which personally I dont have because of many other things, I do this on my free time, so unless someone else figures things out themselves, it will be done when I get to do it, no ETA

Okay I will start spending time on this and aiming to make incremental progress and I think when its in a highly working state share the multiplayer entities and storage systems with the community so everyone can benefit. Bit by bit.

and user account

Not in the scope of this project

That is perfectly good too. We already have working multiplayer player inventories. So it seems to be a matter of database and server work. We already have a great start to expand upon in the Blockygame demo's individual player inventories. This can be solved with conventional means and I think there are enough community resources and personal to solve this bit by bit as its own puzzle after this one in order of importance. So as to get the entities and storage systems working first. If we can get multiplayer chunk data to save chest / storage data we are 4/5 the way there and that is a massive success. In that case it would be like real life where everything is accessible in the open-world. So then it becomes a social matter. Yet even then we are at ~4/5 solved for player account data storage. So as long as the chunks / storage systems work and save with the multiplayer chunk data. Meaning that the storage data be saved and load and unload fine in the voxel server chunk data system and work good with the multiplayer and chunk streaming we have a massive success.

How do we do NPCs and storage chests

Storage chests can be some metadata that's just an array of items, which you can recognize as being chest inventory if the type of the voxel is a certain value.

So with chests its a matter of of testing / prototyping / working with Voxel Metadata and in thoery it should eventually work with enough tinkering and testing with what is already there with what is there to work with Voxel metadata systems in the Blockygame demo? So for Chests to get working just tinker away with Voxel metadata values, add a modified inventory interface and when the chest block is destroyed it drops all blocks onto the ground as items to pick up type of thing? As in it should be possible to copy the minecraft style of chest in Blockygame demo with enough work with the voxelmetadata systems that are already there?

There probably needs to a game mechanic system where as when a block breaks it drops an item that can be picked up. Also the chest when broken should drop all contained items like in Minecraft. Does Blockygame already support / have examples of when the blocks are broken they turn into items that can be collected by the player or must this be made too?

NPC is more complicated. Currently there is no entity system, you have to build this yourself using signals and virtual methods exposed by terrain nodes so you can hook up to chunk load/unloads to know when they should spawn/despawn. I'm thinking of it but got nothing solid yet.

"Signals and virtual methods exposed by terrain nodes so you can hook up to chunk load/unloads to know when they should spawn/despawn."
Can we cheat a tiny bit and use a spawner block like in Minecraft to get this Entity business alive and off the ground a bit? As in can Voxel_metadata be used to make a spawning block / voxel that can say spawn an entity when loaded by the voxel streamer? Add a script where it can be like when its loaded by the chunk stream to be as like: Spawn 'test_entity1'#X at X blocks up on next nearest open space if not already spawned. Then like it checks if its dead / has respawn logic too. So it only spawns when it should at being loaded in and also after a set arbitrary amount of time has passed if it was kills and if the voxel is loaded by the chunk streamer etc. Would this be a reasonable solution to get entities / NPCs working in the Blockygame demo for the time being?

What are your thoughts and suggestions for getting the entities and storage systems to work in Blockygame? What should be done to test say the entity spawn block and chest voxel_metadata systems? I just need some guidance and I can spend a lot of time on working of these experimental examples of critical game making creative tools for the community. All feedback is welcome.

This is my goal is to get something close to this patch added into Blockygame; for like 3/4 of Minecraft's progression and player trade and economy systems was added with this one update: Zylann/voxelgame#103 (comment)

@WithinAmnesia
Copy link

WithinAmnesia commented Feb 24, 2024

https://github.com/Zylann/voxelgame/blob/2147d8152ac860c616b764786f736e0cd7a4d844/project/blocky_game/blocks/blocks.gd#L43
points to:
https://github.com/Zylann/voxelgame/blob/2147d8152ac860c616b764786f736e0cd7a4d844/project/blocky_game/blocks/voxel_library.tres#L11C1-L11C115
How are we to add more blocks if the data is not human readable in parts?
"[ext_resource type="ArrayMesh" uid="uid://dm05scqbatw2v" path="res://blocky_game/blocks/planks/planks.obj" id="7"]"
Like mate how does a regular person understand how to use this?
[ext_resource type="ArrayMesh" uid="uid://dm05scqbatw2v" how do we make more of those?

This works: "path="res://blocky_game/blocks/planks/planks.obj" id="7"]"" regular people can use that but how on earth are people going to more more "uid://dm05scqbatw2v" parts?

Also where are the textures?
image
OH
terrain
Then how does it all work together?

So we have:
https://github.com/Zylann/voxelgame/blob/2147d8152ac860c616b764786f736e0cd7a4d844/project/blocky_game/blocks/voxel_library.tres#L82
How are we going to use this?
"material_override_0 = ExtResource("2_r7axq")"
what does that mean and how can it be replicated by regular people?

Like how do we add blocks step by step to test?

Are those weird scrambled numbers and letter from a sort of 'easy' way of doing things or a compression system? I don't know what to do after reading the block documentation either?

https://voxel-tools.readthedocs.io/en/latest/api/VoxelBlockyLibrary/
https://voxel-tools.readthedocs.io/en/latest/specs/block_format_v4/
https://voxel-tools.readthedocs.io/en/latest/specs/instances_format_v1/
https://voxel-tools.readthedocs.io/en/latest/api/VoxelBlockyModel/
I read these these and like I get lost there's no direction is like endless specifications how does this all work together? Is there a guide or something? My brain is spinning so fast because its trying to do all the directions at once because its like there's no guide or steps or like cook book. It feel like like baking cake but you don't get steps you get like the atomic detail of the flour how the flour can be used in a billion applications then its the same for the eggs the sugar the milk the oven specs the atomic structure of the quarks and the thermodynamics of the oven like mate we don't need literally ever single detail down to the atom. It's good but like how you have to mix the flour the eggs how much and where does it all combine? What to not do? What steps can regular people take to add more things to already working systems? So okay my brain is not having a good time for it just doesn't understand what to do next and how things combine to add more blocks in what order without thinking of 10,000 ways it could possibly work and like maybe 10 or 20 of those will work.

So this started with this:
var items = voxel_tool.get_voxel_metadata(chest_position)
items.append({"type": "arrows", "count": 64})
voxel_tool.set_voxel_metadata(chest_position, items)
#98 (comment)

It was like my monkey emotion brain went like this: Ah piece of chest just needs new block find how to make new block and add metadata to new block. Add block to inventory in a test clone iteration of blockygame, test over and over be dumb until it works then pretend to be smart got it 1st try.

So I'm lost lol how do we add the new blocks mate? Okay I will add the art for chest okay, it does not need animations its like mission 1 get new chest block and add meta data and test. How do we the add the blocks, my brain is not happy with the logic math parts because the documentation is lacking a guide for how to add blocks and I think the weird numbers and letters are strings that come spat out of a machine system to make big things small. I remember them from working on WoW databases and Baldur's Gate and Diablo and it needs a machine system / code to make it readable or like you process ew4ed54f56r45 and it says like 'line 6 column 4 crude shortsword'. I gotta think about this.

@WithinAmnesia
Copy link

WithinAmnesia commented Feb 24, 2024

terrain(chest)
Here is the prototype chest. It should be able to use with planks texture and have the horizontal side facing the player with the latch.

@WithinAmnesia
Copy link

WithinAmnesia commented Feb 24, 2024

I messed up. I used the top not the side art 1 sec. There all better lol. 2 options for latches now.
terrain(chest)
Okay so now there is unique prototype art for the chest now its just add new block to blockygame for meta data testing hmmmmm.

@AimiIsFat
Copy link

Excuse me, @WithinAmnesia, but could you please stop reporting all of your progress here? Many people are watching this project and we are here to view progress on this project, not your own. It is best to only post inside issues when you actually NEED help and can't figure it out on your own, not to tell people about your unrelated project that has almost nothing to do with this one, as that is considered spamming, and is against GitHub ToS. There are better places to do that, and I'm tired of receiving random emails every 5 minutes because you want to talk about your project in a place that you shouldn't be.

@WithinAmnesia
Copy link

WithinAmnesia commented Feb 24, 2024

Okay @AimiIsFat maybe I should go and post more on the voxel_game / blockygame repo if I was in the wrong space to ask questions, of which I am not for this is on topic as much as it gets. I literally made chest assets today to help further this specific topic of voxel metadata. I disagree with your statement and opinion because I am asking legitimate questions that are in the right places and they need space and I need help at times too.

Also just because its annoying you does not mean it is spamming for there's no malicious or excessive posting but rather the opposite in that I am genuinely trying to develop more on what is here. As in specifically a general case use examples of voxel_metadata for not just myself but the community to use to make more than just my game example but for everyone's game too. For there are a lack of working examples for storage and entities; this would greatly help not just myself but you and the author and everyone who uses this to make a working game.

The author does not have time for random internet drama and this malarkey. This stuff is HARD okay, I don't ask willy nilly I test for hours and then when i am really stuck I ask for help mate. They are busy and said so consistently but I will not take any malarkey from the community without good reason of which this does not have any. This is a waste of time arguing and I wish I spent my time and other's time more productively reading my rebuttal but i will refute this charges and I will defend myself rightly.
The rest is in the gist (to save everyone from a wall of text): https://gist.github.com/WithinAmnesia/4863f10e66991e39f67b63eef9c6d931
Please I just want dev work here. I am sorry for any drama. I just want a nice place for everyone in the community.

Comment 2 reply (from below comment): @AimiIsFat I appreciate the politeness. I have separate issues that if I make a giant post about crammed together, it gets confusing for many people; including myself. Yet it just gets out of hand a super mega post with 20+ different questions solved and unsolved across 1-3 months. As like imagine a kitchen but you only have 1 breadboard worth of counter-space for everything.

Also I need to ask questions and speak. This can be a messy process and I'd like for it to be neat but it can be messy. Yes posting a lot can look excessive. Yet also I have a lot of work to report and when I spend I think its now at least 20+ hours in ~3 days on this; I will find issues and somethings are not easy to solve.

I am sorry that the 68 other people are looking for other things but I'm not sure what to do about that and asking no questions is not a realistic answer either. I am trying to talk to the author of this project about technical details. I'm not trying to be a message spammer or an unpleasant person. I wish there was a better way to talk with the main authour and not bug the 68 other people. Even these messages I am uncomfortable with for it is drama and not work. I do re-edit things many times to add and to give new information.

Also its natural to get new questions and puzzles when working a lot. For example I have made efforts to use the blockygame repo and ask specific questions to not be unnecessarily excessive or unpleasant on here. Zylann/voxelgame#104 .

I do care about getting along with people and I am not immune to emotion either. There is a lot of work to be done still. I will try to not post any more un-work related comments. I have to focus on work and being productive.

Take care mate.
Update: I joined the community Godot Voxel Discord and asked my storage chest / entity question there as well for blockygame. All feedback is welcome.

@AimiIsFat
Copy link

@WithinAmnesia, the entire issue was that you're using the issue tracker incorrectly. Please study GitHub etiquette, and I would suggest you try to understand people before immediately assuming that they're some evil villain whose mission is to make you sad because they disagree with you. 🙃

Also, it is spamming by your own definition, "excessive posting." 4 consecutive posts in under 6 hours is far too many, and you're misusing the platform as a whole. Don't post progress updates, just ask questions. When you finally finish, throw it into a pull request. The maintainer will tell you if something's wrong. If you have another question and you haven't yet received an answer to your previous one, just edit your previous message. Every message you send is another email sent to sixty eight different people. Many of which, including myself, aren't watching this project just to see you post about some texture you made which might not even be added. Also, just a tip: It's best to spell properly and not use slang in a formal environment.

To summarize: open one issue, ask all questions there, and make sure the project maintainer wants this stuff added. Don't post progress updates, just finish it and make a pull request. The project maintainer will tell you if anything is wrong.

@AimiIsFat
Copy link

@WithinAmnesia, I do get how you feel, but there is a bit you should know so I'll just elaborate on that one last time since you don't seem to understand it all the way. Also, it is fine to make another post when someone replies to you, just not making several posts when it is unnecessary.

Anyone else reading this, feel free to skip it, unless you just want some general tips on GitHub usage.

I have separate issues that if I make a giant post about crammed together, it gets confusing for many people; including myself. Yet it just gets out of hand a super mega post with 20+ different questions solved and unsolved across 1-3 months. As like imagine a kitchen but you only have 1 breadboard worth of counter-space for everything.

There are 2 different solutions here. The first being to take it to the project's Discord, which is linked in the README. Not entirely sure what they do there since I'm not in it but typically project Discords are good for that if you are serious about helping. The second being to read over your posts before sending them. You can use that to see which information isn't important to send, how to format the post better, and ways to make it easier to read. If both fail, it might be a good idea to rewrite it from scratch. If you have that many questions, you may want to also get better at programming before trying to contribute, as messy or inefficient code will likely not be accepted into a project.

Also, if you write a big post with a lot of questions and they go unanswered, the issue is likely not the post. The issue is most likely that the project maintainer does not have time to answer them. In this case, you should probably give up. I do the same if I don't receive a reply. Posting in other places might annoy them enough to make them respond to you, but they likely won't be happy about it, even if they don't show it.

Also I need to ask questions and speak.

You can, just keep it in one issue. People can unsubscribe from specific issues if they aren't interested, but posting on other issues means that people will have to go and manually unsubscribe from all of them, even if they might be otherwise interested in that issue. I would really have no problem if you just did that.

This can be a messy process and I'd like for it to be neat but it can be messy. Yes posting a lot can look excessive. Yet also I have a lot of work to report and when I spend I think its now at least 20+ hours in ~3 days on this; I will find issues and somethings are not easy to solve.

It typically can be neat. You don't need to report your work until you send in a pull request. I recommend you view other issues and study how they're written.

I wish there was a better way to talk with the main authour and not bug the 68 other people.

Discord. Otherwise, just keep it in one issue and follow the other tips.

Also its natural to get new questions and puzzles when working a lot. For example I have made efforts to use the blockygame repo and ask specific questions to not be unnecessarily excessive or unpleasant on here. Zylann/voxelgame#104 .

Though the writing is a bit messy, I think it is good that you tried that. However, you should've kept it in one issue. If the project maintainer doesn't respond then they likely don't have time for it or don't want to respond for some other reason. It is best to respect the project maintainer and let them answer when they want to, rather than trying to get their attention by posting elsewhere, even if this means that your questions never get answered, otherwise it is disrespectful. Project maintainers are (usually) volunteers, and are not obligated to answer everything you ask.

Anyways, that is all. I will refrain from further replies to avoid bothering the others watching this repository. Just keep the posts in one issue, thanks.

@WithinAmnesia
Copy link

WithinAmnesia commented Feb 25, 2024

How to add new blocks in the Blockygame demo that work in multiplayer solved: Zylann/voxelgame#104 (comment)
Now onto voxel_metadata for storage and entity multiplayer testing.

@nonchip That is not very productive. This community has polite people too and I'd rather not have random drama in the comment section that is not productive. This issue is still ongoing for chests have not been implemented for the public.

I have a working example for other people to learn from and use open source forever free after I solved a lot of not documented critical parts that are required to do technically difficult tasks such as to add blocks to the community blockygame demo that work in a previously undocumented section. I am growing weary of this increasing toxicity from a few people, yet I remember from the community voxel_game discord there are more positive people. Who are doing their own productive thing rather than feel the best action they can do is complain unproductively about new tested working community examples in a closing statement update.

Why is it so seemingly hard for so many people so often to be polite to strangers and at least judge themselves before they judge others when talking anonymously? Treat people well if you want to be treated well too. Also your actions undo your justifications. As in for why ping the very busy author over random unproductive toxic drama too? As like this is just unfortunate for others to read at this point and I feel it is an unfortunately embarrassing part of the community. I am not proud of these kinds of overly negative comments where I author them or not; I care still about the well-being of people in general. I know there are really good mannered polite people here who do a lot of community good.

Additionally if keenly noted one would see I did learn and listened indeed and found my way to the community discord and I am not here excessively pontificating anymore being occasionally repugnant nor excessively tiring. As this comment section is unfortunately beginning to feel as if it is spiraling slowly down the proverbial drain into wanton negatively. Yet unfortunately in spite of my best efforts at diplomacy and taking the higher road and choosing to be even more responsibly minded towards incredibly delicate souls. Also I can report that I am not of the best spirits after my efforts towards positive conversation have been seemingly misunderstood.

I put effort towards fostering a more positive and polite area of conversation and discussion of ideas for creative productive people. This is not trivial nor primordial nor instinctual and far from simple and automatic in nature but rather this effort to do well for the community requires consistent thought, evaluation and diligence and a value of the community past ones own passing sensitivities. As for to my points I'm already predominately on the blockygame repo too and the community discord. There my feelings and thoughts are shared in part, no one can accuse me of not trying to do community good now for I have done so in near exhaustive detail and very late in the evening for myself might I add. Please everyone just strive to be more positive, life goes better being more positive and its a lot more productive and fulfilling.

Everyone take care.

WithinAmnesia added a commit to WithinAmnesia/ARPG that referenced this issue Feb 25, 2024
@nonchip
Copy link

nonchip commented Feb 26, 2024

@WithinAmnesia so you learned nothing, great. since @Zylann didn't do the right thing and lock this issue yet, can you at least stop spamming everyone else with offtopic BOOKS? this is a 2020 issue about implementing voxel metadata that's been closed because it's NOT an issue anymore. AND has less than nothing to do with anything you said after Zylann answered your first round of almost related questions.

Repository owner locked as spam and limited conversation to collaborators Feb 26, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants