calculateAttack mal function

    This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

    • yamilrh wrote:

      yo implemente su steemnova/includes/classes/missions/functions/calculateAttack.php al 2moons y estab roto, no reportaba las batallas ni ganabas recursos ni nada..
      replace "SteemNova.php" (if you have DS Extension) or "SteemNova_array.php" (not recommended) as calculateAttack.php to get battle engine
    • короче если вы хотите нормальный расчет бо ... то надо делать сами..м не один изначально не предназначен для всего - допиливайте любой.. просто выберите один ...пофиг какой и делайте его сами.. не можете сами ...наймите кто может
      Делаю качественно в сроки! на любой версии moons, встрою, или напишу любой мод , но дорого!
    • No. Generally, the Ogame battle engine is not optimal. The bigger the battle, the more resources the server uses.

      It is possible (with a very large amount of frame, really big) to create a battle that will count for a month (there will be a lot of ships, and the processor will not be too efficient).

      PHP is not a fast language. Programmers (since version 7) try to speed it up and you can see it, because it is actually getting faster. But it will never be as fast as for example C++.

      So the battle engine based on PHP is very difficult to implement. We used the so-called "Data Structures" instead of "Arrays" to speed up the engine, but that's not enough. It seems to me (but I may be wrong) that we have reached the limit for PHP. It's best to rewrite the battle engine (to C++?), which allows for much more performance, or give up and develop OPBE.

      In SteemNova we do both things. That is why we have two battle engines and everyone can choose the right one.
    • well said.
      Is it possible to implement the battle engine in c ++ and connect it to php?
      I do not dominate the C ++ language at all; but a programmer who knows him can do it.
      How do I connect both languages?
      any advice?
      This command ofc. works on VPS. On hosting (like 000webhost) you can't run applications.

      Or just upgrade this code:

      It's PHP5 (I think) battle engine, external extension, so need to be upgraded to PHP7.3+

      The post was edited 2 times, last by fervi ().

    • New

      mys wrote:

      Kaizoku wrote:

      is that steamnova result 100% same as speedsim?
      @Kaizoku, In steemnova I have rewritten combat engine completely. It is 100% same as speedsim/websim/ogame.Based on See my commits
      It is most accurate combat engine right now.

      However it has weakness if doing large battles. PHP is not good for large arrays, so calculating battles with over 500k units can take seconds. Up to minutes for million battles.
      looked calc code, why rapidfire shoots have so many random? if in battle 1 deaths star versus 200 light fighter s has a chance get in first round only 1 kill or 200 and small chance get a 1 kill in each round, ofc when u have more than 1 ship this random is leveled, but still