Git Product home page Git Product logo

freecol / freecol Goto Github PK

View Code? Open in Web Editor NEW
564.0 32.0 169.0 861.05 MB

FreeCol: FreeCol is a turn-based strategy game based on the old game Colonization, and similar to Civilization. The objective of the game is to create an independent nation.

License: GNU General Public License v2.0

Scheme 0.25% Shell 0.55% Awk 0.01% Batchfile 0.01% Java 93.48% HTML 5.51% CSS 0.21%
freecol java-game colonization strategy-game civilization game game-colonization

freecol's Introduction

FreeCol - Colonization Strategy Game

Weekly Downloads Total Downloads

Latest Release Latest Release Downloads

FreeCol is a turn-based strategy game based on the old game Colonization, and similar to Civilization. The objective of the game is to create an independent nation.

You start with only a few colonists defying the stormy seas in their search for new land. Will you guide them on the Colonization of a New World?

About FreeCol

Website: FreeCol.org

The FreeCol team aims to create an Open Source version of Colonization (released under the GPL). At first we'll try to make an exact clone of Colonization. The visuals will be brought up to date with more recent standards but will remain clean, simple and functional. Certain new 'features' will be implemented but the gameplay and the rules will be exactly the same as the original game. Examples of modern features are: an isometric map and multiplayer support.

This clone will be developed incrementally and result in FreeCol 1.0.0 which will be an almost exact Colonization clone. Incremental development basically means that we'll add features one at a time. This allows us to have a running program at all times and also to release an unfinished but working game once in a while.

Once FreeCol 1.0.0 is finished we'll start working towards FreeCol 2.0.0. FreeCol 2 will go beyond the original Colonization and will have many new features, it will be an implementation of our (and our users') image of what Colonization 2 would have been.

Downloads

Supports Mac OS X, Windows, and Linux

The latest binary releases are created weekly and contain Mac OS X, Windows, and Linux installers.

Contributing

Ways you can contribute:

See doc/developer.tex for more details on contributing to the FreeCol project.

Building

Build the latest version of the code by running:

ant

Requires Java 11, Ant, and Java SDK to build.

License

The source code is licensed under the GPL v2. Most of the content, like artwork, music and sound effects, are also licensed under GPL v2. Some of the content is licensed using CC BY 4.0. Please refer to the README file in the same directory as the included content for more details.

freecol's People

Contributors

anonymouscommitter avatar arnobl avatar bjorneg avatar blakeley00 avatar bryceharrington avatar calebrw avatar donwaugaman avatar edwardgeneralov avatar fenyo1 avatar granthamanthem avatar highwayoflife avatar jazzrexl avatar maxrd2 avatar mikejeffers avatar molchsender avatar nickshanks avatar nikerabbit avatar pruano avatar rrobgill avatar sfauvel avatar siebrand avatar stiangre avatar superusercode avatar thue avatar translatewiki avatar tropicalbastos avatar udeved avatar wintertime avatar yuanjumao avatar zeitlinger 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  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

freecol's Issues

Clicking on tile without units shouldn't change to terrain selection mode

I don't know how others play, but I rarely want to select the terrain. Then right click is fine.

In 0.11.6 I couldn't select terrain with left clicking in unit selection mode and that was perfect for me.
Probably I shouldn't ever click on a tile, but I just do it, mainly because it's the easiest way to scroll the map a couple tiles. Then I always have to change the mode back. It's annoying.

Prices in capital are not updated after change

Version: nightly-2019-01-02

  1. sell goods from the ship in the capital
  2. the price of this good goes down due to the sale (announced via a dialog)
  3. the prices in the lower part of the screen stay unchanged

The same happens for the opposite operation (purchase with rising prices).

Cannot open map files on MacOs

Since this is my first issue, I would like to thank you for the great work on this project!

In my setting, it is not possible to open existing map files. In the "Open" dialog of the map editor, the "Files of Type" text box shows "filter.fsm" (it probably should show "*.fsm"). Since it cannot be changed, it is impossible to select one of the map files that exist in this folder (see image). Note that it is also not possible to paste a text in the "File Name" box.

FreeCol Version: git-20220217 (on MacOS with Java 17)

image

Font displays very bad

I am running FreeCol on a Laptop on an up to date Manjaro linux with an 5.11.16-2-MANJARO kernel, KDE 5.21.4 and X11.
java -version openjdk version "15.0.2" 2021-01-19 OpenJDK Runtime Environment (build 15.0.2+7) OpenJDK 64-Bit Server VM (build 15.0.2+7, mixed mode)
Since a while I have a problem with the fonts. I am sure, that has nothing to to with freecol, but with my Java installation. However, I didn't find an answer online until now. Maybe somebody here has an idea what the problem is?

Thank you very much in advance and thank you as well for your efforts to make this great game, which I play since many years!
Screenshot_Freecol

Can't set foreign settlements as destinations

I'm playing on master.

Steps:

  1. press g
  2. move mouse above settlement, no route is drawn
  3. click, nothing happens.

I can trade/scout only if I send the units next to the settlements first and then move them again from the neighbouring tile.
Same with foreign european settlements.

Game stuck after Independence

Hi to all.
I have this problem: after I declare my independence and then end my turn, the game begins to process the AI players, but it end being stuck, I try to reconnect but it remains stuck on waiting for the royal expedition. I premise that I'm quite late in the game and I think that the royal expedition is quite vast...
I gegan this game quite ago, and now I'm using the last nighly release.
I attach also my save file, I hope it will be useful...

d692444a_Libero_Stato_olandese_1587_05_Season_5.zip

