coderunner
coderunner

Reputation: 599

is it possible to use ruby to create the client side code for a web game?

i'm looking at creating a web game using html5 canvas and javascript. i was wondering ,howerver, if it is possible to use ruby to create the client side code for a web game? (i found one other question for this but it was over a year ago and hoping maybe there has been progress in this since then).

thanks in advance people of stackoverflow!

Upvotes: 0

Views: 179

Answers (1)

vomitcuddle
vomitcuddle

Reputation: 315

Depends what you mean. For the browser-side code, you will have to use JavaScript for drawing to your canvas and making AJAX requests to your webserver.

For the webserver-side code, it depends. If you are making a social/multiplayer game, you could probably code your entire game server as a RESTful JSON API in Ruby. If you absolutely have to interact with a server on another computer/process, just make sure that it exposes an interface that Ruby can interact with and code a Ruby JSON API on top of that.

If you are looking for a JavaScript alternative with Ruby-like syntax, check out CoffeeScript.

Upvotes: 2

Related Questions