PyMMO is a Python-based MMO game framework using sockets and PyGame.

Overview

PyMMO

pymmo

PyMMO is a Python framework/template of a MMO game built using PyGame on top of Python's built-in socket module. This template implements a simple MMORPG with baked in features such as:

  • In-game chat bubbles functionality;
  • Action battle system with server-side processing functionality;
  • Run on cloud, locally in your machine, or anywhere in-between due to the use of sockets.
  • Multithreaded client handling on the server side
  • Minimal and easy to use and only requires PyGame as a dependency

Preview:

pymmo_hd.mov

Requirements

  • PyGame 2.0+

Usage

Running the PyMMO server

For all commands below you must be situated in the root folder of this repository.

In one terminal, run server via:

python server.py

Running the PyMMO client template

In another terminal, run the following to open a client, i.e. the game:

python client.py

A game window will open and spawn two entities: a player object, which is your controllable character and comes in magenta; and an enemy object, which you can interact with. Both are added to the server. The names of all entities are shown alongside their health point bars.

Open multiple clients for multiplayer functionality

Open an additional terminal, and run in it the following command to open a new client instance:

python client.py

Adjust network settings by changing IP and port values in macros.py according to your needs.

In-game commands:

  • Move your character via up/right/left/down keyboard arrows.
  • Attack an enemy or another player by pressing space. This will damage the entity you are overlapping with, and it can damage both "enemy" and "player" entities. When HP bar reaches zero, the entity is killed and removed from the server.
  • Chat in-game by pressing any lowercase letter to write text to the in-game chat floatting bubble. Press enter to publish the text bubble you entered to all other players in the scene.

WORK IN PROGRESS! Needs some work (please feel free to contribute!):

  • Animated graphics (0%)
  • Network stability (20%)
  • Unit-tests (0%)
  • Animated graphics (0%)
  • Server-side computations (20%)

This was put together in a rush to try to finish within a day or so... Contributions such as additional features, code polishment/review/refactoring, optimization, are not only needed, but would be highly appreciated!! Huge thanks in advance! :)

You might also like...
A Django admin theme using Twitter Bootstrap. It doesn't need any kind of modification on your side, just add it to the installed apps.
A Django admin theme using Twitter Bootstrap. It doesn't need any kind of modification on your side, just add it to the installed apps.

django-admin-bootstrapped A Django admin theme using Bootstrap. It doesn't need any kind of modification on your side, just add it to the installed ap

Django app that enables staff to log in as other users using their own credentials.
Django app that enables staff to log in as other users using their own credentials.

Impostor Impostor is a Django application which allows staff members to login as a different user by using their own username and password. Login Logg

A Django admin theme using Twitter Bootstrap. It doesn't need any kind of modification on your side, just add it to the installed apps.
A Django admin theme using Twitter Bootstrap. It doesn't need any kind of modification on your side, just add it to the installed apps.

django-admin-bootstrapped A Django admin theme using Bootstrap. It doesn't need any kind of modification on your side, just add it to the installed ap

Freqtrade is a free and open source crypto trading bot written in Python
Freqtrade is a free and open source crypto trading bot written in Python

Freqtrade is a free and open source crypto trading bot written in Python. It is designed to support all major exchanges and be controlled via Telegram. It contains backtesting, plotting and money management tools as well as strategy optimization by machine learning.

A high-level app and dashboarding solution for Python
A high-level app and dashboarding solution for Python

Panel provides tools for easily composing widgets, plots, tables, and other viewable objects and controls into custom analysis tools, apps, and dashboards.

Firebase Admin Console is a centralized platform for easy viewing and maintenance of Firestore database, the back-end API is a Python Flask app.

Firebase Admin Console is a centralized platform for easy viewing and maintenance of Firestore database, the back-end API is a Python Flask app. A starting template for developers to customize, build, and even deploy the desired admin console for their DB.

Django application and library for importing and exporting data with admin integration.
Django application and library for importing and exporting data with admin integration.

django-import-export django-import-export is a Django application and library for importing and exporting data with included admin integration. Featur

Collection of admin fields and decorators to help to create computed or custom fields more friendly and easy way
Collection of admin fields and decorators to help to create computed or custom fields more friendly and easy way

