create a Pygame visual novel that's NOT with renpy

Viewed 3110

I've trying to find a way for me to learn how to make a visual-novel like game in python/pygame WITHOUT using renpy. I have a few games that I written with pygame and I want to use that visual-novel part as a transition for the games in one whole bigger single game. I have searched a whole lot before coming here confused to why there is not a way to make a visual-novel type game without renpy in pygame.

I have a piece of code written down but if I were to display a line and the next, I would have to repeat the same code around forty times. How could I condense the code down and allow the player to actually click to get to the next text set (instead of waiting for three seconds like in the sample)?

Relevant sample code:

def two():
    screen.blit(bg,bg_rect)
    draw_text(screen, "C:", 26, width / 3, 426)
    draw_text(screen, "R, it's this.", 22, width / 2, 466)
    pg.display.flip()
    time.sleep(3)
    for event in pg.event.get():
        if event.type == pg.QUIT:
            pg.QUIT()

def one():
    screen.blit(bg, bg_rect)
    draw_text(screen, "R:", 26, width / 3, 426)
    draw_text(screen, "C, don't think.", 22, width / 2, 466)
    pg.display.flip()
    time.sleep(3)
    for event in pg.event.get():
        if event.type == pg.QUIT:
            pg.QUIT() 
        else: 
            two()

running = True
game_over = True
while running:
    if game_over:
        show_menu()
        one()
        two()

Thanks for sticking with me ;-;

1 Answers
Related