Page 12 of 14

LXXIII - Design document in the Github repository

Posted: Fri Jul 01, 2016 3:01 pm
by Trilarion
I put the current state of the design document into the Github repository (as non-zipped open office document to enable efficient change tracking while still have nice editing) and went over it. There are many, many things missing yet to describe the full game. However, it now feels as if everything about the project is in one place.

And I started with repairing things and cleaning up and there are some small steps visible (or not visible, the server runs as process again and even stops when the client stops..).

I hope at some point in 4-8 weeks I can release a version that shows progress over the last version and hopefully also increases public interest in the project again because, frankly, it gets a bit lonely here. I don't want to talk to myself forever...

LXXIV - Freezing

Posted: Thu Jul 21, 2016 12:11 am
by Trilarion
I made progress on the creation of a Windows Installer. While the old tool (cx_Freeze) did not work with PyQt5 and Python 3.5 I found that PyInstaller does the work. I checked on a simple PyQt5 test script and I did not play around with the options but I have hope I can offer Windows Installers for the next release.

Now back to the other work.

LXXV - Battle prototype

Posted: Mon Sep 05, 2016 1:45 pm
by Trilarion
The battle prototype is pretty much a standalone app and contains several interesting areas:
  • Hexagonal map display and interaction of units on the map, editing of maps (UI, 2D graphics)
  • Organization of your armies, selection of options (UI, widgets)
  • A tiny bit of pathfinding (Algorithms)
  • Computer opponent (AI)
  • Multiplayer matchmaking (Network, Web)
  • Leaderboard (Web)
This covers some interesting stuff and if possible (enough time) I would like to use this to first implement the battle prototype in Python using Qt, but then also with other game frameworks (list of game frameworks) to learn them and to compare them (with an example). Implementing the same content using different frameworks/languages/target plattforms would give a lot of information value to comparisons like code quality, performance, looks while at the same time minimizing the time required for it.

I thought about the following frameworks which are suitable for 2D graphics: SDL, SFML, libgdx, Cocos-2dx, Allegro, MonoGame, Qt, Unity, orx, Isogenic, PlayCanvas, Godot, Polycode, LÖVE, Urho 3D, Phaser, FIFE, PyGame, Arianne.

So, this could be more than just a prerequisite for this remake but a fully standalone (Panzer General like) engine which runs on many other engines. And maybe the network communication could be made so that all the different apps can cross-play together. That would be truly awesome.

Now this would need to run under a different name?

LXXVI - Sphinx documentation

Posted: Thu Sep 08, 2016 11:41 am
by Trilarion
I decided for going to restructured text as basis for the three big documentation tasks: game manual (explains how to play and contains credits, intended for users), game definition (logical framework of the game, intended for designers, programmers, everyone interested) and developer manual (implementation specific, intended for programmers and artists). I started converting the existing documentation to restructured text and Sphinx projects and I will put them on readthedocs where they will be updated upon every commit.

LXXVII - PyInstaller

Posted: Wed Sep 14, 2016 9:47 pm
by Trilarion
Creating binary installers for Windows is in principle possible. The current official version of PyInstaller cannot package correctly PyQt5 dependent project which also use the QtWebEngine but manually copying some files does the trick. However the overhead is also quite dramatic (adding QtWebEngine doubles the build directory size).

So I think about not showing the manual as ingame help, but rather linking to some external site (like readthedocs) and then starting a browser or so. Might be the easier solution for now.

LXXVIII - Various small stuff

