<?xml version="1.0"?>
<rss version="2.0">
	<channel>
		<title>Anyone made a small multiplayer (network) game?</title>
		<link>http://www.allegro.cc/forums/view/606958</link>
		<description>Allegro.cc Forum Thread</description>
		<webMaster>matthew@allegro.cc (Matthew Leverton)</webMaster>
		<lastBuildDate>Thu, 14 Apr 2011 21:01:19 +0000</lastBuildDate>
	</channel>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>I am going to add a multiplayer feature in my latest game but cannot find a good example of how to get any socket programming working with Winsock and Allegro 4 in Windows (MSVC).</p><p>Is there anyone who have made a small game or program and is willing to show it here or send it to me? Even better if it is (fairly) simple to understand and just shows what is needed to include, link to and basically how to code it to get it to work.</p><p>All help would make me go from <img src="http://www.allegro.cc/forums/smileys/cry.gif" alt=":&#39;(" /> to <img src="http://www.allegro.cc/forums/smileys/grin.gif" alt=";D" />
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (TeaRDoWN)</author>
		<pubDate>Thu, 07 Apr 2011 16:08:31 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>My advice would be to not use sockets directly but something like this: <a href="http://enet.bespin.org/">http://enet.bespin.org/</a></p><p>Sockets are not hard either, but using a wrapper like this simply saves you a few days of working out details already solved there.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Elias)</author>
		<pubDate>Thu, 07 Apr 2011 16:57:31 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Wow that library is incredible easy to build!!! It has a MSVC project file and a Code::Block project file... What you have to do is just open it and compile it... </p><p>It&#39;s incredible how ENet events are so similar to Allegro events. I also was looking for a networking library I think this is great.</p><p><b>Edit:</b> I have just found an example, I haven&#39;t read it but supposedly shows how to create a chat, (Using ENet)</p><div class="quote_container"><div class="title"><a href="http://www.mail-archive.com/enet-discuss@cubik.org/msg00635.html">www.mail-archive.com</a> said:</div><div class="quote"><p>

