ATTENTION: You are viewing a page formatted for mobile devices; to view the full web page, click HERE.

Main Area and Open Discussion > Living Room

Code Combat!

(1/2) > >>

Edvard:
I considered posting this in Developer's Corner, but I think it should live here...

CodeCombat: Learn to Code by Playing a Game
Learn programming with a multiplayer live coding strategy game. You're a wizard, and your spells are JavaScript.

--- End quote ---

http://codecombat.com/




Well, Javascript & Python, with experimental use of Lua, Clojure, and a few others.

I played through a few levels, at first it was a bit boring, as you are limited to directions - 'self.moveRight()', that kind of thing.  But like any good adventure game, you pick up money and items along the way and are shown new programming tricks to access new your new abilities and items to get through the different mazes.  Very good for introducing programming to pre-to-mid-teens who haven't already picked up some javascript...

from TechRepublic - 10 Toys and Games that Teach Coding

Renegade:
That's a really damn cool game!!!  :Thmbsup: :Thmbsup: :Thmbsup: :Thmbsup: :Thmbsup:

Renegade:
Here's an SS of my character a few problems ago.



Here's the first solution:


--- Code: Javascript ---// Move to the gem.// Don't touch the walls!// Type your code below. this.moveRight();this.moveDown();this.moveRight();
So, very simple to get you used to the game. It adds methods/functions (I hate how JS uses "function" for everything when they would be better off distinguishing.)

this.moveXY(x, y); comes a bit later.

Here's an example of a problem solution:


--- Code: Javascript ---var enemy = this.findNearestEnemy();var count = 1;loop {        enemy = this.findNearestEnemy();        if (enemy)        {                if (this.isReady("cleave"))                {                        this.cleave(enemy);                } else {                        this.shield();                }        }}

Here's a problem:


--- Code: Javascript ---// Collect all the coins in each meadow.// Use flags to move between meadows.// Press Submit when you are ready to place flags. loop {    var flag = this.findFlag();    if (flag) {        // Pick up the flag.     } else {        // Automatically move to the nearest item you see.        var item = this.findNearestItem();        if (item) {            var position = item.pos;            var x = position.x;            var y = position.y;            this.moveXY(x, y);        }    }}
And the solution:


--- Code: Javascript ---// Collect all the coins in each meadow.// Use flags to move between meadows.// Press Submit when you are ready to place flags. loop {    var flag = this.findFlag();    if (flag) {        // Pick up the flag.        this.pickUpFlag(flag);    } else {        // Automatically move to the nearest item you see.        var item = this.findNearestItem();        if (item) {            var position = item.pos;            var x = position.x;            var y = position.y;            this.moveXY(x, y);        }    }}
Which shows how they gently ease you into new methods/functions.

They have a business model as well.



It's also open source.

Like... dammit... this is a friggin' cool game. This is the kind of game parents should PAY their kids to play! It's. That. Damn. Good.

Cudos to the developers. They've created a truly useful, brilliant game.

bit:
^Yes, this is totally awesome.  :Thmbsup:

rxantos:
Interesting and addictive game. Thanks for sharing the link.

Navigation

[0] Message Index

[#] Next page

Go to full version