The code seems to crash because it is written for an older version of LÖVE.
The function "drawq" was only available in older versions of LÖVE, I think up to 0.8. In the current verions 0.9.2 it has been removed and replaced by draw.
Search found 1078 matches
- Wed Jul 08, 2015 7:22 am
- Forum: Libraries and Tools
- Topic: Platformer game engine (a proper one, really!)
- Replies: 30
- Views: 31860
- Tue Jul 07, 2015 5:42 am
- Forum: Support and Development
- Topic: [SOLVED]Draw order affecting speed
- Replies: 10
- Views: 6695
Re: Draw order affecting speed
Hi and welcome to the forum! You are correct: Drawing many images can make a game slow, but there are some methods to speed it up. As a rule of thumb, try to minimize the number of "love.graphics.draw"-calls. Every time you call it, LÖVE has to communicate with the graphics card and that t...
- Sat Jul 04, 2015 7:58 am
- Forum: Support and Development
- Topic: Fast grid drawing
- Replies: 7
- Views: 5262
Re: Fast grid drawing
I would try to avoid a 1000x1000 tile-sized canvas. The grid itself is very much repetitive and that would be a waste of memory. There are two elegant methods. 1) Like S0lll0s already suggested, do not draw all 1000 by 1000 rectangles, but only those, that are inside the screen. Do this by running t...
- Sat Jul 04, 2015 7:33 am
- Forum: Support and Development
- Topic: [Solved]How to create "explosions" no PS or Physics?
- Replies: 2
- Views: 2160
Re: How to create "explosions" no PS or Physics?
Hey, you are on the right track. The change you need is this: When you spawn one of the small particles, you need to give it a random x- and y-velocity once. Then while it is flying do not use any randomness, but only physics. Here are the lines you need to change: function particles.Spawn(x, y, amo...
- Fri Jul 03, 2015 6:33 am
- Forum: Support and Development
- Topic: draw entities based on their depth
- Replies: 2
- Views: 1834
Re: draw entities based on their depth
Lua provides a sorting function for tables and it even allows you to sort by depth. Have a look here for example: Table tutorial.
- Thu Jul 02, 2015 9:08 am
- Forum: Support and Development
- Topic: How to code GLSL shaders?
- Replies: 1
- Views: 1909
- Thu Jul 02, 2015 6:23 am
- Forum: Support and Development
- Topic: velocity (without love.physics)
- Replies: 2
- Views: 1513
Re: velocity (without love.physics)
You can achieve this by adding velocty to the equations: if love.keyboard.isDown('up') then self.vx = self.vx + math.cos(self.rot-math.pi/2) * self.acceleration * dt; self.vy = self.vy + math.sin(self.rot-math.pi/2) * self.acceleration * dt; end self.x = self.x + self.vx * dt self.y = self.y + self....
- Mon Jun 29, 2015 5:36 am
- Forum: Support and Development
- Topic: white halo around certain sprites but not others
- Replies: 6
- Views: 2551
Re: white halo around certain sprites but not others
Thanks.
It turned out my initial guess was correct. The red bullet image had "white-transparent" pixels in the background. Here is a .love with the original image and a corrected one (black-transparent).
You can press and hold spacebar to stop rotation.
It turned out my initial guess was correct. The red bullet image had "white-transparent" pixels in the background. Here is a .love with the original image and a corrected one (black-transparent).
You can press and hold spacebar to stop rotation.
- Sun Jun 28, 2015 6:37 pm
- Forum: Support and Development
- Topic: white halo around certain sprites but not others
- Replies: 6
- Views: 2551
Re: white halo around certain sprites but not others
Could you upload a minimal example .love file, so that we can have a look at it?
- Sun Jun 28, 2015 11:04 am
- Forum: Support and Development
- Topic: white halo around certain sprites but not others
- Replies: 6
- Views: 2551
Re: white halo around certain sprites but not others
The problem comes from mixing the transparent pixels with the colored pixels. In this case it makes a difference, whether the background is black-transparent (0,0,0,0) or white-transparent (255,255,255,0). To solve the issue, set the background of your image to the same color as the outline of the o...