"Questions that don't deserve their own thread" thread

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.
User avatar
murks
Party member
Posts: 185
Joined: Tue Jun 03, 2014 4:18 pm

Re: "Questions that don't deserve their own thread" thread

Post by murks »

I wonder whether using S3TC is a good idea. It might restrict the portability of your game.
The problem is that this stuff is still patent encumbered. On Linux and possibly other systems it might therefor not be available. I know that it is not available by default on Linux with Intel graphics, it might be different for the proprietary ATI/NVIDIA drivers.
It is also a lossy format and not suitable for some kinds of graphics.
User avatar
Ranguna259
Party member
Posts: 911
Joined: Tue Jun 18, 2013 10:58 pm
Location: I'm right next to you

Re: "Questions that don't deserve their own thread" thread

Post by Ranguna259 »

Is it really incompatible with some system ? Even if I load it throught LÖVE ?
LoveDebug- A library that will help you debug your game with an on-screen fully interactive lua console, you can even do code hotswapping :D

Check out my twitter.
User avatar
slime
Solid Snayke
Posts: 3131
Joined: Mon Aug 23, 2010 6:45 am
Location: Nova Scotia, Canada
Contact:

Re: "Questions that don't deserve their own thread" thread

Post by slime »

murks wrote:I wonder whether using S3TC is a good idea. It might restrict the portability of your game.
The problem is that this stuff is still patent encumbered. On Linux and possibly other systems it might therefor not be available. I know that it is not available by default on Linux with Intel graphics, it might be different for the proprietary ATI/NVIDIA drivers.
Here's a table showing support for S3TC/DXT collected by a game that has a disproportionately large Linux userbase: http://feedback.wildfiregames.com/repor ... ssion_s3tc

Don't worry about portability on desktops, all GPUs support it, all drivers on OS X / Windows support it, all proprietary drivers on Linux support it, and most/all open-source drivers on Linux support it. The handful of Linux systems that don't support it out-of-the-box can either set 'force_s3tc_enable=true' to enable it, or they can get the 'libtxc-dxtn' package which gives them support.
Whatthefuck
Party member
Posts: 106
Joined: Sat Jun 21, 2014 3:45 pm

Re: "Questions that don't deserve their own thread" thread

Post by Whatthefuck »

Since I have to clear/re-add sprites to spritebatches quite often, can someone provide an example on how to add a sprite to a spritebatch via FFI if it's possible?

Having to clear 32 spritebatches (on a 1680x1050 res) and re-add 8192 sprites once the lighting changes is way too many C func calls and makes a slight stutter.
User avatar
Ranguna259
Party member
Posts: 911
Joined: Tue Jun 18, 2013 10:58 pm
Location: I'm right next to you

Re: "Questions that don't deserve their own thread" thread

Post by Ranguna259 »

Is there any way to draw lines like these:
line.png
line.png (130 Bytes) Viewed 7101 times
Image

I once saw a lib here that did this but I can't remember it's name.
LoveDebug- A library that will help you debug your game with an on-screen fully interactive lua console, you can even do code hotswapping :D

Check out my twitter.
User avatar
micha
Inner party member
Posts: 1083
Joined: Wed Sep 26, 2012 5:13 pm

Re: "Questions that don't deserve their own thread" thread

Post by micha »

If it is just about finding the screen coordinates of the end points of these lines, then this is not very difficult. If you want to draw lines, with varying line width, then you'd have to use meshes.

For the screen coordinates: Assume you have a 3d point (x,y,z) and want to know where it is on screen. Then first define the position of the vanishing point (x_v,y_v) on screen. Calculate the difference-vector between (x,y) and (x_v,y_v) and divide by z. Add this to the vanishing point. In code:

Code: Select all

local x_v,y_v = 400,300
local x_screen = x_v + (x-x_v)/z
local y_screen = y_v + (y-y_v)/z
Also check out the video tutorial by Oysi
Whatthefuck
Party member
Posts: 106
Joined: Sat Jun 21, 2014 3:45 pm

Re: "Questions that don't deserve their own thread" thread

Post by Whatthefuck »

If I send a canvas and spritebatch reference to another thread, do drawing stuff there, will the canvas be automatically updated on the main thread since it's the same userdata?
User avatar
mickeyjm
Party member
Posts: 237
Joined: Thu Dec 29, 2011 11:41 am

Re: "Questions that don't deserve their own thread" thread

Post by mickeyjm »

While I don't know the answer I do know that the wiki says not to use love.graphics in a thread (other than the main one obviously). So I wouldn't recommend doing it even if it did update the main thread's version of the canvas
Your screen is very zoomed in...
Whatthefuck
Party member
Posts: 106
Joined: Sat Jun 21, 2014 3:45 pm

Re: "Questions that don't deserve their own thread" thread

Post by Whatthefuck »

mickeyjm wrote:While I don't know the answer I do know that the wiki says not to use love.graphics in a thread (other than the main one obviously). So I wouldn't recommend doing it even if it did update the main thread's version of the canvas
Well that pretty much completely ruins the functionality of threads for me if I can't render something to a canvas on a separate thread.
User avatar
Fenrir
Party member
Posts: 222
Joined: Wed Nov 27, 2013 9:44 am
Contact:

Re: "Questions that don't deserve their own thread" thread

Post by Fenrir »

Well that pretty much completely ruins the functionality of threads for me if I can't render something to a canvas on a separate thread.
Well consider it as ruined, drawing even on canvas must be done in the main thread.
Locked

Who is online

Users browsing this forum: No registered users and 47 guests