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 »

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 »

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 »

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 »

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

#5 Post by PyTom »

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
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 »

Another question i forgot to ask.

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

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 »

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 »

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 »

Code: Select all

$ renpy.sound.stop()

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

#10 Post by monele »

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