• What Are You Working On? Mesh Edition - August 2012
    650 replies, posted
Wha? I.... Huh? I have no idea what the hell I did or how this even happened: [img]http://puu.sh/NJnw[/img]
Progress on the new wiki is going good, me Drakehawke and Lexic added all libraries and classes so far.
[QUOTE=Wizard of Ass;37039420]Progress on the new wiki is going good, me Drakehawke and Lexic added all libraries and classes so far.[/QUOTE] I thought garry was going to autogenerate it... by this point I'm glad someone is working on it since it appears that isn't going to happen. -- Anyway, first time in any FP highlights :sci101: I've ran low on ideas on how to add to that thing, since windows are slightly buggy. I put the project on bitbucket if anyone wants to cry at the source with me: [url]https://bitbucket.org/Somepotato/gtop[/url] [editline]1st August 2012[/editline] Hint: Garry should open up menu state [editline]1st August 2012[/editline] For now, I'll just accidentally it into gmod beta to see if it runs. I'll edit post with results.
[QUOTE=Wizard of Ass;37039420]Progress on the new wiki is going good, me Drakehawke and Lexic added all libraries and classes so far.[/QUOTE] [url]https://github.com/FPtje/Sublime-GLua-Highlight/blob/master/GENERATOR/SublimeText/lua/autorun/MatchGenerator.lua[/url] This might be useful generating the functions/enumerations. It's a generic stuff name generator, at the bottom I specialized it to generate Sublime text 2 stuff. Works for gmod 13.
You are kinda late sorry, already wrote tons of scripts for automated exporting, besides the templates changed etc.
[URL="http://steamcommunity.com/id/someguynamedpie/screenshot/957265750424372003"][img]http://cloud.steampowered.com/ugc/957265750424372003/E0DE4C6D30B9FF28A0EF343EF2A6B6E921A3EBDE/[/img][/URL] Bahhaahahah Click it if you want proof or something.
[QUOTE=Map in a box;37039853]I thought garry was going to autogenerate it... by this point I'm glad someone is working on it since it appears that isn't going to happen.[/quote] Yeah he said he wouldn't have enough time to do it so we should just go ahead and fill it in ourselves.
I'm recoding (for the third time) the '[URL="http://steamcommunity.com/sharedfiles/filedetails/?id=71933123"]Legend of Zelda[/URL]' addon since it's a big mess and can do better. Shouldn't be too much time to redo it. I also added sub modules to my base script, since in the LoZ addon, the ocarina and time portions are separate, so one can be disabled and keep the other running intact. I didn't really put much thought in what it can be useful for, except for adding mods and disabling mechanics, such as disabling something like hunger. [offtopic] [QUOTE=Map in a box;37040774]-windows 98- Bahhaahahah Click it if you want proof or something.[/QUOTE] Why does it have to be 98...
Just a proof of concept menu access thingy. Don't hate on winders 98
[QUOTE=Remscar;37038622]I always had my FastDL on the same VPS as my game servers, so i just used a directory link/junction to the cache folder inside my FastDL. Worked like a charm, but we don't all have VPS's.[/QUOTE] I refuse to host my own webservers, I've always found webservers to be far more vulnerable to abuse than gameservers which I could throttle off, filter and block unwanted data. Fairly reliable shared website hosting is dirt cheap. Doing this also separates your hosting so that when one is taken offline the other isn't offline as well simply because they aren't hosted together.
[QUOTE=Wizard of Ass;37039420]Progress on the new wiki is going good, me Drakehawke and Lexic added all libraries and classes so far.[/QUOTE] How'd you get a login? I'd love to fill it up.
[QUOTE=Spencer Sharkey;37046816]How'd you get a login? I'd love to fill it up.[/QUOTE] [url]http://wiki.garrysmod.com/page/Special:UserLogin[/url]
Was making a function that compares to tables to see if they are the same contents wise. Then i realized i had done something similar before. Does anyone have a table compare function? I remember mine was less-efficient then somebody elses. [editline]2nd August 2012[/editline] [QUOTE=Spencer Sharkey;37046816]How'd you get a login? I'd love to fill it up.[/QUOTE] I thought garry didn't want us to fill it up yet?
Well, he said that we can now, otherwise it would be still locked?
[QUOTE=Wizard of Ass;37047535]Well, he said that we can now, otherwise it would be still locked?[/QUOTE] It was locked? :mindblown:
Great work on the wiki so far guys. I'll try to get a Lua syntax highighter on there for you.. does anyone know of a nice lightweight javascript one? I'd rather keep it as clientside as possible if I can. [editline]2nd August 2012[/editline] One thing though.. [img]http://puu.sh/NTWE[/img] Can you leave the styling up to me. I'd rather put it in stylesheets that can be changed globally than have you styling tables manually. For now just lay it out like a wiki.
[QUOTE=garry;37047723]Great work on the wiki so far guys. I'll try to get a Lua syntax highighter on there for you.. does anyone know of a nice lightweight javascript one? I'd rather keep it as clientside as possible if I can.[/QUOTE] I found this couple days ago and I've been meaning to give it a shot myself. [url]http://craig.is/making/rainbows/[/url] (on [url=https://github.com/ccampbell/rainbow]github[/url] too) It's pretty lightweight, you can theme it however you want with CSS and you can download just the Lua highlighting, leaving the unneeded ones out.
[QUOTE=garry;37047723]Great work on the wiki so far guys. I'll try to get a Lua syntax highighter on there for you.. does anyone know of a nice lightweight javascript one? I'd rather keep it as clientside as possible if I can. [/QUOTE] SyntaxHighlighter: [url]http://alexgorbatchev.com/SyntaxHighlighter/manual/demo/[/url] I believe that someone made a jQuery plugin for this, idk if that would clutter things up more though. lua brush: [url]http://www.undermyhat.org/blog/2009/09/list-of-brushes-syntaxhighligher/[/url] [editline]:([/editline] whoa rabbish's is way more lightweight
[QUOTE=garry;37047723]More stuff about the wiki.[/QUOTE] To be honest, we should have a wiki thread by now, this stuff doesn't really belong into the thread.
Garry, how would you like libraries to be structured? Currently it's /page/<libname>, would you prefer /page/Libraries/<libname>?
I don't mind either way... page/Libraries/ is more logical though
[QUOTE=garry;37049279]I don't mind either way... page/Libraries/ is more logical though[/QUOTE] I assume you have ways to move all the libraries from /page/ to /page/Libraries without much fuzz? It takes kinda long to move them all...
[QUOTE=slayer3032;37031373]In my opinion I found myself updating my gamemodes far less overtime because changing the map to build a datapack and then having to download it, bz2 it on my computer and then upload it to the webserver being annoying as shit. Clients would always complain terribly, disconnect and even possibly never come back. I've always wished for the client lua to have been sent directly to the client like it originally was in like 06/07.[/QUOTE] option 1 > symlink, obviously this doesn't apply to you specifically since you were on a linux box. option 2 > rawIO + some lua to write over the cache to your fastdl
[QUOTE=JustSoFaded;37050993]option 1 > symlink, obviously this doesn't apply to you specifically since you were on a linux box. option 2 > rawIO + some lua to write over the cache to your fastdl[/QUOTE] you can symlink on linux ln -s
[QUOTE=JustSoFaded;37050993]option 1 > symlink, obviously this doesn't apply to you specifically since you were on a linux box. option 2 > rawIO + some lua to write over the cache to your fastdl[/QUOTE] 1. You can make symlinks in linux? I can't think of any functionality which a Linux box doesn't have that a Windows box does. 2. Why would I ever use a module on my gameserver which can write files all over the box? Sure it isn't a problem on linux to anything other than the server files because Linux encourages proper file permissions but it's rather idiotic to use it for anything. One of the only legitimate uses for it was to write vehicle script files for Gmod Racer which since they are text files was done much easier and without a stupid with a symlink. Besides that you can't even write/read binary data in Garry's mod since the datapack was compressed. 3. Your post missed the point. [QUOTE=slayer3032;37042498]I refuse to host my own webservers, I've always found webservers to be far more vulnerable to abuse than gameservers which I could throttle off, filter and block unwanted data. Fairly reliable shared website hosting is dirt cheap. Doing this also separates your hosting so that when one is taken offline the other isn't offline as well simply because they aren't hosted together.[/QUOTE] Hosting a webserver on the same box is just asking for trouble, just because you don't have a problem with it doesn't make it mean anything in the same regards as you could not have a problem running everything as root and using the same password for everything.
[QUOTE=slayer3032;37056884] Hosting a webserver on the same box is just asking for trouble[/QUOTE] Why? Curious because I do that
[QUOTE=Drakehawke;37056925]Why? Curious because I do that[/QUOTE] If someone were to gain access to your forums/webserver they could upload a 'shell' and gain access to your entire box. Also Slayer, I wasn't aware you weren't hosting everything on the same server.
So I've been debating on how to save a players inventory inside of ACRE. Items inside of ACRE are structured as special metatables. New instances of an item is created by doing: [lua] local myitem = Item:New(BaseItemID,{Item Modifications}) [/lua] I've already coded into the metatable a way of detecting to see if a specific item has been modified from its base item, this way i can save base items as just the item ID and a quantity. However unique items, or items which have been modified, need to be saved with their modifications intact, thus resulting in having to save the base item ID, modifications, and it's quantity. Since the player inventory needs to be reduced to a savable string, which can the be processed when loaded, I need a fast and efficient method of doing this. I came up with three ways to properly save the players inventory before it is serialized to a string (using VON, or HON). [lua] INVENTORY = {} ikey = {} ikey[BaseItemID] = {Item Modifications} INVENTORY[ikey] = Quantity ----Or----- INVENTORY = {} INVENTORY[#INVENTORY+1] = {BASE=BaseItemID,Item Modifications} --Per item (Repeat for #Quantity) ----Or EVEN----- INVENTORY = {} INVENTORY[ikey] = {Quantity=Quantity,{Item Modifications}} [/lua] However after some thought i realized that the third method would not work if you have more than one item of the same ID with different modifications. So i had the first two options left. I went ahead and ran benchmarks to see how fast the serialize/deserialize using VON. I set it to test serializing 900 items. (200 of one type, 300 of another, and 400 of another) To no surprise the 1st method blazed through in no time at all sawce: The code is not very pretty, im aware. [lua] if true then MsgN("") TT = {} TX = {} TX[3] = {Name="Item1"} TT[TX] = 300 TX = {} TX[2] = {} TT[TX] = 200 TX ={} TX[5] = {Name="Item5",Size=10,Limit=12} TT[TX] = 400 /*for k,v in pairs(TT) do for k2,v2 in pairs(k) do MsgN("Item Base: "..tostring(k2)) for k3,v3 in pairs(v2) do MsgN(" "..k3.." = "..v3) end end MsgN("Quantity: "..v) MsgN("") end*/ local start = os.clock() OUTPUT = von.serialize(TT) --MsgN(OUTPUT) TT = von.deserialize(OUTPUT) local tend = os.clock() MsgN("TIME = "..tostring(tend-start)) /*MsgN("") for k,v in pairs(TT) do for k2,v2 in pairs(k) do MsgN("Item Base: "..tostring(k2)) for k3,v3 in pairs(v2) do MsgN(" "..k3.." = "..v3) end end MsgN("Quantity: "..v) MsgN("") end*/ end if true then MsgN("") TT = {} for i=1,100 do TT[#TT+1] = {BASE=3,Name="Item1"} TT[#TT+1] = {BASE=3,Name="Item1"} TT[#TT+1] = {BASE=3,Name="Item1"} TT[#TT+1] = {BASE=2} TT[#TT+1] = {BASE=2} TT[#TT+1] = {BASE=5,Name="Item5",Size=10,Limit=12} TT[#TT+1] = {BASE=5,Name="Item5",Size=10,Limit=12} TT[#TT+1] = {BASE=5,Name="Item5",Size=10,Limit=12} TT[#TT+1] = {BASE=5,Name="Item5",Size=10,Limit=12} end local start = os.clock() OUTPUT = von.serialize(TT) --MsgN(OUTPUT) TT = von.deserialize(OUTPUT) local tend = os.clock() MsgN("TIME = "..tostring(tend-start)) end [/lua]
[QUOTE=JustSoFaded;37057064]If someone were to gain access to your forums/webserver they could upload a 'shell' and gain access to your entire box. Also Slayer, I wasn't aware you weren't hosting everything on the same server.[/QUOTE] It's the same risk as hosting a srcds server, if someone were to gain access to it. Solution: Don't install any server on a root account.
[QUOTE=Drakehawke;37056925]Why? Curious because I do that[/QUOTE] Initially I started out with a windows server and after being suspended from a webhost for "extreme usage" or some shit I decided to just host it on my own box. DoS attacks would easily consume the whole CPU, I had no possible way to filter any sort of networking being on windows box and was pretty much stuck with a process that could easily lockup my box. Sure this is a result of me not know how to run a webserver very well but along with the nearly doubled bandwidth use, it just wasn't worth it. Website software such as SMF, VBulletin and many others also have plenty of exploits and vulnerabilities. I'd just rather not run something which the only upside to hosting yourself is being able to easily copy files to the downloadurl and save at most maybe $50 a year. I also prefer not "putting all your eggs in the same basket", splitting up your hosting a little bit makes your community harder take offline. Most attackers won't take the effort to take down your website as well as your servers. Ideally your community shouldn't disappear off the internet just because your gameservers were taken offline, hacked, down, having hardware problems or whatever else you could think of. I also feel that more professional webserver hosting companies would have much better load balancing, resources and even some DoS protection. For that extra few bucks instead of running it yourself you can get a site which is ran much better than you can probably do yourself. [QUOTE=JustSoFaded;37057064]If someone were to gain access to your forums/webserver they could upload a 'shell' and gain access to your entire box. Also Slayer, I wasn't aware you weren't hosting everything on the same server.[/QUOTE] This is much more unlikely under a linux server, the most damage it could probably do is read your gameservers and your script could be leaked. I had posted that I didn't like to run my own webservers on the previous page but since it was the last post on a page like 75% of my posts end up being it's pretty easy to overlook it.
Sorry, you need to Log In to post a reply to this thread.