Giter VIP home page Giter VIP logo

settlersofcatan's People

Contributors

bg3232 avatar cak8 avatar jneiln avatar keananf avatar

Watchers

 avatar  avatar  avatar

settlersofcatan's Issues

Indicating initial game preferences / game display questions

Hey @lmcmenemie and @bg3232 , these were just a few things I was thinking about, and that would be needed from your end:

  • When wanting to join a remote game, there should be a way for the player to indicate the host and port for the server its connecting to. As of now, there hasn't been any discussion of a server discovery protocol between the groups, so I think its safe to assume this is adequate.

  • When wanting to host a multi-player server, there should be a box which pops up prompting the user to indicate a number of AIs (0, 1, or 2) for the server to run, with the implication that the remaining positions will be filled by online players. This will aid in testing and demo-ing immensely, as we would only have to spin up 1 remote client (in the case of 2 Ai players), instead of 3 (in the case of 0). In the code, I just need a way of retrieving a number the user entered from a UI element, which I then pass to an initialisation function for one of our LocalServers. Super easy. Perhaps a check-box option or something?

  • Is there going to be a HUD of some type (indicating basic player info like colour, number of resources, cities, dev cards, settlements, etc.)? Given that its a board game, it could be cool to have each player's info displayed in a corner of the screen, perhaps? I can tell you how all this data is stored in the client and how you can access it in a thread safe manner.

  • Do we have art assets for settlements, cities, roads, or dev cards? If not, how long will these take to make for each colour?

  • Do Node and Edge objects accurately correspond to the gaps between the hexes? If not, do you know if the coordinate conversion you use for hexes would work for both of them too?

Ask for # Ai when hosting multiplayer server

When wanting to host a multi-player server, there should be a box which pops up prompting the user to indicate a number of AIs (0, 1, or 2) for the server to run, with the implication that the remaining positions will be filled by online players. This will aid in testing and demo-ing immensely, as we would only have to spin up 1 remote client (in the case of 2 Ai players), instead of 3 (in the case of 0). In the code, I just need a way of retrieving a number the user entered from a UI element, which I then pass to an initialisation function for one of our LocalServers. Super easy. Perhaps a check-box option or something?

Basic board graphics

  • Tile assets made
  • Board drawn (code)
  • Tiles drawn on board
  • Camera/viewport configured

Move validation on Client - UI

@lmcmenemie and @bg3232 , please not the method Client.sendMoves(Turn) will need move validation. Simply just forgot to do it. I'll add it in tomorrow.

Likewise, what do you need from me for retrieving valid move possibilities? I have the master list of all possibilities stored in Turn objects. Do you want it in a different format? I swear one of you said something about wanting to retrieve valid possibilities based upon a given clicked object? Either way just let me know, and I'll get it to you tomorrow. You can continue working assuming whatever it is that you'll need will be there.

Build "random walking" AI

Build a simple AI that will:
-Determine all possible legal moves.
-Randomly assign a rank to each move.
-Pick the move with the highest value and play it.

UI issues

  • Minimum width and height
  • Stretch background on large window
  • Decide on chromeless window

3D shit

  • Grain
  • Sheep
  • Shrink island
  • Dirt colour
  • Ports
  • Robber
  • Terrain models high
  • Brighter forest
  • Hidden buildings
  • Fix model shapes

Basic main menu

  • Background
  • Title
  • Button to host game
  • Button to join existing game
  • Button to quit game

Implement Bank limits

Implement the bank on both the client and server side.

  • The server will prevent allocations / trades if there are no more resources. It will also prevent the building of settlements, roads, and cities if there are no more.

  • The client will maintain the status of the bank so that it will know when certain limits have been reached. Can be used for move validation for both AI and the client

Client worker

  • Finding possible moves given a turn thingy
  • Taking a complete action, building a protobuf and sending it to server

Null Pointer Exception on Client Shutdown

Getting a NPE when trying to shutdown server.

// in catan.SettlersOfCatan
public void dispose()
{
	client.shutDown(); // here
	skin.dispose();
}
java.lang.NullPointerException
	at connection.LocalServerConnection.getMessageFromServer(LocalServerConnection.java:34)
	at client.EventProcessor.processMessage(EventProcessor.java:262)
	at client.EventProcessor.run(EventProcessor.java:41)
	at java.lang.Thread.run(Thread.java:745)

Not moving on to game Screen

When hex-event merged with Master the game screen stopped loading. Sometimes it waits forever for client setup waiting for game information.

Potentially dodgy thread shit

The constructor of client.Client starts a new thread before the constructor of any subclass of client.Client is run.

	public Client()
	{
		setUpConnection();
		thread = new Thread(this);
		thread.start(); // here
	}

New game beautification

  • Make text boxes act like text boxes
  • Make header look like a header
  • Have sane (i.e., single player) defaults

HUD elements

Essential

  • Other player stats + trade button
  • Victory points
  • Robber
  • Resource counts
  • End turn button
  • Dev card counts (+ play)
  • Buy dev card button
  • Message system

Beta

  • Recipe hints
  • Dice roll
  • Your colour indicator
  • Hex chits
  • Current turn indicator (colour)
  • Pause menu + settings
  • Port labels

Alpha

  • Bank trade
  • Port trade
  • Player trade
  • Chat

Client logging

I am not aware of any point at which Gdx.app == null. Have you seen this happen?

	public void log(String tag, String msg)
	{
		if (Gdx.app == null)
		{
			System.out.println(tag + ": " + msg);
		}
		else
			Gdx.app.log(tag, msg);
	}

Offline Mode

Add the ability for offline mode, by allowing a server to be run locally with a client. This then means a server could have 3 local AIs and a local player, allowing for play without an internet connection.
To do this, the type of connection between a server and client must be abstracted over. Likewise, the Client must be generalised to allow for remote or local connection with the server.

Trigger renders on state updates

On:

  • building being built
  • robber being moved
  • our resources being updated
  • our dev cards being updated (bought or used)

game.getScreen().render(1)

User input during gameplay

  1. event listeners on board elements
  2. write turn state
  3. notify worker
  4. render options menu when exists

(Don't forget about trade and development cards!)

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.