Updated score system:
Two different games showing you need to be consistently good, not just be slow and get loads of kills.
Probably add a penalty for games under 20 seconds.
https://i.imgur.com/pAthgpZ.png

Printable View
Updated score system:
Two different games showing you need to be consistently good, not just be slow and get loads of kills.
Probably add a penalty for games under 20 seconds.
https://i.imgur.com/pAthgpZ.png
I only really need to do the backend of the game now, then I'll do the last thing for the game it self, the highscore system.
Added a geoip API so the game can pick the right flag icon for smartCTF when the page loads, this will make the first load of the game a tiny bit slower, but it's ignore after first load and just load the data from a cookie.
Added settings so user can change name.
https://i.imgur.com/wRuzmyI.png
Spot the easter egg(s):
https://i.imgur.com/gIV8LKc.png
There are penalties for games under a certain amount of time.
Added default scoreboard:
https://i.imgur.com/1bf12oC.png
Added <//UrS//> style leaderboard:
https://i.imgur.com/sAwepxE.png
Final preview, the rest of the stuff I'm going to do to that game are minor tweaks, as well as adding headshot announcer.
The next thing to do is the game's backend for the stats website.
https://www.youtube.com/watch?v=5IXpdvOIKYM
Screenshot of early homepage for stats site:
https://i.imgur.com/z23hbWd.png
Just a screenshot to prove project isn't dead, start of match report page(it is zoomed out so i can get all of the current stuff into a sshot):
https://i.imgur.com/ayMNHfj.png
Just wasted 1 hour 30 minutes, trying to get something really simple to work but couldn't no matter what way I tried...
Turns out I forgot PHP json_encode set my int values as strings after fetching them from a database, and that was the problem, feel so stupid.
Coding tired never a good idea... this is how simple the code ended up:
Code:setMaxValues(){
let b = 0; //current bot
let c = 0; // current vaue
for(let i = 0; i < this.bots.length + 1; i++){
if(i < this.bots.length){
b = this.bots[i];
}else{
//use human data here instead of using another function
b = this.human;
}
c = parseInt(b.caps);
if(c > this.maxCaps){
this.maxCaps = c;
}
c = parseInt(b.grabs);
if(c > this.maxGrabs){
this.maxGrabs = c;
}
c = parseInt(b.assists);
if(c > this.maxAssists){
this.maxAssists = c;
}
c = parseInt(b.covers);
if(c > this.maxCovers){
this.maxCovers = c;
}
c = parseInt(b.deaths);
if(c > this.maxDeaths){
this.maxDeaths = c;
}
c = parseInt(b.flagkills);
if(c > this.maxFlagkills){
this.maxFlagkills = c;
}
}
}
Messing around with SmartCTF, removed seals and defkills and added PickUps https://i.imgur.com/MBgxvAc.jpg
Playable 2DUT on DM-Stalwart with 3 weapons so far(alt fire hasn't been done yet)
https://www.youtube.com/watch?v=XynVqGk1IjI