Search found 60 matches

by Fuzzlix
Wed Nov 15, 2017 9:43 pm
Forum: Libraries and Tools
Topic: HooECS, the wise choice!
Replies: 13
Views: 14115

Re: HooECS, the wise choice!

Hi erasio. Meanwhile i modified HooEcs so heaviely, so i cant send you pull requests for HooECS. - I implemented some gamestate management: 3 events and some changes in the System class. - I circumvented the issue in the eventmanager we talked about by using the instance itself as table key. - Syste...
by Fuzzlix
Tue Nov 14, 2017 12:24 pm
Forum: General
Topic: There is shurly a better way to code these few lines.
Replies: 4
Views: 3431

Re: There is shurly a better way to code these few lines.

Thank you, Nelvin. The logic, i want to implement is a little bit more complex, your tip is very inspiring for building up the neighbour mask though. I try to do a worldmap like in the old dos game master of magic. A water square tile depends on where are landmass neighbour and just for making the p...
by Fuzzlix
Mon Nov 13, 2017 4:40 pm
Forum: General
Topic: There is shurly a better way to code these few lines.
Replies: 4
Views: 3431

There is shurly a better way to code these few lines.

Hi all. In my game i use a tilemap to create the worldmap. The tile choosen depends on the terrain type and the 8 neighbour terrains. The only interesting question was: The neighbour is the same terrain type as the center? I created a Mask of 8 bits for each neighbour. This was easy and later i figu...
by Fuzzlix
Tue Nov 07, 2017 7:58 pm
Forum: Libraries and Tools
Topic: FÖNTGen makes pretty fonts
Replies: 17
Views: 13252

Re: FÖNTGen makes pretty fonts

Nice work and a lot of great looking effects.
If you create a game for a fixed size, a bitmap font is shurly sufficiant.

Keep up the good work.
by Fuzzlix
Sun Nov 05, 2017 7:20 am
Forum: Libraries and Tools
Topic: HooECS, the wise choice!
Replies: 13
Views: 14115

Re: HooECS, the wise choice!

ECS is a great concept in theory. I suggest you read the blog post mentioned in lovetoys/HooECS's readme. After reading this really informative blog post i started a learning project using HooECS/lovetoys 3 weeks ago. (I still mention lovetoys when talking about HooECS, because i dont want to blame ...
by Fuzzlix
Sat Nov 04, 2017 10:43 pm
Forum: Libraries and Tools
Topic: HooECS, the wise choice!
Replies: 13
Views: 14115

Re: HooECS, the wise choice!

in EventManager.lua: function EventManager:removeListener(eventName, listener) if self.eventListeners[eventName] then for key, registeredListener in pairs(self.eventListeners[eventName]) do if registeredListener[1].class.name == listener then -- << BUG! table.remove(self.eventListeners[eventName], k...
by Fuzzlix
Sat Nov 04, 2017 8:43 pm
Forum: Libraries and Tools
Topic: HooECS, the wise choice!
Replies: 13
Views: 14115

Re: HooECS, the wise choice!

The entity list is not intended as array list. But as unique identifier. It's used with pairs across the core code. Users are not expected to use the ID or entity list directly. Thats all true. But HooECS uses this list internally to calculate the next free ID. But I don't think that's a serious is...
by Fuzzlix
Sat Nov 04, 2017 3:19 pm
Forum: Libraries and Tools
Topic: HooECS, the wise choice!
Replies: 13
Views: 14115

Re: HooECS, the wise choice!

Bartbes: 10 points :)
by Fuzzlix
Sat Nov 04, 2017 1:13 pm
Forum: Libraries and Tools
Topic: HooECS, the wise choice!
Replies: 13
Views: 14115

Re: HooECS, the wise choice!

https://github.com/Hooodini/HooECS/blob/master/src/Entity.lua#L10 "self.active = active or true" might not work as you intended. I suggets: self.active = (active == true) In this special case you mean probably this?: self.active = (type(active) == "boolean") and active or true; ...
by Fuzzlix
Fri Nov 03, 2017 8:12 pm
Forum: Support and Development
Topic: Inaccurate results from Font:getWidth()
Replies: 10
Views: 8733

Re: Inaccurate results from Font:getWidth()

May be the font has bugs. This happens sometimes when you are using free fonts. If you want to keep using this font, i suggest you add a additional character to the string for (allmost) propper calculation. ( in your case: gfx.getFont():getWidth(test.." ") or gfx.getFont():getWidth(test..&...