[Sugar-devel] New Activity Proposal

James Cameron quozl at laptop.org
Tue Apr 7 04:29:04 EDT 2020


G'day Abhishek,

Thanks for asking.

Yes, an activity should be written to work in both Sugarizer as well
as Sugar.  This maximises audience and reach.

Sugar Web has conditional code to detect execution environment.  Sugar
itself detects a JavaScript activity using the activity/activity.info
file exec keyword value, and runs sugar-activity-web, which in turn
starts an instance of the WebKit browser and loads index.html

You will see activity/activity.info files in Sugarizer activities
already, with each of them referencing sugar-activity-web.

For a working example, look at the master branch of the Moon activity,
and compare with the source in Sugarizer.  An older Sugar Web library
is used, and needs updating.

https://github.com/sugarlabs/sugar-docs#sugar-web has some
documentation on writing Sugar activities using Sugar Web library.

On Tue, Apr 07, 2020 at 01:14:28PM +0530, Abhishek Tanwar wrote:
> Thanks for the clarification James.
> What I am not able to understand is that if I make an activity by following
> this [1]https://github.com/llaske/sugarizer/blob/master/docs/tutorial.md , how
> will the activity work in both sugarizer as well as in sugar .
> I have developed activities for sugarizer earlier and have decent experience in
> it but I am not sure if I am correctly understanding what you are looking for.
> I have gone through the discussions in [2]https://github.com/sugarlabs/
> sugar-web/issues/127 and [3]https://github.com/sugarlabs/sugar-web/pull/133 .
> Sugarizer activities use the sugar-web library , I can't find the relevant
> documentation for developing activities for both sugar and sugarizer, if you
> could help me with some documentation that would be great.
> 
> Maybe I am not understanding what you intend to tell. Please let me know what
> direction to head in.
> 
> Thank You
> 
> On Tue, Apr 7, 2020 at 3:42 AM James Cameron <[4]quozl at laptop.org> wrote:
> 
>     Yes.  Sugar is a Linux environment that can run any language.
>     Sugarizer is a JavaScript environment inside browser.  An activity can
>     be written to run in both Sugar and Sugarizer.  The Sugar Web library
>     facilitates that.  You will have seen the post here earlier about work
>     on Sugar Web.
> 
>     On Tue, Apr 07, 2020 at 03:19:00AM +0530, Abhishek Tanwar wrote:
>     > Hello ,
>     > I did not quite understand everything .
>     > By saying "include sugar as a platform for sugarizer activity" I did not
>     > understand what you are trying to say . 
>     > Are you saying to make mancala for both sugar and sugarizer?
>     >
>     > Thank you
>     >
>     > On Tue, 7 Apr, 2020, 3:10 am James Cameron, <[1][5]quozl at laptop.org>
>     wrote:
>     >
>     >     We have a Sugar activity for Mancala, written in Python.
>     >
>     >     [2][6]https://github.com/sugarlabs/mancala-activity
>     >
>     >     License is GPLv3+, but Peter Hewitt has delegated an authority to me
>     >     to relicense his activities as we require.  Sugarizer activities use
>     a
>     >     different license in order to maximise distribution.
>     >
>     >     Please do include Sugar as a platform for your JavaScript activity.
>     >
>     >     On Tue, Apr 07, 2020 at 02:11:21AM +0530, Abhishek Tanwar wrote:
>     >     > Hello,
>     >     >
>     >     > I have been searching for games that could help the children to
>     develop
>     >     their
>     >     > brains and work in teams as well to incorporate the values of a
>     good team
>     >     > player.
>     >     >
>     >     > Mancala(or Mangala) is one such game that I came across. [1]https:/
>     /
>     >     > [3][7]en.wikipedia.org/wiki/Mancala
>     >     > [2][4][8]https://mancala.playdrift.com/
>     >     > Mancala on sugarizer can be played between computer vs player ,
>     player vs
>     >     > player (offline ),player vs player (online using presence).
>     >     > I think this could be a good addition to sugarizer for children of
>     age 6
>     >     and
>     >     > above. 
>     >     > I want to make this game for sugarizer and would like the community
>     to
>     >     share
>     >     > feedback on this if it would be good addition.
>     >     >
>     >     > Thank You
>     >     >
>     >     > References:
>     >     >
>     >     > [1] [5][9]https://en.wikipedia.org/wiki/Mancala
>     >     > [2] [6][10]https://mancala.playdrift.com/
>     >
>     >     > _______________________________________________
>     >     > Sugar-devel mailing list
>     >     > [7][11]Sugar-devel at lists.sugarlabs.org
>     >     > [8][12]http://lists.sugarlabs.org/listinfo/sugar-devel
>     >
>     >     --
>     >     James Cameron
>     >     [9][13]http://quozl.netrek.org/
>     >
>     > References:
>     >
>     > [1] mailto:[14]quozl at laptop.org
>     > [2] [15]https://github.com/sugarlabs/mancala-activity
>     > [3] [16]http://en.wikipedia.org/wiki/Mancala
>     > [4] [17]https://mancala.playdrift.com/
>     > [5] [18]https://en.wikipedia.org/wiki/Mancala
>     > [6] [19]https://mancala.playdrift.com/
>     > [7] mailto:[20]Sugar-devel at lists.sugarlabs.org
>     > [8] [21]http://lists.sugarlabs.org/listinfo/sugar-devel
>     > [9] [22]http://quozl.netrek.org/
> 
>     --
>     James Cameron
>     [23]http://quozl.netrek.org/
> 
> References:
> 
> [1] https://github.com/llaske/sugarizer/blob/master/docs/tutorial.md
> [2] https://github.com/sugarlabs/sugar-web/issues/127
> [3] https://github.com/sugarlabs/sugar-web/pull/133
> [4] mailto:quozl at laptop.org
> [5] mailto:quozl at laptop.org
> [6] https://github.com/sugarlabs/mancala-activity
> [7] http://en.wikipedia.org/wiki/Mancala
> [8] https://mancala.playdrift.com/
> [9] https://en.wikipedia.org/wiki/Mancala
> [10] https://mancala.playdrift.com/
> [11] mailto:Sugar-devel at lists.sugarlabs.org
> [12] http://lists.sugarlabs.org/listinfo/sugar-devel
> [13] http://quozl.netrek.org/
> [14] mailto:quozl at laptop.org
> [15] https://github.com/sugarlabs/mancala-activity
> [16] http://en.wikipedia.org/wiki/Mancala
> [17] https://mancala.playdrift.com/
> [18] https://en.wikipedia.org/wiki/Mancala
> [19] https://mancala.playdrift.com/
> [20] mailto:Sugar-devel at lists.sugarlabs.org
> [21] http://lists.sugarlabs.org/listinfo/sugar-devel
> [22] http://quozl.netrek.org/
> [23] http://quozl.netrek.org/

-- 
James Cameron
http://quozl.netrek.org/


More information about the Sugar-devel mailing list