Delightful forums forced me to re read my code with fresh eyes. Solution found.
The issue delt with (Image):setWrap and I merely swap image variables during a copy paste session.
Issue with (Image):setWrap (Solved)
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
- Ranguna259
- Party member
- Posts: 911
- Joined: Tue Jun 18, 2013 10:58 pm
- Location: I'm right next to you
Re: Issue with (Image):setWrap (Solved)
So.. The question was .. ?
EDIT: And if you mean that no one replied to your post then remember that it's 4 AM in GMT +0:00 right now, people are asleep.
EDIT: And if you mean that no one replied to your post then remember that it's 4 AM in GMT +0:00 right now, people are asleep.
Re: Issue with (Image):setWrap (Solved)
It had to do with the way setWrap was acting like it was set to the default clamped instead of repeat when I had set it to repeat. I was being literal, the forums here are active and get quick intelligent responses. The fact that I knew I could actually post here and get help sent me about making a detailed post with the relevant code links and screenshot. It wasn't till I was reviewing the post later after a short break that I debugged it myself. This forum is a great resource and I'm glad we have it available.
The one thing (not to hijack a thread) I was wondering about is documentation or tutorials on efficiency. I'm currently limiting draw calls and I hear the canvas and batching help too but if anyone who reads this happens to have a guide to keeping love efficient I'd love to read it.
The one thing (not to hijack a thread) I was wondering about is documentation or tutorials on efficiency. I'm currently limiting draw calls and I hear the canvas and batching help too but if anyone who reads this happens to have a guide to keeping love efficient I'd love to read it.
Re: Issue with (Image):setWrap (Solved)
I'm not aware of any efficiency guide, but here are some general pointers for drawing:2dcode wrote:if anyone who reads this happens to have a guide to keeping love efficient I'd love to read it.
Do not recreate that which you can reuse.
Example: creating images/anything non-trivial every frame vs once in load/after change.
If you think you can use a spritebatch, you probably should use a spritebatch.
Example: making a lot of draw calls to draw terrain vs one spritebatch.
- Ranguna259
- Party member
- Posts: 911
- Joined: Tue Jun 18, 2013 10:58 pm
- Location: I'm right next to you
Re: Issue with (Image):setWrap (Solved)
I'm glad you find it great
My two cents on efficiency:
Don't use
and
repeatedly, or else you'll make a RAM bomb.
My two cents on efficiency:
Don't use
Code: Select all
love.graphics.newFont()
Code: Select all
love.graphics.setNewFont()
Re: Issue with (Image):setWrap (Solved)
Indeed, I've been keeping all my decelerations and initializations in love.load() with the exception of some redraws and collisions checks. I've been trying to hide everything behind if statements to keep blocks from having to execute every cycle and with batch drawing or depending on how the canvas works the redraw for the actual on screen elements might even be able to be simplified. I'm still having to do box collision checks which requires checking the protagonists box against all the collideables. That seems a little much but I'm not sure how to simplify it. Good advice, I'll check out sprite batches more. I know there are some programs to auto build the sprite sheets too.
Who is online
Users browsing this forum: Google [Bot], Semrush [Bot] and 0 guests