Post Mortem
It took shorted than expected to implement the polygon cutting since the external libraries made implementation much easier. However, my implementation is currently very buggy and I still haven't made too much progress in identifying the at times system breaking bugs that result from trivial collisions. Furthermore, switching over from BlueJ to the Emacs JDE and switching from objectdraw to LibGDX took much longer than expected. I started the translation on Monday but only finished it up yesterday. This was rather unfortunate because I haven't been able to make any progress with simulating the engine physics, the constructor, and the cannon gameplay. Most of the LibGDX transfer time delays were due to major architectural/organization changes in addition to my complete unfamiliarity with the new graphic library.
What went wrong: As mentioned, transferring to LibGDX and the buggy polygon triangulation behavior.
What went well: The destructible polygon is kind of working.
What were the biggest surprises: Realizing that the months of coding that I spent on coding cuttable polygons had already been implemented. Another surprise was the difficulty with transferring code.
Development Time Breakdown
For the first week, I unfortunately lost two days since I hadn't discovered the utility of external code libraries at that point. For the remainder of the week, I imported Clipper, Poly2Tri and implemented methods that called their library routines.
For this week, I have focused solely on converting to LibGDX. However, I was able to rethink my code's organization and structure and began creating the basic class hierarchy for user objects etc.
What would I change: I wouldn't have started with BlueJ and I would have used the libraries sooner.
Next Game:
I'm not satisfied with the state of my game right now and still have multiple things I need to accomplish.
Firstly, I need to fix the buggy explosions which lead to system crashes. This is my main goal as of today up to completion.
Other issues I need to address are moving the explosion methods from the contact listener into the destructable polygons class. These polygons should take in a explosion class object and cut themselves based on the inserted polygon.
Secondly, I need to implement the engine system. I need to efficiently determine when a point is inside a polygon to determine if engine placement is valid (probably a box2d sensor object). Engines are a separate physical object apart from the destructible polygon, so I also need to detect that the engine is "wedged" inbetween a polygon before cutting that polygon to fit in engine. I also need to implement the underlying polygon representation of the engine, its destruction system, and most importantly, the force it exerts on the entire floating structure.
I then need to implement the cannon placement. Again, I'd use a box2d sensor object to test if a cannon can be placed at all. I then need to make the cannon clickable, probably by using a box2d sensor once again. While I need to do the cannon shooting/rotation, another main priority is to make cannons destructible, and to disable it once its underlying physical object has been destroyed. I'm thinking that its physical object will be several bodies attached by joints, and that once a joint breaks, the entire cannon becomes unusable.
No comments:
Post a Comment