Endebert / squadmc

Map-based mortar calculator for Squad
https://squadmc.ende.pro
MIT License
121 stars 36 forks source link

Bugfixes around Target pin display #67

Closed ufonius closed 4 years ago

ufonius commented 4 years ago
ufonius commented 4 years ago

@Trikolon @Endebert is there anyway I can contact you? Discord preferably. I want to add further improvements to Squad MC if posible :)

Endebert commented 4 years ago

Hey @ufonius, thanks for the contribution!

You can best reach me here. Create an issue/feature request if you want to discuss it first.

You can also pm me on reddit, but I only check that account sporadically.

ufonius commented 4 years ago

Hey,

Thanks for approving my PR.

I have a few improvements in mind at the moment:

I've started work for #1 & #2. I've talked to other people who use your calc and it's definitely a feature they would like to see. The code isn't very geared towards what I am trying to do, so I have to do some refactoring. I come from a OOP/C# background (professionally) so JS isn't my element, but that's also one of the reasons why I decided to contribute to this project.

3 is something I would like to be able to implement, but I've had troubles figuring out projectile velocity for the rockets. Asked some people who have Squad SDK and there's some squad magic happening with this rocket velocity.

4 is just a wild thought, but I think it would be neat. Some spotters (myself included) will give out the mils/cords via VOIP for the people on the mortars. Would be cool if you could just update the map and everyone connected to the same private room would have their markers updated in real time.

On Monday, 24 February 2020, 20:31:25 GMT, Robert Ende <notifications@github.com> wrote:  

Merged #67 into dev.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.

Endebert commented 4 years ago

Let me answer you inline:

I've started work for #1 & #2. I've talked to other people who use your calc and it's definitely a feature they would like to see.

A similar issue for fire missions is here: https://github.com/Endebert/squadmc/issues/65 I welcome any contributions, just please keep in mind that regarding platforms, the app is intended mobile-first, so please make sure all new features would work a phone in portrait mode.

The code isn't very geared towards what I am trying to do, so I have to do some refactoring. I come from a OOP/C# background (professionally) so JS isn't my element, but that's also one of the reasons why I decided to contribute to this project.

Yeah sorry about that. Similar to you, I come from an OOP/Java background and this was basically my first non-trivial js/vue app. So the code is pretty bad unfortunately.

I've been working on a refactor for quite some time, as I wanted to replace the map library (leaflet) with a different one, or with one adapted for vue (e.g. vue2-leaflet). But other libraries are either not geared towards our use cases (flat maps with custom sizes/dimensions), or I haven't found a workaround for this leaflet bug for their specific implementation: https://github.com/Leaflet/Leaflet/issues/3575

I'm currently reading domain driven design by Eric Evans and hope I can apply some of the learnings to this project when I have time.

I also thought about writing my own code for the map part. the biggest complexity (in my opinion) lies in the map tiling and zooming. The app is definitely dependent on this feature as previous iterations without map tiling did not work well on phones (due to memory limitations).

3 is something I would like to be able to implement, but I've had troubles figuring out projectile velocity for the rockets. Asked some people who have Squad SDK and there's some squad magic happening with this rocket velocity.

There's also an open issue for this: https://github.com/Endebert/squadmc/issues/40

Worst case scenario, we can make our own range table by going to jensens range and measuring distances ourselves. We will definitely have to add a simpler, more direct translation of mortar tables, as apparently mortars in Post Scriptum work differently, and the velocity approach that's currently in use is not suited for them. More info here: https://github.com/Endebert/squadmc/issues/61

4 is just a wild thought, but I think it would be neat. Some spotters (myself included) will give out the mils/cords via VOIP for the people on the mortars. Would be cool if you could just update the map and everyone connected to the same private room would have their markers updated in real time.

I think it's a great idea and it sounds feasible. However, the code in it's current state is not setup for it. I believe we would have to switch to a vuex store to hold the state and have all mortar logic also contained there. Then we could share the whole state with each peer. Peers would use WebRTC to connect to each other, invite procedure would happen e.g. through firebase to hold the invites/rooms. No idea if we could have the state synced via firebase as well, or if it should be true p2p, however host transitions are tricky, but possibly a nice coding challenge.

Maybe there's even a library/framework that facilitates implementation, but I haven't looked in it so far.

There's a squad tactics planner which I think is pretty cool and is "multiplayer". I'm thinking about adding some of those features into squadmc at some point.