Coder Social home page Coder Social logo

zengm-games / zengm Goto Github PK

View Code? Open in Web Editor NEW
338.0 14.0 123.0 199.99 MB

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

HTML 0.18% JavaScript 3.32% Python 0.65% TypeScript 94.71% SCSS 1.12% R 0.02% Shell 0.01%
basketball football game video-game video-games basketball-gm football-gm single-player hockey zengm-hockey

zengm's People

Contributors

battaile avatar briansd9 avatar briwa avatar darcydev avatar dbarring avatar domini7 avatar dumbmatter avatar fearandesire avatar garyking avatar jducrot avatar jericksanjuan avatar kevbauer avatar kgilbert-cmu avatar kmgilbert avatar levidyrek avatar lordlouckster avatar luso97 avatar mamamia5x avatar mhgamboa avatar mikemorton avatar nicidob avatar rwinphone avatar scotwk avatar skandasastry avatar snzow avatar sumitde22 avatar superhman1 avatar tjhighley avatar travisjb89 avatar vklein52 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

zengm's Issues

initialisms and abbreviations of complex names

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.

Game stuck (not first time this has happened)

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.

Substitutions appear disconnected from game state

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?

  1. 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.

  2. 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.

  3. 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.

Salary cap warnings seem wonky

In the trade screen, the warning that pops up if the team your trading with is over the salary cap has a bad calculation in there somewhere:

image

Issues

  1. An option to do multiple buy outs at once.
  2. Make the "what would make you agree to this deal?" faster because in some case it's very slow and it usually ends up being super ridiculous or it ends up in a no trade.
  3. Also most of the time players tend to never reach their potential. I spend all my precious draft picks on someone with high potential and never really getting anything out of it. Maybe have a summer league? So you can choose a number players to go and they would increase their chances in reaching their potential.

EDIT: whoops... all i did was give suggestions. i guess these really aren't issues. nevermind then.

apostrophes in names are ignored by tools/names.js parser

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.

Transaction log object store format

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.

Game stuck (probably Javascript error)

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:

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.

Just a few basic issues around championships and trades

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!

Coaching negatively impacts development?

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]

Game crashes during drafts

Happens 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.

Draft scouting page: issue with last names in 2 parts

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)

Personal Fauls

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.

Inaccurate "Days Remaining" counter

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.

Currently the "What would make you agree..." button doesn't refresh data properly

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

Thoughts on allowing to load a roster from a URI?

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

2 bugs with custom roster starting in phase 7 (re-sign players during offseason)

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:

  • the user cannot re-sign players in the Expiring Contracts page (no problem with CPU controlled teams).
  • players in the upcoming draft (the ones with tid:-2) are in the free agents pool

You can reproduce both issues with the roster in attachment. I hope I did nothing wrong
2016-17.NBA.Roster.json.zip

free agency nuance

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:

  • lots of talent in FA, not a lot of cap space
  • not lots of talent in FA, tons of cap space

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:

  • average overall rating of the top X free agents?
  • number of players within Y overall rating who are the same position as a FA
  • something else, some combination of these, etc

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

  • cap space of the team talking to the player
  • average cap space of remaining teams

could be used to again alter a player's expectations.

Crashes when using the Trading Block

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.

Better schedule generation for non-standard leagues

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.

Imported draft classes & players birthdates

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

Don't highlight column heading text when double-clicking on them.

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?

[feature request] Edit team logo in the edit team info

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 :-)

Don't highlight row if clicking on a link.

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.

Crashes

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.

navigate back to Free Agents page after signing a free agent

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.

New league starts user team under salary floor and allows play

image

  • screenshot taken immediately after league generation

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.

Ability to edit national TV revenue

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?

Playoffs aren't calculated right

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.

use new team logos on Playoffs page

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?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.