Sinan81 / cpsc128

0 stars 0 forks source link

Random Stuff #5

Open marlen-brunner-yukoncollege opened 5 years ago

marlen-brunner-yukoncollege commented 5 years ago

Web based game mostly in Python (using the Flask framework), with some HTML, CSS, JS and Vue.js and bash scripts thrown in https://github.com/elthran/UndyingKingdoms

klondikemarlen commented 5 years ago

https://github.com/elthran/UndyingKingdoms now comes with install instructions that only work on Linux. :P

Sinan81 commented 5 years ago

That's good enough for me! Thanks Marlen, I will check it out soon.

Sinan81 commented 5 years ago

Link to the evolution simulation I showed in the beginning of the class.

https://www.youtube.com/watch?v=Gl3EjiVlz_4

Sinan81 commented 5 years ago

https://github.com/elthran/UndyingKingdoms now comes with install instructions that only work on Linux. :P

First impressions: experiencing problem with mysql root password. Will give it a try again soon, and debug it.

klondikemarlen commented 5 years ago

Yeah ... that part is more than a little rough. It is supposed to:

  1. take your current mysql password,
  2. use it to log in and then create a new account with full permissions of the "undyingkingdoms" database.
  3. Then create a new password which is to be saved in a .cnf file for later use by the game.

bin/install.sh - lines 45-65. I'll try to rewrite it and see if I can remove one of the password requests.

EDIT: I tweaked the install script I found a bugged sed command and generally improved on how I gained root access to mysql. Let me know if it works now.

Sinan81 commented 5 years ago

Tried it on a minimal ubuntu xenial vagrant box. Noticed improvement. However, when I ran 'python manage reset_db", turned out that a few flask modules were missing. Once those were installed, I am getting a python syntax error (see below). I am guessing this is due to the version of Python on Xenial: which is 3.5. Soon, I will also try it on Ubuntu bionic.

(udk_env) vagrant@minimal-xenial:~/udk$ python manage.py serve   
Traceback (most recent call last):
  File "manage.py", line 4, in <module>
    from undyingkingdoms import app
  File "/home/vagrant/udk/undyingkingdoms/__init__.py", line 10, in <module>
    from undyingkingdoms.blueprints.admin import admin_blueprint
  File "/home/vagrant/udk/undyingkingdoms/blueprints/admin/__init__.py", line 5, in <module>
    from undyingkingdoms.blueprints.admin.views import HomeAPI
  File "/home/vagrant/udk/undyingkingdoms/blueprints/admin/views.py", line 6, in <module>
    from undyingkingdoms.blueprints.admin.helpers import create_bots, create_notification, build_comparison_files, \
  File "/home/vagrant/udk/undyingkingdoms/blueprints/admin/helpers.py", line 30
    user = User(f"bot_{bot_name}",
Sinan81 commented 5 years ago

it might be useful to specify specific version of python during venv creation step:

...
python3 -m venv ~/virtual_envs/udk_env
...

pipenv package enables specifying of Python version in a virtual env like

pipenv --python 3.6

See https://docs.pipenv.org/en/latest/basics/

Sinan81 commented 5 years ago

I am getting a different kind of error on Ubuntu bionic. Let's move this discussion to Issues tab of UndyingKingdoms.

klondikemarlen commented 5 years ago

Ok, thanks looking into it :). I'll update the instructions.

Sinan81 commented 5 years ago

Let's park the following link here for tomorrow's class: https://jayisgames.com/games/hunt-the-wumpus/