A Game Engine Made in Python with the Pygame Module

Overview

MandawEngine

A Game Engine Made in Python with the Pygame Module

Discord: https://discord.gg/MPPqj9PNt3

Installation

To Get The Latest Version of MandawEngine: On Windows:

pip install https://github.com/mandaw2014/mandawengine/archive/master.zip

On Mac and Linux

pip3 install https://github.com/mandaw2014/mandawengine/archive/master.zip

Getting Started

import Mandaw

from mandaw import *

Make a window

from mandaw import *

mandaw = Mandaw() 

mandaw.loop()

Make a simple square

square = GameObject(window = mandaw, shape = "rect", x = 0, y = 0, color = "red", width = 20, height = 20)

Center it with

square.center()

Draw it

@mandaw.draw
def draw():
    square.draw()

Full Code

from mandaw import *

mandaw = Mandaw("First Mandaw Window!")

square = GameObject(window = mandaw, shape = "rect", x = 0, y = 0, color = "red", width = 20, height = 20)
square.center()

@mandaw.draw
def draw():
    square.draw()

mandaw.loop()

Collisions Between GameObjects

What we have so far

from mandaw import *

mandaw = Mandaw("Collisions!", bg_color = "cyan")

square = GameObject(window = mandaw, shape = "rect", x = 0, y = 0, color = "orange", width = 20, height = 30)
square.center()

ground = GameObject(window = mandaw, shape = "rect", x = 0, y = 0, color = "gray", width = 5000, height = 100)
ground.center()
ground.y = 500

@mandaw.draw
def draw():
    square.draw()
    ground.draw()   

mandaw.loop()

Here We Can Use The collide() Function along with the built in update() function. For example, We're Going To Make Gravity Here

from mandaw import *

mandaw = Mandaw("Collisions!", bg_color = "cyan")

square = GameObject(window = mandaw, shape = "rect", x = 0, y = 0, color = "orange", width = 20, height = 30)
square.center()

ground = GameObject(window = mandaw, shape = "rect", x = 0, y = 0, color = "gray", width = 5000, height = 100)
ground.center()
ground.y = 500

@mandaw.draw
def draw():
    square.draw()
    ground.draw()   

@mandaw.update
def update(dt):
    # Collision code here
    if not square.collide(ground):
        # Square's y position += 1 x deltaTime
        square.y += 1 * dt

mandaw.loop()

Platformer Controller Prefab

What we have so far

from mandaw import *

mandaw = Mandaw("Platformer Example", bg_color = "cyan")

mandaw.loop()

Import the PlatformerController2D with

from mandaw.prefabs.platformer_controller import PlatformerController2D

Then call it

player = PlatformerController2D(mandaw, x = 0, y = 0, centered = True)

Then in the def update(dt) function, call

@mandaw.update
def update(dt)
    player.movement(dt)
You might also like...
A Pygame game made in 48 hours
A Pygame game made in 48 hours

Flappuccino Flappuccino is a game created in 48 hours for the PyGame Community New Years Jam using Python with Pygame. Screenshots Background Informat

This is a simple game made using pygame.

Ball breaker This is a simple game made using pygame game view The game view have been updated wait for the new view to be uploaded Game_show.mp4 Lear

Racing Fire - A simple game made with pygame.

Racing Fire A simple game in the making. Using pygame, this game is made to feel like an old arcade game. I developed a simple controller for it with

A game made similar as space inveders with pygame

space-inveders-pygame a game made similar as space inveders with pygame . . . if you are using it make sure to change audio and imgs file i do no own

N-Queens game made using pygame library
N-Queens game made using pygame library

N-Queens N-Queens game using pygame for AIML201 Testing: 1. git clone https://github.com/python-game-dev/N-Queens.git 2. cd N-Queens 3. python main.py

A didactic GUI chess game made in Python3 using pygame.
A didactic GUI chess game made in Python3 using pygame.

Chess A didactic GUI chess game made in Python3 using pygame. At the moment, there is no AI. The only way you can test the game is by playing against

🐥Flappy Birds🐤 Video game. With your help I can go through🚀 the pipes. All UI is made with 🐍Pygame🐍
🐥Flappy Birds🐤 Video game. With your help I can go through🚀 the pipes. All UI is made with 🐍Pygame🐍

