Search found 1736 matches

by nyaatrap
Wed Dec 21, 2016 9:50 am
Forum: Ren'Py Questions and Announcements
Topic: im.MatrixColor changing hue value on a DynamicImage?
Replies: 3
Views: 804

Re: im.MatrixColor changing hue value on a DynamicImage?

im manipulators only takes image files or images manipulated by other im manipulators. You have to use DynamicDisplayable to include im manipulators instead of DynamicImage. It's a bit difficult to understand, so I'll paste portion of my game code as example. Doll is an object that stores variables....
by nyaatrap
Wed Dec 21, 2016 8:52 am
Forum: Ren'Py Questions and Announcements
Topic: Audio Duration Bar [solved]
Replies: 8
Views: 1017

Re: Audio Duration Bar

Problem is mp3. Converting music into ogg solved problem.
by nyaatrap
Tue Dec 20, 2016 11:27 am
Forum: Ren'Py Questions and Announcements
Topic: Audio Duration Bar [solved]
Replies: 8
Views: 1017

Re: Audio Duration Bar

AudioPositionValue() works no problem for me. There's nothign wrong on your code. So problem is different: bar style or music declaration.

BTW, renpy.music.get_pos(channel='music') won't work in this case, because it's only updated at interaction, not real time.
by nyaatrap
Tue Dec 20, 2016 10:54 am
Forum: Ren'Py Questions and Announcements
Topic: Game loop within renpy for playing mini-games?
Replies: 3
Views: 882

Re: Game loop within renpy for playing mini-games?

Ren'Py is not designed for real time event handling. Basically Ren'Py wait to player's input then do next function (restart main loop), so turn-based game is only option. If you want to make real-time action games, it's better to look for a different game engine. If you really want, you could do it ...
by nyaatrap
Mon Dec 19, 2016 12:30 pm
Forum: Ren'Py Questions and Announcements
Topic: Show different sprites depending on a variable?
Replies: 6
Views: 720

Re: Show different sprites depending on a variable?

I never use imagemap because it's not efficient, so I skip to answer about it. Then about define, document is here: https://www.renpy.org/doc/html/python.html?highlight=define#define-statement basically, define is same to "init python" - run python codes in initial phase before the game starts. so ...
by nyaatrap
Mon Dec 19, 2016 12:24 pm
Forum: Ren'Py Questions and Announcements
Topic: Show different sprites depending on a variable?
Replies: 6
Views: 720

Re: Show different sprites depending on a variable?

However, i would like that the buttons did more than just jumping to another label when pressed, like changing a variable of money for instance., how can I do multiple actions with that button click? hotspot (803, 63, 167, 163) clicked Jump ("test"), $money += 10 It's clicked [SetVariable("money", ...
by nyaatrap
Mon Dec 19, 2016 12:17 pm
Forum: Ren'Py Questions and Announcements
Topic: Show different sprites depending on a variable?
Replies: 6
Views: 720

Re: Show different sprites depending on a variable?

I never use imagemap because it's not efficient, so I skip to answer about it. Then about define, document is here: https://www.renpy.org/doc/html/python.html?highlight=define#define-statement basically, define is same to "init python" - run python codes in initial phase before the game starts. so d...
by nyaatrap
Mon Dec 19, 2016 9:31 am
Forum: Ren'Py Questions and Announcements
Topic: Show different sprites depending on a variable?
Replies: 6
Views: 720

Re: Show different sprites depending on a variable?

There are two ways: Combination of DynamicImage and Fixed, or DynamicDisplayable. Fixed is a way to layout layers. For example: image figure = Fixed("firstlayer.png", "secondlayer.png", fit_first=True) DynamicImage is explained like: Strings may have one or more square-bracket substitutions in them,...
by nyaatrap
Mon Dec 19, 2016 12:10 am
Forum: Ren'Py Questions and Announcements
Topic: How to load a tilesheet?
Replies: 8
Views: 602

Re: How to load a tilesheet?

BTW, screen statement 'add' is the main reason why it's slow. If you want to raise performance, try my Tilemap so you could use only one add rather than (add image)*100.
by nyaatrap
Sun Dec 18, 2016 11:42 pm
Forum: Ren'Py Questions and Announcements
Topic: How to load a tilesheet?
Replies: 8
Views: 602

Re: How to load a tilesheet?

Im.Crop loads png file then create cache from it, then use this cache. Cache is multiplied if it crops many, but one small portion is small. LiveCrop don't create cache, but use png image directly. Come to think of it, it hard to conclude which is lighter or faster. For example, if you use all tiles...
by nyaatrap
Sun Dec 18, 2016 9:35 pm
Forum: Ren'Py Questions and Announcements
Topic: How to load a tilesheet?
Replies: 8
Views: 602

Re: How to load a tilesheet?

Divona's way of doing it sounds like a familiar pattern, but if it's slow it would be great to know what the best way to do it in renpy would be. Rewrite im.Crop to LiveCrop in the above code. Because im.Crop loads a spritesheet every time when it find new tile, but LiveCrop loads only once. Also, ...
by nyaatrap
Sun Dec 18, 2016 8:13 am
Forum: Ren'Py Questions and Announcements
Topic: Danganronpa, Point & Click or Tile based games?
Replies: 9
Views: 1451

Re: Danganronpa, Point & Click or Tile based games?

Have you ever released any of your code so others can study it and learn from it? I'm not them but here's my gift. (/・ω・)/ https://github.com/nyaatrap/renpy-utilities Documenting is not done though raw codes must be useful. Every codes I wrote in this repository are in the public domain. Because I ...
by nyaatrap
Sun Dec 18, 2016 7:48 am
Forum: Ren'Py Questions and Announcements
Topic: How to load a tilesheet?
Replies: 8
Views: 602

Re: How to load a tilesheet?

"im.Crop()" should do it. I don't suggest to use it because this operation is slow and it's only useful for fixed results that will be never changed. When image cropping is changed by time, use LiveCrop or transform crop which is far faster operation. (Honestly, I never think im.Crop is useful - it...
by nyaatrap
Sun Dec 18, 2016 7:33 am
Forum: Ren'Py Questions and Announcements
Topic: How to load a tilesheet?
Replies: 8
Views: 602

Re: How to load a tilesheet?

Do you really need to use blit? I think just crop final images by transform is more efficient. If you want to crop user defined displayable, use render.subsurface. This is my personal experience, but blitting is slow operation. I think sending raw image to GPU directly, then show cropped image by tr...
by nyaatrap
Sat Dec 17, 2016 1:55 pm
Forum: Ren'Py Questions and Announcements
Topic: Ren'Py 6.99.12 Prereleased
Replies: 48
Views: 4922

Re: Ren'Py 6.99.12 Prereleased

Maybe this is not an issue if new release is freshly downloaded, but when I update old ren'py from launcher that set its language in Japanese, setting back to English causes font issue. It's fixed when I download a new release so it's shouldn't be much problem.
Clipboard 2.png