Lemma Soft Forums

Supporting creators of visual novels and story-based games since 2003.


Visit our new games list, blog aggregator, IRC channel, and Discord (new).
Activation problem? Email pytom@bishoujo.us.
It is currently Fri Mar 24, 2017 5:56 pm

All times are UTC - 5 hours [ DST ]


Forum rules


This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like, and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.



Post new topic Reply to topic  [ 33 posts ]  Go to page 1, 2, 3  Next
Author Message
 Post subject: Ren'Py @ 5: Version 1
PostPosted: Fri Jan 30, 2009 8:22 pm 
Ren'Py Creator
User avatar

Joined: Mon Feb 02, 2004 10:58 am
Posts: 14560
Location: Kings Park, NY
Completed: Moonlight Walks
Projects: Ren'Py
IRC Nick: renpytom
Twitter: @renpytom
Github: renpytom
itch.io: renpytom
So, knowing that Ren'Py was nearly 5 year old, I went ahead and looked through my files. And as best as I can tell, the oldest files I had was created on January 30th, 2004... 5 years ago today.

These files belong to Ren'Py version 1, which I never released publicly. This first version of Ren'Py really emphasized the Py portion of the name, with Ren'Py being essentially a set of Python libraries that made making Visual Novels, which I was calling Ren'Ai games back then, easier.

Basically, the way Ren'Py 1 worked was that what we'd call labels now were Python functions, which contained calls to other python functions to show and hide dialogue, and do the other things involved with displaying a visual novel. It's fair to say that this would be a very high-overhead language compared to modern Ren'Py.

Still, it included many of the features that we see on today's Ren'Py. The simple "game" that I wrote to test the engine includes equivalents to the scene, show, and hide statements. Show also had the current behavior of replacing a currently showing image, so it was easy to change emotions. The engine includes the ability to display menus, and to prompt the user for text like the renpy.input statement does now.

There was a Character object back then, but the use of the object was to organize images, rather than dialogue.

If I remember correctly, Ren'Py v1 took me a day or two to design, and one day to code. I abandoned it just as quickly, when I realized that it wouldn't be possible to make satisfying load and save code using Python only. I recycled some of the code into Ren'Py v2-3, and at least a little bit of it survived pretty much intact to today, such as the equivalent to the Frame displayable.

To celebrate 5 years, I'm posting a few screenshots, the example script, and the complete source code to Ren'Py 1. The latter includes a small fix so that it runs on my Ubuntu box. It requires pygame and numpy to run, and I've never tested it on Windows or Mac, so you'd be on your own there. You run it using the command:

Code:
python main.py game1


It doesn't seem to support the mouse, only the keyboard.

Thanks go to Lemma, who created this forum, made Tales of Lemma 1, and gave me permission to use his Miko art in the demo. If he hadn't done these things, it would have been less likely that Ren'Py would have gotten going.

If anyone shows the slightest degree of interest, I'm considering posting a series of Ren'Py @ 5 messages between now and the 5th anniversary of the initial release of Ren'Py 4, the current codebase.


Attachment:
File comment: The first dialogue screen.
Screenshot-pygame window.png
Screenshot-pygame window.png [ 368.74 KiB | Viewed 2167 times ]

Attachment:
Screenshot-pygame window-1.png
Screenshot-pygame window-1.png [ 366.46 KiB | Viewed 2150 times ]

Attachment:
Screenshot-pygame window-2.png
Screenshot-pygame window-2.png [ 369.54 KiB | Viewed 2160 times ]


Complete Ren'Py v1 Demo Game source code:
Code:
from renpy.locals import *

screen_width = 640
screen_height = 480
box_image = "box.png"
box_border = 15
box_vpadding = 6
box_hpadding = 15
line_height_fudge = -2
line_height_newline = 2
vbox_margin = 1
default_box_minheight = 125

text_color = (255, 255, 255, 255)
choice_color = (0, 255, 255, 255)
selected_color = (255, 255, 0, 255)

message_cps = 0
font_file = "/usr/share/fonts/truetype/freefont/FreeSans.ttf"
font_size = 16

say_width = screen_width - 10
say_yoffset = -5
say_label_width = 150

menu_width = screen_width - 10
menu_yoffset = -5

cmenu_width = screen_width / 2
prompt_width = int(0.75 * screen_width)


def img(n):
    return image("lemma/Char%d.png" % n, key=[255, 0, 255])


store1 = image("s1.jpg")
dark = image("dark.jpg")

