Search found 438 matches

by undef
Fri May 06, 2016 2:31 pm
Forum: General
Topic: Implementing rhythm-based mechanics
Replies: 9
Views: 5841

Re: Implementing rhythm-based mechanics

Ah, I shouldn't have looked at that reddit post earlier.
Great resource! Thanks for pointing it out! :)
by undef
Thu May 05, 2016 6:38 pm
Forum: General
Topic: Concise game implementations
Replies: 6
Views: 4211

Re: Concise game implementations

Ooops, the danger of playtesting alone^^
by undef
Thu May 05, 2016 5:43 pm
Forum: General
Topic: Concise game implementations
Replies: 6
Views: 4211

Concise game implementations

Hey, let's share very short game implementations. I wrote this pure Lua, terminal based, two player RPS game today: choice, winning = {}, { r = 's', p = 'r', s = 'p' } for n=1, 2 do print( ("Player %d:\nType 'r' for rock, 'p' for paper, or 's' for scissors and press return."):format( n ) )...
by undef
Wed May 04, 2016 6:13 am
Forum: General
Topic: Implementing rhythm-based mechanics
Replies: 9
Views: 5841

Re: Implementing rhythm-based mechanics

I don't get it. function getInterpolatedTimer(dt) songTime = songTime + dt - previousFrameTime -- this should be ~0 for the first frame songTime = (songTime + (songPlay:tell("seconds")*1000))/2 -- which means this should be half of the song time after the first frame? end The way I see it ...
by undef
Tue May 03, 2016 8:07 am
Forum: Games and Creations
Topic: Printers Are From HELL [First love2d game][casual]
Replies: 15
Views: 9989

Re: Printers Are From HELL [First love2d game][casual]

Congratulations on your first game! It's good fun! :) One little logic bug is that the wifi password can be different during the same session, but that's not really a problem. One more piece of feedback: I only understood the red progress bar when replugging the power cable after my third try - it l...
by undef
Tue May 03, 2016 6:26 am
Forum: General
Topic: Implementing rhythm-based mechanics
Replies: 9
Views: 5841

Re: Implementing rhythm-based mechanics

You're probably looking for [url=Source:tell]https://love2d.org/wiki/Source:tell[/url]. Divide this by your beat length in seconds (which is your bpm/60). Don't forget that there might be an offset at the beginning of the audio file, because of silence etc. So make sure to take that into account so ...
by undef
Sun May 01, 2016 1:39 pm
Forum: General
Topic: Mini Functions Repository
Replies: 48
Views: 41318

Re: Mini Functions Repository

snip Ah, that's how I zero pad or space pad numbers, but for some reason I didn't think of using it for strings, and I didn't know it's possible to right align like that as well. Thanks :) I also chose this implementation because just like the npm version it allows padding with any character (which...
by undef
Mon Apr 25, 2016 6:17 am
Forum: General
Topic: Mini Functions Repository
Replies: 48
Views: 41318

Re: Mini Functions Repository

I wrote this fancy left-pad function:

Code: Select all

function leftpad( str, len, ch )  ch = ch or " "
    return string.rep( ch, len - #str ) .. str
end
Hmm, maybe I should put it on Luarocks...
by undef
Thu Apr 21, 2016 3:45 am
Forum: General
Topic: Optimizing performance on iOS and Android
Replies: 2
Views: 2621

Re: Optimizing performance on iOS and Android

Hey, also made a rhythm game and ported it to mobile (it's not out on mobile yet though). Most importantly, you have to find the bottlenecks. It doesn't make sense to optimize stuff that doesn't help overall performance. To do that look for deep loops, or other stuff where you suspect it might be he...
by undef
Wed Mar 30, 2016 5:33 pm
Forum: Ports
Topic: LöveFTW - preview release
Replies: 81
Views: 200274

Re: LöveFTW - preview release

Seems like Microsoft is opening up their Xbox now for uwp apps.
But they may only use 1GB of RAM - seems like a perfect fit for LÖVE ;)