unityGB allows you to run a Game Boy ROM in your Unity project. Globally, it’s a Game Boy emulator written for Unity and it’s totally free and open-source.
It has been written in C# and is only using Mono allowing you to export the project to any platform supported by Unity. Also, unityGB has been released as Open Source software under the GNU General Public Licence. This means that you can download the source code, find out how it works, and contributing.
unityGB is still in alpha version, many bugs and glitches can occur. Also, the code is far from being perfect and needs a lot of optimization. Any and all help welcome! Please feel free to contribute to this project.
I’m so glad you all like it, and FinsternIRL, thank you for your video, it’s awesome.
Can I share it on the wiki page of unityGB?
I made this emulator just for fun, I was always curious about making an emulator and specially for Game Boy.
When I got some first results, I was like “wow, it’s awesome, but… what could we do with it?!”, so I decided to share it with you, hoping you will get idea for me.
Now I can see some people are interested with, I will definitively try to improve this emulator. I don’t have so much time so don’t expect updates so often. I work on it during my free time. So I also need you to help me and improve this emulator!
FinsternIRL, and others, could you please make a list of problems you noticed during testing unityGB?
I have spent a lot of time for fixing the audio but couldn’t make it. I don’t have to much experience in audio… I would be happy if someone can help me to fix this issue.
Please, be my guest and post the video, I’m glad you like it =D. I did run into one error, but I’ll post it on the bitbucket page. I’ll try contribute what I can to the project as I love the idea for VR purposes!
But of course it is possible, look at our demo, we are approximately doing the same.
What you have to do is to map the texture generated in DefaultVideoOutput.cs to the material of your Game Boy screen model.
You should also use a shader like this one to have a better effect.
I am going to follow your advice on the point filtering so it will have that pixel perfect look. This should be really neat once it’s set up. The cool thing is the model is physically accurate, so the actual screen is under the plastic cover glass, should look pretty convincing.
So I took your awesome script, added the Super Mario Land gameboy rom , integrated it into a small room environment, and modded to run in android for the Durovis Dive headset… end result , really cool
The only problem that i’m having is the script causes my framerate to drop to at least 40-45fps at most times and sometimes slower (running on Galaxy S5 and HTC One) . Without the gameboy script running the room runs at 60fps always , but once enabled it slows considerably. I’ve tried a few other roms and it doesn’t seem to make a difference.
First of all, that is absolutely amazing, nice work!
Secondly, how would one go about improving it? Surely you didn’t write that all from you head :). There must be some spec somewhere that says how that cpu “X80” works.
Thank you a lot! Unfortunately, I don’t have mobile optimization tips right now, I’m sorry.
But in the future, I’m planning to review and optimize the code in order to make the emulator running much faster.
In the meanwhile, don’t hesitate to share with me all your tips!
There are also many open source Game Boy emulator already available in many languages (c, c++, java, javascript…).
If you are interested to make your own emulator, here is a tutorial (it’s in javascript): http://imrannazar.com/GameBoy-Emulation-in-JavaScript:-The-CPU