<div dir="ltr">Sorry but I couldn't apply the patch (maybe because I've already pushed the commit with the patchs 1 and 2) :<div><br></div><div><div>error: patch failed: activity.py:13</div><div>error: activity.py: patch does not apply</div>
<div>error: patch failed: main_game.py:158</div><div>error: main_game.py: patch does not apply</div></div><div><br></div><div>Regards</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">2013/9/25 laurent bernabe <span dir="ltr"><<a href="mailto:laurent.bernabe@gmail.com" target="_blank">laurent.bernabe@gmail.com</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Thanks,<div><br></div><div>so I'll go on using sugar games.</div><div>I'll apply your patch right now :)</div>
<div><br></div><div>Regards.</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">
2013/9/25 Alan Jhonn Aguiar Schwyn <span dir="ltr"><<a href="mailto:alanjas@hotmail.com" target="_blank">alanjas@hotmail.com</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">




<div><div dir="ltr">SugarGames is a "bit" deprecated but works. There are a lot of activities that uses it.<div>In my case, all my activities (except one) uses SugarGames library.</div><div><br></div><div>To do a toolbar, only add a few lines in activity.py like the patch attached.</div>

<div>I test on sugar-build and works good!</div><div><br></div><div>You can use PyGame directly, but when activity loads, it open another window and</div><div>you not have the sugar toolbars.</div><div><br></div><div>And yes.. Pygame is the better python game library!</div>

<div><br></div><div>Regards!</div><div><br></div><div>Alan<br><br><div><hr>Date: Wed, 25 Sep 2013 13:23:07 +0200<br>Subject: Re: [Sugar-devel] SugarGames, GTK3 and fonts ?<br>From: <a href="mailto:laurent.bernabe@gmail.com" target="_blank">laurent.bernabe@gmail.com</a><br>

To: <a href="mailto:alanjas@hotmail.com" target="_blank">alanjas@hotmail.com</a><br>CC: <a href="mailto:gonzalo@laptop.org" target="_blank">gonzalo@laptop.org</a>; <a href="mailto:sugar-devel@lists.sugarlabs.org" target="_blank">sugar-devel@lists.sugarlabs.org</a><br>