I was looking around for some example programs that use enet<br />but like others I couldn&#39;t find one. So I tried to make one myself.</p><p>This is a simple chat program. Multiple clients can join the server<br />and write messages. Messages will be received by all clients<br />(including the one that sent it).</p><p>Most of the code is a direct copy/paste from the enet tutorial. The<br />code is definitely not perfect but is suitable for a beginner to look<br />around in.</p></div></div><p>
server.cpp
</p><div class="source-code"><div class="toolbar"><span class="button numbers"><b>#</b></span><span class="button select">Select</span><span class="button expand">Expand</span></div><div class="inner"><span class="number">   1</span><span class="c">/* server.cpp */</span>
<span class="number">   2</span><span class="p">#include &lt;stdio.h&gt;</span>
<span class="number">   3</span><span class="p">#include &lt;enet/enet.h&gt;</span>
<span class="number">   4</span>
<span class="number">   5</span><span class="k1">int</span> main <span class="k2">(</span><span class="k1">int</span> argc, <span class="k1">char</span> <span class="k3">*</span>argv<span class="k2">[</span><span class="k2">]</span><span class="k2">)</span>
<span class="number">   6</span><span class="k2">{</span>
<span class="number">   7</span>   ENetAddress address<span class="k2">;</span>
<span class="number">   8</span>   ENetHost <span class="k3">*</span>server<span class="k2">;</span>
<span class="number">   9</span>   ENetEvent event<span class="k2">;</span>
<span class="number">  10</span>   <span class="k1">int</span> serviceResult<span class="k2">;</span>
<span class="number">  11</span>
<span class="number">  12</span>   <a href="http://www.delorie.com/djgpp/doc/libc/libc_631.html" target="_blank">puts</a> <span class="k2">(</span><span class="s">"Starting server"</span><span class="k2">)</span><span class="k2">;</span>
<span class="number">  13</span>
<span class="number">  14</span>   <span class="k1">if</span> <span class="k2">(</span>enet_initialize <span class="k2">(</span><span class="k2">)</span> <span class="k3">!</span><span class="k3">=</span> <span class="n">0</span><span class="k2">)</span>
<span class="number">  15</span>   <span class="k2">{</span>
<span class="number">  16</span>       <a href="http://www.delorie.com/djgpp/doc/libc/libc_631.html" target="_blank">puts</a> <span class="k2">(</span><span class="s">"Error initialising enet"</span><span class="k2">)</span><span class="k2">;</span>
<span class="number">  17</span>       <a href="http://www.delorie.com/djgpp/doc/libc/libc_298.html" target="_blank">exit</a> <span class="k2">(</span>EXIT_FAILURE<span class="k2">)</span><span class="k2">;</span>
<span class="number">  18</span>   <span class="k2">}</span>
<span class="number">  19</span>
<span class="number">  20</span>   <span class="c">/* Bind the server to the default localhost.     */</span>
<span class="number">  21</span>   <span class="c">/* A specific host address can be specified by   */</span>
<span class="number">  22</span>   <span class="c">/* enet_address_set_host (&amp; address, "x.x.x.x"); */</span>
<span class="number">  23</span>   address.host <span class="k3">=</span> ENET_HOST_ANY<span class="k2">;</span>
<span class="number">  24</span>   <span class="c">/* Bind the server to port 1234. */</span>
<span class="number">  25</span>   address.port <span class="k3">=</span> <span class="n">1234</span><span class="k2">;</span>
<span class="number">  26</span>
<span class="number">  27</span>   server <span class="k3">=</span> enet_host_create <span class="k2">(</span><span class="k3">&amp;</span>address,
<span class="number">  28</span>                             <span class="n">32</span>,   <span class="c">/* number of clients */</span>
<span class="number">  29</span>                             <span class="n">2</span>,    <span class="c">/* number of channels */</span>
<span class="number">  30</span>                             <span class="n">0</span>,    <span class="c">/* Any incoming bandwith */</span>
<span class="number">  31</span>                             <span class="n">0</span><span class="k2">)</span><span class="k2">;</span>   <span class="c">/* Any outgoing bandwith */</span>
<span class="number">  32</span>
<span class="number">  33</span>   <span class="k1">if</span> <span class="k2">(</span>server <span class="k3">=</span><span class="k3">=</span> NULL<span class="k2">)</span>
<span class="number">  34</span>   <span class="k2">{</span>
<span class="number">  35</span>       <a href="http://www.delorie.com/djgpp/doc/libc/libc_631.html" target="_blank">puts</a> <span class="k2">(</span><span class="s">"Could not create server host"</span><span class="k2">)</span><span class="k2">;</span>
<span class="number">  36</span>       <a href="http://www.delorie.com/djgpp/doc/libc/libc_298.html" target="_blank">exit</a> <span class="k2">(</span>EXIT_FAILURE<span class="k2">)</span><span class="k2">;</span>
<span class="number">  37</span>   <span class="k2">}</span>
<span class="number">  38</span>
<span class="number">  39</span>
<span class="number">  40</span>   <span class="k1">while</span> <span class="k2">(</span><span class="k1">true</span><span class="k2">)</span>
<span class="number">  41</span>   <span class="k2">{</span>
<span class="number">  42</span>       serviceResult <span class="k3">=</span> <span class="n">1</span><span class="k2">;</span>
<span class="number">  43</span>
<span class="number">  44</span>       <span class="c">/* Keep doing host_service until no events are left */</span>
<span class="number">  45</span>       <span class="k1">while</span> <span class="k2">(</span>serviceResult <span class="k3">&gt;</span> <span class="n">0</span><span class="k2">)</span>
<span class="number">  46</span>       <span class="k2">{</span>
<span class="number">  47</span>           <span class="c">/* Wait up to 1000 milliseconds for an event. */</span>
<span class="number">  48</span>           serviceResult <span class="k3">=</span> enet_host_service <span class="k2">(</span>server, <span class="k3">&amp;</span>event, <span class="n">1000</span><span class="k2">)</span><span class="k2">;</span>
<span class="number">  49</span>
<span class="number">  50</span>           <span class="k1">if</span> <span class="k2">(</span>serviceResult <span class="k3">&gt;</span> <span class="n">0</span><span class="k2">)</span>
<span class="number">  51</span>           <span class="k2">{</span>
<span class="number">  52</span>
<span class="number">  53</span>               <span class="k1">switch</span> <span class="k2">(</span>event.type<span class="k2">)</span>
<span class="number">  54</span>               <span class="k2">{</span>
<span class="number">  55</span>               <span class="k1">case</span> ENET_EVENT_TYPE_CONNECT:
<span class="number">  56</span>                   <a href="http://www.delorie.com/djgpp/doc/libc/libc_624.html" target="_blank">printf</a> <span class="k2">(</span><span class="s">"A new client connected from %x:%u.\n"</span>,
<span class="number">  57</span>                           event.peer <span class="k3">-</span><span class="k3">&gt;</span> address.host,
<span class="number">  58</span>                           event.peer <span class="k3">-</span><span class="k3">&gt;</span> address.port<span class="k2">)</span><span class="k2">;</span>
<span class="number">  59</span>
<span class="number">  60</span>                   <span class="c">/* Store any relevant client information here. */</span>
<span class="number">  61</span>                   event.peer-&gt;data <span class="k3">=</span> <span class="k2">(</span><span class="k1">void</span><span class="k3">*</span><span class="k2">)</span><span class="s">"Client information"</span><span class="k2">;</span>
<span class="number">  62</span>
<span class="number">  63</span>                   <span class="k1">break</span><span class="k2">;</span>
<span class="number">  64</span>
<span class="number">  65</span>               <span class="k1">case</span> ENET_EVENT_TYPE_RECEIVE:
<span class="number">  66</span>                   <a href="http://www.delorie.com/djgpp/doc/libc/libc_624.html" target="_blank">printf</a> <span class="k2">(</span><span class="s">"A packet of length %u containing '%s' was "</span>
<span class="number">  67</span>                           <span class="s">"received from %s on channel %u.\n"</span>,
<span class="number">  68</span>                           event.packet <span class="k3">-</span><span class="k3">&gt;</span> dataLength,
<span class="number">  69</span>                           event.packet <span class="k3">-</span><span class="k3">&gt;</span> data,
<span class="number">  70</span>                           event.peer <span class="k3">-</span><span class="k3">&gt;</span> data,
<span class="number">  71</span>                           event.channelID<span class="k2">)</span><span class="k2">;</span>
<span class="number">  72</span>
<span class="number">  73</span>                   <span class="c">/* Tell all clients about this message */</span>
<span class="number">  74</span>                   enet_host_broadcast <span class="k2">(</span>server, <span class="n">0</span>, event.packet<span class="k2">)</span><span class="k2">;</span>
<span class="number">  75</span>
<span class="number">  76</span>                   <span class="k1">break</span><span class="k2">;</span>
<span class="number">  77</span>
<span class="number">  78</span>               <span class="k1">case</span> ENET_EVENT_TYPE_DISCONNECT:
<span class="number">  79</span>                   <a href="http://www.delorie.com/djgpp/doc/libc/libc_624.html" target="_blank">printf</a> <span class="k2">(</span><span class="s">"%s disconected.\n"</span>, event.peer <span class="k3">-</span><span class="k3">&gt;</span> data<span class="k2">)</span><span class="k2">;</span>
<span class="number">  80</span>
<span class="number">  81</span>                   <span class="c">/* Reset the peer's client information. */</span>
<span class="number">  82</span>
<span class="number">  83</span>                   event.peer <span class="k3">-</span><span class="k3">&gt;</span> data <span class="k3">=</span> NULL<span class="k2">;</span>
<span class="number">  84</span>
<span class="number">  85</span>                   <span class="k1">break</span><span class="k2">;</span>               <span class="k2">}</span>
<span class="number">  86</span>           <span class="k2">}</span>
<span class="number">  87</span>           <span class="k1">else</span> <span class="k1">if</span> <span class="k2">(</span>serviceResult <span class="k3">&gt;</span> <span class="n">0</span><span class="k2">)</span>
<span class="number">  88</span>           <span class="k2">{</span>
<span class="number">  89</span>               <a href="http://www.delorie.com/djgpp/doc/libc/libc_631.html" target="_blank">puts</a> <span class="k2">(</span><span class="s">"Error with servicing the server"</span><span class="k2">)</span><span class="k2">;</span>
<span class="number">  90</span>               <a href="http://www.delorie.com/djgpp/doc/libc/libc_298.html" target="_blank">exit</a> <span class="k2">(</span>EXIT_FAILURE<span class="k2">)</span><span class="k2">;</span>
<span class="number">  91</span>           <span class="k2">}</span>
<span class="number">  92</span>       <span class="k2">}</span>
<span class="number">  93</span>
<span class="number">  94</span>   <span class="k2">}</span>
<span class="number">  95</span>
<span class="number">  96</span>   enet_host_destroy <span class="k2">(</span>server<span class="k2">)</span><span class="k2">;</span>
<span class="number">  97</span>   enet_deinitialize <span class="k2">(</span><span class="k2">)</span><span class="k2">;</span>
<span class="number">  98</span>
<span class="number">  99</span>   <span class="k1">return</span> <span class="n">0</span><span class="k2">;</span>
<span class="number"> 100</span>
<span class="number"> 101</span> <span class="k2">}</span>
</div></div><p>
client.cpp
</p><div class="source-code"><div class="toolbar"><span class="button numbers"><b>#</b></span><span class="button select">Select</span><span class="button expand">Expand</span></div><div class="inner"><span class="number">   1</span>
<span class="number">   2</span> <span class="c">/* client.cpp */</span>
<span class="number">   3</span> <span class="p">#include &lt;stdio.h&gt;</span>
<span class="number">   4</span> <span class="p">#include &lt;string.h&gt;</span>
<span class="number">   5</span> <span class="p">#include &lt;enet/enet.h&gt;</span>
<span class="number">   6</span>
<span class="number">   7</span>
<span class="number">   8</span> <span class="k1">int</span> main <span class="k2">(</span><span class="k1">int</span> argc, <span class="k1">char</span><span class="k3">*</span> argv<span class="k2">[</span><span class="k2">]</span><span class="k2">)</span> <span class="k2">{</span>
<span class="number">   9</span>   ENetHost <span class="k3">*</span>client<span class="k2">;</span>
<span class="number">  10</span>   ENetAddress address<span class="k2">;</span>
<span class="number">  11</span>   ENetPeer <span class="k3">*</span>peer<span class="k2">;</span>
<span class="number">  12</span>   ENetEvent event<span class="k2">;</span>
<span class="number">  13</span>   <span class="k1">char</span> message<span class="k2">[</span><span class="n">1024</span><span class="k2">]</span><span class="k2">;</span>
<span class="number">  14</span>   <span class="k1">int</span> serviceResult<span class="k2">;</span>
<span class="number">  15</span>
<span class="number">  16</span>   <a href="http://www.delorie.com/djgpp/doc/libc/libc_631.html" target="_blank">puts</a> <span class="k2">(</span><span class="s">"Starting client"</span><span class="k2">)</span><span class="k2">;</span>
<span class="number">  17</span>
<span class="number">  18</span>   <span class="k1">if</span> <span class="k2">(</span>enet_initialize <span class="k2">(</span><span class="k2">)</span> <span class="k3">!</span><span class="k3">=</span> <span class="n">0</span><span class="k2">)</span> <span class="k2">{</span>
<span class="number">  19</span>       <a href="http://www.delorie.com/djgpp/doc/libc/libc_345.html" target="_blank">fprintf</a> <span class="k2">(</span>stderr, <span class="s">"Error initialising enet"</span><span class="k2">)</span><span class="k2">;</span>
<span class="number">  20</span>       <a href="http://www.delorie.com/djgpp/doc/libc/libc_298.html" target="_blank">exit</a> <span class="k2">(</span>EXIT_FAILURE<span class="k2">)</span><span class="k2">;</span>
<span class="number">  21</span>   <span class="k2">}</span>
<span class="number">  22</span>
<span class="number">  23</span>   client <span class="k3">=</span> enet_host_create <span class="k2">(</span>NULL, <span class="c">/* create a client host */</span>
<span class="number">  24</span>                              <span class="n">1</span>,    <span class="c">/* number of clients */</span>
<span class="number">  25</span>                              <span class="n">2</span>,    <span class="c">/* number of channels */</span>
<span class="number">  26</span>                              <span class="n">57600</span> <span class="k3">/</span> <span class="n">8</span>,    <span class="c">/* incoming bandwith */</span>
<span class="number">  27</span>                              <span class="n">14400</span> <span class="k3">/</span> <span class="n">8</span><span class="k2">)</span><span class="k2">;</span>   <span class="c">/* outgoing bandwith */</span>
<span class="number">  28</span>
<span class="number">  29</span>   <span class="k1">if</span> <span class="k2">(</span>client <span class="k3">=</span><span class="k3">=</span> NULL<span class="k2">)</span> <span class="k2">{</span>
<span class="number">  30</span>      <a href="http://www.delorie.com/djgpp/doc/libc/libc_345.html" target="_blank">fprintf</a> <span class="k2">(</span>stderr, <span class="s">"Could not create client host"</span><span class="k2">)</span><span class="k2">;</span>
<span class="number">  31</span>       <a href="http://www.delorie.com/djgpp/doc/libc/libc_298.html" target="_blank">exit</a> <span class="k2">(</span>EXIT_FAILURE<span class="k2">)</span><span class="k2">;</span>
<span class="number">  32</span>   <span class="k2">}</span>
<span class="number">  33</span>
<span class="number">  34</span>
<span class="number">  35</span>   enet_address_set_host <span class="k2">(</span><span class="k3">&amp;</span>address, <span class="s">"localhost"</span><span class="k2">)</span><span class="k2">;</span>
<span class="number">  36</span>   address.port <span class="k3">=</span> <span class="n">1234</span><span class="k2">;</span>
<span class="number">  37</span>
<span class="number">  38</span>   peer <span class="k3">=</span> enet_host_connect <span class="k2">(</span>client,
<span class="number">  39</span>                             <span class="k3">&amp;</span>address,    <span class="c">/* address to connect to */</span>
<span class="number">  40</span>                             <span class="n">2</span>,           <span class="c">/* number of channels */</span>
<span class="number">  41</span>                             <span class="n">0</span><span class="k2">)</span><span class="k2">;</span>          <span class="c">/* user data supplied to</span>
<span class="number">  42</span><span class="c">                                             the receiving host */</span>
<span class="number">  43</span>
<span class="number">  44</span>   <span class="k1">if</span> <span class="k2">(</span>peer <span class="k3">=</span><span class="k3">=</span> NULL<span class="k2">)</span> <span class="k2">{</span>
<span class="number">  45</span>       <a href="http://www.delorie.com/djgpp/doc/libc/libc_345.html" target="_blank">fprintf</a> <span class="k2">(</span>stderr, <span class="s">"No available peers for initiating an ENet "</span>
<span class="number">  46</span>                <span class="s">"connection.\n"</span><span class="k2">)</span><span class="k2">;</span>
<span class="number">  47</span>       <a href="http://www.delorie.com/djgpp/doc/libc/libc_298.html" target="_blank">exit</a> <span class="k2">(</span>EXIT_FAILURE<span class="k2">)</span><span class="k2">;</span>
<span class="number">  48</span>   <span class="k2">}</span>
<span class="number">  49</span>
<span class="number">  50</span>
<span class="number">  51</span>   <span class="c">/* Try to connect to server within 5 seconds */</span>
<span class="number">  52</span>   <span class="k1">if</span> <span class="k2">(</span>enet_host_service <span class="k2">(</span>client, <span class="k3">&amp;</span>event, <span class="n">5000</span><span class="k2">)</span> <span class="k3">&gt;</span> <span class="n">0</span> <span class="k3">&amp;</span><span class="k3">&amp;</span>
<span class="number">  53</span>       event.type <span class="k3">=</span><span class="k3">=</span> ENET_EVENT_TYPE_CONNECT<span class="k2">)</span>
<span class="number">  54</span>   <span class="k2">{</span>
<span class="number">  55</span>       <a href="http://www.delorie.com/djgpp/doc/libc/libc_631.html" target="_blank">puts</a> <span class="k2">(</span><span class="s">"Connection to server succeeded."</span><span class="k2">)</span><span class="k2">;</span>
<span class="number">  56</span>   <span class="k2">}</span>
<span class="number">  57</span>   <span class="k1">else</span>
<span class="number">  58</span>   <span class="k2">{</span>
<span class="number">  59</span>       <span class="c">/* Either the 5 seconds are up or a disconnect event was */</span>
<span class="number">  60</span>       <span class="c">/* received. Reset the peer in the event the 5 seconds   */</span>
<span class="number">  61</span>       <span class="c">/* had run out without any significant event.            */</span>
<span class="number">  62</span>       enet_peer_reset <span class="k2">(</span>peer<span class="k2">)</span><span class="k2">;</span>
<span class="number">  63</span>
<span class="number">  64</span>       <a href="http://www.delorie.com/djgpp/doc/libc/libc_345.html" target="_blank">fprintf</a> <span class="k2">(</span>stderr, <span class="s">"Connection to server failed."</span><span class="k2">)</span><span class="k2">;</span>
<span class="number">  65</span>       <a href="http://www.delorie.com/djgpp/doc/libc/libc_298.html" target="_blank">exit</a> <span class="k2">(</span>EXIT_FAILURE<span class="k2">)</span><span class="k2">;</span>
<span class="number">  66</span>   <span class="k2">}</span>
<span class="number">  67</span>
<span class="number">  68</span>   <span class="k1">while</span> <span class="k2">(</span><span class="k1">true</span><span class="k2">)</span>
<span class="number">  69</span>   <span class="k2">{</span>
<span class="number">  70</span>       serviceResult <span class="k3">=</span> <span class="n">1</span><span class="k2">;</span>
<span class="number">  71</span>
<span class="number">  72</span>       <span class="c">/* Keep doing host_service until no events are left */</span>
<span class="number">  73</span>       <span class="k1">while</span> <span class="k2">(</span>serviceResult <span class="k3">&gt;</span> <span class="n">0</span><span class="k2">)</span>
<span class="number">  74</span>       <span class="k2">{</span>
<span class="number">  75</span>           serviceResult <span class="k3">=</span> enet_host_service <span class="k2">(</span>client, <span class="k3">&amp;</span>event, <span class="n">0</span><span class="k2">)</span><span class="k2">;</span>
<span class="number">  76</span>
<span class="number">  77</span>           <span class="k1">if</span> <span class="k2">(</span>serviceResult <span class="k3">&gt;</span> <span class="n">0</span><span class="k2">)</span>
<span class="number">  78</span>           <span class="k2">{</span>
<span class="number">  79</span>               <span class="k1">switch</span> <span class="k2">(</span>event.type<span class="k2">)</span>
<span class="number">  80</span>               <span class="k2">{</span>
<span class="number">  81</span>               <span class="k1">case</span> ENET_EVENT_TYPE_CONNECT:
<span class="number">  82</span>                   <a href="http://www.delorie.com/djgpp/doc/libc/libc_624.html" target="_blank">printf</a> <span class="k2">(</span><span class="s">"A new client connected from %x:%u.\n"</span>,
<span class="number">  83</span>                           event.peer <span class="k3">-</span><span class="k3">&gt;</span> address.host,
<span class="number">  84</span>                           event.peer <span class="k3">-</span><span class="k3">&gt;</span> address.port<span class="k2">)</span><span class="k2">;</span>
<span class="number">  85</span>
<span class="number">  86</span>                   event.peer-&gt;data <span class="k3">=</span> <span class="k2">(</span><span class="k1">void</span><span class="k3">*</span><span class="k2">)</span><span class="s">"New User"</span><span class="k2">;</span>
<span class="number">  87</span>                   <span class="k1">break</span><span class="k2">;</span>
<span class="number">  88</span>
<span class="number">  89</span>               <span class="k1">case</span> ENET_EVENT_TYPE_RECEIVE:
<span class="number">  90</span>                   <a href="http://www.delorie.com/djgpp/doc/libc/libc_624.html" target="_blank">printf</a> <span class="k2">(</span><span class="s">"A packet of length %u containing '%s' was "</span>
<span class="number">  91</span>                           <span class="s">"received from %s on channel %u.\n"</span>,
<span class="number">  92</span>                           event.packet <span class="k3">-</span><span class="k3">&gt;</span> dataLength,
<span class="number">  93</span>                           event.packet <span class="k3">-</span><span class="k3">&gt;</span> data,
<span class="number">  94</span>                           event.peer <span class="k3">-</span><span class="k3">&gt;</span> data,
<span class="number">  95</span>                           event.channelID<span class="k2">)</span><span class="k2">;</span>
<span class="number">  96</span>
<span class="number">  97</span>                   <span class="c">/* Clean up the packet now that we're done using it. */</span>
<span class="number">  98</span>                   enet_packet_destroy <span class="k2">(</span>event.packet<span class="k2">)</span><span class="k2">;</span>
<span class="number">  99</span>
<span class="number"> 100</span>                   <span class="k1">break</span><span class="k2">;</span>
<span class="number"> 101</span>
<span class="number"> 102</span>               <span class="k1">case</span> ENET_EVENT_TYPE_DISCONNECT:
<span class="number"> 103</span>                   <a href="http://www.delorie.com/djgpp/doc/libc/libc_624.html" target="_blank">printf</a> <span class="k2">(</span><span class="s">"%s disconected.\n"</span>, event.peer <span class="k3">-</span><span class="k3">&gt;</span> data<span class="k2">)</span><span class="k2">;</span>
<span class="number"> 104</span>
<span class="number"> 105</span>                   <span class="k1">break</span><span class="k2">;</span>
<span class="number"> 106</span>               <span class="k2">}</span>
<span class="number"> 107</span>           <span class="k2">}</span>
<span class="number"> 108</span>           <span class="k1">else</span> <span class="k1">if</span> <span class="k2">(</span>serviceResult <span class="k3">&gt;</span> <span class="n">0</span><span class="k2">)</span>
<span class="number"> 109</span>           <span class="k2">{</span>
<span class="number"> 110</span>               <a href="http://www.delorie.com/djgpp/doc/libc/libc_631.html" target="_blank">puts</a> <span class="k2">(</span><span class="s">"Error with servicing the client"</span><span class="k2">)</span><span class="k2">;</span>
<span class="number"> 111</span>               <a href="http://www.delorie.com/djgpp/doc/libc/libc_298.html" target="_blank">exit</a> <span class="k2">(</span>EXIT_FAILURE<span class="k2">)</span><span class="k2">;</span>
<span class="number"> 112</span>           <span class="k2">}</span>
<span class="number"> 113</span>
<span class="number"> 114</span>       <span class="k2">}</span>
<span class="number"> 115</span>
<span class="number"> 116</span>       <a href="http://www.delorie.com/djgpp/doc/libc/libc_624.html" target="_blank">printf</a> <span class="k2">(</span><span class="s">"Say&gt; "</span><span class="k2">)</span><span class="k2">;</span>
<span class="number"> 117</span>       <a href="http://www.delorie.com/djgpp/doc/libc/libc_417.html" target="_blank">gets</a> <span class="k2">(</span>message<span class="k2">)</span><span class="k2">;</span>
<span class="number"> 118</span>
<span class="number"> 119</span>       <span class="k1">if</span> <span class="k2">(</span><a href="http://www.delorie.com/djgpp/doc/libc/libc_754.html" target="_blank">strcmp</a> <span class="k2">(</span>message, <span class="s">"exit"</span><span class="k2">)</span> <span class="k3">=</span><span class="k3">=</span> <span class="n">0</span> <span class="k3">|</span><span class="k3">|</span>
<span class="number"> 120</span>           <a href="http://www.delorie.com/djgpp/doc/libc/libc_754.html" target="_blank">strcmp</a> <span class="k2">(</span>message, <span class="s">"quit"</span><span class="k2">)</span> <span class="k3">=</span><span class="k3">=</span> <span class="n">0</span><span class="k2">)</span> <span class="k2">{</span>
<span class="number"> 121</span>           <span class="k1">break</span><span class="k2">;</span>
<span class="number"> 122</span>       <span class="k2">}</span>
<span class="number"> 123</span>
<span class="number"> 124</span>       <span class="k1">if</span><span class="k2">(</span><a href="http://www.delorie.com/djgpp/doc/libc/libc_764.html" target="_blank">strlen</a><span class="k2">(</span>message<span class="k2">)</span> <span class="k3">&gt;</span> <span class="n">0</span><span class="k2">)</span> <span class="k2">{</span>
<span class="number"> 125</span>           ENetPacket <span class="k3">*</span>packet <span class="k3">=</span> enet_packet_create <span class="k2">(</span>message, <a href="http://www.delorie.com/djgpp/doc/libc/libc_764.html" target="_blank">strlen</a>
<span class="number"> 126</span>           <span class="k2">(</span>message<span class="k2">)</span> <span class="k3">+</span> <span class="n">1</span>, ENET_PACKET_FLAG_RELIABLE<span class="k2">)</span><span class="k2">;</span>
<span class="number"> 127</span>           enet_peer_send <span class="k2">(</span>peer, <span class="n">0</span>, packet<span class="k2">)</span><span class="k2">;</span>
<span class="number"> 128</span>       <span class="k2">}</span>
<span class="number"> 129</span>
<span class="number"> 130</span>   <span class="k2">}</span>
<span class="number"> 131</span>
<span class="number"> 132</span>   enet_peer_disconnect <span class="k2">(</span>peer, <span class="n">0</span><span class="k2">)</span><span class="k2">;</span>
<span class="number"> 133</span>
<span class="number"> 134</span>   <span class="c">/* Allow up to 3 seconds for the disconnect to succeed */</span>
<span class="number"> 135</span>   <span class="c">/* and drop any packets received packets */</span>
<span class="number"> 136</span>   <span class="k1">while</span> <span class="k2">(</span>enet_host_service <span class="k2">(</span>client, <span class="k3">&amp;</span> event, <span class="n">3000</span><span class="k2">)</span> <span class="k3">&gt;</span> <span class="n">0</span><span class="k2">)</span>
<span class="number"> 137</span>   <span class="k2">{</span>
<span class="number"> 138</span>
<span class="number"> 139</span>       <span class="k1">switch</span> <span class="k2">(</span>event.type<span class="k2">)</span>
<span class="number"> 140</span>      <span class="k2">{</span>
<span class="number"> 141</span>       <span class="k1">case</span> ENET_EVENT_TYPE_RECEIVE:
<span class="number"> 142</span>           enet_packet_destroy <span class="k2">(</span>event.packet<span class="k2">)</span><span class="k2">;</span>
<span class="number"> 143</span>           <span class="k1">break</span><span class="k2">;</span>
<span class="number"> 144</span>
<span class="number"> 145</span>       <span class="k1">case</span> ENET_EVENT_TYPE_DISCONNECT:
<span class="number"> 146</span>           <a href="http://www.delorie.com/djgpp/doc/libc/libc_631.html" target="_blank">puts</a> <span class="k2">(</span><span class="s">"Disconnection succeeded."</span><span class="k2">)</span><span class="k2">;</span>
<span class="number"> 147</span>           <span class="k1">break</span><span class="k2">;</span>
<span class="number"> 148</span>       <span class="k2">}</span>
<span class="number"> 149</span>   <span class="k2">}</span>
<span class="number"> 150</span>
<span class="number"> 151</span>
<span class="number"> 152</span>   enet_host_destroy <span class="k2">(</span>client<span class="k2">)</span><span class="k2">;</span>
<span class="number"> 153</span>   enet_deinitialize <span class="k2">(</span><span class="k2">)</span><span class="k2">;</span>
<span class="number"> 154</span>
<span class="number"> 155</span>   <span class="k1">return</span> <span class="n">0</span><span class="k2">;</span>
<span class="number"> 156</span><span class="k2">}</span>
</div></div><p>
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (AMCerasoli)</author>
		<pubDate>Thu, 07 Apr 2011 20:34:03 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Thanks! I&#39;ll check it out as soon as I have more time. Hopefully it works without any issues &quot;straight out of the box&quot;. <img src="http://www.allegro.cc/forums/smileys/smiley.gif" alt=":)" />
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (TeaRDoWN)</author>
		<pubDate>Fri, 08 Apr 2011 00:24:33 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>I wrote a simple sockets program recently. The program can act as either a server or a client:</p><pre class="terminal scroll">[bamccaig@krypton sockets]$ ./a.out --help
  ./a.out { -h | --help }
  ./a.out [ -H | --host=HOST ] [ -P | --port=PORT ]
          [ -s | --server ] [ -v | --verbose ]

    -h, --help
            Show this message.

    -H, --host=HOST
            Specify the host. This can be either an IP address (IPv4 or
            IPv6) or a domain name. For the client, this is the server
            to connect to. For the server, this is the interface to
            bind to.

    -P, --port=PORT
            This is the port to connect (client) or bind (server) to.

    -s, --server
            Specifies to act as a server (bind and listen). The
            default behavior is to act as a client (connect).

    -v, --verbose
            Be verbose.