Cannot resume multiplayer due to server.userNameNotPresent error

Version

freecol v0.11.6 on Linux/Fedora 31

Description

NOTE: I'm using FreeCol in French, so the name of the menus can differ slightly as I translate them into English on the fly.

On a hotseat game (2 clients on the same computer, one as the owner of the game), with a previously saved game, Player 1, the owner, opens the saved game and waits for Player 2.

Player 2 clics on "New game" and chooses "Join a multiplayer game" with server 127.0.0.1:3541. He also chooses "Player 2" as his name.

If Player 2 chooses his own previous nation, an error message tells him that the username isn't present in the game.

WARNING: ServerAPI. login error, messageId: server.userNameNotPresent message: Player "Guillaume Ier" is not present in the game.
Known players = ( Player 1 Player 2 Louis XIV Élizabeth Iere )

Desired behavior

Use the name specified in the "Name" field as the username instead of the default name for the nation.

Why am I sure the problem comes from there?

If Player 2 chooses another nation, when prompt, he can take it without a problem.

Workaround

Unzip the saved game, change name="Player 2" to name="Guillaume Ier" and rezip the saved game, but seriously, that's not even an option for lambda users.

Developing a bot

I consider developing a bot to play this game.
Any tips for doing that?
I guess the AI exists in a for non player civs. Would it be possible for AI to play this as the player watches?

Freecol doesn't load savegames, considered as map from map editor

Whenever I try to load a savegame, Freecol reports that I'm trying to "start a map (from the map editor)", making it impossible to resume my game. I tried both playing an edited map and a random map, and the outcome is that the savegames aren't loaded.

net.sf.freecol.client.ClientOptions load
INFO: Load OptionGroup(clientOptions) from F:\MyUser\Documenti\freecol\maps\3a09b009_olandese_1626_1_Spring.fsg succeeded
Wed Jan 23 10:01:00 CET 2019
Thread: 17
net.sf.freecol.FreeCol setName
INFO: Set FreeCol.name = mapEditor
Wed Jan 23 10:01:00 CET 2019
Thread: 17
net.sf.freecol.server.FreeColServer readGame
INFO: Found savegame version 14
Wed Jan 23 10:01:00 CET 2019
Thread: 17
net.sf.freecol.client.FreeColClient failToMain
WARNING: Errore di inizializzazione del server
Wed Jan 23 10:01:00 CET 2019
Thread: 17
Stack trace:
net.sf.freecol.common.FreeColException: error.mapEditorGame
at net.sf.freecol.server.FreeColServer.readGame(FreeColServer.java:1009)
at net.sf.freecol.server.FreeColServer.loadGame(FreeColServer.java:1076)
at net.sf.freecol.server.FreeColServer.(FreeColServer.java:321)
at net.sf.freecol.client.FreeColClient.startServer(FreeColClient.java:886)
at net.sf.freecol.client.control.ConnectController.startSavedGame(ConnectController.java:423)
at net.sf.freecol.client.control.InGameController.loadGame(InGameController.java:3661)
at net.sf.freecol.client.gui.action.OpenAction.actionPerformed(OpenAction.java:53)
at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
at java.awt.Component.processMouseEvent(Unknown Source)
at javax.swing.JComponent.processMouseEvent(Unknown Source)
at java.awt.Component.processEvent(Unknown Source)
at java.awt.Container.processEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Window.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
at java.awt.EventQueue.access$500(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue$4.run(Unknown Source)
at java.awt.EventQueue$4.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)

Scout cannot visit native villages directly from a ship if tribe unknown

My scout is trying to talk to the chief of Indian villages, directly from a ship. This worked fine for the first village I was visiting (the tribe was already known to me). But when I tried the same with the next village, there was an error after clicking on "Ask to speak to chief", namely "The server cannot do that". In the second case, the tribe was not yet known to me. I can provide a savegame, if that might be helpful.

FreeCol.log

markovoss mod breaks the generation of forested tiles

When generating a new map, each landed tile can be forested with a chance of MapGeneratorOptions.FOREST_NUMBER. The mod introduces several land tile types that do not have a forested version. It breaks the code when such tile needs to be forested.

This can be fixed either by changing the code to allow some land tile types to never be forested (technically breaking the forest coverage percentage) or by adding forested versions for each new land tile type (this may not work properly with the "plant forest" mod)

java.lang.RuntimeException: No TileType for forested==true
	at net.sf.freecol.server.generator.TerrainGenerator.getRandomTileType(TerrainGenerator.java:278)
	at net.sf.freecol.server.generator.TerrainGenerator.getRandomLandTileType(TerrainGenerator.java:131)
	at net.sf.freecol.server.generator.TerrainGenerator.lambda$generateMap$7(TerrainGenerator.java:876)
	at net.sf.freecol.common.model.Map.populateTiles(Map.java:877)
	at net.sf.freecol.server.generator.TerrainGenerator.generateMap(TerrainGenerator.java:853)
	at net.sf.freecol.server.generator.SimpleMapGenerator.generateMap(SimpleMapGenerator.java:1079)
	at net.sf.freecol.server.FreeColServer.generateMap(FreeColServer.java:1238)
	at net.sf.freecol.server.FreeColServer.buildGame(FreeColServer.java:1171)
	at net.sf.freecol.server.FreeColServer.startGame(FreeColServer.java:736)
	at net.sf.freecol.server.control.PreGameController.requestLaunch(PreGameController.java:148)
	at net.sf.freecol.common.networking.RequestLaunchMessage.serverHandler(RequestLaunchMessage.java:67)
	at net.sf.freecol.server.control.ServerInputHandler.handle(ServerInputHandler.java:75)
	at net.sf.freecol.common.networking.Connection.handle(Connection.java:514)
	at net.sf.freecol.common.networking.ReceivingThread$UpdateThread.run(ReceivingThread.java:134)
