It is really fun to see games coded in a language you know (and is not used for gamedev) -- completely new way of programming/thinking. There is another great video similar to this of Tom Dalling coding a flappy bird clone using Gosu: https://www.youtube.com/watch?v=QtIlyU2Br3o
That is how C and Pascal got to displace Assembly, and C++ eventually displaced C in game development. By having devs that instead of following "it cannot be done", persisted and eventually were able to release something in those languages that others wanted to play. Having watched this cycle a few times, I always look forward to see higher level programming languages used in broader contexts. However for game develo…
Building Street Fighter II in Ruby [video]
31–39 of 39 posts
Re: Building Street Fighter II in Ruby [video]
#32Earlier quoted context omitted.
That is how C and Pascal got to displace Assembly, and C++ eventually displaced C in game development. By having devs that instead of following "it cannot be done", persisted and eventually were able to release something in those languages that others wanted to play. Having watched this cycle a few times, I always look forward to see higher level programming languages used in broader contexts. However for game develo…
considering rubymotion, i think ruby is still a feasible option though
But yeah, I imagine compiling Ruby is not much dissimilar than compiling Dylan.
Re: Building Street Fighter II in Ruby [video]
#33Re: Building Street Fighter II in Ruby [video]
#34Earlier quoted context omitted.
considering rubymotion, i think ruby is still a feasible option though
Yes, assuming something similar ever becomes available outside the Apple world. AFAIK they only focus on those systems. But yeah, I imagine compiling Ruby is not much dissimilar than compiling Dylan.
Actually, compiling Ruby is not that bad, horrible grammar (from the perspective of having to write a parser - as a user o the language I like it) notwithstanding.
Compiling Ruby into efficient code is a nightmare.
The problem is largely that there's a total lack of delineation of application read/load time and runtime, coupled with the ease of being able to mutate the object model.
E.g. in theory on return from any method statement the entire world might have been transformed. 2 + 2 = 4 one moment, only for 2 + 2 to have side effects and return 5 the next...
The "quick and dirty" way of compiling Ruby is to accept that you'll need expensive dynamic message call invocations all over the place.
Optimizing beyond that is a lot of work to ensure you can handle it when people start playing silly games. The jRuby Truffle backend is probably the best bet at the moment (Chris Seaton who did the initial work on that is on HN). If I ever get that far with mine, I'll be stealing lots of ideas fro there...
Re: Building Street Fighter II in Ruby [video]
#35i liked the explanation of reducing draw() to 1 sprite per call and the little formula that went along with it; ive never seen that. make a video about just tricks used in the industry!
Re: Building Street Fighter II in Ruby [video]
#36Earlier quoted context omitted.
Yes, assuming something similar ever becomes available outside the Apple world. AFAIK they only focus on those systems. But yeah, I imagine compiling Ruby is not much dissimilar than compiling Dylan.
I don't know Dylan, but compiling Ruby is a nightmare. As such it's also a fun challenge (working on "as static as possible" Ruby compiler). Actually, compiling Ruby is not that bad, horrible grammar (from the perspective of having to write a parser - as a user o the language I like it) notwithstanding. Compiling Ruby into efficient code is a nightmare. The problem is largely that there's a total lack of delineation…
So what you are telling about Ruby is also an issue in Dylan, given its Lisp heritage and flexibility.
Re: Building Street Fighter II in Ruby [video]
#37It's actually stunningly common to use high-level languages with managed run-times in games these days. Most indie and small-studio games we play today were built using one engine or another. The graphics pipeline in Unity, Gamemaker, etc might be heavily optimized but the majority of the game is written in an interpreted or managed language run-time like Lua or C#.
You can write 3D simulations with a decent frame-rate in Python. You just need a lot of help with the "hot" spots be calling out to C and C++ libraries for support. I've been experimenting with writing little 3D engines in Cython + Python + SDL2. It does end up taking a load more memory and performance can drop drastically if you're not consciously thinking about your data-flow. The trick I've found is to avoid most of the features that make Python great in those critical sections... plain old data structures, weak references, pack your data together and transform it once (ie: avoid copies).
However it's great for prototyping and toying with new ideas. Python is vastly more forgiving when you don't know up-front how you're going to structure your data flows.
But in the end I just end up going back to C99 at some point anyway.
Writing games in Ruby shouldn't be weird. It's cool.
Re: Building Street Fighter II in Ruby [video]
#38Do you have plan to add the code when 2 players hit each other?
Re: Building Street Fighter II in Ruby [video]
#39Earlier quoted context omitted.
That is how C and Pascal got to displace Assembly, and C++ eventually displaced C in game development. By having devs that instead of following "it cannot be done", persisted and eventually were able to release something in those languages that others wanted to play. Having watched this cycle a few times, I always look forward to see higher level programming languages used in broader contexts. However for game develo…
considering rubymotion, i think ruby is still a feasible option though
RubyMotion just badly needs a .NET/IronRuby port, or anything else that'll work well on Windows... :(