miko_images = {
    'happy' : img(1),
    'vhappy' : img(2),
    'sad' : img(3),
    'mad' : img(4),
    'question' : img(5),
    'tounge' : img(6),
    'sweat' : img(7),
    }

miko = Character(miko_images)
miko.name = "Miko"


def start_scene():
    scene(store1)

    show(miko, 'happy')
    say(miko, "Hi, I'm Miko! What's your name?")

    while True:
        global user
        user = prompt("My name is...", 16)

        if not user:
            show(miko, 'mad')
            say(miko, "Why won't you tell me?")
        else:
            break

    show(miko, 'happy')

    say(miko, "Good to meet you, %s." % user)
   
    menu("Where do you want to go?",
         ('The movies', movies_scene),
         ('The moon', start_moon))

def movies_scene():
    scene(dark)

    show(miko, 'happy')
    say(miko, "Now we're at the movies, which is why it's so very dark.")

def start_moon():

    show(miko, 'mad')
    say(miko, "I'll send you to the moon!")

def default_scene():
    scene(dark)
   
    show(miko, 'question')

    say(miko, "I don't know how we've gotten here, but we've fallen through to the default scene.")
    say(user, "How will we get out of here?")

    show(miko, 'happy')

    say(miko, "Don't worry. I'll use my magic to get us back to the start scene.")
   
    return start_scene

def console():
    import code
    ic = code.InteractiveConsole()
    ic.interact("Type python commands, or run_fragment(frag) to run a fragment.")

    return

def esc_menu():

    cmenu("Command Menu",
          "",
          ("Return to playing.", None),
          ("Go Interactive.", console),
          ("Quit.", quit))


Attachments:
renpy-v1.tar.bz2 [6.32 MiB]
Downloaded 119 times

_________________
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
Code > Drama
Top
 Profile Send private message  
 
PostPosted: Sat Jan 31, 2009 4:10 am 
Lemma-Class Veteran
User avatar

Joined: Mon Jul 21, 2008 5:41 pm
Posts: 3907
Completed: Too many! See my homepage
Projects: A lot! See www.winterwolves.com
Twitter: @pcmacgames
Tumblr: winterwolvesgames
5 years! Impressive. Funnily, about same times I started to make online games. If only I knew about it (and python) sooner... :mrgreen:

_________________
follow me on Image Image Image Image
computer games


Top
 Profile Send private message  
 
PostPosted: Sat Jan 31, 2009 6:23 am 
Miko-Class Veteran
User avatar

Joined: Mon May 08, 2006 2:49 am
Posts: 860
Completed: Blue Rose, AO: Broken Memories, My Eternal Rival, Dust
Projects: AO: Fallen Star
Organization: White Cat
IRC Nick: Vatina
Twitter: @WhiteCatGames
Tumblr: vatinyan
Deviantart: Vatina
Congratulations on 5 years! I'm very grateful that renpy came to be. It's fun to see the old pictures - good that renpy is a lot easier to use today :P

_________________
White Cat games site - Gamedev blog


Top
 Profile Send private message  
 
PostPosted: Sat Jan 31, 2009 7:09 am 
Veteran
User avatar

Joined: Fri Dec 21, 2007 2:36 pm
Posts: 224
Location: France
Happy anniversary Ren'py !

It's fun to see where the engine comes from. I'm happy you didn't drop of developpement of renpy, and that lemma showed interest so early on.

I like the screenshots too. :mrgreen:


Top
 Profile Send private message  
 
PostPosted: Sat Jan 31, 2009 7:26 am 
Regular

Joined: Tue Oct 09, 2007 7:44 pm
Posts: 115
Cool! Thanks for sharing. :D

On another note … (this is long and partly on another topic)

I'm interested in this, for other purposes, too, actually. This has inspired me to think of the following (since it used to be only modules to make making visual novels easier, I mean):

What would I need if I wanted the current Ren'Py stripped down with only the following features (accessing them entirely through Python, as Python modules, and not as a visual novel engine):
• text as it is now (i.e. the ability to output text to the screen through ui.text; also input text through exports.input)
• text styles, colors, fonts, etc. as they are now
• images as they are now
• transitions as they are now
• sound as it is now
• movies as they are now
• any other features that are best kept in (aside from those mentioned below)

I don't need the save/load stuff, nor the ability to move back and forth between different points of the game as is currently done. I don't need mouse-clicking functionality in most cases.

Would stripping it down like this and reverting it to Python modules be a lot of work, or a little? If it would be a lot of work, my alternative is to have Ren'Py as is with the save/load feature entirely disabled and non-visible (although the first method would be preferable, as it would be nice to work with Ren'Py functionality in Python without having to use the full-on visual novel engine). Is the save/load removal practical? I mean, can people do that easily or do they have to change Ren'Py itself to do it?