<br><div dir="ltr">I've applied the patch : but, as Gonzalo Odiard made me notice, perhaps I'd better not rely on deprecated sugargame library any more : right ?<div>So I think I have to use plain gtk3 fonts and canvas (is there one ? I did not find any note on the official python GTK3 tutorial : <a href="http://python-gtk-3-tutorial.readthedocs.org/en/latest/" target="_blank">http://python-gtk-3-tutorial.readthedocs.org/en/latest/</a>), and also make an activity class for the integration with the olpc (toolbar).</div>


<div><br></div><div>Or can I use Pygames without the sugargame layer ? Because PyGame make animations coding easier : I remember that in GTK2 I had some pains for using threads : because in PyGTK2 there was a kind of restriction (though I can't remember which) with threads coding.</div>


<div><br></div><div>Regards</div></div><div><br><br><div>2013/9/25 laurent bernabe <span dir="ltr"><<a href="mailto:laurent.bernabe@gmail.com" target="_blank">laurent.bernabe@gmail.com</a>></span><br>
<blockquote style="border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Thank you very much : I'll apply those changes today.</div><div><br><br><div>
2013/9/25 Alan Jhonn Aguiar Schwyn <span dir="ltr"><<a href="mailto:alanjas@hotmail.com" target="_blank">alanjas@hotmail.com</a>></span><br>
<blockquote style="border-left:1px #ccc solid;padding-left:1ex">


<div><div dir="ltr">Copy the patch to your GIT folder and do:<div><br></div><div>git apply 0001-....</div><div><br></div><div>After, if you like the changes, can commit them.</div><div><br></div><div>In Pygame, when you do:</div>



<div><br></div><div>font = pygame.font.Font(None, 30)</div><div><br></div><div>It selects the default font of the system (I don't know the name).</div><div><br></div><div>If you want to see all fonts:</div><div><br></div>



<div>all_fonts = pygame.font.get_fonts()</div><div><br></div><div>Or load a specific font:</div><div><br></div><div>font = pygame.font.Font("path/to/the/font/my_font.ttf", 30)</div><div><br></div><div>Regards!</div>



<div><br></div><div>Alan<br><br><div><hr>Date: Tue, 24 Sep 2013 20:32:27 +0200<br>Subject: Re: [Sugar-devel] SugarGames, GTK3 and fonts ?<br>From: <a href="mailto:laurent.bernabe@gmail.com" target="_blank">laurent.bernabe@gmail.com</a><br>



To: <a href="mailto:alanjas@hotmail.com" target="_blank">alanjas@hotmail.com</a><br>CC: <a href="mailto:gonzalo@laptop.org" target="_blank">gonzalo@laptop.org</a>; <a href="mailto:sugar-devel@lists.sugarlabs.org" target="_blank">sugar-devel@lists.sugarlabs.org</a><br>



<br><div dir="ltr">Thanks for your patch Alan : how must I apply them ? (I have not used patch before).<div><br></div><div>Yes, I am very happy that you purpose me to develop the GTK2 version :)</div><div>I have tried to do my best to code in respect with pep8 (using autopep8 program) and pyflakes.</div>




<div><br></div><div>What are the default fonts in Sugar ? (Sorry, I did not look for standards)</div><div><br></div><div>Regards</div></div><div><br><br><div>2013/9/24 Alan Jhonn Aguiar Schwyn <span dir="ltr"><<a href="mailto:alanjas@hotmail.com" target="_blank">alanjas@hotmail.com</a>></span><br>




<blockquote style="border-left:1px #ccc solid;padding-left:1ex">


<div><div dir="ltr">I have this patchs for you.<div>One to evite track .pyc and other extensions that no have sense add to git.</div><div><br></div><div>The second, it's a few of changes for that you code works with Sugargames</div>




<div>library.</div><div>You must make another few of changes. I use the default font, for example.</div><div><br></div><div>If you want, you can do the GTK3 version and I translate to GTK2 :-)</div><div><br></div><div>Regards!</div>




<div><br></div><div>Alan<br><br><div><hr>Date: Tue, 24 Sep 2013 14:56:31 -0300<br>Subject: Re: [Sugar-devel] SugarGames, GTK3 and fonts ?<br>From: <a href="mailto:gonzalo@laptop.org" target="_blank">gonzalo@laptop.org</a><br>




To: <a href="mailto:laurent.bernabe@gmail.com" target="_blank">laurent.bernabe@gmail.com</a><br>CC: <a href="mailto:alanjas@hotmail.com" target="_blank">alanjas@hotmail.com</a>; <a href="mailto:sugar-devel@lists.sugarlabs.org" target="_blank">sugar-devel@lists.sugarlabs.org</a><br>




<br><div dir="ltr">No problem.<div>In fact, tusmath is a c game, and that is a problem,</div><div>because is not multiplatform.</div><div>Go ahead, but look at it to see what they do.</div><div><br></div><div>Gonzalo</div>




</div>
<div><br><br><div>On Tue, Sep 24, 2013 at 2:49 PM, laurent bernabe <span dir="ltr"><<a href="mailto:laurent.bernabe@gmail.com" target="_blank">laurent.bernabe@gmail.com</a>></span> wrote:<br>
<blockquote style="border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Oups sorry<div><br></div><div>I did not notice that there was a similar game.</div><div><br></div><div>In fact, I am lacking ideas.</div>
<div><br></div><div>Regards</div></div><div><div><div><br><br>
<div>2013/9/24 Gonzalo Odiard <span dir="ltr"><<a href="mailto:gonzalo@laptop.org" target="_blank">gonzalo@laptop.org</a>></span><br><blockquote style="border-left:1px #ccc solid;padding-left:1ex">

<div dir="ltr">If you add a mode similar to tuxmath,<div>may be we can kill that game finally......</div><div><br></div><div>While the pedagogy of tuxmath is not the best,</div><div>every deployment ask for it </div><div>






<br>
</div><div>Gonzalo</div></div><div><br><br><div>On Tue, Sep 24, 2013 at 2:37 PM, laurent bernabe <span dir="ltr"><<a href="mailto:laurent.bernabe@gmail.com" target="_blank">laurent.bernabe@gmail.com</a>></span> wrote:<br>







<blockquote style="border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Thank you.<div><br></div><div>So I think I'll try to develop for both GTK2 and GTK3.</div><div><br>

</div>
<div>It's a game, and I have nearly finished it for OLPC 0.100 : <a href="https://git.sugarlabs.org/hittheballs/hittheballs" target="_blank">https://git.sugarlabs.org/hittheballs/hittheballs</a></div>
<div><br></div><div>It's a very simple game where balls with operations goes across a screen area, and user must choose good one(s).</div><div><br></div><div>Regards</div></div><div><div><div>
<br><br><div>
2013/9/24 Alan Jhonn Aguiar Schwyn <span dir="ltr"><<a href="mailto:alanjas@hotmail.com" target="_blank">alanjas@hotmail.com</a>></span><br><blockquote style="border-left:1px #ccc solid;padding-left:1ex">






<div><div dir="ltr">My case:<div><br></div><div>- I use Ubuntu with sugar-emulator 0.96 to test GTK2 activities. Only with a link of my GIT folder</div><div>to ~/Activities and I'm ready to test it!</div><div><br></div>








<div>- For latest: I download the sugar-build and works. But in certain moment, it begin with a grade of complex</div><div>that I don't like. Now with the broot system, it's a bit complicated. But "is what you get".</div>








<div><br></div><div>To make a GTK2 and GTK3 activity you need make 2 codes, and maybe, two different</div><div>activities. There are ways in python to check wich version of gtk you have in the system</div><div>and run a gtk2 or gtk3 activity. But that needs extra work to update both "branchs".</div>








<div><br></div><div>><span style="font-size:12pt">So what do you advice me ? (developping in GTK2, GTK3, and/or web activity)</span></div><div><span style="font-size:12pt"><br></span></div><div><span style="font-size:12pt">I don't know wich type of activity you want to do. It's a game?</span></div>








<div><br><div><hr>Date: Tue, 24 Sep 2013 19:21:17 +0200<br>From: <a href="mailto:laurent.bernabe@gmail.com" target="_blank">laurent.bernabe@gmail.com</a><br>To: <a href="mailto:alanjas@hotmail.com" target="_blank">alanjas@hotmail.com</a><br>








CC: <a href="mailto:gonzalo@laptop.org" target="_blank">gonzalo@laptop.org</a>; <a href="mailto:sugar-devel@lists.sugarlabs.org" target="_blank">sugar-devel@lists.sugarlabs.org</a><br>Subject: Re: [Sugar-devel] SugarGames, GTK3 and fonts ?<br>








<br><div dir="ltr">Hello<div><br></div><div>In fact I am developping against GTK3 because I have the latest sugar-build, which holds the 0.100 version.</div><div><br></div><div>Otherwise, I can download the 0.94 or some versions under in SugarOnAStick format, or in a VirtualBox format : but this way I have difficulties for transferring easily the project from my host system to the guest sugar one. I tried, in VirtualBox, to use the guest additions in order to share a folder between the host and guest systems (some years ago), but I did not manage.</div>









<div><br></div><div>Also, I don't know how to develop the application so that it supports both gtk2 and gtk3.</div><div><br></div><div>And I was also planning to port the activity to a web acitvity, instead of a gtk one, but it may not be available to many OLPC that way. And I don't know where to start.</div>









<div><br></div><div>So what do you advice me ? (developping in GTK2, GTK3, and/or web activity)</div><div><br></div><div>Regards.</div><div><br></div></div><div><br><br><div>2013/9/24 Alan Jhonn Aguiar Schwyn <span dir="ltr"><<a href="mailto:alanjas@hotmail.com" target="_blank">alanjas@hotmail.com</a>></span><br>









<blockquote style="border-left:1px #ccc solid;padding-left:1ex">


<div><div dir="ltr">Hi,<div><br></div><div>You only will make a GTK3 version?</div><div>The latest sugar (0.100) is not used in any deployment:</div><div>in all countries we have Sugar 0.94 or less.</div><div><br>Would be good have a GTK2 version of that activity.</div>









<div><br></div><div>Regards!</div><div><br></div><div>Alan<br><br><div><hr>Date: Tue, 24 Sep 2013 16:45:13 +0200<br>From: <a href="mailto:laurent.bernabe@gmail.com" target="_blank">laurent.bernabe@gmail.com</a><br>To: <a href="mailto:gonzalo@laptop.org" target="_blank">gonzalo@laptop.org</a><br>









CC: <a href="mailto:sugar-devel@lists.sugarlabs.org" target="_blank">sugar-devel@lists.sugarlabs.org</a><br>Subject: Re: [Sugar-devel] SugarGames, GTK3 and fonts ?<br><br><div dir="ltr">Thank you very much.<div><br></div>









<div>I'll try with Python/Cairo/Gtk3.</div></div><div><br><br><div>2013/9/24 Gonzalo Odiard <span dir="ltr"><<a href="mailto:gonzalo@laptop.org" target="_blank">gonzalo@laptop.org</a>></span><br>
<blockquote style="border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">If you are not porting a existing olpcgames application,<div>I suggest you use something else.</div><div>
You can use any of the html5 frameworks, or plain python/cairo stuff.</div><div>sugargames de not have to much development, </div>
<div>and pygame/gtk do not work really well together.</div><div><br></div><div>Gonzalo</div><div><br></div></div><div><br><br><div>On Tue, Sep 24, 2013 at 11:16 AM, laurent bernabe <span dir="ltr"><<a href="mailto:laurent.bernabe@gmail.com" target="_blank">laurent.bernabe@gmail.com</a>></span> wrote:<br>











<blockquote style="border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hello everyone,<div><br></div><div>As I am developping my game HitTheBalls for sugar 0.100 (I have, I think, the latest sugar-build), I am planning to switch it from OLPCGames 1.6 to sugargames.</div>











<div><br>
</div><div>But the sugargames tells that pango font is not supported. So, what is the best way to get started with fonts in SugarGames ? Do you have some links ? I searched over the web, and I found tutorials for Gtk3 and PangoCairo, but I don't know if these can work with SugarGames.</div>












<div><br></div><div>Regards</div></div>
<br>_______________________________________________<br>
Sugar-devel mailing list<br>
<a href="mailto:Sugar-devel@lists.sugarlabs.org" target="_blank">Sugar-devel@lists.sugarlabs.org</a><br>
<a href="http://lists.sugarlabs.org/listinfo/sugar-devel" target="_blank">http://lists.sugarlabs.org/listinfo/sugar-devel</a><br>
<br></blockquote></div><br></div>
</blockquote></div><br></div>
<br>_______________________________________________
Sugar-devel mailing list
<a href="mailto:Sugar-devel@lists.sugarlabs.org" target="_blank">Sugar-devel@lists.sugarlabs.org</a>
<a href="http://lists.sugarlabs.org/listinfo/sugar-devel" target="_blank">http://lists.sugarlabs.org/listinfo/sugar-devel</a></div></div>                                     </div></div>
</blockquote></div><br></div>
<br>_______________________________________________
Sugar-devel mailing list
<a href="mailto:Sugar-devel@lists.sugarlabs.org" target="_blank">Sugar-devel@lists.sugarlabs.org</a>
<a href="http://lists.sugarlabs.org/listinfo/sugar-devel" target="_blank">http://lists.sugarlabs.org/listinfo/sugar-devel</a></div></div>                                     </div></div>
</blockquote></div><br></div>
</div></div></blockquote></div><br></div>
</blockquote></div><br></div>
</div></div></blockquote></div><br></div></div></div>                                     </div></div>
</blockquote></div><br></div></div></div>                                     </div></div>
</blockquote></div><br></div>
</blockquote></div><br></div></div></div>                                     </div></div>
</blockquote></div><br></div>
</blockquote></div><br></div>