mobile-app icon indicating copy to clipboard operation
mobile-app copied to clipboard

Simulator for Mobile App

Open Nitish145 opened this issue 4 years ago • 18 comments

This issue serves as the discussion thread for different approaches to bringing the simulator to mobile_app.

Nitish145 avatar Nov 30 '20 18:11 Nitish145

@Nitish145 is there any documentation for web simulator?? It would be easy for us to replicate that in mobile_app if we read it once.

cyber-venom003 avatar Dec 01 '20 06:12 cyber-venom003

@shubhankarsharma00 @satu0king any inputs here ?

Nitish145 avatar Dec 01 '20 06:12 Nitish145

The big question is that do we need Simulator in mobile_app ?

manjotsidhu avatar Dec 01 '20 10:12 manjotsidhu

For people having access to only mobile phones, this can be a good addition. Also, there have been some requests regarding the same from our users/teachers.

Nitish145 avatar Dec 01 '20 10:12 Nitish145

One such example https://play.google.com/store/apps/details?id=com.duracodefactory.logiccircuitsimulatorpro&hl=en_IN&gl=US

tachyons avatar Dec 01 '20 16:12 tachyons

https://simulator-docs.circuitverse.org/ here is a still WIP documentation of how the browser simulator works. Personally I think having an option to change circuits from mobile phones is a great idea if feasible because that'll allow users to make small changes on the go. like you wouldn't type an essay on Google docs app but if you want to do a minor change you shouldn't have to open laptop.

shubhankarsharma00 avatar Dec 01 '20 17:12 shubhankarsharma00

I think its easy enough to replicate the engine from JavaScript to Dart and most of the things might come down to UI related stuff.

manjotsidhu avatar Dec 01 '20 17:12 manjotsidhu

Simulator code is complex and ui is just a very small part of it. Rewriting it in dart may not be a good idea

tachyons avatar Dec 02 '20 03:12 tachyons

So, we should look into exposing the APIs for Simulator ?

manjotsidhu avatar Dec 02 '20 07:12 manjotsidhu

There should be least amount of duplication as possible. Otherwise it will be a maintenance nightmare

On Wed, 2 Dec, 2020, 1:26 pm Manjot Sidhu, [email protected] wrote:

So, we should look into exposing the APIs for Simulator ?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/CircuitVerse/mobile-app/issues/36#issuecomment-737060100, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAXYAEDOOGSCK4W25DFLWSTSSXXLTANCNFSM4UH6FYPA .

tachyons avatar Dec 02 '20 08:12 tachyons

I was reading the simulator code, the problem is that the UI and the simulator logic layer is bound together which makes it very hard to be used in mobile-app. One way possible is loading the simulator inside WebView which will locally use the JS scripts of simulator but again UI will be also handled by HTML, CSS etc. Otherwise there is no way of using the JS engine inside mobile-app

manjotsidhu avatar Dec 03 '20 11:12 manjotsidhu

@manjotsidhu would it have been easier if we had used react native instead of flutter?

satu0king avatar Apr 02 '21 20:04 satu0king

@manjotsidhu would it have been easier if we had used react native instead of flutter?

It would have been a little easier since we don't need to port JS to Dart, but the UI layer will still have to be changed anyways for both Flutter and React.

manjotsidhu avatar Apr 03 '21 04:04 manjotsidhu

@manjotsidhu would it have been easier if we had used react native instead of flutter?

It would have been a little easier since we don't need to port JS to Dart, but the UI layer will still have to be changed anyways for both Flutter and React.

Understood. The bulk of the code is actually not the UI. So yes we would need to decouple it but it would be possible.

satu0king avatar Apr 03 '21 07:04 satu0king

I am having a hard time wrapping my head around how Simulator core can be kept common. We cannot expose APIs as it would be very slow to do every single task. I think we have to re-write the whole simulator in dart for compatibility.

manjotsidhu avatar Apr 03 '21 13:04 manjotsidhu

As the first phase we can embed simulator in web view once the touch compatibility is done

tachyons avatar Apr 03 '21 14:04 tachyons

As the first phase we can embed simulator in web view once the touch compatibility is done

Ok that can be done.

manjotsidhu avatar Apr 03 '21 14:04 manjotsidhu

@satu0king @tachyons @manjotsidhu is this issue/enhancement open? If it is, I would like to take this up as a project idea for GSOC'22. Can you please guide to me to get started, or some initial steps? Thank you. 😃

sherlockCPDEV avatar Dec 06 '21 19:12 sherlockCPDEV