YaSCPSV (Yet another SC Pilots Statistics Viewer)

2 hours ago, g4borg said:

  Reveal hidden contents

Otherwise, with floats, it helps to remember, resolution. float has a finite set of bits, depending on where the decimal is, this limits the total amount of significant digits / information stored, before and after the decimal. Btw. it’s called float because of this, the “decimal floats” between the digits dynamically. this means, that some numbers cannot be sufficiently displayed. numbers in front of the decimal take away more and more resolution, while infinitely small numbers may be cut off if combined with larger ones, if their significant parts are behind a lot of zeroes (1.2784blah E-9 ). it is not the only reason, but it plays into results, which are calculated over multiple steps, with different scales of numbers, you basicly cut off information. This gets more interesting in simulation, where this effect creates camera shakes in 3d sims if your coordinates you work with are at a certain distance from (0,0,0), reducing the resolution behind the decimal, and the main reason, most games using floats for x, y, z have a maximum mapsize of 99-999 units (whatever a unit may be, e.g. SC seems to be around 1f = 10m). There are other reasons, but this is one of the main issues for float, as the same problem almost never appears for doubles (64 bit), except you go into crazy number calcs.
I only tell you this, since you will have to study floats if you reach 3d coding. With your current learning speed, that might happen soon! ![:p](<fileStore.core_Emoticons>/emoticons/004.png “:p”)

life hack: if you ever see this happening at input (so if you input 127, and suddenly it says 127.0000001 in any kind of application) you know automatically, whatever you input, gets calculated in the background, or transformed into another number and retransformed for display, because this effect _always_ happens after calculations. this means, it is sufficient to round the value you display at output, rounding inbetween will achieve nothing, and a float will not suddenly change into something else, if you explicitly define it. Only saying, because before i understood floats, and to be honest it took me quite a few attempts, i was never sure wtf. Especially at applications, which let you input degrees (0°-360°) but stored the value in radians, so your inputted number suddenly gets fuzzy.

 

i looked at it, quite cool and short, kudos for releasing with source.

well okay, with js, thats hardly a question, but you know what i mean, with link to repo ![:)](<fileStore.core_Emoticons>/emoticons/001j.png “:)”)

Thanks

and nearly everything I have coded that has to do with SC and got finished, is avaible somewhere in the forum\the link to the source code in the forum (the crappy directx overlay ID counter and the php stats to picture thingy I used to have in my Sigbature(which actually broke the ruled since it was 20px or so to side))

Does anyone know what the minimum ram requirement for php is? I have 36Mb left.

These peoples using PhP and JS. 

Why PhP when you can asp.net ? Why JS when you can Bridge.net ?  ![:005j:](<fileStore.core_Emoticons>/emoticons/005j.png “:005j:”)

52 minutes ago, Swifter43021 said:

These peoples using PhP and JS. 

Why PhP when you can asp.net ? Why JS when you can Bridge.net ?  ![:005j:](<fileStore.core_Emoticons>/emoticons/005j.png “:005j:”)

Coz especially Bridge.net an unneeded additional layer between the code you write and the target platform is, the only advantage it may have is that C# devs can write familiar code and with plain js I can easily update smth without the need to compile it to js first (and don’t need aditional tools, just a texteditor)

For asp.net is the secod part still true bur I can’t say more about it. I myself started with php coz I wad involved in a project that was using already php.

I never bothered to learn c# and still wouldn’t think about it, while it may be usable everywhere (like Java), it isn’t perfect for anything.

Let’s be honest. JS sucks. If there are so many “layers” that compile into JS, instead of using plain JS, it’s because of this.

 

Bridge was just a random name poping into my head. But for example, let’s say you want to share some code between your client and your server.  You have tree options :

  • Convert the code manually, and spend hours doing so + requires to be updated simultaneously after every changes.

  • Don’t implement it on the client, and do a request everytimes it’s required (but will most likely lag)

  • Compile your code to JS. And it works right out of the box, and both client/server are always synchronized without any extra manipulation.

 

The best answer for both efficiency, and maintainability is quite obvious right ? 

 

Anyway it’s quite out topic.  ![:007_2:](<fileStore.core_Emoticons>/emoticons/007_2.png “:007_2:”)

Wow, so many evil words. Funny, that the most evil of them all, and the sole reason why php got so popular back then, was asp ![:p](<fileStore.core_Emoticons>/emoticons/004.png “:p”) I remember that time.

I would also still prefer php over asp.net - of course, I would do neither, and simply use a python wsgi script ![:)](<fileStore.core_Emoticons>/emoticons/001j.png “:)”) or even a perl cgi script. faster, less memory, for this task, and works on more and cheaper hosts. And I know some js purists would simply go node.js. yeah, i know, it hurts.

 

