Retain screen without love.draw and canvas

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
utunnels
Citizen
Posts: 75
Joined: Fri Jan 06, 2012 5:20 pm

Retain screen without love.draw and canvas

Post by utunnels » Thu Aug 01, 2013 6:58 am

It seems even if I copy love.run from source code and remove love.graphics.clear from code, the screen still loses after I minimize the window.

User avatar
slime
Solid Snayke
Posts: 2888
Joined: Mon Aug 23, 2010 6:45 am
Location: Nova Scotia, Canada
Contact:

Re: Retain screen without love.draw and canvas

Post by slime » Thu Aug 01, 2013 7:13 am

Yes, GPUs and drivers and window managers are not designed to be used like that.

utunnels
Citizen
Posts: 75
Joined: Fri Jan 06, 2012 5:20 pm

Re: Retain screen without love.draw and canvas

Post by utunnels » Thu Aug 01, 2013 7:27 am

So my best bet is canvas?

User avatar
raidho36
Party member
Posts: 2063
Joined: Mon Jun 17, 2013 12:00 pm

Re: Retain screen without love.draw and canvas

Post by raidho36 » Thu Aug 01, 2013 7:30 am

Just redraw your screen.

utunnels
Citizen
Posts: 75
Joined: Fri Jan 06, 2012 5:20 pm

Re: Retain screen without love.draw and canvas

Post by utunnels » Thu Aug 01, 2013 7:35 am

OK.
I just thought it sometimes has thousands of print call since it a text and grid based interface.

User avatar
raidho36
Party member
Posts: 2063
Joined: Mon Jun 17, 2013 12:00 pm

Re: Retain screen without love.draw and canvas

Post by raidho36 » Thu Aug 01, 2013 7:49 am

Roguelike, eh? Create a spritesheet with letters in it, and use spritebatch to render the map.

utunnels
Citizen
Posts: 75
Joined: Fri Jan 06, 2012 5:20 pm

Re: Retain screen without love.draw and canvas

Post by utunnels » Thu Aug 01, 2013 7:50 am

Yeah, I'll try. Thanks.

User avatar
micha
Inner party member
Posts: 1083
Joined: Wed Sep 26, 2012 5:13 pm

Re: Retain screen without love.draw and canvas

Post by micha » Thu Aug 01, 2013 8:07 am

utunnels wrote:So my best bet is canvas?
Besides spritebatches, canvas is a natural and efficient solution to the problem. The main downside is, that canvases are not supported by all types of graphics cards. If you want to be sure that everyone can run your game, try to avoid canvases or make it optional.

Post Reply

Who is online

Users browsing this forum: No registered users and 36 guests