[bamccaig@krypton sockets]$ </pre><p>

</p><h4>Server</h4><p>

</p><pre class="terminal">[bamccaig@krypton sockets]$ ./a.out --host=127.0.0.1 --port=1337 --server
Binding to &#39;127.0.0.1&#39; on port 1337...
client &#39;127.0.0.1&#39; connected...
client (127.0.0.1): This was a triumph.
client (127.0.0.1): I&#39;m making a note here. HUGE SUCESS.
server: client &#39;127.0.0.1&#39; closed connection.
^C
[bamccaig@krypton sockets]$ </pre><p>

</p><h4>Client</h4><p>

</p><pre class="terminal">[bamccaig@krypton sockets]$ ./a.out --host=127.0.0.1 --port=1337
Connecting to host &#39;127.0.0.1&#39; on port &#39;1337&#39;...
&gt; This was a triumph.
server (127.0.0.1): OK.
&gt; I&#39;m making a note here. HUGE SUCESS.
server (127.0.0.1): OK.
&gt; quit
[bamccaig@krypton sockets]$ </pre><p>

It doesn&#39;t do a whole lot yet, but it might help to get an idea for how sockets work. Currently the server always responds with <span class="source-code"><span class="s">"OK."</span></span> and the &quot;protocol&quot; expects the client to talk, then the server to talk, back and forth (i.e., it&#39;s single-threaded, except for the server forking for client connections, with blocking sockets).</p><p>The code won&#39;t run in Windows though. Most of the socket programming should (with some preprocessor workarounds), but <span class="source-code"><a href="http://www.delorie.com/djgpp/doc/libc/libc_338.html" target="_blank">fork</a></span> certainly will not. <img src="http://www.allegro.cc/forums/smileys/tongue.gif" alt=":P" /> It might run in Cygwin though, but no promises.</p><p>The best way to learn socket programming is <a href="http://beej.us/guide/bgnet/">Beej&#39;s Guide to Network Programming</a>. That&#39;s how I learned (both times). <img src="http://www.allegro.cc/forums/smileys/smiley.gif" alt=":)" /> The basic order of things for a client is:</p><ol><li><p>Convert user-friendly address string and port to address data structure.
</p></li><li><p>Create socket.
</p></li><li><p>Connect to server using socket and address structure.
</p></li><li><p>Send and receive data.</p></li></ol><p>The basic order of things for a server is:</p><ol><li><p>Convert user-friendly address and port to address data structure.
</p></li><li><p>Create socket.
</p></li><li><p>Bind to address using socket and address structure (technically a client can bind before they connect if they want a specific interface and port, but if they don&#39;t bind then connecting will bind for them).
</p></li><li><p>Listen for incoming connections.
</p></li><li><p>Accept incoming connection.
</p></li><li><p>Send and receive data.</p></li></ol><p>If you use blocking sockets then you basically need threads to enable the server to handle multiple clients (and listen for more) and, if desired, for the client also, to send and receive simultaneously. If you use non-blocking sockets (which are a bit more work to setup) then you check instead whether there are new connections, whether there&#39;s data to send or receive, etc. No guarantee that it&#39;ll be useful to you, but <a href="http://www.allegro.cc/files/attachment/603871">here</a> it is anyway. Again, it won&#39;t build in Windows (except for maybe Cygwin) so don&#39;t even try to build it. <img src="http://www.allegro.cc/forums/smileys/tongue.gif" alt=":P" />
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (bamccaig)</author>
		<pubDate>Fri, 08 Apr 2011 00:55:42 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>--- ENet ---<br />Yes, I just compile it and it works fine.</p><p>I have just edited the code above, because I miss a &quot;}&quot; at the end. I took that example from those e-mail list with a bunch of &lt;&lt;&lt;&lt;&lt; all over the place.</p><p>link to &quot;libenet.a&quot; if you did a static library or .dll depending. Also remember to link to &quot;ws2_32.lib&quot; and &quot;winmm.lib&quot; and include the &quot;include&quot; folder in your &quot;search directory&quot; and yes works straight out of the box.</p><p><a href="http://www.allegro.cc/files/attachment/603870">Here </a>it&#39;s... I think is better than Windows Messenger (just because I compile it) <img src="http://www.allegro.cc/forums/smileys/grin.gif" alt=";D" />
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (AMCerasoli)</author>
		<pubDate>Fri, 08 Apr 2011 00:55:45 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p><a href="http://gafferongames.com/networking-for-game-programmers/what-every-programmer-needs-to-know-about-game-networking/">What every programmer needs to know about game networking</a>.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (decepto)</author>
		<pubDate>Fri, 08 Apr 2011 10:26:47 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title"><a href="http://www.allegro.cc/forums/thread/606958/912325#target">TeaRDoWN</a> said:</div><div class="quote"><p>
