Search found 106 matches

by Whatthefuck
Fri Jul 18, 2014 2:50 pm
Forum: Support and Development
Topic: "Questions that don't deserve their own thread" thread
Replies: 905
Views: 186204

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

256 sprites is for a 16x16 canvas, which is then upscaled to 320x320 to let linear filtering smooth it out. How come you have a sprite for each pixel? Lighting is generally very well suited to shaders (which can process millions of pixels per frame with no sweat) - at the very least I've never hear...
by Whatthefuck
Fri Jul 18, 2014 2:32 pm
Forum: Support and Development
Topic: "Questions that don't deserve their own thread" thread
Replies: 905
Views: 186204

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

I have to recompute the lighting quite often, so the only way of optimizing it is by splitting it up into numerous canvases and spritebatches, in order to render less. (Stuff that is out of the player's vision basically) 256 sprites is for a 16x16 canvas, which is then upscaled to 320x320 to let lin...
by Whatthefuck
Fri Jul 18, 2014 1:29 pm
Forum: Support and Development
Topic: "Questions that don't deserve their own thread" thread
Replies: 905
Views: 186204

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

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. It's pretty dumb though. Userdata is shared (awesome), variables/etc are not, ...
by Whatthefuck
Fri Jul 18, 2014 1:13 pm
Forum: Support and Development
Topic: "Questions that don't deserve their own thread" thread
Replies: 905
Views: 186204

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

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...
by Whatthefuck
Fri Jul 18, 2014 12:36 pm
Forum: Support and Development
Topic: "Questions that don't deserve their own thread" thread
Replies: 905
Views: 186204

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

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?
by Whatthefuck
Thu Jul 17, 2014 8:18 pm
Forum: Support and Development
Topic: "Questions that don't deserve their own thread" thread
Replies: 905
Views: 186204

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

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...
by Whatthefuck
Wed Jul 16, 2014 8:31 pm
Forum: Support and Development
Topic: "Questions that don't deserve their own thread" thread
Replies: 905
Views: 186204

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

I have a question: Is there any way to make images smaller (memory wise) ? I have loads of PNGs that I need to load but in the game they are going to be resized quite a lot (they'll be smaller) so I was thinking if there was a way to make resized images smaller in termes of memory. Would canvas do ...
by Whatthefuck
Wed Jul 16, 2014 8:34 am
Forum: Support and Development
Topic: "Questions that don't deserve their own thread" thread
Replies: 905
Views: 186204

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

If you're going to be adding/changing the sprites every frame then you should also use the 'stream' SpriteBatch usage hint when creating the spritebatch (i.e. love.graphics.newSpriteBatch(image, maxsprites, "stream")). If you aren't modifying the spritebatch every frame, 'static' might be the best ...
by Whatthefuck
Wed Jul 16, 2014 8:04 am
Forum: Support and Development
Topic: "Questions that don't deserve their own thread" thread
Replies: 905
Views: 186204

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

Let's try this. If you have a question, but don't think it deserves it's own thread, post it here and get help from fellow forum members. I'll start. When using sprite batches, if I need to change all of it's sprites, which would be cheaper: clearing + readding or setting the sprite in the spritebat...
by Whatthefuck
Sat Jul 05, 2014 7:10 pm
Forum: General
Topic: What's everyone working on? (tigsource inspired)
Replies: 1717
Views: 679481

Re: What's everyone working on? (tigsource inspired)

http://i.imgur.com/HOWVJNo.png Working on a 2d sidescroller with procedurally generated worlds. (gee I wonder where I've seen that before!) Wrote a cave gen in about 10 minutes or so, using the cellular automata method, looks pretty good so far. The holes in the background you see are places where ...