Hello everybody. In my game I'm developing I have my animations system, but yesterday I discovered a problem with it.
I made an executable and sent it to a friend to test, to my surprise, the animations came out MEGA-slow, but on my computer it's normal.
I believe the problem is Delta Time(dt),
I will leave a demo simulating the same problem.
Who can help me, I already leave a big thank you.
Problems with the animation
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
Problems with the animation
- Attachments
-
- animation_demo.love
- (3.16 KiB) Downloaded 59 times
Code: Select all
-------------------------------
-- i love programming in Lua --
-------------------------------
Re: Problems with the animation
Firstly, I was unable to see any form of animation.
So I looked at the code. I don't know, why you have 2 tickers... I changed speed to duration and counted ticks in seconds (see code below, but please note, I have done it on mobile)
So I looked at the code. I don't know, why you have 2 tickers... I changed speed to duration and counted ticks in seconds (see code below, but please note, I have done it on mobile)
- Attachments
-
- main.lua
- (3.16 KiB) Downloaded 51 times
Last edited by Andlac028 on Mon Jun 06, 2022 7:23 pm, edited 1 time in total.
Re: Problems with the animation
THANK YOU SO MUCH!!!
I first tested it on my tablet (because I was busy and unable to use the computer at the moment) and it worked, then I tested it on my machine and it also worked, and finally, I tested it on my friend's computer and to my surprise IT WORKED!!
I'm really grateful for the help,
your name will be in the thanks area of my game
And I wanted to understand this ".5", is it like "0.5"?
The first time I saw it I thought it would give an error
Code: Select all
-- Creating a new animation...
animation = NewAnim(
"frames", -- Sprite-Sheet
{0, 1, 2, 3}, -- Frames (The first frame is number 0)
.5, -- duration, in seconds
true -- loop
)
Code: Select all
-------------------------------
-- i love programming in Lua --
-------------------------------
Re: Problems with the animation
You are welcome
Yes, it is just shorthand for 0.5
Yes, it is just shorthand for 0.5
Who is online
Users browsing this forum: Google [Bot] and 46 guests