+ Reply to Thread
Results 1 to 10 of 10

Thread: Wire needs to get optimized - Team needed

  1. #1
    Wire Noob aVoN's Avatar
    Join Date
    May 2007
    Location
    Germany
    Posts
    15

    Default

    Hello pals,
    I'm currently really unsatisfied with the way, some SENTs or STOOLs of wire are coded. I started recoding some parts today but mentioned this isn't a one man job.

    So I would like to meet with all current wire developers on a day where everyone gets a part of wire he will recode.

    The how and what will be clarified later. But here some examples:

    SENTs
    • Removing unnecessary spaces and linebreaks from cl_init.lua and shared.lua to increase lua download speed
    • Making variablenames shorter in cl_init.lua and shared.lua to increase lua download speed
    • Change some vars to local, reduce function calls - E.g. instead of calling self.Entity:GetPos() 20 times in a Think, we declare local my_pos = self.Entity:GetPos()
    • Using HOOks instead of running a Think every 0.01 seconds (best "worst" example: pod_controller!)
    • Instead of having 5 different functions which do nearly the same, we should have one which can be altered (best "worst" example: Targetfinder with it's "Find" functions - I recoded them today to use one, but old still exists)
    STOOLs
    • Creating a base_wire_stool which has the most common used parts in it
    • Using gmod's own ghostpreview system instead of coding it new for each stool (some still do that)
    • Having a global spawn function for each SENT in wire_lib instead of coding it everytime again. (With duplicator support of course)
    These are a few examples. I hope I will get some response soon.

  2. #2
    Wire Noob nckomodo's Avatar
    Join Date
    Jul 2007
    Posts
    6

    Default

    It also needs to stop sucking FPS like it was going out of style.

  3. #3
    Not a bot itsbth's Avatar
    Join Date
    Feb 2007
    Location
    Norway
    Posts
    1,173

    Default

    It also needs to stop sucking FPS like it was going out of style.[/b]
    ...

    Anyway, if you think the pod controller is bad, you should the a look at the adv. controller.
    I'm currently working on a update for the "normal" controller, and will look into using hooks.

  4. #4
    Wire Noob aVoN's Avatar
    Join Date
    May 2007
    Location
    Germany
    Posts
    15

    Default

    Good to hear that. But that were only a few examples. I really would like to meet some weekend in IRC, talk about who goes through e.g. Wire - Physics and optimizes the code. When we are about 7 people, we could do that only in one day.

  5. #5
    Super Moderator Erkle's Avatar
    Join Date
    Feb 2007
    Location
    New Zealand
    Posts
    402

    Default

    A freshly coded candidate for Wire 2 is already in the works, but I guess it wouldn't hurt to fix the current one first. I can help if I have time.
    If in doubt, stick your finger in it.

  6. #6
    Wire Noob nckomodo's Avatar
    Join Date
    Jul 2007
    Posts
    6

    Default

    ...

    Anyway, if you think the pod controller is bad, you should the a look at the adv. controller.
    I'm currently working on a update for the "normal" controller, and will look into using hooks.[/b]
    Don't you ... me, I get about 20 fps when looking at a simple wired turret :|

  7. #7
    Wire Sofaking Shandolum's Avatar
    Join Date
    Apr 2007
    Location
    Europe -> Denmark
    Posts
    887

    Default

    Really wish I could help you guys, but don't know LUA (yet).

    Maybe by the time you make Wire 3 I can help, since I am starting on IT College to september.
    Everything can be improved upon. Nothing is Perfect.
    The only way to move forward, is to surpass what has already been done.
    Creator of many things.

  8. #8
    Expressionism 2.0 Syranide's Avatar
    Join Date
    Mar 2007
    Location
    Sweden
    Posts
    4,573

    Default

    As far as I know, most of that stuff is made by "outsiders" hence the code can be pretty shoddy and the only time I've personally ever touched those files was to fix some bugs. And I'm not really sure if the developers are that interested in going in and editing those files, especially not for remove spaces and shortening variable names... because we really shouldn't destroy structure of the code just to squeeze out a few bytes. Possibly one could run them all through some processor that strips and compresses everything as a "separate download".

    I've thought about writing some better specification for certain things as alot of things are pretty strangely implemented and designed. E.g. the beacon sensor and that stuff, why do you link it with right click and not a wire, that way we could link the laser pointer to a beacon sensor instead of creating another "laser pointer beacon sensor" stuff. But I'm up to my neck with other work and never thought more about it or put any more time into the expression gate v2 (which I've also intend to properly separate, so that you can use "expressions" in other STOOLs/SENTs by simply creating an instance).

    But yeah, generic ghost preview etc would be nice, but someone has to do it, and personally I don't really have time.

    EDIT: But I do support your opinion, some things needs alot of cleaning up.

    Don't you ... me, I get about 20 fps when looking at a simple wired turret :|[/b]
    Sounds like you are missing the models or is on a very shitty computer that would give you 25 FPS if you removed all the wire parts from the turret.

  9. #9
    Wire Noob nckomodo's Avatar
    Join Date
    Jul 2007
    Posts
    6

    Default

    Sounds like you are missing the models or is on a very shitty computer that would give you 25 FPS if you removed all the wire parts from the turret.[/b]
    .
    Nah it doesn't appear to be missing any models, though I am over-exaggerating abit as this turret also used gcombat bits and a shitload of ammunition crates, but it was on a server so I don't quite see why it should kill my fps that badly.
    I did compare the fps when looking at a simple wire setup(8 buttons, 8 xors, and 8 indicators)(40-ish), looking at a tank I built(40-ish), and looking at nothing(90). The map was freespace06_v2-1. I could upload them if you like. This is probably just going to come down to me being paranoid about stuff etc.

  10. #10
    Wire Sofaking ShaRose's Avatar
    Join Date
    Mar 2007
    Location
    Burin, Newfoundland, Canada
    Posts
    542

    Default

    Well, the problem with the adv. pod controller is that i did what i could, I don't know LUA enough to make it any better, And i don't even know where to start with hooks. If anything, it's ITSBTH to blame for both, because i just added things to the code as best i could, usually a direct copy from more of his code. And besides, TAD2020 is supposed to be recoding the adv. controller anyways, to add vector support, and just plain tuning.

+ Reply to Thread

Similar Threads

  1. The Xuras Team Contraption Thread
    By Nadanova in forum Finished contraptions
    Replies: 8
    Last Post: 02-18-2009, 03:45 AM
  2. Thanks to the Wiremod Team!
    By CasanovaFrankenstein in forum Wiremod General Chat
    Replies: 9
    Last Post: 01-01-2009, 06:12 AM
  3. Wire hydrolics expression needed.
    By ZezXion in forum Installation and Malfunctions Support
    Replies: 5
    Last Post: 12-30-2008, 09:46 PM
  4. Wire Mod Ranger Scanner help needed !!!
    By BombShell |PH| in forum Installation and Malfunctions Support
    Replies: 0
    Last Post: 09-05-2008, 11:18 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
proceed-collector
proceed-collector
proceed-collector
proceed-collector
linguistic-parrots
linguistic-parrots
linguistic-parrots
linguistic-parrots