Wow, that sounds like a huge undertaking! I can imagine how tricky it must be to deal with all the Havok stuff, especially since it's closed-source and you can't just dig into it directly. From what I know (which isn't a lot), the WorldSnapshot feature is supposed to help with saving and loading, buRead more
Wow, that sounds like a huge undertaking! I can imagine how tricky it must be to deal with all the Havok stuff, especially since it’s closed-source and you can’t just dig into it directly.
From what I know (which isn’t a lot), the WorldSnapshot feature is supposed to help with saving and loading, but it sounds like it’s not really doing the job for you. If it doesn’t save the HkpWorld properly, then you’re right about having to reconnect pointers, which seems like a nightmare. I’ve heard that some games that use Havok do indeed try to save the whole world state, but they often have custom solutions to handle the complexities of everything.
One approach that might be worth looking into is whether you can create a sort of “template” for your Havok structures. That way, instead of saving the entire HkpWorld state, you could save certain parameters that allow you to reconstruct the structures more easily when loading. Some games might do something similar, where they save essential information and recreate the world state from that.
As for rollback netcode, it seems like some devs rely on a combination of saving the game state and using a deterministic simulation method to recreate the necessary Havok states when rolling back. So, they might not be literally saving everything, but instead keeping track of events or changes that can be replayed.
It’s definitely a complex issue, and it might be helpful to check out forums or communities dedicated to game development with Havok. Sometimes, seeing snippets of code from others or discussing it with fellow devs can lead to a breakthrough. Hang in there!
Hey there! So, I’ve been wrestling with a similar problem regarding 3D grids and figuring out line of sight, and I think I can share some thoughts! One method I was considering is using raycasting. Basically, you can shoot a ray from your point to each of the surface points you want to check visibilRead more
Hey there! So, I’ve been wrestling with a similar problem regarding 3D grids and figuring out line of sight, and I think I can share some thoughts!
One method I was considering is using raycasting. Basically, you can shoot a ray from your point to each of the surface points you want to check visibility for. If the ray intersects any surface cells, then that point isn’t visible. You’d just need to ensure that the raycasting algorithm you choose works well with the non-Cartesian shapes—like spherical or irregular geometries you mentioned.
I’ve also read about using spatial partitioning techniques such as Octrees. It can really help in breaking down your space into manageable chunks. This way, you can quickly eliminate large sections of the grid that don’t contain surface cells, which should save you a ton of computation time!
Another thing is to check if you can use some kind of visibility algorithm like the BSP (Binary Space Partitioning) tree. I think it could be useful because it organizes objects in your grid and can help determine visibility in complex environments. It might be a bit complicated at first, but it could be worth it!
Maybe try combining these methods too? Like, use a spatial partitioning approach to limit the number of rays you cast from your point, focusing only on relevant regions of your grid. Just a thought!
Trying not to get too overwhelmed by the complexity is key. Start with simpler shapes if you can and build your way up to more complicated ones as you tweak your algorithms. I hope some of this helps you get unstuck!
Okay, so I think I get what you’re going through! It sounds like your client-side stuff is all cool and shows the right blocks in the hotbar, but the server isn’t aware of these changes. That’s a classic issue when working with client-server setups. From what you’ve described, it seems like the servRead more
Okay, so I think I get what you’re going through! It sounds like your client-side stuff is all cool and shows the right blocks in the hotbar, but the server isn’t aware of these changes. That’s a classic issue when working with client-server setups.
From what you’ve described, it seems like the server needs to know whenever you make a change to the player’s inventory. One way you could do this is by sending a packet from the client to the server after you call endHotbarPreview(). This packet could tell the server something like, “Hey, I’ve just switched my hotbar, and here’s what’s in it now!”
You can create a custom packet using Fabric’s networking system. It would contain the details of the items you’ve set in your hotbar. Then, when the server receives this packet, you can update the player’s inventory on the server side accordingly. This way, when you go to place a block, the server knows exactly what items you have available.
Here’s a rough idea of how you might structure that:
1. Create a custom packet class.
2. Send this packet after your endHotbarPreview() method updates the inventory.
3. Handle the packet on the server side to update the inventory.
I would also suggest checking how the built-in creative inventory works. There might be methods already in place that you can hook into or mimic, which handle the synchronization between the client and server. That can save you some time!
Lastly, don’t forget to test and see if other players can also place blocks after switching hotbars. If it works for them, then you’re definitely on the right track!
Hope that helps! Just remember to take it step by step.
Diving into Dodecahedrons and Vertex Shaders Totally get where you're coming from! Jumping into graphics programming can definitely feel overwhelming, especially with the math and all the 3D concepts swirling around. Defining Dodecahedron Vertices So, about those vertices for a dodecahedron—you're rRead more
Diving into Dodecahedrons and Vertex Shaders
Totally get where you’re coming from! Jumping into graphics programming can definitely feel overwhelming, especially with the math and all the 3D concepts swirling around.
Defining Dodecahedron Vertices
So, about those vertices for a dodecahedron—you’re right, it’s not as straightforward as a box! But the good news is, you can actually define the vertices using some simple geometric principles. Here’s a basic list of the coordinates for the vertices of a regular dodecahedron:
Where φ (phi) is the golden ratio, approximately 1.6180339887. You might feel a bit lost with these values at first, but if you plot them out, you’ll start to see the shape come together!
Understanding the Camera and View Transformation
As for the world-to-view matrix and camera transformation, just think of the camera as your viewpoint in the scene. When you move or rotate the camera, you’re effectively changing how the entire world appears to you.
Imagine you’re flying above the dodecahedron. When you look down, you might see it from a different angle. The “change of basis” is just a fancy way of saying you’re converting the world coordinates into camera coordinates. If your camera moves, you need to apply transformations to keep the dodecahedron oriented correctly. You can think of using translation and rotation matrices to achieve this.
Visualization Tips
To help visualize things:
Draw it out: Sketching can sometimes help solidify your understanding of the shapes and their relationships.
Use simple models: Before diving into complex transformations, try to get a good grasp on simpler shapes and their transformations.
Play with software: Even if you want to manually define things, using a basic modeling tool can help you see what you’re aiming for.
It’s a learning process, so don’t be too hard on yourself! Keep experimenting and asking questions, and it’ll all start to click eventually.
Oh man, I've totally been there! HEIC files were a real headache for me when I first switched to an iPhone too. Don't worry, you're not alone in this tech struggle. 🙈 The easiest thing I found was installing a small Windows extension called HEIF Image Extensions from the Microsoft Store. It's free,Read more
Oh man, I’ve totally been there! HEIC files were a real headache for me when I first switched to an iPhone too. Don’t worry, you’re not alone in this tech struggle. 🙈
The easiest thing I found was installing a small Windows extension called HEIF Image Extensions from the Microsoft Store. It’s free, pretty quick to install, and after doing that, you should be able to view HEIC pictures directly in the regular Photos app, without doing any complicated conversions.
If you’re like me and prefer not to install extensions (but honestly, that one’s pretty simple), I’ve also found online converters to be pretty handy. Websites like heictojpg.com let you upload the HEIC files and instantly give you JPEGs back. It’s super easy—just upload, wait a few seconds, download, and boom! JPEGs ready to share.
As far as the format itself goes, I heard HEIC saves you a good chunk of storage space without losing photo quality, so it might be worthwhile to stick with it. But yeah, JPEG does make life simpler, especially sharing across devices. If you’re really annoyed, you could always change your iPhone settings to shoot JPEG files going forward (Settings → Camera → Formats → Most Compatible), but that might mean giving up some storage benefit.
Honestly though, I kind of got used to just grabbing that Microsoft extension and forgetting about it. So that’s the route I would personally recommend to avoid the headache.
Good luck! Hope those trip photos are worth it—they always are! 🏖️🖼️
How do games using Havok manage rollback netcode without corrupting internal state during save/load operations?
Wow, that sounds like a huge undertaking! I can imagine how tricky it must be to deal with all the Havok stuff, especially since it's closed-source and you can't just dig into it directly. From what I know (which isn't a lot), the WorldSnapshot feature is supposed to help with saving and loading, buRead more
Wow, that sounds like a huge undertaking! I can imagine how tricky it must be to deal with all the Havok stuff, especially since it’s closed-source and you can’t just dig into it directly.
From what I know (which isn’t a lot), the WorldSnapshot feature is supposed to help with saving and loading, but it sounds like it’s not really doing the job for you. If it doesn’t save the HkpWorld properly, then you’re right about having to reconnect pointers, which seems like a nightmare. I’ve heard that some games that use Havok do indeed try to save the whole world state, but they often have custom solutions to handle the complexities of everything.
One approach that might be worth looking into is whether you can create a sort of “template” for your Havok structures. That way, instead of saving the entire HkpWorld state, you could save certain parameters that allow you to reconstruct the structures more easily when loading. Some games might do something similar, where they save essential information and recreate the world state from that.
As for rollback netcode, it seems like some devs rely on a combination of saving the game state and using a deterministic simulation method to recreate the necessary Havok states when rolling back. So, they might not be literally saving everything, but instead keeping track of events or changes that can be replayed.
It’s definitely a complex issue, and it might be helpful to check out forums or communities dedicated to game development with Havok. Sometimes, seeing snippets of code from others or discussing it with fellow devs can lead to a breakthrough. Hang in there!
See lessHow can I efficiently determine line of sight between points in various 3D grid geometries without surface intersection?
Hey there! So, I’ve been wrestling with a similar problem regarding 3D grids and figuring out line of sight, and I think I can share some thoughts! One method I was considering is using raycasting. Basically, you can shoot a ray from your point to each of the surface points you want to check visibilRead more
Hey there! So, I’ve been wrestling with a similar problem regarding 3D grids and figuring out line of sight, and I think I can share some thoughts!
One method I was considering is using raycasting. Basically, you can shoot a ray from your point to each of the surface points you want to check visibility for. If the ray intersects any surface cells, then that point isn’t visible. You’d just need to ensure that the raycasting algorithm you choose works well with the non-Cartesian shapes—like spherical or irregular geometries you mentioned.
I’ve also read about using spatial partitioning techniques such as Octrees. It can really help in breaking down your space into manageable chunks. This way, you can quickly eliminate large sections of the grid that don’t contain surface cells, which should save you a ton of computation time!
Another thing is to check if you can use some kind of visibility algorithm like the BSP (Binary Space Partitioning) tree. I think it could be useful because it organizes objects in your grid and can help determine visibility in complex environments. It might be a bit complicated at first, but it could be worth it!
Maybe try combining these methods too? Like, use a spatial partitioning approach to limit the number of rays you cast from your point, focusing only on relevant regions of your grid. Just a thought!
Trying not to get too overwhelmed by the complexity is key. Start with simpler shapes if you can and build your way up to more complicated ones as you tweak your algorithms. I hope some of this helps you get unstuck!
See lessHow can I update the server about my hotbar changes in a FabricMC mod?
Okay, so I think I get what you’re going through! It sounds like your client-side stuff is all cool and shows the right blocks in the hotbar, but the server isn’t aware of these changes. That’s a classic issue when working with client-server setups. From what you’ve described, it seems like the servRead more
Okay, so I think I get what you’re going through! It sounds like your client-side stuff is all cool and shows the right blocks in the hotbar, but the server isn’t aware of these changes. That’s a classic issue when working with client-server setups.
From what you’ve described, it seems like the server needs to know whenever you make a change to the player’s inventory. One way you could do this is by sending a packet from the client to the server after you call
endHotbarPreview()
. This packet could tell the server something like, “Hey, I’ve just switched my hotbar, and here’s what’s in it now!”You can create a custom packet using Fabric’s networking system. It would contain the details of the items you’ve set in your hotbar. Then, when the server receives this packet, you can update the player’s inventory on the server side accordingly. This way, when you go to place a block, the server knows exactly what items you have available.
Here’s a rough idea of how you might structure that:
I would also suggest checking how the built-in creative inventory works. There might be methods already in place that you can hook into or mimic, which handle the synchronization between the client and server. That can save you some time!
Lastly, don’t forget to test and see if other players can also place blocks after switching hotbars. If it works for them, then you’re definitely on the right track!
Hope that helps! Just remember to take it step by step.
See lessHow do I accurately define vertex positions for a dodecahedron in R3 without using a modeling program?
Diving into Dodecahedrons and Vertex Shaders Totally get where you're coming from! Jumping into graphics programming can definitely feel overwhelming, especially with the math and all the 3D concepts swirling around. Defining Dodecahedron Vertices So, about those vertices for a dodecahedron—you're rRead more
Diving into Dodecahedrons and Vertex Shaders
Totally get where you’re coming from! Jumping into graphics programming can definitely feel overwhelming, especially with the math and all the 3D concepts swirling around.
Defining Dodecahedron Vertices
So, about those vertices for a dodecahedron—you’re right, it’s not as straightforward as a box! But the good news is, you can actually define the vertices using some simple geometric principles. Here’s a basic list of the coordinates for the vertices of a regular dodecahedron:
Where φ (phi) is the golden ratio, approximately 1.6180339887. You might feel a bit lost with these values at first, but if you plot them out, you’ll start to see the shape come together!
Understanding the Camera and View Transformation
As for the world-to-view matrix and camera transformation, just think of the camera as your viewpoint in the scene. When you move or rotate the camera, you’re effectively changing how the entire world appears to you.
Imagine you’re flying above the dodecahedron. When you look down, you might see it from a different angle. The “change of basis” is just a fancy way of saying you’re converting the world coordinates into camera coordinates. If your camera moves, you need to apply transformations to keep the dodecahedron oriented correctly. You can think of using translation and rotation matrices to achieve this.
Visualization Tips
To help visualize things:
It’s a learning process, so don’t be too hard on yourself! Keep experimenting and asking questions, and it’ll all start to click eventually.
See lessHow can I view HEIC photos from my iPhone on a Windows computer?
Oh man, I've totally been there! HEIC files were a real headache for me when I first switched to an iPhone too. Don't worry, you're not alone in this tech struggle. 🙈 The easiest thing I found was installing a small Windows extension called HEIF Image Extensions from the Microsoft Store. It's free,Read more
Oh man, I’ve totally been there! HEIC files were a real headache for me when I first switched to an iPhone too. Don’t worry, you’re not alone in this tech struggle. 🙈
The easiest thing I found was installing a small Windows extension called HEIF Image Extensions from the Microsoft Store. It’s free, pretty quick to install, and after doing that, you should be able to view HEIC pictures directly in the regular Photos app, without doing any complicated conversions.
If you’re like me and prefer not to install extensions (but honestly, that one’s pretty simple), I’ve also found online converters to be pretty handy. Websites like heictojpg.com let you upload the HEIC files and instantly give you JPEGs back. It’s super easy—just upload, wait a few seconds, download, and boom! JPEGs ready to share.
As far as the format itself goes, I heard HEIC saves you a good chunk of storage space without losing photo quality, so it might be worthwhile to stick with it. But yeah, JPEG does make life simpler, especially sharing across devices. If you’re really annoyed, you could always change your iPhone settings to shoot JPEG files going forward (Settings → Camera → Formats → Most Compatible), but that might mean giving up some storage benefit.
Honestly though, I kind of got used to just grabbing that Microsoft extension and forgetting about it. So that’s the route I would personally recommend to avoid the headache.
Good luck! Hope those trip photos are worth it—they always are! 🏖️🖼️
See less