Is there anyone who have made a small game or program and is willing to show it here or send it to me?
</p></div></div><p>
Ah man, you&#39;ve brought me back.</p><p><a href="http://www.allegro.cc/forums/thread/600909">http://www.allegro.cc/forums/thread/600909</a></p><p>It&#39;s almost been 2 years since I built that.  Mm.... when is the next speedhack?</p><p>Oo, I should port this to the iPhone...
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (ImLeftFooted)</author>
		<pubDate>Fri, 08 Apr 2011 19:52:35 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Wow decepto you have just posted a gold mine there...</p><p>One of those gold mines I read say this:</p><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>

Lets look at the properties of each:</p><p>TCP:</p><p>Connection based<br />Guaranteed reliable and ordered<br />Automatically breaks up your data into packets for you<br />Makes sure it doesn’t send data too fast for the internet connection to handle (flow control)<br />Easy to use, you just read and write data like its a file</p><p>UDP:</p><p>No concept of connection, you have to code this yourself<br />No guarantee of reliability or ordering of packets, they may arrive out of order, be duplicated, or not arrive at all!<br />You have to manually break your data up into packets and send them<br />You have to make sure you don’t send data too fast for your internet connection to handle<br />If a packet is lost, you need to devise some way to detect this, and resend that data if necessary<br />The decision seems pretty clear then, TCP does everything we want and its super easy to use, while UDP is a huge pain in the <span class="cuss"><span>ass</span></span> and we have to code everything ourselves from scratch. So obviously we just use TCP right?</p><p>Wrong.</p><p>Using TCP is the worst possible mistake you can make when developing a networked game! To understand why, you need to see what TCP is actually doing above IP to make everything look so simple!</p></div></div><p>

