trilarion / imperialism-remake Goto Github PK
View Code? Open in Web Editor NEWImperialism remake
Home Page: https://remake.twelvepm.de/
License: GNU General Public License v3.0
Imperialism remake
Home Page: https://remake.twelvepm.de/
License: GNU General Public License v3.0
Example:
New scenario dialog:
Title: must be convertible into a string, at least x characters long
Rows: Integer, [1,1000]
Columns: like rows
Do not allow to "Ok" the dialog before the constraints aren't fullfilled (display them), only cancel the dialog.
The goal is to have an easy-to-use package that installs or updates the game and its dependencies (mainly python and python packages) and makes starting the game easy. Additionally we need to automatize the package creation.
What are the available options?
What are the pros and cons of them?
How would one need to do for them?
Dependent issues:
This is a blanket issue to track my observations while I test on macOS. As I find specific problems, I may split them off into other issues, but for now I don't have enough information to treat them narrowly.
Running start.py
on macOS does not get the game to run in a way that is usable yet. Problems include:
If launched from a normal terminal window (not full screen), the program enters full screen but then goes grey, like it needs an extra paint cycle or something. Mousing over the button areas reveals those graphics, but I can't get the original window to display more than a half second before it goes grey.
If launched from a full screen terminal window, an error occurs (the Network: cannot listen
error from #8) and the resulting window is scaled for full screen but drawn.
start.py
does not exit, and I have to Ctrl+C three times to actually close the program.All of these issues are macOS-specific and I cannot reproduce them in Ubuntu. (Although I don't have a real full screen mode in Ubuntu as it's configured, so that might not be completely true).
This is probably a Windows only problem. PyYaml will use the CLoader if it finds libyaml. However, at least the conda package does not include libyaml. So how to include it? How to include it with packaging with pynsist?
Reason: Using the CLoader is much faster
It should combine the game (content of source/imperialism_remake folder), Python 3 for macOs, the required Python modules (see requirements.txt) for macOS, an application icon and should successfully run the application. This should be automatized.
py2app
might help there
I'm getting this message on Ubuntu 16.04LTS with pip3 install python3-pyqt5
and pip3 install python3-pyqt5.qtmultimedia
.
Traceback (most recent call last):
File "/home/ubuntu/imperialism_remake/lib/network.py", line 231, in _new_connection
def _new_connection(self):
KeyboardInterrupt
Traceback (most recent call last):
File "/home/ubuntu/imperialism_remake/client/client.py", line 398, in local_network_connect
tools.get_option(constants.Option.LOCALCLIENT_NAME))
File "/home/ubuntu/imperialism_remake/base/network.py", line 148, in send
super().send(letter)
File "/home/ubuntu/imperialism_remake/lib/network.py", line 170, in send
writer.setVersion(QtCore.QDataStream.Qt_5_6)
AttributeError: type object 'QDataStream' has no attribute 'Qt_5_6'
Looks like the used Qt version is too low.
We should:
https://sourceforge.net/projects/impremake/ downloads do not work anymore
Track which resources (files in the data folder) are actually used (and which ones are not used) by collecting statistics ingame about access to these resources. Store the statistics in the user folder. Write a utility script that displays these stats and highlights unused resources.
Otherwise we will soon get into a big mess.
This includes:
PyQt5 probably offers support for this already.
I'm getting this message on Ubuntu 16.04LTS with pip3 install python3-pyqt5
and pip3 install python3-pyqt5.qtmultimedia
.
Stacktrace:
2017-07-18 13:24:32,147 - imperialism_remake.server.server - INFO - ServerManager started
2017-07-18 13:24:32,153 - imperialism_remake.client.client - INFO - No previous bounds of the main window stored, start maximized
defaultServiceProvider::requestService(): no service found for - "org.qt-project.qt.mediaplayer"
Traceback (most recent call last):
File "/home/ubuntu/imperialism_remake/server/server.py", line 134, in start
2017-07-18 13:24:32,248 - imperialism_remake.server.server - INFO - server starts (pid=4872)
self.server.start(constants.NETWORK_PORT)
File "/home/ubuntu/imperialism_remake/lib/network.py", line 215, in start
raise RuntimeError('Network error: cannot listen')
RuntimeError: Network error: cannot listen
2017-07-18 13:24:32,248 - imperialism_remake.lib.network - INFO - server listens on host=2 port=42932
2017-07-18 13:24:32,271 - imperialism_remake.client.client - INFO - client initialized, start Qt app execution
2017-07-18 13:24:32,280 - imperialism_remake.client.client - INFO - client tries to connect to server
2017-07-18 13:24:32,280 - imperialism_remake.lib.network - INFO - client connecting to host=2 port=42932
I actually do not understand why there is a Network error following and then the client seems to connect successfully.
I'm not an expert on this but it needs to be solved in order to allow multiplayer games.
The question is how two peers behind routers/network address translations discover and connect to each other? See for example: https://en.wikipedia.org/wiki/Network_address_translation#Type_of_NAT_and_NAT_traversal.2C_role_of_port_preservation_for_TCP
Sometimes some sides are missing. May be related to the scaling of between the scene and the view.
Between version of the game, the structure of scenario files might differ. A first step is storing the game version in the scenario file, the other step is converting older scenario files to newer versions.
Outline a strategy for how this could be done most efficiently and most safely (so we do not get into a chaotic state where either older scenarios are lost or we get unintended behavior).
Qt5 relies on platform codecs to be installed. For vorbis and Windows they would be at https://www.xiph.org/dshow/downloads/.
However, if you haven't installed them, QMediaPlayer just skips to the next song without any notification (as far as I can see).
This raises two issues:
So far, they are an additional requirement.
How is the situation on Linux and macOS?
Instead of duplicating the information.
Dragging (left mouse click, hold, move) on the main map view should move the portion of the map that is shown in the main map area.
Could be related to #17, make sure borders are not drawn two times. Make sure Qt is drawing everything with the same thickness.
Select new terrain, ask if changes to/from water and modify internal scenario structures accordingly, then redraw the map.
I don't see them below the start image. They should appear if the mouse hovers over a ROI on the start image. Maybe the relative layout isn't working anymore.
It should be OS independent and failsafe and also apply to the help texts (player manual). The font will be included in the game.
The main map should react to zoom and increase/decrease the part of the world map that it displays (with the transformation anchor as the current mouse pointer/the center of the map) within some reasonable values. The zoom should either react on the scrool wheel of the mouse or a setting in the preferences (maybe in percent of the natural size).
No audio music is played on Mac. Setting/reseting audio in settings does not help. Can it be the problem with OGG audio files?
Using a QSplitter make the width of the mini map (height scales accordingly) adjustable by reducing or increasing the width of the main map in the editor and main game screen. Make the width permanent as a preference (which is not set in the preferences dialog) with some limits and a meaningful default value (like 300px).
The code in client/client.py to set the window icon does not seem to have any effect. I may be misunderstanding what it is supposed to do, but I think the behavior we want requires a call to setWindowIcon
on the QApplication
instead of a QWidget
.
There are many different flavours of Linux around (Debian, Mint, Ubuntu, ...) and the goal would be to have a easy-to-use, widely usable package that installs or updates the game and its dependencies (mainly python packages) and makes starting the game easy. Additionally we need to automatize the package creation.
What are the available options?
What are the pros and cons of them?
How would one need to do for them?
Including issues:
See also forum thread. Discuss list there, then include in game manual (documentation/definition).
Something like at least once every 5s and disconnect if fail for third time. Maybe send special kind of message including a random number which just needs to be echoed in order to pass.
See also discussion in #7
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.