Giter Club home page Giter Club logo

conqueror-of-empires's Introduction

Hi I'm Ben ๐Ÿ‘‹

๐Ÿค” About

  • ๐Ÿ‘จโ€๐Ÿ’ป I'm intrested in all things web dev, especially developing Node.js apps and React SPAs at the moment.
  • โค๏ธ I'm a lover of open source software, looking to start contributing back more.

๐ŸŒฑ I'm currently exploring...

conqueror-of-empires's People

Contributors

ben-ryder avatar hmikihth 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

Watchers

 avatar  avatar  avatar  avatar

conqueror-of-empires's Issues

Game can't end unless a human wins [GH-2]

Describe the bug
If all human players die, the game does not end and the last surviving player must keep clicking through the next turn message as the computer players continue.
If a computer player wins, the game will not end but will continue. This is because the check for player death is done in the conquer handling in the view which the computer player doesn't invoke.

To Reproduce
All human players must be conquered, and a computer player must then conquer all other players.

Expected behaviour
When a computer player wins, the game should end and there should be the appropriate message.
When all human players die but computer players remain, this could be handled in multiple ways.

  • The game could end with a defeated message.
  • The next turn message continues each turn cycle but the text changes to reflect that they are simply viewing the game unfold now.
  • The last player has a choice to keep watching the game by clicking through each turn cycle or to end the game.

System Information (please complete the following information):
n/a (This is a code bug/issue)

Additional context
n/a

When a computer player conquers a city, the mini map is not updated. [GH-2]

Describe the bug
When a computer player conquers a city, the mini map is not updated. It is only updated when a human player conquers a city.
(This is a bug related to the computer players work for GH-2)

To Reproduce
A computer player's unit must conquer a city.

Expected behaviour
The mini map should update to reflect this change.

