Need Scrolling method

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
Post Reply
poptard
Prole
Posts: 4
Joined: Fri Mar 11, 2016 12:31 am

Need Scrolling method

Post by poptard »

Hello, this is poptard.

I am using the scrolling method at https://love2d.org/wiki/Tutorial:Effici ... _Scrolling,
however the game still gobbles up 45%+ of my processor while running, spiking to 80-90% at certain rare intervals.

Is there a more efficient method of tile-based scrolling?

updateTilesetBatch() would seem to clear and replenish the whole batch every second.
Could canvases reduce number of redraws?


Thanks for any help
Movies should be more like music
User avatar
MadByte
Party member
Posts: 533
Joined: Fri May 03, 2013 6:42 pm
Location: Braunschweig, Germany

Re: Need Scrolling method

Post by MadByte »

Welcome to the forums!
Could you share your code and also tell us what system (CPU, GPU, MEM, OS) you're working on?
For me it sounds like either your code causes a problem somewhere or you work on a toaster.
poptard
Prole
Posts: 4
Joined: Fri Mar 11, 2016 12:31 am

Re: Need Scrolling method

Post by poptard »

I'm working on a brand new Asus X555L laptop Core i3, running Linux Mint.

It's runs Half Life 2 at 60 fps on max settings.


EDIT: Oh, i don't have that problem today. I guess my computer was just acting up for the past month
Attachments
screen.png
screen.png (168.99 KiB) Viewed 2175 times
branch.tar.gz
game
(238.24 KiB) Downloaded 127 times
Movies should be more like music
User avatar
MadByte
Party member
Posts: 533
Joined: Fri May 03, 2013 6:42 pm
Location: Braunschweig, Germany

Re: Need Scrolling method

Post by MadByte »

Weird, maybe it's a driver compatibility issue or something like that. The game runs fine performance wise.
User avatar
pgimeno
Party member
Posts: 3641
Joined: Sun Oct 18, 2015 2:58 pm

Re: Need Scrolling method

Post by pgimeno »

I've noticed these kinds of problems when I run two OpenGL applications at once. They don't run at 50% speed, more like 5%. Wonder if that was poptard's case.
Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], Bing [Bot] and 4 guests