Commit fac8ec86 authored by Johnny Jazeix's avatar Johnny Jazeix

merge master in multiple_dataset

parent 01990e65
This diff is collapsed.
......@@ -11,6 +11,7 @@ Name[et]=GCompris
Name[eu]=GCompris
Name[fr]=GCompris
Name[gl]=GCompris
Name[he]=ג'יקומפריס (GCompris)
Name[it]=GCompris
Name[ko]=GCompris
Name[mk]=Жикомпри
......@@ -39,6 +40,7 @@ GenericName[et]=Hariv mäng
GenericName[eu]=Hezkuntza-jokoa
GenericName[fr]=Jeu éducatif
GenericName[gl]=Xogo educativo
GenericName[he]=משחק לימודי
GenericName[it]=Gioco didattico
GenericName[ko]=교육용 게임
GenericName[mk]=Едукативна игра
......@@ -69,10 +71,11 @@ Comment[eu]=Jarduera anitzeko Hezkuntza-jokoa 2 eta 10 urte arteko haurrentzat
Comment[fi]=Useampitoimintoinen opettavainen peli 2–10-vuotiaille lapsille
Comment[fr]=Jeu éducatif multi-activités pour les enfants de 2 à 10 ans
Comment[gl]=Xogo educativo con varias actividades para nenos entre 2 e 10 anos
Comment[he]=משחק לימודי לפלטפורמות מרובות לילדים/ות בגילאי 2-10
Comment[hi]=२ से १० वर्ष के बच्चों के लिए विभिन्न क्रियाएं वाला शेक्षणिक खेल
Comment[id]=GCompris adalah kumpulan permainan kegiatan pendidikan untuk anak umur 2 sampai 10 tahun
Comment[it]=Gioco didattico multi-attività per bambini da 2 a 10 anni
Comment[ko]=2-10세 어린이를 위한 다양한 활동이 있는 교육용 게임
Comment[ko]=2-10세 어린이 다양한 활동이 있는 교육용 게임
Comment[mk]=Едукативна игра со повеќе активности за деца од 2 до 10 години
Comment[ml]=2 മുതൽ 10 വയസ്സുവരെയുള്ള കുട്ടികൾക്ക് വിവിധ പ്രവർത്തനങ്ങളിലൂടെ പഠിക്കാനായുള്ള കളി.
Comment[nl]=Educatief spel met meerdere activiteiten voor kinderen van 2 tot 10
......
......@@ -14,6 +14,7 @@ Name[eu]=GCompris hezkuntza-jokoa
Name[fi]=GCompris, opettavainen peli
Name[fr]=Jeu éducatif GCompris
Name[gl]=Xogo educativo GCompris
Name[he]=משחקי לומדה ג'יקומפריס
Name[hi]=जीकोंप्रिस शेक्षणिक खेल
Name[id]=Permainan Pendidikan GCompris
Name[it]=Gioco didattico GCompris
......@@ -51,6 +52,7 @@ GenericName[eu]=Hezkuntza-jokoa
GenericName[fi]=Opettavainen peli
GenericName[fr]=Jeu éducatif
GenericName[gl]=Xogo educativo
GenericName[he]=משחקי לומדות
GenericName[hi]=शेक्षणिक खेल
GenericName[id]=Permainan Pendidikan
GenericName[it]=Gioco didattico
......@@ -86,10 +88,11 @@ Comment[eu]=Jarduera anitzeko Hezkuntza-jokoa 2 eta 10 urte arteko haurrentzat
Comment[fi]=Useampitoimintoinen opettavainen peli 2–10-vuotiaille lapsille
Comment[fr]=Jeu éducatif multi-activités pour les enfants de 2 à 10 ans
Comment[gl]=Xogo educativo con varias actividades para nenos entre 2 e 10 anos
Comment[he]=משחק לימודי לפלטפורמות מרובות לילדים/ות בגילאי 2-10
Comment[hi]=२ से १० वर्ष के बच्चों के लिए विभिन्न क्रियाएं वाला शेक्षणिक खेल
Comment[id]=GCompris adalah kumpulan permainan kegiatan pendidikan untuk anak umur 2 sampai 10 tahun
Comment[it]=Gioco didattico multi-attività per bambini da 2 a 10 anni
Comment[ko]=2-10세 어린이를 위한 다양한 활동이 있는 교육용 게임
Comment[ko]=2-10세 어린이 다양한 활동이 있는 교육용 게임
Comment[mk]=Едукативна игра со повеќе активности за деца од 2 до 10 години
Comment[ml]=2 മുതൽ 10 വയസ്സുവരെയുള്ള കുട്ടികൾക്ക് വിവിധ പ്രവർത്തനങ്ങളിലൂടെ പഠിക്കാനായുള്ള കളി.
Comment[nl]=Educatief spel met meerdere activiteiten voor kinderen van 2 tot 10
......
......@@ -52,10 +52,10 @@ gnumch-inequality.svg
gnumch-multiples.svg
gnumch-primes.svg
guessnumber.svg
gravity.svg
hangman.svg
hexagon.svg
instruments.svg
intro_gravity.svg
land_safe.svg
lang.svg
leftright.svg
......
......@@ -65,6 +65,7 @@ gnumch-inequality
gnumch-multiples
gnumch-primes
graph-coloring
gravity
guesscount
guessnumber
hangman
......@@ -73,7 +74,6 @@ hanoi_real
hexagon
imagename
instruments
intro_gravity
land_safe
lang
leftright
......
......@@ -24,16 +24,16 @@ ActivityInfo {
author: "Johnny Jazeix <jazeix@gmail.com>"
demo: true
//: Activity title
title: qsTr("Reassemble the shapes")
title: qsTr("Baby Puzzle")
//: Help title
description: qsTr("The objective is to form a given shape")
// intro: "Click on each object to obtain the same figure. You can change their orientation by clicking on the arrows."
description: qsTr("The objective is to assemble the baby puzzle")
// intro: "Move each puzzle piece, to obtain the completed puzzle. You can change their orientation by clicking on the arrows."
//: Help goal
goal: ""
//: Help prerequisite
prerequisite: qsTr("Mouse-manipulation")
//: Help manual
manual: qsTr("Select the object to form. Move a piece by dragging it. The symmetrical button appears on items that supports it. Click on the rotation button or drag around it to show the rotation you want. More complicated levels can be found in tangram activity.")
manual: qsTr("Move a piece by dragging it. Use the rotation button if necessary. More complicated levels can be found in tangram activity.")
credit: ""
section: "puzzle"
createdInVersion: 9800
......
/* GCompris - ActivityInfo.qml
*
* Copyright (C) 2015 Siddhesh suthar<siddhesh.it@gmail.com>
* Copyright (C) 2020 Timothée Giet<animtim@gmail.com>
*
* Authors:
* Siddhesh suthar <siddhesh.it@gmail.com> (Qt Quick port)
* Timothée Giet <animtim@gmail.com> (complete activity rewrite)
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
......@@ -18,23 +22,23 @@
import GCompris 1.0
ActivityInfo {
name: "intro_gravity/IntroGravity.qml"
difficulty: 4
icon: "intro_gravity/intro_gravity.svg"
author: "Siddhesh suthar &lt;siddhesh.it@gmail.com&gt;"
name: "gravity/Gravity.qml"
difficulty: 3
icon: "gravity/gravity.svg"
author: "Timothée Giet &lt;animtim@gmail.com&gt;"
demo: true
//: Activity title
title: qsTr("Intro gravity")
title: qsTr("Gravity")
//: Help title
description: qsTr("Introduction to the concept of gravity")
//intro: "Change the planets' gravitational force by moving the sliders up and down. Be careful not to crash Tux's spaceship."
//intro: "Move the spaceship to avoid hitting the planets and reach the space station."
//: Help goal
goal: qsTr("Maintain the spaceship in the middle without crashing into the planets or the asteroids")
goal: qsTr("Move the spaceship to avoid hitting the planets and reach the space station.")
//: Help prerequisite
prerequisite: ""
//: Help manual
manual: qsTr("Follow the instructions when you run the activity.")
manual: qsTr("Move the spaceship with the left and right keys, or with the buttons on the screen for mobile devices. Try to stay near the center of the screen and anticipate by looking at the size and direction of the arrow showing the gravity force.")
credit: ""
section: "sciences experiment"
createdInVersion: 4000
createdInVersion: 9800
}
GCOMPRIS_ADD_RCC(activities/gravity *.qml *.svg *.js resource/*)
This diff is collapsed.
/*GCompris :- intro_gravity.qml
/* GCompris - Planet.qml
*
* Copyright (C) 2015 Siddhesh suthar <siddhesh.it@gmail.com>
* Copyright (C) 2020 Timothée Giet <animtim@gmail.com>
*
* Authors:
* Bruno Coudoin <bruno.coudoin@gcompris.net> and Matilda Bernard (GTK+ version)
* Siddhesh suthar <siddhesh.it@gmail.com> (Qt Quick port)
* Timothée Giet <animtim@gmail.com> (complete activity rewrite)
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
......@@ -19,28 +20,46 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, see <https://www.gnu.org/licenses/>.
*/
import QtQuick 2.6
import "intro_gravity.js" as Activity
import "../../core"
import GCompris 1.0
import "../../core"
import "gravity.js" as Activity
Image {
id: asteroid
sourceSize.height: 100 * ApplicationInfo.ratio
id: planet
asynchronous: true
sourceSize.width: undefined
sourceSize.height: undefined
z: 5
y: height * -2
x: leftSide ? width * -0.5 : parent.width - width * 0.5
visible: false
property bool leftSide: true
property alias fallDuration: down.duration
function startMoving() {
down.restart()
down.restart();
}
NumberAnimation {
id: down
target: asteroid
target: planet
property: "y"
to: parent.height
to: parent.height + height * 2
}
Image {
id: gravityImage
asynchronous: true
sourceSize.width: undefined
sourceSize.height: undefined
source: Activity.url + "gravity.svg"
anchors.horizontalCenter: parent.horizontalCenter
anchors.verticalCenter: parent.verticalCenter
width: planet.width * 3
height: width
z: -1
}
}
/* GCompris - gravity.js
*
* Copyright (C) 2020 Timothée Giet <animtim@gmail.com>
*
* Authors:
* Bruno Coudoin <bruno.coudoin@gcompris.net> and Matilda Bernard (GTK+ version)
* Siddhesh suthar <siddhesh.it@gmail.com> (Qt Quick port)
* Timothée Giet <animtim@gmail.com> (complete activity rewrite)
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, see <https://www.gnu.org/licenses/>.
*/
.pragma library
.import QtQuick 2.6 as Quick
.import "qrc:/gcompris/src/core/core.js" as Core
var url = "qrc:/gcompris/src/activities/gravity/resource/"
var levels = [
{ // Level 1
planetFrequency: 12000,
planetCount: 5
},
{ // Level 2
planetFrequency: 10000,
planetCount: 10
},
{ // Level 3
planetFrequency: 8000,
planetCount: 15
},
{ // Level 4
planetFrequency: 7000,
planetCount: 20
},
{ // Level 5
planetFrequency: 6000,
planetCount: 25
},
{ // Level 6
planetFrequency: 5000,
planetCount: 30
}
]
var currentLevel = 0;
var numberOfLevel = levels.length;
var items;
var message;
// delta move
var move = 0;
// control move
var controlMove = 0;
// gravity of current planet
var planetGravity = 0;
// speed for key controls
var controlSpeed = 0.2;
var currentPlanet;
var planetsCounter = 0;
function start(items_,message_) {
items = items_;
currentLevel = 0;
message = message_;
initLevel();
}
function stop() {
items.processTimer.stop();
items.planetCreation.stop();
destroyPlanet();
planetsCounter = 0;
controlMove = 0;
move = 0;
}
function initLevel() {
items.bar.level = currentLevel + 1;
stop();
items.planetFrequency = levels[currentLevel].planetFrequency;
items.background.initSpace();
items.explosion.hide();
items.spaceship.opacity = 100;
items.spaceshipX = items.background.width * 0.5;
items.shuttleDown.stop();
items.shuttle.y = -items.shuttle.height;
controlSpeed = 0.2 * (currentLevel * 0.25 + 1);
if(!items.startMessage) {
items.processTimer.start();
createPlanet();
items.planetCreation.start();
message.index = -1;
} else {
message.index = 0;
}
}
function nextLevel() {
if(numberOfLevel <= ++currentLevel ) {
currentLevel = 0;
}
initLevel();
}
function previousLevel() {
if(--currentLevel < 0) {
currentLevel = numberOfLevel - 1;
}
initLevel();
}
function processKeyPress(event) {
var key = event.key;
event.accepted = true;
if(key === Qt.Key_Left) {
controlMove += -controlSpeed;
} else if(key === Qt.Key_Right) {
controlMove += controlSpeed;
}
}
function processKeyRelease(event) {
var key = event.key;
event.accepted = true;
if(key === Qt.Key_Left || key === Qt.Key_Right) {
controlMove = 0;
}
}
function createPlanet() {
if(planetsCounter < levels[currentLevel].planetCount) {
var planetSide = Math.floor( Math.random() * 2);
var planetSize = Math.max(Math.random() * items.maxPlanetSize, items.minPlanetSize);
if(planetSide == 0) {
currentPlanet = items.planet0;
} else if(planetSide == 1) {
currentPlanet = items.planet1;
}
currentPlanet.source = url + "planet" + Math.floor(Math.random() * 2) + ".png";
currentPlanet.fallDuration = levels[currentLevel].planetFrequency;
currentPlanet.height = planetSize;
currentPlanet.width = planetSize;
currentPlanet.y = currentPlanet.height * -2;
currentPlanet.visible = true;
currentPlanet.startMoving();
planetGravity = currentPlanet.leftSide ? -currentPlanet.width * 0.5: currentPlanet.width * 0.5;
planetsCounter++;
} else {
items.shuttleDown.restart();
}
}
function moveSpaceship() {
// calculate gravity
if(planetsCounter > 0) {
// calculate distance between planet center and spaceship center
var hypothenuse = Math.hypot(
Math.abs((currentPlanet.x + (currentPlanet.width * 0.5)) - items.spaceshipX),
Math.abs((currentPlanet.y + (currentPlanet.height * 0.5)) - items.spaceshipY));
items.gravity = (planetGravity * (currentLevel * 0.33 + 1)) / Math.pow(hypothenuse, 2) * 100;
} else {
items.gravity = 0;
}
move += controlMove + (items.gravity);
items.spaceshipX += move;
// Check for crash
computeOverlap();
// Don't go out of the screen or stay stuck on the borders
if(items.spaceshipX > items.background.width - items.borderMargin) {
move = 0;
controlMove = 0;
items.spaceshipX -= 1;
} else if(items.spaceshipX < items.borderMargin) {
move = 0;
controlMove = 0;
items.spaceshipX += 1;
}
}
function computeOverlap() {
if(planetsCounter > 0) {
// compute overlap with a little margin on the planets to not hit too much on corners
var xOverlap = Math.min(items.spaceship.x + items.spaceship.width,
currentPlanet.x + currentPlanet.width * 0.9) -
Math.max(items.spaceship.x, currentPlanet.x + currentPlanet.width * 0.1);
var yOverlap = Math.min(items.spaceship.y + items.spaceship.height,
currentPlanet.y + currentPlanet.height * 0.9) -
Math.max(items.spaceship.y, currentPlanet.y +
currentPlanet.height * 0.1);
// again add a safety margin to avoid hitting on corners
if(xOverlap > items.spaceship.width * 0.2 && yOverlap > items.spaceship.height * 0.2) {
crash();
items.bonus.bad("lion");
}
}
}
function destroyPlanet() {
planetGravity = 0;
items.gravity = 0;
if(planetsCounter > 0) {
currentPlanet.visible = false;
}
}
function crash() {
items.audioEffects.play("qrc:/gcompris/src/core/resource/sounds/crash.wav");
items.explosion.show();
items.spaceship.hide();
stop();
}
Copyright: Timothée Giet, 2015-2020
License: CC-BY-SA 4.0
Files:
arrow.svg
background.svg
crash.svg
gravity.svg
space_shuttle.svg
tux_spaceship.svg
planet0.png (based on https://commons.wikimedia.org/wiki/File:Neptune.jpg by NASA/JPL)
planet1.png (based on https://commons.wikimedia.org/wiki/File:Mars_Hubble.jpg by NASA and the Hubble Heritage Team)
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="256"
height="128"
viewBox="0 0 256 128"
id="svg4137"
version="1.1"
inkscape:version="0.92.4 (5da689c313, 2019-01-14)"
sodipodi:docname="arrow.svg">
<defs
id="defs4139" />
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="3.959798"
inkscape:cx="125.36743"
inkscape:cy="90.987888"
inkscape:document-units="px"
inkscape:current-layer="layer1"
showgrid="true"
units="px"
inkscape:window-width="1884"
inkscape:window-height="1051"
inkscape:window-x="0"
inkscape:window-y="0"
inkscape:window-maximized="1">
<inkscape:grid
type="xygrid"
id="grid819"
empspacing="4" />
</sodipodi:namedview>
<metadata
id="metadata4142">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
<dc:date>2020</dc:date>
<dc:creator>
<cc:Agent>
<dc:title>Timothée Giet</dc:title>
</cc:Agent>
</dc:creator>
<cc:license
rdf:resource="http://creativecommons.org/licenses/by-sa/4.0/" />
</cc:Work>
<cc:License
rdf:about="http://creativecommons.org/licenses/by-sa/4.0/">
<cc:permits
rdf:resource="http://creativecommons.org/ns#Reproduction" />
<cc:permits
rdf:resource="http://creativecommons.org/ns#Distribution" />
<cc:requires
rdf:resource="http://creativecommons.org/ns#Notice" />
<cc:requires
rdf:resource="http://creativecommons.org/ns#Attribution" />
<cc:permits
rdf:resource="http://creativecommons.org/ns#DerivativeWorks" />
<cc:requires
rdf:resource="http://creativecommons.org/ns#ShareAlike" />
</cc:License>
</rdf:RDF>
</metadata>
<g
inkscape:label="Calque 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(0,-924.36216)">
<path
style="fill:#eeeeee;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="m 0,988.3622 112,64 v -128 z"
id="path823"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cccc" />
<rect
style="opacity:1;vector-effect:none;fill:#eeeeee;fill-opacity:1;stroke:none;stroke-width:4;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
id="rect827"
width="192"
height="40.000023"
x="64"
y="968.36218"
ry="19.999977" />
<rect
style="opacity:1;vector-effect:none;fill:#f94840;fill-opacity:1;stroke:none;stroke-width:3.03314734;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
id="rect827-3"
width="184"
height="23.999966"
x="64"
y="976.36218"
ry="11.999962" />
<path
style="fill:#f94840;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="m 16,988.3622 88,48 v -96 z"
id="path823-6"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cccc" />
</g>
</svg>
This source diff could not be displayed because it is too large. You can view the blob instead.
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="64"
height="64"
viewBox="0 0 16.933333 16.933334"
version="1.1"
id="svg8"
inkscape:version="0.92.4 (5da689c313, 2019-01-14)"
sodipodi:docname="crash.svg">
<defs
id="defs2">
<linearGradient
inkscape:collect="always"
id="linearGradient821">
<stop
style="stop-color:#ffffff;stop-opacity:0.88253969"
offset="0"
id="stop817" />
<stop
id="stop844"
offset="0.30215055"
style="stop-color:#fbf57b;stop-opacity:0.88253969" />
<stop
style="stop-color:#fbbd7b;stop-opacity:0.50980395"
offset="0.66911936"
id="stop848" />
<stop
style="stop-color:#f57933;stop-opacity:0.66666669"