musicblocks icon indicating copy to clipboard operation
musicblocks copied to clipboard

Create a typing game for Music Blocks

Open pikurasa opened this issue 1 year ago • 14 comments

There are a myriad of different ways to implement this, but it would be nice to program a typing game in Music Blocks.

Some basic needs for a "level 1":

  • Quiz user on pressing various keys on the keyboard
  • User receives some feedback from correct and incorrect answers
  • Music -- either background, or based on keys pressed, or both

Some inspiration: Tux Typing has a game where letters fall from the top of the screen while the user tries to press those keys before they get to the bottom. We have some projects on the planet that are a similar concept but without typing (see projects tagged "games" from Planet). But other design ideas are welcome.

pikurasa avatar Jan 31 '24 13:01 pikurasa

hello @pikurasa how can we proceed for this approach.

AviGawande avatar Feb 04 '24 09:02 AviGawande

@walterbender , Is it worthwhile working on this ?

Thank you

Karan-Palan avatar Feb 11 '24 11:02 Karan-Palan

hello @pikurasa how can we proceed for this approach.

I really don't want to be too prescriptive for this one, especially with prospective GSoC contributors. If you need inspiration, I recommend looking on the Planet (globe icon in upper-right of screen) and look at projects tagged as "games".

pikurasa avatar Feb 11 '24 12:02 pikurasa

@pikurasa I would also like to work on developing this game

vaishnavi192 avatar Feb 11 '24 18:02 vaishnavi192

@pikurasa I would also like to work on developing this game

No need to ask. Just go for it.

pikurasa avatar Feb 13 '24 01:02 pikurasa

Made a basic structure. Will try to make it like Tux-Typing and once the design gets fixed integrate into the project

Screencast from 2024-02-14 20-26-10.webm

Karan-Palan avatar Feb 14 '24 16:02 Karan-Palan

Made a basic structure. Will try to make it like Tux-Typing and once the design gets fixed integrate into the project Screencast.from.2024-02-14.20-26-10.webm

I think you are misunderstanding a fundamental part of this issue: The typing game is to be created via Music Blocks visual programming language, not JS. Please go here: https://musicblocks.sugarlabs.org/ and use that code to create the project.

It should be a sample for kids, for example, to use and to learn from.

pikurasa avatar Feb 14 '24 16:02 pikurasa

Ohh understood ! Will look into it

Karan-Palan avatar Feb 14 '24 16:02 Karan-Palan

@pikurasa The idea seemed interesting to me and I have made some progress. Here is a sample music blocks project However, I am facing issues with synchronising multiple mice (for falling of letters and for input I have used separate mice so that they can run concurrently). I want the screen/background to reset after the user has entered the correct letter. I have tried to synchronise using a common variable(result) but didn't achieve the desired results. Can you help me with suggestions to achieve the same?

harshuttamchandani avatar Mar 29 '24 19:03 harshuttamchandani

@pikurasa The idea seemed interesting to me and I have made some progress. Here is a sample music blocks project

Before addressing your other questions, I checked it out, and you're on to a great start.

Here is my remix of your project: https://musicblocks.sugarlabs.org/index.html?id=1711749302847431&run=True

(I'll respond to the other points in a sec.)

pikurasa avatar Mar 29 '24 22:03 pikurasa

I want the screen/background to reset after the user has entered the correct letter. I have tried to synchronise using a common variable(result) but didn't achieve the desired results. Can you help me with suggestions to achieve the same?

What do you mean by reset the screen/background?

Hide the blocks or something else?

pikurasa avatar Mar 29 '24 22:03 pikurasa

Here is my remix of your project: https://musicblocks.sugarlabs.org/index.html?id=1711749302847431&run=True

This seems fun. The sounds add a flavour. Thanks for this.

What do you mean by reset the screen/background? Hide the blocks or something else?

I want to reset the mice and the input to the state they were at the start of the game when I first clicked run. I don't seem to get the combination of clear and set mouse positions right. See the images below. Screenshot 2024-03-30 at 9 39 53 PM Initial screen setup ^^ Screenshot 2024-03-30 at 9 40 16 PM When the correct letter is entered ^^

Screenshot 2024-03-30 at 9 40 04 PM Succeding turn ^^

harshuttamchandani avatar Mar 30 '24 16:03 harshuttamchandani

Are the letters supposed to fall down the screen? I think the scroll xy block could be used to do that. Then use the erase media block to erase the letter before adding a new one.

walterbender avatar Mar 30 '24 22:03 walterbender

Thanks for the input. Implemented the same using back and erase media block. Now it looks smoother in terms of transitions. Here is the music blocks project.

harshuttamchandani avatar Mar 31 '24 14:03 harshuttamchandani