----------------------------

no stable release made to mitigate security vulnerability

Hi! Is it possible to please create a new release from the current master branch to mitigate the security vulnerability, or maybe branch out from the last stable release and make a bugfix update which OS distributions could pick?

Otherwise, I'm afraid most distros will not really switch to nightlies all of a sudden, and will continue shipping the insecure version (or remove it altogether).

GUX Request

When I am using the GOTO move for units, if a unit goes into a village/city, the interface for that city pops up. Either for my city if it is that, or for the native city for training/selling. The problem is that the game keeps processing GOTO moves, and I can't see them, nor can I usually interact with the city/village that opened.

Cannot continue after declare independence

Hi, I have an issue in the save game that I attach, when I declare independence and finish the turn the system has the following log that I also attach, an error related to IA, the turn of the royal expeditionary force crashes the game and I cannot continue my path to the victory :(. I tried in many versions, from the ubuntu 0.11.6, the 0.11.3, snd finally in the latest nightly build freecol-git-20200914, I cleared all the config, cache and save folders, tried with java 14 amd 8, from oracle and openjdk, having the same crash under any situation, older versions doesn't even load my save file, but this is the second time I have this issue, in other I had the same issue with the turn of the expeditionary force.
To reproduce the issue load my save file, declare independence and end turn.
Thanks.

Fastrus_Russian_1724_2_Autumn.zip
log-issue.log

Indian settlements become unknown after treaty merger of 2 AI players

As the title says, even though they were all visited by scouts ages ago and trading was taking place most have become unkown. There are many more bugs than 11.7 had. Movement is broken for ships and is more complicated for land units sometimes units will move one square and then you will have to tell them again to move, very tedious. village names do not always link in turn report. I don't even know why you changed anything regards all these as they were all working well or at least better, the elephant in the room that needed/needs working on is the AI, it's not violent enough and cannot run the towns economies as you always see when you conquer one, that is what needed focusing on otherwise you're just polishing a turd.

mac app is missing executable

Downloaded the mac.tar.bz2 of

  • Nightly Release: 2018-04-25
  • Nightly Release: 2018-04-07
  • Nightly Release: 2018-03-22
    did not try others
open Downloads/FreeCol.app/
The application cannot be opened because its executable is missing.

So it seems this archive is incomplete.

A brief try on the .jar showed it unplayable on a notebook - while cursor control did work for n/s/w/e, specific keys for ne,se,sw,nw are missing, and remapping them had no effect.. G for Goto didn't work either, so it looks like movement is restricted to cardinal directions.

Goods are not partially loaded into a wagon or ship

I think, the UI once allowed the following situation:

  • a wagon contains some units of food and 60 units of lumber
  • dragging another 100 units of lumber into the wagon resulted automatically in the suitable partial load (loading only 40 units of lumber)

At the moment any load operation is discarded, if the number of items to be loaded exceeds the free storage. Loading with the shift key pressed down partially solves this issue, but it is not as convenient as automatic partial loading.

Version: nightly-2019-01-02

Bump version to 0.12

There seems to be many places that have "0.11.6"
including About dialogue and title.
Are there any reason not bump version to 0.12 as those nighy builds?

Is there script for setting version?

Unresponsive on Ubuntu Desktop 18.04 LTS after showing dialogue box

When trying to run the latest 0.11.6 version on Ubuntu Desktop 18.04 LTS,
the game seems slower comparing to when running on Windows (Though CPU usage is low, below 5%)

But critically when Yes/No dialogue is shown, the game becomes unresponsive (i.e. clicking anywhere has no effect)

$ uname -a
Linux ___ 5.0.0-32-generic #34~18.04.2-Ubuntu SMP Thu Oct 10 10:36:02 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux

Intel CPU
nVidia card 1900x1280 HD resolution
16GB memory in the system

image

I was running from terminal from defaulr install folder /home/user/freecol as ./freecol.
Ctrl+C from terminal does close the game instantly.

Switching to full screen mode does not matter. (I got the same issue after resuming the game)

Flatpak submission to Flathub

Hi, I've created a Flatpak manifest for FreeCol and I'm submitting it to Flathub.

If you are interested in helping maintain the flatpak manifest and having control over the repository feel free to join in this discussion.

flathub/flathub#932

XXE in FreeColXMLReader.java

The Issue

An XML External Entity attack is a type of attack against an application that parses XML input. This attack occurs when XML input containing a reference to an external entity is processed by a weakly configured XML parser. This attack may lead to the disclosure of confidential data, denial of service, server side request forgery, port scanning from the perspective of the machine where the parser is located, and other system impacts.

Where the Issue Occurred

The following code snippets display the usage of XMLInputFactory without securely disabling entities:

XMLStreamReader xsr = xif.createXMLStreamReader(reader);

Remediation

https://www.owasp.org/index.php/XML_External_Entity_(XXE)_Prevention_Cheat_Sheet

Order of focus changes

Freecol is turn based game. And in every turn one should move units (that are not town population).

However when number of units grows, I find that the order of focus changes (please give me better word) is not logical and seems random.

Let me give you an example: suppose there are 2 colonies or clusters in different part of the (new) world with ships, wagons and units. Now when I have moved some unit, and would want to move other unit visible on the screen, instead the focus jumps to other location 2, where similar there may be 2-3-4-5 and more units that needs some of coordinated movement.
But instead after (spending some time to reassess and) moving one unit, the focus jumps back to location 1 or worse to location 2 etc...

I would like that the game would bring first focus to next unit visible on the screen (preferably first from those close to each other in the screen center). That would give workflow for each turn, when starting from say north part of east cost, then moving slowly along the cost to south, then some remoter locations.
(The observation, that in all games the most and largest colonies happen on east cost)

The problem and the solution proposed are for game in later stage.
The problem significant in a way, that I find uninteresting to open previous games as with larger number of units it become more boring experience with every turn. For me it is usually 20+ colonies, 100 units in say 1560 with military still far from enough for independence war and trade with Europe being still profitable.

Please point to the related source file.

GoTo Not Working

When you press G you get "Boot" mouse trails however left clicking on a square does not result in the unit going there. Also, left clicking on a village just brings up the village. RIcht-clicking also does nothing. It's as if the click ignores the fact that we're in GoTo mode.

Right-clicking on a square and saying "Go to this tile" works.

image

git-s0180425

testUnitPromotionWorkingInWorkTile unit test failure

    [junit] Testcase: testUnitPromotionWorkingInWorkTile(net.sf.freecol.server.model.ServerUnitTest):	FAILED
    [junit] null
    [junit] junit.framework.AssertionFailedError
    [junit] 	at net.sf.freecol.server.model.ServerUnitTest.testUnitPromotionWorkingInWorkTile(ServerUnitTest.java:422)
    [junit] 	at junit.extensions.TestDecorator.basicRun(TestDecorator.java:23)
    [junit] 	at junit.extensions.TestSetup$1.protect(TestSetup.java:23)
    [junit] 	at junit.extensions.TestSetup.run(TestSetup.java:27)
    [junit] 
    [junit] 
    [junit] Test net.sf.freecol.AllTests FAILED
     [echo] For more detailed information about this test run see:
     [echo] /home/travis/build/FreeCol/freecol/build/report/TEST-net.sf.freecol.AllTests.txt
BUILD FAILED
/home/travis/build/FreeCol/freecol/build.xml:737: Automated Unit Tests failed.

WARNING: HighSeas does not connect to: map:247 in europe:20

Trying to sail my ship from Europe to New Holland

nightly-2018-08-22-403-gac4d931

5d020af_Dutch_1512.fsg.zip

FreeCol game version: 0.11.6 (Revision: ac4d931b6)
FreeCol protocol version: 0.1.6

Java vendor: Oracle Corporation
Java version: 1.8.0_191
Java WM name: OpenJDK 64-Bit Server VM
Java WM vendor: Oracle Corporation
Java WM version: 25.191-b12

OS name: Linux
OS architecture: amd64
OS version: 5.0.0-sabayon

net.sf.freecol.common.util.LogBuilder log
	INFO: sun.java2d.pmoffscreen using client option: true, sun.java2d.opengl overrides client option: true, sun.java2d.xrender using client option: true
	Mon Jul 08 00:03:11 CEST 2019
	Thread: 1
net.sf.freecol.FreeCol main
	INFO: Configuration:
	  version     0.11.6 (Revision: ac4d931b6)
	  java:       1.8.0_191
	  memory:     954728448
	  locale:     en_SE
	  data:       /home/morgan/programs/code-freecol/data
	  userConfig: /home/morgan/.config/freecol
	  userData:   /home/morgan/.local/share/freecol
	  autosave:   /home/morgan/.local/share/freecol/save/autosave
	  logFile:    /home/morgan/.cache/freecol/FreeCol.log
	  options:    /home/morgan/.config/freecol/freecol/options.xml
	  save:       /home/morgan/.local/share/freecol/save
	  userMods:   /home/morgan/.local/share/freecol/mods
	  debug:      
	Mon Jul 08 00:03:11 CEST 2019
	Thread: 1
net.sf.freecol.client.gui.SwingGUI <init>
	INFO: GUI constructed using scale factor 1.25
	Mon Jul 08 00:03:11 CEST 2019
	Thread: 1
net.sf.freecol.common.resources.FontResource <init>
	INFO: Loaded font: ShadowedBlack from: file:/home/morgan/programs/code-freecol/data/base/resources/fonts/ShadowedBlack.ttf
	Mon Jul 08 00:03:12 CEST 2019
	Thread: 1
net.sf.freecol.common.resources.FontResource <init>
	INFO: Loaded font: Dialog.plain from: urn:font:Dialog-PLAIN-12
	Mon Jul 08 00:03:12 CEST 2019
	Thread: 1
net.sf.freecol.common.resources.FontResource <init>
	INFO: Loaded font: Serif.plain from: urn:font:Serif-PLAIN-12
	Mon Jul 08 00:03:12 CEST 2019
	Thread: 1
net.sf.freecol.common.resources.ResourceManager addMapping
	INFO: Resource manager adding mapping base
	Mon Jul 08 00:03:12 CEST 2019
	Thread: 1
net.sf.freecol.common.resources.ResourceManager$1 run
	INFO: Preload background thread started
	Mon Jul 08 00:03:12 CEST 2019
	Thread: 15
net.sf.freecol.common.resources.ResourceManager addMapping
	INFO: Resource manager adding mapping tc
	Mon Jul 08 00:03:12 CEST 2019
	Thread: 1
net.sf.freecol.common.resources.ResourceManager$1 run
	INFO: Preload background thread started
	Mon Jul 08 00:03:12 CEST 2019
	Thread: 17
net.sf.freecol.common.resources.ResourceManager$1 run
	INFO: Preload background thread cancelled after it preloaded 38 resources.
	Mon Jul 08 00:03:13 CEST 2019
	Thread: 15
net.sf.freecol.client.FreeColClient loadClientOptions
	INFO: Load default client options.
	Mon Jul 08 00:03:13 CEST 2019
	Thread: 1
net.sf.freecol.common.option.OptionGroup load
	INFO: Load OptionGroup(clientOptions) from /home/morgan/programs/code-freecol/data/base/client-options.xml succeeded
	Mon Jul 08 00:03:13 CEST 2019
	Thread: 1
net.sf.freecol.client.FreeColClient loadClientOptions
	INFO: Load client options from the action manager.
	Mon Jul 08 00:03:13 CEST 2019
	Thread: 1
net.sf.freecol.client.FreeColClient loadClientOptions
	INFO: Merge client options from user options file: /home/morgan/.config/freecol/freecol/options.xml
	Mon Jul 08 00:03:13 CEST 2019
	Thread: 1
net.sf.freecol.common.option.OptionGroup load
	INFO: Load OptionGroup(clientOptions) from /home/morgan/.config/freecol/freecol/options.xml succeeded
	Mon Jul 08 00:03:13 CEST 2019
	Thread: 1
net.sf.freecol.client.control.SoundController <init>
	INFO: Create sound controller with net.sf.freecol.common.option.AudioMixerOption:model.option.audioMixer/[model.option.audioVolume 100%]
	Mon Jul 08 00:03:13 CEST 2019
	Thread: 1
net.sf.freecol.client.gui.Canvas <init>
	INFO: Windowed mode used.
	Mon Jul 08 00:03:13 CEST 2019
	Thread: 1
net.sf.freecol.client.gui.FreeColFrame <init>
	INFO: Frame created in size 1920x1050
	Mon Jul 08 00:03:14 CEST 2019
	Thread: 1
net.sf.freecol.client.gui.FreeColFrame$1 componentResized
	INFO: Window size changes to java.awt.Dimension[width=1920,height=1054]
	Mon Jul 08 00:03:14 CEST 2019
	Thread: 21
net.sf.freecol.client.gui.Canvas <init>
	INFO: Canvas created.
	Mon Jul 08 00:03:14 CEST 2019
	Thread: 1
net.sf.freecol.client.gui.SwingGUI startGUI
	INFO: GUI started.
	Mon Jul 08 00:03:14 CEST 2019
	Thread: 1
net.sf.freecol.common.resources.ResourceManager$1 run
	INFO: Preload background thread preloaded 1435 resources.
	Mon Jul 08 00:03:15 CEST 2019
	Thread: 17
net.sf.freecol.client.gui.FreeColFrame$1 componentResized
	INFO: Window size changes to java.awt.Dimension[width=1920,height=1054]
	Mon Jul 08 00:03:15 CEST 2019
	Thread: 21
net.sf.freecol.client.gui.FreeColFrame$1 componentResized
	INFO: Window size changes to java.awt.Dimension[width=1920,height=1054]
	Mon Jul 08 00:03:15 CEST 2019
	Thread: 21
net.sf.freecol.common.sound.SoundPlayer openLine
	WARNING: Mixer does not support interface SourceDataLine supporting format PCM_SIGNED 48000.0 Hz, 16 bit, stereo, 4 bytes/frame, little-endian
	Mon Jul 08 00:03:16 CEST 2019
	Thread: 20
net.sf.freecol.client.ClientOptions load
	INFO: Load OptionGroup(clientOptions) from /home/morgan/.local/share/freecol/save/5d020af_Dutch_1512.fsg succeeded
	Mon Jul 08 00:03:19 CEST 2019
	Thread: 21
net.sf.freecol.FreeCol setName
	INFO: Set FreeCol.name = Morgan
	Mon Jul 08 00:03:19 CEST 2019
	Thread: 21
net.sf.freecol.server.FreeColServer createServer
	WARNING: Could not resolve local host name
	Mon Jul 08 00:03:20 CEST 2019
	Thread: 21
net.sf.freecol.server.FreeColServer readGame
	INFO: Found savegame version 14
	Mon Jul 08 00:03:20 CEST 2019
	Thread: 21
net.sf.freecol.common.model.Specification clean
	INFO: Specification clean following load from stream complete, starting year=1492, season year=1600, ages=[1,109,309], seasons=2, difficulty=model.difficulty.medium, 267 Types, 80 Abilities, 41 BuildingTypes, 14 Disasters, 10 EuropeanNationTypes, 2 Events, 25 FoundingFathers, 21 GoodsTypes, 8 IndianNationTypes, 59 Modifiers, 25 Nations, 166 Options, 23 Option Groups, 12 ResourceTypes, 11 Roles, 23 TileTypes, 6 TileImprovementTypes, 13 UnitChangeTypes, 42 UnitTypes read.
	Mon Jul 08 00:03:20 CEST 2019
	Thread: 21
net.sf.freecol.server.FreeColServer loadGame
	INFO: Game integrity test failed, but fixed.
	  Removed broken river connection to NE at 21,9-borealForest
	  Removed broken river connection to SE at 24,100-rainForest
	  Removed broken river connection to SE at 33,119-coniferForest
	  Removed broken river connection to NE at 31,138-mixedForest
	  Removed broken river connection to SW at 37,152-rainForest
	Mon Jul 08 00:03:20 CEST 2019
	Thread: 21
net.sf.freecol.server.FreeColServer loadGame
	INFO: AI integrity test succeeded.
	Mon Jul 08 00:03:21 CEST 2019
	Thread: 21
net.sf.freecol.common.resources.ResourceManager addMapping
	INFO: Resource manager adding mapping game
	Mon Jul 08 00:03:21 CEST 2019
	Thread: 21
net.sf.freecol.common.resources.ResourceManager$1 run
	INFO: Preload background thread started
	Mon Jul 08 00:03:21 CEST 2019
	Thread: 40
net.sf.freecol.common.resources.ResourceManager$1 run
	INFO: Preload background thread preloaded 1435 resources.
	Mon Jul 08 00:03:21 CEST 2019
	Thread: 40
net.sf.freecol.client.control.ConnectController connect
	INFO: Connected to 127.0.0.1:3541 as Morgan
	Mon Jul 08 00:03:21 CEST 2019
	Thread: 21
net.sf.freecol.client.control.ConnectController requestLogin
	INFO: Login request for client Morgan
	Mon Jul 08 00:03:21 CEST 2019
	Thread: 21
net.sf.freecol.server.FreeColServer addNewUserConnection
	INFO: Client connected from /127.0.0.1:57220
	Mon Jul 08 00:03:21 CEST 2019
	Thread: 39
net.sf.freecol.common.model.Specification clean
	INFO: Specification clean following load from stream complete, starting year=1492, season year=1600, ages=[1,109,309], seasons=2, difficulty=model.difficulty.medium, 267 Types, 80 Abilities, 41 BuildingTypes, 14 Disasters, 10 EuropeanNationTypes, 2 Events, 25 FoundingFathers, 21 GoodsTypes, 8 IndianNationTypes, 59 Modifiers, 25 Nations, 166 Options, 23 Option Groups, 12 ResourceTypes, 11 Roles, 23 TileTypes, 6 TileImprovementTypes, 13 UnitChangeTypes, 42 UnitTypes read.
	Mon Jul 08 00:03:21 CEST 2019
	Thread: 42
net.sf.freecol.client.control.ConnectController login
	INFO: Login accepted for client Morgan to ready single-player game as Morgan/player:19
	Mon Jul 08 00:03:21 CEST 2019
	Thread: 21
net.sf.freecol.server.control.PreGameController requestLaunch
	INFO: Launching for [ServerPlayer player:19 Morgan]
	Mon Jul 08 00:03:21 CEST 2019
	Thread: 45
net.sf.freecol.server.FreeColServer startGame
	INFO: Server starting game: LOAD_GAME
	Mon Jul 08 00:03:21 CEST 2019
	Thread: 45
net.sf.freecol.client.control.PreGameController$1 run
	INFO: Client starting game
	Mon Jul 08 00:03:21 CEST 2019
	Thread: 47
net.sf.freecol.common.sound.SoundPlayer openLine
	WARNING: Mixer does not support interface SourceDataLine supporting format PCM_SIGNED 48000.0 Hz, 16 bit, stereo, 4 bytes/frame, little-endian
	Mon Jul 08 00:03:21 CEST 2019
	Thread: 20
net.sf.freecol.client.gui.panel.InfoPanel update
	INFO: InfoPanel NONE -> ENDinconsistent
	Mon Jul 08 00:03:21 CEST 2019
	Thread: 21
net.sf.freecol.client.gui.SwingGUI enableMapControls
	INFO: Instantiated net.sf.freecol.client.gui.panel.CornerMapControls
	Mon Jul 08 00:03:21 CEST 2019
	Thread: 21
net.sf.freecol.client.gui.panel.InfoPanel$UnitInfoPanel update
	INFO: Switching UnitInfoPanel from null to unit:21970 Vogel Struys (Merchantman) 5/5
	Mon Jul 08 00:03:21 CEST 2019
	Thread: 21
net.sf.freecol.client.gui.panel.InfoPanel update
	INFO: InfoPanel END -> UNIT
	Mon Jul 08 00:03:21 CEST 2019
	Thread: 21
net.sf.freecol.common.model.Player clientError
	WARNING: HighSeas does not connect to: map:247 in europe:20
	Mon Jul 08 00:03:46 CEST 2019
	Thread: 49

General Feedback and Rant

As a long time player and fan of the original Colonization from 1995 I have the following feedback about freecol. In general the game shows much promise but is let down by a few basic things which I'm surprised aren't killing the fun for other players.

  1. In general moving and selecting is a nightmare. Very often the goto function (be it "G" or by rightclicking a square) is buggy. It quite often moves a piece which is not selected. Or, you think it's selected (piece is displayed in bottom right of screen) but some other piece is actually selected. Try dragging a piece and it sometimes moves and sometimes you move some other piece:
    image
    In general selecting a unit is anywhere from frustrating to impossible:
    click unit, nothing happens. Click next to unit, area is selected in green. click unit nothing happens. click another area nothing happens...

  2. Please flash the player selected. And make left-clicking only select units not terrain.

  3. The tax rate is waaaay higher than the original game. By a factor of 10 or more I would say it grows without bounds. 1594 22% - 1599 27% - 1603 32%

  4. Quality of immigrants waaay lower than in the original game.

  5. Way fewer indian villages. In the screenshot above, in an area of about 100 squares there is 1 village. Also that village teaches Sugar planter but no land suitable for sugar is to be found anywhere here.

  6. The Boycott message is misleading. It doesn't inform the player that rejecting the tax will result in goods being destroyed. A new player might think: hmmm, since I don't trade in Tools I can suffer a boycott. They will lose their tools.

  7. There seems to be no production bonus for roads. In the original game, roads offer a +1 production bonus on all resources.

  8. My town was 99% of the way to producing a cathedral. Next turn I was warned my town was producing nothing. The build queue was now empty, no cathedral to be seen anywhere. Bug.

  9. I have a town producing 15 liberty bells with a printing press and it has 0% rebel sentiment.

ERROR: 'Attribute "categories" was already specified for element "shortcut".'

White installing on Linux Ubuntu Desktop 18.04 LTS the latest nightly build (available from releases download), and I remember the same was for the latest stable,
the launcher shortcut does not appear in Application list.

java -jar freecol-git-20201224-installer.jar

ERROR:  'Attribute "categories" was already specified for element "shortcut".'
ERROR:  'com.sun.org.apache.xml.internal.utils.WrappedRuntimeException: Attribute "categories" was already specified for element "shortcut".'
could not read shortcut spec!
com.izforge.izpack.adaptator.XMLException: Errornull at line 26, column 7 : javax.xml.transform.TransformerException: com.sun.org.apache.xml.internal.utils.WrappedRuntimeException: Attribute "categories" was already specified for element "shortcut".
	at com.izforge.izpack.adaptator.impl.XMLParser.parseLineNrFromInputSource(Unknown Source)
	at com.izforge.izpack.adaptator.impl.XMLParser.parse(Unknown Source)
	at com.izforge.izpack.adaptator.impl.XMLParser.parse(Unknown Source)
	at com.izforge.izpack.panels.ShortcutPanel.readShortcutSpec(Unknown Source)
	at com.izforge.izpack.panels.ShortcutPanel.panelActivate(Unknown Source)
	at com.izforge.izpack.installer.InstallerFrame.switchPanel(Unknown Source)
	at com.izforge.izpack.installer.InstallerFrame.navigateNext(Unknown Source)
	at com.izforge.izpack.installer.InstallerFrame.navigateNext(Unknown Source)
	at com.izforge.izpack.installer.InstallerFrame$NavigationHandler.navigate(Unknown Source)
	at com.izforge.izpack.installer.InstallerFrame$NavigationHandler.access$100(Unknown Source)
	at com.izforge.izpack.installer.InstallerFrame$NavigationHandler$1.run(Unknown Source)
	at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: javax.xml.transform.TransformerException: javax.xml.transform.TransformerException: com.sun.org.apache.xml.internal.utils.WrappedRuntimeException: Attribute "categories" was already specified for element "shortcut".
	at java.xml/com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:786)
	at java.xml/com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:370)
	... 12 more
