Giter VIP home page Giter VIP logo

cardshifter's Introduction

Cardshifter

  • Master branch: Build Status

  • Develop branch: Build Status

What is Cardshifter?

Cardshifter is an open-source, online Trading Card Game (TCG). The idea was born in summer of 2014 when a handful of software developers and programming enthusiasts from Code Review Stack Exchange were tossing around ideas around on how to come up with an innovative, flexible and fun game.

The primary game client as of August 2015 is web based and is hosted at http://cardshifter.zomis.net/. Its source code can be found in the Cardshifter/HTML-Client repository. The server is cross-platform compatible and runs on Windows, OS X and Linux. There are plans to feature a mobile client as well. The game is early in development, but we are working hard on adding new gameplay features, improving the user interface, and will eventually feature original art from content creators who have since joined the project.

Playing the game

To play the game, download the latest release. Start the client jar using the computer console/terminal with java -jar cardshifter-fx-<version>.jar or by saving to your computer and simply double-clicking cardshifter-fx-<version>.jar. There is usually a server running at dwarftowers.com port 4242 that you may connect to and play with other players as well as AI players. If this is your first time playing Cardshifter, you may want to have a look at the Wiki.

How can I get involved?

If you are interested in helping with the project, there are a number of ways you can go about it:

  • Open a Github Issue.

  • Find an issue you would like to work on a create a pull request or branch. Issues tagged "Help Wanted" are particularly good for new contributors to work on. Make sure you read the Developer guidelines. We also have a detailed guide on Getting started with development which should have you up and coding in no time!

  • Join the chatroom on Stack Exchange and discuss how you can contribute. Please note that a minimum of 20 reputation on any Stack Exchange site (including Stack Overflow) is required before you can post in chat.

  • Check the Cardshifter Wiki for more detailed technical information about the project.

If you are not a developer, you can also help by playing the game and reporting a bug or requesting new features. You can even become a game designer if you'd like to contribute gameplay ideas and/or game content, please join the chatroom to discuss in more detail.

Submodules

  • cardshifter-api - Classes for data being sent between client and server.
  • cardshifter-core - Contains our core TCG mod implementation, as well as various features for inclusion in the server and the JavaFX client.
  • cardshifter-fx - JavaFX Client.
  • cardshifter-modapi - Contains the core Entity-Component-System code and several components and systems for some common TCG features.
  • cardshifter-server - Server for the game.
  • cardshifter-test - Code to simplify testing mods.
  • gdx / core - libGDX core game client code.
  • gdx / android, ios, desktop, html5 - Platform specific libGDX client code.
  • Documentation - Guides for game developers and content creators.
  • extra-resources - Game content and configurations for the various mods available in Cardshifter.

License

All files in this repository, unless explicitly specified otherwise in the files itself are licensed under Apache Software License, Version 2.0 (the "License");

Copyright 2014-2015 Simon Forsberg, Frank van Heeswijk, Francis Veilleux-Gaboury, Matt Olsen, Jeremiah Smith, Jacob Wahlgren

You may not use the files except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

cardshifter's People

Contributors

bazola avatar jacwah avatar janosgyerik avatar jay1148 avatar lokkij avatar phrancis avatar skiwi2 avatar tejpbit avatar zomis 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

Watchers

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

cardshifter's Issues

Add option to load pre-packaged mods

There needs to be an opotion to load pre-packaged mods, both in the client and in the server.

Mods can be written in different languages and we are expecting a "native" packaging method, this concretely means that a Java mod should be packaged in a JAR file, and a Lua mod should be packaged in a ZIP file.

How to use TCG?

It would be good to add in the README how to use TCG.
Doing so could draw more interested coders to the project.
Without a good description at the front, it's hard to feel compelled to dig into the code to find out.

I know it's a young project. It's normal that it's in a flux and probably even fundamental things can change, which could make it difficult to write a proper overview. But at least a brief summary of the core ideas to spark interest in visitors would be good, and definitely better than nothing.

Explicit 'Scrap' button on cards

During play testing, it was discovered that it is currently too easy to accidentally scrap a card. It would be better if Scrapping had an explicit button, or if a confirm dialog is shown so that the scrapping has to be confirmed.

Support parallel building

We should look into supporting parallel building using Maven, especially now that the FindBugs checks have been added.

Need mulligan functionality

We need to have the ability to choose cards from the starting hand on the first turn, shuffle them back into the deck, and draw new cards to replace them (with no penalty)

No cards to play and no new cards drawn

Because of #11, it is possible to get into a situation where you can't play any cards and you also do not draw any new cards. Possibly ending up in stalemate.

One possibility for a fix is that you can Discard up to 3 or so cards, and draw some new ones.
Another alternative is to avoid this from ever occurring, by having more cards that can always be used.

Local game client menu

When playing a local game client, it would be nice to have a menu (using the Menu class) where it could be possible to change the AI, among other things.

Specify all possible events the core can generate

Our core will be able to generate a lot of events, all of which need to be actable upon.
We are talking about events like this:

  • Turn Start
  • On Action (right before a card gets played)
  • Turn End

There needs to be a system such that cards can add and remove event listeners on certain events.
You could have a real powerful card that has a chance to make you discard your whole hand when your turn starts. Upon activating that card, you need to be able to add that listener to the Turn Start method. When the card is deactivated, the listener needs to be removed.

We need a list of all possible events, generated by the core, on which can be acted upon.

No message sent when client leaves

Right now the client is not alerted when the other player leaves the game. When one player "clicks the X" to close the client window, nothing happens at all. If you Force Quit out of the program, the server reports this:

