Search found 154 matches

by mknejp
Wed Aug 10, 2016 5:27 pm
Forum: Implemented mod requests
Topic: on_player_opened/on_player_closed
Replies: 32
Views: 10061

Re: on_player_opened/on_player_closed

That's a lot of words but... have you actually made something that runs at the scale Factorio does with the performance Factorio does with as little bugs as Factorio has? I don't know what the "scale" argument is meant to be. If it's just the number of entities then no, but it's also a pr...
by mknejp
Wed Aug 10, 2016 4:19 pm
Forum: Implemented mod requests
Topic: on_player_opened/on_player_closed
Replies: 32
Views: 10061

Re: on_player_opened/on_player_closed

No, that would add a large amount of overhead slowing the game down unnecessarily. That is very questionable. The whole point of delaying the events is to improve performance by grouping data that needs the same logic. Processing identical operations and data in batches is the very reason big games...
by mknejp
Wed Aug 10, 2016 7:57 am
Forum: Implemented mod requests
Topic: on_player_opened/on_player_closed
Replies: 32
Views: 10061

Re: on_player_opened/on_player_closed

A simple example: 1. The player has a blueprint open to edit that's contained in a chest. 2. A biter destroys the chest which goes through and clears every item in the chest 1 by 1 3. In reaction to the blueprint being destroyed the GUI is closed 4. In reaction to being closed the event is fired 5....
by mknejp
Sun Jun 19, 2016 7:19 pm
Forum: Modding interface requests
Topic: Negative pumping_speed with optional pollution
Replies: 0
Views: 645

Negative pumping_speed with optional pollution

Is it possible to make the "offshore-pump" prototype work with negative "pumping_speed" values to dump their content out into the water? This would be useful for a waste disposal mod introducing additional complexity. Along with it would be interesting to add a "pollution&qu...
by mknejp
Sat Jun 11, 2016 2:59 am
Forum: Won't implement
Topic: Entity/component model in prototypes
Replies: 15
Views: 8474

Re: Entity/component model in prototypes

People are always taught in school that linked lists are better suited for insert/remove because they're O(1) instead of O(n) off topic: eehhhhhh... it's O(1) to insert, sure, but finding/deleting is O(n) (because to delete a particular item you have to find it). but this does nothing to change you...
by mknejp
Sat Jun 11, 2016 2:03 am
Forum: Won't implement
Topic: Entity/component model in prototypes
Replies: 15
Views: 8474

Re: Entity/component model in prototypes

So I have to say this discussion has kept me thinking a lot over the past few weeks. Factorio is certainly an intriguing use case to analyse. Judging from all the information gathered from the forum alone and even though I don't know the code I am convinced there is room for improvement. There alway...
by mknejp
Sat Apr 30, 2016 8:10 pm
Forum: Resolved Problems and Bugs
Topic: Example for SimpleItemStack wrong
Replies: 3
Views: 927

Re: Example for SimpleItemStack wrong

Oh here it is. I was looking for it in the modding subforum, sorry for that.
by mknejp
Sat Apr 30, 2016 7:06 pm
Forum: Resolved Problems and Bugs
Topic: Example for SimpleItemStack wrong
Replies: 3
Views: 927

Example for SimpleItemStack wrong

This is not a request, but there doesn't seeem to be a forum for bug reports, so here goes. The example for SimpleItemStack says: All of these lines specify an item stack of one iron plate: "iron-plate" {name="iron-plate"} {name="iron-plate", count=1} Note the first exa...
by mknejp
Fri Apr 29, 2016 10:33 pm
Forum: Won't implement
Topic: Entity/component model in prototypes
Replies: 15
Views: 8474

Re: Entity/component model in prototypes

Hm. Interesting. Well, I certainly could keep on going with more data points, more advise, more questions, and so on. And the points you raise do sound to me like the very symptoms of a typical classic "game object"-centered design where data layout doesn't align with data access. Funnily ...
by mknejp
Fri Apr 29, 2016 7:32 am
Forum: Won't implement
Topic: Entity/component model in prototypes
Replies: 15
Views: 8474

Re: Entity/component model in prototypes

Factorio's core logic is all single threaded as well :) A component system can help with this, significantly. It is better suited to allow parallel component/entity updates without data conflicts. Close, the base entity type isn't updatable but a side type of UpdatableEntity { virtual void update()...
by mknejp
Fri Apr 29, 2016 2:29 am
Forum: Won't implement
Topic: Entity/component model in prototypes
Replies: 15
Views: 8474

Re: Entity/component model in prototypes

Everything I look at online is always a concept - some person or group talking about the idea of a component based system. I've never actually seen anyone implement it. I've heard KSP uses some such system but KSP is a prime example of poor performance with no scalability. Don't take that wrong - i...
by mknejp
Thu Apr 28, 2016 4:31 am
Forum: Won't implement
Topic: Entity/component model in prototypes
Replies: 15
Views: 8474

Re: Entity/component model in prototypes

When I see a game implement it at a scale that Factorio runs at then I'll take back my argument about performance. http://i.imgur.com/sdX9Zcq.jpg 5,455,472 total entities 234,049 active entities (entities updating each tick) 60 ticks per second so that means all 234,049 entities have < 16.6~ MS per...
by mknejp
Thu Apr 28, 2016 12:13 am
Forum: Won't implement
Topic: Entity/component model in prototypes
Replies: 15
Views: 8474

Re: Entity/component model in prototypes

It's been suggested to death actually. (There's even one right few threads in the list below yours) Devs keep saying it's not gonna happen. I believe at this point we should start asking for the base components being added as independent types, so that we could glue those with lua instead of hidden...
by mknejp
Wed Apr 27, 2016 11:34 pm
Forum: Won't implement
Topic: Entity/component model in prototypes
Replies: 15
Views: 8474

Entity/component model in prototypes

Hi, I am currently in the process of writing my first mod for Factorio and there are quite some aspects of the API that I find cumbersome. First a bit of background about me: I have been programming since I can remember (mostly C++) and my professional work is centered around 3D/game engines, so I d...

Go to advanced search