• Register
Forum Thread
  Posts  
What I code games in (Forums : Coding & Scripting : What I code games in) Locked
Thread Options
Sep 17 2014 Anchor

I code my games in Ruby, which is a pretty easy, object-oriented language. The reason why I chose Ruby was because It made it easy to make prototypes and get patches out easy in a jiff. So really, the better question you should be asking, What engine do i use?. I program my games from scratch, and It's easy to test the game straight from the interpreter, since Ruby is interpreted too, instead of compiled.

Here is a snippet of code from a game I am working on:

print "What is your name"
input1 = gets.chomp
if input1 < 0
    print "You didn't say your name, what is it"
else
  print "Hi, #{input1}"
end

And the code above is pretty high-level compared to C++ whose hello world program is as complex as this

#include <iostream>
using namespace std;

int main() {
   couts <<"Hello World!"<< endl;
   return 0;
}

Pretty low level huh? So try ruby, it has cleaner syntax than this, PLUS, it has automatic memory management!

Edited by: FirstSecondThird

Oct 19 2014 Anchor

For real time applications C++ is preferred since you have much more flexibility and power.
Even on languages like Java and C#.

Ruby has it's own limitations, I don't think you should relay on Ruby.

The auto memory management stuff- It's not always plays a part of performance boost and I know what i'm talking about.
Although it can heavily ease your work and do boost performance, you need to code clever to justify it.
Or else you'll end up spinning more time in the collection of objects rather then calculate your next vector.
----
A ++ for ruby, it is an easier and cleaner language to use and I always find it "fun" to program with.
The syntax is simple and neat, if you find yourself programming small games you shouldn't use a 20 ton cannon like C++ just to kill a fly.

Edited by: iDeveloper

Oct 24 2014 Anchor

Umm.. Just saying that c++ hello world isn't very complex at all (and the version you wrote wouldn't even work), and c++ is the most used/preferred language for games..
I've never heard of any successful/big games made with Ruby. If there are, please let me know.

Nothing against Ruby. I like Ruby. But doesn't really make sense to make games in Ruby. And doesn't really make sense to put down c++ and say Ruby is better for making games.. Just sayin :P

(and automatic memory management isn't always a good thing. Especially in games.)

--

Youtube.com
^^ Computer Programming/Game Development Tutorials ^^
Reply to thread
click to sign in and post

Only registered members can share their thoughts. So come on! Join the community today (totally free - or sign in with your social account on the right) and join in the conversation.