Code Monkey home page Code Monkey logo

pyx-reloaded's Introduction

Pretend You're Xyzzy

A fork of the original Pretend You're Xyzzy. Complete re-write of the frontend, and major changes in the backend. Finished product will have material design, work fairly decently on mobile devices, and have a server that is self-contained instead of depending on Tomcat.

Features

We are nowhere near close to "done." It's been amazing to watch this thing climb. However, while we're working, we'll add new photos and explanations here so (eventually) we'll be able to convince you to use our fork. The main advantages to using this over the original or another fork are as follows:

  • Improved back-end
    • Easier installation using a single jar file
    • No dependency on containers like Tomcat
  • Completely new front-end
    • Full support for mobile device browsers (the current one simply doesn't work right in a browser on your phone)
    • Material Design through MDC-Web
    • See more below!

The following features have been implemented thusfar:

Removal of the BULLSHIT the original put you through to get to the games!

This was a pain in the ass. The first screen the server takes you to is now the one with a place at the top to get a nick and start playing!

No Games is absolutely fine

The original PYX had issues: It would spit errors along the lines of "Game 0 not found", it appeared as if at least one game should be open at all times if the server is running. We fixed this, and added a beautiful placeholder to make sure everyone knows no games exist!

...but some may be necessary to have a good time!!

New Game!

We cleaned up that ugly-ass screen the OG PYX had. It's been replaced with a nicer modal dialog (scrollable!) and - unlike its predecessor - has a built-in way of adding Cardcast decks via code straight from the UI.

Selecting the cards from the original PYX is also included, with Material checkboxes to make life complete!!

A view of the blank Cardcast screen. #dope

Before we add a Cardcast to your game, we want to make sure it's the exact one you want, by the author you chose.

When this appears, the deck you selected and confirmed should now be an official part of your game!!

Oooooooh Shiny!!!

We've added custom colors from Google's Material palette. You may have noticed the ever-changing scheme in the photos above. The top-right "gear" icon opens this dialog. The screenshots were all taken within seconds of each other thanks to this screen. It also has a dynamic preview so you can see what your choices will look like when applied!!

Run

While the server and current WebContent can be run, the game itself is unplayable. However, if you want to to test the work that IS done so far, you can do so via the following commands:

git clone https://github.com/devgianlu/PYX-Reloaded.git
cd PYX-Reloaded
mvn clean package
sudo java -jar $HOME/PYX-Reloaded/target/PYX-jar-with-dependencies.jar

DO NOT close the terminal after the server reports that it successfully loaded X number of cards. This will shut the server down.

NOTE: These are instructions for Linux users. IF you happen to be on Windows, you can go to the Windows Store and get a CLI distribution that will allow you to run the above commands from Windows.

PREREQUISITES: You need to have JDK8 (OpenJDK and the like) and Apache Maven installed and available in your path. Please look up which packages to install, as it will be heavily dependent upon which distro you run.

After, run:

ifconfig

from your terminal. Find the one section that has <UP,BROADCAST,RUNNING,MULTICAST> and copy the IP address, which should be marked as inet. Paste that IP address in your browser. If all is working smoothly, you should be taken to a page asking for you to enter a username.

pyx-reloaded's People

Contributors

ajanata avatar allquixotic avatar clutterskull avatar devgianlu avatar drbild avatar erickrobertson avatar hoppermcs avatar mokomull avatar rootatdebian avatar timsookram avatar uecasm avatar xske 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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pyx-reloaded's Issues

We Need A Slack or Mailing List

@devgianlu,

I'm onboard with it. I've always wanted to do something like this....kinda like how Matt Mullenwag and Mike Little started WordPress.

That said, we need a place for all of us developing and contributing to the project to have a place to co-ordinate. Slack, Discord, a mailing list, or anything would work. The university's ACM chapter uses a Discord server for all their co-ordination, but wherever else you can get interested folks to congregate in a single place works great too, whether it be a Slack, Telegram, or even a GNU Mailman mailing list. Hell, I could use the christoffen.com host to setup a mailing list if needed.

I am definitely interested in working on the UX and UI portions if you're doing the backend (because I don't have a damn clue about how the backend works, Java isn't really my forte but I'll figure it out).

I didn't think I'd be working alongside others on this project, but happy to join!

Cards list layout

