Voxelmetric / Voxelmetric1

Legacy Voxelmetric framework
Other
250 stars 96 forks source link

Few questions #58

Open Neomex000 opened 8 years ago

Neomex000 commented 8 years ago

Hello, I don't use twitter so I figured out this would be the best way to contact you,

I really like your project, are you still working on it?

Could you tell me what Overrides are (BlockOverride etc.) and how to add custom logic to the blocks?

I have modified BlockController changing this: http://pastebin.com/cfyhBhDM but nothing happens when I run the game and remove all the logs from tree

I have seen you started using json for textures and blocks in Alpha2 (I'm using master) and that there is no CubeDefinition. I must say I'm not a big fan of json for this purpose, it is what made me switch from modding new minecraft to 1.7.10.

I have also noticed that adding Surface layer with grass covers either only some areas (big frequency) or covers all but leaves a bunch of holes everywhere (small frequency). I've tried playing with variables but didn't figure it out.

When do you plan to add biomes and other stuff? Also how big the changes are going to be in new version? Obviously json but will other mechanics change aswell? Do you need any help with anything? You could throw something simple but boring at me, because I don't think I will be much help with more advanced stuff.

I have seen on twitter that you are working in Glasgow. I'm studying in Paisley :)

Neomex000 commented 8 years ago

Also, I want to Instantiate item prefab on block destroy but it doesn't inherit from monobehaviour, how should I do that?

alex-irt commented 8 years ago

Hey, Yes I'm still working on Voxelmetric. The past few weeks have been focused on a game I released recently and a new game I've started working on. The new game uses Voxelmetric so I think that will make me more aware of what is needed and how it's working.

Overrides work differently in master than the way they work now. In master block overrides inherit form a BlockOverride class and then on certain functions the actual block controller checks if it has a BlockOverride and if so calls the corresponding function in the BlockOverride. It does this based on the name of the block and the name of the class so for "grass" it looks for a "grassOverride" class that inherits from BlockOverride. This was the wrong way to implement this, it was implemented that way because I wanted to avoid having tons of block controllers and then need block definitions for each type. I changed it to use standard inheritence for overriding block controllers when I removed block definitions.

I think your script is not working because in master the random update function passes a local position to the function, that is to say a position relative to the chunk. Use chunk.GetBlock which takes local positions instead of the world singleton. Again, this was changed to use global positions for blocks everywhere except where specifically noted in alpha 1 I think.

Yeah, the json files are definitely not as user friendly. Originally I wanted to do editor windows and custom inspectors for all customization but it proved to be a lot of work to implement and to update whenever things change and it made it harder for people to extend voxelmetric because you need to add a front end for every bit you add. It would still be possible to write a front end for editing the json files but it's just not my focus.

I don't think the surface layer is supposed to use the frequency variable. It's supposed to be a 1 block thick layer of a single block type.

You can see the planned features for alpha 2 here: https://github.com/AlexSTV/Voxelmetric/milestones/Voxelmetric%20Alpha%202 I'm not sure about biomes though, I haven't looked into what they would require enough. Going forward I choose features based on what people want, what I need for my game and what makes Voxelmetric more stable and efficient. I've also started doing some work on a proper site for documentation. As for helping it really depends on what you want to work on. If you implement something useful to others while working on your stuff that's great, you can also look at the issues page and the gitter chat for issues you want to take on. I would appreciate any help but I know the code base isn't the most readable though I'm taking steps to make it better and more mature so that other people can contribute easier. In not too long there will also be the documentation page that could always use contributors.

Nice to know there's other game developers in Scotland! I've yet to find any game dev events but I'm thinking of finding a gamejam venue.

If you want to make a prefab from a block you'll have to generate the mesh for that block and assign it to a meshfilter on a gameobject. https://github.com/AlexSTV/Voxelmetric/blob/alpha_2/Assets/Voxelmetric/Code/Voxelmetric.cs has a function that does just that.

Neomex000 commented 8 years ago

Thanks for the reply! Will the RandomUpdate be called even if chunk is not visible?

I want to implement furnaces and machines for what I need normal update method, which needs to be called even if chunk is unactive(not visible). How could I add it?

I think it would be good idea to limit the normal update function to 20 ticks per second the way minecraft does it.

Also, would you be willing to give me some contact info with you such as skype for easier communication? I am planning to make a full game out of it so potentially I could add some stuff to voxelmetric aswell.

alex-irt commented 8 years ago

@Neomex000 I'm not on skype often but you can message me on gitter https://gitter.im/AlexSTV/Voxelmetric either directly or in the Voxelmetric room. I get notifications if you @ mention me :) Also there's a RandomUpdate function on BlockController you can override that gets called as often as you specify in the world's config.