Search found 12 matches

by Cylog
Tue Jun 21, 2011 3:28 pm
Forum: Support and Development
Topic: Love Game Slave Example Source & Performance
Replies: 15
Views: 6793

Re: Love Game Slave Example Source & Performance

...it returns nil -.- So, you mean to debug it like this? Displaying the error message? function eventtimer(dt) time = time + (timerspeed * dt) --EVENT 1 if time >= 1500 then layerdecayactive = true end --EVENT 2 if time >= 1400 then --play music -- love.audio.play(music4) musicload:send("ping&...
by Cylog
Tue Jun 21, 2011 2:19 pm
Forum: Support and Development
Topic: Love Game Slave Example Source & Performance
Replies: 15
Views: 6793

Re: Love Game Slave Example Source & Performance

In the loop! Yeah, I was expecting this. I tried it both ways, in the loop and out of the loop, and both didn't work. The game doesn't get stuck or changes the background-color. Sorry for asking such a noobish question... but what do you mean by getting the "error" variable? Just: errorms...
by Cylog
Tue Jun 21, 2011 1:39 pm
Forum: Support and Development
Topic: Love Game Slave Example Source & Performance
Replies: 15
Views: 6793

Re: Love Game Slave Example Source & Performance

... I'd go for demand instead. Well, I tried demand... in musicload.lua: local this_thread = love.thread.getThread() local msg = this_thread:demand("ping") while (true) do if (msg) then this_thread:send("response", true) end end and also in routines.lua, function eventtimer(dt) ...
by Cylog
Tue Jun 21, 2011 12:41 pm
Forum: Support and Development
Topic: Love Game Slave Example Source & Performance
Replies: 15
Views: 6793

Re: Love Game Slave Example Source & Performance

Oh, sorry I forgot to include that. Anyways, I'll just upload the whole .love file. As for the art... it's just a sketch and quickly colored to get a quick impression ^^ Well, there you go. main.lua calls the function exospark() from routines.lua. routines. exospark() creates the thread. The functio...
by Cylog
Tue Jun 21, 2011 8:22 am
Forum: Support and Development
Topic: Love Game Slave Example Source & Performance
Replies: 15
Views: 6793

Re: Love Game Slave Example Source & Performance

Be aware that your images will need to be sized to a power of two in each dimension to work properly on all systems (8, 16, 32, 64, 128, 256, 512, etc...) I heard about that, thanks for reminding me anyways ^^ My game is still in a prototype phase, the image will be cut down to proper dimensions la...
by Cylog
Mon Jun 20, 2011 11:00 pm
Forum: Support and Development
Topic: Love Game Slave Example Source & Performance
Replies: 15
Views: 6793

Re: Love Game Slave Example Source & Performance

Because it loads, what? 10 small images? That shouldn't take long. Also, disk i/o. True, true, didn't think of that. Oh the performance problem makes more sense now. I'm loading a "giant" 1162 × 688 picture on start, so I guess that is the main problem. It probably would be faster to cut ...
by Cylog
Mon Jun 20, 2011 6:13 pm
Forum: Support and Development
Topic: Love Game Slave Example Source & Performance
Replies: 15
Views: 6793

Re: Love Game Slave Example Source & Performance

Oh sweet, thanks for the fast reply nevon, TechnoCat. I didn't notice that thread, thanks. Hm, funny, the Game Slave Demo isn't using Images per se, it seems that it decodes base64 files which are turned into ImageData. Weird. And it's not even using Threads... this should be somewhat inefficient, y...
by Cylog
Mon Jun 20, 2011 2:01 pm
Forum: Support and Development
Topic: Love Game Slave Example Source & Performance
Replies: 15
Views: 6793

Love Game Slave Example Source & Performance

Hi everyone! I was fiddling around with my first project and noticed some slow-downs and a delay when starting the game. It most likely comes from loading the music, fonts etc. so I guessed it would be neat to use threads... the problem is, I have no idea how they work. I tried to understand example...
by Cylog
Thu May 05, 2011 4:18 pm
Forum: Support and Development
Topic: (Inherited) Alpha Mode Problem
Replies: 7
Views: 4190

Re: (Inherited) Alpha Mode Problem

@Lafolie: I meant, something like a Optimization Algorithm, which looks through all the Enemies/Elements/Objects/Text which have to be drawn on Screen and sorts them, in order to save a few setColor() Calls... That idea was foolish, I simply wasn't keeping in mind the importance of the order in whic...
by Cylog
Thu May 05, 2011 12:35 pm
Forum: Support and Development
Topic: (Inherited) Alpha Mode Problem
Replies: 7
Views: 4190

Re: (Inherited) Alpha Mode Problem

Whenever I use a drawing operation I always use setColor first. You can't really go wrong then. Of course, if you're iterating through a table or something then it's better to just use the one setColor call, provided you want all the images to have the same colour offset. Seems a good (and of cours...