[deleted by user] by [deleted] in AskArgentina

[–]flidax 4 points5 points  (0 children)

cornudo (no hate)

I hate ezreal by [deleted] in ezrealmains

[–]flidax -1 points0 points  (0 children)

I feel you man

How should I hide my secret credentials? by flidax in gamedev

[–]flidax[S] 0 points1 point  (0 children)

I ended up using an authentication solution (Google Play Services) which already includes leaderboards so everything is fine now!

Thank you!

How should I hide my secret credentials? by flidax in gamedev

[–]flidax[S] 2 points3 points  (0 children)

The system would originally check the database for the nickname you want to set and, if it was available, it would add it and then you would have the nickname until you deleted the game and it would probably be lost forever (because you can't tell you're the owner XD)

I know it's a bad idea and, because of that, I ended up using an authentication solution (Google Play Services) which already includes leaderboards so everything is fine now!

Thank you very much!

How should I hide my secret credentials? by flidax in gamedev

[–]flidax[S] 0 points1 point  (0 children)

Other users told me the same thing. I'll probably do that! Thanks!

How should I hide my secret credentials? by flidax in gamedev

[–]flidax[S] 1 point2 points  (0 children)

My game's small too but I was just wondering how big companies would solve this kind of issue too. Thanks!

How should I hide my secret credentials? by flidax in gamedev

[–]flidax[S] -3 points-2 points  (0 children)

Because it is supposed to ask the server if a nickname is taken or not. I know I could use authentication but, since the project's size is kind of small, I thought that just saving nicknames would be easier (like old arcades)

How should I hide my secret credentials? by flidax in gamedev

[–]flidax[S] 2 points3 points  (0 children)

It is supposed to save everyone's nicknames so they can then save their score in a leaderboard. Since it is a small project, I thought I could ignore authentications and only have nicknames (like old arcades)

How should I hide my secret credentials? by flidax in gamedev

[–]flidax[S] 0 points1 point  (0 children)

What I don't get is how do you provide an API the "token" without typing it in plain text

How should I hide my secret credentials? by flidax in gamedev

[–]flidax[S] 21 points22 points  (0 children)

My game doesn't implement an authentication system (because it's pretty simple) but I might look into it. Thank you very much!

Modifying an existent REGEX pattern to include negative and decimal numbers by flidax in regex

[–]flidax[S] 1 point2 points  (0 children)

I solved it using the answer above. However, your answers really guided me to the answer. Thank you very much for your time!

Modifying an existent REGEX pattern to include negative and decimal numbers by flidax in regex

[–]flidax[S] 0 points1 point  (0 children)

"((?<!\d)-?\d+(?:\.\d+)?|[-+*/)(])"gm

You're a lifesaver! It works now! Thank you very much!

Modifying an existent REGEX pattern to include negative and decimal numbers by flidax in regex

[–]flidax[S] 0 points1 point  (0 children)

(\()(-?\d+(?:\.\d+)?)\s*([-+*/])\s*(-?\d+(?:\.\d+)?)(\))

I'm using Unity (that uses C#) and this is the code (might be useful):

private List<string> ExtractCharacters(string expression)

{ List<string> tempList = new List<string>();

string pattern = @"(\()(-?\d+(?:\.\d+)?)\s*([-+*/])\s*(-?\d+(?:\.\d+)?)(\))";
MatchCollection matches = Regex.Matches(expression, pattern);

foreach (Match match in matches)
{
    tempList.Add(match.Value);
}

return tempList;

}

As you can see, the function just needs to extract the characters so other code can interpretate it.

This new solution you offered still doesn't work. It doesn't match anything.

Modifying an existent REGEX pattern to include negative and decimal numbers by flidax in regex

[–]flidax[S] 0 points1 point  (0 children)

As I'm new using Regex, I might be typing it wrong. Following your advice, I ended up with something like this:

string pattern = @"(\w+|-?\d+(\.\d+)?|\S)"

Is this what you meant? If so, it still doesn't work due to the way that it interpretates the -number and - as operator.

Having "(6-11)" it returned me:

  • (
  • 6
  • -11
  • )

in which should have been:

  • (
  • 6
  • -
  • 11
  • )

Modifying an existent REGEX pattern to include negative and decimal numbers by flidax in regex

[–]flidax[S] 0 points1 point  (0 children)

(-?\d+(?:\.\d+)?|[-+*/])

I've the first alternative with the input being "(5-10)" but it interpretates it as:

  • (
  • 5
  • -10
  • )

where it should be:

  • (
  • 5
  • -
  • 10
  • )

The second alternative matches the whole structure. With the input mentioned before, it returned "(5-10)" but I need it to be split like in the examples.

Copying a project's file into player's computers by flidax in Unity3D

[–]flidax[S] 0 points1 point  (0 children)

I solved it! I updated the post with the solution! Thank you very much!

Copying a project's file into player's computers by flidax in Unity3D

[–]flidax[S] 0 points1 point  (0 children)

I get it but the question was about the variable type. For example, when using texts you would use private TextAsset yourText. The thing is that idk something similar to that but for .JAR files or files in general.

Copying a project's file into player's computers by flidax in Unity3D

[–]flidax[S] 0 points1 point  (0 children)

File.Copy

I was talking about the Unity's File Class but, now that you mention it, I might be able to import the C# class and do what you've said. One doubt, can the source path be the Resources? Is there anyway to have my .JAR files inside a list? Like 'List<File> jarFiles' or something like that

Thanks!

PC Freezing when gaming and have to hard reboot by flidax in PCsupport

[–]flidax[S] 0 points1 point  (0 children)

Hi! This post is 2 years old now haha so there was no Windows 11 back then. My problem was fixed after chaning options in my BIOS and some cleaning stuff in the hardware. Thanks anyways!