django-admin-easy Collection of admin fields, decorators and mixin to help to create computed or custom fields more friendly and easy way Installation

BitcartCC is a platform for merchants, users and developers which offers easy setup and use.
BitcartCC is a platform for merchants, users and developers which offers easy setup and use.

BitcartCC is a platform for merchants, users and developers which offers easy setup and use.

Comments
  • Refactored server.py

    Refactored server.py

    Basically refactored it so that extending functionality is easier and each function is properly separated

    • The functionality is still the same. The previous version was just translated into an object oriented paradigm
    • Added type hints for readability
    • Added a ResponseHandler class so adding response actions is easier
    • Commented out print statements because (in my case) it affects performance
    opened by alexmbd 0
  • Be difuse over Pypi

    Be difuse over Pypi

    Is your feature request related to a problem? Please describe. Capability to install PyMMO as a normal Python module

    Describe the solution you'd like I can converte the project to a True Python Module structure, Unfortunally every actual file should be move to a subdirectory.

    Describe alternatives you've considered It haven't a alternative, That a Python module or not ...

    Additional context I have do it many time , and the better is to make it as Python installable module over pip as soon fo possible.

    opened by hierosme-nova 0
  • REQUEST - Trade system

    REQUEST - Trade system

    Hello bro. I will test it and use the project for studies. Do you know where we should start to create an NFTs (Non-Fungible Tokens) based trading system? Is it possible?

    Hope you have a nice week!!! Thank you.

    opened by gvmturl 0
Owner
Luis Souto Maior
Electrical and Biomedical Engineer specialized in applied AI for Medical Imaging
Luis Souto Maior
Simple and extensible administrative interface framework for Flask

Flask-Admin The project was recently moved into its own organization. Please update your references to [email protected]:flask-admin/flask-admin.git. Int

Flask-Admin 5.2k Dec 29, 2022
Simple and extensible administrative interface framework for Flask

Flask-Admin The project was recently moved into its own organization. Please update your references to [email protected]:flask-admin/flask-admin.git. Int

Flask-Admin 4.6k Feb 7, 2021
Django Smuggler is a pluggable application for Django Web Framework that helps you to import/export fixtures via the automatically-generated administration interface.

Django Smuggler Django Smuggler is a pluggable application for Django Web Framework to easily dump/load fixtures via the automatically-generated admin

semente 373 Dec 26, 2022
Tornadmin is an admin site generation framework for Tornado web server.

Tornadmin is an admin site generation framework for Tornado web server.

Bharat Chauhan 0 Jan 10, 2022
FastAPI Admin Dashboard based on FastAPI and Tortoise ORM.

FastAPI ADMIN 中文文档 Introduction FastAPI-Admin is a admin dashboard based on fastapi and tortoise-orm. FastAPI-Admin provide crud feature out-of-the-bo

long2ice 1.6k Jan 2, 2023
A cool, modern and responsive django admin application based on bootstrap 5

django-baton A cool, modern and responsive django admin application based on bootstrap 5 Documentation: readthedocs Live Demo Now you can try django-b

Otto srl 678 Jan 1, 2023
fastapi-admin is a fast admin dashboard based on FastAPI and TortoiseORM with tabler ui, inspired by Django admin.

fastapi-admin is a fast admin dashboard based on FastAPI and TortoiseORM with tabler ui, inspired by Django admin.

fastapi-admin 1.6k Dec 30, 2022
Drop-in replacement of Django admin comes with lots of goodies, fully extensible with plugin support, pretty UI based on Twitter Bootstrap.

Xadmin Drop-in replacement of Django admin comes with lots of goodies, fully extensible with plugin support, pretty UI based on Twitter Bootstrap. Liv

差沙 4.7k Dec 31, 2022
Drop-in replacement of Django admin comes with lots of goodies, fully extensible with plugin support, pretty UI based on Twitter Bootstrap.

Xadmin Drop-in replacement of Django admin comes with lots of goodies, fully extensible with plugin support, pretty UI based on Twitter Bootstrap. Liv

差沙 4.7k Dec 31, 2022
aiohttp admin is generator for admin interface based on aiohttp

aiohttp admin is generator for admin interface based on aiohttp

Mykhailo Havelia 17 Nov 16, 2022