🐠 Flappy Fish 🐢 I am Flappy Fish 🐟 . With your help I can jump through the pipes and experience an interesting and exciting flight deep into the fi

A Tetris game made using PyGame as renderer only, for a school project.
A Tetris game made using PyGame as renderer only, for a school project.

Tetris_Python A Tetris game made using PyGame as renderer only, for a school project. Twist in the Game Blocks can pentrate through right and left bou

PyGame-Tutorial - Refrence for building games in pygame
PyGame-Tutorial - Refrence for building games in pygame

PyGame-Tutorial How to build games using the python library PyGame End result Ho

Comments
  • if __name__ == __main__ added

    if __name__ == __main__ added

    I have merged some examples with their source code file file so with if name == main To make the code easier to understand and to prevent everyone from jumping through the game engine code and the examples just to understand it

    YAY

    opened by PratangsuRakshit 0
  • Some basic upgrades

    Some basic upgrades

    Just some basic changes

    These updates are there to make game devlopment with MandawEngine easier.

    These changes are not yet super important but they will imporve the MandawEngine

    Features Added

    • So many default colors added to color.py
    • Made a demo run() with GameObject.py

    Support

    For support, email [email protected] or join discord.

    opened by PratangsuRakshit 0
Releases(mandawengine)
  • mandawengine(Oct 25, 2021)

    A complete revamp from the old MandawEngine Pygame This update includes built in functions, such as def update(dt): And def draw(): It also includes tidying up of all gameengine scripts

    Source code(tar.gz)
    Source code(zip)
  • v1.1.0(Aug 24, 2021)

    The First Proper Version Released On Github. It includes:

    1. Sprite Animation
    2. Audio
    3. Colors
    4. GameObjects
    5. Input Controls
    6. Basic 2D Lighting
    7. Sprites
    8. Text

    And much more on the way

    Source code(tar.gz)
    Source code(zip)
Inflitator is a classic doom and wolfenstein3D like game made in Python, using the famous PYGAME module.

INFLITATOR Raycaster INFLITATOR is a raycaster made in Python3 with Pygame. It is a game built on top of a simple engine of the same name. An example

Zanvok Corporation 1 Jan 7, 2022
Made with pygame. Multiplayer game using socket module and threading.

Rock Paper Scissor made with python-pygame. Poorly made, as a beginner in programming. Multiplayer with server code and client code provided.

AllenJo 1 Dec 29, 2021
Blender Game Engine Game Type Templates Logic Bricks (and Python script) based Game Templates for Blender

Blender-Game-Engine-Templates Blender Game Engine Game Type Templates Logic Bric

null 3 Oct 25, 2022
Mandaw 2 Mar 1, 2022
Quiz game made entirely with python and pygame for school work

Tabela de conteúdo Descrição Como instalar Linguagens usadas Contribuidores Créditos Problemas com o jogo? Contate-nos Descrição Quiz feito inteiramen

null 3 Apr 12, 2022
Small game I made in 2019 using python/pygame.

Kill-The-Blokk // Shoot or Die This is a small game I made in gr.10 (2019) for my high school computer science class; the game was coded in python usi

null 1 Nov 13, 2021
The Classic Fruit Collecting game made in python with pygame

FruitCollect A classic fruit Collecting game made with pygame Install pygame before running: "pip install pygame" Rules: Random fruits will drop from

Pranav Bobby 1 Dec 1, 2021
A Python Sudoku Game Made with Pygame.

A Python Sudoku Game Made with Pygame. A Begginer Aimed at Learning Git, This Game Uses a Puzzle Generator Made by RutledgePaulV, Link to his Repo:

helaxious 3 Jun 29, 2022
Snake game made in python with the pygame library.

Pygame snake Snake game made in python with the pygame library. Requirements pip pygame Pygame Installation On the command line, type: pip install pyg

Ayza 3 Oct 2, 2022
This is a 2D Link to the Past-esque game made using Python 3.2.5 and pygame 1.9.2

Queen-s-Demise Queen's Demise This is a 2D Link to the Past-esque game made using Python 3.2.5 and pygame 1.9.2 I made this for a game development cla

Zoey 1 Dec 15, 2021