I got pretty close.
Drawing in Ren'Py
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.
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.
-
- Regular
- Posts: 111
- Joined: Fri Oct 11, 2013 12:46 am
- Contact:
- MaydohMaydoh
- Regular
- Posts: 165
- Joined: Mon Jul 09, 2018 5:49 am
- Projects: Fuwa Fuwa Panic
- Tumblr: maydohmaydoh
- Location: The Satellite of Love
- Contact:
Re: Drawing in Ren'Py
Everyone should draw eileens.
- Kinmoku
- Miko-Class Veteran
- Posts: 591
- Joined: Mon Aug 11, 2014 9:39 am
- Completed: One Night Stand
- Projects: VIDEOVERSE
- Tumblr: gamesbykinmoku
- itch: kinmoku
- Location: Germany
- Contact:
Re: Drawing in Ren'Py
Oh my God these are all amazing! I'd almost given up on the idea, but now I'll give it a go So cool
- Kinmoku
- Miko-Class Veteran
- Posts: 591
- Joined: Mon Aug 11, 2014 9:39 am
- Completed: One Night Stand
- Projects: VIDEOVERSE
- Tumblr: gamesbykinmoku
- itch: kinmoku
- Location: Germany
- Contact:
Re: Drawing in Ren'Py
Question: How do I set the default "line_width" from 1 to 8, without having to use buttons. I'm not planning on having the choice of line thickness.
Another Question: Can you create a "Save canvas" button and use the saved drawing elsewhere in the game?
Thanks!
Another Question: Can you create a "Save canvas" button and use the saved drawing elsewhere in the game?
Thanks!
- MaydohMaydoh
- Regular
- Posts: 165
- Joined: Mon Jul 09, 2018 5:49 am
- Projects: Fuwa Fuwa Panic
- Tumblr: maydohmaydoh
- Location: The Satellite of Love
- Contact:
Re: Drawing in Ren'Py
If you're using Human Bolt Diary's example, in the FreehandCanvas init, there's a line_width variable. That controls the line width. If you're building from scratch you don't need line_width and can just give the width to the render directly.
Just change the self.line_width with whatever width you want.
Code: Select all
render.canvas().lines(self.colour, False, self.lines, self.line_width)
- Kinmoku
- Miko-Class Veteran
- Posts: 591
- Joined: Mon Aug 11, 2014 9:39 am
- Completed: One Night Stand
- Projects: VIDEOVERSE
- Tumblr: gamesbykinmoku
- itch: kinmoku
- Location: Germany
- Contact:
Re: Drawing in Ren'Py
Ah great, thank you! I was looking all over for where to edit it. I kept getting crashes ^^;MaydohMaydoh wrote: ↑Fri Aug 24, 2018 11:09 am If you're using Human Bolt Diary's example, in the FreehandCanvas init, there's a line_width variable. That controls the line width. If you're building from scratch you don't need line_width and can just give the width to the render directly.Just change the self.line_width with whatever width you want.Code: Select all
render.canvas().lines(self.colour, False, self.lines, self.line_width)
How can I save the drawings?
- MaydohMaydoh
- Regular
- Posts: 165
- Joined: Mon Jul 09, 2018 5:49 am
- Projects: Fuwa Fuwa Panic
- Tumblr: maydohmaydoh
- Location: The Satellite of Love
- Contact:
Re: Drawing in Ren'Py
You set screenshot crop to the size of the canvas
https://www.renpy.org/doc/html/config.h ... nshot_crop
and make a button that calls the Screenshot function
I plan to add something like that eventually.
Simple example
I thought Screenshot was a screen action because it was capitalised but apparently it isn't and I ended up with over 200 screenshots...
https://www.renpy.org/doc/html/config.h ... nshot_crop
and make a button that calls the Screenshot function
I plan to add something like that eventually.
Simple example
Code: Select all
define config.screenshot_crop = (0, 0, 500, 500)
screen canvas():
## drawing stuff here ##
textbutton "Save" action Function(Screenshot())
- Kinmoku
- Miko-Class Veteran
- Posts: 591
- Joined: Mon Aug 11, 2014 9:39 am
- Completed: One Night Stand
- Projects: VIDEOVERSE
- Tumblr: gamesbykinmoku
- itch: kinmoku
- Location: Germany
- Contact:
Re: Drawing in Ren'Py
Haha! Good to know.MaydohMaydoh wrote: ↑Fri Aug 24, 2018 12:23 pm I thought Screenshot was a screen action because it was capitalised but apparently it isn't and I ended up with over 200 screenshots...
Thanks for the help, anyway. I'm going to try this out properly next week and get it working! I'm so excited I can do my idea now, hehe!
Re: Drawing in Ren'Py
cool! a lot of ideas arose:
Mini game - paint the sketch
draw on the school chalk board
color and draw your character, draw your game
in rpg draw your coat of arms, and a whole bunch of options!
Mini game - paint the sketch
draw on the school chalk board
color and draw your character, draw your game
in rpg draw your coat of arms, and a whole bunch of options!
Renpy textbook (in Russian). https://disk.yandex.ru/i/httNEajU7iFWHA (all information is out of date) Update 22.06.18
Sawa - a game of the Drow Nation
Honest Critique
Poses in visual novels, or how to hold a character properly in the frame
Help save articles to the webarchive. [/color]
Sawa - a game of the Drow Nation
Honest Critique
Poses in visual novels, or how to hold a character properly in the frame
Help save articles to the webarchive. [/color]
Re: Drawing in Ren'Py
Hello! I know this thread has been inactive for a long time so I don't know if this is still being worked on.
First of all this is very helpful and close to what I want in my game.
Did anyone find a way to save the image, not just as a screenshot for the player, but to display it in the game?
I want the player to draw something for fun and the drawing is displayed at a later point in the game.
This must have to work even if the player has closed the game in the meantime.
The drawing will also have to be resized to not take up the space that it needed when it was drawn.
Does anyone think that this is even possible?
First of all this is very helpful and close to what I want in my game.
Did anyone find a way to save the image, not just as a screenshot for the player, but to display it in the game?
I want the player to draw something for fun and the drawing is displayed at a later point in the game.
This must have to work even if the player has closed the game in the meantime.
The drawing will also have to be resized to not take up the space that it needed when it was drawn.
Does anyone think that this is even possible?
- Imperf3kt
- Lemma-Class Veteran
- Posts: 3794
- Joined: Mon Dec 14, 2015 5:05 am
- itch: Imperf3kt
- Location: Your monitor
- Contact:
Re: Drawing in Ren'Py
If you save it as a screenshot, you can then reference that screenshot as a file. I couldn't say how exactly without digging into the documentation (I'm afraid I don't currently have any time to spare)
I would assume as long as you know what the screenshot saves as and where, you can use it as a normal image, possibly using some python to check the image actually exists, just incase the image doesn't exist, so the game doesn't crash when reaching that part.
I would assume as long as you know what the screenshot saves as and where, you can use it as a normal image, possibly using some python to check the image actually exists, just incase the image doesn't exist, so the game doesn't crash when reaching that part.
Warning: May contain trace amounts of gratuitous plot.
pro·gram·mer (noun) An organism capable of converting caffeine into code.
Current project: GGD Mentor
Twitter
pro·gram·mer (noun) An organism capable of converting caffeine into code.
Current project: GGD Mentor
Re: Drawing in Ren'Py
Thank you so much for letting me know!Imperf3kt wrote: ↑Wed Dec 15, 2021 4:49 am If you save it as a screenshot, you can then reference that screenshot as a file. I couldn't say how exactly without digging into the documentation (I'm afraid I don't currently have any time to spare)
I would assume as long as you know what the screenshot saves as and where, you can use it as a normal image, possibly using some python to check the image actually exists, just incase the image doesn't exist, so the game doesn't crash when reaching that part.
I will look into this in the documentation and I might even be able to post a solution if I find one, in case anyone else wants to try it.
EDIT: I found this topic which pretty much sums up how it's done.
My problem is solved!
- Gabmag
- Regular
- Posts: 76
- Joined: Wed Sep 19, 2018 10:49 pm
- Completed: A Date with Death, The Divine Speaker, start;again, Amelie, The Sun and the Moon
- Projects: Dreambound
- Organization: Two and a Half Studios
- IRC Nick: Gabmag
- Location: Australia
- Contact:
Re: Drawing in Ren'Py
Thanks everyone for the great tips and tricks for drawing in Ren'py - would anyone know the best way to make the images persistent? E.g, I want to use the drawing tool as a "notepad" of sorts. If I don't reload the game, then the drawings stay in the screen, but upon saving and reloading I'm guessing the list becomes blank again and the images are gone.
EDIT: Nevermind, I got it working how I wanted!
EDIT: Nevermind, I got it working how I wanted!
i make games sometimes, other times i cry.
Re: Drawing in Ren'Py
Hello! I know this thread is very old, but I was wondering if anyone could help? When ever I click start, I get this error:
I try adding a circle icon png file, but that doesn't fix the issue. Any help would be great!
Code: Select all
I'm sorry, but an uncaught exception occurred.
While loading <'Image' u'circle_icon.png'>:
File "game/script.rpy", line 97, in script
call screen freehand_draw
File "renpy/common/000statements.rpy", line 569, in execute_call_screen
store._return = renpy.call_screen(name, *args, **kwargs)
IOError: Couldn't find file 'circle_icon.png'.
-- Full Traceback ------------------------------------------------------------
Full traceback:
File "game/script.rpy", line 97, in script
call screen freehand_draw
File "renpy/ast.py", line 2015, in execute
self.call("execute")
File "renpy/ast.py", line 2003, in call
return renpy.statements.call(method, parsed, *args, **kwargs)
File "renpy/statements.py", line 278, in call
return method(parsed, *args, **kwargs)
File "renpy/common/000statements.rpy", line 569, in execute_call_screen
store._return = renpy.call_screen(name, *args, **kwargs)
File "renpy/exports.py", line 3134, in call_screen
rv = renpy.ui.interact(mouse="screen", type="screen", roll_forward=roll_forward)
File "renpy/ui.py", line 298, in interact
rv = renpy.game.interface.interact(roll_forward=roll_forward, **kwargs)
File "renpy/display/core.py", line 3315, in interact
repeat, rv = self.interact_core(preloads=preloads, trans_pause=trans_pause, pause=pause, pause_start=pause_start, **kwargs)
File "renpy/display/core.py", line 3834, in interact_core
self.draw_screen(root_widget, fullscreen_video, (not fullscreen_video) or video_frame_drawn)
File "renpy/display/core.py", line 2555, in draw_screen
renpy.config.screen_height,
File "render.pyx", line 492, in renpy.display.render.render_screen
File "render.pyx", line 263, in renpy.display.render.render
File "renpy/display/layout.py", line 824, in render
surf = render(child, width, height, cst, cat)
File "render.pyx", line 170, in renpy.display.render.render
File "render.pyx", line 263, in renpy.display.render.render
File "renpy/display/layout.py", line 824, in render
surf = render(child, width, height, cst, cat)
File "render.pyx", line 170, in renpy.display.render.render
File "render.pyx", line 263, in renpy.display.render.render
File "renpy/display/layout.py", line 824, in render
surf = render(child, width, height, cst, cat)
File "render.pyx", line 170, in renpy.display.render.render
File "render.pyx", line 263, in renpy.display.render.render
File "renpy/display/screen.py", line 688, in render
child = renpy.display.render.render(self.child, w, h, st, at)
File "render.pyx", line 170, in renpy.display.render.render
File "render.pyx", line 263, in renpy.display.render.render
File "renpy/display/layout.py", line 824, in render
surf = render(child, width, height, cst, cat)
File "render.pyx", line 170, in renpy.display.render.render
File "render.pyx", line 263, in renpy.display.render.render
File "renpy/display/layout.py", line 1027, in render
surf = render(d, width - x, rh, cst, cat)
File "render.pyx", line 170, in renpy.display.render.render
File "render.pyx", line 263, in renpy.display.render.render
File "renpy/display/layout.py", line 985, in render
surf = render(d, rw, height - y, cst, cat)
File "render.pyx", line 170, in renpy.display.render.render
File "render.pyx", line 263, in renpy.display.render.render
File "renpy/display/layout.py", line 1027, in render
surf = render(d, width - x, rh, cst, cat)
File "render.pyx", line 170, in renpy.display.render.render
File "render.pyx", line 263, in renpy.display.render.render
File "renpy/display/behavior.py", line 791, in render
rv = super(Button, self).render(width, height, st, at)
File "renpy/display/layout.py", line 1254, in render
st, at)
File "render.pyx", line 170, in renpy.display.render.render
File "render.pyx", line 263, in renpy.display.render.render
File "renpy/display/im.py", line 623, in render
return cache.get(self, render=True)
File "renpy/display/im.py", line 287, in get
surf = image.load()
File "renpy/display/im.py", line 704, in load
raise e
IOError: Couldn't find file 'circle_icon.png'.
Windows-10-10.0.19041
Ren'Py 7.4.10.2178
ggfg 1.0
Fri Mar 18 15:21:37 2022
Programmer that will work paid and or for free! Message me on discord for more info at: Yuma#8158
Re: Drawing in Ren'Py
the coolest way to use in games that I've seen
Renpy textbook (in Russian). https://disk.yandex.ru/i/httNEajU7iFWHA (all information is out of date) Update 22.06.18
Sawa - a game of the Drow Nation
Honest Critique
Poses in visual novels, or how to hold a character properly in the frame
Help save articles to the webarchive. [/color]
Sawa - a game of the Drow Nation
Honest Critique
Poses in visual novels, or how to hold a character properly in the frame
Help save articles to the webarchive. [/color]
Who is online
Users browsing this forum: Ocelot, piinkpuddiin