RyanGrieb/OpenCiv

Religion: Limit the number of pantheons that can be founded to 8

RyanGrieb opened this issue · 13 comments

Currently, all players can pick a pantheon. We want to limit this number to 8, since CityReligionFollowersUpdatePacket only handles a list of 8 unique religion followers.

We would modify the onNextTurn() method in the Server's PlayerReligion class to handle this.
Where we would iterate over Server.getInstance().getPlayers() ... getReligion()with a getPickedBonuses() > 0 to get the current number of pantheons.

Hi, I'd like to give this a shot. 👋

Hi, I'd like to give this a shot. 👋

Okay sounds good! Let me know if you have any questions.

Okay sounds good! Let me know if you have any questions.

Actually, I do have a quick one. I'm not super familiar with eclipse, how do I run your game from it? I've imported it as an existing gradle project, but I'm not sure how to launch it.

Okay sounds good! Let me know if you have any questions.

Actually, I do have a quick one. I'm not super familiar with eclipse, how do I run your game from it? I've imported it as an existing gradle project, but I'm not sure how to launch it.

To get the game running you would run the OpenCiv-lwjgl3 Lwjgl3Launcher.java class & the OpenCiv-server Server.jar To start the Client & Server/

Right click -> Run as -> Java Application
run_client

Right click -> Run as -> Java Application
run_server

Then click Multiplayer -> Connect -> Start Game

To actually found a pantheon in the game you'd settle a city, research pottery, build a chapel, and wait until you have 10 faith.
Also, you can press spacebar to skip turns

Very helpful! By chance, which version of java are you using?

Very helpful! By chance, which version of java are you using?

The project uses java 11+

Argh, I would really like to start on the issue, but Eclipse keeps giving me problems. I set java my execution environment to Java 14, to no avail. Eclipse keeps complaining about my native dependencies. This feels like an issue on my end, but is there anything else that I should have installed on my machine to make it work? Here's the error I get whenever I try to run the launcher:
Screen Shot 2022-01-07 at 1 04 31 PM
does it look familiar?

Argh, I would really like to start on the issue, but Eclipse keeps giving me problems. I set java my execution environment to Java 14, to no avail. Eclipse keeps complaining about my native dependencies. This feels like an issue on my end, but is there anything else that I should have installed on my machine to make it work? Here's the error I get whenever I try to run the launcher: does it look familiar?

That's really odd. What OS are you on?
Check your java build path in your project properties, and play around with the version your using.
This is what mine looks like,
image

If that doesn't work I'd also try installing JDK 1.8 or JDK 11, and change to execution environment to them.
https://www.oracle.com/java/technologies/javase/javase8-archive-downloads.html
https://www.oracle.com/java/technologies/javase/jdk11-archive-downloads.html

I'd like to help you more but I've never experienced that error before.
Also, to note is that OpenJDK isn't compatible with LibGDX.

Could you provide that log file?

Could you provide that log file?

sure.
hs_err_pid2838.log

Tried a number of things, different java versions (11), and even updated my Eclipse and did a hardware diagnostic on my machine. Not sure what's up!

Could you provide that log file?

sure. hs_err_pid2838.log

Tried a number of things, different java versions (11), and even updated my Eclipse and did a hardware diagnostic on my machine. Not sure what's up!

Thank you! I've pushed some changes fixing what I suspect might be causing the issue. Do a git pull & let me know if it did anything. I appreciate your patience. If it still doesn't work disable the rest of the config settings, vsync, ect. in Lwjgl3Launcher.java

Could you provide that log file?

sure. hs_err_pid2838.log
Tried a number of things, different java versions (11), and even updated my Eclipse and did a hardware diagnostic on my machine. Not sure what's up!

Thank you! I've pushed some changes fixing what I suspect might be causing the issue. Do a git pull & let me know if it did anything. I appreciate your patience. If it still doesn't work disable the rest of the config settings, vsync, ect. in Lwjgl3Launcher.java

Darn, I'm still getting the same issue (sorry for the slow response on my end). Pulled and tried to disable anything config related in Lwjgl3Launcher.java, same in Civilization.java. It's too bad because I think you have something cool here that would be fun to work on! I'll try to figure out what's going on in my own time as well. I'll also try some other IDEs in case Eclipse is the one causing me problems.

I'm sorry we weren't able to figure it out. Once I get a mac I'll definitely look into that error.