Search found 19 matches

by sefan
Thu Feb 22, 2018 9:36 am
Forum: General
Topic: Need help with (big) Table iteration
Replies: 4
Views: 163

Re: Need help with (big) Table iteration

Welcom to the forum. Please upload a .love file of your code. It makes it easier if you want people to help you. It's hard to see on this code whats slowing your game down. Because I can't see whats happening in v:update() and v:draw(). To save some startup time you could put all the loadedMap code ...
by sefan
Sun Dec 03, 2017 9:42 am
Forum: Games and Creations
Topic: Space Invaders: 1K Challenge
Replies: 7
Views: 1008

Re: Space Invaders: 1K Challenge

Thanks Ivan. I will improve the code :) Looked through your code. I think you can win a lot of characters by skipping love.update and put it all in love.draw. The line "function L.update(_)" is 20 characters and you can reuse same for-loop for calculation and drawing. One more thing you can do to sa...
by sefan
Sat Dec 02, 2017 8:20 pm
Forum: Games and Creations
Topic: Space Invaders: 1K Challenge
Replies: 7
Views: 1008

Re: Space Invaders: 1K Challenge

My code so far: L=love G=L.graphics R=G.rectangle K=L.keyboard.isDown F="fill" N={5,5,5,5,5,5,5,5,5,5,5} x=0 B=0 V=0 D=1 I=0 O=0 P=0 function L.draw()W,H=G.getDimensions() S=W/30 y=H-S if K("a")and x-1>0 then x=x-1 end if K("d")and x+1<W-S then x=x+1 end if K("w") and D>0 then B=x V=y D=0 end if I<1...
by sefan
Mon Nov 13, 2017 3:59 pm
Forum: Support and Development
Topic: What are the best plugins for Sublime when using Love 2D
Replies: 6
Views: 496

Re: What are the best plugins for Sublime when using Love 2D

I use Lua Love and its great. Highlighting and has all the love-functions built in.
https://love2d.org/wiki/Sublime_Text
by sefan
Thu Oct 19, 2017 2:47 pm
Forum: General
Topic: NekoGear.com (LÖVE T-Shirts, etc)
Replies: 62
Views: 41231

Re: NekoGear.com (LÖVE T-Shirts, etc)

Sorry for the double post, but it's been some time, and it seems like the address itself isn't available anymore (www.nekogear.com). I regret only ordering one piece of clothing some time ago, so what are the chances that some kind of LÖVE fan shop will come online again? If it depends on who is wi...
by sefan
Sun Jul 30, 2017 8:44 pm
Forum: Support and Development
Topic: Use require function.
Replies: 6
Views: 642

Re: Use require function.

After you require a file you can use all functions in that file. So if you have the functions playerload, playerupdate and playerdraw in your player.lua file. You can write this: Main.lua require "player" --require file player.lua function love.load() playerload() --loading player end function love....
by sefan
Sun Jul 30, 2017 8:24 pm
Forum: Support and Development
Topic: Use require function.
Replies: 6
Views: 642

Re: Use require function.

You can only have one load/update/draw. Name you other functions different and call them. Like this: main.lua require("color") --require file color.lua require("player") --require file player.lua function love.load() menu = false colors() --Calls colors in color.lua end function love.update(dt) if m...
by sefan
Mon Jul 10, 2017 7:40 pm
Forum: Libraries and Tools
Topic: Simple Tiled Implementation - STI v0.18.2.1
Replies: 742
Views: 122674

Re: Simple Tiled Implementation - STI v0.18.2.1

I'm using Box2D and rotating and flipping tiles sets the collision box in the wrong cell. See attachment, black lines are tiles and red boxes are collision box. Have downloaded the latest Tiled and STI with plugins. I'm doing something wrong or so the plugin not support rotating/flipping tiles? Edit...
by sefan
Mon Mar 06, 2017 9:47 pm
Forum: Support and Development
Topic: Bump change value on contact
Replies: 2
Views: 396

Re: Bump change value on contact

Thanks MrFariator.
Got an idea how to solve this now :)
by sefan
Mon Mar 06, 2017 6:47 pm
Forum: Support and Development
Topic: Bump change value on contact
Replies: 2
Views: 396

Bump change value on contact

Hi, I currently using Bump as my collision library and need some help. I'm trying to make so if the player stand on a button in will activate and when the player leaves the button deactivates it. Is there any smart way to do this with Bump? Or should i use Love Physics for this? that have beginConta...