Godot actually just uses nested subscenes, and it's an approach I like and have used in my engines. To keep the reference I just have an owner property for each entity that points to the prefab resource that instantiated it (or null if no prefab) plus an isPrefabRoot bool that the scene writer checks to serialize that subtree as a prefab reference to the original resource (with any property overrides that it detects are different from the ones in the template). From my experience, most issues with implementing prefabs come when implementing prefab instance overrides and their serialization/deserialization. Detecting when some property of an instance is different from the template and adding those as overrides. Looking forward to seeing how you implement this and I'd love to see a breakdown video once you have everything working.
@kgaming75993 жыл бұрын
Mm, Godot is the best :) And so is Hazel yaya
@Willyuum3 жыл бұрын
I remember you having an epic hand gesture every-time you greet us on the start of the video:p
@Futureblur3 жыл бұрын
Unity flashbacks
@SupernaturalBBI3 жыл бұрын
"Cherno" means "black" in bulgarian("черно", "cherno"[english spelling]), so when you say "The Cherno" that means "The Black" in bulgarian :D
@obinator90653 жыл бұрын
Same with Russian ;) чёрное
@vast6343 жыл бұрын
@@obinator9065 so what does Chernobyl mean then?
@insignia2013 жыл бұрын
It would be cool to see a technical doc about how you make the prefabs, obviously not with all the exhaustive details, just to see how you thought about the problem and how you solved it! In any case, great video!
@hsvfanjan173 жыл бұрын
If you just want to see the code you could always go to the github. The code of course doesn't explain why he implemented it in a certain way or how and why it works, though (apart from comments maybe)
@insignia2013 жыл бұрын
@@hsvfanjan17 Oh for sure Jan, I shouldnt discount that the code is available to be seen but I think there is something really nice when the author of said code clearly understands it from a high level and can explain the overall logic and maybe provide their thought process and reasoning when implementing a feature. That being said, of course he is a busy guy and making such blog posts probably takes a lot of time and effort so I don't think he should feel compelled in anyway to do a write up, but it would be great, especially for us who wants to learn a little more about the nitty gritty details of software engineering.
@emi6aston3 жыл бұрын
Would be cool to have prefabs that mantain also scripted functionallity. So i can make a door and just use that prefab in all of my buildings, obviusly if they are instances better to play with diferent materials or even sizes, etc. Its cool to be talking about this kind of things in Hazel already. Great work!
@kennethcox68953 жыл бұрын
Lmao forgot its winter in the Southern Hemisphere.
@geraltt14553 жыл бұрын
Your scene looks magic with this bloom)
@figloalds3 жыл бұрын
9:11 and that's how Godot actually calls it's Prefabs, it's "Scene", you put a Scene inside the other
@korpos88333 жыл бұрын
Inception in all its glory n.n
@maximechambefort80123 жыл бұрын
Yes, you should stay with scene like Godot does. Unity's prefabs are a bit limiting IMO.
@bloodredtape3 жыл бұрын
Am i the only one noticing global illumination at 7:30?
@falxie_3 жыл бұрын
Hazel is super interesting, trying to understand the inspiration to make it
@jonathansandusky74463 жыл бұрын
"cherno" == so drunk off "sterno" you can no longer say sterno.
@AgentM1243 жыл бұрын
Prefabs are scenes? - Always have been.
@pequod45573 жыл бұрын
You're a god! creating your own engine+ helping others do the same and at the same time teaching normal creators really enlightening things. thank you!
@tomcat_14843 жыл бұрын
Hey Cherno! What are your thoughts on the way the Source 2 engine handles prefabs and instances?
@notanenglishperson98653 жыл бұрын
0:02 From Russian cherno (черно) stands for black
@netpeggle44583 жыл бұрын
"Any friendly in Cherno?" For me Cherno is a City in DayZ :)
@aXYZGaming3 жыл бұрын
What *_is_* a cherno?
@askeladden4503 жыл бұрын
everybody asking what is cherno, no one asking how is cherno.
@Futureblur3 жыл бұрын
@@askeladden450 true 😞
@kartheekvajrala24873 жыл бұрын
@@askeladden450 why is cherno?
@zxuiji3 жыл бұрын
Question, why not use a scripting language like Lua to store the vertex generation scripts, they could fill a provided "mesh" & vertex buffer with needed indices and vertices then fill a boolean that states the "mesh" is static or dynamic, if dynamic then the script is run every time to change the vertices being used, if static the switch from C/C#/C++ to the scripting language and back is skipped, as a side benefit of using the scripting language it is possible to avoid platform specific binaries, alternatively if there's a way to do it then just have all vertices generated in the texture shaders or something since they deal with meshes, would just need to generate a program per "mesh" type for that scenario, should be the most portable after a scripting language, does have the benefit of faster processing too.
@LS-cb7lg3 жыл бұрын
Finally i know what prefabs are xD when i used unity for the first time this was a big point of confusion :)
@Revin24023 жыл бұрын
Unreal engine actually uses the word blueprint for both their visual scripting and their prefab since it's pretty tight together.
@T0mT4yl0r3 жыл бұрын
Blueprints are not prefabs. Blueprints are classes.
@aboaljod593 жыл бұрын
Is it something like factory pattern design?
@videojeroki3 жыл бұрын
I'm wondering if it would be a good idea to use a game engine to make a 3D point cloud viewer/editor. - the point cloud would be loaded from a file that the user would choose from a storage location - number of points could go up to 50 millions What kind of primitive to use to represent a point and is there any game engine feature to natively handle point cloud ?
@HAWXLEADER3 жыл бұрын
I don't know if instancing primitives is the way to go, IMO a signed distance field( see CGmatter video on it) that simply tells the screen "hey draw here" should be better suited for that.
@satindar313 жыл бұрын
what about the game engine series?
@fluxx28753 жыл бұрын
What about a new podcast? Hope you enjoyed the last days, thanks for your videos! 😃👍🏻
@IchigoFurryModder3 жыл бұрын
you forgot prefabs are used for gpu instancing to save memory, lots of it in some cases *cough cough* yandere simulator *cough cough*
@drewgrey78303 жыл бұрын
Do you use srand(time) in your code and if not what do you prefer?
@GonziHere3 жыл бұрын
Speaking of which - is there an upside to the UE way? I kinda hate it that the Actor is only one level deep, that you cannot (easily) have an Actor of Actors. That the Level is something else and so on. Compared to the Godot, where everything is a scene and your game is scene of scenes - same with nodes in unigine. Thoughts?
@sleep30173 жыл бұрын
hey are you still doing code review?
@eddyk5643 жыл бұрын
Isn't that what a class is for?
@naphipps282193 жыл бұрын
Aka, flyweight design pattern
@keyvanmehrbakhsh40693 жыл бұрын
a bit off topic but :why should the term "game engine" be taken too much of a big thing while it could be considered just a construction of codes .just as the rest ?
@beProsto3 жыл бұрын
Ah yes, identity crisis
@Diamonddrake3 жыл бұрын
I think “I am the Cherno” might sound better lol
@CYXXYC3 жыл бұрын
i think "the" is unnecessary
@NickEnchev6 ай бұрын
In Bulgarian you're just "The Black".
@developerethan45933 жыл бұрын
Is it me, or does the HazelDev UI reallly look like unity?
@danialjumagaliyev3 жыл бұрын
Yeah, in terms of the layout of the tab and the UI elements in general.
@HAWXLEADER3 жыл бұрын
So basically you were sick of Unity bugging out and said, Hmm I can do this better! Same as I did with Rocket Jockey remakes...
@martonkos57753 жыл бұрын
Hey Cherno! I have a great idea that you can put in the engine with prefabs! You said in the video, that there will be an option to enable or disable that if you change somewhere the prefab, that will update every single instance of it. I think it would be better if you make two different type of prefab: one is dynamic prefab, the other is a static prefab. If you use the dynamic prefab then it will dynamicly update its every instance, if you choose the static one, then it will just act like a template that you can use. Its just an a idea of mine, that I think it would be a usefull feature.
@T0mT4yl0r3 жыл бұрын
How could you use it as a template? It's not possible like that, because instances are based on classes. A template like you say would mean that you create a completly new class for every copy of that. A copy of the class. I think of holding 2 sets of data for each prefab. One it the data of the default class and if you change it, all are changed. But you have another dataset which you can overwrite and make the prefab different to all others but they are still connected to the same base class. How about that?
@martonkos57753 жыл бұрын
@@T0mT4yl0r That could be an issue, but I thought the attached scripts just stayed connected as a component as usuall, they dont get cloned. I didn’t mean that every class gets cloned. But that is a fair pont that you’ve pointed out.
@strbn92153 жыл бұрын
Ну ты конечно юморист
@danielesquivel31553 жыл бұрын
cherni bonito owo
@arsnakehert3 жыл бұрын
In the engine I'm making, I'm doing ECS with EnTT. I recently created a "Factory" namespace, which contains functions that receive a reference to the registry and create some kind of "object" with certain components in the registry, finally returning the entity ID of that object. I guess conceptually these objects as created by these functions are kind of like the prefabs in, say, Unity. I'm not sure if this is good design or not but I guess it's what I'm sticking with for now.
@T0mT4yl0r3 жыл бұрын
I was going to make prefabs out of Blueprints in UE. But Blueprints are NOT prefabs. They are classes. But we want that visual editing and property windows. If you change the Blueprint, all instances are updated, because the base class changed. But what we want is that we can overwrite an instance to be unique to all others that are an instance of the same Blueprint. So we need the template Blueprint and a virtual copy of the data that will can be overwritten. I made this working but it's very a complex topic.
@李冬瓜3 жыл бұрын
Yep
@lokiandere25183 жыл бұрын
we do care
@SeanLumly3 жыл бұрын
Whatever you are doing now, stop, and concentrate on integrating visibility buffers into your engine. They are more efficient than forward renders for small triangles, as well as deferred rendering, and is the major future trend for rendering realtime graphics. It's the technique that UE5 has renamed as "Nanite" for their implementation of the aforementioned technique in UE5. And there are neat things that you can do with visibility buffers beyond increased efficiency for small triangles. They are worth checking out.