Posted: Wed Oct 05, 2016 11:20 am
by Trilarion
  • Sphinx documentation is mostly up and running (see: https://github.com/Trilarion/imperialism-remake) but the game manual still needs to be copied to the data folder whenever it is newly built.
  • PyInstaller Windows packages should work, but I need to include the switch in the code that calls the inbuilt browser if QtWebEngine is existing (when running as Python package and PyQt is existing) or that just calls the standard desktop browser if we run on Windows using PyInstaller. Also for a Python package I still need to create a setup.py and upload the package on PyPi.
  • The Game Definition is now also available as automatically updated documentation but it's missing quite some details in many places.
  • The data folder is not always found depending on the position. I need to include the solution of Github user wkoot for iterative lookup that I discarded originally.
  • I wrote more examples, especially for server, client communication and they work, but in the current game they still do not work (for example getting a list of all available scenarios). Since the examples work, it's a simple matter of fixing the code. Still needs to be done.
  • The upcoming version should show a bit more (editor features (editing names of provinces, nations, ...) and main map layout a bit. This still needs to be done.
  • I compiled lists of existing strategy, rpg, adventure open source games and open source gaming frameworks in order to better understand what is there. Especially with the frameworks I want to play around a bit more.
You see, before we can release there is still to tie some loose ends here and there.

LXXIX - Roadmap to the next release and beyond

Posted: Sun Oct 09, 2016 5:46 pm
by Trilarion
I'm now at approximately the same state as I was last year but using Qt5 as GUI framework, Sphinx for the documentation (which is online and gets updated) and in general the code base in a bit better shape. In order to have the next release within the following four weeks I now need to concentrate on adding a bit more functionality.

For the next release I need to do:
  • Extend scenario editor to adjust properties of nations, provinces (names, ...)
  • A bit more basic view of the main screen.
  • Working packaging with PyInstaller
And afterwards I will concentrate on the battle prototype, the trade prototype and the main screen as well as providing more detailed roadmaps so in case others are interested I can easily organize joint work.

LXXX - NATs

Posted: Sat Oct 15, 2016 2:51 pm
by Trilarion
A whole new world (of problems unfortunately) has opened up to me yesterday. The question of how you connect to a server (and for the remake every client is a server as well, so in other words: how to connect to someone else) behind a NAT (that is behind a router). This is the common situation I have here (a router connected to a PC and some other devices). Of course they all share the same public IP address and the router will not accept any inbound calls and anyway the other party would not know how to reach anyone since the PC behind the router only has a local IP address (something like 192.168.1.2).

Turns out there are like three solutions for this common problem:
  • Manual port forwarding on the router (simple, straightforward, quite a bit of work, especially if it must be done for every app)
  • UPnP the automatic version of port forwarding (requires learning yet another technique, but could work in most cases)
  • "Hole punching" (we use TCP) including something like reverse connection and a rendevous server in the middle but I simply don't know much about it (would it work if both devices (server and client) are behind NATs?).
So what this means is basically more work. The only good thing is that it doesn't need to be done now. It only affects multiplayer, but not single player.

LXXXI - Server/Client communication

Posted: Thu Oct 20, 2016 11:43 am
by Trilarion
I made some progress in the last week with the editor (modifying scenario properties) with the network communication (functionality like chatting) and the lobby (selecting a scenario, previewing a scenario). The plan for the game is not so detailed and I am not so experienced that my server/client communication protocal was fixed the whole time, so it changed again now to better adapt to the needs.

The current mechanism is:
  • client and server(-clients) send letters to each other
  • letters have a channel (enum), an action (enum) and optional content (anything)
  • clients and server-clients have to connect to channels (they can change the connection at any time, Qt like signal slot mechanism)
  • if a letters arrives for a channel without any connection an error is thrown
  • the channel connection slot will then do the right thing according to the action and maybe the optional content
  • the channel connection slot probably has to loop over possible actions by some kind of switch/if-elseif mechanism
  • it is recommended to keep the number of possible actions at any point in time for each channel low, so complexity of these handlers is under control
  • the number of channels and the number of actions per channel has to be balanced
First I thought, that I would like to have just channels and no actions, but the constant connecting and disconnecting to the channels proved rather tedious. Now it's more like channels are for multiple tasks which belong together and occurr at the same phase/time point of the app.

Let's see how well this works.

LXXXII - New content

Posted: Mon Oct 24, 2016 9:56 am
by Trilarion
Now I'm actually at a stage where I can implement additional functionality beyond that of the last released version. That means a new release could happen anytime now (I realistically aim for end of November/beginning of December to give myself time to incorporate a bit more than just the old state).

What is on my priority list:
  • Editing scenario properties (change terrain/provinces under mouse, add/remove/modify nations, add/remove/modify provinces, move provinces between nations, modify Scenario properties) which requires modifications of both GUI and underlying model.
  • Multiplayer lobby with chat and maybe scenario selection, Singleplayer lobby with better scenario preview and start of main game screen
  • Main game screen with layout of elements and map an End Turn functionality
  • Creation of a Windows installer using PyInstaller
That will probably be everything I can reasonably achieve in one month.