Page 2 of 2

Re: Silent Strike - WIP

Posted: Sat Sep 16, 2023 12:13 pm
by togFox
All directions for subs and torps are typed in. I'll need to find some sort of widget that makes that mouse-able.

Re: Silent Strike - WIP

Posted: Sat Sep 16, 2023 1:50 pm
by dusoft
360 compass and one mouse click to set direction, easy.
For torpedoes, maybe setting direction by a mouse click on the map.

Re: Silent Strike - WIP

Posted: Sun Sep 17, 2023 12:12 am
by togFox
... it is quite difficult to hit a ship as it always seems to turn when torpedo is closing in.
Sorry - I didn't notice this comment and you are right. what is happening is the torpedo is detected/sensed by the destroyer so it enters "hunt" mode and seeks you out. After a period of time, it will revert back to "cruise" mode. A torpedo spread can help you sink more ships.

At the moment, the detection rate is 100%. That will become variable at some point and will be dependent on what the target is and what actions the target is taking.

I think I need a "helm" station and "weapons officer" station that allows me room to do the interfaces you are suggesting.

Re: Silent Strike - WIP

Posted: Sun Sep 17, 2023 6:45 pm
by dusoft
togFox wrote: Sun Sep 17, 2023 12:12 am A torpedo spread can help you sink more ships.
Yep, it was quite easy to identify this workaround. However repeatedly entering directions as numbers gets repetitive and not fun.

Re: Silent Strike - WIP

Posted: Sat Sep 23, 2023 5:17 am
by togFox
v0.02 is now on codeberg: https://codeberg.org/togfox/SilentStrike/releases

The GUI is still yucky because it's all placeholder stuff to see if I can make the mechanics work. I did add a few things to make things a bit easier to understand but this is very much "dev" version.

There are two significant game mechanics added:
- a ruler to measure distance and angle (0 = north/up)
- a stop watch to measure time

Also a significant bugfix with screen resize/scaling/resolution. 372 lines of code added (which means absolutely nothing!)

Theoretically, you can use the stop watch to determine a targets speed. With the ruler you can work out the targets direction of travel. If you know the targets speed and direction of travel, and have some basic knowledge in math (trigonometry) then you can work out a firing solution and sink a target in one go. Give it a try. :)

Check the front page of codeberg for enhanced instructions and the release notes to see what new cool things have been added. Thanks for following!!

Re: Silent Strike - WIP

Posted: Sat Sep 30, 2023 12:52 pm
by togFox
So, after being pretty pleased with my implementation of f = ma, my v0.03 is showing symptoms I really don't have a clue. 8-)

My ships were accelerating and decelerating and turning and all was sweet but as I added more objects of different sizes I noticed ships were "skidding" around the ocean. They would turn fast but their momentum was pushing them sideways and they started strafing. Hilarious - but not right.

I'm going to break my 1-release-per-week rule and rewrite the "engine" to use box2d. I've used Box countless times in the past, including my last project and whilst I was having fun working out all the physics, it's just become a PITA for me so a migration to Box2D next week!

So, v0.03, when released, will have a few small features, Box2D and the most important bit, instructions on how to use the placeholder GUI but even better than that - the theory and math behind hitting a target. :)

Stay tuned.

Re: Silent Strike - WIP

Posted: Sun Oct 08, 2023 10:48 am
by togFox
Life has been nuts this week but I still found time to migrate all my code to Box2d. The physics now is really sweet. This is the first version where you can actually plan a firing solution and sink targets. :)

I have added a 9 step tutorial on the codeberg front page. It looks complicated but it is simple vector maths and it is the real maths that was used by submarine commanders.

This update added 328 lines of code. You can try it here in zip, exe and love format:

https://codeberg.org/togfox/SilentStrike
https://codeberg.org/togfox/SilentStrike/releases

This is release #4 so there is much that is not obvious and much to do. With the Box2D stuff out of the way I hope to spend a week consolidating then another week adding new stuff.

Re: Silent Strike - WIP

Posted: Sun Oct 15, 2023 3:12 am
by togFox
Real life distracted me more than I hoped (curse you, real life!) but I've forced a release non-the-less. This release has some important useabilty features and a cool function - sonar. Fog-of-war is introduced so now you need to get close to targets to see them. This mechanic will improve over time - as will all mechanics. A net 198 lines of code went into this release.

Here is the first iteration of the hydrophone station:

Image

It was suggested it should be green because Hollywood always has them green - but is that just a Hollywood thing?

Thanks go gvolkiv for helping me with making fonts scalable and readable.

https://codeberg.org/togfox/SilentStrike
https://codeberg.org/togfox/SilentStrike/releases

Re: Silent Strike - WIP

Posted: Mon Oct 16, 2023 7:52 pm
by pgimeno
togFox wrote: Sun Oct 15, 2023 3:12 am It was suggested it should be green because Hollywood always has them green - but is that just a Hollywood thing?
Green phosphor? It was a pretty common compound to make CRT screens of. It had a good retention of light.

Also, radars actually update positions when the bar crosses them, not continuously. The bar refreshes the phosphor in the screen, which fades (as slowly as possible) as the bar gets farther.

Re: Silent Strike - WIP

Posted: Tue Oct 24, 2023 1:13 am
by tourgen
Very cool!