And I just wanted mention that ENet (UDP) handle most of those things for you!.</p><p>@Dustin: Do you need a dedicated server to run your sever game? because I see still working...
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (AMCerasoli)</author>
		<pubDate>Fri, 08 Apr 2011 20:11:58 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title"><a href="http://www.allegro.cc/forums/thread/606958/912468#target">AMCERASOLI</a> said:</div><div class="quote"><p>
@Dustin: Do you need a dedicated server to run your sever game? because I see still working...
</p></div></div><p>
Yeah and the server is still up.  Every so often it emails me an error.  Kind of cool to know people are still playing it.</p><p>Update: <a href="http://momeme.com/traingame/">http://momeme.com/traingame/</a>
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (ImLeftFooted)</author>
		<pubDate>Fri, 08 Apr 2011 21:24:21 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Hahahahahahaha so you&#39;re happy knowing people are getting errors from your game??</p><p>What company are you using? isn&#39;t that expensive or you have it for other purposes too.</p><p>I read somewhere that RakNet allows you to do some networking even if you don&#39;t have a dedicated server. I think I saw it in the video tutorial that is in their webpage. How can it be?. Something like reading and writing files?</p><p>PS: Did you know that your game has a lot of potential? but it&#39;s screaming for graphics. I&#39;ll download the update.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (AMCerasoli)</author>
		<pubDate>Fri, 08 Apr 2011 22:04:06 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>You can do peer to peer connections -- but that&#39;s lame.</p><p>I use fluid hosting and pay $52/mo for a VPS with 4 ip addresses.</p><p>I run a bunch of domains out of it.  Here&#39;s the list (although some are no longer active):<br /><img src="http://www.allegro.cc//djungxnpq2nug.cloudfront.net/image/cache/1/3/1368e1cbfde0ff1be4926e5cf2e3e746.png" alt="Screen_shot_2011-04-08_at_6.06.14_PM.png" width="146" height="516" /></p><p>Here&#39;s how many resources I get for that price:<br /><img src="http://www.allegro.cc//djungxnpq2nug.cloudfront.net/image/cache/c/9/c9cf3c4555c8099e755dd3b814f9e3c7.png" alt="Screen_shot_2011-04-08_at_6.07.04_PM.png" width="191" height="248" /></p><p>I can upgrade my resources a lot more before needing to move onto something more serious.</p><div class="quote_container"><div class="title"><a href="http://www.allegro.cc/forums/thread/606958/912481#target">AMCERASOLI</a> said:</div><div class="quote"><p>
Hahahahahahaha so you&#39;re happy knowing people are getting errors from your game??
</p></div></div><p>
I made the game in 72 hours, I&#39;m fine with it having glitches.</p><p>Update: There are cheaper places than Fluid Hosting but I stay here because their uptime is good.  I went through 4 cheaper ones that were too unstable.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (ImLeftFooted)</author>
		<pubDate>Fri, 08 Apr 2011 22:08:41 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Oh I see... And if I want to use my own computer as a game server? I have a dynamic IP so isn&#39;t possible, at least I use something like no-ip.com, but they give me a url non an IP numer...
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (AMCerasoli)</author>
		<pubDate>Fri, 08 Apr 2011 22:51:02 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Yeah no-ip works.</p><p>You&#39;ll have to worry about your router settings then.  I would turn on the DMZ (De-Militarized Zone) on your router and set your computer&#39;s local ip as the DMZ destination.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (ImLeftFooted)</author>
		<pubDate>Fri, 08 Apr 2011 22:55:10 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>I always wonder what can I do with a Dedicated Server (besides having a webpage or a game server)... For example can I install a 3D render program an let it doing rendering processes all the time?</p><p>Or they won&#39;t allow me to do that?</p><p>PS: I thought that that link was an update for the game <img src="http://www.allegro.cc/forums/smileys/cry.gif" alt=":&#39;(" />
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (AMCerasoli)</author>
		<pubDate>Fri, 08 Apr 2011 23:37:57 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Enet looks like  quake 2  server/client broadcasting
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (ryonagana)</author>
		<pubDate>Mon, 11 Apr 2011 20:11:29 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>AMCERASOLI: You can pretty well do anything legal with a dedicated server, but using it for 3D rendering would probably not pan out very well. With a VPS you get a set allotment of processing time. Places like Slicehost will allow you to use any &quot;spare&quot; CPU time that nobody else is using.</p><p>I run a simple web server with Slicehost. I like their setup a lot. It isn&#39;t super cheap, and the performance of my 256MB slice isn&#39;t super awesome, but it has been extremely reliable and consistent. In the last ~18 months there&#39;s been one hardware failure at 3am which was fixed by 4am and I received about 4 status updates via email informing me of the progress of the whole situation. I was impressed.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Derezo)</author>
		<pubDate>Mon, 11 Apr 2011 23:08:53 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Our dedicated server at corenetworks has a better CPU than my desktop, so it would be ideal for e.g. rendering a blender movie (if i had the server all for myself, that is). The biggest benefit would be that the fan noise of my desktop would be kept down <img src="http://www.allegro.cc/forums/smileys/smiley.gif" alt=":)" />
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Elias)</author>
		<pubDate>Mon, 11 Apr 2011 23:18:11 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Oh nice, yes because I was trying to justify having a dedicated server, currently I have no need but if could let it rendering some graphics, having my webpage, and a game server (when my game is ready) I might rent one, but what I need for my game is just a online score table... and my webpage is currently hosted for only 25 E/Year so... I don&#39;t need it so far.</p><h1> </h1><p>

