[SteemNova] UI improvements and bugfixes

in utopian-io •  5 months ago

image.png

Last two weeks definitely pushed the SteemNova project forward. Overview page got additional metrics info and Statistics tab came with new banner showing latest #steemnova-rewards article upvotes and payout. Some of SteemConnect users who didn't set any Steem avatar can also login properly now.
Few issues reported by @louis88, @desteemy, @dotevo and @ferflo got fixed also.
From game engine things, after combat defense regeneration got corrected and ACS randomization improved.

Players online and moving fleet counters

For better metrics, simple SQL statement queries number of online users (last 15 minutes activity) and how many fleets are moving through the universe. Maybe in the future players will be able to plan their action based on whole server activity? Sending attacks in the night can be surprising.

SQL statements

SELECT COUNT(*) FROM %%USERS%% 
WHERE onlinetime >= UNIX_TIMESTAMP(NOW() - INTERVAL 15 MINUTE)

and

SELECT COUNT(*) FROM %%FLEETS%%

image.png

Daily shares banner

At the top of Statistics page there is Daily shares banner. It is linked to latest #steemnova-rewards article posted daily. We can see number of upvotes, estimated payout (prize for players) and small image.

image.png

Latest article pulled by steem.api.getDiscussionsByCreated({"tag": "steemnova-rewards", "limit": 1}

Display default Steem avatar if not set any fix

There was a rare bug when log in through SteemConnect. Some users who deleted their profile's account->json_metadata info didn't have expected avatar. In this situation they were unable to enter into the game.
Simple try{} catch block was added.

$avatar = 'styles/resource/images/user.png';
...
try{
  $avatar = json_decode(Session::load()->data->account->json_metadata)
  ->profile->profile_image;
}catch(Exception $e){}

image.png

Maximum allowed Member in Alliance-Page-Settings fix

In regard to @louis88 bug-hunt I have investigated why current and maximum number of Alliance players are inaccurate. It seemed that ally_members and ally_max_members variables were used inproperly. Maybe previous programmer oversight.

Possibility to destroy last def and shields fix

After fleet combat, each defense structure has 70% probability to fully rebuild. It was done in 2Moons already. However there was mathematical error with rounded up numbers. In result, no matter how many units were destroyed and rebuild, always AT LEAST one was recovered. Fully destroying enemy defense was impossible.
Proper fix is presented.

$giveback = 0; // number of rebuild units
for ($i = 0; $i < $lost; $i++) {
  if (rand(1, 100) <= 70)
    $giveback += 1;
}

ACS randomization fix

ACS (alliance combat system) shots firing randomization was inaccurate. There was 50/50 chance to hit one of two enemy fleets, no matter how big each fleet was. Some players could abuse this system by joining very big fleet with very small one. That small one would have be a meatshield for at least one round giving near-impossible shield for the bigger group.
The includes/classes/missions/functions/calculateAttack.php file has been rewritten a little.
Now the probability of fleet being hit depend on it's units amount.

Unable to send mission Station fix

Simple patch for a bug occured after @dotevo Marketplace addon. SQL query got cut a bit too much.

Spanish translation %s errors

Thanks to @ferflo, who discovered errors in Spanish messages translation. Messages according to status of Expedition mission send didn't match arguments provided. All of Expedition messages expected too much parameters and return crash instead.
Simple %s enumeration was given for

  • $LNG['cff_mission_target_bad'],
  • $LNG['cff_mission_target_good'],
  • $LNG['cff_mission_target_stay']
    in language/es/INGAME.php.

Information

steemnova/steemnova project is fork of jkroepke/2Moons Open Source Browsergame Framework. The goal is to fix bugs and develop the engine in the direction of maximum Steem integration.

Links



Posted on Utopian.io - Rewarding Open Source Contributors

Authors get paid when people like you upvote their post.
If you enjoyed what you read here, create your account today and start earning FREE STEEM!
Sort Order:  

Nice job, everyone.
Thank you for contributions.

Thanks for the contribution. It has been approved.


Need help? Write a ticket on https://support.utopian.io.
Chat with us on Discord.

[utopian-moderator]

Hey @mys I am @utopian-io. I have just upvoted you!

Achievements

  • Seems like you contribute quite often. AMAZING!

Utopian Witness!

Participate on Discord. Lets GROW TOGETHER!

Up-vote this comment to grow my power and help Open Source contributions like this one. Want to chat? Join me on Discord https://discord.gg/Pc8HG9x