6 ms·
Nice 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 HTM
by boneheadmed 15y ago
Nice 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.
- chrismdp 15y agoEasy porting to iPhone in the future is another big plus I should have mentioned in the original post.
- tptacek 15y agoThe 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 surprised at how good a fit ObjC is for a game engine you prototyped in Ruby, as opposed to C++.
- fleitz 15y agoObjC++ might be an even better fit
- tptacek 15y agoI always got a "stay on the golden path and away from ObjC++" vibe from ObjC++, kind of like trying to ask Rails to do database stuff without using ActiveRecord in 2008. You can easily write C++ code without having to bridge ObjC's object system to C++'s object-and-generics system: provide a simple C API to your C++ libraries. But the other thing is, one reason to do ObjC at all is to avoid all the heartache that comes bundled with C++. PS: You got modded down. Baffling. Fixed.
- cageface 15y agoObj-C++ is working well for me so far and the STL is much better than Obj-C's awkward and slow collection classes for anything that needs to run fast or that requires significant algorithmic complexity.
- tptacek 15y agoOne of the nice things about going back from Ruby to a C language is, it's hard to think of anything you could do in the C language that would be as non-performant as Ruby. As slow as ObjC's collections are, they're faster than Ruby's.
- cageface 15y agoYeah, and they're fast enough for a lot of things, but I'm doing DSP at 44.1k/sec and even C++ virtual functions are too slow for that. But I can use an STL vector at no penalty over a native array.
- pjmlp 15y agoIt is just a shame that in some areas Objective-C is still lacking compared with more modern languages: - a proper module system; - reliance on the primitive #import/#include which slows down compilation - no namespacing, relying instead on conventions to avoid clashes
- shaunxcode 15y agowhat about lua/love/corona?
- boneheadmed 15y agoI've thought of using Lua and if I recall correctly, work has been done to develop iPhone games with Lua as well? Ah, where is the time?
- ibisum 15y agoLua is absolutely fantastic for doing cross-platform games that support Windows, Chrome, iOS and Android from the same codebase. For some great examples of 'next generation' Lua-based engines to do cross-platform development, check out moai: http://getmoai.com http://getmoai.com and maratis3d: http://maratis3d http://maratis3d - Both tools are excellent resources for people who want to write games in a smart, friendly, efficient (quite fast!) language..
- shaunxcode 15y agoyeah corona sdk (which is not free, but seems to be worth the price of entry from my dabbling) compiles for iphone and android from common lua codebase. The api docs are easy to read, tons of examples and plugins (box2d etc.). I threw together an ipad app for my "boiling water" game I've been joking about for years with corona in about an hour having only ever looked at lua from afar. If you grok js/ruby/python than lua will be simple.