Search found 41 matches

by farzher
Fri Aug 21, 2015 4:47 am
Forum: Libraries and Tools
Topic: Chain: a utility function for avoiding callback hell
Replies: 11
Views: 8187

Re: Chain: a utility function for avoiding callback hell

Not a bad idea :) node.js is my main language

Although I think next is the standard name for the callback function
continue usually means something else in programming languages
(also next is shorter)
by farzher
Mon Aug 17, 2015 6:35 am
Forum: Libraries and Tools
Topic: hoot.lua (Handles-free Object Oriented Timer)
Replies: 10
Views: 6775

Re: hoot.lua (Handles-free Object Oriented Timer)

I don't have specific code, but hoot wouldn't really work if you need to change the speed of or pause groups of timers. For example, I wouldn't be able to slow down or pause all of the timers in, say, the gameplay state, because the only way to group timers with hoot is by object. That's a good poi...
by farzher
Sun Aug 16, 2015 7:53 pm
Forum: Libraries and Tools
Topic: hoot.lua (Handles-free Object Oriented Timer)
Replies: 10
Views: 6775

Re: hoot.lua (Handles-free Object Oriented Timer)

This might be a fun challenge: If anyone has timer-related code that you think won't benefit from hoot, please share it!
(It'll help me design a better API)
by farzher
Sun Aug 16, 2015 4:27 am
Forum: Support and Development
Topic: Here is an example of smooth movement. (use it if you want)
Replies: 3
Views: 5343

Re: Here is an example of smooth movement. (use it if you wa

Code: Select all

function player.DRAW()
   player.draw()
end
Why? Why the DRAW that only calls draw?
by farzher
Mon Aug 10, 2015 1:48 am
Forum: Games and Creations
Topic: The Binding of Crate Box
Replies: 57
Views: 24005

Re: The Binding of Crate Box

Nixola wrote:I don't mean to be rude, but there's not much to brag about if you didn't reach and beat the final room at least once ;)
Haha, you caught me. I got #rekt
Does it show your time at the end? Like a speedrun? (I wouldn't know)
by farzher
Sun Aug 09, 2015 11:43 pm
Forum: Games and Creations
Topic: The Binding of Crate Box
Replies: 57
Views: 24005

Re: The Binding of Crate Box

oh hi adnzzzzZ. really cool game. crate box is one of my favorites. I pushed it to the point of making up my own game modes, like pacifism mode. J1N7_E5rTEc There doesn't seem to be any kind of score though when you die? Like how many rooms you got though, or money collected, or whatever. I'm not su...
by farzher
Sun Aug 09, 2015 7:42 am
Forum: Libraries and Tools
Topic: hoot.lua (Handles-free Object Oriented Timer)
Replies: 10
Views: 6775

Re: hoot.lua (Handles-free Object Oriented Timer)

Nice, I like it. You could probably argue that the "key" is still a sort of handle, but it's still a good setup. It's not a "global" key, it's tied to the object, and you don't have to manage the scope of a returned handle. Right. It still has all the same flexibility that handl...
by farzher
Sun Aug 09, 2015 6:20 am
Forum: Libraries and Tools
Topic: hoot.lua (Handles-free Object Oriented Timer)
Replies: 10
Views: 6775

Re: fme.lua - a FraME timer library

Frame timing in this case (correct me if I'm wrong, farzher) isn't when you just don't use dt, frame timing is when all of your update events are run a certain number of times per second. So in your love.update, you would have something like this: function love.update(dt) updateTimer -= dt while up...
by farzher
Sun Aug 09, 2015 5:07 am
Forum: Libraries and Tools
Topic: hoot.lua (Handles-free Object Oriented Timer)
Replies: 10
Views: 6775

Re: fme.lua - a FraME timer library

The library should definitely allow timed events as opposed to frame-based events. Timing events in terms of frames is generally a bad idea, when taking differing computer speeds, vsync, and all that junk into consideration. I don't use dt. It's called "frame timer" for a reason. Maybe I ...
by farzher
Sun Aug 09, 2015 3:52 am
Forum: Libraries and Tools
Topic: hoot.lua (Handles-free Object Oriented Timer)
Replies: 10
Views: 6775

hoot.lua (Handles-free Object Oriented Timer)

https://github.com/farzher/hoot-lua Not sure if anyone will find this useful; considering how simple it was to make and the fact nobody made it yet, I assume it's not a programming style people care for. But I made it for myself and decided to share (: Read the github for its description/usage (I pu...