Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Sourav Goswami
    @Souravgoswami
    Just a question... Doesn't ruby2d support JRuby?
    I never tried, but looks like JRuby can't compile Ruby C extensions?
    Ualace Henrique Santos Café
    @Uolcisney_twitter
    Have anyone managed to build an executable (Windows) with OCRA using this gem? I've tried everything, included all DLLs I could think of but it doesn't work
    The specified module could not be found. - C:/Users/.../AppData/Local/Temp/ocr29AE.tmp/lib/ruby/gems/3.0.0/gems/ruby2d-0.9.4/lib/ruby2d/ruby2d.so (LoadError)
    That's the last one I got. I'm sure if I manage to fix this, it will work
    What are the dependencies of this shared object file?
    pyrareae
    @pyrareae_gitlab
    Is it possible to draw to a buffer rather than drawing to a display?
    Sourav Goswami
    @Souravgoswami

    The specified module could not be found. - C:/Users/.../AppData/Local/Temp/ocr29AE.tmp/lib/ruby/gems/3.0.0/gems/ruby2d-0.9.4/lib/ruby2d/ruby2d.so (LoadError)

    Is that a error because Ruby's load path doesn't include that path? It looks like a temporary path, and probably got deleted?

    All you can do is straight up require C:/Users/.../AppData/Local/Temp/ocr29AE.tmp/lib/ruby/gems/3.0.0/gems/ruby2d-0.9.4/lib/ruby2d/ruby2d.so if it's compiled right...
    Ualace Henrique Santos Café
    @Uolcisney_twitter

    The specified module could not be found. - C:/Users/.../AppData/Local/Temp/ocr29AE.tmp/lib/ruby/gems/3.0.0/gems/ruby2d-0.9.4/lib/ruby2d/ruby2d.so (LoadError)

    Is that a error because Ruby's load path doesn't include that path? It looks like a temporary path, and probably got deleted?

    It does, yeah. The gem works perfectly everyday and OCRA builds an executable without problem. The thing is when I try to open the .exe file that was created, then that error appears.

    I had the same problem before trying to create an exe with another gem (not Ruby2D), I solved it by manually including the dependencies of its .so file in the command prompt when using OCRA
    Sourav Goswami
    @Souravgoswami
    Yes, manually putting the so files is best idea, but you need to make sure it's compiled with mtune=generic, and march=x86-64 or whatever you want to support...
    Ualace Henrique Santos Café
    @Uolcisney_twitter
    Ah, no no. It doesn't use GCC at all. OCRA doesn't make the Ruby script compilable, it just loads the Ruby interpreter, gems, etc. into the exe output file. So no, I don't think these are available options on the OCRA command line

    Ah, no no. It doesn't use GCC at all. OCRA doesn't make the Ruby script compilable, it just loads the Ruby interpreter, gems, etc. into the exe output file. So no, I don't think these are available options on the OCRA command line

    I mean, I think it doesn't, but who knows

    Sourav Goswami
    @Souravgoswami
    That's interesting!
    Ualace Henrique Santos Café
    @Uolcisney_twitter
    I agree! But it's also very frustrating 😂
    Chris Uzdavinis
    @cuzdav
    Any tips on packaging/distributing games made with ruby2d? After a native build as described in: https://www.ruby2d.com/learn/native/ it still doesn't run without libdl, and some others etc. Do we just tell people they have to install all the deps to play, or is there any way to make it more self contained?
    btw, I really enjoy ruby2d. Its simplicity allowed me to make the game I had in mind in just a week or so. So thanks to everyone involved.
    Chris Uzdavinis
    @cuzdav
    (correction: libsdl, but you knew that. :)
    Sourav Goswami
    @Souravgoswami

    Packaging can be done in 2 ways:

    1. Make a Rubygem
    2. Make a package for your distribution: tarball for Archlinux / deb for Debian / rpm for OpenSUSE / Exe for windows (no idea on that) and something else for Mac

    The first one is neat and clean! If you create a rubygem, you make it available for all Linux distribution or even windows and Mac if you want. Then 2nd one depends on the OS or Linux distribution...

    But the 2nd one can include dependency that Ruby2D needs. A rubygem can't include sdl as deps for example, because it comes from Linux distro...
    So you can easily make one gem and package that with Ruby2D runtime dependency...
    Tom Black
    @blacktm

    @/all Hey everyone! 👋 I come with news: I’m (finally) preparing for the v1.0 release! I know, you might be wondering, “what the heck is taking so long?” Well, in short, 2020 happened (this game sums it up pretty well: https://2020game.io). But seriously, it was a hard year, as I’m sure it was for you too. Taking care of family and our own well-being was (and still is) first priority. For me, that meant not much time for side projects, if at all. While we are not out of this pandemic yet, and both life and work are still as demanding as ever here (I'm in the public sector building tech for relief efforts), the pressures are starting to lessen, so I can begin freeing up time and mental energy to re-engage with projects I love, like Ruby 2D! Making games, 2D graphics, and yes, even writing C brings me joy, and I'm eager to get back into it.

    So, where to start? Well, first is getting the plan together for v1.0. I would LOVE your ideas and feedback on new features, fixes, and improvements. I started a GitHub discussion here where you can comment. I bet we can come up with a ton of things we want to build, which is great, but also a bit daunting (if I'm being honest). In addition to suggesting features, please consider contributing to them! This is an open source project for a reason (because community development is awesome), and putting your leet hacker skills towards it will make the project better and let us ship faster. Also, working on this gem and all the internals (native extensions, SDL, OpenGL) is super interesting and a lot of fun — dare I say, sometimes even more fun than building games (it's true, I promise 😀). If that sounds daunting to you, I'd love to help you with a feature, pair on it, pass along my hard-fought knowledge of graphics and engine programming. You'll be a better programmer for it, and maybe even get a better job or a raise! (Not a guarantee, but you never know. 😉)

    While shipping v1.0 is the near-term goal, there's also other stuff I've got planned, like a branding refresh to make the project a bit less, you know, cute. Ruby is fun, and making games is fun (usually), so I think we should keep that feeling of lighthearted joy, but going to the website and reading the docs shouldn't give the impression that this is a toy. We're building some real software here, and you can make a serious game. Using mruby and SDL means you could ship your work to itch.io, Steam, Apple Arcade, or even a game console. So anyways, more to come there.

    Finally, (wow, this is turning out to be longer than I intended), I wanted to share one more thing: We have a Discord server! 🥳 If you haven't used Discord yet, it's like...really nice. Easy to chat, jump into channels, slap emojis on stuff, great mobile apps, all of it. Gitter has been good to us, but it hasn't gotten much love in a long while, and there are just better community platforms out there now. So, check it out, and hope you join us.

    That's all for now. Thanks all.

    BosseLokkborg
    @BosseLokkborg
    Quick question, I am trying to use text stored as a variable from another file. I am using require_relative 'file.rb' and wanting it to be showed on Text.new(my_var_name), but it gives me an error that it is an uninitialised variable. What am I doing wrong?
    Ualace Henrique Santos Café
    @Uolcisney_twitter
    Can you share your code/project?
    BosseLokkborg
    @BosseLokkborg
    Here is a link to that
    BosseLokkborg
    @BosseLokkborg
    Thanks for showing interest in wanting to help me @Uolcisney_twitter! But after trial and error I finally got it working! I was creating a class inside a module and I created a new object in the wrong file, I should have created it in the new file, where I was require-ing it from. Anyways, I got it working.
    Ualace Henrique Santos Café
    @Uolcisney_twitter

    Thanks for showing interest in wanting to help me @Uolcisney_twitter! But after trial and error I finally got it working! I was creating a class inside a module and I created a new object in the wrong file, I should have created it in the new file, where I was require-ing it from. Anyways, I got it working.

    Ah, that's good to hear! Any more questions feel free to ask. And if you have a Discord account, I suggest you join our server. It's quite more active than the gitter community

    Jose Hales-Garcia
    @jolohaga
    I’m considering using Ruby2d for plotting (mostly static at this time). Is there a method from Ruby to print the screen?
    Ualace Henrique Santos Café
    @Uolcisney_twitter

    I’m considering using Ruby2d for plotting (mostly static at this time). Is there a method from Ruby to print the screen?

    You mean a screenshot?
    If so, yes. The Window class has a screenshot(path) method available

    AbbyManiac
    @AbbyManiac
    Is this the correct place to ask for help regarding a Ruby Program I am making?
    Ualace Henrique Santos Café
    @Uolcisney_twitter

    Is this the correct place to ask for help regarding a Ruby Program I am making?

    This gitter is for the ruby2d gem, a graphics/game "engine" framework for Ruby

    If your question is about the Ruby language itself, I recommend the Ruby gitter or the discord
    But I can try to answer it :p
    AbbyManiac
    @AbbyManiac
    its about ruby2d gem
    BigBMP
    @BigBMP
    Hi I am having segmentation fault on ruby2d when calling the 'show' method : C:/Ruby/lib/ruby/gems/3.0.0/gems/ruby2d-0.9.5/lib/ruby2d/window.rb:392: [BUG] Segmentation fault
    ruby 3.0.0p0 (2020-12-25 revision 95aff21468) [x64-mingw32]
    perroTuerto
    @perrotuerto:matrix.cuatrolibertades.org
    [m]
    Hi, everyone, I was looking for Ruby rooms and I found this gem, looks awsome!
    Sourav Goswami
    @Souravgoswami
    Yes, you can develop a lot of cool games with this gem!
    BosseLokkborg
    @BosseLokkborg
    I think the ruby2d website was updated and I can’t find the segment about converting a project. Can one tell me how about I should convert a project to make it an app?
    Ualace Henrique Santos Café
    @Uolcisney_twitter
    hi, y'all. If you guys have Discord, I recommend joining us there, since it's much more active and easier to have you questions answered
    Victor Maslov
    @Nakilon
    image.png
    ruby 3.0.1
    is this fixed somewhere in ruby2d master?
    Tom Black
    @blacktm
    @Nakilon I had this happen when I upgraded to macOS 11 (they broke a bunch of OpenGL stuff), but I think it’s been fixed. Can’t remember if we also introduced a fix. What OS version are you running?
    xi.a.ng
    @xiang46449528_twitter

    set fps_cap = @gg

    @x=1

    def test
    if (@x == 0 )
    @gg = 0
    elsif (@x == 1)
    @gg = 1
    else
    @gg = 2
    end
    end

    test

    Is there anyway i can change the fps using if loop? This is just a short version of my project but i cant seem to change my fps with the while loop. Urgent help needed please!!

    Tom Black
    @blacktm
    @xiang46449528_twitter You’ll actually want to use set fps_cap: @gg, and maybe wrap it in a method if you want to call it from arbitrary places in your code.
    xi.a.ng
    @xiang46449528_twitter
    @blacktm for example how?haha
    Victor Maslov
    @Nakilon
    @blacktm Big Sur, updated just ~3 days ago
    Tom Black
    @blacktm
    @Nakilon 😕 Can you uninstall & reinstall the gem? Just want to see if it’s a compile-time issue (linking to new framework versions and stuff).