• What are you working on? November 2011 Edition
    3,673 replies, posted
[QUOTE=Swebonny;33525404]You now can pick up stuff from the FP terminal simulator. Now on to dropping stuff.[/QUOTE] Doug in General Discussion?
Oh god this isn't good timing, because of Spm09 rate-spamming, but I swear that's not me. I was checking out the HTML structure of the thread, because I want to grab ratings per-post, too. And uh, haha what? [img]http://i.imgur.com/iQuuR.png[/img]
I was talking to a friend of mine who happens to be Jewish and also interested in fractals/programming in general. When I randomly removed some line piece, it created this: [IMG]http://dl.dropbox.com/u/17216535/screengrab_20111201215648.png[/IMG] You can still kinda recognize a dragon curve in it...
Was this suppose to be some new rating introduced that doubles as a post-flagging? [img]http://i.imgur.com/qFNjl.png[/img] [editline]1st December 2011[/editline] Here's me fixing it up I guess: [img]http://i.imgur.com/rHTml.png[/img]
[QUOTE=amcfaggot;33525601]Oh god this isn't good timing, because of Spm09 rate-spamming, but I swear that's not me. I was checking out the HTML structure of the thread, because I want to grab ratings per-post, too. And uh, haha what? [IMG]http://i.imgur.com/qFNjl.png[/IMG][/QUOTE] [QUOTE=amcfaggot;33525635]Was this suppose to be some new rating introduced that doubles as a post-flagging? [IMG]http://i.imgur.com/qFNjl.png[/IMG][/QUOTE] we're so desperately out of content that we need to post the same pictures with different text great :v:
Maybe a compwhizii leftover.
[QUOTE=amcfaggot;33525635]Was this suppose to be some new rating introduced that doubles as a post-flagging? [img]http://i.imgur.com/qFNjl.png[/img] [editline]1st December 2011[/editline] Here's me fixing it up I guess: [img]http://i.imgur.com/rHTml.png[/img][/QUOTE] isn't that the random message that appears when you rate a post
Furry flagger was an extension to flag furries on FP...
Yes, but it seems to be in the official code.
No. This is a rating that was left in, but is not displayed. It has no icon, and no actual rating ID and hash to use. [editline]1st December 2011[/editline] [QUOTE=Jookia;33526013]Yes, but it seems to be in the official code.[/QUOTE] Yep.
That's why it's ANTI-Furry flagger...
[QUOTE=Yogurt;33526090]That's why it's ANTI-Furry flagger...[/QUOTE] Are you implying that it was put in to stop that extension from working? I could understand that then. It's just that's it's weird that it's in the ratings div. I suppose it's not weird if your guess is right, and they're matching the ratings div to make the extension work some how. [IMG]http://i.imgur.com/zsj6e.png[/IMG] [editline]1st December 2011[/editline] [QUOTE=Samuka97;33525726]we're so desperately out of content that we need to post the same pictures with different text great :v:[/QUOTE] You quoted my posts but replaced one of the images in the quote so you could say I was posting the same picture with different text? Nice going I guess. You also later edited your post so you wouldn't look like a tool? Proskill.
[QUOTE=synthiac;33526480]so uh who is smp09 and why did he just mass-rate[/QUOTE] [url]http://www.facepunch.com/members/435149-Piggeey[/url]
[QUOTE=garry;33519787]Good point - it's the same in the Source Engine [cpp] if (Q_stristr( entname, "func_button" ) == 0 ) return new CFuncButton(); else if (Q_stristr( entname, "weapon_pistol" ) == 0 ) return new CWeaponPistol(); else if (Q_stristr( entname, "something_else" ) == 0 ) return new CSomethingElse(); [/cpp] Oh wait no it isn't, this is what [URL="http://en.wikipedia.org/wiki/Abstract_factory_pattern"]factories [/URL]are for.[/QUOTE] I'm not seeing the obvious in that article, so I'll just ask: How would that help with the if-else strcmp mess?
[QUOTE=thelinx;33526623]I'm not seeing the obvious in that article, so I'll just ask: How would that help with the if-else strcmp mess?[/QUOTE] While the factory examples they provide are factories, they're not very nice examples. In the if-else code that was mentioned, you're running constant explicit string checks to have a return path give you a new object. In a dictionary -> factory pattern, you store a list of objects in some sort of array, do a lookup for an object, and return a new object this way through its factory.
[QUOTE=garry;33525294]ffmpeg is kind of stupid. They go on about how it's open source and awesome, except you should probably put a link to their website on ever page of your product, and in your about screen, and boot up screen and redistribute the source on the same server as your product. But then they mention that if you're a commercial project you probably shouldn't use it anyway because you will get sued by patent trolls. Blargh. Fucking open source with clauses.[/QUOTE] Why don't you try libtheora? I made a screen cap that could capture and encode 1080p in real-time 30FPS. Although it used a huge buffer you might need to make some optimizations (Or save to raw file and encode later) Libtheora and ogg are extremely easy to use too. The compression size is similar to h.264 anyway. I dont see a reason not to use it except when people complain about ogg over .mp4 or something.
[QUOTE=amcfaggot;33526750]While the factory examples they provide are factories, they're not very nice examples. In the if-else code that was mentioned, you're running constant explicit string checks to have a return path give you a new object. In a dictionary -> factory pattern, you store a list of objects in some sort of array, do a lookup for an object, and return a new object this way through its factory.[/QUOTE] Right, yeah, the article showed if-else so that made me a bit confused. Mind showing an example of a "dictionary -> factory pattern"?
[QUOTE=amcfaggot;33526750]While the factory examples they provide are factories, they're not very nice examples. In the if-else code that was mentioned, you're running constant explicit string checks to have a return path give you a new object. In a dictionary -> factory pattern, you store a list of objects in some sort of array, do a lookup for an object, and return a new object this way through its factory.[/QUOTE] Is there a performance increase then? 'Cause it'll look pretty much the same only the if-else block will be replaced by line after line of entries for the dictionary.
Where is the Waywo December edition?
[QUOTE=Staneh;33527081]Where is the Waywo December edition?[/QUOTE] Where are the highlights?
In this thread.
[QUOTE=thelinx;33526852]Right, yeah, the article showed if-else so that made me a bit confused. Mind showing an example of a "dictionary -> factory pattern"?[/QUOTE] Sure, I'll pull up some code here in a bit for you. [QUOTE=ralle105;33526896]Is there a performance increase then? 'Cause it'll look pretty much the same only the if-else block will be replaced by line after line of entries for the dictionary.[/QUOTE] There is no line after line of entries for the dictionary, because you don't add them in like you write an if-else block.
Might be a little late but I wanted to provide a better method... [code] void ito64(unsigned int i, char* buf) { int pos = 0, opos = 0, top = 0; char tBuf[32]; // Ignore 0 if (!i) { *(short*)buf = '0'; return; } // Convert to base64 while(i) { tBuf[pos++] = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz+/"[i % 64]; i /= 64; } // Reverse order top = pos--; for(opos = 0; opos < top; pos--, opos++) buf[opos] = tBuf[pos]; // Terminate string buf[opos] = 0; } [/code] Converts decimal to base64 (correctly). I used timeGetTime() to check how long it takes, apparently 0 ms. Btw, to convert from dec to bin just replace 64 with 2.
Considering Garry brought up Source not handling creation of entities through an if-else block, and my followup example was a runtime dictionary registration of scripted entities, how about I just explain how Source registers entities into the global entity dictionary? The Source engine has a single valid EntityFactoryDictionary at a time, where all of the entities are registered. When you create an entity and tie it to a classname, you can create a CBaseEntity object through CreateEntityByName( pszClassname ). So. When I hardcode a weapon into the Source Engine, I use a macro called LINK_ENTITY_TO_CLASS. An example of this is: [cpp]LINK_ENTITY_TO_CLASS( weapon_hl2mpbase_scriptedweapon, CHL2MPScriptedWeapon ) [/cpp] This macro creates a static factory for CHL2MPScriptedWeapon which returns a new CHL2MPScriptedWeapon object. This factory is mapped against of list of other factories. Where weapon_hl2mpbase_scriptedweapon is the classname, and it's tied to the CHL2MPScriptedWeapon class. When I call CreateEntityByName( "weapon_hl2mpbase_scriptedweapon" ) a new CHL2MPScriptedWeapon object is created and returned to me in the form of a pointer. Calling CreateEntityByName looks up the factory that's tied to the classname given, and returns a new class object generated by the factory. [editline]1st December 2011[/editline] That's a really shit explanation, but it is the quickest one I can give you without having to pull up a number of .cpp and .h files. [editline]1st December 2011[/editline] One you use dictionary/map + factory approaches for massive amounts of object creation you'll realize more people need to know about it.
[QUOTE=garry;33525294]ffmpeg is kind of stupid. They go on about how it's open source and awesome, except you should probably put a link to their website on ever page of your product, and in your about screen, and boot up screen and redistribute the source on the same server as your product.[/quote] The (L)GPL states you should (but are not obliged to) add licensing information in your software's interactive interface, if it has one. But again, you're not breaking the license if you don't. You don't have to state you use it (and that it is f/loss software) anywhere but in a 'licensing' section somewhere in the about screen - see how iOS, Android or about any other embedded OS handles this. All the other 'powered by ffmpeg' are just a matter of courtesy. [QUOTE=garry;33525294]But then they mention that if you're a commercial project you probably shouldn't use it anyway because you will get sued by patent trolls. Blargh. Fucking open source with clauses.[/QUOTE] How is that the software's or developer's fault? Blame patent laws that allow you to patent math. Or pay up a codec fee.
[img]http://i.imgur.com/knL8B.png[/img]
Any Australians here? Buy/Steal/Obtain the recent (?) issue of "Hyper"; apparently they printed a 2 page feature on Mari0 and I NEED scans of that. Also I wanna get my fingers on an actual copy but that sounds expensive. (How expensive is shipping a magazine from Australia to Germany?)
[QUOTE=Maurice;33528741]Any Australians here? Buy/Steal/Obtain the recent (?) issue of "Hyper"; apparently they printed a 2 page feature on Mari0 and I NEED scans of that. Also I wanna get my fingers on an actual copy but that sounds expensive. (How expensive is shipping a magazine from Australia to Germany?)[/QUOTE] The subscriptions range in the ~$100 zone, sorry man.
[QUOTE=Jookia;33528826]The subscriptions range in the ~$100 zone, sorry man.[/QUOTE] Apparently you can get it at stores (friend on MSN told me he found it while browsing magazines in one)
[QUOTE=Maurice;33528741]Any Australians here? Buy/Steal/Obtain the recent (?) issue of "Hyper"; apparently they printed a 2 page feature on Mari0 and I NEED scans of that. Also I wanna get my fingers on an actual copy but that sounds expensive. (How expensive is shipping a magazine from Australia to Germany?)[/QUOTE] I wonder whether they'd send you a copy if you contacted them... [editline]2nd December 2011[/editline] Then again you'd have to have lot of tact to not come off sounding stupid. Maybe you could thank them and then hint hint I want a copy. [editline]2nd December 2011[/editline] Starting to sound like a sitcom now.
Sorry, you need to Log In to post a reply to this thread.