Loading...
  OR  Zero-K Name:    Password:   

widgets/godgets

10 posts, 671 views
Post comment
Filter:    Player:  
sort
7 years ago
I have been looking through some of the lua code and it seems so inefficient. In the sense that because each wodget/Gidget does its own stuff, i.e all the seperate calls to tables and all the event driven stuff basically duplicating the same code but in seperate wudgets/godgets.

there has to be a better way than this, maybe a lot of these wudget/gedgits could be combined to make the code more efficient.
+1 / -0

7 years ago
There are only a few instances where code is duplicated/redundant. Also unlike gadgets widgets are mostly independent and lua isn't really great for organizing large projects one way or the other.

The way that callins are distributed to widgets and gadgets is basically the way it ought to be anyway. There isn't any other way to do that, nor is there a need for an alternative.
+0 / -1
7 years ago
that makes no sense.
+1 / -0
7 years ago
Code is absolutely and completley duplicated across widgets/gobjets, and if you cant see that then you should just completely remove yourself from anything to do with the project.
+0 / -1

7 years ago
Yes, the coding guideline for new zk widgets is to copy code from existing, well-established widgets. This is to guarantee only code of the highest quality is used!
+0 / -0


7 years ago
Please point to a specific example of what you believe is duplicated code, and someone can then either a) explain to you why it's done that way and why it's not duplication, or b) open an issue in github to improve the code quality by eliminating the duplicate code.
+1 / -0


7 years ago
Lol
+1 / -0

7 years ago
Spring is meant to be extended with with widgets and gadgets. This is a good design if you're writing simple, independent mods/scripts for a game, but it sucks if you are creating big projects. It also sucks if you wish to make something that's not a TA-like RTS (or simpler).

SpringBoard completely ignores this and is essentially just one big widget and gadget (split into 265 files at the time of this writing).
Chobby was initially designed like this as well, but ever since AUrankAdminGoogleFrog got into it, it has started giving birth to more widgets. Right now it's mainly just the common components that are shared, while widgets are all about the specific stuff.

It's not just me designing things like this though. Chili framework is also split into multiple files all running under one widget, as are many other library utilities.
ZK puts common code in utils directories and sometimes it's exposed in WG. or GG, or other global tables.
+0 / -0


7 years ago
If we're talking about performance I'm going to have to ask you to back up your claims with benchmarks. Otherwise we're probably just going to talk in circles about things that turn out not to matter.
+0 / -0
7 years ago
wubgets
+2 / -0