Search found 7 matches

by BathtubAmbassador
Tue Jul 12, 2016 2:18 am
Forum: Support and Development
Topic: "Questions that don't deserve their own thread" thread
Replies: 905
Views: 453677

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

Alright, I'm back with another really weird problem. I'm trying to optimize my fog-of-war system in my demo program. The player character currently has a 25x25 box within which they can see. To prevent to player from seeing around corners I use a raycast projected in many directions around the playe...
by BathtubAmbassador
Mon Jul 11, 2016 6:56 pm
Forum: Support and Development
Topic: "Questions that don't deserve their own thread" thread
Replies: 905
Views: 453677

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

... so if it's 1 and stays 1, you create a new tween every frame. That was indeed the issue. I rewrote it so that .inc instead starts at 0 for all soldiers, and if .inc == 0 then it instantly increments .inc up to 1 and then creates the first tween. It works now, thanks! By the way, I tried flux in...
by BathtubAmbassador
Mon Jul 11, 2016 4:32 pm
Forum: Support and Development
Topic: "Questions that don't deserve their own thread" thread
Replies: 905
Views: 453677

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

Looks like soldier.moving is constantly true. And yeah, print(finished) just prints "false" over and over. EDIT: Further fiddling reveals that the duration of the tween is never met, because after a while the internal timer of the tween just becomes whatever the current delta time is, and ...
by BathtubAmbassador
Mon Jul 11, 2016 4:38 am
Forum: Support and Development
Topic: "Questions that don't deserve their own thread" thread
Replies: 905
Views: 453677

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

I'm having an issue with kikito's tween.lua library where the tween movement never finishes, it only slows down to a crawl. This is a problem because this tween controls a sprite, and when the tween finishes I want the sprite to move somewhere else. But it never reaches the end state. The relevant p...
by BathtubAmbassador
Thu Jul 07, 2016 10:00 pm
Forum: Support and Development
Topic: SetCanvas() breaks drawing when using Tiled/STI
Replies: 4
Views: 2615

Re: SetCanvas() breaks drawing when using Tiled/STI

To clarify, the canvas is defined as being 1/16th the screen size. I then stretch it to fill the rest of the screen after I draw one pixel per tile. I'm trying to create a dimming effect for areas not within the "line of sight" of the object. Anyway, still trying to figure out what's going...
by BathtubAmbassador
Thu Jul 07, 2016 9:46 pm
Forum: Support and Development
Topic: SetCanvas() breaks drawing when using Tiled/STI
Replies: 4
Views: 2615

Re: SetCanvas() breaks drawing when using Tiled/STI

I just tried it and the character shows up again. Thanks a bunch, I was thinking I was gonna have to move all that code out of the layer draw function and make a bunch of variables global and such and such. Still working on making the canvas draw in the right position. I will upload a corrected vers...
by BathtubAmbassador
Thu Jul 07, 2016 8:21 pm
Forum: Support and Development
Topic: SetCanvas() breaks drawing when using Tiled/STI
Replies: 4
Views: 2615

SetCanvas() breaks drawing when using Tiled/STI

Hi, I've been working on a math demo using Tiled and the Simple Tiled Implementation library. I've got an issue where when I use setCanvas() to return to drawing the main screen, no graphics calls work until the end of the function setCanvas() is in. I'm trying to draw a 16th size canvas onto the ma...