Search found 114 matches

by bakpakin
Tue Aug 09, 2016 8:58 pm
Forum: Libraries and Tools
Topic: Content Redacted. Please Delete Thread.
Replies: 17
Views: 5696

Re: Dox - A Lua Documentation Generator Script

One of the main issues I have with LDoc is lack of support for first-class functions. Actually, this problem is not limited to LDoc or Lua. These doc generators tend to be written as if functions can only exist as members of a class or module, when the language is really much more flexible. Much ag...
by bakpakin
Sat Jun 04, 2016 7:28 pm
Forum: Libraries and Tools
Topic: [Library] tiny-ecs - Fast Simple Entity Component System
Replies: 49
Views: 29348

Re: [Library] tiny-ecs - Fast Simple Entity Component System

Hi, love the library, thanks for your hard work. I'm trying to filter systems in tiny.update(), I'm not sure exactly what kind of filter to pass in the third argument. I've tried things like tiny.filter("componentThatSystemIWantFiltersFor") or passing the actual system's filter but nothing seems to...
by bakpakin
Fri May 20, 2016 4:41 am
Forum: Games and Creations
Topic: 1K Breakout challenge
Replies: 23
Views: 6056

Re: 1K Breakout challenge

Attempt 2: 887 876 bytes Slight minification of my previous version, but the same functionality. Also put into one-liner. function S()W,H=G.getDimensions()P,R,T,U,V={x=W/2,y=H-5,w=W/8,h=10},{x=W/2,y=H-18,w=16,h=16},1,0,0;B={[-1]=P,[0]=R}for x=W/20,W,W/10 do for y=10,100,20 do B[#B+1]={x=x,y=y,w=W/10...
by bakpakin
Thu May 19, 2016 3:29 pm
Forum: Games and Creations
Topic: 1K Breakout challenge
Replies: 23
Views: 6056

Re: 1K Breakout challenge

932 chars, resizable (If you provide resizing in a love.conf) Use A and D to move the paddle, S to shoot the ball. Collisions are not perfect, but what can you do :roll: function S()W,H=G.getDimensions() P,R,T={x=W/2,y=H-5,w=W/8,h=10},{x=W/2,y=H-15,w=10,h=10,u=0,v=0},1 B={[-1]=P,[0]=R}for x=W/20,W,W...
by bakpakin
Thu Apr 21, 2016 12:39 pm
Forum: Libraries and Tools
Topic: [Library] tiny-ecs - Fast Simple Entity Component System
Replies: 49
Views: 29348

Re: [Library] tiny-ecs - Fast Simple Entity Component System

A question about Entity component systems, is it suggested that everything becomes an entity, including things like drawing the backgrounds? Home encompassing should they be? That is totally up to you. I personally like to make a really simple processing system that only filters drawable entities o...
by bakpakin
Mon Apr 11, 2016 12:35 pm
Forum: Libraries and Tools
Topic: [Library] tiny-ecs - Fast Simple Entity Component System
Replies: 49
Views: 29348

Re: [Library] tiny-ecs - Fast Simple Entity Component System

It's been a while, but there have been a few updates that haven't really been mentioned. First, I rewrote most of the filter code to be faster and used generated code rather than closures. Not that interesting, honestly. More importantly, I added a new function, tiny.filter, that allows one to creat...
by bakpakin
Sat Mar 12, 2016 1:55 am
Forum: Libraries and Tools
Topic: [Library] tiny-ecs - Fast Simple Entity Component System
Replies: 49
Views: 29348

Re: [Library] tiny-ecs - Fast Simple Entity Component System

The problem seems to be in your attempt to create a Talking system. You are trying to use the global 'class' function, which is not part of standard Lua or tiny-ecs. In the demo, I am using 30log for classes. Another popular choice is middleclass . If you want to use classes like in the demo, you mu...
by bakpakin
Sun Mar 06, 2016 11:07 pm
Forum: General
Topic: Thoughts on this ECS setup?
Replies: 3
Views: 1064

Re: Thoughts on this ECS setup?

No, your totally right. When I say cache in this context, I mean cache references. But an extra reference to a table isn't that expensive. The point about not caching systems that are run for every entity is a good, valid point. For tiny-ecs , I recently just added an option to not use caching for c...
by bakpakin
Sun Mar 06, 2016 4:14 am
Forum: General
Topic: Thoughts on this ECS setup?
Replies: 3
Views: 1064

Re: Thoughts on this ECS setup?

Looks simple and bulletproof. Caching is hard to get right, and to do it right, you really shouldn't have to copy data. This is probably fast and flexible enough for most uses.
by bakpakin
Fri Feb 19, 2016 1:55 am
Forum: Libraries and Tools
Topic: bitser: faster, harder, better serialization with LuaJIT
Replies: 16
Views: 9193

Re: bitser: faster, harder, better serialization with LuaJIT

Wow. That is quality. For luajit needs, binser might be obsolete. All that work I put into making sure numbers serialized correctly, and you go and just use ffi to copy memory. The links for other libraries for the benchmark are broken, though. Replacing "github.com" in the urls with "raw.githubuser...