keananf / settlersofcatan Goto Github PK
View Code? Open in Web Editor NEWSettlers of Catan Implementation in Java using LibGDX
Settlers of Catan Implementation in Java using LibGDX
Create models and integrate.
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?
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?
@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.
Simple check box for choosing easy / medium
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.
We have lots of still scenes, lets not kill the CPU if we don't have to.
@keananf, can you set up CI? It's super simple.
I will commit a config file, while you go to Travis CI and flip a switch on ๐
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
Reproduce:
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)
When hex-event merged with Master the game screen stopped loading. Sometimes it waits forever for client setup waiting for game information.
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
}
They don't appear
Edge.java#L69 calls navigate(start, goal)
, but both arguments argument (start
and goal
) might be null and will cause navigate
to throw an NPE.
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);
}
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.
On:
game.getScreen().render(1)
Wrapper?
(Don't forget about trade and development cards!)
Set to errors only for production, debug for development etc.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.