tjpalmer / blockly-mario

HTML Infinite Mario with Blockly scripting.
20 stars 6 forks source link

Start up tutorial on Mario Blockly #1

Open adielashrov opened 11 years ago

adielashrov commented 11 years ago

Hey,

I've started looking at Mario blockly at http://tjpalmer.github.io/blockly-mario/

I've managed to play manually but after creating a blockly script for Mario , I couldn't manage to 'load' the script into the game.It simply crashes not matter on which browser i'm working or which script I have written.

When do I need to load the script into the game? during the game? or before in the Map stage? Do I have to write a script which takes care of the map stage, or I'm free to write a script which only deals with Mario's behavior during the game?

Do you have a simple tutorial on the Blockly-Mario (Not at developer guide, a simple user tutorial will do for now)

Regards

Adiel

tjpalmer commented 11 years ago

Loading is for loading saved programs from your computer.

You probably are looking for the Update button at left, but crashing's not good. I've done fine overall in recent Firefox and Chrome. I've had trouble with Blockly generally in other browsers (including Safari).

I agree a tutorial would be a really good idea. So far, I've only used this where I've been physically present, so I could easily give instructions to participants.

Maybe I should do screencast or something.

adielashrov commented 11 years ago

Hey,

I was talking about the updating button on the left.

Is it possible that you we will send me/upload some screen shots on how to add AI behavior to the game?

Cheers

Adiel

On Wed, Jul 24, 2013 at 10:55 PM, Tom Palmer notifications@github.comwrote:

Loading is for loading saved programs from your computer.

You probably are looking for the Update button at left, but crashing's not good. I've done fine overall in recent Firefox and Chrome. I've had trouble with Blockly generally in other browsers (including Safari).

I agree a tutorial would be a really good idea. So far, I've only used this where I've been physically present, so I could easily give instructions to participants.

Maybe I should do screencast or something.

— Reply to this email directly or view it on GitHubhttps://github.com/tjpalmer/blockly-mario/issues/1#issuecomment-21511507 .

danfinlay commented 11 years ago

Could you commit a good example of a script, for users to update? I'd love to see how you're using this, but it's very confusing on its own.

tjpalmer commented 11 years ago

Okay, I just pushed a change with two example scripts. I also added a bit of disorderly text to the main readme.

Use the open link in the upper-right corner to open them. (A bug makes it so you might need to click in the blocks area some to make them appear. Not sure about that.)

Anyway, once it's loaded, you can click the update button and turn on AI control.

The jump example is only interesting once you are already in a world. The "somewhat advanced" example still isn't too smart, but it can randomly wander the map, and it sometimes beats levels.

tjpalmer commented 11 years ago

Sorry about no awesome screencasts or tutorials yet. Perhaps the examples will be enough to get started.

j2l commented 10 years ago

Congrats for this gem! Very nice for kids to learn coding. My kids (and I) would like a "(if) key pressed = ..." blocky to be able to control Mario within AI control (to add wings to Mario as soon as level is entered for instance). This way, they discover the power of each magic block to tweak behaviors of game characters, step by step. Advanced script is frustrating, there's no more game (but very nice AI). Let me know if it's possible and when it's done, to get back with kids :)

tjpalmer commented 10 years ago

I'm glad to hear you like it.

For AI, I find that simple logic (move forward while jumping) goes a long way, but anything sophisticated gets really bulky for the Blockly representation.

One option for the key press would be to allow AI and manual control at the same time in an automated fashion, but I'm not sure exactly what might work. Your blocks for checking keys might also be a good idea. You could open a separate issue on that.

I'm not sure what you mean about adding wings to Mario.

Overall, I also sadly don't have much time to work on this in the foreseeable future. Still, it could be worthwhile to open the specific issues on the specific requests. (While unlikely, it's not impossible that my circumstances could change, or maybe someone else would benefit from seeing various recommended improvements in making decisions for projects of their own.)