mobile-app
mobile-app copied to clipboard
Simulator for Mobile App
This issue serves as the discussion thread for different approaches to bringing the simulator to mobile_app
.
@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.
@shubhankarsharma00 @satu0king any inputs here ?
The big question is that do we need Simulator in mobile_app
?
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.
One such example https://play.google.com/store/apps/details?id=com.duracodefactory.logiccircuitsimulatorpro&hl=en_IN&gl=US
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.
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.
Simulator code is complex and ui is just a very small part of it. Rewriting it in dart may not be a good idea
So, we should look into exposing the APIs for Simulator ?
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 .
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 would it have been easier if we had used react native instead of flutter?
@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 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.
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.
As the first phase we can embed simulator in web view once the touch compatibility is done
As the first phase we can embed simulator in web view once the touch compatibility is done
Ok that can be done.
@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. 😃