[Sugar-devel] [Karma] Re: Conozco Uruguay in karma
Gabriel Eirea
geirea at gmail.com
Fri Oct 9 08:11:20 EDT 2009
Hi,
This is extremely cool.
I agree with Bryan that it would be great to have svg from the start.
I used a fixed bitmap image and then it became very difficult for
scaling. Now I'm working in zoomed-in versions for very local
information, and I need to draw a new map for each one of the zones.
The holy grail would be to have true cartographic information with
different projections, then you could use GPS data and all kind of
interesting options would open for us. Of course, this was not
necessary for Uruguay because it is such a small country, but it may
be necessary for larger countries or continents if you want to be able
to zoom in and out.
For those asking for translations, I apologize for not being very
international. Almost all the strings are located in the file
datos/niveles.txt. You can read about it here (in Spanish and
unfinished yet, sorry):
http://drupal.ceibaljam.org/?q=node/46
I'm trying to improve internationalization for the next version.
There's even a Conozco Perú brewing somewhere in the Andes.
Regards,
Gabriel
2009/10/9 Bryan Berry <bryan at olenepal.org>:
> Hey Ze,
>
> Great start!
>
> I cloned your git repo and made a few changes
> http://github.com/bryanwb/Conozco-Uruguay
>
>
> Just a few notes:
>
> U don't need the xml declaration anymore w/ html5
> so <?xml version="1.0" encoding="iso-8859-1"?> and
> xmlns="http://www.w3.org/1999/xhtml" are no longer needed
>
> all u need is <!DOCTYPE html>
>
> I have copied the needed js files into js/ so u can run it as a
> standalone. Perhaps I should create a karma-base package that just has
> all requirements for creating a standalone lesson and nothing more.
>
> You can use jquery methods to make your code more succinct
>
> for instance:
>
> document.getElementById('mycanvas').addEventListener( . . .
>
> can become
>
> $('#mycanvas').bind('click', clicked, false);
>
> and
>
> document.getElementById('question').innerHTML = q.getPhrase;
>
> can become
>
> $('#question').html(q.getPhrase);
>
>
> I also see that you used static coordinates to represent the cities.
> This means the image can't be resized for different screen resolutions.
> It would be neat if we could do the same image as an SVG w/ the names of
> the capitals embedded as nodes. Then you could attach an event listener
> to each node.
>
> Each node would have an ID matching the City name and class="cities".
> You could then match the ID of the element clicked on against the city
> named in the question.
>
> Unfortunately, I have no idea how to do this ;)
>
>
> On Thu, 2009-10-08 at 18:04 +0100, Ze maria wrote:
>> Hello guys,
>> I started a port of the activity "Conozco Uruguay" (available at
>> http://activities.sugarlabs.org/en-US/sugar/addon/4199) from Python to
>> the new Karma framework (downloaded from:
>> http://git.sugarlabs.org/projects/karma).
>> I'm new to html5 and to the canvas element so don't be scared by the
>> lookn'feel :)
>>
>>
>> Currently to only thing implemented is the capital game, where a
>> person guesses where which capital of the state is located.
>>
>>
>> By the way, I coulnd't get to work the Raphael function 'print', every
>> time I try to use I get a :
>>
>>
>> Error: f.fonts is undefined
>> Source File:
>> file:///Users/zemariamm/workspace/olenepal/mainline/js/raphael-min.js
>> Line: 7
>>
>>
>>
>>
>> The code is available at http://github.com/zemariamm/Conozco-Uruguay
>> Comments, critics and sugestions are all welcome :)
>>
>>
>> (To run the code just download the new karma framework and drop the
>> urugay activity code in the lessons directory)
>>
>>
>> Take care,
>> Jose
>> _______________________________________________
>> Sugar-devel mailing list
>> Sugar-devel at lists.sugarlabs.org
>> http://lists.sugarlabs.org/listinfo/sugar-devel
> --
> Bryan W. Berry
> Senior Engineer
> OLE Nepal, http://www.olenepal.org
>
> _______________________________________________
> Sugar-devel mailing list
> Sugar-devel at lists.sugarlabs.org
> http://lists.sugarlabs.org/listinfo/sugar-devel
>
More information about the Sugar-devel
mailing list