Did you know that the German WW2 type VII sub moves at 4 m/s submerged? Did you know the Fletcher class destroyer can travel at 8 m/s? Torpedo's weigh 280 kg and take 20 minutes to load into a tube and only one tube loads at a time. I'm trying really hard to simulate all the physical/mechanical parts of naval warfare. Even tidal currents that can push a torp off target over long distances. I uncovered a german manual for a uboat that shows the turn rate of the Type VII is 2.5 degrees per second. Way cool!! Everything is driven by force = mass * acceleration. I could have used Box2D but I chose to hand craft it and I'm learning heaps.
I'm also trying to code this an a methodical way using ECS principles. I've incorporated new libraries and learning new things (SAT collision detection and InputField by Refreeze). I'm learning history and coding at the same time and if you've ever played the Microprose Silent Hunter series, you'll know determining a firing solution requires a lot of math.
All the GUI is placeholder while I get the engine worked out but a thread without images is boring so here we go:
![Image](https://i.postimg.cc/L5CRB6VV/image.png)
That's a sub with 4 random destroyer's just idling. Nothing to rave about. Iterative improvements will be applied.
Future:
- cool sound effects
- believable bot brains
- fleets to sink (of course!)
- ocean depths determine by perlin noise and maybe upgraded to real topography from 1943 maps
- fog of war. Ship positioning is a guess based on the actions you take to identify and mark targets
- maths! Torpedo firing solutions can be manually set or set an option for autocalc.
- Genuine machine learning AI (maybe). I have done machine learning algorithms many times before so this is likely to happen again.
- depth charges. This 2D game will simulate depth. Rise to 15 meters to use the periscope (and reduce fog-of-war) then sink below the transition layer to avoid retaliatory depth charges.
- hydrophones. Use underwater microphones to locate and identify vessels
- periscope. ID your target and get a true bearing, if you're brave enough
- audio/sound modelling. Make a lot of noise and escorts will detect you
- sound effects. I hope to research the genuine noises the sub crew will hear. From torps launching to depth charges to propeller screws.
- sim sim sim sim. Real life stats (where available) to show you how fast things really worked. You can play on x1 speed and wait 20 minutes for a torpedo to load or play on x10 speed to compress the boring bits.
Nothing to see yet but here is the source code: https://codeberg.org/togfox/WW2SubComba ... ain/source
Clearly a long term project but the true-to-history approach has me hooked. Stay tuned!
zip file, exe and LOVE file can be found here:
https://codeberg.org/togfox/SilentStrike