Porting from pygame to renpy

Discuss how to use the Ren'Py engine to create visual novels and story-based games. New releases are announced in this section.
Forum rules
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
Post Reply
Message
Author
User avatar
Empish
Veteran
Posts: 221
Joined: Thu Jan 14, 2016 9:52 pm
Projects: Efemural Hearts, It Ends With Graduation
itch: empish
Contact:

Porting from pygame to renpy

#1 Post by Empish »

So I have been advised to use pygame for a couple minigames I'm trying to build for the sake of getting realtime behavior. I've managed to create a basic animation + some reaction, and I wanted to try and put it in a base renpy project to see if it works. It doesn't.

More specifically, I'm stuck at this point getting the images to load (It literally says "cannot load image run0.png" despite it being in the right folder). I'm pretty nooby towards renpy so I figure this is something pretty basic, but I don't know it and a search doesn't seem to turn anything up about it that's not really old and wants you to use renpygame, which I understand is broken with the newer renpys?

Anyway, is there a set way to bring something from pygame into renpy? Or is it a custom job each time?

User avatar
PyTom
Ren'Py Creator
Posts: 16096
Joined: Mon Feb 02, 2004 10:58 am
Completed: Moonlight Walks
Projects: Ren'Py
IRC Nick: renpytom
Github: renpytom
itch: renpytom
Location: Kings Park, NY
Contact:

Re: Porting from pygame to renpy

#2 Post by PyTom »

Hm... while it's pretty hard, you can usually turn pygame code into a creator-defined displayable. Although it will often be much better/faster if you use Ren'Py to load and render things, rather than using pygame.image.

https://www.renpy.org/doc/html/udd.html
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
Software > Drama • https://www.patreon.com/renpytom

User avatar
Empish
Veteran
Posts: 221
Joined: Thu Jan 14, 2016 9:52 pm
Projects: Efemural Hearts, It Ends With Graduation
itch: empish
Contact:

Re: Porting from pygame to renpy

#3 Post by Empish »

Okay, this looks like I should be able to use it. Thanks!

Post Reply

Who is online

Users browsing this forum: Andredron