So, basically, I'm looking for a reasonable interface for my text adventure model. Yeah, I'm still working on it (although I had stopped for a time). I'm not using it with Ren'Py, currently (as debugging is faster in WxPython), but I do plan to reintegrate it when I'm done with all the necessary stuff (and that isn't too far off), for the curious. Complex text parsing is an interesting art (although to do a thorough job is a lot of work—but not nearly as much as people made me think it might be).

Anyway, if you're wondering why I want to use parts of Ren'Py for text adventures, it's because GUI libraries (what I'm using now, at least: WxPython; probably QT or GTK, too) and such don't as conveniently allow for dynamically manipulating rich text—or if they do, I haven't found out how, yet, and no one has responded on the forums for them. I mean, I need to have rich text in variables. Windowed GUIs tend only to allow for rich text controls (not rich text strings—and if they did, I would probably need to make my classes where the strings were manipulated to inherit from some GUI component or other, and that would be annoying). Plus, Ren'Py takes care of the other forms of media (I'm not just doing a text-only text-adventure model, although it is that, currently).

If you're wondering why I'm not satisfied with TADS or Inform7—well, lets just say I want more, and different functionality, and I think Python deserves more text adventure tools (thus Ren'Py does also). Plus, Inform7 doesn't seem to have much documentation. TADS is hard to work with without the environment. I'm not particularly fond of the typical displays the interpreters have, compared with how I've seen it on Ren'Py (for some reason, it looks way better on Ren'Py; don't ask me why or how). Anyway, I've always wanted to make my own text adventures, and I think I do better making things myself than learning someone else's way (which lacks functionality I've learned to enjoy). I'm not saying that the stuff I'm writing is perfect—the code needs to be cleaned up a lot, actually, and it does require a person to read the documentation before use, and it could be more efficient—but it's more to my liking, and feels more complete. You could actually make some nice games with it as is, but I'd rather finish working out the prepositions, and re-working some of the more complex commands and their conditions before giving it out. Oh, plus right now, it's in a third person perspective, and that isn't ideal for many cases—so I'll have to make a second person perspective, too.


Last edited by vlint on Sat Jan 31, 2009 7:45 am, edited 1 time in total.

Top
 Profile Send private message  
 
PostPosted: Sat Jan 31, 2009 7:41 am 
Hentai Poofter
User avatar

Joined: Sat Feb 04, 2006 11:13 pm
Posts: 2070
Location: Philippines
Organization: Studio Mugenjohncel
Twitter: @oelvn
Vatina wrote:
good that renpy is a lot easier to use today

Umm... Ever since Ren'py made the move to JEdit my progress has slowed down considerably since the text is way too small and much more prone to errors and typos. Is there a way to make the text 150% larger in the editor.

_________________
STUDIO MUGENJOHNCEL WEBSITE


Top
 Profile Send private message  
 
PostPosted: Sat Jan 31, 2009 7:52 am 
Regular

Joined: Tue Oct 09, 2007 7:44 pm
Posts: 115
mugenjohncel wrote:
Umm... Ever since Ren'py made the move to JEdit my progress has slowed down considerably …

