Page 2 of 3

Re: Lua Entity System

Posted: Thu May 17, 2012 8:51 am
by coffee
When I saw your entity/events idea (that I remembered see in some LOVE games) it stroke me that would be very useful to create some simple game GUI event/controller/behaviour like this very simple game creator "blaba" (no, no joking, is the name). it's for win/osx/lnx so try it.
http://lunduke.com/?p=3169

Re: Lua Entity System

Posted: Thu May 17, 2012 3:21 pm
by ljdp
kclanc wrote:You might want to consider programming this using metatables; the added flexibility would likely be beneficial for something like this. For example, you could require the programmer to explicitly list all of a component's dependencies. That said, I read article you linked to as well as all of the other posts in the series. I have to say: they seemed a bit psuedo-scientific to me.
I'm refactoring the whole thing to remove dependancy from middleclass. Component classes are closures while component instances use metatable __index lookup. I've also removed the entity class, entities are just a number you pass around.

Re: Lua Entity System

Posted: Fri May 18, 2012 12:17 am
by ljdp
I've made quite a bit of changes to this, take a look at the new example on github to see how it's different. There's also a wiki now i've started to edit.
I might change the name to Frankenstein Entity System aka FEZ :cool:
(I just want to make a logo of Frankenstein wearing a fez.)

Re: Lua Entity System

Posted: Fri May 18, 2012 9:22 am
by Kingdaro
SudoCode wrote:LËSbian?
i thought this too but it seems ridiculously blunt to be honest, haha

Re: Lua Entity System

Posted: Fri May 18, 2012 9:28 am
by bartbes
TOP-notch Lua Entity Set-up System aka TOPLESS.

Re: Lua Entity System

Posted: Fri May 18, 2012 6:55 pm
by ljdp
What do you think?
EmlOL.png
EmlOL.png (39.32 KiB) Viewed 586 times

Re: FEZ. Frankenstein Entity Zystem.

Posted: Sat May 19, 2012 2:55 am
by jradich
Too... big

Re: FEZ. Frankenstein Entity Zystem.

Posted: Sat May 19, 2012 12:53 pm
by ljdp
jradich wrote:Too... big
YEAAAAHH. Big's good no?
I did it in illustrator so it's easily resized, like on the OP.

Re: FEZ. Frankenstein Entity Zystem.

Posted: Mon Jul 09, 2012 2:33 am
by kexisse
I just tried this after someone recommended it in another thread. However I can't get the example to run.
I downloaded the Zip from Github, extracted it and ran the following within the /example directory

Code: Select all

~/Downloads/perky-FEZ-5653242/example $ /Applications/love.app/Contents/MacOS/love .
Error: ../src/EntityManager.lua:102: Entity (0.039:NIL) does not exist.
stack traceback:
	[C]: in function 'assert'
	../src/EntityManager.lua:102: in function 'assert_entity_exists'
	../src/EntityManager.lua:122: in function 'getComponentFromEntity'
	../src/ComponentCache.lua:14: in function 'transform'
	controllers/InputController.lua:59: in function 'updateEntity'
	../src/ControllerManager.lua:178: in function 'updateEntities'
	../src/ControllerManager.lua:173: in function 'update'
	main.lua:37: in function 'update'
	[string "boot.lua"]:407: in function <[string "boot.lua"]:373>
	[C]: in function 'xpcall'
Should I run it another way?

Re: FEZ. Frankenstein Entity Zystem.

Posted: Mon Jul 09, 2012 5:35 am
by coffee
kexisse wrote:I just tried this after someone recommended it in another thread. However I can't get the example to run.
I downloaded the Zip from Github, extracted it and ran the following within the /example directory

Code: Select all

~/Downloads/perky-FEZ-5653242/example $ /Applications/love.app/Contents/MacOS/love .
Error: ../src/EntityManager.lua:102: Entity (0.039:NIL) does not exist.
stack traceback:
	[C]: in function 'assert'
	../src/EntityManager.lua:102: in function 'assert_entity_exists'
	../src/EntityManager.lua:122: in function 'getComponentFromEntity'
	../src/ComponentCache.lua:14: in function 'transform'
	controllers/InputController.lua:59: in function 'updateEntity'
	../src/ControllerManager.lua:178: in function 'updateEntities'
	../src/ControllerManager.lua:173: in function 'update'
	main.lua:37: in function 'update'
	[string "boot.lua"]:407: in function <[string "boot.lua"]:373>
	[C]: in function 'xpcall'
Should I run it another way?
I got the same after put "src" in example folder (so should I assemble structure in another way?). I thought was some Work in Progress failure but now that I notice that you using OSX too could be also one of those OS only issues.