To be honest, writing separate client and server code sometimes indeed seems annoying, but in the end, almost every time, you will have two separate layers anyway, if it grows to the point, where you would have had upsides with metalanguages. Which is why all these uber-duper-libraries which began with google gwt, never really managed to fight off things like jquery or angular. 

Personally, while i dislike php and js as languages which are prone to bad style and taste in programming, i can only laugh if someone talks about internet, M$ products and efficiency in one sentence.

I’m extremely curious about why you guys hate asp.net that bad. I mean, all your arguments are quite outdated.

What’s wrong with it ? Some real arguments needed here. 

 

All the “bad designed” stuff has been fixed by now,  It’s open source ; works on all platform (Yep, not windows only) ; faster then most languages ; well designed/organized (again, try the newer versions) ; works well for both small and big fat projects ; … What could possibly go wrong ?

cool to hear, it has developed, to be honest, i did miss the cross platform release.

but other languages did that too ![;)](<fileStore.core_Emoticons>/emoticons/002.png “;)”)  even php evolved…

there are no outdated arguments, only lobby arguments. as software engineer, if asp.net seems the best choice for some solution, it shall be that, professionally speaking. if you say, asp.net is now ready to replace python for me as the all-in-one-wonder for medium to large scale projects that begin with a script, go fish. then i just hear “I want to do everything in C#”, all too human tho, i also want to do everything in python very often. but an interpreter language e.g. does have it’s clear use cases… especially small internet services.

Where I can sympathize, as C# is indeed cool for standalone clients. I mean, dotnet we can argue about in specific areas, but it is pretty neat for writing apps.

But otherwise, lets be real, it was kind of forced to go more open, to survive, not just out of good will and best practice…  and lets not forget, if they would not have been busy fighting on browser marketshare, maybe they could have even fixed js before it became too late, and we could have avoided flash and silverlight.

I am pretty sure, for you, it’s easy, if you already have lots of projects in it - same as for me it is actually 5 minutes to create a django project, make a view which returns the template and data, virtualenv on server and push it to git and hit deploy… for someone living in java land however, he probably would not understand, why you cant just tomcat-jsp-gwt, and have the extra time eclipse saves by coding for you to make a button which deploys straight out of eclipse, or finishing writing all getters and setters…

at least no one suggested ruby on rails.

I like this layout for mobile, good idea.  ![;)](<fileStore.core_Emoticons>/emoticons/002.png “;)”) a like for you :3

 

On 6/4/2017 at 3:59 PM, Swifter43021 said:

Let’s be honest. JS sucks. If there are so many “layers” that compile into JS, instead of using plain JS, it’s because of this.

When we are using a free third-parts server, server processing are also limited because is considered that the server processor is used at the same time by many people. (It’s best to use the server-side language only when it’s necessary)

So to speed up processing, in these cases, it’s best to use the client processor with the JS.

 

Why html, css, js and php?

Because it is easily accessible from any device with a browser that is connected to a WAN.

 

On 5/4/2017 at 8:56 PM, John161 said:

Funfact: The italy tools has the same problem…

I kind of fixed it now but it shouldn’t behave like that.

We deliberately left the value with the digits after the comma because, in my opinion, is an anomaly in the starconflict database when it supplies this value in this way. This number multiplied by 100 should always give an integer. Because we can not have a 0.9 of a ship.

 

P.S.

For to quickly remember some information about these types of languages I like to use W3Schools :3

On 4/21/2017 at 8:48 PM, ITalianBadBoy said:

I like this layout for mobile, good idea.  ![;)](<fileStore.core_Emoticons>/emoticons/002.png “;)”)

Thx,

I just wanted to make smth plain simple that works everywhere.

 

Thanks to the SC Team for fixing the https access to the web api. The Github Domain now works again without the browser blocking the requests and you don’t have to rely on my router and busybox httpd.

3 hours ago, MightyHoot said:

Could you add compare thingie?
something like this:

yGOQxbY.png

Is on my ToDo List since some time, will implement it when I find enough time.

[@MightyHoot](< base_url >/index.php?/profile/256206-mightyhoot/)

Only for you

 

1 minute ago, MightyHoot said:

Ah you as lazy as me ![:D](<fileStore.core_Emoticons>/emoticons/006j.png “:D”) Deaths should have colors swapped. 

Also Dmg/min would be better and there is no kill/min…

 

I have DPS since DPS is more common, Death color was already swapped when I uploaded the Screenshot, it was just not on the server, and for kill/min, maybe I will add it.

This tool now also includes PvE stats of players (like Attack/Defence level and what levels you have unlocked)

 

https://johnzi.gitlab.io/StarConflictStatsViewer/

Essentially full rewrite is now up, which now allows to show more than 2 players at once, and fixed some of the color highlighted comparisons and added also a Russian translation.

https://sc.johnnynator.dev/playerstats/en/

https://sc.johnnynator.dev/playerstats/ru/