RobotWar with Blockly

470 views
Skip to first unread message

Alspach Family

unread,
Jun 12, 2012, 9:15:22 PM6/12/12
to Blockly
Does anyone remember p-robots or c-robots or Robotwars (http://
en.wikipedia.org/wiki/RobotWar)? What would it take to build a smiler
game using Blockly?
I have already seen posts where people were trying to solve the maze
ins a quicker time or with fewer lines of code. A game like this would
allow people to play against one another (or against stock robots) to
really test your skills.
If somebody can pull it off I may have to take vacation from work
since I will be stuck for a while! :-)

James

Neil Fraser

unread,
Jun 12, 2012, 9:35:21 PM6/12/12
to blo...@googlegroups.com
On 12 June 2012 18:15, Alspach Family <jals...@gmail.com> wrote:
> Does anyone remember p-robots or c-robots or Robotwars (http://
> en.wikipedia.org/wiki/RobotWar)? What would it take to build a smiler
> game using Blockly?

I remember CRobots very well. In the mid-90s my RAMBO.R was a force
to be reckoned with.

Yes, Blockly would make an awesome reboot of CRobots. Assuming a
web-based version of the game itself is created (duh), the only trick
to integration is to run the users' code in separate Web Workers so
that they are isolated from each other. This also prevents infinite
loops from crashing the system.

--
Neil Fraser
http://neil.fraser.name

Alspach Family

unread,
Jun 13, 2012, 11:30:50 AM6/13/12
to Blockly
The combination of an easy to use language (Blockly), competition
between students or groups of students and a very specific task (win
the war); would make this a perfect way to teach programming logic to
a classroom.
You are right that once somebody built the 'world' all participants
would have to do is upload their XML bot into it. The maze demo really
got me thinking about even having different 'maps' to play on. The
wide open field like before would be default but; add the ability to
fire and scan (and run multiple users of course) to the demo map, and
you would be onto something slightly different but also very cool.
I wish I had the skills (and time) to make it happen. Now that we have
started talking about it maybe somebody will put something together.

James

On Jun 12, 6:35 pm, Neil Fraser <r...@neil.fraser.name> wrote:

Márcio Mello

unread,
Aug 9, 2012, 3:02:50 PM8/9/12
to blo...@googlegroups.com
Hello Alspach, that´s the reason i found Blockly!
Im a game developer (or was till last year), i've been looking for a good method for implementing the "visual programming" i need. So i found blockly!
But to make things easy i need to force some behaviours, the simplest ones are: all parameters must be inline, no disable block option, and no mutators too. I would REALLY apreciate if you or someone else in this list could help-me to achieve this, so i could get to the game programming more quickly. Hou about a new colaborative open source  (or commercial why not!?) project hu ?

Jeff Rose

unread,
Aug 10, 2012, 4:57:19 PM8/10/12
to blo...@googlegroups.com
I'm a game developer (in training) and I've got a project in mind that involves allowing the player being able to write small programs as part of the game itself. Blockly seems like the perfect way to provide this functionality to me. While I'm insanely busy with school and web development projects to pay for school, I'm not sure I'd be able to get all that involved in such a project but I would love to see something like this happen.

My target platform is Unity, though, so I'm really hoping to work out a way that Blockly can be implemented in a Unity GUI that players can interact with.

Laurent David

unread,
Aug 11, 2012, 4:52:44 PM8/11/12
to blo...@googlegroups.com
Hi,

We have developped something slightly different but that could relate to that by integrating MelonJS and Blocly.
End result is not too bad even though it would be worth thinking about a more streamlined structure (i.e. you can replace a game and the block definition without touching the "core").
The idea is to have a game where the main player receives instructions from the block, similarly to the maze demo, but more "flexible" in term of the outcome.
Please any feedback welcome !


Laurent David

unread,
Aug 11, 2012, 4:58:00 PM8/11/12
to blo...@googlegroups.com

Doha Basem

unread,
Nov 28, 2016, 10:13:41 AM11/28/16
to Blockly, jals...@gmail.com
Have you found a way to control objects in Unity using the blockly blocks .If so ,I would very much appreciate your help as resources in the internet concerning this issue is really sparse. 

Cory Diers

unread,
Nov 29, 2016, 12:54:50 PM11/29/16
to blo...@googlegroups.com, jals...@gmail.com
Hi Doha,

It's certainly possible. I've played around with code generation a little bit, and managed to get Blockly code generating from Unity. My code is a rather hacked together proof of concept, and only works in iOS, but the idea should be extensible. There are two steps you need to deal with. The first is generation. You'll need to create a web view, and load a Blockly instance inside of it. That's going to change depending on the OS you're working with - you can't make a "Unity web view," so it'll need to change with every platform. Load Blockly into that web view. Then, you'll need to generate code - again, you'll need to write some native code to bridge this gap - you need to call a generate function natively in the web view. Pass that back to Unity, and you have your code.

Running the code is a question I can't help much with, I haven't investigated that step, yet. I would recommend generating Lua code, since there are plenty of Lua interpreters available for Unity.

--
You received this message because you are subscribed to the Google Groups "Blockly" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blockly+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Cory Diers | Software Engineer | cory...@google.com | 

Kushal Trivedi

unread,
May 21, 2019, 7:51:09 AM5/21/19
to Blockly
Hi,

My team is building something similar to what you guys have been disucssing over here. If anyone is still looking to collaborate, then do get back. I have tech bandwidth for now.
Reply all
Reply to author
Forward
0 new messages