Search found 70 matches

by ChicoGameDev
Tue Sep 01, 2020 3:41 pm
Forum: Support and Development
Topic: Question about Threads
Replies: 5
Views: 5566

Question about Threads

Hi everybody,

Am I missing something or love.math.random cannot be accessed from a new thread created using love.thread.newThread?

I get this error : attempt to index field 'math' (a nil value)

on this line :

Code: Select all

lgMRandom = love.math.random
by ChicoGameDev
Sun Aug 30, 2020 7:54 pm
Forum: General
Topic: Love CPU usage
Replies: 41
Views: 47039

Re: Love CPU usage

That's true.

Originally it was in the love.draw but when I was reading it again for making this post I thought I've done something wrong :D.

Thanks for confirming and I've just put it back into the love.draw.

Regards
by ChicoGameDev
Sat Aug 29, 2020 10:36 pm
Forum: General
Topic: Love CPU usage
Replies: 41
Views: 47039

Re: Love CPU usage

Oh yeah

Thank you so much Slime you are amazing !

That was it I downloaded again and I'm now at 8% CPU usage. That's truly amazing ! Glad I asked :D

Thanks everybody !


Regards,
by ChicoGameDev
Sat Aug 29, 2020 9:01 pm
Forum: General
Topic: Love CPU usage
Replies: 41
Views: 47039

Re: Love CPU usage

Hi, Thanks for your answer. Actually I did not know about love.run and I've not overwritten it. I tried to add the library you liked me to the simple test project I've made and now it goes up to ~190% of CPU with a framerate set on 60. The framerate is stable tho. But it's actually worth :O. Thanks ...
by ChicoGameDev
Sat Aug 29, 2020 7:29 pm
Forum: General
Topic: Love CPU usage
Replies: 41
Views: 47039

Re: Love CPU usage

Hey, Thanks for your answer I'm currently on a Macbook Pro and even an empty application with vsync off and just the sleep the CPU is up to ~103% here is the love file for testing purpose. test_cpu.love For the FPS as I said I have a text ingame to show it and it's really a strong and stable 60 fps....
by ChicoGameDev
Sat Aug 29, 2020 10:19 am
Forum: General
Topic: Love CPU usage
Replies: 41
Views: 47039

Re: Love CPU usage

Hello everybody, This a very old topic but it is still an "issue". I've put this piece of code in my main update function : function love.update(dt) next_time = next_time + min_dt [...] local cur_time = love.timer.getTime() if next_time <= cur_time then next_time = cur_time return end love...
by ChicoGameDev
Fri Aug 07, 2020 4:27 pm
Forum: Support and Development
Topic: Math help - mouvement in circle and follow
Replies: 6
Views: 3034

Re: Math help - mouvement in circle and follow

You are indeed totally right, there was a double multiplication with 'dt' :) That's was easy to fix and now everything is "perfect", my plans was a bit too hard for my math capacities. In another engine with more math + vector + whatever functions would be probably be easier. But yeah I ag...
by ChicoGameDev
Thu Aug 06, 2020 4:17 pm
Forum: Support and Development
Topic: Math help - mouvement in circle and follow
Replies: 6
Views: 3034

Re: Math help - mouvement in circle and follow

You are amazing. You are right I should have isolate the behaviour as you did, but actually I was not expecting a answer like this :awesome: I thought someone would just say : delete this "-" here and put a "*" here... So with self.vx and self.vy I'm adding it to self.x and self....
by ChicoGameDev
Thu Aug 06, 2020 4:10 am
Forum: Support and Development
Topic: Math help - mouvement in circle and follow
Replies: 6
Views: 3034

Re: Math help - mouvement in circle and follow

Hi,

Thanks for participating, actually not.

self.linkedEntity is the reference to the big bat directly :D
by ChicoGameDev
Thu Aug 06, 2020 3:35 am
Forum: Support and Development
Topic: Math help - mouvement in circle and follow
Replies: 6
Views: 3034

Math help - mouvement in circle and follow

Hi, I need a bit of mathematical support... https://trello-attachments.s3.amazonaws.com/5f2b7505f8762148718abdc2/640x383/0e5e995c016ceb1b9a319c7c0ea7aed6/BMDR_BUG_%231.gif As you can see the little bats turn around the big one and kind of follow it. Here is the movement code for one individual small...