Caused by: javax.xml.transform.TransformerException: com.sun.org.apache.xml.internal.utils.WrappedRuntimeException: Attribute "categories" was already specified for element "shortcut".
	at java.xml/com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.getDOM(TransformerImpl.java:597)
	at java.xml/com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:776)
	... 13 more
Caused by: com.sun.org.apache.xml.internal.utils.WrappedRuntimeException: Attribute "categories" was already specified for element "shortcut".
	at java.xml/com.sun.org.apache.xalan.internal.xsltc.dom.XSLTCDTMManager.getDTM(XSLTCDTMManager.java:426)
	at java.xml/com.sun.org.apache.xalan.internal.xsltc.dom.XSLTCDTMManager.getDTM(XSLTCDTMManager.java:214)
	at java.xml/com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.getDOM(TransformerImpl.java:575)
	... 14 more

Changing the task of a worker does not update all dependent statistics

How to reproduce:

  • the locally available lumber is not sufficient for the carpenter (e.g. the carpenter produces only 7 out of 14 units)
  • assign an additional worker to the lumber task
  • now the production statistics of the carpenter remain unchanged (still at 7/14 instead of 14/14)

The production summary at the top of the settlement is correct. Just the statistics of single buildings are not updated.

Sometimes AI assigns European units to worst producing tile

