Fork of Molleindustria's likelike online "tiniest MMORPG" -- with python/flask server implementation
選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。
 
 
 
 
Michael Murtaugh b3fa78e650 hello bot 2年前
bots hello bot 2年前
public mods partially implemented 2年前
.gitattributes Initial commit 4年前
.gitignore Update .gitignore 4年前
LICENSE Initial commit 4年前
README.md appended xpub fork-specifc notes to README 2年前
data.js Likelike online Omoma version 4年前
data.json first version POC of python/flask port of server 2年前
dictionary.json Likelike online Omoma version 4年前
dump_data_to_json.js first version POC of python/flask port of server 2年前
interval_tasks.py appended xpub fork-specifc notes to README 2年前
license.txt first commit 4年前
npc.py mods partially implemented 2年前
package-lock.json first version POC of python/flask port of server 2年前
package.json Likelike online Omoma version 4年前
promo.gif first commit 4年前
requirements.txt first version POC of python/flask port of server 2年前
server.js first version POC of python/flask port of server 2年前
server.py appended xpub fork-specifc notes to README 2年前
serverMod.js Likelike online Omoma version 4年前
serverMod.py appended xpub fork-specifc notes to README 2年前

README.md

LIKELIKE Online

The tiniest MMORPG. Choose an avatar and hang out with your friends in a virtual version of LIKELIKE a videogame gallery in Pittsburgh, PA.

>>>Try it here<<<

This project was created during the COVID-19 quarantine and was meant to evoke the social aspect of LIKELIKE's exhibitions.
You can mod it to create your own virtual exhibitions, multi-user environments or games.
It's designed to be extensible by just editing the data.js file and a few settings at the beginning of server.js and client.js.

The code is extensively commented but it was put together very quickly (about a 10 days) so it's not meant to be a robust, beginner-friendly tool. You'll need some node.js and javascript knowledge to adapt it to your needs. Use at your own risk.

LIKELIKE Online is built with node.js, socket.io, p5.js, and the add-on p5.play, it's hosted on glitch.com.

LIKELIKE Online is a project by Molleindustria.

Licensed under a GNU Lesser General Public License v2.1.

Publishing on Glitch

Glitch is a community and a suite of online tools to develop web applications. Glitch provides free hosting for node.js projects. Most web hosts don't give you that degree of access. Another popular platform is heroku. Glitch offers a code editor, file storage, and an intergrated terminal. You can create node applications from scratch via browser. Glitch allows you to browse and remix other people projects.

LIKELIKE Online is already structured for glitch deployment with a server.js and a package.json on the root, and a "public" folder. You can deploy this app to Glitch via github or other git repositories

You can clone LIKELIKE online by creating a Glitch account and remixing it from the web interface >>> here <<<

Alternatively you can follow this process to deploy it starting from a zip of the project folder:

  • Create a ZIP file of the project.

  • Upload it to the assets folder in your project, click it and click Copy Url

  • Starting from an empty or existing glitch project, navigate to Settings > Advance Options > Open Console

  • In the console, pull the zip file from the url (keep file.zip name, it's just a temporary file)
    wget -O file.zip https:///url-to-your-zip

  • Extract it to the root folder unzip file.zip -d .

  • Remove the zip file rm file.zip

  • Refresh our app so the new files are shown in the editor and published refresh

Warning A free Glitch account has a limit of 4000 requests per hour, this projects loads a lot of individual image assets so you can go over the limit pretty easily. Consider purchasing a paid account for a public-facing project.

The .env file

.env is a text file in the root folder that contains private variables, in this case admin usernames and passwords and the port used by the project. It's not published on github and it's not automatically published on glitch so you may have to create it manually and/or copy paste the content in the glitch editor and/or in your code editor if you are running is as a local project.

An example of .env file for LIKELIKE online is:

ADMINS=adminname1|pass1,adminname2|pass2  
PORT = 3000

The admin names are reserved. Logging in as "adminname|pass" (nickname and password separated by a "|") will grant the user admin priviledges such as banning IP or sending special messages.

XPUB FORK

Notes on the XPUB Fork.

The version of socketio used is not the most recent. The requirements.txt file reflects the correct versions for flasksocketio etc. Note that it was important to clone and generate the documentation of these older dependencies to avoid problems with changes (namely in the first implementation I used the "to=" paramter to calls to emit and send which doesn't even give an error, but which isn't correct as the old API uses "room=").

Replacing calls to javascript's setInterval and setTimeout required the implementation of a small class called IntervalTaskMaster (See: interval_tasks.py). It uses pythonsocketio's start_background_task method (and hopefully remains intact if/when deployed with say uwsgi, should test this ;)

At the moment the serverMod is only partially implemented.