Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

askthedev.com Logo askthedev.com Logo
Sign InSign Up

askthedev.com

Search
Ask A Question

Mobile menu

Close
Ask A Question
  • Ubuntu
  • Python
  • JavaScript
  • Linux
  • Git
  • Windows
  • HTML
  • SQL
  • AWS
  • Docker
  • Kubernetes

anonymous user

76 Visits
0 Followers
871 Questions
Home/ anonymous user/Answers
  • About
  • Questions
  • Polls
  • Answers
  • Best Answers
  • Groups
  • Joined Groups
  • Managed Groups
  1. Asked: June 20, 2025

    How do games using Havok manage rollback netcode without corrupting internal state during save/load operations?

    anonymous user
    Added an answer on June 20, 2025 at 8:14 am

    You're encountering crashes because simply saving and restoring raw pointers or partially ignoring Havok's internal structures leads to broken internal references; Havok's memory layout and object relationships are too complex to handle this way. Most games implementing rollback netcode alongside HaRead more

    You’re encountering crashes because simply saving and restoring raw pointers or partially ignoring Havok’s internal structures leads to broken internal references; Havok’s memory layout and object relationships are too complex to handle this way. Most games implementing rollback netcode alongside Havok physics don’t directly save and restore the entire hkpWorld struct. Instead, they serialize only essential gameplay state—positions, velocities, orientations, and any other necessary metadata—and when rolling back, they carefully reconstruct the Havok world from this authoritative, simplified representation. Typically, this involves using Havok’s dedicated serialization mechanisms or even manually respawning/reconstructing physics objects to avoid corrupted internal pointers.

    Leveraging Havok’s built-in snapshot system (like WorldSnapshot and WorldSnapshot_Load) may seem appealing initially, but it generally isn’t designed with rollback functionality in mind; it won’t restore complex internal states seamlessly. As a robust solution, consider crafting a deterministic, minimal state snapshot that captures only essential parameters. Then, use this snapshot to recreate the entire Havok representation consistently each time you rollback. This method ensures that state sync remains accurate and internal Havok objects stay valid, ultimately eliminating pointer corruption and associated crashes.

    See less
      • 0
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
  2. Asked: June 20, 2025

    How do games using Havok manage rollback netcode without corrupting internal state during save/load operations?

    anonymous user
    Added an answer on June 20, 2025 at 8:14 am

    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 less
      • 0
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
  3. Asked: June 19, 2025

    How can I efficiently determine line of sight between points in various 3D grid geometries without surface intersection?

    anonymous user
    Added an answer on June 19, 2025 at 4:14 am

    An effective approach for efficiently determining line of sight in complex, non-uniform 3D grids involves hybridizing raycasting with spatial partitioning methods such as octrees, BSP trees, or bounding volume hierarchies (BVH). Octrees or BVHs can significantly reduce the computational overhead byRead more

    An effective approach for efficiently determining line of sight in complex, non-uniform 3D grids involves hybridizing raycasting with spatial partitioning methods such as octrees, BSP trees, or bounding volume hierarchies (BVH). Octrees or BVHs can significantly reduce the computational overhead by quickly discarding large empty regions and allowing for targeted intersection tests against surface cells. Using raycasting complemented by spatial data structures will enable you to perform rapid intersection tests by traversing space hierarchically rather than iterating over every individual cell. Additionally, leveraging precomputed visibility data or hierarchical spatial query structures adapted specifically for non-uniform or spherical grids could further enhance performance by reducing redundant calculations.

    Given your complex geometries—especially spherical or wedge-based grids—integrating coordinate mappings or parametric space transformations can simplify intersection tests while maintaining accuracy. It may also be beneficial to employ efficient ray traversal schemes, like the Amanatides-Woo algorithm adapted to non-uniform grids, to handle irregular cell sizes and shapes efficiently. Combining spatial partitioning, optimized ray traversal, and geometry-specific transformations can result in substantial performance gains and scalability, helping you ensure accurate visibility determination even in densely populated, varied grid environments.

    See less
      • 0
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
  4. Asked: June 19, 2025

    How can I efficiently determine line of sight between points in various 3D grid geometries without surface intersection?

    anonymous user
    Added an answer on June 19, 2025 at 4:14 am

    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 less
      • 0
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
  5. Asked: June 18, 2025

    How can I update the server about my hotbar changes in a FabricMC mod?

    anonymous user
    Added an answer on June 18, 2025 at 10:14 pm

    The issue arises because directly using methods like setStack() and clickCreativeStack() on the client-side only updates the local inventory state, without properly synchronizing it with the server-side inventory handler. In Fabric, inventory changes—especially those involving creative mode inventorRead more

    The issue arises because directly using methods like setStack() and clickCreativeStack() on the client-side only updates the local inventory state, without properly synchronizing it with the server-side inventory handler. In Fabric, inventory changes—especially those involving creative mode inventories—aren’t automatically broadcasted when modified purely client-side. Therefore, any method modifying inventory must explicitly synchronize these changes through proper network packets or standard game actions that ensure the server acknowledges and updates the inventory accordingly.

    To resolve your problem, you should implement a custom packet that transmits your updated hotbar inventory from client to server whenever you invoke endHotbarPreview(). Using Fabric’s built-in networking utilities such as ClientPlayNetworking.send() and ServerPlayNetworking.registerGlobalReceiver(), you can create a dedicated packet handler. Immediately after applying the client-side changes, send a packet containing either the full hotbar snapshot or inventory-change details to the server. On receiving the packet server-side, explicitly update the player inventory state there, keeping everything synchronized. This approach ensures consistency between client and server, allowing you to place blocks normally after hotbar switching.

    See less
      • 0
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
  6. Asked: June 18, 2025

    How can I update the server about my hotbar changes in a FabricMC mod?

    anonymous user
    Added an answer on June 18, 2025 at 10:14 pm

    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.

    See less
      • 0
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
  7. Asked: June 17, 2025

    How do I accurately define vertex positions for a dodecahedron in R3 without using a modeling program?

    anonymous user
    Added an answer on June 17, 2025 at 10:14 pm

    You're definitely not alone in finding the precise geometry of the dodecahedron challenging—it's rooted deeply in the elegance of the golden ratio (φ ≈ 1.618). A practical way to define its vertices is to use well-known coordinate sets that leverage the golden ratio. Typically, the 20 vertices are pRead more

    You’re definitely not alone in finding the precise geometry of the dodecahedron challenging—it’s rooted deeply in the elegance of the golden ratio (φ ≈ 1.618). A practical way to define its vertices is to use well-known coordinate sets that leverage the golden ratio. Typically, the 20 vertices are placed symmetrically around the origin and defined by a neat set of permutations involving ±1, ±φ, and ±1/φ. You don’t have to calculate them from scratch; there are clear-cut sets of vertices available online or documented in geometry references and Wikipedia. Once you’ve defined these vertices explicitly, manually creating the mesh’s faces by grouping vertices into pentagons is more manageable and can significantly deepen your intuition of polyhedral structures.

    Regarding transformations and the infamous world-to-view or “camera” matrix, remember that changing basis in graphics programming is essentially about switching reference frames—from a global reference (world space) to a camera-centric one (view space). Think of your camera as defining a new set of axes: the Z-axis points forward (the viewing direction), the Y-axis upward, and the X-axis to the right. When the camera moves, you recalculate this coordinate frame relative to its new position and orientation, constructing a simple rotation-and-translation matrix that transforms points from world to camera coordinates. A helpful technique is to first visualize the camera axes clearly—labeling directions clearly in diagrams—as vector directions from the camera’s position. This can clarify your mental model significantly and make the math feel considerably more intuitive.

    See less
      • 0
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
  8. Asked: June 17, 2025

    How do I accurately define vertex positions for a dodecahedron in R3 without using a modeling program?

    anonymous user
    Added an answer on June 17, 2025 at 10:14 pm

    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:

        V1: (1, 1, 1)
        V2: (1, 1, -1)
        V3: (1, -1, 1)
        V4: (1, -1, -1)
        V5: (-1, 1, 1)
        V6: (-1, 1, -1)
        V7: (-1, -1, 1)
        V8: (-1, -1, -1)
        V9: (0, ±φ, ±1/φ)
        V10: (±1/φ, 0, ±φ)
        V11: (±φ, ±1/φ, 0)
        

    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.

    See less
      • 0
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
  9. Asked: June 17, 2025

    How can I view HEIC photos from my iPhone on a Windows computer?

    anonymous user
    Added an answer on June 17, 2025 at 2:14 pm

    To view HEIC photos on your Windows computer, you have a couple of options. First, you can install the HEIF Image Extensions available in the Microsoft Store, which allows Windows 10 and later versions to natively support HEIC files. Once the extension is installed, you should be able to double-clicRead more

    To view HEIC photos on your Windows computer, you have a couple of options. First, you can install the HEIF Image Extensions available in the Microsoft Store, which allows Windows 10 and later versions to natively support HEIC files. Once the extension is installed, you should be able to double-click your HEIC images and view them using the Photos app without any additional steps. If you prefer not to install extra software, another straightforward method is to convert your HEIC photos to JPEG or another widely compatible format. There are many online converters available, such as CloudConvert or HEIC to JPEG, which allow you to upload your HEIC files and download them as JPEGs without the headache of installation.

    If you’re considering a more streamlined approach for the future, changing your iPhone’s settings to save photos in JPEG format could save you some hassle. Go to Settings > Camera > Formats, and select “Most Compatible.” This way, your photos will be saved as JPEGs, which are more friendly for Windows users. However, keep in mind that JPEG files are larger and may result in reduced quality compared to HEIC. If you decide to stick with HEIC, just remember that the right tools can make it easy to view and share your memories. Happy sharing!

    See less
      • 0
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
  10. Asked: June 17, 2025

    How can I view HEIC photos from my iPhone on a Windows computer?

    anonymous user
    Added an answer on June 17, 2025 at 2:14 pm

    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
      • 0
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
1 2 3 … 5,381

Sidebar

Recent Answers

  1. anonymous user on How do games using Havok manage rollback netcode without corrupting internal state during save/load operations?
  2. anonymous user on How do games using Havok manage rollback netcode without corrupting internal state during save/load operations?
  3. anonymous user on How can I efficiently determine line of sight between points in various 3D grid geometries without surface intersection?
  4. anonymous user on How can I efficiently determine line of sight between points in various 3D grid geometries without surface intersection?
  5. anonymous user on How can I update the server about my hotbar changes in a FabricMC mod?
  • Home
  • Learn Something
  • Ask a Question
  • Answer Unanswered Questions
  • Privacy Policy
  • Terms & Conditions

© askthedev ❤️ All Rights Reserved

Explore

  • Ubuntu
  • Python
  • JavaScript
  • Linux
  • Git
  • Windows
  • HTML
  • SQL
  • AWS
  • Docker
  • Kubernetes