[Sugar-devel] [Karma] Re: Conozco Uruguay in karma
geirea at gmail.com
Fri Oct 9 08:11:20 EDT 2009
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):
I'm trying to improve internationalization for the next version.
There's even a Conozco Perú brewing somewhere in the Andes.
2009/10/9 Bryan Berry <bryan at olenepal.org>:
> Hey Ze,
> Great start!
> I cloned your git repo and made a few changes
> 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);
> document.getElementById('question').innerHTML = q.getPhrase;
> can become
> 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:
>> 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:
>> 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,
>> Sugar-devel mailing list
>> Sugar-devel at lists.sugarlabs.org
> Bryan W. Berry
> Senior Engineer
> OLE Nepal, http://www.olenepal.org
> Sugar-devel mailing list
> Sugar-devel at lists.sugarlabs.org
More information about the Sugar-devel