by

Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Zach Feldman
    @zachfeldman

    @MJshipley it appears you can't install ruby 2d because the native extension failed to build - this is a relatively common problem on Windows machines (happens on Macs too, but a lot of ruby devs are Mac or Linux users [not trying to start a flame war] and so don't always test on Windows environments.

    Have you thought about installing Ubuntu in Virtualbox on your Windows machine to dev from? Probably less likely to run into issues like this

    Meanwhile, does anyone know an easy way to export a Ruby 2d program to a high quality PNG, or the web? Can't find that in the docs anywhere
    trueFireblade
    @trueFireblade
    when I create a sprite object and use show() the script crashes, is this my fault somehow or is it a known problem?
    Maxwell-Sultan
    @Maxwell-Sultan
    I keep getting this error while trying to install the ruby2d gem while using terminal on my mac. ERROR: While executing gem ... (Gem::FilePermissionError)
    You don't have write permissions for the /Library/Ruby/Gems/2.6.0 directory
    Phil
    @sapphyrus
    is fixing utf-8 text somewhere on the roadmap for ruby2d? I don't wanna have to migrate to gosu :(
    Phil
    @sapphyrus
    or will this lib forever be stuck in 1999?
    Sahil Ahamad
    @ehsahil
    Hey guys
    I'm not able to install ruby2d on my mac
    can anyone please help me?
    Tom Black
    @blacktm
    @sapphyrus Code is open source, you're welcome to figure it out! 😉
    @ehsahil What's the error you're getting?
    @Maxwell-Sultan See this article for help: http://www.ruby2d.com/learn/macos/
    Stratejic
    @Stratejic
    Hey guys sorry to be a bother but I can't figure out how to close the window after making one i'm a bit confused with how the window works
    Victor Maslov
    @Nakilon
    someone might be interested https://github.com/superjer/tinyc.games
    Andrew Ballard
    @andrew-ballard1
    I'm working on a project using this library, here's the trailer https://streamable.com/npihhf
    Sebastjan Hribar
    @sebastjan-hribar
    @andrew-ballard1 I love it :)
    Looks great
    Andrew Ballard
    @andrew-ballard1
    Thanks! Once I can get the build command working I'll put a copy here. Has anybody been able to build a macos app on Catalina?
    I'm able to build successfully, but the app never launches. I'm following the naming and structure conventions to create a .app file that runs a script, but the script never gets ran. I'm curious if it's an issue specific to me, my box, or if its more common than that
    Wilson Silva
    @wilsonsilva
    Hello! I'm loving the library and I was about to build an abstraction on top of it. I couldn't find any way to rotate objects. Does such a feature exist?
    Wilson Silva
    @wilsonsilva
    ^ I meant rotating shapes
    Tom Black
    @blacktm
    Thanks @wilsonsilva, I don't think we have it available in the library yet, but I did write some math in C if you want to play around with it.
    Wilson Silva
    @wilsonsilva
    Thanks
    Tom Black
    @blacktm
    Looks awesome @andrew-ballard1, love the trailer! "Building" doesn't really work, to be honest. I mean, it could work, but we'd need to make some architectual changes. Supporting numerous Ruby engines has been holding us back (at one point we supported MRI, Opal, and mruby, yikes 😖).

    I've got a proposal actually, and would be interested in what others think.

    • We could make Ruby 2D exclusively support MRI, dropping other Ruby engines and the in-progress native work. Ruby 2D would continue to be a tool for casual 2D drawing, prototyping, stuff like that, and not specific to game development.
    • We could start a new project to make a proper Ruby game engine. It would be built on mruby, which is a Ruby interpreter intended to be compiled and embedded in binary form (Matz and team are actually developing it).

    Here are some features of a new Ruby game engine we could build together:

    • Designed for cross-platform distribution — If based on mruby, we could make it easy to build and distribute to any platform.
    • WebAssembly support — The browser is really the ultimate platform for widely distributing games, enabling more people to play your stuff. We could even wrap games with Electron for a native-like experience.
    • Interpreted game development — While games can be compiled for distribution, the development experience could still be nimble and iterative. While we wouldn’t use MRI, mruby is still a Ruby interpreter, and we’d be able to see changes on-the-fly without building a whole compiled version.
    • Extensible via mgems — We’d encourage an ecosystem of extensions to the engine using mruby’s mgem system (think typical Ruby gems for MRI, but for mruby).
    • 2D and 3D graphics — I’ve always wanted to experiment with 3D graphics, but Ruby 2D was never designed for that (it’s in the name, of course 😉). I can see this engine providing the basics (window, input, sound, etc), but not limiting the types of graphics. Essentially, you’d be able to choose the renderer. I’d still like to provide 2D out-of-the-box, but if someone would like to write their own renderer, they could go for it.
    • Always free and open source — The way it should be, in my opinion. Plus, I'd like to encourage anyone here in the community to help design and build thid thing. (Hey, this stuff is hard! 😆) I realize I haven't done a great job of that for Ruby 2D, so this would be a new beginning.

    Anyways, I’d love to hear all your thoughts! What are your game development interests? What would you want out of a game engine built for Ruby? Is this something you'd actually use and contribute to? Or, should we all just start learning Unreal instead (did you see that UE5 demo?!). Hope everyone is well and staying healthy in this trying times.

    Wilson Silva
    @wilsonsilva
    You have done the hardest part: the adapter to the low-level C graphic APIs. I would love to help. I used to be a Flash developer. Today I started a game, but very soon I needed to group items to move them together and I realised that I needed some abstractions. So I spent the whole day porting the Flash Display List API to Ruby and did a bit of reading about SDL and C (but I can't go that low).
    Tom Black
    @blacktm
    @wilsonsilva Ha, yea, that was hard-fought knowledge for sure (my first foray into low-level game and graphics APIs). Yea, those game development features are certainly missing from Ruby 2D (kinda intentionally so). I think an explicit game engine could both contain some of those basic concepts, but also allow others to extend and package as mgems. Flash definitely introduced easy(ish), portable game development to the world. I think WebAssembly and HTML5+ is the right place to invest in, while also not limiting the engine to the web (like a JavaScript game engine might).
    Andrew Ballard
    @andrew-ballard1

    I'd 100% use a ruby game engine based on ruby2d, in fact I'm already committed to the library as it is, with some slight modifications (mentioned below).
    Is there anything I need to do licensing-wise to use Ruby2D in a game? Specifically for something on Kickstarter and Steam?

    As for contributing, unfortunately I'm pretty out of my depth with anything low level... I mean I once managed to create a web-assembly build that didn't fail, and while it also didn't start, it was still an improvement from what I started with. I decided it was easier to just rebuild in javascript for the eventual web-version. I'd love to help out but I wouldn't want to learn at the expense of a project involving others. Typos or documentation though, I'm your guy :D


    On to potential features, personally I'm working on UI and Networking related modules.

    For UI, I've got manually placed text classes but I'm working on an interpreter that accepts pseudo percentages for positioning. I slapped a width and height property on the text class and added a contains? method to help out for now.

    For networking, I'm using websocket-client-simple and running a node server to handle multiplayer stuff, but I have yet to put the game logic on a box somewhere and test it.

    Both of these are somewhat related to my job so its not too far out of my grasp, but I'd be curious if anybody has experience with other game engines and what features they offer to cover these bases.

    Taylor A Coon
    @Clashbuster
    Hey all.
    I used ruby 2d to make an algorithm visualization yesterday. Gotta say, I picked up ruby 2d and had this visualization working in like 3 hours. I am very impressed with how easy it was to use, and for my use case, I struggle to imagine an easier solution.
    Here's the link in case you're curious https://youtu.be/G9PuMSc3kZ0
    Kthkt99🇲🇾
    @kthkt99_twitter
    Does anyone knows how to do a main menu in ruby2d? I am doing some modification on the snake game tutorial and I just wanted to add a main menu in the beginning like the start button and quit button
    Victor Crispin
    @vcjr
    Hey guys any Docs on Ruby2d available?
    Savi
    @TheRealSavi
    @kthkt99_twitter i have a gem called savio that can create buttons and other things. https://rubygems.org/gems/savio
    Victor Crispin
    @vcjr
    @TheRealSavi Thank you!
    Hey Savi would it be good to run Rdoc on the repo to generate a doc?
    Savi
    @TheRealSavi
    i have not a single clue lol
    i always just look through the source code when i need to know something
    Victor Crispin
    @vcjr
    yea that's what I've been doing for now :)
    Fikri Rahmat Nurhidayat
    @FikriRNurhidayat
    Anyway to disable the auto focus when you run ruby filename.rb ??
    Tom Black
    @blacktm
    @FikriRNurhidayat Not sure, that's SDL doing that. There are a number of window flags we could expose, list is here: https://wiki.libsdl.org/SDL_WindowFlags
    Romalvir
    @rrromal
    Im having trouble installing ruby 2D, hombrew is installed when entering command "gem install ruby2d" I get
    Reason: image not found - /Users/romal/.rbenv/versions/2.6.3/lib/ruby/2.6.0/x86_64-darwin18/openssl.bundle
    ERROR: While executing gem ... (NoMethodError)
    undefined method `invoke_with_build_args' for nil:NilClass
    Romalvir
    @rrromal
    nvm. all good, had to reinstall ruby.
    Zeke Abuhoff
    @Baconthorpe
    @blacktm I was just building something (hope to share it here soon) and wanted to try building for a few different platforms. I noticed that building for the web was deactivated with a note about it being upgraded. It looks like that build target has been turned off for a while and I was wondering if there's anything I can do to help get it running again. Also, building for MacOS resulted in an executable that did nothing. Is there something I could experiment with or research to get those going again?
    That Matt, going to Change it all up
    @OnlyMattDesind_twitter
    everytime I try to install gem ruby2d I get an error
    and it will fail
    Mario Visic
    @mariovisic
    @OnlyMattDesind_twitter can you paste the error that you're getting so we can see?
    Tom Black
    @blacktm
    Hi @Baconthorpe. Building natively and for the web was a pretty ambitious idea that didn’t really pan out. The Ruby interpreter MRI can’t really be packaged practically, and so we’re then limited to MRuby, which is very different from people’s expectation of Ruby as a language and lacks the gem ecosystem.
    Zeke Abuhoff
    @Baconthorpe
    Ah, interesting. Hence the interest in an mruby spin-off (my two cents: that idea sounds really neat and if doing it in 3D is practical, go for it, but I would be happy with just a 2D version of such a project). As for my recent project, I'm still working on getting it ready to show, but I'll post here when it is.