Search found 238 matches

by drKlauz
Thu Oct 01, 2020 11:48 am
Forum: Ren'Py Questions and Announcements
Topic: Menu from another label
Replies: 10
Views: 571

Re: Menu from another label

Well, i'm not sure it is best way, but as long as it works for you... :D
by drKlauz
Wed Sep 30, 2020 4:01 pm
Forum: Ren'Py Questions and Announcements
Topic: [SOLVED]Finding X and Y Coordinates
Replies: 4
Views: 3091

Re: Finding X and Y Coordinates

I use this default show_mouse_pos_info=False init python: class DevtoolMouseposDisplayable(renpy.Displayable): def render(self,width,height,st,at): tr=Text("{}x{}".format(*renpy.get_mouse_pos()),color="#F00",font="DejaVuSans.ttf").render(width,height,st,at) bgr=Solid(&q...
by drKlauz
Wed Sep 30, 2020 12:47 pm
Forum: Ren'Py Questions and Announcements
Topic: Menu from another label
Replies: 10
Views: 571

Re: Menu from another label

list+=list will extend first list with second's values, so [1,2,3]+[4,5] will be [1,2,3,4,5]
list.append(list) with add second list to first as single element, so [1,2,3].append([4,5]) will be [1,2,3,[4,5]]
list+=tuple works same way.

Can you show example of list+=list working as you said?
by drKlauz
Tue Sep 29, 2020 12:02 pm
Forum: Ren'Py Questions and Announcements
Topic: Menu from another label
Replies: 10
Views: 571

Re: Menu from another label

display_menu will show menu even if you set interact=False, it is different thing, mostly used to show more than just menu before you start interaction. If by checking you mean adding (or not adding) choices depending on conditions, then you just want to replace park_questions+npc_questions with act...
by drKlauz
Tue Sep 29, 2020 9:18 am
Forum: Ren'Py Questions and Announcements
Topic: Menu from another label
Replies: 10
Views: 571

Re: Menu from another label

If you need to combine menus often, renpy.display_menu may be useful. https://www.renpy.org/doc/html/statement_equivalents.html#renpy.display_menu python: park_questions=[ ["Weather","talk_about_weather"], ["Nature","talk_about_nature"], ] npc_questions=[ [&qu...
by drKlauz
Wed Sep 16, 2020 10:23 am
Forum: I am a Programmer, Director, or Other
Topic: [BUSY] Programming
Replies: 13
Views: 4283

Re: [AVAILABLE] Programming

Got free time slots - available.
by drKlauz
Wed Sep 02, 2020 9:34 am
Forum: Ren'Py Questions and Announcements
Topic: Save Ren'py game as single .exe file?
Replies: 6
Views: 1187

Re: Save Ren'py game as single .exe file?

You can make web version and send link to it. No need to download and run things, everything is in browser. Tho that loading time...
by drKlauz
Mon Aug 24, 2020 4:50 pm
Forum: Ren'Py Questions and Announcements
Topic: (Solved) Compiling Python as C -> .os / .dll, and using in Ren'Py?
Replies: 12
Views: 844

Re: Compiling Python as C -> .os / .dll, and using in Ren'Py

No one will steal your code. People sometimes steal art, very rarely they even reuse it to release another game. Code is pointless to steal, if thief know how to steal he probably code it faster himself, if thief don't know how to code himself then he fail to steal/reuse properly. Someone have to sa...
by drKlauz
Fri Aug 14, 2020 10:51 am
Forum: General Discussion
Topic: Moving sprites with keyboard inputs
Replies: 4
Views: 5992

Re: Moving sprites with keyboard inputs

Code: Select all

init python:
  import pygame
After this pygame will be available to every rpy file. Keep in mind tho, this pygame is not exactly real pygame :D Some stuff may be missing, but for most use cases it is more than enough.
by drKlauz
Fri Aug 14, 2020 9:10 am
Forum: General Discussion
Topic: Moving sprites with keyboard inputs
Replies: 4
Views: 5992

Re: Moving sprites with keyboard inputs

I did side-scroller in renpy, used custom displayable, in render method i polled keyboard and gamepad state and updated pc and camera positions. Keyboard was polled by pygame.key.get_pressed() call - https://www.pygame.org/docs/ref/key.html#pygame.key.get_pressed If you don't want to dive deep and d...
by drKlauz
Tue Aug 11, 2020 6:57 pm
Forum: Ren'Py Questions and Announcements
Topic: Is this code ineffecient?
Replies: 1
Views: 288

Re: Is this code ineffecient?

if/elif's are executed at start of interaction, which is not every frame, so it is surely ok. Keys checked when input event occurs, this is again not every frame, so it should be fine too. While i usually place screen-specific keys inside that screen, i can see how it can be convenient to have all k...
by drKlauz
Tue Aug 11, 2020 4:20 am
Forum: Ren'Py Questions and Announcements
Topic: Is Digitally Signing EXE Required?
Replies: 10
Views: 779

Re: Is Digitally Signing EXE Required?

If you change exe icon your binary is changed, if binary is changed then digital signature become invalid, if digital signature is invalid then at best it is treated as non-existent, at worst as if exe was tampered by malware. Plus more and more systems flag unsigned binaries as "potential malw...
by drKlauz
Fri Aug 07, 2020 2:29 pm
Forum: Ren'Py Questions and Announcements
Topic: Is there a way to let the user choose his game resolution?
Replies: 4
Views: 438

Re: Is there a way to let the user choose his game resolution?

I guess you can ask resolution at start, save width/height into persistents and then restart game, replacing gui.init(1920,1080) with gui.init(read width/height from persistents or use sane defaults here). Tho this may break game ui, some saves and generally make game unplayable. I suggest going sin...
by drKlauz
Thu Aug 06, 2020 12:54 pm
Forum: Ren'Py Questions and Announcements
Topic: [SOLVED] How to add a sound effect on screen load
Replies: 2
Views: 291

Re: How to add a sound effect on screen load

Code: Select all

on "show" action Play("audio", "sounds/notification.wav", selected=False)
Channel is string id, you send audio module instead.
by drKlauz
Thu Jul 30, 2020 1:07 am
Forum: Ren'Py Questions and Announcements
Topic: Problems with the class method on return(bound method) [SOLVED]
Replies: 1
Views: 273

Re: Problems with the class method on return(bound method)

Code: Select all

    @property
    def OutPut(self):
      ...
This should work.
Problem is when you write [calendar.OutPut] you ask for attribute OutPut, which is bound method and it is printed, not called. By turning method into property you force [calendar.OutPut] to actually call method and print result.