Unity3D Front-End

Hi Libretro!

I am the creator of GameObj, https://www.youtube.com/watch?v=um3W3BWuY5I(I did not code the emulator itself, the original emulator UnityGB rendered the images as a 2D texture to a 3D polygon… What I did was create the HEX GRID and design the graphic to 3D model replacement code)

I would like to use the Libretro API to draw to a Unity3d Texture within Unity3d for similar enhancement ability. I would need to code a libretro frontend for Unity3d for this.

Is this possible? I cannot find very much API Documentation…

If anyone would like to help me get libretro cores running and rendering WITHIN Unity3d, Please do help and discuss here!

  • MiLO83

Ha, that’s neat :smiley:

You could definitely work on making an actual frontend, or you could grab RetroArch’s output as a texture and then pipe it into Unity, as the EmuVR guy did: http://uploadvr.com/take-a-virtual-step-back-into-your-childhood-with-emuvr/ I don’t know any details about how he went about that, but you might be able to track him down and ask him about it. He’s a nice guy.

INTRODUCING “EmUnity” - The Unity3d Libretro Frontend / Wrapper / Emulator / Sandwich Maker.

THANKS AND MAJOR CREDIT TO RADIUS AND ALCARO ON IRC #retroarch! All I did was mix their C# codes together and hook it up to Unity3d.

Currently only loads the snes_libretro core without crashing, but should become more compatible with other cores soon! Sound isnt perfect.

  • MiLO83

Hey, congratulations. Pretty fancy! :smiley:

Thx hunterk!

SOURCE & BUILD : (Scanned with AVG (Latest))

I am currently looking for helpers! Anyone with Unity3D or GBA H@X0r knowledge! If you are interested or know someone who’d like to help! Message ME!

Current Video : https://youtu.be/BYR6Gw3SJRw

I am trying to get OAM Sprites rendering on their own layer. Each ‘sprite’ is a single polygon with its appropriate texture. Currently, if a tile is ANIMATED, I am doing alot of deleting, and no recycling! I need to setup an object pool and have been away trying for about 3 or 4 days to no success. I keep getting HUNDREDS of gameObjects with the same name and same content spawning. (So for now I am deleting them, and regenerating them when they are called)

Here is a HasteBin of the code that needs ‘pooling’,

http://hastebin.com/zacuxujepa.cs

^ Line 643 is where undisplayed sprites are DESTROYED. Again, I have tried for 3 days to setup an OBJECT POOL which recycles sprites which have been Generated, but are not currently Displayed. It’s my birthday on Sept 2nd, and I’m getting flustered from days of Hundreds of Identical GameObjects spawning in my Hierarchy! So if you can code it better :slight_smile: Please take a good shot at it. I’ll be working on it in the meantime, but the offer is open :slight_smile:

   - MiLO83

My previous post is from August 31st 2015, So being as how it has been almost 3 monthes… I’m “Double-Posting” :slight_smile:

EMUNITY : A Libretro Frontend in Unity3D. (Currently GBA Only)

Why Unity3D? I have a dream of emulators having the power to update / enhance / completely overhaul the games they run.

Can Emunity? Yes it can! Currently all object on the “OBJ Layer” (Characters, Enemies, Power-ups) can be replaced with Animated / Static 3D Models or any sized Texture of any number of colors. (With Custom .js or C# logic) Backgrounds are not yet replaceable because I had it working, and accidentally overwrote the code I had spent 2 days coding without a backup. FML.

Whats New in this Version? SAVING! In all previous versions saving your game was not possible, and you had to start over every time you played. NOW YOU CAN SAVE! (NOTE : Dont exit Emunity right after saving! It only actually saves every so often, the trigger being when it detects the palette of the scene has changed and 10 or so seconds have gone by, It sounds dumb but the scene detection code was already implemented, so rather than saving every frame, I used the scene change code)

Oh yeah, it plays every GBA game in 3D by splitting the render passes like a pop up kids book. Native support for 2D (With webcam head-tracking on Windows), Side-By-Side 3D for 3D with Glasses, and ‘Auto-Detects’ Oculus Rift (Windows). Sorry head-tracking and Oculus would need to be rewritten for Linux, but you can move the camera to see 3D by moving your mouse, or map it to the tilt of a PS3 controller.

So now that people can SAVE and LOAD cartridge saves, I hope more people will play GBA with Emunity.

THANKS TO LIBRETRO TEAM, VBA-M TEAM, AND UNITY3D.

Here’s those links you’ve been waiting for :

Windows Build: https://www.dropbox.com/s/ohfj1bvcsx5zi26/EMUNITY_v2_265_Win.zip?dl=0 Linux Build:

Windows / Unity Source: (Requires Unity3D) https://www.dropbox.com/s/pz5dhbdxw0s4ku2/EMUNITY_v2_265_Win_SRC.zip?dl=0 Linux / Unity Source: (Requires Unity3D)

Videos: (Low FPS is in the video and not the front-end itself) https://www.youtube.com/user/uMiLO83/videos Roms no longer require cover art, as generic art will be used in case proper art is not found.

Enjoy, MiLO83 :slight_smile: AKA EMUNITY