I wanted to try out the LOVEJam, so I spent a few minutes making mine. It's really basic, featuring some of my original artwork (oh god, my avatar???). I'm open to animation suggestions though. I'm planning on pushing this to my github account at some point.
Nevertheless, I'd rather upload the *.love file here instead of linking it to mediafire or anything.
Josefnpat's Splash
- josefnpat
- Inner party member
- Posts: 955
- Joined: Wed Oct 05, 2011 1:36 am
- Location: your basement
- Contact:
Josefnpat's Splash
Missing Sentinel Software | Twitter
FORCIBLY IGNORED.
<leafo> when in doubt delete all of your code
<bartbes> git rm -r *
<bartbes> git commit -m "Fixed all bugs"
<bartbes> git push
FORCIBLY IGNORED.
<leafo> when in doubt delete all of your code
<bartbes> git rm -r *
<bartbes> git commit -m "Fixed all bugs"
<bartbes> git push
- tentus
- Inner party member
- Posts: 1060
- Joined: Sun Oct 31, 2010 7:56 pm
- Location: Appalachia
- Contact:
Re: Josefnpat's Splash
Hm. Your animation was really jerky on my copy of 0.7.2, even after I corrected the image to be PO2, so I opened it up. I wasn't a fan of how you did time calculations, so I tried to implement a similar effect using the significantly smoother DT. Attached is what I came up with (there's a speed variable you can used to control how fast things happen).
Have you considered decoupling the foreground and background, to make the movement more interesting?
Have you considered decoupling the foreground and background, to make the movement more interesting?
- Attachments
-
jos_2.love
- (116.66 KiB) Downloaded 107 times
Kurosuke needs beta testers
- Robin
- The Omniscient
- Posts: 6506
- Joined: Fri Feb 20, 2009 4:29 pm
- Location: The Netherlands
- Contact:
Re: Josefnpat's Splash
Neato.
That's actually preferred. Having it up on GitHub or something as well is good too.josefnpat wrote:Nevertheless, I'd rather upload the *.love file here instead of linking it to mediafire or anything.
Help us help you: attach a .love.
- josefnpat
- Inner party member
- Posts: 955
- Joined: Wed Oct 05, 2011 1:36 am
- Location: your basement
- Contact:
Re: Josefnpat's Splash
Thanks, I'm having issues with jerkyness in other games too. Need to better understand love and the drawing patters, thanks for the help! As for decoupling, I think that'd be spiffy. I'll see what I can do.tentus wrote:Hm. Your animation was really jerky on my copy of 0.7.2, even after I corrected the image to be PO2, so I opened it up. I wasn't a fan of how you did time calculations, so I tried to implement a similar effect using the significantly smoother DT. Attached is what I came up with (there's a speed variable you can used to control how fast things happen).
Have you considered decoupling the foreground and background, to make the movement more interesting?
I plan on pushing it up to GitHub at some pointRobin wrote:Neato.That's actually preferred. Having it up on GitHub or something as well is good too.josefnpat wrote:Nevertheless, I'd rather upload the *.love file here instead of linking it to mediafire or anything.
![Smile :)](./images/smilies/ms-smile.png)
Missing Sentinel Software | Twitter
FORCIBLY IGNORED.
<leafo> when in doubt delete all of your code
<bartbes> git rm -r *
<bartbes> git commit -m "Fixed all bugs"
<bartbes> git push
FORCIBLY IGNORED.
<leafo> when in doubt delete all of your code
<bartbes> git rm -r *
<bartbes> git commit -m "Fixed all bugs"
<bartbes> git push
- tentus
- Inner party member
- Posts: 1060
- Joined: Sun Oct 31, 2010 7:56 pm
- Location: Appalachia
- Contact:
Re: Josefnpat's Splash
The big thing to keep in mind is 1 dt == 1 second. So, if we want something to take 8 seconds, add dt to a variable until it equals 8.josefnpat wrote: Thanks, I'm having issues with jerkyness in other games too. Need to better understand love and the drawing patters, thanks for the help! As for decoupling, I think that'd be spiffy. I'll see what I can do.
Code: Select all
time = time + dt
if time >= 8 then
doStuff()
end
Code: Select all
y = y + (dt * 200)
Code: Select all
y = y + (dt * 250)
I hope that helps, dt is a bit of an alien concept at first, but once you learn how to use it you never go back.
Kurosuke needs beta testers
- josefnpat
- Inner party member
- Posts: 955
- Joined: Wed Oct 05, 2011 1:36 am
- Location: your basement
- Contact:
Re: Josefnpat's Splash
Well, dt isn't so alien to me, it's just that I'm depending on the socket.http for the get time to produce a dt, instead of using the one from the framebuffer. I see the error in my ways, thank you so much.tentus wrote:The big thing to keep in mind is 1 dt == 1 second. So, if we want something to take 8 seconds, add dt to a variable until it equals 8.josefnpat wrote: Thanks, I'm having issues with jerkyness in other games too. Need to better understand love and the drawing patters, thanks for the help! As for decoupling, I think that'd be spiffy. I'll see what I can do.If we want to move something (lets say we want to increase the y position of an image by 200 pixels over 1 second), we take the current position and add dt times 200.Code: Select all
time = time + dt if time >= 8 then doStuff() end
It gets a little trickier when neither side equals 1, but it's still simple math. If we want to move an image 1000 pixels over 4 seconds, then this would be our code:Code: Select all
y = y + (dt * 200)
Because 1000 pixels divided by 5 seconds equals 250 pixels per second.Code: Select all
y = y + (dt * 250)
I hope that helps, dt is a bit of an alien concept at first, but once you learn how to use it you never go back.
Missing Sentinel Software | Twitter
FORCIBLY IGNORED.
<leafo> when in doubt delete all of your code
<bartbes> git rm -r *
<bartbes> git commit -m "Fixed all bugs"
<bartbes> git push
FORCIBLY IGNORED.
<leafo> when in doubt delete all of your code
<bartbes> git rm -r *
<bartbes> git commit -m "Fixed all bugs"
<bartbes> git push
Re: Josefnpat's Splash
I was so confused by this that i had to take a look at your code.josefnpat wrote: Well, dt isn't so alien to me, it's just that I'm depending on the socket.http for the get time to produce a dt, instead of using the one from the framebuffer. I see the error in my ways, thank you so much.
Using luasocket for timing is not a great idea, there is either love.timer, or the
love.update callback which is passed dt (the time in seconds between the last frame and this one) every time it is called.
for example:
Code: Select all
x = 5
function love.update(dt)
x = x + dt*100
end
Who is online
Users browsing this forum: Bing [Bot] and 4 guests