[release][B]
What is Gmod Developer Framework?[/B]
Gmod Developer Framework (or GDF for short) is a collection of useful snippets, functions, systems and objects designed to make the lives of people who script for Gmod just a tad bit easier. It currently contains ten libraries, each managing their own functions and systems.
Please note that this project is a Work-In-Progress and subject to some smaller overhauls. It has only been tested to some extent, and has not been checked for compatibility issues with other mods. It is unlikely however that compatibility problems should occur as everything is stored locally or in the Framework table, and interaction with anything outside of its own namespace is minimal.
[B]Links[/B]
[LIST]
[*][B][URL="http://gmod-developer-framework.googlecode.com/svn/trunk/"]Download (SVN)[/URL][/B]
[*][URL="http://code.google.com/p/gmod-developer-framework/"]Project page
[/URL]
[*][URL="http://code.google.com/p/gmod-developer-framework/wiki/FrameworkOverview"]Complete function list[/URL]
[*][URL="http://code.google.com/p/gmod-developer-framework/wiki/TutorialOverview"]Tutorials[/URL]
[*][url=http://code.google.com/p/gmod-developer-framework/wiki/ExamplesOverview]Examples[/url]
[/LIST]
[B]Libraries[/B]
[LIST]
[*][URL="http://code.google.com/p/gmod-developer-framework/wiki/FrameworkIO"]IO[/URL]
[*][URL="http://code.google.com/p/gmod-developer-framework/wiki/FrameworkUtilities"]Utilities[/URL]
[*][URL="http://code.google.com/p/gmod-developer-framework/wiki/FrameworkData"]Data[/URL]
[*][URL="http://code.google.com/p/gmod-developer-framework/wiki/FrameworkObjects"]Objects[/URL]
[*][URL="http://code.google.com/p/gmod-developer-framework/wiki/FrameworkSearch"]Search[/URL]
[*][URL="http://code.google.com/p/gmod-developer-framework/wiki/FrameworkModules"]Modules[/URL]
[*][URL="http://code.google.com/p/gmod-developer-framework/wiki/FrameworkStatistics"]Statistics[/URL]
[*][URL="http://code.google.com/p/gmod-developer-framework/wiki/FrameworkComm"]Comm[/URL]
[*][URL="http://code.google.com/p/gmod-developer-framework/wiki/FrameworkEntities"]Entities[/URL]
[*][URL="http://code.google.com/p/gmod-developer-framework/wiki/FrameworkGraph"]Graph[/URL]
[/LIST]
[B]Prominent Features[/B]
[LIST]
[*]Absolutely everything is documented in the Wiki
[*]Extremely easy-to-use module system with inheritance, dependencies and profiling
[*]Extensive type conversion library
[*]Advanced player and area search functions
[*]Simple entities interface
[*]Networking interface that adds usermessage functionality for Client->Server communication
[*]Clientside graphing library for neatly displaying information
[/LIST]
[B]License[/B]
While GDF is released under the MIT license, I must admit that I really don't care what you do with it, just try to keep it off public file hosts unless your project needs it. It's gonna be a pain to fix problems if people have 200 different versions and no easy way to update.
[/release]Happy scripting, and please do write suggestions for additions!
Lua King!
You haven't documented everything if "most" things are documented in the wiki.
Otherwise, looks good, will probably try it out later.
Cool :D
[editline]23rd October 2010[/editline]
You should make your communications module detect the type that you are trying to send, and change the add function to just be Add
Nice work. King'd.
Implement in wiremod, gain enlightenment.
[QUOTE=Gbps;25602900]Cool :D
[editline]23rd October 2010[/editline]
You should make your communications module detect the type that you are trying to send, and change the add function to just be Add[/QUOTE]
Great idea, I'll add that as an extra function
[QUOTE=Empty_Shadow;25602672]You haven't documented everything if "most" things are documented in the wiki.
Otherwise, looks good, will probably try it out later.[/QUOTE]
Only things I'm missing are the objects, and a newly added function "Framework.UpdateCheck"
Added the missing documentation for the Stack, CommIn and CommOut objects. Aswell as for the new functions CommOut:Add(...) and Framework.UpdateCheck()
The Wiki now really does document everything.
Lua kinged for thoroughness.
Wow, this is huge. How come garry hasn't implemented all this stuff already?
This is actually really cool. Here, have a Lua icon with a crown.
[editline]24th October 2010[/editline]
[addons\gdf\lua\framework\shared.lua:1] attempt to index a nil value
[addons\gdf\lua\framework\client.lua:5] attempt to index global 'Framework' (a nil value)
Fixed it. Framework.UpdateCheck now works regardless of what you named the addon folder
Alright, will try again
[editline]24th October 2010[/editline]
Works now, thanks
I won't be available much on weekdays(if at all), but I'll do my best to work out any bugs you may have found in the weekends.
Keep the bugs and suggestions coming!
I hope all this stuff gets official, seriously this might be the best thing ever to come out for Gmod. (besides Toybox)
[editline]24th October 2010[/editline]
Although the function [url=http://code.google.com/p/gmod-developer-framework/wiki/FrameworkSearchFindByTeam]FindByTeam[/url] is worthless, ever heard of team.GetPlayers( team ) ?
[QUOTE=Dlaor-guy;25616654]Although the function [url=http://code.google.com/p/gmod-developer-framework/wiki/FrameworkSearchFindByTeam]FindByTeam[/url] is worthless, ever heard of team.GetPlayers( team ) ?[/QUOTE]
It's just there for completeness, the Utilities library has mirrors of string.char and string.byte aswell (NumberToChar and CharToNumber, respectively)
This includes most functions of utilx right?
I'm in a math mood, if I made some useful math functions would you add them? (may be awhile before I'm happy with them though)
[release][B]CHANGELOG[/B]
I've made extensive modifications to the way the Comm's library works, however none of these changes will affect code written for previous versions of it.
All comm objects now use datastream to send the data, but the code is still converted to binary before being sent, meaning that you still save space as you would with usermessages, but you can now send bigger packages.
[B]Incoming Communications Object[/B]
[LIST]
[*][B][MOD][/B] [URL="http://code.google.com/p/gmod-developer-framework/wiki/ObjCommInBytesLeft"]BytesLeft[/URL] now works on both client and server
[*][B][ADD][/B] [URL="http://code.google.com/p/gmod-developer-framework/wiki/ObjCommInGetType"]GetType[/URL] returns the name of the next value in the message (e.g. "String", "VectorNormal", "Entity" )
[*][B][ADD][/B] [URL="http://code.google.com/p/gmod-developer-framework/wiki/ObjCommInRead"]Read[/URL] automatically detects and returns the next value in the message.
[*][B][ADD][/B] [URL="http://code.google.com/p/gmod-developer-framework/wiki/ObjCommInReadAll"]ReadAll[/URL] returns a table containing all the values of the message, from the current value onwards.
[/LIST]
[B]Outgoing Communications Object[/B]
[LIST]
[*][B][ADD] [/B][URL="http://code.google.com/p/gmod-developer-framework/wiki/ObjCommOutRemoveRecipient"]RemoveRecipient[/URL] allows you to remove a player from the recipients list.
[*][B][MOD][/B] [URL="http://code.google.com/p/gmod-developer-framework/wiki/ObjCommOutSend"]Send[/URL] now takes arguments that are passed to [I]Add[/I] before the message is sent.
[/LIST]
[/release]
The wiki has been updated.
This is really well done and I love that everything is documented.
However, when you have a function like Framework.Utilities.Round it's kind of a waste because you pretty much have to type all that out with the cases every time whereas math.Round is much faster.
Unless your functions do something wholly different/better/more optimized than the defaults then there's really no point.
Other than small issues like that this is mostly well done and a great concept although similar in concept to utilx and ultimately the gmod community will never create a "standard" library.
A universal library needs mass adoption but also a streamlined system for accepting contributions.
Awesome, funnily, here in france GDF means Gaz de France. Oh well, did you consider sending it to garry so he can add it? As he said several times before, if you want something to be added you have to send it to him.
[QUOTE=agmike;25798611]This is really well done and I love that everything is documented.
However, when you have a function like Framework.Utilities.Round it's kind of a waste because you pretty much have to type all that out with the cases every time whereas math.Round is much faster.
Unless your functions do something wholly different/better/more optimized than the defaults then there's really no point.
Other than small issues like that this is mostly well done and a great concept although similar in concept to utilx and ultimately the gmod community will never create a "standard" library.
A universal library needs mass adoption but also a streamlined system for accepting contributions.[/QUOTE]
That's a very good point, the only reason I added functions like that is to give a sense of completeness, so you don't have to use 3 different libraries to do some calculations.
[QUOTE=commander204;25833173]Awesome, funnily, here in france GDF means Gaz de France. Oh well, did you consider sending it to garry so he can add it? As he said several times before, if you want something to be added you have to send it to him.[/QUOTE]
I don't want it added by default, it's not something everyone can or want to use, it's just to help make life easier for developers. All it would do for the average gmodder is increase loadtimes slightly, something Gmod doesn't really need.
[release][B]CHANGELOG[/B]
I've added another feature to the Comms library. It uses a php file on my website to interface with my mysql database, which holds strings of any length. For this I've written a lua wrapper that lets you add new events to your own list, get events, remove them and count them.
It basically works like a remote table of strings that you can access from any server.
[B]Framework.Comm[/B]
[LIST]
[*][B][ADD][/B] [URL="http://code.google.com/p/gmod-developer-framework/wiki/FrameworkCommInsertEvent"]InsertEvent[/URL]
[*][B][ADD][/B] [URL="http://code.google.com/p/gmod-developer-framework/wiki/FrameworkCommCountEvents"]CountEvents[/URL]
[*][B][ADD][/B] [URL="http://code.google.com/p/gmod-developer-framework/wiki/FrameworkCommGetEvents"]GetEvents[/URL]
[*][B][ADD][/B] [URL="http://code.google.com/p/gmod-developer-framework/wiki/FrameworkCommPopEvents"]PopEvents[/URL]
[*][B][ADD][/B] [URL="http://code.google.com/p/gmod-developer-framework/wiki/FrameworkCommEventTracker"]EventTracker[/URL]
[/LIST]
The event tracker object is just a wrapper for the above functions. It passes the AppID and UniqueID it was created with automatically (makes for neater code). It is created with [URL="http://code.google.com/p/gmod-developer-framework/wiki/FrameworkCommEventTracker"]Framework.Comm.EventTracker[/URL]
[B]
Event Tracker Object[/B]
[LIST]
[*][B][ADD][/B] [URL="http://code.google.com/p/gmod-developer-framework/wiki/ObjCommEventTrackerInsert"]EventTracker:Insert[/URL]
[*][B][ADD][/B] [URL="http://code.google.com/p/gmod-developer-framework/wiki/ObjCommEventTrackerCount"]EventTracker:Count[/URL]
[*][B][ADD][/B] [URL="http://code.google.com/p/gmod-developer-framework/wiki/ObjCommEventTrackerGet"]EventTracker:Get[/URL]
[*][B][ADD][/B] [URL="http://code.google.com/p/gmod-developer-framework/wiki/ObjCommEventTrackerPop"]EventTracker:Pop[/URL]
[/LIST]
[B]Framework.Utilities[/B]
[LIST]
[*][B][ADD][/B] [URL="http://code.google.com/p/gmod-developer-framework/wiki/FrameworkUtilitiesURLEncode"]URLEncode[/URL]
[/LIST]
[/release]
The wiki has been updated.
Excellent and easy to use set of libraries. Good job!
So you are noting the IP of the server the events are created from, but why not just "jail" everyone by perhaps a username/password or something so no one can even "inject" a value into my events? The idea being that the first time you Init the events with a unique new 'username' then no one else can use that username and the password you put gets set, thus everytime you Init with the user/pass combo afterward it will just check that it's correct and go on or disable access to that user's events after maybe 5 wrong tries or something.
Perhaps not the best implementation as I stated but the security needs to prevent others from tampering with your data, not just require developers to check IP every time.
Damn. I was just thinking of making this as I was learning Lua.
Oh well.
[QUOTE=agmike;25947965]So you are noting the IP of the server the events are created from, but why not just "jail" everyone by perhaps a username/password or something so no one can even "inject" a value into my events? The idea being that the first time you Init the events with a unique new 'username' then no one else can use that username and the password you put gets set, thus everytime you Init with the user/pass combo afterward it will just check that it's correct and go on or disable access to that user's events after maybe 5 wrong tries or something.
Perhaps not the best implementation as I stated but the security needs to prevent others from tampering with your data, not just require developers to check IP every time.[/QUOTE]
I wanted to make it basic to make it as versatile as possible. Checking for an IP is really, really simple.
I've been playing with the idea of adding server-to-server "usermessages" (CommObjs), using OOSocks. I won't be distributing OOSocks with it, just check if it's already installed, and enable the extra functionality if it is.
We have the monday off (Prep for usage of Army Vehicle Pool & Security Test for Armored Vehicles, yay!) so I might get some work done this weekend.
[QUOTE=Dr Magnusson;25978632]I've been playing with the idea of adding server-to-server "usermessages" (CommObjs), using OOSocks. I won't be distributing OOSocks with it, just check if it's already installed, and enable the extra functionality if it is.
[/QUOTE]
Idea steeler:argh:
[sp]You'll probably make a better work though<3[/sp]
[QUOTE=ralle105;25995963]Idea steeler:argh:
[sp]You'll probably make a better work though<3[/sp][/QUOTE]
I gave him the idea, but I thought you gave up
[QUOTE=CapsAdmin;25996945]I gave him the idea, but I thought you gave up[/QUOTE]
Nah, I just haven't been able to do anything when my computer gets BSoD every 10 minutes:arghfist::saddowns:
But I don't mind really, this framework seems like a better home for it:3:
Sorry, you need to Log In to post a reply to this thread.