Now talking about other thing...</p><p>I&#39;m studding the way to have an online score table (the best 12 players) using HTTP, it&#39;s that possible?. So far the problem that I have found is that I could upload the info but then the program (client) should download the 12 files which contain the name of the players and the scores and then compare if the score of the client is better that those downloaded form the server and if it is, save it with the specified number position, let&#39;s say &quot;3.dat&quot; then upload that file to the server overwriting the one that is there... But if there are 100 people playing the game and doing that process I think would be a little messy and discoordinated, but I could do it I don&#39;t know...</p><p>I was reading this <a href="http://www.example-code.com/vcpp/http.asp">http://www.example-code.com/vcpp/http.asp</a> but I have no idea I haven&#39;t finished my game and this would be the final step if it&#39;s possible...
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (AMCerasoli)</author>
		<pubDate>Tue, 12 Apr 2011 01:05:41 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>You should use a database that supports atomic operations to store the score info. Then your application would lock the hiscores table, compare the new score to the lowest in the table, and if necessary replace it (i.e., UPDATE or DELETE + INSERT; it&#39;s semantics mostly). Then generate the Web page dynamically using an application server technology (PHP, ASP.NET, CGI, etc.). You could even use HTTP POST and an application server technology to handle the submission of a score. It would just be a matter of connecting to your Web server and writing some bare minimum HTTP text into your socket. Or you could write your own server, or use many other alternative server technologies... Of course, whatever solution you use, it runs the risk of leaving the server vulnerable to hackers if you don&#39;t do a good job. <img src="http://www.allegro.cc/forums/smileys/tongue.gif" alt=":P" /></p><p>You don&#39;t have to use a database, but it&#39;s the more reliable way aside from writing a complex platform-dependent atomic solution yourself. <img src="http://www.allegro.cc/forums/smileys/smiley.gif" alt=":)" />
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (bamccaig)</author>
		<pubDate>Tue, 12 Apr 2011 01:38:16 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>I din&#39;t explain well myself, but you gave me a good idea (show the score on a webpage too), Or maybe I&#39;m not understanding you. I want to show the table inside the game. For that reason the game should download the files then compare and then upload just one file if it is necessary (a better score) and overwritten the old one. Now it comes to mind another existential problem? what happens if someone gets exactly the same score than another one that is already on the list? should overwrite it?, or should stay there since was the first one?. <img src="http://www.allegro.cc/forums/smileys/tongue.gif" alt=":P" />
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (AMCerasoli)</author>
		<pubDate>Tue, 12 Apr 2011 02:15:31 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title"><a href="http://www.allegro.cc/forums/thread/606958/912898#target">AMCERASOLI</a> said:</div><div class="quote"><p>I din&#39;t explain well myself, but you gave me a good idea (show the score on a webpage too), Or maybe I&#39;m not understanding you. I want to show the table inside the game. For that reason the game should download the files then compare and then upload just one file if it is necessary (a better score) and overwritten the old one. Now it comes to mind another existential problem? what happens if someone gets exactly the same score than another one that is already on the list? should overwrite it?, or should stay there since was the first one?.  </p></div></div><p>

I would do as bamccaig suggested and run an SQL database (SQLite, MySQL, Postgres, etc) on your dedicated server.  In your game, you would use an SQL library to connect to your SQL database and &#39;SELECT&#39; the highscores from the highscores table. Your game wouldn&#39;t have to download/upload any files.</p><p>As far as overwriting highscores that are the same... that is purely up to you.  Personally, if I was playing a game and saw that my score matched the lowest score in the top 10 I would not be expecting to enter my name since I&#39;ve always viewed the scores as &#39;Must-be-better-than&#39; to place and not &#39;must-be-better-than-or-equal&#39;
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Samuel Henderson)</author>
		<pubDate>Tue, 12 Apr 2011 02:29:42 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>That sounds cool. But can I do that without a dedicated server? because that was my point. Or is going to be alway necessary a dedicated server?. Can&#39;t I use FTP or something?.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (AMCerasoli)</author>
		<pubDate>Tue, 12 Apr 2011 03:04:56 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title"><a href="http://www.allegro.cc/forums/thread/606958/912898#target">AMCERASOLI</a> said:</div><div class="quote"><p>
I want to show the table inside the game.
</p></div></div><p>
Oh, OK. I did misunderstand you. I thought you wanted to show the scores on a Web site. Nevertheless, I&#39;d still encourage an RDBMS solution.
</p><div class="quote_container"><div class="title"><a href="http://www.allegro.cc/forums/thread/606958/912898#target">AMCERASOLI</a> said:</div><div class="quote"><p>
Now it comes to mind another existential problem? what happens if someone gets exactly the same score than another one that is already on the list? should overwrite it?, or should stay there since was the first one?. <img src="http://www.allegro.cc/forums/smileys/tongue.gif" alt=":P" />
</p></div></div><p>
I&#39;d agree with Samuel Henderson. You should have to <i>beat</i> a high score to make the list, not just match it.
</p><div class="quote_container"><div class="title"><a href="http://www.allegro.cc/forums/thread/606958/912905#target">AMCERASOLI</a> said:</div><div class="quote"><p>
That sounds cool. But can I do that without a dedicated server? because that was my point. Or is going to be alway necessary a dedicated server?. Can&#39;t I use FTP or something?.
</p></div></div><p>
Assuming you want high scores to be shared by all players you need to centralize the high scores table. For this you basically need a centralized server. I&#39;m not sure exactly what you mean by a &quot;dedicated&quot; server, but I don&#39;t think it matters; it&#39;s not necessary. You could use a VPS instead, or your own desktop if it is accessible from the Internet (which can be dangerous, but I digress). As for FTP, I don&#39;t think FTP is a reliable way to update the high scores table. I don&#39;t use FTP myself, so I could be wrong, but I doubt there&#39;s any way for FTP to atomically lock a file, download it, and sometime later update it... I doubt it anyway. In either case, it&#39;s a rather sloppy way to do it, IMHO. <img src="http://www.allegro.cc/forums/smileys/smiley.gif" alt=":)" /> I&#39;m beginning to think that you&#39;re currently using some Web space provided for cheap with only FTP access and no direct access to the server. I don&#39;t think that you&#39;ll be able to achieve a reliable solution with a setup like that. FTP is just not a very good way to do this. I&#39;m currently paying $11/month for a VPS with more than enough power for this. If that&#39;s too much then you&#39;re probably SOL unless you can convince somebody else with a server to spare you a database. <img src="http://www.allegro.cc/forums/smileys/smiley.gif" alt=":)" />
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (bamccaig)</author>
		<pubDate>Tue, 12 Apr 2011 05:57:03 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title"><a href="http://www.allegro.cc/forums/thread/606958/912929#target">bamccaig</a> said:</div><div class="quote"><p> You should have to beat a high score to make the list, not just match it.</p></div></div><p>IMO that means you don&#39;t have a fine enough granularity for the score.  It&#39;s still <i>possible</i> to match a score, but highly unlikely.</p><p>[EDIT]</p><p>I suppose a devastatingly simple game like Pong would be exempt.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Arthur Kalliokoski)</author>
		<pubDate>Tue, 12 Apr 2011 06:03:31 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>By a dedicated server I mean that... a dedicated server... <img src="http://www.allegro.cc/forums/smileys/grin.gif" alt=";D" /></p><p>a VPS is some kind of dedicated server too, but I don&#39;t have neither of two. </p><p>The thing is I don&#39;t want to pay 16 E/month for a dedicated server just to show an online score of my game (inside the game <img src="http://www.allegro.cc/forums/smileys/cheesy.gif" alt=":D" />) which is going to be sold (hopefully) for just 1.99 E... so... I was looking the way to do this trow FTP or something like that... For that reason I was saying that the game should download all the file inside a determined path, compare if the current score (client) is better than those downloaded and if it&#39;s upload the file and overwrite the old one...</p><p>The file just contain a name and a score... and are saved like this: 1.dat , 2.dat , 3.dat etc...</p><p>I know that 1.dat contains the better score so if the client beat that score, the game sends a new 1.dat file overwriting the old one. This should be done constantly... But I know there must be a hide problem I haven&#39;t think much of it.</p><div class="quote_container"><div class="title"><a href="http://www.allegro.cc/forums/thread/606958/912929#target">bamccaig</a> said:</div><div class="quote"><p>
You should have to beat a high score to make the list, not just match it.
</p></div></div><p>

