Hello everyone, it's been a busy week and there's a new update for Embersol. I'm not really sure how much in detail to do these post so I guess I'll just hit the wavetops and if anyone wants me to go into more detail on something specific, maybe some sample code just let me know.
-Elliptical shields. The system before was just based on circular shields and collisions. It was about as simple tech as I could make it
for testing out networked collisions. Point to circle collisions are easy and cheap to check, all you need is a radius and shield angles
don't even play a part in it. I needed something more advanced for capital ships though so I figured this was a good time to update it.
Turned out not to be that bad. Just needed the equation for an ellipse and figure out some translations for the point to get it in the
ellipse's local space and bam you got yourself a blue pancake.
-Frigate capital ships. With the ellipse shields in place I was able to get started on those capital ships. Before that I went ahead and
refactored all the AI drone code to make it more extensible. Once that was done I was able to quickly setup assault drones, frigate class
drones, and bullet/missile turret drones. The turret drones can either be static or "locked" into place on another drone.
-Frigate debris. I didn't like the look of the frigate just disappearing once destroyed so I whipped something up in Gimp. The frigates
will now break up into 2 pieces and after about a minute they'll just fade away. I thought they came out pretty good
-Environment wall. While I was messing around with the ellipse shields I also added a rectangle mode to the damage object so I could have
bullet collisions with wall objects. With that in place and the network objects set up I just needed to create physics objects so ships
could actually be blocked by them. I use Box2d for the ship physics and its very easy to use. It's not really designed for networking but
since the collision model is pretty simple (ships can't collide with each other, only static geometry) I was able to hack something that
works, looks good and doesn't cost too much performance wise. I also added a collision listener so that missiles will detonate if they
happen to run into something.
-contracts now cross-squad. While in a queue for a contract mission you will be matched up with
people from other squads. I originally wanted just squad members to be able to play the story mission together but the article I linked in previously has me thinking otherwise now. One of the key points of the article is to prevent fragmentation so this is just one step in that direction.
-Missiles now shot by player. The reload rate is pretty high so have fun with it. The missiles will shoot straight and lock onto whatever is in front on them so you still have to aim. Since the launch of missiles in now clientside I added missile decoys. When you press the button to shoot a missile a graphical decoy is immediately created. Once the round trip time to the server comes back with the actual networked missile object, the decoy is seamlessly replaced by it.
-lots of tweaks and fixes
In other news guildwars2 is out for 50% off. I've been wanting to play this for awhile now but when it came out I didn't really have time for video games. polygon just gave it a glowing updated review and with the sale I figured I might as well pick it up. If anyone here plays let me know!