Which 3D Engine for Ruby

Programming Unity Games with Ruby

If your question is actually "how do I compile Ruby to JavaScript" then that's easier to answer:

Opal: Ruby to JavaScript compiler

However, you're going to be mucher better off learning one of the supported languages. It's very hard to debug "your" code when what's running is a paraphrasing of the code in another language.

Ruby game frameworks that are still actively maintained?

I've been using a couple of such frameworks. And I switched to Rubygame from Gosu. Rubygame codebase is not being often updated in last six months, but people still rock.

As for me, Rubygame is more convenient. It is subjective, but I am writing a 3D strategic game with units which can be controlled by players' Ruby code; this task is much harder to implement using Gosu.

P.S. May be 'actively maintained' is not what you really want. What is the framework problem which you think can be resolved by active maintenance?

How to write a 3D graphics engine which can be used in JavaScript?

Edit: This question was asked many years ago. Since then, every browser except for IE (for now?) has added support for webgl. You can see many samples here: http://www.chromeexperiments.com/webgl/

I truly don't want to discourage you, but in order to write a 3D engine in JavaScript, you have to be extremely well versed and intimate in the math/logic behind 3D rendering.

Since you didn't state your current expertise, I'm assuming you don't ... in which case I strongly suggest that you start somewhere else. For example, XNA Game Studio. You write the code in C#, and there are already a lot of well written APIs that abstract most (but definitely not all) of the hard parts. But it's a great way to learn a lot of the concepts and math behind 3D rendering.

If however, you are dead set on starting with JavaScript, there's already a lot of resources on the Internet about this. For example this one :-)

http://dev.opera.com/articles/view/3d-games-with-canvas-and-raycasting-part/

Good luck!

Game Engine Scripting Languages

The syntax is a matter of taste, Lua is like Javascript but with curly braces replaced with Pascal-like keywords. It has the nice syntactic feature that semicolons are never required but whitespace is still not significant, so you can even remove all line breaks and have it still work. As someone who started with C I'd say Python is the one with esoteric syntax compared to all the other languages.

LuaJIT is also around 10 times as fast as Python and the Lua interpreter is much much smaller (150kb or around 15k lines of C which you can actually read through and understand). You can let the user script your game without having to embed a massive language. On the other hand if you rip the parser part out of Lua it becomes even smaller.

How to include a plugin/engine in a rails application?

Rails engine is an isolated rails app, that is mounted inside main app. Two main reasons to create an engine are isolation of an application part (with possible intent to split the app into pieces) and code reuse (when you use same engine in several apps)

Technically it is a ruby gem, but often engines start (and live) as an isolated part of a larger app, without being completely extracted into own repository, gem publishing etc.
For example, if you have admin part of your app, you can make it an engine:

# in gemfile:
gem 'admin', path: 'engines/admin'

# routes:
mount Admin::Engine => '/admin'

# engine's routes:
resources :foo # => because of being in an engine this will be /admin/foo

directory structure can look like:

|-app/
|-bin/
|-...
|-config/
|-application.rb
|-routes.rb
|-engines/
|-admin_engine/
|-app/
|-controllers/admin/
|- foo_controller.rb
|-config/
|-routes.rb # <- this is engine's routes
|-lib/
|-admin/
|-engine.rb
|- admin.gemspec


Related Topics



Leave a reply



Submit