Yes I think I&#39;m going to do that, it&#39;s the less controversial option.</p><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
You could use a VPS instead, or your own desktop if it is accessible from the Internet
</p></div></div><p>
I can&#39;t because I have a dynamic IP, and I can&#39;t use No-IP or something similar.</p><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
I&#39;m beginning to think that you&#39;re currently using some Web space provided for cheap with only FTP access and no direct access to the server.
</p></div></div><p>
Oh Yhea <img src="http://www.allegro.cc/forums/smileys/cool.gif" alt="8-)" />, I could use MySQL but that doesn&#39;t change anything.</p><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
If that&#39;s too much then you&#39;re probably SOL unless you can convince somebody else with a server to spare you a database. 
</p></div></div><p>
</p><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
I&#39;m currently paying $11/month for a VPS with more than enough power for this.
</p></div></div><p>
</p><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
If that&#39;s too much then you&#39;re probably SOL unless you can convince somebody else with a server to spare you a database. 
</p></div></div><p>
</p><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
I&#39;m currently paying $11/month for a VPS with more than enough power for this.
</p></div></div><p>
</p><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
If that&#39;s too much then you&#39;re probably SOL unless you can convince somebody else with a server to spare you a database. 
</p></div></div><p>
</p><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
I&#39;m currently paying $11/month for a VPS with more than enough power for this.
</p></div></div><p>

Hm... I think I might have one ahahahahahaha....</p><p><b>Edit:</b> I have a better Idea, to relieve the task of the game, I can just send the file (from the game) each time the player reach a new better score, this way I delete the possibility of hackings. Then from my computer I run another program which load the files and order them, and in the game show the first 12 but in the web page I could show all the people that have played my game! COOL!.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (AMCerasoli)</author>
		<pubDate>Tue, 12 Apr 2011 16:07:57 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title"><a href="http://www.allegro.cc/forums/thread/606958/912986#target">AMCERASOLI</a> said:</div><div class="quote"><p>
Oh Yhea <img src="http://www.allegro.cc/forums/smileys/cool.gif" alt="8-)" />, I could use MySQL but that doesn&#39;t change anything.
</p></div></div><p>
That actually changes everything... If you have access to an Internet-accessible MySQL database (or server with MySQL and a Web-accessible Web server) then just use the database. <img src="http://www.allegro.cc/forums/smileys/tongue.gif" alt=":P" /> It will work so much more reliably than any kind of FTP solution.
</p><div class="quote_container"><div class="title"><a href="http://www.allegro.cc/forums/thread/606958/912986#target">AMCERASOLI</a> said:</div><div class="quote"><p>
I have a better Idea, to relieve the task of the game, I can just send the file (from the game) each time the player reach a new better score, this way I delete the possibility of hackings. Then from my computer I run another program which load the files and order them, and in the game show the first 12 but in the web page I could show all the people that have played my game! COOL!.
</p></div></div><p>
I&#39;d still opt for the RDBMS solution... That sounds like it will be very ugly and hard to manage. Imagine how unhappy your users will be if their awesome high scores aren&#39;t recorded properly. Especially if you make them pay for the game. <img src="http://www.allegro.cc/forums/smileys/lipsrsealed.gif" alt=":-X" />
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (bamccaig)</author>
		<pubDate>Tue, 12 Apr 2011 19:30:51 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title"><a href="http://www.allegro.cc/forums/thread/606958/912997#target">bamccaig</a> said:</div><div class="quote"><p>
That actually changes everything... If you have access to an Internet-accessible MySQL database (or server with MySQL and a Web-accessible Web server) then just use the database.  It will work so much more reliably than any kind of FTP solution.
</p></div></div><p>

Hmm.. I didn&#39;t know that, thanks again man! I&#39;m going to study that.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (AMCerasoli)</author>
		<pubDate>Tue, 12 Apr 2011 20:27:40 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>If you can&#39;t access the MySQL database from the Internet (i.e., it may only listen on the loopback interface) then you can always write a Web application interface using PHP, for example. Then just make simple HTTP requests to the server and have your PHP code process them. That, of course, depends on your server supporting PHP (or another server-side technology), but if you have MySQL then you almost certainly have PHP too.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (bamccaig)</author>
		<pubDate>Tue, 12 Apr 2011 20:39:52 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>I&#39;ll check out that, there is a way to know if their accept connection from internet besides talking directly with them?, there isn&#39;t another term besides loopback, you know they use to use more commercial words... Because at the moment I have no MySQL but if I want I can activate it(paying a little bit more)...</p><p>They have this:</p><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
Aruba.it has also activated the offer for the MySql support: technically it is an DBMS (Database Management System) or rather, a management system for Database, practically it is a fast Database with high performance, that allows you to create dynamic websites with backend MySql.<br />The MySQL service offers a maximum of 5 databases and an overall disk space of 100Mb.</p><p>The service can be used only by domians hosted by our hosting services or Dedicated Servers. You can increase the disk space with (100Mb) additional packages of 100Mb each.</p><p>The predefinited interaction language is PHP, but it is possible, thanks to the MyODBC drivers, to interact with it also by ASP pages, too.
</p></div></div><p>

What do you think?
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (AMCerasoli)</author>
		<pubDate>Wed, 13 Apr 2011 00:37:25 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>If you already have php there, you don&#39;t need a DBMS for such a simple task. Just store the scores in a file and use PHP to lock it when you want to update it.</p><p>Pseudocode:
</p><div class="source-code snippet"><div class="inner"><pre>$fp <span class="k3">=</span> <a href="http://www.delorie.com/djgpp/doc/libc/libc_337.html" target="_blank">fopen</a><span class="k2">(</span><span class="s">"scores.dat"</span>, <span class="s">"r"</span><span class="k2">)</span><span class="k2">;</span>
<a href="http://www.delorie.com/djgpp/doc/libc/libc_329.html" target="_blank">flock</a><span class="k2">(</span>$fp, LOCK_EX<span class="k2">)</span><span class="k2">)</span>
$score_array <span class="k3">=</span> read_scores<span class="k2">(</span>$fp<span class="k2">)</span><span class="k2">;</span>
insert_score_submited_by_player<span class="k2">(</span>$score_array, $POST<span class="k2">[</span>$score<span class="k2">]</span><span class="k2">)</span><span class="k2">;</span>  <span class="c">// I don't actually remember how to acess post variables :P</span>
write_score_file<span class="k2">(</span>$fp, $score_array<span class="k2">)</span><span class="k2">;</span>
<a href="http://www.delorie.com/djgpp/doc/libc/libc_329.html" target="_blank">flock</a><span class="k2">(</span>$fp, LOCK_UN<span class="k2">)</span><span class="k2">;</span>
<a href="http://www.delorie.com/djgpp/doc/libc/libc_308.html" target="_blank">fclose</a><span class="k2">(</span>$fp<span class="k2">)</span><span class="k2">;</span>
</pre></div></div><p>

[edit] Disclaimer: I omited error checking for simplicity <img src="http://www.allegro.cc/forums/smileys/tongue.gif" alt=":P" />
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Oscar Giner)</author>
		<pubDate>Wed, 13 Apr 2011 01:37:09 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>You can also use a SQLite or BerklyDB (bdb) database instead of mysql. Both are file backed, so you don&#39;t need a DB server.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Thomas Fjellstrom)</author>
		<pubDate>Wed, 13 Apr 2011 05:14:11 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Seems great, but my hosting provider doesn&#39;t support SQLite, only MySql and Microsoft SQL server.</p><p>I have just a simple hosing service. For that reason I was talking about FTP, I&#39;m going to study the PHP and HTTP possibility though, this is just to be able to offer an online table in-game at the first moment, but if the game success I might rent a VPS and use ENet and I would add another online options. Thanks.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (AMCerasoli)</author>
		<pubDate>Wed, 13 Apr 2011 19:11:08 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title"><a href="http://www.allegro.cc/forums/thread/606958/913140#target">AMCERASOLI</a> said:</div><div class="quote"><p>Seems great, but my hosting provider doesn&#39;t support SQLite</p></div></div><p>Its a php module, you could probably upload it yourself and just use it. Same with BDB. Both are based on (more or less) simple files.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Thomas Fjellstrom)</author>
		<pubDate>Wed, 13 Apr 2011 19:23:07 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title"><a href="http://www.allegro.cc/forums/thread/606958/913141#target">Thomas Fjellstrom</a> said:</div><div class="quote"><p>
Its a php module, you could probably upload it yourself and just use it. Same with BDB. Both are based on (more or less) simple files.
</p></div></div><p>
I doubt he could install the module if it isn&#39;t already installed. If he could then he could do a lot more than he&#39;s letting on. <img src="http://www.allegro.cc/forums/smileys/wink.gif" alt=";)" /> Of course, there is a chance that the sqlite module is installed and just not mentioned by his host. There&#39;s also a small chance that he could convince his host to install the sqlite module.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (bamccaig)</author>
		<pubDate>Wed, 13 Apr 2011 19:25:42 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title"><a href="http://www.allegro.cc/forums/thread/606958/913050#target">Oscar Giner</a> said:</div><div class="quote"><p>
