Audio and Drawings

A place to discuss things that aren't specific to any one creator or game.
Forum rules
Ren'Py specific questions should be posted in the Ren'Py Questions and Annoucements forum, not here.
Post Reply
Message
Author
Rikdo_Osaka
Newbie
Posts: 14
Joined: Sun Oct 22, 2006 12:19 am
Contact:

Audio and Drawings

#1 Post by Rikdo_Osaka » Sun Oct 22, 2006 12:24 am

I have been meaning on making a game but i have two questions that need awsners since i'm not sure about them.

How big do the pics have to be and what formatt?
Can you put character voices?

User avatar
DaFool
Lemma-Class Veteran
Posts: 4171
Joined: Tue Aug 01, 2006 12:39 pm
Contact:

#2 Post by DaFool » Sun Oct 22, 2006 12:34 am

The default is 800 x 600 pixels. To save diskspace I usually use hi-quality jpegs for non-transparent images (like backgrounds), and pngs for images that need transparencies (like character sprites).

Of course you can technically set the game to any 4:3 aspect ratio. Some of the others here have used 640 x 480.
You can make the pictures much bigger than 800 x 600 if you plan to pan or zoom them, but I think there is a technical dimension limit at which point they start to crash.

You can add voice in mp3 or ogg format. You play them like any other sound, except as music (which loops).

Rikdo_Osaka
Newbie
Posts: 14
Joined: Sun Oct 22, 2006 12:19 am
Contact:

#3 Post by Rikdo_Osaka » Sun Oct 22, 2006 12:41 am

Thanks, here's another question if you don't mind awsnering it.

How do i set up the BG and the character in the game?

User avatar
DaFool
Lemma-Class Veteran
Posts: 4171
Joined: Tue Aug 01, 2006 12:39 pm
Contact:

#4 Post by DaFool » Sun Oct 22, 2006 1:30 am

init:

image background1 = "background1.jpg"
image character1 = "character1.png"

label start:

scene background1
show character1
This is basically the gist of it. Obviously, some more code may be needed.

My best advice is to download some of the many demos and partitially-complete works in this forum, and look at how people code things. It's usually in the script.rpy within the /game subdirectory.

User avatar
PyTom
Ren'Py Creator
Posts: 15447
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:

#5 Post by PyTom » Sun Oct 22, 2006 9:51 am

DaFool's example was right when he typed it in, but he used quote rather then code, so the indentation is screwy. A similar example is:

Code: Select all

init:
    image bg times square = "times_square.jpg"
    image eileen happy = "eileen_happy.png"

    $ e = Character("Eileen")

label start:

    scene bg times square
    show eileen happy

    e "Remember, nothing is shown until dialogue or transitions take place."
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
"Silly and fun things are important." - Elon Musk
Software > Drama • https://www.patreon.com/renpytom

Rikdo_Osaka
Newbie
Posts: 14
Joined: Sun Oct 22, 2006 12:19 am
Contact:

#6 Post by Rikdo_Osaka » Sun Oct 22, 2006 9:06 pm

Another question i forgot to ask.

how do i bring on the audio? How do i set it to go along with the dialogue?

User avatar
yummy
Miko-Class Veteran
Posts: 733
Joined: Fri Jul 07, 2006 9:58 pm
Projects: Suna to Majo
Location: France
Contact:

#7 Post by yummy » Mon Oct 23, 2006 11:44 am

You place your audio file in the game folder, then you simply make it play.
It'd depend on how you want them to play: as a music, as a loop, as a sfx...

If your file name is voice.ogg, you place this code in the label start block:

Code: Select all

$ renpy.sound.play("voice.ogg")
Eileen "Hey! I can even mimick Pytom's voice!"
And remember the wiki, there is a reliable how-to section, with a -nearly- full documentation, a cookbook for special screen effects...

Rikdo_Osaka
Newbie
Posts: 14
Joined: Sun Oct 22, 2006 12:19 am
Contact:

#8 Post by Rikdo_Osaka » Fri Oct 27, 2006 10:28 pm

how do i stop he audio, like when i want to put anothr audio on the next dialogue

yuirei
Regular
Posts: 47
Joined: Fri Aug 04, 2006 10:00 am
Contact:

#9 Post by yuirei » Sat Oct 28, 2006 1:28 am

Code: Select all

$ renpy.sound.stop()

User avatar
monele
Lemma-Class Veteran
Posts: 4101
Joined: Sat Oct 08, 2005 7:57 am
Location: France
Contact:

#10 Post by monele » Sat Oct 28, 2006 9:25 am

If you plan to have a lot of voices (one per line), there's an extra for this (voices.rpy in /extras). This should take care of all the playing and stopping :)

Post Reply

Who is online

Users browsing this forum: No registered users