<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
 <channel>
  <atom:link href="https://smaugmuds.afkmods.com/index.php?a=rssfeed&amp;t=4320" rel="self" type="application/rss+xml" />
  <title>SmaugMuds - Topic: Game_loop</title>
  <link>https://smaugmuds.afkmods.com/index.php?a=rssfeed&amp;t=4320</link>
  <description>The largest Smaug community resource site. - </description>
  <language>en</language>
  <generator>SmaugMuds</generator>
  <ttl>60</ttl>
  <item>
   <title>Game_loop</title>
   <link>https://smaugmuds.afkmods.com/topic/gameloop-4320/&amp;p=20475#p20475</link>
   <description>Ah ok, I was doing that anyways, good to know about why that is. Just now learning C++ - I&#039;m a very hands on learner</description>
   <guid isPermaLink="true">https://smaugmuds.afkmods.com/topic/gameloop-4320/&amp;p=20475#p20475</guid>
   <pubDate>Sat, 27 Mar 2010 21:00:06 CDT</pubDate>
   <category>SWR FUSS</category>
   <author>nobody@example.com (Keirath)</author>
  </item>
  <item>
   <title>Game_loop</title>
   <link>https://smaugmuds.afkmods.com/topic/gameloop-4320/&amp;p=20473#p20473</link>
   <description>Make sure you use new and delete [i]before[/i] you add constructors and/or destructors. The reason is that new will cause a constructor to be called, but malloc() and similar C functions will not. The same goes for destructor. delete will call it, but free() will not.</description>
   <guid isPermaLink="true">https://smaugmuds.afkmods.com/topic/gameloop-4320/&amp;p=20473#p20473</guid>
   <pubDate>Sat, 27 Mar 2010 17:38:31 CDT</pubDate>
   <category>SWR FUSS</category>
   <author>nobody@example.com (Caius)</author>
  </item>
  <item>
   <title>Game_loop</title>
   <link>https://smaugmuds.afkmods.com/topic/gameloop-4320/&amp;p=20465#p20465</link>
   <description>Ah perfect, that&#039;s what i needed to know. I&#039;ve worked std::list into descriptor_data, time to write the constructors and destructor, and make everything new and delete.</description>
   <guid isPermaLink="true">https://smaugmuds.afkmods.com/topic/gameloop-4320/&amp;p=20465#p20465</guid>
   <pubDate>Sat, 27 Mar 2010 08:43:39 CDT</pubDate>
   <category>SWR FUSS</category>
   <author>nobody@example.com (Keirath)</author>
  </item>
  <item>
   <title>Game_loop</title>
   <link>https://smaugmuds.afkmods.com/topic/gameloop-4320/&amp;p=20462#p20462</link>
   <description>You can add any member functions to a struct, including constructors and a destructor. The [i]only[/i] difference between a class and a struct is that in a class all the members are private by default while in a struct all members are public by default.</description>
   <guid isPermaLink="true">https://smaugmuds.afkmods.com/topic/gameloop-4320/&amp;p=20462#p20462</guid>
   <pubDate>Fri, 26 Mar 2010 21:57:10 CDT</pubDate>
   <category>SWR FUSS</category>
   <author>nobody@example.com (Caius)</author>
  </item>
  <item>
   <title>Game_loop</title>
   <link>https://smaugmuds.afkmods.com/topic/gameloop-4320/&amp;p=20460#p20460</link>
   <description>Blah, bump I know, but I&#039;ve been working on this a bit lately. Can I drop a constructor and a destructor right into a struct? Or do I need to convert the struct to a class?</description>
   <guid isPermaLink="true">https://smaugmuds.afkmods.com/topic/gameloop-4320/&amp;p=20460#p20460</guid>
   <pubDate>Fri, 26 Mar 2010 13:39:31 CDT</pubDate>
   <category>SWR FUSS</category>
   <author>nobody@example.com (Keirath)</author>
  </item>
  <item>
   <title>Game_loop</title>
   <link>https://smaugmuds.afkmods.com/topic/gameloop-4320/&amp;p=20142#p20142</link>
   <description>[quote=Andril]There&#039;s nothing to stop you from accidentally calling something like &amp;quot;Socket mySock = new Socket;&amp;quot; right now, other than knowing in your head not to do it. That would probably also lead to Bad Things(tm) based on my, admittedly limited, knowledge because I didn&#039;t see anything to initialize stuff except inside the constructor you have that takes an int. [/quote] It would be &amp;quot;bad&amp;quot; but not really as bad. Consider what would happen if you have a Socket object that you pass [i]as a </description>
   <guid isPermaLink="true">https://smaugmuds.afkmods.com/topic/gameloop-4320/&amp;p=20142#p20142</guid>
   <pubDate>Sun, 14 Feb 2010 20:40:06 CST</pubDate>
   <category>SWR FUSS</category>
   <author>nobody@example.com (David Haley)</author>
  </item>
  <item>
   <title>Game_loop</title>
   <link>https://smaugmuds.afkmods.com/topic/gameloop-4320/&amp;p=20141#p20141</link>
   <description>I understand about the copy constructor. I can just see all sorts of fun stuff happening if you accidentally give something a copy of another Socket object. :) And you have a constructor that takes an int to initialize the m_Control member and set up the net stuff and I totally understand why that&#039;s public and not private. I was referring specifically to the default Socket::Socket() constructor that [b]doesn&#039;t[/b] take any arguments. There&#039;s nothing to stop you from accidentally calling somet</description>
   <guid isPermaLink="true">https://smaugmuds.afkmods.com/topic/gameloop-4320/&amp;p=20141#p20141</guid>
   <pubDate>Sun, 14 Feb 2010 16:02:52 CST</pubDate>
   <category>SWR FUSS</category>
   <author>nobody@example.com (Andril)</author>
  </item>
  <item>
   <title>Game_loop</title>
   <link>https://smaugmuds.afkmods.com/topic/gameloop-4320/&amp;p=20140#p20140</link>
   <description>David&#039;s absolutely right. the constructor is public so that anything can create a socket. But if you look at the code, the copy constructor is defined, but never implemented. It&#039;s defined and private so that I get an error on compile if something is trying to call it. Because the way I&#039;ve done the work so far, copying a Socket would lead to Bad Things(tm).</description>
   <guid isPermaLink="true">https://smaugmuds.afkmods.com/topic/gameloop-4320/&amp;p=20140#p20140</guid>
   <pubDate>Sun, 14 Feb 2010 11:30:09 CST</pubDate>
   <category>SWR FUSS</category>
   <author>nobody@example.com (InfiniteAxis)</author>
  </item>
  <item>
   <title>Game_loop</title>
   <link>https://smaugmuds.afkmods.com/topic/gameloop-4320/&amp;p=20139#p20139</link>
   <description>[quote=Andril]Was just looking over your Socket class stuff and I noticed that you don&#039;t have the default constructor, Socket::Socket(), tucked away in the class as private like you do the copy constructor and the one for taking another instance of a Socket as a reference. Was kind of curious as to why not. [/quote] He probably wants to allow everybody to construct Sockets, but wants to prevent people from copying them. This is a generally good thing because it would be kind of weird to have se</description>
   <guid isPermaLink="true">https://smaugmuds.afkmods.com/topic/gameloop-4320/&amp;p=20139#p20139</guid>
   <pubDate>Sat, 13 Feb 2010 21:49:08 CST</pubDate>
   <category>SWR FUSS</category>
   <author>nobody@example.com (David Haley)</author>
  </item>
  <item>
   <title>Game_loop</title>
   <link>https://smaugmuds.afkmods.com/topic/gameloop-4320/&amp;p=20133#p20133</link>
   <description>One thing I&#039;ve noticed for myself is that another problem with trying to convert stuff from a struct to a class is just trying to figure out what should go into it as a member of the class, especially with functions. For instance with characters and object usage, when a character gets or losses an object, should the class for characters do something to drop the object, like ch-&amp;gt;drop( obj ) where drop( &amp;amp;obj ) is a function in the character class that handles all the movement stuff, or should i</description>
   <guid isPermaLink="true">https://smaugmuds.afkmods.com/topic/gameloop-4320/&amp;p=20133#p20133</guid>
   <pubDate>Sat, 13 Feb 2010 12:21:29 CST</pubDate>
   <category>SWR FUSS</category>
   <author>nobody@example.com (Andril)</author>
  </item>
 </channel>
</rss>
