Search found 174 matches
- Tue Dec 08, 2020 2:13 pm
- Forum: Support and Development
- Topic: Need help with making surface of image clickable.
- Replies: 10
- Views: 10122
Re: Need help with making surface of image clickable.
Also you should not call love.graphics.newImage in love.draw or love.update, because it causes to load image every frame and the game will be very laggy. Instead of this, load it in love.load and then use it in love.draw (see big yellow warning at wiki love.graphics.newImage)
- Mon Dec 07, 2020 5:03 pm
- Forum: Games and Creations
- Topic: Run'N'Jump: A Vague clone of chrome://dino
- Replies: 5
- Views: 5182
Re: Run'N'Jump: A Vague clone of chrome://dino
Hi and welcome to the forums! The text looks awful... How do I fix it? You are scaling default font (which has size 12) five times and that's why it looks so awful. You can create new font in love.load (with bigger size, eg: ourFont=love.graphics.newFont(size) and set it in love.draw (eg: love.graph...
- Thu Jun 25, 2020 5:28 pm
- Forum: Support and Development
- Topic: [SOLVED] Doubt with STI and Camera libraries
- Replies: 5
- Views: 3968
Re: Doubt with STI and Camera libraries
But exist another way to syncronize the camera with the map? Yes, comment out lines 820-822 and line 830 (lg.push, origin, translate and pop functions are here) in libs/STI/sti/init.lua I had this, when I set scale in 0.5 with gamera. Comment out line 836 (lg.scale) in libs/STI/sti/init.lua After a...
- Wed Jun 24, 2020 2:20 pm
- Forum: Support and Development
- Topic: [SOLVED] Doubt with STI and Camera libraries
- Replies: 5
- Views: 3968
Re: Doubt with STI and Camera libraries
I looked into STI library, and found, that draw function resets coordinates (inside of love.graphics.push and pop = it's not affected by transformation of camera), so you have to pass tx,ty - translateX,Y to map:draw (it's line 813 of libs/STI/sti/init.lua)
- Thu Jun 18, 2020 1:23 pm
- Forum: General
- Topic: please i need help
- Replies: 3
- Views: 3932
Re: please i need help
For more detailed and platform specific instructions see wiki
- Sat Jun 13, 2020 7:52 am
- Forum: Support and Development
- Topic: How to make a shortcut key on Love2d support to work?
- Replies: 1
- Views: 2672
Re: How to make a shortcut key on Love2d support to work?
Hi and welcome to the forums! Did you modified "pixelbyte.love2d.srcDir" setting? It sets source folder to search for main.lua as relative path from root of the project. Default its "src" so your main.lua must be in (root of project)/src/main.lua until you change this setting. Th...
- Fri Jun 12, 2020 6:56 pm
- Forum: Support and Development
- Topic: using gsub() on a filename and it does not open
- Replies: 3
- Views: 2767
Re: using gsub() on a filename and it does not open
In love.filesystem.newFileData you are specifying 3rd argument but it has no meaning since its syntax is (filepath) or (content, name).
And please use [code]your code here[/code] tags when pasting code
And please use [code]your code here[/code] tags when pasting code
- Thu Jun 11, 2020 4:21 pm
- Forum: Support and Development
- Topic: [Support-ERROR Code]
- Replies: 1
- Views: 2618
Re: [Support-ERROR Code]
Hi and welcome to the forums!
If you want to run a game, you must run:
a) .love (zip archive) which has main.lua at top level
b) folder, that directly contains main.lua file
(you can drop it onto love.exe or run from command prompt)
see wiki for more info
If you want to run a game, you must run:
a) .love (zip archive) which has main.lua at top level
b) folder, that directly contains main.lua file
(you can drop it onto love.exe or run from command prompt)
see wiki for more info
- Thu Jun 11, 2020 3:29 pm
- Forum: Libraries and Tools
- Topic: [util] shadertoy shader effect viewer
- Replies: 14
- Views: 27228
Re: [util] shadertoy shader effect viewer
It happens only to me, that Löve simply crashes on love.graphics.newShader function runned in pcall with no message on shader "circle inversion laser.glsl"? (using LÖVE 11.3 on Windows 8.1, I can boot Ubuntu and try it on it too) Update: When I removed line 4: #define frame(u) camLens*(u-....
- Wed Jun 10, 2020 2:55 pm
- Forum: Libraries and Tools
- Topic: [util] shadertoy shader effect viewer
- Replies: 14
- Views: 27228
Re: [util] shadertoy shader effect viewer
You can increase performance by remove love.graphics.draw call in love.update because it has no effect and you are already calling it in love.draw (in my case, it doubles FPS)