-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Just curious, O(1)? #6
Comments
Example: This https://github.com/jstar88/opbe/blob/master/combatObject/Fire.php#L158 doesn't seem O(1) at all. It's O(n) no matter how hard you try. |
The combat engine compute size is n, a variable counting the amount of ships. As you can see from the code, the iteration run on each ship TYPE group, not in EVERY ships in them. |
Is this approach suitable for games like the old XWars? |
i dont know what game it is. Anyway it's a general approach :) |
XWars was the successor of Ogame by GameForge but it didn't turn out as well as they expected so they killed it. It was active a year or so. Ships were customizable by players instead of premade. |
if there are infinite combinations of customization, then the ship types amount is not costant. if you want implement opbe for xwars, you should make a key ID for every ship type: since they are unlimited you can use ID = md5(sum(ship_params)) |
Unless you have discovered something new, you have to iterate all ships at least once. Something in my guts tells me once is a bit low no matter how probabilistic this is.
So what is actually O(1) compared to all other battle sims?
The text was updated successfully, but these errors were encountered: