zengm-games / zengm Goto Github PK
View Code? Open in Web Editor NEWBasketball GM (and other ZenGM games) are single-player sports management simulation games, made entirely in client-side JavaScript.
Home Page: https://zengm.com
License: Other
Basketball GM (and other ZenGM games) are single-player sports management simulation games, made entirely in client-side JavaScript.
Home Page: https://zengm.com
License: Other
So, now that names have somewhat stabilized and people are giving positive feedback about the new foreign names, I wanted to revisit one of the aspects I was working on right before the new name generation went into place.
(1) What do we do with complex names? and (2) How should we make complex names?
The first is the easier question, and fairly methodical. France and Canada are the two largest sources of foreign names, and we get fun easter eggs like "J.D." and "J.R." on the first names side as well as "Alexander-Walker" on the last names side. France has a dozen hyphenated names, like Jean-Emmanuel, Jean-Frederic, Jean-Michel, and Jean-Philippe, among other non-Jean names. So basically what I'm saying is that we know these names exist in our names.js database. Should a name like "J.D. Walker" appear on the draftScouting page as literally "J.D. Walker" or "J. Walker"? I presume the former. What about "Jean-Philippe Eliezer-Vanerot" or "Guy-Marc Jean-Baptiste-Adolphe"? Those are all legitimate names under the current generator. I'm just going to suggest changing my original code to interpret hyphens and periods in the first name as if they were spaces, so that we'll get "J.P. Eliezer-Vanerot" and "G.M. Jean-Baptiste-Adolphe".
The second is... significantly harder. I'd like to be able to say that we're knowledgable enough of cultural customs in a hundred countries that we could make accurate estimates of the hyphenation and middle name prevalence in each country's language. However, I'm almost certain we can't do that. I'd like to leave it an open question of how we can extrapolate the webcrawler's basketball data to build names that are indicative of what's in the greater basketball population of a country, regardless of whether a player of that specific name has played basketball in the real world.
I'm in 2018 of my BGM season, and I've run into an issue that's made me quit my other two savefiles: the game is stuck. My team is 77-5 and made 1st seed of playoffs, but I can't sim after the 82nd game of the season. At first the "Play" button has the regular simulation options, but after I click any of them, the "Idle" indicator does not change, and the speech bubble spawned upon a click of "Play" becomes black. The debug menu's "Skip to Playoffs" option doesn't change anything. Any help to sort out this issue that's already happened to me quite a few times would be fantastic!
Just some quick specs: I'm using the latest version of Chrome Beta on Windows Vista.
Nobody knows why yet. Nobody has a way of consistently reproducing the problem. It's rare, but it does happen. Here's some discussion on Reddit.
Substitutions appear to be completely disconnected from game state (except for fatigue). While the approach is simple and effective, I wonder if it may make sense to also consider score and if it is a playoff game when substituting players.
As an example - many games this season Steph Curry didn't play the 4th quarter because his team was so far ahead.
Why does this matter? The resulting game logs often do not reflect a realistic result. Players in similar roles and skill levels split time and have weird substitution timing. Starters are injured too frequently on great teams.Too many players play in playoff games (compared to the NBA, where 10 man rotations (i.e. 2015 Boston) turn into 7 or 8 man rotations). None of this can be controlled with the existing code.
How to implement?
add a score check component to "Update players on court" function, and depending on margin and if a sub has happened recently, allow worse players to play. I am imaging a variable called "margin change since last sub" which tracks how well the team is performing with that lineup on the floor. A positive number decreases substitution rate, a negative number will increase it. I am screwing around with this now - although I am far from an ace coder so expect an ugly hack for v1.
de-buff the overall rating for players in roster spots <= 5 when games are out of hand in 4th quarter. if margin / (mins remaining * 2 ) > 1 & Margin >= 13, debuff overall rating for those spots by 50% (will require testing - also at what point is a game out of hand?). Probably should not affect playoff games.
de-buff the overall rating for players in roster spots 8+ if playoffs = true in the substitution calculation only. Ironically this may somewhat decrease FG% in the playoffs but it would also more closely reflect reality.
When team cash exceeds ~2 billion (presumably 2^31, using signed ints?), it "rolls over" to 0.
EDIT: whoops... all i did was give suggestions. i guess these really aren't issues. nevermind then.
A commit from my complexNames branch (6bdbdb4
) tried to manually edit these names, but it's been reverted so that the data/names.js file will always be in agreement with the output of tools/names.js
The parser has a bug and I have a burning passion to find it. I don't know if it's a data source issue or a parsing issue yet.
There needs to be a structure that logs league transactions such free agent signings, player trades and anything else that would be important to keep track of.
When I press the "What Would Make This Work" button, it automatically selects a player from my roster to be a part of the trade when I don't want it to.
I don't know if it's a bug or a feature, but released players are not listed on the "Transactions" page (https://play.basketball-gm.com/l/XX/transactions/all), either filtered by All or by team.
These released players are on the event log, though
So everything has been going fine, I am in playoffs, I finish the last game before championship and the score reads 4-0. Usually I need to click "Play one more day" to get to the dashboard showing the year and to move onto the Drafts.
This time, I am stuck at 4-0 and clicking play one more day or even any from debug menu do nothing and there seems to occur a javascript error:
The game seems to be stuck here and no stop button appears either. I need to reload the browser for the stop button to re-appear.
I was in league for 3 years then got fired... within those 2 years, I
-won champs
-lost conf final
-won champs
I always get those you're too boring and etc messages especially right after I win championships.
Another problems with trades are that some are too unrealistic. I tried to trade for 1 player and the gm suggested for more than half the players on my team. It would be nice if you added a feature where there were other teams proposing trades for your dominant player.
It's a very fun game, I think I play too much....great job!
Was diving into the core game.js to see how coaching affects player development and found the following equation:
baseChange *= ((coachingRank - 1) * 0.5 / 29 + 0.75);
(where coachingRank = 1 for best and 30 for worst).
Unless I'm misreading this, a good coaching rank will actually harm the player, as opposed to help: a top ranked coach will result in a .75 multiplier, whereas the worst-ranked coach will result in a ~1.23 multiplier.
Shown via Python:
>>> x = [(a - 1) * 0.5 / 29 + 0.75 for a in range(1,30)]
>>> x
[0.75, 0.7672413793103449, 0.7844827586206896, 0.8017241379310345, 0.8189655172413793, 0.8362068965517242, 0.853448275862069, 0.8706896551724138, 0.8879310344827587, 0.9051724137931034, 0.9224137931034483, 0.9396551724137931, 0.9568965517241379, 0.9741379310344828, 0.9913793103448276, 1.0086206896551724, 1.0258620689655173, 1.043103448275862, 1.0603448275862069, 1.0775862068965516, 1.0948275862068966, 1.1120689655172413, 1.1293103448275863, 1.146551724137931, 1.1637931034482758, 1.1810344827586206, 1.1982758620689655, 1.2155172413793103, 1.2327586206896552]
Reposting a bug reported on the subreddit to the Issues section over here.
My guess is that it has to do with this code here.
won0
assigned to the wrong team? Maybe the series was actually 4-1Happens both during fantasy and regular drafts on Mac OSX / Chrome.
The console output:
Uncaught TypeError: Cannot read property 'innerHTML' of undefined
at season.js:692
.
If I'm Chicago, and I load up the Cleveland roster under trades, it appears to display my (Chicago's) roster, instead of Cleveland's.
In the "draft scouting page", only the first part of a last name will appear.
See my boy Vinny Del Negro for instance:
http://i.imgur.com/UbI0zSZ.png
Who gives in the draft scouting page:
http://i.imgur.com/P4nHiMT.png
I guess the issue lies as long as a player name has more than one space.
In the case of a player such as Juan Carlos Navarro, I could simply add a dash between Juan and Carlos to avoid "Carlos" being considered a part of the last name ("Juan-Carlos" seems less ugly than "Del-Negro" :P)
Minor inconvenience, only esthetical:
when you release a player in the offseason right after you drafted him, his salary remain in the "salaries" section of his profile, although he won't cost anything to the team (and thus won't be payed)
A player here averages 7.4 personal fouls per game, there are games where he have 9 fouls and no one on his team was fouled out.
If you choose a non-static number of days to automate (ie "til playoffs" or "through playoffs", that kind of thing) the 'days remaining' counter starts for 100 days remaining and counts down, which is non-ideal. If there are ten days left until playoffs, it should start from that number.
Reddit thread here
Looks like something in trade.js causing an issue, maybe the update from earlier today has now been pushed?
Javascript console:
[{TIMESTAMP redacted}] runRoute: POST /l/1/trade davis.js:485
Uncaught ReferenceError: teams is not defined trade.js:632
tx.oncomplete trade.js:632
presumably it also points to 634 in some cases
Basically now you click on the button, page loads for a second, stops loading, but the data is not refreshed nor is the "Waiting for Answer..." button returned to normal on the trade page
now that @alexnoob is hosting his rosters on github I wanted to hear the devs thoughts on allowing to load rosters directly from a URI instead of just from a local file. It would be nice if I could paste a github raw URI like:
https://raw.githubusercontent.com/alexnoob/BasketBall-GM-Rosters/master/2015-16.NBA.Roster.v0-4.json
I tried to edit the NBA roster so it starts during the 2016 re-signing phase, with the "gameAttributes": [{"key": "phase","value": 7}, feature
I encountered 2 issues:
You can reproduce both issues with the roster in attachment. I hope I did nothing wrong
2016-17.NBA.Roster.json.zip
Unable to progress into the next season. Simulation stops with 1 day left in free agency.
Any idea how to get it back? Thank you!!!
following up on a comment i saw in your reddit thread, i am wondering about the relative feasibility of a small update to how free agency works. as you noted in the thread, the problem scenarios are:
i think a straightforward solution here would be to generate some rule-of-thumb metric to assess the relative level of competition in a given FA period:
and then this could be used to shift a player's demands as FA goes on.
As for cap space, I think a combination of
could be used to again alter a player's expectations.
I've had several reports of people getting hard browser crashes when using the trading block feature. Everyone reporting this problem was using Chrome in Windows 7/8. I haven't been able to reproduce this problem (although I don't have Windows 7/8 to test on). It's likely driven by a bug in Chrome, but I need to be more confident in its reproducability before I submit a bug report.
If anyone has more information, please post it here.
See this error and my comment there: http://www.reddit.com/r/BasketballGM/comments/326ddi/83_game_season_finally_caught_error_in_console/
Related: are errors inside promises being sent to Bugsnag?
Currently an NBA-like schedule is generated if you have a league with 82 games, 30 teams, 2 conferences, and 3 divisions. Otherwise, season.newScheduleCrappy()
is used. And as you can see, it's basically just totally random, which kind of sucks because it will result in unbalanced schedules.
It would be nice to do better. Even ignoring conferences and divisions, having all teams play each other an equal number of times (or as close to that as possible) would be a big improvement.
Hi,
I don't have any suggestion of solutions but when you have a player with all the special skills (3ABDiDpPoPsR) pushes the gamelog to the game schedule, making the "game score" column overlap
The screenshot may help you understand:
http://imgur.com/0gtqCXR
NaNFound in /l/11/roster
NaN found before writing to IndexedDB
../js/util/helpers.js:802 - IDBObjectStore.add
../js/dao/indexedDb.js:142 -
../js/lib/bluebird.js:5127 - tryCatch2
Hi dumbatter
I think I found a bug with imported draft files.
Players age, in custom draft files, is defined by birthyear.
When you import a draft class 2 years in advance (tid -5?), the game gradually change their birthdate to 2 years before the real date, making the player 2 years older than he should be when the draft happens.
Take any file from the legacy roster: for instance Kobe Bryant is born in 1978 in the draft file. The game changes its birthyear to 1976 2 year after you import its class in the n+2 draftclass. If you reimport the draftclass the season before the draft, everything goes back to normal of course.
I hope my explanation was somewhat understandable enough and that I used github the right way, it's my first time and I'm not used to that CVS craziness. :\
See you
For tables, clicking once on a column heading will sort ascending. Clicking twice will sort descending. Therefore, if I want to sort descending, then I double-click twice. This also highlights the text in column heading.
Please add CSS to prevent this from happening. Something like the following should be enough, depending on desired specificity:
th {
user-select: none;
}
Also on a side note, I'm surprised that no CSS compiler is used, like Sass. The CSS would surely be cleaner then?
See here: http://i.imgur.com/HoHk9x1.png
It's kind of annoying as these messages stay for a while... And I tend to change teams frequently
Also a minor inconvenience with these infoboxes: there is only one that remains on the screen at a time. It means that when we get a notification of an injured player, we don't even have the time to see the result of the latest game.
Reported here: http://www.reddit.com/r/BasketballGM/comments/1l5mwe/some_notes_on_now_the_game_simulator_works/
On line 650 of gameSim.js this.recordStat(this.o, p, "pts");
should be this.recordStat(this.o, p, "pts", 3);
NaNFound in /l/1/customize_player/143
NaN found before writing to IndexedDB
../js/util/helpers.js:802 - IDBObjectStore.put
../js/dao/indexedDb.js:154 -
../js/lib/bluebird.js:5127 - tryCatch2
I don't know if it's also the place for requesting features, but I give a try anyway :p
In the Edit Team Names page (once God Mode is enabled), there is no option to edit the image URL to the team logo.
As I use the 1985 Legacy roster, I'd appreciate to have the possibility to update team logos as years go by :-)
If I hold down a key and left-click a link, then it should not highlight the row.
Normally, clicking anywhere on a row will highlight it. But, if I hold down a key, such as cmd-shift-Left Click (which opens a link in a background tab), then the row should not be highlighted.
Or better yet, just don't highlight the row when clicking on any link in that row.
Please highlight the row for our own team on the "Team Stats" page, similar to how our own players are highlighted in several different pages.
I've gotten reports of browser crashes in both Chrome 22 and Firefox 28 on Windows. The people who reported crashes see them relatively frequently, but most people have no problem.
Personally, I have not seen any crashes anywhere since this Chrome bug got fixed. That bug was difficult to diagnose and reproduce, and it only happened in a specific version of Chrome on Linux. I wouldn't be surprised if the other problems people are having will be similarly difficult to handle.
But if anyone has any more information, post it here. At a minimum, post your browser version, OS version, and when/where the crashes occur.
Typically you're going to sign more than one free agent at a time. Going back to the roster breaks this flow up and you constantly have to navigate the cycle of Free Agents > Player or Negotiations > Roster > Free Agents > ...
Further proposal: redirect to roster if number of spots left is 0, redirect to free_agents otherwise.
Can no longer read PER from the trade screen table most of the time... the background behind the controls on the right side sits on top of this table.
Thanks!
In a new league, I was allowed to start the 2013 regular season under the salary floor ($20M) because the team generated under that salary. I haven't looked into the league generation code, but it should either (1) generate all teams between the salary floor and the salary ceiling upon creation of a new league or (2) refuse to start that first season until the salary floor requirement is met.
I've probably created 10 leagues between production and my local build, and this is the first time I've run into this issue. This instance occurred in production.
Changing the salary cap to the 2016-17 NBA values while using a custom roster can have a damaging side-effect: too many teams are losing money.
I tried to change the value of the national TV revenue ( "nationalTv": {"amount": 50}, within a "tid") but to none effect available. Did I miss something?
So, playoff seeding is currently 1-8 based on record. In the NBA, playoff seeding takes the winners of each division, plus the next best record, and gives them the top four seeds based on overall record. Then the next four seeds go to the best four teams of the 11 remaining.
I don't know if this is an NBA rule you want to follow or simplify out of existence.
I've really wanted to incorporate the wordmarks of each team as a stand-in for the text-only name that goes through in each round. Something akin to www.nbaplayoffsbracket.com
However, I think the wordmarks might be a bit too non-uniform in size to do that consistently without some bad resizing (e.g. look at the difference between Earthquakes and Crabs).
In the short-term, how about just placing the winning championship team's primary logo in the center of the playoffs screen, right above the scores for the Finals games?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.