System Information (please complete the following information):
n/a (It's a code issue to be fixed)

Additional context
n/a

Suggested Fix
This will most likely require an edit of the display/view system to automatically update the mini map at the end of each turn. This is because the model knows nothing about the display and the controller has no way of knowing if a data update occurred. It is therefore up to the view to update itself.

Change data storage format to JSON

Describe your feature
Currently, the game data is saved and stored using pickle. This saves a copy of the game's 'Model' object, which can be reloaded back in to resume a game.
I suggest changing this to use a common standard format, such as JSON. This will mean that code base changes will be much less likely to cause old games to crash, and might make future testing easier as you can simply inspect the save file, or edit it if you want certain game conditions.

Is your suggestion related to any problems?
The current use of pickle may slow future development and cause old games to crash after code base changes.

Additional context
n/a

Allow for window resizing and fullscreen

Describe your feature
The game is currently fixed at one window size (1000 x 700px). For a better experience it would be nice to be able to support window resizing, going to fullscreen etc.

Is your suggestion related to any problems?
n/a

Additional context
n/a

Interface transparency looks to be broken on Mac OS.

Describe the bug
When viewing the game on mac OS the interface transparency is not working.
It appears to still be working fine in the menus, it's just within the game itself.

To Reproduce
Steps to reproduce the behaviour:

  1. Start playing the game and you will see the interface doesn't have transperency.

Screenshot 2021-08-30 at 17 09 57

Screenshot 2021-08-30 at 17 10 22

Expected behaviour
Interface backgrounds should have transprency.

System Information (please complete the following information):

  • OS: Mac (Big sur)
  • Conqueror of Empires Version: all versions. Tested on master & develop branch.
  • Python Version: Python 3.6.7
  • Pygame Version: 2.0.1

Additional context
I originally built the game with pygame 1.9.x so it's possible something around transparency has changed in pygame 2.x

Icon on Windows

On windows the icon will not display properly. (resizing issue, convert to .ico file?)

Hover effect appears broken on the archer unit selector.

Describe the bug
When hovering over the archer unit to spawn it the hover effect doesn't work correctly.

To Reproduce
Steps to reproduce the behaviour:

  1. Open a city menu
  2. Click on "spawn unit"
  3. Hover over the archer unit icon
  4. You will see that the hover effect doesn't work like the other units.

Expected behaviour
The hover effect should match the other units.

System Information (please complete the following information):

  • Conqueror of Empires Version: v1.1
  • This is a code issue so system info isn't relevant.

Additional context
n/a

Look into improving the map scroll functionality.

Describe your improvement
Look into improving the map scroll functionality, possibly by developing an alternative map scroll system such as clicking and holding before moving your mouse to move the map.

Is your suggestion related to any problems?
I find that the map scrolling can sometimes be a little frustrating and fiddly. It can also cause some annoying situations, for example sometimes when going to click the next turn button the map will scroll down or left.

Additional context
n/a

Replace custom UI elements with a library.

Describe your improvement
It is probably a good idea to look at replacing as many of the custom GUI components as possible with components from a UI library.
A quick look around and pygame_gui (https://github.com/MyreMylar/pygame_gui) looks like a good choice.

Is your suggestion related to any problems?
Not specifically, but this might make the GUI easier to maintain & work on.

Additional context
n/a

Add Github action to automatically create cx_freeze packages.

Describe your feature
Add a GH action to automatically create cx_freeze packages for Ubuntu, Mac & Windows when publishing a tag.

Is your suggestion related to any problems?
Currently I have to manually create packages which is time comsuming and requires access to all 3 operating systems.

Additional context
n/a

Add random map generation

Describe your feature
Currently maps can be selected from a list. I suggest adding a random map generator.
This could also involve adding a step to the new game menu where a user can regenerate a starting map until they are happy. This would allow the map generator to be less refined to begin with, while ensuring the map is good to play on.

Is your suggestion related to any problems?
n/a

Additional context
n/a

Folders appear in the select game list

Describe the bug
If a folder has been created within the ./data/saved/ directory then this is picked up in the select game list.

To Reproduce
Steps to reproduce the behaviour:

  1. Create a folder in ./data/saved/
  2. Go to the select game screen and you will see it in the list.
  3. Clicking on it will naturally cause the game to crash as the system expects a readable json file.

Expected behaviour
Only valid json files should appear in the select game list, not folders or anything else.

System Information (please complete the following information):

  • Conqueror of Empires Version: v1.1
  • This is a code issue, system information isn't relevant.

Additional context
n/a

Game Bots

Will you be working to implement an game bot to play against players who have no friends to play with ;) ?

Start on Windows 10: "No such file or directory".

root - ERROR - caught at main
Traceback (most recent call last):
File "main.py", line 16, in
File "main.py", line 12, in main
File "project\control\controller.py", line 38, in run
File "project\control\controller.py", line 61, in run_newgame
File "project\menus\newgame.py", line 82, in init
File "project\menus\newgame.py", line 86, in run
File "project\menus\newgame.py", line 150, in handle_events
File "project\menus\newgame.py", line 96, in create_game
File "project\game\new.py", line 11, in make
File "project\data.py", line 9, in save
FileNotFoundError: [Errno 2] No such file or directory: 'C:\Users\Intel\Desktop\Conqueror-of-Empires-v1.0\data\\saved\sdg'

Improve MVC interface

Describe your feature
I suggest improving the MVC interface between the different game classes.

Is your suggestion related to any problems?
This was brought to light because of GH-11 and fixing GH-10.
The cause of both of these is that links between the Model and View are quite blurred, and both are having to interact with each other in ways they shouldn't.
For example:

  • The View is performing logic that should be done somewhere in the Model (such as checking if a player has died)
  • The Model currently has knowledge it shouldn't need about the View (for example so that it can update the city tiles when needed).

This has become an issue for working on GH-2 as some logic needed for the game is processed in the view, but the computer player's actions take place in the Model.

Suggested Implementation
Whatever happens, this will require some large scale refactors of the code!
I will have to decide the exact framework I want to employ but a few things to think about are:

  • I should really be able to play the game in the terminal by instantiating the game model and using the interface.
  • It is not up to the caller of the model interface to do lots of state checking first, the model interface should be robust enough and return appropriate errors/states for the caller to handle. This is of course within reason, if the errors can be caused by interface based input then this should be handled in the interface where possible too.
  • The model should be able to perform multiple related actions at once. (Such as conquering a city, and then killing the player if they have no more cities). It should then create some sort of report/event stack about what occurred which the interface can then query and interpret in order to display state change.
  • The use of a type of "event & state change stack" would allow the user interface to become totally separate from the Model. This has the benefit of offering potential performance improvements, as the Model processing does not have to be throttled by visual updates.

Game Crash

After I select which players I want to play with and click start game, my game crashes. I am on Windows.

root - ERROR - caught at main Traceback (most recent call last): File "main.py", line 16, in <module> File "main.py", line 12, in main File "project\control\controller.py", line 38, in run File "project\control\controller.py", line 61, in run_newgame File "project\menus\newgame.py", line 82, in __init__ File "project\menus\newgame.py", line 86, in run File "project\menus\newgame.py", line 150, in handle_events File "project\menus\newgame.py", line 96, in create_game File "project\game\new.py", line 11, in make File "project\data.py", line 9, in save FileNotFoundError: [Errno 2] No such file or directory: '\\Conqueror-of-Empires-master\\Windows\\Conqueror-of-Empires-v1.0\\data\\\\saved\\hi'

I called the game "hi" for testing purposes by the way.

User Interface is not updated after computer player actions [GH-2]

Describe the bug
The user interface is not being updated after computer player actions. The units on the map update fine, but other components don't such as the city tile on an upgrade or the mini map.
This was first discovered in issue GH-7, but from now on this shall be the main issue used to track this bug.

To Reproduce
A computer player performs any action that requires a view/GUI update.

Expected behaviour
All players should be able to see the changes.

System Information (please complete the following information):
n/a (This is a code issue)

Additional context
n/a

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.