00:00
00:00
Newgrounds Background Image Theme

Someone gifted MetalSlayer69 supporter status!

We need you on the team, too.

Support Newgrounds and get tons of perks for just $2.99!

Create a Free Account and then..

Become a Supporter!
Response to: Unity3d WebGL Support Posted November 15th, 2021 in Game Development

At 11/15/21 05:28 AM, RaIix wrote:
At 11/14/21 11:19 AM, Dsiak wrote: The upload score is working fine but the in game score display is broken, can someone review my code and see what could possible be wrong? Thanks in advance.
Oh yeah, I remember this.

It says the default limit is 10…

…but what it actually sends when you don't set it yourself is zero.

So you're actually getting the best “0” scoreboard entries.

Set the limit to something reasonable, and it should be okay.

Also, you probably want to display the username rather than the "object" itself, so you need to get the name:

Otherwise, you end up with this:


Thank you very much, now I can grab the score out of the scoreboard, based and epic you rock. Kind of silly having the limit be zero by default but regardless problem solved. You rock

Response to: Unity3d WebGL Support Posted November 14th, 2021 in Game Development

Hello folks, I just uploaded a silly game. The upload score is working fine but the in game score display is broken, can someone review my code and see what could possible be wrong? Thanks in advance.

   void OnScoresLoaded(io.newgrounds.results.ScoreBoard.getScores result)
   {
       if (result.success)
       {
           Debug.Log("Score loaded succefully");
           for (int i = 0; i < 100; i++)
           {
               string text = "" + (i+1);
               if ( i < result.scores.Count)
               {
                   io.newgrounds.objects.score score = (io.newgrounds.objects.score)result.scores[i];
                   text += " " + score.user + " " + score.value;
                   Debug.Log(score.user + "" + score.value);
               }
               else
               {
                   text += " -";
               }
               content.transform.GetChild(i).GetComponent<TextMeshProUGUI>().text = text;

           }
       }
       else
       {
           Debug.Log("Can't Load Scoreboard");
       }
   }
   public void LoadScore(string period)
   {
       io.newgrounds.components.ScoreBoard.getScores getScores = new io.newgrounds.components.ScoreBoard.getScores();
       getScores.id = thenumber;
       getScores.period = period;
       getScores.callWith(ngioCore, OnScoresLoaded);


   }
Response to: How viable is Unity 2018's WebGL? Posted December 12th, 2018 in Game Development

I posted 2 minigames using WEBGL, don't think they have any problems concerning uploading what was build.

I'm interested in integrating newground's API using WEBGL, anyone had any luck with it so far?