Git Product home page Git Product logo

openciv's Introduction

OpenCiv tile_city

Thank you all for 100 stars, I have not forgotten this project. Once I finish my school obligations I intend to ramp up development again.

example workflow Lines of Code Discord

alt text

About

OpenCiv is a love letter to turn-based strategy games inspired by Sid Meier's Civilization. The game mainly focuses on Civ 5 features and strives to improve on certain aspects that were lacking in the series.

The main objective of this project is to allow players who enjoy Civilization games to play it directly on a web browser.

How do I build and run this?

To run a local instance, type docker compose up -d. (Make sure to have docker installed!) To play, go to localhost:1234 in your browser.

How do I play this?

Currently, the project is being rewritten so no playable version is available without building the project.

Keybinds

ARROW KEYS or LEFT-CLICK DRAG - Camera Movement

SCROLL - Zoom In/Out

LEFT-CLICK Unit RIGHT-CLICK Tile - Unit Movement

SPACEBAR - Skip turns

ESC - View settings

Special thanks to the following:

Contributors - Will Pewitt

Artists - lucasyoung988 brysia pratamacam CharlesGabriel

openciv's People

Contributors

dependabot[bot] avatar hasaabitt avatar kikimanjaro avatar ryangrieb 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  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

openciv's Issues

AI: Finish AI implementation

AI Roadmap:

Melee Units: ----

  • Implement sequence node after we approach enemy, including HasMovementNode. Then add an MeleeAttackNode, to attack move

  • Approach Friendly City Node

  • Approach Enemy City node

  • Retreat Node

  • Patrol Node

EventManager: Avoid concurrent modification

Right now in order to avoid concurrent modification, we would create a copy of the arraylist. This is inefficient, so I tried to use a queue, but I didn't implement it properly in this context.

GameMap: Implement infinite map

I don't want the world to be constrained. For very, very, long term battles (civ 5 AI battles on YT are fun as hell to watch) I want infinite terrain.

City: Rewrite Citizen Worker Methods

Right now citizen worker methods send extra unnecessary packets to the client. All the methods in general should be rewritten and be more coherent & readable.

Workspace: Eclipse 2021 unable to import project

The error states:
Could not run phased build action using connection to Gradle distribution 'https://services.gradle.org/distributions/gradle-6.7.1-bin.zip'

This is because later versions of eclipse run JDK-11, which makes our project incompatible.
This article:
https://discuss.gradle.org/t/eclipse-running-with-jdk-11-gradle-6-2-1-fails-to-compile-source-for-jdk-8/36577

provides us a possible workaround for this issue, but I want to look at alternative solutions (a better IDE!!!).

Economy: Display what is affecting the players science, gold, and other stats

We need to modify StatLine, where when we addValue, subValue, or mergeValue. This would include a description of what is modifying it. For instance, in the MarketBuilding class, we would put this.statLine.addValue(Stat.GOLD_GAIN, 2, "Market"); And store that information to be referenced by the client later.

Hard to recreate errors

The following are errors thrown that are hard to re-create

When the game starts, this error is rarely thrown:

Exception in thread "main" java.lang.NullPointerException: Cannot invoke "com.badlogic.gdx.scenes.scene2d.Actor.parentToLocalCoordinates(com.badlogic.gdx.math.Vector2)" because "child" is null
	at com.badlogic.gdx.scenes.scene2d.Group.hit(Group.java:249)
	at com.badlogic.gdx.scenes.scene2d.Group.hit(Group.java:250)
	at com.badlogic.gdx.scenes.scene2d.Stage.hit(Stage.java:729)
	at com.badlogic.gdx.scenes.scene2d.Stage.mouseMoved(Stage.java:381)
	at com.badlogic.gdx.InputMultiplexer.mouseMoved(InputMultiplexer.java:146)
	at com.badlogic.gdx.InputEventQueue.drain(InputEventQueue.java:76)
	at com.badlogic.gdx.backends.lwjgl3.DefaultLwjgl3Input.update(DefaultLwjgl3Input.java:189)
	at com.badlogic.gdx.backends.lwjgl3.Lwjgl3Window.update(Lwjgl3Window.java:394)
	at com.badlogic.gdx.backends.lwjgl3.Lwjgl3Application.loop(Lwjgl3Application.java:143)
	at com.badlogic.gdx.backends.lwjgl3.Lwjgl3Application.<init>(Lwjgl3Application.java:116)
	at me.rhin.openciv.lwjgl3.Lwjgl3Launcher.createApplication(Lwjgl3Launcher.java:25)
	at me.rhin.openciv.lwjgl3.Lwjgl3Launcher.main(Lwjgl3Launcher.java:18)```

I think it has something to do w/ RelativeMouseMoveEvent and Units being added on a different thread than libgdx


When city state's move around (And move into & attack)?
The server attempts to move dead city state units.

Support LUA Modding

Implement LUA J, and then implement all my units, civilizations, tech & culture options though LUA? For example MechaUnit.lua etc.

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

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.

River Behavior: Increase natural length of rivers

Instead of rivers stopping at the lowest tile elevation, they should still seek the lowest elevation while trying to reach the ocean in any way possible. So we would basically chose random tiles until we seek an elevation point that recedes down to the ocean instead of a tile with no water around it.

Missing Assets - What I need to implement

The following are what assets I need to implement:

Barbarian camp - https://gyazo.com/06bf5e24079d1e895b926b21cc1cb310
Farm tile - https://gyazo.com/a841d2cc798c30c455209bb96099701c
Fish tile - https://gyazo.com/db8af23805d39c16327e7f78b00e8b41
Peals Tile - https://gyazo.com/8d6e341aa899eece0c4997512f13ec18
Crabs Tile - https://gyazo.com/97278bdcb939fb54f97fb176fd0c211d
Whales Tile - https://gyazo.com/8ebd339aa4453cb4633b476b09319046
Bananas Tiles - https://gyazo.com/8c5bcb3edef51516552351d85f0323eb
Wheat Tile - https://gyazo.com/ac508f42ced1dba821b606322a36c703
Deer Tile - https://gyazo.com/536a374a7467bcf2099796bfd1de2668
Oil Tile - https://gyazo.com/bcaa4a3efd30b1f72411ec0a16890393
Aluminum Tile - https://gyazo.com/e5900bd9343ca273dca35058a182d6d0
Uranium Tile - https://gyazo.com/668a5ffc5c4772ada2ac5328eef81382
Spices Tile - https://gyazo.com/21c9ce202a7966756a894e414fc573c8
Sugar Tile - https://gyazo.com/6a6b24ecb3f35441f671b6106731a862
Furs Tile - https://gyazo.com/974b3219280d1c89bae90edf26573c1c
Ivory Tile - https://gyazo.com/8857379f54d0d9ed69b67c41f6006d8c
Silk Tile - https://gyazo.com/1e06e094ffc79ad88e8fe6cb996f457e
Dyes Tile - https://gyazo.com/34ee25b4ad9783caa0e35cb5ac805935
Incense Tile - https://gyazo.com/1a61558710336db6f4eaae6df48e89f9
Wine Tile - https://gyazo.com/26739c8f98997168059632baac98cfa7
Marble Tile - https://gyazo.com/f54ace6ca453f86c62a04f9885067081
Salt Tile - https://gyazo.com/a55ab0318e9073c842d033ed438f31b2
Lumber Mill
Terracotta Army

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.