</p><div class="source-code snippet"><div class="inner"><pre>insert_score_submited_by_player<span class="k2">(</span>$score_array, $POST<span class="k2">[</span>$score<span class="k2">]</span><span class="k2">)</span><span class="k2">;</span>  <span class="c">// I don't actually remember how to acess post variables :P</span>
</pre></div></div><p>
</p></div></div><p>
It&#39;s <span class="source-code">$_POST</span> or <span class="source-code">$_REQUEST</span> if you don&#39;t care whether it&#39;s GET or POST.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (ImLeftFooted)</author>
		<pubDate>Wed, 13 Apr 2011 20:56:31 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title"><a href="http://www.allegro.cc/forums/thread/606958/913140#target">AMCERASOLI</a> said:</div><div class="quote"><p> Seems great, but my hosting provider doesn&#39;t support SQLite
</p></div></div><p>Are you sure? It comes bundled with PHP5, and you&#39;d have to explicitly <i>disable</i> for it not to work.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Matthew Leverton)</author>
		<pubDate>Wed, 13 Apr 2011 22:19:35 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p><s>Yes I spoke directly with them, and they have no support for SQLite, and it seems it&#39;s going to be that way for a loooong time...</s></p><p>Well, actually I haven&#39;t but I saw a post in their web page but now seeing again they seems to have suport for SQLite... The problem was they took a lot of time to pass from 4 to 5 and the internet is plagued by people complaining... They have support for:</p><pre>
libxml
xsl
xmlwriter
dom
xmlreader
xml
wddx
tokenizer
session
pcre
SimpleXML
SPL
PDO
SQLite
standard
Reflection
posix
pdo_sqlite
pdo_mysql
mysqli    &lt;--- WTF
mysql
mime_magic
mhash
mcrypt
json
imap
iconv
hash
gettext
gd
ftp
filter
exif
date
curl
ctype
calendar
bz2
bcmath
zlib
cgi
pdf
ionCube Loader
</pre><p>

But know they&#39;re complaining why they don&#39;t support PHP-SOAP or something... I don&#39;t even know what it&#39;s and don&#39;t what to know to be honest <img src="http://www.allegro.cc/forums/smileys/shocked.gif" alt=":o" /></p><p>But I&#39;m going to try to do what Oscar Giner suggested me, I&#39;m going to use something like libCurl to send a request and process it.</p><p>Send the actual score of the player, <b>if</b> it&#39;s better run the script to erase the old one from the list (the file) and retrieve the &quot;socres.dat&quot; file, and <b>if isn&#39;t</b> just retrieve the &quot;scores.dat&quot; file anyway to keep the list actualized. Retrieving the list is what I don&#39;t know how to do it, I&#39;m new in all this but I&#39;m reading...</p><p>A library like libCurl should keep me away from sockets, headers and things like that, right?
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (AMCerasoli)</author>
		<pubDate>Wed, 13 Apr 2011 22:25:21 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>MySQLi is just a more enhanced version of the MySQL drivers that supports bindings and procedures and such.</p><p>I just recently started using <a href="http://codeigniter.com/">CodeIgniter</a> and am really liking it. They have a great community, as well.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Derezo)</author>
		<pubDate>Wed, 13 Apr 2011 22:52:28 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>And they have a lot of documents too, even videotutorials.</p><h1> </h1><p>

I have another idea... What if I set up a server on my machine, and constantly send my IP address to my current host server, then the game would connect to the host server read the file called something like &quot;what_is_your_IP_now.dat&quot; and then connect with my dedicated server at home...</p><p><img src="http://www.allegro.cc/forums/smileys/shocked.gif" alt=":o" /></p><p>This way I could start learning ENet insted of PHP and libCurl <img src="http://www.allegro.cc/forums/smileys/grin.gif" alt=";D" />
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (AMCerasoli)</author>
		<pubDate>Thu, 14 Apr 2011 04:04:13 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p><span class="remote-thumbnail"><span class="json">{"name":"Screen_shot_2011-04-14_at_1.17.58_AM.png","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/0\/4\/0479217ec8bb51f3b851b05a7b598c9a.png","w":443,"h":566,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/0\/4\/0479217ec8bb51f3b851b05a7b598c9a"}</span><img src="http://www.allegro.cc//djungxnpq2nug.cloudfront.net/image/cache/0/4/0479217ec8bb51f3b851b05a7b598c9a-240.jpg" alt="Screen_shot_2011-04-14_at_1.17.58_AM.png" width="240" height="306" /></span><br />Green are all the tracks that you can undo.  Yellow is the last thing you placed, and therefore, the latest in the undo queue.</p><p>You add new track by touching and dragging.  Just the beginning and end of the drag are used to calculate a run of track.</p><p>I&#39;m going to work on the network code soon, once I get a bit more UI.</p><p>Here&#39;s a cropped full res shot:<br /><span class="remote-thumbnail"><span class="json">{"name":"Screen_shot_2011-04-14_at_1.23.46_AM.png","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/c\/9\/c9ce513d5293b68a0134253756252aa1.png","w":636,"h":404,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/c\/9\/c9ce513d5293b68a0134253756252aa1"}</span><img src="http://www.allegro.cc//djungxnpq2nug.cloudfront.net/image/cache/c/9/c9ce513d5293b68a0134253756252aa1-240.jpg" alt="Screen_shot_2011-04-14_at_1.23.46_AM.png" width="240" height="152" /></span>
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (ImLeftFooted)</author>
		<pubDate>Thu, 14 Apr 2011 05:20:09 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>YHEAAAAA!!! Nice man!!!</p><p>Try to make it commercial, you know good graphics, sound, etc... That game has potential and being online even more.</p><p>You have the iPhone SDK? I&#39;m starting to think that I&#39;m the only one that don&#39;t have it...
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (AMCerasoli)</author>
		<pubDate>Thu, 14 Apr 2011 05:44:56 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Wow, this thread took off like a rocket. Fun to see that I&#39;m not all alone. <img src="http://www.allegro.cc/forums/smileys/smiley.gif" alt=":)" />
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (TeaRDoWN)</author>
		<pubDate>Thu, 14 Apr 2011 13:54:17 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p><img src="http://www.allegro.cc/forums/smileys/smiley.gif" alt=":)" /> yhea... for each question you have I think there are at least 1.000 K people wondering the same...</p><h1> </h1><p>
I have checked again and no I have not SQLite, would be dangerous if I show people the result from phpinfo()?.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (AMCerasoli)</author>
		<pubDate>Thu, 14 Apr 2011 18:18:10 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Not really, no.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Vanneto)</author>
		<pubDate>Thu, 14 Apr 2011 19:44:49 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title"><a href="http://www.allegro.cc/forums/thread/606958/913252#target">AMCERASOLI</a> said:</div><div class="quote"><p>I have checked again and no I have not SQLite</p></div></div><p>That list you posted has pdo_sqlite in it. Its there. Note, it is not a SERVER based SQL system. No server required, just a simple bit of PHP code (or C/C++, or Perl, or Python) to access it.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Thomas Fjellstrom)</author>
		<pubDate>Thu, 14 Apr 2011 20:13:56 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>I don&#39;t know, that list was from another guy too... My PHP version is 5.2.12 check out this... <a href="http://62.149.131.186/ver.php">http://62.149.131.186/ver.php</a></p><p>But there is no problem, I&#39;m not going to use SQLite nor some database language, I don&#39;t need those features for such simple task. I could use the CGI too I think they allow be to upload binaries since I have a &quot;cgi-bin&quot; folder, but I&#39;m going to use PHP.</p><p>Let&#39;s see. I still need to read a lot, there is a lot of people that say that PHP wins against the CGI but since I already know C++ I would prefer to use it, but I don&#39;t know...</p><p>Basically I don&#39;t know what I&#39;m talking about <img src="http://www.allegro.cc/forums/smileys/grin.gif" alt=";D" />... So... I also found a guy asking  <a href="http://www.gamedev.net/topic/305990-c-http-requests/">the same question at gamedev.com</a> and they recommended to use PHP:
</p><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
</p><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
I&#39;m looking to setup a PHP script that will take a highscore along with some type of key to validate it. The application will then call the script and upload the highscores.</p><p>Or if there is any other solution available, that would be great. Maybe even running remote MySQL queries directly from the application....
</p></div></div><p>


No that would be less than ideal.</p><p>This is because the user would be able to detect the MySQL login / password and put in their own data, which would be bad.</p><p>Using a PHP (or even a CGI program written in C++, maybe, so it can reuse code from the app itself) script to update high scores, list servers etc, is definitely the way to go.</p><p>It&#39;s much easier to code this sort of high-score updater or server-list manager in PHP than it would be in C++ (well, if you know PHP anyway).</p></div></div><p>
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (AMCerasoli)</author>
		<pubDate>Thu, 14 Apr 2011 21:01:19 +0000</pubDate>
	</item>
</rss>