I preferred SciTE, myself, too. I've never been a huge fan of GUI-based Java applications, although I'm sure this one is convenient for some. Would it be possible to give us a choice as to which we use? I actually still use SciTE, anyway (it's nice that it has its own command-line), but I miss the feature of being able to open the editor at the present code from within the game.


Top
 Profile Send private message  
 
PostPosted: Sat Jan 31, 2009 9:46 am 
Miko-Class Veteran
User avatar

Joined: Mon May 08, 2006 2:49 am
Posts: 860
Completed: Blue Rose, AO: Broken Memories, My Eternal Rival, Dust
Projects: AO: Fallen Star
Organization: White Cat
IRC Nick: Vatina
Twitter: @WhiteCatGames
Tumblr: vatinyan
Deviantart: Vatina
I changed back to scite too, so that solves the problem for me :P

_________________
White Cat games site - Gamedev blog


Top
 Profile Send private message  
 
PostPosted: Sat Jan 31, 2009 11:34 am 
Ren'Py Creator
User avatar

Joined: Mon Feb 02, 2004 10:58 am
Posts: 14560
Location: Kings Park, NY
Completed: Moonlight Walks
Projects: Ren'Py
IRC Nick: renpytom
Twitter: @renpytom
Github: renpytom
itch.io: renpytom
Does every thread have to turn into bitching about text editors?

The funny thing is that it's actually far easier to change the font in JEdit than it is in scite. In JEdit, all you need to do is to go to Utilities > Global Options > jEdit > Text Area and click on the Text font setting. (At least for me, those last two clicks are unnecessary, as the Text Area screen is the default for Global Options.)

Compare this to SciTE, where you have to edit a barely-documented text file.

And, of course, nobody bothers to propose a solution short of "We love SciTE despite it not working on the Mac. But screw Mac users!"

Grumble.

vlint >>> You might be able to get something like what you want by setting config.underlay = [ ]. But I have no plan to strip down Ren'Py this far.

_________________
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
Code > Drama


Top
 Profile Send private message  
 
PostPosted: Sat Jan 31, 2009 11:39 am 
Hentai Poofter
User avatar

Joined: Sat Feb 04, 2006 11:13 pm
Posts: 2070
Location: Philippines
Organization: Studio Mugenjohncel
Twitter: @oelvn
PyTom wrote:
In JEdit, all you need to do is to go to Utilities > Global Options > jEdit > Text Area and click on the Text font setting.


Umm... nobody taught me that... let's see... OH! IT'S BIG NOW! Thanks!!!

"POOF" (Disappears... another half-blind man walks happy!)

_________________
STUDIO MUGENJOHNCEL WEBSITE


Top
 Profile Send private message  
 
PostPosted: Sat Jan 31, 2009 2:52 pm 
Miko-Class Veteran

Joined: Fri Aug 18, 2006 4:51 pm
Posts: 541
Would be nice to put that renpy's history in the main site, it would show how far it has gone, also tidbits and comments about the development progress would be appreciated.


Top
 Profile Send private message  
 
PostPosted: Sat Jan 31, 2009 8:42 pm 
Regular
User avatar

Joined: Fri Jun 29, 2007 10:50 am
Posts: 129
Location: Albuquerque, New Mexico, USA
Wow. 5 whole years! GO RENPY!

_________________
President, Planner, and Programmer for Kuroi Games!


Top
 Profile Send private message  
 
PostPosted: Sat Jan 31, 2009 10:29 pm 
Regular

Joined: Tue Oct 09, 2007 7:44 pm
Posts: 115
PyTom wrote:
Does every thread have to turn into … about text editors?

:oops: Sorry for contributing to that. I didn't know this was a trend (I haven't been paying attention to the forums in a while.) I wasn't aware of the Mac issue, either. I might argue the barely documented text file-thing for SciTE, though (having used the online docs a fair amount), but I won't argue that it can be a hassle to figure out (I mean, that you have to figure it out is the hassle—and not everyone will).

PyTom wrote:
vlint >>> You might be able to get something like what you want by setting config.underlay = [ ]. But I have no plan to strip down Ren'Py this far.

Thanks for the tip! :)


Top
 Profile Send private message  
 
PostPosted: Sun Feb 01, 2009 11:16 am 
Lemma-Class Veteran
User avatar

Joined: Tue Aug 01, 2006 12:39 pm
Posts: 4171
It would be great if you mentioned significant events which propped up Ren'Py's image and / or development.

e.g. July 31, 2006. The Blade Engine was released and news even reached slashdot and animesuki, a whole new range of potential users. After tooling around for one week, many users gave up and sought an alternative engine, where they came upon Ren'Py.
(I'm pretty sure I'm not the only veteran from the 'Blade Engine generation')


Top
 Profile Send private message  
 
PostPosted: Sun Feb 01, 2009 12:35 pm 
Lemma-Class Veteran
User avatar

Joined: Mon Jul 21, 2008 5:41 pm
Posts: 3907
Completed: Too many! See my homepage
Projects: A lot! See www.winterwolves.com
Twitter: @pcmacgames
Tumblr: winterwolvesgames
Well I think in this past year (2008) renpy got really lots of attention from indie/non indie games developers, "immodestly" thanks to games like Summer Session & Heileen (and of course future ones that other people will make of same quality).
Getting featured on yahoo, gamasutra, rockpapershotgun, macworld, apple.com, and so many others that I have lost track, is something that surely made Renpy known to millions of potential new users 8)

_________________
follow me on Image Image Image Image
computer games


Top
 Profile Send private message  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 33 posts ]  Go to page 1, 2, 3  Next

All times are UTC - 5 hours [ DST ]


Who is online

Users browsing this forum: Bing [Bot], Google [Bot], Majestic-12 [Bot]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Protected by Anti-Spam ACP
Powered by phpBB® Forum Software © phpBB Group