Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 14 Next capture
2021 2022 2023
2 captures
13 Jun 22 - 14 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by marxotto2 · Dec 11, 2021 at 05:58 PM · triggerlaunchemulatorexternal-application

Is possible to Make a Frontend for Retroarch ?

Hello Everyone !

I wat to realize a 3D frontend for retroarch, and the idea is of a gameroom with some arcades inside and iwant that when i touch an arcade (trigger) the frontend goes on "pause mode" and Retroarch loads up and play the game of the arcade. when i quit retroarch i want to come back into the frontend and choose another game and so on ... Now, i have made a 3D gameroom with 2 coinops, one for R-type and the other one for bubble bobble. i can control a "capsule" for the player

The questions are : How can i launch the BATCH file with retroarch when i touch the trigger infront of the cabinet ? How can make that the frontend "pause" while i'm playng the game and then "unpause" when i quit Retroarch ??

Thank you for every answer , have a nice day and stay safe ! :D

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

2 Replies

· Add your reply
  • Sort: 
avatar image
0

Answer by Eno-Khaon · Dec 11, 2021 at 06:55 PM

While this doesn't exactly cover *everything*...

You can launch an external process by utilizing System.Diagnostics and Process.Start().

You can define command line arguments within the ProcessStartInfo passed into Process.Start().

Finally, this is only viable because Retroarch supports command line arguments.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
0

Answer by marxotto2 · Dec 12, 2021 at 10:32 AM

Thanks Eno-khaon For the answer !!!

is possible to create this script in BOLT Visual scripting ?? and at wich game bject i have to link this script ?? the Coin-op model or the player ??

thank You again !!! :D

Comment
Add comment · Show 18 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Eno-Khaon · Dec 12, 2021 at 11:15 AM 0
Share

Well, while the idea is straightforward, the implementation is rather involved overall.

First, I don't have experience with visual scripting for Unity. I do all of my own (without using visual scripting, rather), so I don't know what limitations it does or doesn't have.

Logically, you'd associate a given game-to-load with a given arcade-machine-in-game, so I guess it would make sense for a script to load a game to be on the arcade machine?

To expand on this, if you wanted machines to be dynamically generated and have associated texturing where applicable, you'd potentially need to scan some defined folder for applicable file types (i.e. the games), then have (ideally) matching names to those files as pre-formatted images to load and print onto each side of each arcade machine.

Either way, this isn't really something with a fixed solution. There's a huge number of ways to approach this. Incidentally, the only reason this idea happens to work out without extensive effort is because Retroarch happens to support command line arguments.


Also, an additional note related to your original question:

Unity games pause when not in focus by default, so that aspect wouldn't really be an issue to begin with.
avatar image marxotto2 Eno-Khaon · Dec 13, 2021 at 10:10 AM 0
Share

Thank you Again for your suggestions !!

Unfortunatley i'm not a programmer and i don't know C#, for this reason i prefer to use visual scripting , but obviusly this method have more limitations than classic coding ...

about the texturing , i have just created the cabinet with own textures, and every model have own trigger zone ...

In any case , i will try to learn about C# to make something more accurate , but is difficut for me to learn the concepts behind the strings ...

In any case thank ypou for your help ! :D

avatar image marxotto2 Eno-Khaon · Dec 19, 2021 at 10:43 AM 0
Share

hi again @Eno-Khaon !!

excuse me for disturbing you again, but this problem is drivin' me crazy ...

I'm searching for a solution and i've found something about "TRIGGERS" and "PROCESS.START" , but i don't know how to use this command in the code .

this is the simple code that i've found :

 using System.Diagnostics;
 using System;
 
 private static void RunFile()
 {
     Process.Start(Environment.CurrentDirectory + @"RTYPE.bat");
 }

I have an error, and i don't know how to connect this action to the trigger code ...

I hope that you can help me .

Thank you again !! :D

avatar image Eno-Khaon marxotto2 · Dec 19, 2021 at 11:21 AM 0
Share

Wait, a batch file? Unless there's something I'm misunderstanding, that seems a bit redundant based on the pieces I'd found in my answer.

From what I can tell, it looks like you should be able to do something like this:

 public class ArcadeMachine : MonoBehaviour
 {
     // Point this at the necessary core
     // to emulate the selected game
     public string libretroCorePath;
     
     // Point this at the ROM file for the
     // intended game to launch
     public string romPath;
     
     public void LaunchGame()
     {
         ProcessStartInfo startInfo = new ProcessStartInfo();
         // Since this should always be the same,
         // this can/should be defined as a
         //static variable somewhere
         startInfo.FileName = retroarchExecutablePath;
         startInfo.Arguments = string.Format("-L {0} {1}, libretroCorePath, romPath);
         Process.Start(startInfo);
     }
 }

Then, on a script attached to your "player", you'd set up your interaction scheme (collision, raycast, etc.) to call the "LaunchGame()" function on the intended Arcade Machine.

Show more comments

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

155 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Tizen Game running on emulator but not on device 0 Answers

Import and launch a animation (with trigger) 2 Answers

How to launch another program when using or interacting with an object? 1 Answer

Can't click gameobject when over another trigger? 1 Answer

Sending info from unity C# to Matlab? 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges