What's so wrong with my code?
I have a I9-12900k, RTX3080 12GB, 64GB Ram and sometimes I drop from 240+fps down to 50-60 visually even less cause it starts to stutter.
In the task manager I noticed GPU at 80% usage like wut?
Performance issue: 80% usage of a 3080 12gb? Bruh
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
Performance issue: 80% usage of a 3080 12gb? Bruh
- Attachments
-
- CS50's SpeedRunner.love
- Updated again, no be mad me monkey plz
- (19.86 MiB) Downloaded 74 times
Last edited by Krauly on Mon Dec 19, 2022 4:06 pm, edited 3 times in total.
Re: Performance issue: 80% usage of a 3080 12gb? Bruh
does not run on my linux, i think in main.lua here:
local button = require 'Button'
it needs to be lower case b
local button = require 'Button'
it needs to be lower case b
Re: Performance issue: 80% usage of a 3080 12gb? Bruh
There several naming problems, like this. I guess op is working on windows, so they doesn't affected by that.
Here, with fixed naming:
- Attachments
-
- CS50's SpeedRunner_.love
- (3.28 MiB) Downloaded 72 times
Re: Performance issue: 80% usage of a 3080 12gb? Bruh
I think I fixed the namings, can you run it now?
Last edited by Krauly on Mon Dec 19, 2022 3:37 pm, edited 1 time in total.
Re: Performance issue: 80% usage of a 3080 12gb? Bruh
now there is no file to run
Re: Performance issue: 80% usage of a 3080 12gb? Bruh
Let me send you the zip instead of the .love, dunno why it wont run if I .love it
- Attachments
-
- CS50's SpeedRunner.7z
- here
- (19.86 MiB) Downloaded 75 times
Re: Performance issue: 80% usage of a 3080 12gb? Bruh
First, you still trying in code to load image as "IMG/BackgroundFinish.png"(gui.lua:33) while file is "IMG/backgroundFinish.PNG"
2nd, it seems, that somewhere happens memory leak. Every time i collect diamond, memory usage does up and up.
Actually no, ram usage go up no matter what i do
2nd, it seems, that somewhere happens memory leak. Every time i collect diamond, memory usage does up and up.
Actually no, ram usage go up no matter what i do
Last edited by GVovkiv on Mon Dec 19, 2022 3:48 pm, edited 1 time in total.
- BrotSagtMist
- Party member
- Posts: 659
- Joined: Fri Aug 06, 2021 10:30 pm
Re: Performance issue: 80% usage of a 3080 12gb? Bruh
Youre still having naming problems.
Anyway, its quite clear what happens: Diamond.updateAll(dt) is what causes an insta freeze.
I think you are trying to apply physics to non movable objects here, eh?
Edit: I didnt even spot the memory leak, but yea it goes up uncontrollably. Not related to the diamonds, i think you are reloading assets each frame.
Anyway, its quite clear what happens: Diamond.updateAll(dt) is what causes an insta freeze.
I think you are trying to apply physics to non movable objects here, eh?
Edit: I didnt even spot the memory leak, but yea it goes up uncontrollably. Not related to the diamonds, i think you are reloading assets each frame.
obey
Re: Performance issue: 80% usage of a 3080 12gb? Bruh
I need physics in order to get a hitbox, so when player collides with a diamond it calls the fucntion to:BrotSagtMist wrote: ↑Mon Dec 19, 2022 3:46 pm Youre still having naming problems.
Anyway, its quite clear what happens: Diamond.updateAll(dt) is what causes an insta freeze.
I think you are trying to apply physics to non movable objects here, eh?
add +1 to diamonds collected
destroys the hitbox
and removes it from the table that gets drawn
- BrotSagtMist
- Party member
- Posts: 659
- Joined: Fri Aug 06, 2021 10:30 pm
Re: Performance issue: 80% usage of a 3080 12gb? Bruh
No you dont, you dont need physics on not movable objects, they do not interact with the world, the player interacts with them.
In short you should not need to update these ever.
As for memory, as i thought: line 53 in player.lua
You are telling it to shove this picture into ram each frame. Like this game constantly just gobbles copies of that picture into it.
You need to change the reference, not reload it:
In short you should not need to update these ever.
As for memory, as i thought: line 53 in player.lua
You are telling it to shove this picture into ram each frame. Like this game constantly just gobbles copies of that picture into it.
You need to change the reference, not reload it:
Code: Select all
A={}
A.L=load("L.png")
A.R=load("R.png")
draw(A[direction])
obey
Who is online
Users browsing this forum: Bing [Bot], Google [Bot] and 12 guests