Path motion

A place for Ren'Py tutorials and reusable Ren'Py code.
Forum rules
Do not post questions here!

This forum is for example code you want to show other people. Ren'Py questions should be asked in the Ren'Py Questions and Announcements forum.
Message
Author
User avatar
delta
Epitome of Generic
Posts: 525
Joined: Sat Dec 22, 2007 12:59 pm
Projects: yes
Contact:

Re: Path motion

#31 Post by delta » Wed Sep 03, 2008 4:30 pm

They work with move, and I couldn't get it to change with dummy code.
The rest is left as an exercise for the reader.

User avatar
Aenakume
Regular
Posts: 182
Joined: Mon Aug 11, 2008 4:38 am
Projects: Arts... i hate arts -_-
Contact:

Re: Path motion

#32 Post by Aenakume » Thu Sep 04, 2008 7:09 pm

delta wrote:They work with move, and I couldn't get it to change with dummy code.
Fixed. ^_^;

It works with every sized image i tried, from 10x10 up to 1024x768. i tried both eileen_happy.png and logo.png from the demo, and had them both looping around the screen.
“You can lead a fool to wisdom, but you cannot make him think.”

User avatar
delta
Epitome of Generic
Posts: 525
Joined: Sat Dec 22, 2007 12:59 pm
Projects: yes
Contact:

Re: Path motion

#33 Post by delta » Fri Sep 05, 2008 12:34 pm

Now it seems to work, thank you. I may end up using this heavily.
The rest is left as an exercise for the reader.

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

#34 Post by PyTom » Sat Sep 06, 2008 12:58 am

Two questions:

1) Can I get confirmation that this is release under the Ren'Py license?
2) Is the code at the top of this the latest code?

Thanks for getting back to me soon, I'd like to release this with the next Ren'Py, this weekend.
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

User avatar
Aenakume
Regular
Posts: 182
Joined: Mon Aug 11, 2008 4:38 am
Projects: Arts... i hate arts -_-
Contact:

Re: Path motion

#35 Post by Aenakume » Sat Sep 06, 2008 1:16 am

PyTom wrote:1) Can I get confirmation that this is release under the Ren'Py license?
i think so? ^_^; i'm not sure what the Ren'Py licence is - but i'm not going to reserve any rights or anything. i have no problem with you releasing it under whatever licence terms Ren'Py itself is under.
PyTom wrote:2) Is the code at the top of this the latest code?
Yes.
“You can lead a fool to wisdom, but you cannot make him think.”

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

#36 Post by PyTom » Sat Sep 06, 2008 2:37 am

A quick screenshot of the spline editor I'm putting together to go with Aenakume's spline code. Basically, the dots are equally spaced in time, and the gray square represents the screen. So this path would have an object starting at the bottom of the screen, rising up, and then dropping back down again.

The spline editor will be write-only, as it will be incapable of reading in splines once written out.
screenshot0038.png
screenshot0038.png (5.3 KiB) Viewed 2092 times
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

User avatar
Aenakume
Regular
Posts: 182
Joined: Mon Aug 11, 2008 4:38 am
Projects: Arts... i hate arts -_-
Contact:

Re: Path motion

#37 Post by Aenakume » Sat Sep 06, 2008 5:22 am

Oh, that's very sexy. i was just going to take the cheap way out and make a script that parsed SVG paths created in vector graphics editors. ^_^;
“You can lead a fool to wisdom, but you cannot make him think.”

User avatar
Jo'ogn
Veteran
Posts: 398
Joined: Sat Jul 12, 2008 1:31 pm
Projects: Kassiopeia [iVN]
Location: Deutschland
Contact:

Re: Path motion

#38 Post by Jo'ogn » Sat Sep 13, 2008 7:38 am

I just started to play around with the Zoom and Pan functions. To make the motion look more camera-like: accelaration/deceleration (maybe even a tad of shake), is it possible to apply such pathes to Zoom and Pan?
Audio Plays: [original] The White Feathers Directive - [Star Wars] Through Flame and Shadow
Ren'Py: Kassiopeia [very interactive VN] work in progress - looking for proof reader english

TheSHAD0W
Newbie
Posts: 7
Joined: Wed Jun 18, 2014 8:03 am
Contact:

Re: Path motion

#39 Post by TheSHAD0W » Thu Apr 16, 2015 9:11 am

So, Uncle Mugen mentioned this in channel and sent me a copy; it didn't work right for current Ren'py and lacked the ability to work on different resolutions, so I updated it. Here ya go.
Attachments
spline_editor_2.zip
Spline Editor v2
(10.41 KiB) Downloaded 126 times

User avatar
xela
Lemma-Class Veteran
Posts: 2481
Joined: Sun Sep 18, 2011 10:13 am
Contact:

Re: Path motion

#40 Post by xela » Thu Apr 16, 2015 3:35 pm

In what world is this not in the cookbook... this is very, very useful. My gratitude to everyone involved.
Like what we're doing? Support us at:
Image

User avatar
SypherZent
Veteran
Posts: 278
Joined: Fri Sep 02, 2016 3:14 am
Completed: Multiverse Heroes, Space Hamster in Turmoil
Projects: Working on WWTDAA
Soundcloud: Chrysopoeist
Location: Puerto Rico
Contact:

Re: Path motion

#41 Post by SypherZent » Sat Jan 28, 2017 4:47 pm

Thank you so much for sharing this!
Creator of Multiverse Heroes & Space Hamster in Turmoil

Currently making Who Wants To Destroy An Alien. Demo now available on Steam!

Want me to code your game? Check my services thread!

User avatar
Milkymalk
Miko-Class Veteran
Posts: 747
Joined: Wed Nov 23, 2011 5:30 pm
Completed: Don't Look (AGS game)
Projects: KANPEKI! ★Perfect Play★
Organization: Crappy White Wings
Location: Germany
Contact:

Re: Path motion

#42 Post by Milkymalk » Sat Jul 08, 2017 12:35 pm

Aenakume wrote:This is a motion function to move stuff around - similar to Move - that allows you to specify paths by key-frame points. Between your key-frame points, you can specify motion that is linear, quadratic or cubic.

Here's an example that uses quadratic interpolation.
Image

Code: Select all

points = (
  ((100, 300),),
  ((400, 300), (550, 450)),
  ((700, 300), (250, 150))
)

show box at PathMotion(points, 1.0)
I feel stupid for asking this, but can you "explain to me like I'm 5" what (550, 450) and (250, 150) means? I only figured out that they are the coordinates of the "stretching points", but with the coords mixed up between them (their real coordinates would be (550, 150) and (250, 450)).
Crappy White Wings (currently quite inactive)
Working on: KANPEKI!
(On Hold: New Eden, Imperial Sea, Pure Light)

Post Reply

Who is online

Users browsing this forum: No registered users