Netcode, self playtest, and planning
May 25, 2024 • 4 min
May 18 to may 25:
- May 18: Linux compilation, packets not received well by macOS, IDs are wrong and lengths, it's weird. Will fix: make a test taking some data exactly how I set it up hard coded and serialize on all platforms and compare each ones' bytes.
- May 19-21: new serialization impl. Seems to work well
- May 22: play test on my own (to prepare for school level design and DRL AI in it), undawata level and open area level difficulty and craziness reduced which is nice. Fixture hinges that are "isolated" (no joints connecting them to any other sides, excluding same-body sides which just differ in which fixture) can now be individually destroyed (currently they disappear; in the future they could spawn new bodies that are just that fixture and maybe even keep the shapeside the same, just update its fixture to point to a new body). This works well on the big fishing boat predator thing and on the spiral shape. The spiral shape has been improved slightly although it looks very blocky and for some reason all the box shapes are at a fixed angle instead of being 0 degrees or some multiple of 90 degrees which is what appears in the Lua file for the spiral shape (could be due to having the entire shape be one body and multiple fixtures, would need to improve this in Lua loader)
- May 23: multiple fixtures per side fixed for total mass calculation and mass collection. You can break apart circles' individual fixtures when the joint is disconnected only, and circles have sides with one out of possibly multiple fixtures which aren't included in the sides since each side has health shared among the entire body and its fixtures.
- To fix:
- Fishing boat becoming entire thing via motor refs (children and parents) to make underwater level more fun because you can collect mass inside the boat (make it destroy shapes better with the grinders)
- Magnet and map shape don't stay helpers, fix
- School level
- To fix:
- May 24: 0 mass sides less powerful slightly; line particle effects for tornado ability and knockback ability; fixed some firstBody crashes when circles remove their fixtures but other fixtures still exist and aren't referenced by any sides on that circle -- the fix puts other fixtures it finds in place of that one when a fixture is destroyed with ShapeSide::destroyFixture.
- Also fixed teleporting helper shapes so that they don't land in a position that puts you inside of them
- May 18-25 summary: New serialization impl but it's a bit buggy, still it's no longer buggy in terms of cross-platform interaction (previously it basically did no proper cross-platform communication at all and depended on release or debug builds making differences sometimes). Also the new serialization system should be more space efficient and theoretically makes more sense than the old one.
- Also I did a playtest myself, and I found and implemented several improvements to shape health determination, the spiral shape, shape destruction, level difficulty, and helper placement at the start of the level.
- What's going well and what needs work: level design, although I'm stuck on the school level mostly. Not sure exactly how the dark noform will "combat" the player, but he mostly just has to make nearby shapes attack the player. And decide when to steal player's helpers and head for the portal. Need to figure out if he will make the helpers follow him or make them into his own helpers by setting their targetShape to him if they have the helper action. Then he needs to realize he has to head for he portal at that point so maybe the AI reward can be that going closer the portal increases reward only after he took at least one helper (each helper increases large reward and each student shape has less reward than that).
- Future: train the DRL AI