[2014-09-24 06:27:06,772] INFO ClientSocketHandler [ Conn-0](ClientSocketHandler.java: 61) - Socket Communication no more bytes to read for com.cardshifter.server.clients.ClientSocketHandler@72579bdc
[2014-09-24 06:27:06,775] INFO ClientSocketHandler [ Conn-0](ClientSocketHandler.java: 78) - End of run method for com.cardshifter.server.clients.ClientSocketHandler@72579bdc

Possible solutions would be for the server to send a message to the remaining client when it produces the above messages. Another solution might be to have the Client send a message to the server indicating that the window has closed. This might require a new type of Message to be created.

Split console game from the core module

Currently the console game controller resides in the core module, this should not be the case and the console version of the game should be in its own module.

game stops working when deck is empty

The JavaFX windows keeps running, but you can no longer advance turns. Here is the error message:
(This is Lua) Turn Start! {Player 'Player1'}
(This is Lua) Deck is empty!
Exception in thread "JavaFX Application Thread" java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
(followed by a stack trace)

Add new attributes to cards

Please add the following attributes for cards:

  • An actual ID field
  • Card name
  • Card description

I will leave the naming of those fields to developers' discretion.

FX Client does not close all the threads

When closing the JavaFX client window, the process is still running. All threads needs to be closed. The thread created on new Thread(this::listen).start(); is not interrupted when window is closed.

Guaranteed NullPointerException

Define scope of release 0.1

We want to have alpha version 0.1 as upcoming release, therefore I think we need to define the scope of it. I think the scope would be a working server and client, capable of playing a game.

We can use this to determine in what phase of the project we are, if work still needs to be done to get the game playable, then we will hold of the first release. If our scope is established and finished, then we could use some days to polish it some more.

cardshifter-fx wrongfully depends on cardshifter-console

The cardshifter-fx module depends on cardshifter-console, which is not allowed.
It is not allowed because the cardshifter-console is considered an end product which will be published as a fat JAR and thus should not be depended upon, instead cardshifter-fx should depend on the neccessary cardshifter libraries directly.

InviteRequest and InviteResponse

Client needs to be able to handle InviteRequest and InviteResponse.

Client A sends StartGameRequest with userId for Client B
Server sends InviteRequest to Client B, with the information that it is Client A who wants to play
Client B sends InviteResponse to the Server, with a boolean flag for if to accept or decline the invite.

Refactor Cardshifter-FX

The cardshifter-fx module needs some refactoring to reduce code duplication and improve flexibility. This mainly applies to the client that connects to the server as that client is more important, but the stand-alone GUI can be refactored as well.

Make luajava inaccessible

The luajava table should be made inaccessible in the Lua code, as you can execute any Java code and this is a security issue.

List of all current cards

Would it be possible to export a list of all current cards in Excel or CSV format? The purpose for this is so that I can work with Jay to start giving cards names and descriptions.

Opt-in for travis on certain branches

Each branch should have the option to opt-in for travis support, most likely via a small configuration file.
This should be by default enabled on the master branch.

Need hand limit

There needs to be a hand limit of 7 - 10 (adjustable) for gameplay reasons

Main class is missing in pom files

The main class is missing in the pom files, leading to an IDE suggesting the main class when running the project.
It does work correctly on the compiled versions, as the main class is actually set in the maven compiler plugin.

Choose some things before game

Before you start a game, you should be able to for example choose/modify your deck, pick your opponent (when there are multiple AIs to choose from), and possibly some other settings (allowed cards, special features, etc.)

Limited battlefield size, or scrollbar

When having more than 8 creatures on the field, the battlefield size is not enough. Battlefield size should either be limited (just like hand size has max 10), or a scrollbar should be added.

Add javadoc to core and api

All methods of at least the core and the api should be documented via javadoc, to make them easy to use in other modules.

Failing tests because of concurrency

https://travis-ci.org/Cardshifter/Cardshifter/builds/37007190 and https://travis-ci.org/Cardshifter/Cardshifter/builds/37008087 failed because of some concurrency issues.

In the test it is possible for the AI to end turn at the same time as the human checks for what possible actions there are - which calls getCurrentPhase, which makes it possible for the LinkedList of upcomingPhases to be empty.

There are also some issues about wrong type of message received in the testUserOnlineOffline method

One launcher to choose local game or server game

Currently the JavaFX application has two entry points. One for playing a local game and one for playing on the server. It would be better if there was only one. All that's really required is to add a button to the existing network launcher that starts a local game, with the FXMLGameController.

More AIs, and better AIs. Possibility to choose AI

The current AI is quite stupid, a new and improved AI should be added, but possibility should still exist to play against the stupid AI.

Should be added in both the stand-alone client and on the server. I'm imagining that on the Server there should be a sort of 'lobby' where you can choose an AI to play against, manage your deck - see #30 - and chat/challenge specific other players (or simply get paired with a random player).

'Lobby' for multiplayer games

It would be nice to have a 'Lobby' when connecting to the server, where you can see all other players that are online right now and invite a specific player to play against.

For example if Bazola, Skiwi, Phrancis and I are all online at the same time, then Bazola can send invite to Skiwi (skiwi can accept or reject invite). If/when Skiwi accepts, they leave the lobby and enter the game view (as it is today).

Phrancis perhaps sends an invite to AI Medium, and they start a game together. (All AIs automatically accepts any invite).

Meanwhile, Zomis stays in the lobby awaiting for other players to connect, or perhaps also starts a game against AI Medium.

Add a limit of time to play the turn

At the moment, I don't think there is a limit of time for a player to play his turn. It could be a good idea to add one. It could had a "difficulty" to the game, it would also prevent from players to "pause" a game indefinitely.

It could have a different value based on a type of a game (I'm not sure that concept exist yet) or if there is a single "campaign" based on the difficulty.

It could help prevent a situation that a game would be frozen by this issue : #32

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.