MinecraftU / 2021-computer-adventures

Repository for our 2021 Computer Adventures Ruby project!
0 stars 0 forks source link

Convert to Ruby2D #15

Closed dealingwith closed 3 years ago

dealingwith commented 3 years ago

closes #7

Originally I was just trying to manage the project's dependencies by putting the previous library, rubygame in a Gemfile so we can use bundler to manage dependencies. Then I discovered rubygame is ~10 years old and unmaintained. This caused 🚨 so I went back to Ruby2D to see if we could use it instead.

It installed easily and ran the first time. ✨ I was able to quickly port @jamespeilunli's code from #11 to Ruby2d 🎉

So this PR:

TODO:

dealingwith commented 3 years ago

@jamespeilunli note I've converted indentation to 2 space

jamespeilunli commented 3 years ago

Looks like that reinstall of Ubuntu helped something; Ruby2D works for me now. Ruby2D works for me now??

dealingwith commented 3 years ago

Did you follow the instructions in the README and use Bundler?

jamespeilunli commented 3 years ago

Sorry, I didn't see the README.

I saw that Ruby2d used SDL (in Linux), and I thought I had all the dependencies I needed since Rubygame also used SDL. But, when I ran sudo gem install ruby2d, it alerted me that I needed to install these packages: libsdl2-dev libsdl2-image-dev libsdl2-mixer-dev libsdl2-ttf-dev, so I ran sudo apt-get install *those packages*. Running sudo gem install ruby2d after that threw no errors, and I tested it out on a test file with the example program on the Ruby2d homepage and it worked.