Doing the cards list layout isn't a simple task as cards might have different heights. So there are two solutions:

  • Make all the cards the same height (might have issues with overflowing text and we don't want scrolling cards)
  • Use a non CSS approach like https://masonry.desandro.com/

Add User Avatars

  • We should have avatars beside names in the Scoreboard. It would add a little more jazz to the interface.
  • Users logged in with a social media account should have their social media's profile pic scaled into an avatar.

Inputs Broken on Mobile Chrome

@devgianlu,

Google Chrome on mobile doesn't take inputs about 95% of the time. However, Firefox Nightly on Android renders everything, albeit a bit glitchy, but still usable. Chrome, OTOH, will get you in, but none of the buttons do anything for some reason...

Events/notifications system

We need a way to notify the user of what's happening on the server and in the game. We should have two notification mechanism:

  • A semi-persistent which will display the events for an interval of time (10/15 seconds)
  • A quick one which will display things like the winner of a round

Game replays

Save the game reply and watch it later. Maybe speeded up removing the play intervals.

Add "Never" option to time-multiplier

@devgianlu My friend just tested this out today and got hype af when he saw the Cardcast decks.

He pointed out that the intervals were weird and that there was no option for "Never" - we set this to prevent getting banned when one of us has to go do something momentarily.

I don't know enough about the server to know where this is at, and I start my first day tomorrow and the stress is so real...

Server Timeout

@devgianlu - I think this can be fixed by implementing #44 - it would have a channel between client and server open at all times, rather than staggering requests via LongPoll.

It times out after having only been on the game.html page for a few seconds.

Serious issue with mdc-select

The mdc-select element has serious issues working inside dialogs and scrollable parents. Even worse with a scrollable dialog. I'll try to fix this issue on MDC.

Duel mode

This just came me to mind and I thougut it was a nice idea. This is a different game mode: two people game one against each other and there multiple judges who votes which card is better.

Chat Settings Admin Backend

There's this whole thing about chat. We should have an entire settings page for admins to customize chat. I can see options for:

  • Removing chat entirely from the view - I view it as unnecessary clutter.
  • Commands - I know people might want commands but not chat. We should have a toggle for commands.
  • Chat and Global Chat should have their own toggles.

I say this because Elijah and I don't want chat taking up screen estate - when we play, we actually call everyone we play with on Discord.

Also, because I want to make this site more mobile-friendly, (students have iPhones, so the app is good for Android, buuuut...) I want to be able to remove it completely from view - my purposes for using it are locally with students, but IMHO instead of arguing we should go with a "live and let live" approach with some of these.

Theming Framework

We need a less-centralized way to style this. I think individual servers could use some individuality.

I don't necessarily know the best way to go about this, but if we could make it so it's relatively easy to style everything, it would be great!

Allow Rounds To Be Played

@devgianlu,
This ticket contains the "vital" stuff that needs done in order to have a proper game (for the most part).

  • #44 takes priority first. My reasoning here is that the transition to WebSockets will require some changes, possibly ones that will be made as needed. In order to get the other stuff below fixed, we need to make sure that sessions work smoothly. Getting rid of long-poll and full-duplexing all comms will prevent the current fuckery that causes the current game to break (times out because, well, long-poll).
  • Make the white cards selectable
    • Make it so they can be submitted to the Czar, either via a button or modal (I'd say a button beside the arrow on the "Hand cards" bar, like a checkmark icon or something).
  • Implement interface for the judge to receive selected cards
  • Implement way to select cards for submission
  • Select a user to be Card Czar/judge
  • Update the Scoreboard in the menu to reflect which user is Czar each round
  • #46
  • #48

Make Contents of Cardcast Use MDC Grid

The stuff inside the Cardcast section should use the same grid component attached to the select menus in General.

The reasoning here is mobile responsiveness. The responsiveness of the site should be "good enough" for iPhone users. I don't normally encourage iPhone usage, but there are people who have iPhones.

Right now, due to the static nature of the contents, everything is cut off in mobile. I believe that having the "Decks" as it's own column and the "Add Deck" as it's own column, it will take up the right amount of space on desktop and will take up the optimal amount on mobile.

Set Up This Repo's GitHub Pages From "gh-pages" Branch In Repo's Settings

@devgianlu,

I've created a branch and added mdBook documentation files. Could you please set the GitHub Pages to use this branch as the content source? In the settings, it should be enabled in the directions at: https://github.com/blog/2228-simpler-github-pages-publishing

screenshot from 2018-01-27 21-35-56

THIS BRANCH SHOULD NEVER BE MERGED WITH DEVELOPMENT BRANCHES. IT IS AN ORPHAN AND WILL DELETE EVERYTHING IN THEM.

This will give the docs for the project much more structure, plus it will be sexy as hell on both laptops and phones (this is the same tool most Rust projects use to generate their docs, #dope). Also we can redirect users here from the README for setup instructions. Note that this should redirect to the URL https://devgianlu.github.io/PYX-Reloaded.

HOWEVER, ONLY YOU HAVE PERMISSION TO CHANGE REPO SETTINGS, WHICH EXPLAINS THE ASSIGNMENT AND LABEL OF THIS TICKET.

Make A CSS Class for All Cards

  • Make a CSS class for all CAH/Cardcast cards that enforces consistent width/height among each card. Should be added to an mdc-card class (or subset of).

Rooms

Just a TODO in the code, but it sounds nice. Also see #3, rooms may have separated chats.

UI To Dynamically Get, Show and Add from the "Cardcast Browse" Library

This looks like it will be the last thing we need to work on for this screen before we start building the game interface itself!!!

We need a way to dynamically add cards to the game, without the user knowing the code. It should add these items to the same exact list as the manual code entry does.

Unread notifications "chip" for new chat messages

Use a "red bubble" with a number in it to report the user it has some notifications. Use a chip with a number in it to notify the user it has some unread chat messages. The global notification system should additionally notify the user when he has more than X (like 5) unread messages.

TODO:

  • Style chip
  • Chip in toolbar
  • Message after X (5) unread messages

Switch to HTTPS

We should really use HTTPS with a certificate from Let's Encrypt.

Overhaul Server To Use WebSockets Instead of LongPoll Hack

After researching a bit to see what is in the server and why, I researched long-polling (aka "googled" and then read multiple articles) - and then talked with @devgianlu about it.

It has been decided that LongPoll needs thrown out, as it is a hack. WebSockets exist to provide a full-duplex channel for the client and server to communicate over, without worrying about accidentally DDoSing an instance.

That said, the client needed a complete re-write. We should really be asking ourselves "Can this be done any better or is this as far as we can go?" We're re-writing the parts that cause the most headaches using newer standardized technologies - AJAX instead of JSP, MDC over the OG client. If this is done properly, more people may be able to join with less strain on the backend.

Win by X

To win the player must exceed all other players' score by at least X points.

MDC Dark Theme + Toggle Roadblock

As stated in #25, usage of the built-in "dark theme" has been requested. I don't know a soul who doesn't switch Twitter to dark mode, and Discord is another example.

We may need a separate JS file to do this for us. I would recommend modding the DOM through JS instead of modding the HTML for this, and we need to figure out which components need it and which keep the primary / secondary colors.

Creating as a separate issue because we have other stuff to tend to.

"Browse" Option for Cardcast

@devgianlu,

Is it possible to keep in the ability to add the Cardcast code yourself but have a button titled "Browse" somewhere in the Cardcast section? If so, can it open a second dialog over the one that's already open?

If we can do that, we could add in a browsing feature similar to the app. It looks fucking sexy, I like where this project is going. Either 1/12 or 1/13 will be the next time I'll be able to sit down and really look at what's going on. If you don't feel like adding it in the meantime, I'll mock it up over the weekend.

TODO

  • Search
  • Filter
  • Sort
  • Pagination
  • Toggle NSFW

Support for draw cards

Black cards with draw > 0 are treated as normal cards, but they shouldn't. This also affects blank cards.

Split WebContent/game.jsp into multiple files

There is wayyy too much going on in the main game file. I have some progress already on my own fork, however I will add them to this one in a new branch. I don't request things unless I already have "skin in the game."

  • Nicknames/user accounts need to be their own page
  • The lobbies need to be their own pages.
  • The "New Game" dialog needs to be its own page.
  • The game itself needs to be its own page

This is for maintainability. The current code is a mess and poorly designed. If you have any suggestions and would like to help this "separation of powers," please let me know! This task is proving to be more difficult than I thought it would be.

Chat Form Issue

@devgianlu,

  • Same as #49, with the enter key not registering
  • Mobile issue: This thing gets super fucked up when used on mobile. Needs investigated.

Adding Themes Per Session

In regards to #7:

  • Add a "gear" icon to the top-right where the "refresh" and "logout" icons are
    Done.
  • Make the "gear" open a dialog with title "Customize Appearance"
    Done.
  • Have a toggle for MDC Dark Theme
    #30 takes this place. Don't let it hold the whole damn thing up, it's enough trouble to have its own issue.
  • Add predefined themes. We can get creative with these because of the even less centralized nature of MDC. Now we can customize individual components!
    We used MDL's predefined colors.
  • Allow the user to select their own colors. Add options for components, text, what have you. It's on an "as thought of" basis, really.
    Custom colors would fuck up the MD standards.
  • Allow saving with user accounts
    Will obviously do.
  • When logged in, theme should automatically be displayed as was saved.

Add Cardcast to the "New Game" Dialog

Get rid of the command. Add the ability to enter Cardcast decks into the "New Game" dialog instead of the current /command setup. For better usability/visibility of the feature to newcomers.

Material Design Theme

I would say a more user-friendly interface would be using Google's Material Design Lite framework. I've been working on this, and will probably work on a non-functioning prototype soon.

Disable cache on server side

Add option to disable the cache in the preferences.

These headers should do it:

Cache-Control: no-cache, no-store, must-revalidate
Pragma: no-cache
Expires: 0

Nickname Form Field Issue

So that people testing quit whining:

@devgianlu Is there a way to make the "Choose a Nickname" form actually submit when enter is pressed? It doesn't, and my friend won't STFU about it.

500 Internal Server Error...

@devgianlu Pulling down the server from material-ui, what on earth is this and why?? There's two screencaps: The 500 Internal Server JSON response, and the terminal output indicating there's a problem on the main thread. I don't know how to debug it. When you pushed, did you test it? I usually test stuff before pushing. Not sure why, I guess because I feel insecure about broken code :/

The front-end JSON error:
screenshot from 2018-01-03 18-20-52

The back-end server spits out:
screenshot from 2018-01-03 18-30-17

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.