Tuesday, 12 December 2017

Development Log #2 - Game that still hasn't got a name... the writing continues

Well, I still haven't got a title, so it's a bit strange writing a devlog XD

Anyway, I didn't say all that much about the story in my last post, so I'll take this post as an opportunity to get into that a bit.

I can't say toooooo much right now because I'm still writing. But things that almost definitely won't change - There is a small cast of characters, four main characters, who are aged between 21 and 29. And the geographical setting is modern-day (or near future) United Kingdom.

I want to get a few different locations in, currently there are scenes in 5 or 6 different places around the UK, I don't know if that will be the case in the final version, but I am excited to work on something that has a feel of a journey as part of the plot.

Everything else is spoilers :P

Well, not really, but it'll be a few months before I can write a synopsis that has a plot hook for people to read. I find writing difficult at times, but writing synopsis' for my own stories is much harder O.O

Writing for visual novels.

There are things that I'm doing which should make my life easier when I convert my script from a google doc into a ren'py script file. I have already given the characters tags, which I use for the dialogue, like so:

B "I brought all the ones I have, help yourself."

H "Ah, thanks man"

Which should save some considerable amount of time! The other text (narration) I will have to do some further modifying of, including escaping out all of the characters that would otherwise break the script file. (it'll be time consuming, but not too bad). https://www.renpy.org/doc/html/text.html#escape-characters Documentation is very helpful for things like that! As is your fav text editors find and replace function! :D

Now that I am doing a first pass at editing, I'm also adding and bold and italics using the ren'py syntax {b}bold{/b} and {i}italic{/i}.

Another thing that comes to mind when writing for a visual novel is how often to describe sights and sounds. A lot of the time I'll choose to show things through the art or music rather than narration. For now, I'm putting in plenty of description of sights so that I can later make an art assets checklist! And with sound... that's something I'll get into probably in my next post! If I was planning to do a foley track I'd add sound descriptions at this drafting/first edit stage - but I doubt I'll be using sound effects like 'footsteps' or 'glass cracking' - I wouldn't attempt that unless I had some real recording experience or a really strong desire to make those things part of the experience - I have neither.

I'll end this post with my current word count because I don't have any art or music to share today, sorry! (I have been making music though, more than I've been writing or editing over the last 2 weeks for sure.)


Ok. Till next time.

Tuesday, 28 November 2017

Development Log #1 - A game that might be called 'Departure Lounge' but maybe something else.

I haven't done a dev log for a long time, probably over 2 years.
I already know it's not going to be super regular, but I wanted to share stuff occasionally in a longer format than twitter posts.

The project I'm working on will take a fair few months before it's complete, maybe a year or even more, but I am expecting to be done with the bulk by summer 2018.

When I decide on a title I will make a WiP thread on Lemmasoft Forum, but I'll still add here on my blog when I have stuff to share.

So, I may as well talk about the title and some of the issues around naming projects, as I've already mentioned it!
I am toying with the name 'Departure Lounge' - it's thematic enough and doesn't lean too far into any particular genre, which works for the story I'm writing. But I like the idea of something a bit stranger, perhaps 'Avoid Conscious Thought', though that doesn't exactly match my story XD

Once I have settled on a title, in fact usually just before I settle on one, I research it with the search engine (Google, as well as itch.io and steam) to see if any other games or media has the same name that might make things difficult for visibility on release. Although I didn't find any with the same name, it's got the same problem as 'Apartment Complex' (one of my games from a jam in 2016) in that it's a generic term used a lot and doesn't have a unique element - maybe something like Departure Lounge 1 or something would help, but it can't just be an arbitrary number, so more thought is needed! Hence no WiP thread yet.
Though I can always make one with a working title if it comes to that O.O

I'll share a little about the concept of the story in my next post, by which time I should have a 15k word draft (it's already at over 12k).

So here are some character designs from last month (october aka inktober)

I plan to redraw the characters to further refine their designs once I am done with writing the draft. So I may also share some more art and maybe some music too in my next post, which will probably be in December!

I still don't know about that title...

I struggled titling 'Connection Pools' too, but I think it was worth the struggle in the end.

Ok. Til next time then!

Wednesday, 6 September 2017

Using layers in Ren'Py

Sometimes you might want some custom layers in Ren'Py.

There is some information over in the documentation here: https://www.renpy.org/doc/html/displaying_images.html#layer

It explains what the 4 default layers (master, transient, screens and overlay) are for and the order they are in.

To add some additional ones you'll want to add a line of code to the bottom of the options.rpy file, like this:

    config.layers = [ 'zero', 'master', 'transient', 'belowmid', 'midlayer', 'abovemid', 'screens', 'overlay']
That gives us another four layers to play with, of course you can have more or less and in any order, just remember to test things to make sure you have the layers in the order you want!

I put a new layer called zero right at the bottom, I typically fill this with a solid colour so that the player never accidentally sees the default transparent background. Then the others that I will use for art / displayables are between transient and screens, you might find it better to have some below transient, just experiment to see what happens where!

Here is a script.rpy file as an example of showing things on custom layers:

image nrblack = "#181818"

image skyani:
    "sky1.png" with Dissolve(1.5, alpha=True)
    pause 1.5
    "sky2.png" with Dissolve(1.5, alpha=True)
    pause 1.5
    "sky3.png" with Dissolve(1.5, alpha=True)
    pause 1.5
    "sky2.png" with Dissolve(1.5, alpha=True)
    pause 1.5
    repeat 20

label start:

    show nrblack onlayer zero

    show skyani onlayer belowmid with dissolve
    centered "A simple animated sky background."
    centered "Followed by some midground."
    show midground onlayer midlayer with dissolve
    centered "Finally the foreground."
    show foreground onlayer abovemid with dissolve


    centered "Now we should hide all of the relevent layers to get ready for the next scene..."

    hide skyani onlayer belowmid
    hide midground onlayer midlayer
    hide foreground onlayer abovemid with dissolve

    "That's it!"


The main thing to note is the onlayer followed by the custom layer name which you'll need on both the show and hide statements.

The two images that aren't defined (midground and foreground) are files names midground.png and foreground.png which are in the images folder, Ren'Py picks these up automatically so they don't need to be manually defined!

This particular example could more easily be achieved just by using show and letting Ren'Py put them in the order they are declared onto the screen, but if you're reading this you probably have run into some case where the standard behaviour isn't enough for your needs and layers might be useful!

Don't forget to hide the images on the layers when you are done with them! XD


As a quick aside you may have noticed that the sky animation is set to repeat 20 times, instead of infinitely (repeat). I have started doing this mainly because I noticed quite a lot of system resources being used when multiple infinite animations are displayed at once (as you can imagine!). I'm still trying to get my head around the best practices for being efficient with animations in terms of system resource, so I can't offer much advice in that area, but with only one animation running at a time you shouldn't have any problems!

Monday, 4 September 2017

Ren'py fade text in and out

As promised here is the Screens version of the fade in out text! I'll leave the below stuff using the (old!) ui.add on this blog post (below the "--- old post below ---") as it goes into a bit more detail with the custom transform!

So, the way I went about this is to create a new rpy file for my custom screen, I called it custom.rpy, but give it any name you'd like!

This is the entire contents of that file:

screen info_fade:

    text "Look. I'm fading about." at fade_inout_2s

Then in the script.rpy I have:

transform fade_inout_2s:
        xalign 0.5
        yalign 0.5
        alpha 0.08
        easeout_back 2 alpha 0.9
        pause 0
        ease 2 alpha 0.0

label start:

    scene bg room
    "Ok, here we go."
    show screen info_fade
    pause 6
    "That was nice."

The main bits there being the transform which I declared at the very top of the script.rpy file and the show screen info_fade statement.

I used show screen rather than call screen because I think calling a screen then expects some kind of user interaction, which isn't what I wanted for this effect. I've not used this in a game, so depending on what you are trying to achieve you might need to make some changes, feel free to drop me a line on twitter if you are struggling with anything - I'll help if I can! - @sleepyagents

Here is a gif:

btw I use ScreenToGif to make gifs if anyone is interested - http://www.screentogif.com/ - thanks screentogif people!

And a big thanks to xela and Zetsubou for the lemmasoft thread where I found the basis of this stuff! (link below)

--- (old post below) ---

Here is one way you can fade in and out some text in Ren'Py!

I thought I would be able to do this without looking at the lemmasoft forum, but I failed in that :'D

here is the guide I found from xela https://lemmasoft.renai.us/forums/viewtopic.php?p=336645#p336645
(thanks xela!)

I just changed it a bit as I didn't need the text to move.

You might be thinking that this would be a lot easier with an image - and you'd be correct! but that wouldn't be as accessible, though you could add some text to describe the image, I think this way is better for filesize and flexibility (variables!) anyway.

Right at the top of the script.rpy file I have:

init python:
    def fade_inout_text(text, *args, **kwargs):
        ui.add(At(Text(text, *args, **kwargs), fade_inout_2s))
transform fade_inout_2s:
        xalign 0.5
        yalign 0.5
        alpha 0.08
        easeout_back 2 alpha 0.9
        pause 0
        ease 2 alpha 0.0

I don't know much about the def and ui.add bits, so I'll explain a bit about the transform instead!

The xalign and yalign make sure that the text is centered, the alpha 0.08 means that the text is just visible before the animation starts (0 would be invisible), easeout_back 2 alpha 0.9 uses the easing ( see https://www.renpy.org/doc/html/atl.html#warpers for the list of available warpers/easings ) called easeout_back which has a certain effect (see gif below!) which takes 2 seconds to change to 90% visibility (alpha 0.9), of course you could use 1.0 instead for 100% visibility.
Then I added a pause of 0 seconds... followed by ease 2 alpha 0.0 which takes 2 seconds to 'ease' the text to 0% visibility / transparent.
Play around with the numbers and the warpers / easings to get the effect you want!

And then when some text needs to fade in and out during the game you can add this:

    $ fade_inout_text("this is the text that fades in and out", color="#111111", size=30)
    pause 6

You can see I added a 6 second pause after the statement to give it time to do it's thing. You could use a normal pause without an amount of time defined to let the player click to continue.

If you want to display a variable you can replace the string, e.g.

    $ fade_inout_text(my_variable, color="#111111", size=30)

I hope this has been helpful!

I just realised the code to do this with screens is in the forum thread I linked! Which is what I originally intended to do! I'll update this post soon with the code for screens which will be a little nicer haha.