![]() In this case, only 3/4 of the ships must be sent. It must also be noted that on some universes, the debris field ratio is higher (for example on uni 40, it is 40% instead of the standard 30%). There is no need to go beyond 1667 light fighters, as 20% is the highest moonchance percentage available: more will not increase the odds. Alternately, 1667 small cargos can be used, as they create no damage to the "fodder" defenses of the defending planet, and are easier to be defeated, though they are slightly more expensive. The most used way to generate the debris is to crash a fleet of light fighters 84 destroyed light fighters is 1%, and 1667 light fighters is 20%. Each 100k debris gives a 1% chance of producing a moon, up to a maximum of a 20% chance with 2M debris. You can keep secret your code because OPBE can be seen as a external module with own license, it's only required to share changes on OPBE.Any time a large battle occurs leaving more than 100k debris behind, the owner of the planet where the battle took place receives a moonchance, and if lucky, a moon. I would like to include your battle engine but the code of my game won't be published You should have received a copy of the GNU Affero General Public License ![]() GNU Affero General Public License for more details. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. OPBE is distributed in the hope that it will be useful,īut WITHOUT ANY WARRANTY without even the implied warranty of License, or (at your option) any later version. Published by the Free Software Foundation, either version 3 of the It under the terms of the GNU Affero General Public License as OPBE is free software: you can redistribute it and/or modify So in a PlayerGroup there are different Players,Īll these classes implements Iterator interface, so you can iterate them as arrays. You can check the combat result entering with a browser in opbe/test/runnable/MyTest.php.$player = new Player( 2, array( $fleet)) Return new PlayerGroup( array( $player)) $player = new Player( 1, array( $fleet)) Write a lot of nines in both defender's BC and attacker's BC.īecause of the double limit, your number will be trunked to 9223372036854775807.Īnyway the battle starts and are calculated as well (some overflow errors maybe). In reality, there is a small difference because the arithmetic operations aren't O(1) for CPU, and also a double requires more space than an integer. It's awesome! You can simulate 20 ships or 20 Tera ships and nothing should change. In practice, that means that the computional requirements to solve an algoritm don't increase with the input size. OPBE is O(1) in both CPU and MEMORY usage: There are different possibilities, such as O(n) (linear), O(n^2) (quadratic) etc. It seems that noone knows the O() notation, so this is the definition from the Wiki:īig O notation is used to classify algorithms by how they respond (e.g., in their processing time or working space requirements) to changes in input size. This ensure a bell curve of shots close to the ideality.Īlso,the system can be bounded by values that can be setted in the constants/battle_constants* file. Note: randomic rapid fire will only change the amount of shots,but the way it do is particularly.Infact the deviaton from the mean is made by a special random number generator implementing Gauss algorithm. Anyway you can enable or disable it inside the constants/battle_constants file. Recently was added a feature to simulate a randomic rapid fire, making the combat more realistic. To test OPBE's accuracy you have to set speedsim (or dragosim)'s battles amount to a big number, such as 3k. This estimation is improved by analyzing behavior for infinite simulations, so, One of main concepts used in this battle engine is the expected value: instead calculate each ship case, OPBE You can check in implementations directory for your game version,īe sure you have read the license with respect for the author. automatic Bcmath detect and usage if needed.Cross-platform (XgProyect,2moons,Xnova,Wootook etc).Report can be stored as object in database.Plunder algorithm (resources partition).Randomic rapid fire with normal distribution.OPBE is the first (and only) battle engine in the world that uses Probability theory:īattles are processed very very fast and required little memory resources.Īlso, memory and CPU usage are O(1), this means they are CONSTANT and independent of the ships amount.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |