splashscreen

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.
Message
Author
saru
Regular
Posts: 27
Joined: Mon Apr 18, 2005 7:05 am
Location: Maeklong , Thailand
Contact:

splashscreen

#1 Post by saru »

i try to make title look like Moonlight Walks :D

i copy label splashscreen: into mainmenu.rpy
label splashscreen:
scene black
show text "rouch7 Presents...' with fade
$ renpy.pause(1.0)
hide text with fade

return
is it all right?

thx :D

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: splashscreen

#2 Post by PyTom »

saru wrote:i try to make title look like Moonlight Walks :D

i copy label splashscreen: into mainmenu.rpy
You should never touch any of the files in the common/ directory. I update these files on every release, so you should keep your changes in the game directory so they are not overwritten.

Code: Select all

 label splashscreen:
scene black
show text "rouch7 Presents...' with fade
$ renpy.pause(1.0)
hide text with fade

return
Well, you should keep the code in script.rpy. But assuming what you want is to fade in "rouch7 presents..." on a black screen, and then fade it out again, that will work. Actually, since you're going to and from a black screen, it's probably better to use dissolve.

Code: Select all

label splashscreen:
    scene black 
    show text "rouch7 presents...' with dissolve
    $ renpy.pause(1.0)
    hide text with dissolve
    
    return
The code for the splashscreen in moonlight walks is below... It does a pan down an image, while dissolving in and out another image. I don't reccomend it... doing a pan and a dissolve at the same time is probably too expensive, and leads to an inconsistent framerate.

Code: Select all


label splashscreen:

    scene black
    with None

    scene bigbeach1 at Pan((0, 300), (0, 1200), 9.0)

    if renpy.with(dissolve):
        jump end_splash

    # .5

    show presents at Position(yanchor='center', ypos=0.5)

    if renpy.with(slowdissolve):
        jump end_splash

    # 1.5 s

    if renpy.pause(2.5):
        jump end_splash

    # 4.0 s

    hide presents

    if renpy.with(slowdissolve):
        jump end_splash

    # 5.0 s

    if renpy.pause(4.0):
        jump end_splash

    # 9.0 s


label end_splash:

    $ renpy.music_start('waves.ogg')
    $ renpy.transition(slowdissolve)

    return
Slowdissolve is a dissolve that takes longer than usual. bigbeach1 is an image that is 1200 pixels high, giving a starfield and eventually the beach below. presents is an image saying "American Bishoujo presents...".

The point of the if statements is to jump to the end of the splashscreen if the user clicks during a pause or transition.

Hm... should I just release the script to moonlight walks, as an example? What do people think?
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
mikey
Lemma-Class Veteran
Posts: 3249
Joined: Sat Jan 10, 2004 6:03 am
itch: atpprojects
Contact:

Re: splashscreen

#3 Post by mikey »

PyTom wrote:Hm... should I just release the script to moonlight walks, as an example? What do people think?
That's an interesting question. I see nothing wrong with it.

Personally though, I'd like to see all the effects Ren'Py offers, like you used to do in the Demo Game, which isn't updated anymore. People would be able to see all that in action, while having a script.

It's a tough call though, because I can imagine doing a demo game with every new effect or transition can be tiring as Ren'Py seems to be moving faster than its tutorials/examples. It's logical in a way. On the other hand developers can then see what the effect will look like.

Perhaps there could be some code snippets for download for the various effects so that everyone could see for themselves?

Sheesh, I'm not much of a help here... But should you choose to release the full script of MW, I am sure to be tempted to translate it into Slovak ^_^ ... (once I finish what needs to be finished...)

chronoluminaire
Eileen-Class Veteran
Posts: 1153
Joined: Mon Jul 07, 2003 4:57 pm
Completed: Elven Relations, Cloud Fairy, When I Rule The World
Tumblr: alextfish
Skype: alextfish
Location: Cambridge, UK
Contact:

Re: splashscreen

#4 Post by chronoluminaire »

PyTom wrote:Hm... should I just release the script to moonlight walks, as an example? What do people think?
I know I've thought of releasing the WIRTW code, so that I can illustrate points with it in answering questions. I didn't use much fancy techniques, but one man's basics are another's fancy techniques. The MW source would probably make more sense, being an official American Bishoujo release. It might be cool :)

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: splashscreen

#5 Post by PyTom »

Okay, I think I will release the MW script, once I get a chance to clean it up a little and comment it better. It's actually less complex then the demo, as it's a simpler game rather than a way of exercising the engine. Still, I do some things in there that I don't do in the engine... so it's probably worth doing.

mikey wrote:Personally though, I'd like to see all the effects Ren'Py offers, like you used to do in the Demo Game, which isn't updated anymore. People would be able to see all that in action, while having a script.
Hm... what effects is the demo game missing? Offhand, I can only think of various types of motion, the pixellate transition not being explicitly mentioned, and a few more variants of cropmove.

A problem is Ren'Py is fundamentally a language, and as such there's far more it can express than can be given as an example in the demo.
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
mikey
Lemma-Class Veteran
Posts: 3249
Joined: Sat Jan 10, 2004 6:03 am
itch: atpprojects
Contact:

Re: splashscreen

#6 Post by mikey »

PyTom wrote:Hm... what effects is the demo game missing? Offhand, I can only think of various types of motion, the pixellate transition not being explicitly mentioned, and a few more variants of cropmove.
That's them ^_^. I just liked the way various movements were presented that I wanted to see the others in action as well...

Guest

Re: splashscreen

#7 Post by Guest »

PyTom wrote:Hm... should I just release the script to moonlight walks, as an example? What do people think?
As someone who hasn't played the game yet, I'd say no... keep the source under wraps for the most part... but don't be afraid to use non-spoiler code bits as examples.

Just my two Lincoln-headed coins' worth.

P.W.

PixelWrangler
Regular
Posts: 103
Joined: Wed Mar 16, 2005 11:00 pm
Location: Swimming in the sea of electronic dots
Contact:

Re: splashscreen

#8 Post by PixelWrangler »

Guest (PixelWrangler) wrote:
PyTom wrote:Hm... should I just release the script to moonlight walks, as an example? What do people think?
As someone who hasn't played the game yet, I'd say no... keep the source under wraps for the most part... but don't be afraid to use non-spoiler code bits as examples.

Just my two Lincoln-headed coins' worth.

P.W.
Agh... forgot to log in. Anyway, adding to that, one thing I'd like to see (eventually) is a comprehensive Ren'Py Object Model, covering all of the objects and attributes. The manual already does this to a certain extent, but it could be taken to the next level.

Of course, this may need to wait until the object structure is brought to a more "permanent" state...

Just a thought.

P.W.
Life is hard.
Except in ren'ai games.
Then it's a whole lot softer.

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: splashscreen

#9 Post by PyTom »

PixelWrangler wrote: Agh... forgot to log in. Anyway, adding to that, one thing I'd like to see (eventually) is a comprehensive Ren'Py Object Model, covering all of the objects and attributes. The manual already does this to a certain extent, but it could be taken to the next level.
I'm not sure what you mean by this. In general, the Ren'Py user shouldn't care about the attributes of objects, but instead should care mostly about constructor arguments and the like. (The exception is style properties... but those are fairly well documented.)

Documentation like that might help people understand the inner workings of Ren'Py, but so far I haven't had many people interested in that. (I'd probably work on improving the pydocs rather than trying to write another manual.)

I don't see protecting people from themselves as a good reason to keep the code under wraps.

(Random FYI: I just implemented a new move transition that moves images that have switched position, and am now working on making the demo somewhat more comprehensive.)
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

Megaman Z
Miko-Class Veteran
Posts: 829
Joined: Sun Feb 20, 2005 8:45 pm
Projects: NaNoRenO 2016, Ren'Py tutorial series
Location: USA
Contact:

Re: splashscreen

#10 Post by Megaman Z »

PyTom wrote:
PixelWrangler wrote: Agh... forgot to log in. Anyway, adding to that, one thing I'd like to see (eventually) is a comprehensive Ren'Py Object Model, covering all of the objects and attributes. The manual already does this to a certain extent, but it could be taken to the next level.
I'm not sure what you mean by this...
I think he means something like taking the character declaration statement ["character([whatever the arguements are])"], and explaining each of the arguements individually, allowing the reader to see exactly what does what, and extending said documentation to... *loading train of thought... please wait... thanks for waiting!* maybe some basic Python script (like the dayplanner that I'd like to see actually used in a game!). I dunno, because [I've learned] I'm not PixelWrangler, and therefore cannot share his thought processes. (not that I think he has many... don't hurt me!)

(please excuse me while I kill my internet connection for a minute to nail the pop-up program that's hidden somewhere on my computer...)
~Kitsune Zeta

PixelWrangler
Regular
Posts: 103
Joined: Wed Mar 16, 2005 11:00 pm
Location: Swimming in the sea of electronic dots
Contact:

Re: splashscreen

#11 Post by PixelWrangler »

Megaman Z wrote:
PyTom wrote:
PixelWrangler wrote: Agh... forgot to log in. Anyway, adding to that, one thing I'd like to see (eventually) is a comprehensive Ren'Py Object Model, covering all of the objects and attributes. The manual already does this to a certain extent, but it could be taken to the next level.
I'm not sure what you mean by this...
I think he means something like taking the character declaration statement ["character([whatever the arguements are])"], and explaining each of the arguements individually, allowing the reader to see exactly what does what, and extending said documentation to... *loading train of thought... please wait... thanks for waiting!* maybe some basic Python script (like the dayplanner that I'd like to see actually used in a game!).
That pretty much covers it, possibly minus actual Python script... basically, a description of objects (frame, character, etc), and all of the sub-attributes, with parameters for what can be assigned to them, as well as syntactical representations where applicable.

An example in Javascript would be something like:

WINDOW
The window object encapsulates all of the objects associated with a browser window. These objects include:

WINDOW ELEMENTS

DOCUMENT
Syntax: window.document

The document is the page loaded into the browser window, usually in the form of HTML code, images, etc.

LOCATION
Syntax: window.location

The location displayed in the current window, usually a document. This can be accessed using the window.location.replace("<URL>") function.


...

DOCUMENT ATTRIBUTES

HREF
Syntax: window.document.href
This contains the URL currently loaded into a browser window. A new URL can be specified by assigning the URL to this attribute, as in:

window.document.href = "<URL>"

Essentially, kind of a roadmap/sitemap to the Ren'Py Object model... a "diagram" of all of the attributes that can be accessed using the Ren'Py scripting language. As I mentioned, this may all be covered by the reference guide (I read through it a little while ago... shortly after 4.8.3 was released), but I don't know all of the intricasies of Ren'Py, so I can't say for certain.
Megaman Z wrote:I dunno, because [I've learned] I'm not PixelWrangler, and therefore cannot share his thought processes. (not that I think he has many... don't hurt me!)
:roll: *sigh*

I realize it may be that I just don't get your sense of humor, MMZ, but it's been a long, looong time since I've run across someone who has been able to so consistently and reliably rub me the wrong way...

P.W.
Life is hard.
Except in ren'ai games.
Then it's a whole lot softer.

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: splashscreen

#12 Post by PyTom »

Megaman Z wrote:I think he means something like taking the character declaration statement ["character([whatever the arguements are])"], and explaining each of the arguements individually
http://www.bishoujo.us/renpy/dl/4.8.3/r ... #Character

I actually do that for many of the functions in Ren'Py. For example, check out the documentation for Character given above.

The big problem is I'm not that great of a writer.
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

PixelWrangler
Regular
Posts: 103
Joined: Wed Mar 16, 2005 11:00 pm
Location: Swimming in the sea of electronic dots
Contact:

Re: splashscreen

#13 Post by PixelWrangler »

PyTom wrote: You're right, you do... and now that I read MMZ's description a little more closely, it's not really a breakout of function arguments, but rather a reference for alterable properties of various elements. For example, a list of all attributes and properties in a renpy.frame object that can be altered.
Okay, most of the objects that you'll deal with in Ren'Py are fairly opaque, after they have been constructed. Once you create, say, and im.Image, there's really not much you can do with it.

The exceptions are styles, and style properties. You can either alter a name style, or specify style properties that are used by the object at the time of the object's creation. So one could specify:

Code: Select all

init:
  $ style.create('crazy_window', 'window')
  $ style.crazy_window.ypos = 0.5

$ ui.window(style='crazy_window')
Or just:

Code: Select all

$ ui.window(ypos=0.5)
Of course, you only need to do this if you're creating your own window. You tend not to ever do this, but you may need to go and edit the styles of the default windows.
I was assuming that a Ren'Py application was structured in an object-oriented fashion, since some of the syntax bore a striking resemblance to object-oriented Javascript programming I've worked with. (main_menu.textcolor=..., for example)

Of course, Ren'Py may not even be structured this way... in extremely general terms, I'm trying to get my head around Ren'Py as an application... failing all else, I will eventually do so by simply working with it.
Don't think of a Ren'Py script by analogy to a programming language. Instead, think of it by analogy to a script to a TV show, with the important things being blocks of dialogue and narration.

In general, you as the user will not really need to write any objects or anything like that. Ren'Py is actually a bit declarative, insofar as you tend to declare, say, a Character with a name and some properties, and then to leave it alone after that. The only variables that need to be updated are ones that record game state, like a player's stats.
Life is hard.
Except in ren'ai games.
Then it's a whole lot softer.

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:

#14 Post by PyTom »

Gorram it! I did it again. I clicked "edit" when I should have clicked "quote". So that last post is really my response to PW's post, which is now lost. We apologize for the inconvenience.
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

Megaman Z
Miko-Class Veteran
Posts: 829
Joined: Sun Feb 20, 2005 8:45 pm
Projects: NaNoRenO 2016, Ren'Py tutorial series
Location: USA
Contact:

#15 Post by Megaman Z »

PyTom wrote:Gorram it! I did it again. I clicked "edit" when I should have clicked "quote". So that last post is really my response to PW's post, which is now lost. We apologize for the inconvenience.
(for those who are new to the forum, that's the second time he's done it on accident... do not blame him for it, it's just human nature to screw things up once in a while)

[somewhere in background]ZETA!!!!! (ZETA!!!! (ZETA!!! (ZETA!! (ZETA!)))) [real cheesy attempt at showing an echo. I won't do it again... unless nessisary]

(and now, I have to go before Beta kills me for nuking [microwaving] her chicken for thirty minutes... I hit "0" one time too many... and nobody noticed... until now... whoops...)
~Kitsune Zeta

Post Reply

Who is online

Users browsing this forum: Bing [Bot]