{"id":20,"date":"2005-09-30T11:08:00","date_gmt":"2005-09-30T01:08:00","guid":{"rendered":"http:\/\/www.doolwind.com\/blog\/?p=20"},"modified":"2005-09-30T11:08:00","modified_gmt":"2005-09-30T01:08:00","slug":"raknet-working","status":"publish","type":"post","link":"https:\/\/www.doolwind.com\/blog\/raknet-working\/","title":{"rendered":"RakNet-working"},"content":{"rendered":"<p>I had a couple of extra hours last night to code and decided it was time to start implementing the Network System for CIC using <a href=\"http:\/\/www.rakkarsoft.com\/\">RakNet<\/a>.  I&#8217;m pleased to say that RakNet is everything I had hoped it would be.  It took about 15 minutes to get my client and server implemented and connected to each other.  The tutorials are helpful and any problem I ran into I solved quite quickly.  The only substantial issue I had was my first message I passed was not working as I expected.  This was simply because I didn&#8217;t cast the enum of it&#8217;s type to a (uchar) and so it was taking 4 bytes rather than 1.<\/p>\n<p>I had spent a fair amount of time designing my network system and so far I&#8217;m happy with how well the implementation is going.  My two main goals for this system were:<\/p>\n<p>1) Centralize the creation of new events\/messages so that the networking system needs little if any changes<br \/>\n2) Make the reading and writing of packets use the exact same code to remove any problems with reading data differently to how it was written.<\/p>\n<p>My design meets both of these requirements nicely, once I&#8217;ve implemented the core system I&#8217;ll put up some diagrams and give a more in-depth explanation of how I accomplished this.  I am only using the lowest level parts of RakNet as I prefer having complete control over what&#8217;s being sent.  RakNet feels very similar to the socket wrapper I wrote for my last personal project which is why it feels so natural to use.<\/p>\n<p>I&#8217;ll keep you posted on how my progress with RakNet and my networking goes and will hopefully have the core system with CIC&#8217;s 3 events implemented by next week.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I had a couple of extra hours last night to code and decided it was time to start implementing the Network System for CIC using RakNet. I&#8217;m pleased to say that RakNet is everything I had hoped it would be. It took about 15 minutes to get my client and server implemented and connected to <a class=\"more-link\" href=\"https:\/\/www.doolwind.com\/blog\/raknet-working\/\">Read More<\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"enabled":false},"version":2}},"categories":[3],"tags":[],"class_list":["post-20","post","type-post","status-publish","format-standard","hentry","category-cic"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/pgEc5-k","_links":{"self":[{"href":"https:\/\/www.doolwind.com\/blog\/wp-json\/wp\/v2\/posts\/20","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.doolwind.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.doolwind.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.doolwind.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.doolwind.com\/blog\/wp-json\/wp\/v2\/comments?post=20"}],"version-history":[{"count":0,"href":"https:\/\/www.doolwind.com\/blog\/wp-json\/wp\/v2\/posts\/20\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.doolwind.com\/blog\/wp-json\/wp\/v2\/media?parent=20"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.doolwind.com\/blog\/wp-json\/wp\/v2\/categories?post=20"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.doolwind.com\/blog\/wp-json\/wp\/v2\/tags?post=20"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}