Hi

It looks like the AI assigns European units to the least producing tile.
Look at the English tobe Colony at 33, 85 (I play Dutch - so use --debug MENUS)
At the next turn AI will assign one colonist to produce ore on the grain resource (34,86) and one unit producing grain at boreal forest (33, 83).

Save game file is attached:
bug01_1494.zip

I think the bug is caused by a wrongly sorted workplan in ColonyPlan.java. A patch is attached as well.
(https://github.com/FreeCol/freecol/files/5860502/Order-colony-resources-from-best-to-worst-in-workpla.zip)

I have played a couple of games with the patch applied and it works ok for me. I have not noted any side-effects with the patch applied.

I am at master 75e1cf3.

/////Björne

buying from Natives when you don't have enough gold

When buying from Natives it is not clear what happens if you have between zero and offer price gold. The full purchase is made and whatever gold one has is taken, even if one has no gold. Is there any consequence? If there is no consequence is this an issue?

Build: `freecol` script is not executable and uses wrong line-endings

I downloaded the latest nightly build (freecol-nightly-20220420.zip).

It contained the script freecol in the directory freecol.

This script had two issues:

  • The file lacked the executable permission. This could be fixed with chmod +x freecol/freecol.
  • The file contained CRLF line endings (dos/windows style).
    • Thus it was not executable: bash: freecol/freecol: /bin/sh^M: bad interpreter: No such file or directory
    • the ^M marks the carriage return (\r) which is not supposed to be there and which is interpreted as being part of the filename
    • this could be fixed with: fromdos freecol/freecol

The original script in the repository looks good: packaging/common/freecol.sh (executable flag and correct line ending).

Thus I guess, that build.xml needs some adjustments.

Thank you for your time!

Ugly text rendering

Hello

The text rendered in all panels is ugly:
imgur-2018_04_25-17 00 19

The text rendered in tooltips is nice (see the model.option.useXRender tooltip):
imgur-2018_04_25-17 00 42

Can I do anything to make the text render nicely?

nightly-2018-04-07-4-g d4c2588

$ java -version
openjdk version "1.8.0_161"
OpenJDK Runtime Environment (IcedTea 3.7.0) (Gentoo icedtea-3.7.0)
OpenJDK 64-Bit Server VM (build 25.161-b12, mixed mode)

Performance in Ubuntu desktop (GNOME 3)

I have double boot system Windows 10 / Linux Ubuntu 18.04 LTS.
And while within Windows 10 performance is good, when booting in Ubuntu the performance is noticeably worse.

  1. General responsiveness
    While on Windows the time between key press or mouse command is almost not felt, I would save on Linux Ubuntu it is noticeable and sometime unpleasantly big 0.5s and more.
  2. Invisible windows (sometimes, rarely but not always new dialog windows that are to appear, e.g. meeting natives, are not visible but switching with alt+tab to other app and switching with alt+tab back will bring on the screen)
  3. Game sometimes is even becomes unresponsive, see #77

The problem maybe not directly because of this codebase, but I guess the situation should be at least known and documented.

Tech details
Linux Ubuntu 18.04 LTS (GNOME 3)
intel CPU
16GB RAM
nVIDIA video card
Java 8

Settlement task list window does not open anymore after declaration of independence

The list of things to be build in a settlement seems to be unavailable after declaring independency.

I did the following:

  1. declare independence
  2. opening the task list (in German "Bauwarteschlange") of a settlement fails silently: the window does not pop up
  3. end the turn
  4. try to open the task list again: it still fails silently
  5. save and quit the game
  6. start freecol again and continue the game
  7. now the task list window can be opened (as expected)

I did not see any error messages on the terminal while running the game.

Cannot unload cargo, cannot set back to new world

Commit 9ab8fb1

Sometimes my units cannot unload the goods, e.g. from a wagon train inside a colony, or from a ship inside a colony or back in the old world.

Probably a related bug is that sometimes I cannot set sail from the old world back to the new.

In both cases, saving the game, restarting Freecol and reloading the game unfudges it.

These bugs appear sporadically, perhaps once every 30 turns.

Saved games:
https://filebin.net/ua7m2j1ozn50aq0v

java.lang.NoSuchMethodError: net.sf.freecol.common.util.StringUtils.join

The latest master no longer runs in Sabayon.

nightly-2018-08-22-371-g937b8cc

 $ cat ~/.cache/freecol/FreeCol.log
FreeCol game version: 0.11.6 (Revision: 937b8cc22)
FreeCol protocol version: 0.1.6

Java vendor: Oracle Corporation
Java version: 1.8.0_191
Java WM name: OpenJDK 64-Bit Server VM
Java WM vendor: Oracle Corporation
Java WM version: 25.191-b12

OS name: Linux
OS architecture: amd64
OS version: 4.20.0-sabayon

java.util.logging.LogManager$RootLogger log
        WARNING: Uncaught exception from thread: Thread[main,5,main]
        Tue Apr 16 00:26:55 CEST 2019
        Thread: 1
        Stack trace:
java.lang.NoSuchMethodError: net.sf.freecol.common.util.StringUtils.join(Ljava/lang/String;Ljava/util/List;)Ljava/lang/String;
        at net.sf.freecol.common.io.FreeColDirectories.sanitize(FreeColDirectories.java:604)
        at net.sf.freecol.common.io.FreeColDirectories.getOptionsFile(FreeColDirectories.java:1062)
        at net.sf.freecol.common.io.FreeColDirectories.getClientOptionsFile(FreeColDirectories.java:743)
        at net.sf.freecol.client.ClientOptions.getSpecialOptions(ClientOptions.java:844)
        at net.sf.freecol.FreeCol.main(FreeCol.java:338)
----------------------------

3 strange code fragments

(I don't have any experience with this codebase so maybe these are not bugs.)

  1. } if (unit.isAtLocation(destination)) {

    The formatting is strange, the if-statement start on same line as a closing brace, is an else missing before the if? If no else is missing then the if-statement should probably moved to a line of its own.
  2. if (expert != null
    && u.getUnitChange(UnitChangeType.EXPERIENCE, expert) != null) {
    score += 10000;
    } else if (expert != null
    && u.getUnitChange(UnitChangeType.EXPERIENCE, expert) != null) {
    score -= 10000;
    }

    The two if-statements have the same condition.
  3. / ((tcb.getBottomRightDirtyTile().getX()-tcb.getTopLeftDirtyTile().getX()) * (tcb.getBottomRightDirtyTile().getY()-tcb.getBottomRightDirtyTile().getY()));

    Identical expressions (tcb.getBottomRightDirtyTile().getY()) on both sides of subtraction operator.

Population growth ending with zero food leads to starvation

When a settlement ends up with 200 or more units of food, its population grows by one.

In case a settlement finishes with exactly 200 units of food, then one inhabitant of the settlement starves to death (even though the settlement produces a surplus of food) at the same turn. Thus the turn log contains two messages for the same settlement:

  • population grows
  • one citizen starved to death

This should not happen.

Version: nightly-2019-01-02

Feature-Request: Right Click movement

I know the original did not have it, but I would really love an option to move units by right-clicking on the tile where the currently selected unit should move to. Movement really fells cumbersome on a laptop without numpad.

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.