GithubHelp home page GithubHelp logo

jeopy's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

jeopy's Issues

Player names cannot contain spaces or special characters

The name that is given as a login should be hashed somehow to be able to contain special characters.

Look into self.connectDaemon() from line 60 in Server.py and specifically in GameServer.py at line 92 (find it in PlayerServer.py):

    self.uri = self.daemon.connect(Game(self), self.name)

Fix:

  • Replace self.name with some sort of hash function. This needs to be investigated.
  • Modify connect in Game.py to receive instead of the name, the uri of the server (line 31, Game.py) and get the proxy from that URI directly.

That /should/ do it.

Design a GUI for a game editor

To avoid manually having to write the
rules.json
file, write a small GUI application to edit a game.

It should at least support:

  • creating a round
  • creating multiple named categories with titles in each
  • creating questions (statement, answer and score)

Tips:

  • maybe reuse ButtonGridWidget, or use it to implement a preview mode
  • at least support making a basic game, with only one standard template
  • don't bother with font size hints or canvas size

Test in Windows

Find out what packages are needed to make Jeopy properly work in Windows. In particular, matplotlib...

Code is messy.

Code is messy, needs fixup to indentation.
3.0 compatibility.

Getting the local machine's IP address is hackish

Find a better solution that works all the time.
Maybe even split this across cases and in a separate file.

Currently it does this [line 28, Server.py]:
self.ip = [ip for ip in socket.gethostbyname_ex(socket.gethostname())[2] if not ip.startswith("127.")][0]

Fix:
Investigate a better solution. Maybe there is a Python package that can help.
Update: Yes, use netifaces,

http://pypi.python.org/pypi/netifaces/0.4

Render plots with 100dpi

Plots are currently rendered @ 400 dpi (or more!) causing incredible slowdowns. Perhaps adjusting to a lower value would enable the GUI to remain responsive.

Score sorting

Score is being sorted alphabetically, not by integer.

Server crash

Server crashes when a client exists the game.

Reproduce steps:
Start server.
Start two clients.
Server chooses a question.
Client number 1 chooses to answer that question. (On the server-side, a popup appears asking if the answer is correct or no).
Client 1 disconnects. (halt, init 0 or looses his LAN connectivity)
Server chooses that the answer is correct.

Effect:
After choosing the answer is correct the server hangs (100% CPU usage) and crashes in less than 1 minute.

GameServer crashes when all players have disconnected

If all players fail due to various errors, the GameServer cannot recover from the error.

raise ValueError, "empty range for randrange() (%d,%d, %d)" % (istart, istop, width)

When preparing to advance to the next question, when selecting the random range, the range will be empty and the exception is not caught.

Fix: Do not allow advancing to the next question unless there is at least one person online.

Implement a proper logger

Look into introducing a logger module and printing debug information to it.

Possibly include it in a different class and import it in every other module to have logging support everywhere.

Bug: bad nicknames

Some nicknames are invalid (example some.thing - the dot). Need name checker before joining game.
And it would be nice to be able to change nickname.

Calculate DPI for plot according to the actual canvas size

It is currently hard-coded at 100 at line 155 in Gui.py.
100 generates 800x600.
Fix:
Think a bit about what dots per inch means - 300 dpi is used for saveScoresPng() to yield a resolution of 3_800 x 3_600 = 2400 x 1200.

What about 1024x768? (1024/800 = 1.28 => 128 dpi).
Make the formula work for the size of the canvas (the size is in the Gui object itself; check setupGui!)

Extend PlotRenderer

Have it support custom dpi, labels [on/off], filename.
Required for saving scores as PNG at higher resolution + labels.

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.