I'd be interested in HNers' views on whether I made the right call.
Why I switched from Ruby back to C++
11–20 of 100 posts
Re: Why I switched from Ruby back to C++
#12I wonder if switching to JRuby wouldn't have solved some of his problems? I'd imagine that distribution is much easier on JRuby. I suppose the issue is with libraries, but I'm not familiar with the libraries he mentioned.
Re: Why I switched from Ruby back to C++
#13I'd be interested in HNers' views on whether I made the right call.
Re: Why I switched from Ruby back to C++
#14Nice write up. I wrote my own 2d game engine in C++ a while back. Switching to Ruby was great, but I never made any games. I did make a couple of JavaScript HTML 5 games. But here again speed is a limitation, and so am looking into C (and eventually Objective C) to eventually do some iPhone game making. As great as it would be to make games soley with scripting/interpreted languages, I don't think we're there yet.
Easy porting to iPhone in the future is another big plus I should have mentioned in the original post.
ObjC's way of handling mundane data structures (strings, arrays, hashes) is (once you learn to stop worrying and love long sequences of calls to very long method names) very similar to how Ruby addresses the same problems.
ObjC lets you drop into vanilla C code when you want to.
ObjC doesn't impose GC.
ObjC implements a form of duck typing.
You might be surprised at how good a fit ObjC is for a game engine you prototyped in Ruby, as opposed to C++.
Re: Why I switched from Ruby back to C++
#15I'd be interested in HNers' views on whether I made the right call.
Speaking as a huge fan of Ruby, I think it's absolutely the wrong language to write games in, because games are enormously sensitive to runtime fluctuations, and as you found out, Ruby has them. In particular, a stop-the-world GC is just never going to give you satisfactory performance, unless every GC pass happens in That said, you might consider Lua as a primary scripting engine for your game. It's got a lot of you…
Re: Why I switched from Ruby back to C++
#16I'd be interested in HNers' views on whether I made the right call.
Re: Why I switched from Ruby back to C++
#17I'd be interested in HNers' views on whether I made the right call.
Re: Why I switched from Ruby back to C++
#18Earlier quoted context omitted.
Speaking as a huge fan of Ruby, I think it's absolutely the wrong language to write games in, because games are enormously sensitive to runtime fluctuations, and as you found out, Ruby has them. In particular, a stop-the-world GC is just never going to give you satisfactory performance, unless every GC pass happens in That said, you might consider Lua as a primary scripting engine for your game. It's got a lot of you…
I'll look into LUA. Never used it back in my games dev days as it was just coming into vogue.
Re: Why I switched from Ruby back to C++
#19I'd be interested in HNers' views on whether I made the right call.
Speaking as a huge fan of Ruby, I think it's absolutely the wrong language to write games in, because games are enormously sensitive to runtime fluctuations, and as you found out, Ruby has them. In particular, a stop-the-world GC is just never going to give you satisfactory performance, unless every GC pass happens in That said, you might consider Lua as a primary scripting engine for your game. It's got a lot of you…
As for Lua, Garry's mod runs almost entirely in Lua (outside of the source engine).
Re: Why I switched from Ruby back to C++
#20Earlier quoted context omitted.
Easy porting to iPhone in the future is another big plus I should have mentioned in the original post.
The ObjC object model is very similar to Ruby's object model. ObjC's way of handling mundane data structures (strings, arrays, hashes) is (once you learn to stop worrying and love long sequences of calls to very long method names) very similar to how Ruby addresses the same problems. ObjC lets you drop into vanilla C code when you want to. ObjC doesn't impose GC. ObjC implements a form of duck typing. You might be su…