Hacker News new | ask | show | jobs
by piqalq 2962 days ago
I’ve wondered, why are these types of games, such as Screeps or WarriorJS only ever made to be played with JS. Why not Python or Go or Assembly?
5 comments

There are many polyglot "code games".

Off the top of my head: http://codingame.com/ - They support a lot of languages, even Rust!

I also remember an old Java application where you would write AIs for dueling bots, but I don't recall the name.

The folks at https://codegolf.stackexchange.com/ also host several games like that, more often than not competitively, however, and not open-ended or "singleplayer" games. Most accept any language that can take stdin and print stdout.

You are probably thinking of http://robocode.sourceforge.net/

I played this like 17 years ago and to my most pleasant surprise, the project is still alive.

> I also remember an old Java application where you would write AIs for dueling bots, but I don't recall the name.

Sounds like Robocode.

This one's based on [ruby-warrior](https://github.com/ryanb/ruby-warrior).

I'm sure there are other ports for other languages too. I'm pretty sure there's a Python one for one.

https://en.wikipedia.org/wiki/Core_War

Probably because if it's going to be in the browser, they have to do a large chunk of the work in JS anyways

and of course, everything is JS these days

Everybody and their cousin can write basic javascript, especially for these kinds of pretty easy cases.

If you know python and had never written JS before, you could probably still play this with a bit of trial and error.

Why would you use those over the ubiquitous language?