Skip to content

DRincs-Productions/Renpygame

Repository files navigation

Renpygame

IMPORTANT: This is a continuation of a project not mine, abandoned from 2008 Renpygame (not working). Currently compared to 2008, it is not possible to directly use the pygame_sdl2 library, especially to "draw".

Renpygame is a framework that allows pygame games to be integrated with Ren'Py. It's intended for people who are capable programmers.

The idea is to create a library that uses pygame_sdl2 and overrides functions that can be handled by the renpy library.

The big problem is that the mode for drawing is very different. The only way I found was to use CDD and use that events to draw and update an element.

Use of events to draw limits a lot -> you can't create loops to update a renpy.Displayable -> that's why you can't copy and paste a game, but modify it slightly.

ezgif com-video-to-gif


TO DOWNLOAD THIS TEST PROJECT

# Basic command to download projects from git
git clone https://github.com/DRincs-Productions/Renpygame
# IMPORTANT -> Will add the libraries needed to run the program
cd Renpygame
git submodule update --init --recursive

Other minigames

(Add topics renpygame to add it to the list)
https://github.com/topics/renpygame

Instructions

Wiki

Why use pygame-renpygame and not renpy-CDD?

pygame-renpygame's pros:

  • You can use pygame and renpy functions
  • huge number of minigames on github
  • popularity (pygame is also often used in universities)
  • typification (I am endeavouring to add the type everywhere)

renpy's pros:

  • durability (CDD is developed by the same developer as renpy)
  • you can create simple and effective effects on images thanks to Transforms (in the future it could also be integrated into Renpygame)

Performance

(in development)

(I don't made any tests for now) Renpygame use CDD for draw and renpy for open a file, but I use a typification and is a external library. So, the performance is the same as renpy, excluding possible implementation errors.

Insert Toolkit in your project

I recommend the following ways to include it in your project:

  • Pull branch (to insert it into your game and update it easily)
  • Fork (to improve the repo or create a Toolkit based on mine)
  • Manually (not recommended)

Pull branch

To insert or update the Toolkit in your repo with Pull branch I recommend the following procedure:

(only if you want to insert the repo) Create a new empty branch, in the example I'll use renpygame

git checkout -b renpygame
git checkout renpygame
git config pull.rebase false
git pull https://github.com/DRincs-Productions/Renpygame.git tool-only --allow-unrelated-histories
git submodule update --remote

At the end make a merge inside the arm of the project.

Supported Modules

A good number of functions should already work even if they have not yet been tested

  • renpygame.color
  • renpygame.constants (Still to be tested, should already be working)
  • renpygame.cursors (Still to be tested, should already be working)
  • renpygame.display (Incomplete)
  • renpygame.display.Surface
  • renpygame.draw
  • renpygame.event (Still to be tested, should already be working)
  • renpygame.font
  • renpygame.image (Incomplete)
  • renpygame.joystick
  • renpygame.key (Incomplete)
  • renpygame.locals (Still to be tested, should already be working)
  • renpygame.mixer (Incomplete)
  • renpygame.mixer.music (Incomplete)
  • renpygame.mouse (Still to be tested, should already be working)
  • renpygame.rect
  • renpygame.sprite (Incomplete)
  • renpygame.time (Still to be tested, should already be working)
  • renpygame.transform (Incomplete)