New theme added have fun on this forum gr Wizart :)

Libretro Sandbox Unity project

edenweb Verified
Posts: 3
Joined: 17 May 2020, 12:51

Re: Libretro Sandbox Unity project

Post by edenweb Verified »

Skurdt wrote:The loading of the dll (using kernel32's loadlibrary function) is pretty standard, there's no other alternative afaik.
It's possible to load functions using the dllimport attribute, but it will then lock the source code to use specific dll names (as opposed to be able to load, theoretically, any present and future cores).
Doing either shouldn't take anywhere near 2 seconds though.

Now I'm guessing you are running the games from 3DArcade and not the example scene I provided with this wrapper library.
Depending on what kind of prep work is done to transition between a walking around in an arcade state and playing the game on a model, there might be some delay not related to loading the core and/or the rom itself. It's also dependent on what core and what rom is actually requested.

As for optimizations on the wrapper itself and using multithreading, as far as I'm aware, dlls and functions pointers have to be loaded, stored and called from a single thread (and probably the main one, especially in the case of Unity, to be able to have proper communication between the core and the different subsystems like rendering, input, etc...)

Coroutines can't help with load times, they only allow a function to keep running while something else is happening (it's doing a ping-pong kinda think but it's not using extra threads). They are also only available for MonoBehaviours, which I'm not using on the wrapper side at all.

If the loading of dlls and roms is the actual issue, it may have to do with disk performance (mame being multiple megabytes in size, or even in the hundreds, makes it the opposite of a lightweight dll).
Are you using a ssd of some sort or just a plain old hard drive?
For example, the app and cores are stored on a ssd for me, and I can load roms that are stored on a low-end(ish) NAS, with standard 1gb lan, and the games are starting instantly (both in 3DArcade and the wrapper's example scene).
Hello Skurdt. In first congrat for your works.

The core and the roms are of course stored on my ssd. but to be more clear, I have no problem launching the example scene. the game works very well in this case without any freeze even with like 20 machines.
On the other hand I wanted to create a room with hundreds of machines that only activate (the GameModelSetup component) when they are in the player's field of vision. and it is during activation that the game (the whole unity scene) freeze for one to two seconds. It is not a problem of quantity of machine, because I have exactly the same freeze with only one machine which is activated during the gameplay.
TO more simpler, i need to find a way to avoid freeze when instancing machine during gameplay.
The time of loading is not a problem (2s is near nothing), but the freeze is not very comfortable during the movement of the player.

I think maybe it is the loading of DLL that causes this freeze
Skurdt Verified
Site Admin
Posts: 1143
Joined: 21 Sep 2006, 19:53
Location: France
Contact:

Re: Libretro Sandbox Unity project

Post by Skurdt Verified »

I don't know how you instantiate your models and when or how you load the cores.
In my example, every time you enable (or instantiate) a model, both the core and the associated rom are loaded then started. It's most likely not what you want to do when instantiating models at runtime.

If loading a dll doesn't freeze in the example, there's no reason for it to cause a freeze on a different scene.

It's hard to get a picture of what you want to do without looking at the scene, if you can share your stuff I can take a look. Otherwise I'm just guessing ^^ If it doesn't come from loading a dll, we could be looking at solutions for the wrong issue...
My 3DArcade pages: Website, Videos, Files.
edenweb Verified
Posts: 3
Joined: 17 May 2020, 12:51

Re: Libretro Sandbox Unity project

Post by edenweb Verified »

wow Skurdt i just noticed that you are from france , me too !
Do you have a discord? or any platform when i can direct chat with you?
Last edited by edenweb Verified on 17 May 2020, 17:31, edited 1 time in total.
Skurdt Verified
Site Admin
Posts: 1143
Joined: 21 Sep 2006, 19:53
Location: France
Contact:

Re: Libretro Sandbox Unity project

Post by Skurdt Verified »

there's the 3darcade discord at https://discord.gg/8gPhSWn
Last edited by Skurdt Verified on 29 Aug 2020, 11:36, edited 1 time in total.
My 3DArcade pages: Website, Videos, Files.
thewigmuseum Verified
Posts: 373
Joined: 10 Mar 2005, 23:37
Location: UK

Re: Libretro Sandbox Unity project

Post by thewigmuseum Verified »

What happened here? I was enjoying following these recent 3DA developments, and then, it stopped, really, really suddenly. Did you lot all get abducted by the same UFO?
)p( Verified
Site Admin
Posts: 5714
Joined: 01 Jan 1970, 02:00
Location: The Netherlands
Contact:

Re: Libretro Sandbox Unity project

Post by )p( Verified »

thewigmuseum wrote:What happened here? I was enjoying following these recent 3DA developments, and then, it stopped, really, really suddenly. Did you lot all get abducted by the same UFO?
Hi :D

Nah, Skurdt is rebuilding my demo spaghetti code project with better structured code. Doing it right takes time!

Ps Do you still have the 3ds max projects for your arcades? And are you interested in converting them to work with Unity?
Skurdt Verified
Site Admin
Posts: 1143
Joined: 21 Sep 2006, 19:53
Location: France
Contact:

Re: Libretro Sandbox Unity project

Post by Skurdt Verified »

Yeah it's going very slow... The 3DArcade project on github is quite active though (relatively speaking...) but there hasn't been anything really new compared to the last demo or mind blowing stuff to show off yet... I do have some minor stuff but I'll post something outside of this thread.
My 3DArcade pages: Website, Videos, Files.
thewigmuseum Verified
Posts: 373
Joined: 10 Mar 2005, 23:37
Location: UK

Re: Libretro Sandbox Unity project

Post by thewigmuseum Verified »

)p( wrote:Ps Do you still have the 3ds max projects for your arcades? And are you interested in converting them to work with Unity?
I saved everything to DVD-R, but can't seem to find the bloody thing. I'll keep looking, gotta be somewhere. I wouldn't be interested in converting them - no time to donate to 3DA stuff at the moment - but if I locate them, I'll happily pass them on for someone else to convert.

Good to hear 3DA is still going though. Just when you think 'nah, it's a defintely corpse this time', it reanimates!
jackhammerslam Verified
Posts: 369
Joined: 07 Jun 2004, 10:11
Location: London, UK
Contact:

Re: Libretro Sandbox Unity project

Post by jackhammerslam Verified »

thewigmuseum wrote:
)p( wrote:Ps Do you still have the 3ds max projects for your arcades? And are you interested in converting them to work with Unity?
I saved everything to DVD-R, but can't seem to find the bloody thing. I'll keep looking, gotta be somewhere. I wouldn't be interested in converting them - no time to donate to 3DA stuff at the moment - but if I locate them, I'll happily pass them on for someone else to convert.

Good to hear 3DA is still going though. Just when you think 'nah, it's a defintely corpse this time', it reanimates!

its a shame riveted isn't around for the DVD list but I think Spanner has a copy of the 10th anniversary edition
My death has been greatly exaggerated
fossil Verified
Know-It-All
Posts: 2924
Joined: 06 Feb 2004, 19:24
Location: Mass, USA

Re: Libretro Sandbox Unity project

Post by fossil Verified »

I am looking to work with Jibmums this fall to convert all of his models to Unity, including perhaps a few that have never seen the light of day. Will keep you posted.
Let me introduce you to my friend Manuel...now open Manuel to page 6.
supneo Verified
Posts: 2
Joined: 29 Aug 2020, 06:30

Re: Libretro Sandbox Unity project

Post by supneo Verified »

Skurdt wrote:there's the 3darcade discord at https://discord.gg/xSx6w8
Hi Skurdt, could you provide another link for the discord? This last one is already expired, thanks.
Skurdt Verified
Site Admin
Posts: 1143
Joined: 21 Sep 2006, 19:53
Location: France
Contact:

Re: Libretro Sandbox Unity project

Post by Skurdt Verified »

My 3DArcade pages: Website, Videos, Files.
supneo Verified
Posts: 2
Joined: 29 Aug 2020, 06:30

Re: Libretro Sandbox Unity project

Post by supneo Verified »

Skurdt wrote:Hi, here you go: https://discord.gg/8gPhSWn
Thanks Skurdt :)
Post Reply