• What are you working on? January 2012
    3,401 replies, posted
[QUOTE=Nigey Nige;34429641]Posting images because fuck your arguments about SSL that I don't understand [IMG]http://i.imgur.com/wSqac.jpg[/IMG] [IMG]http://i.imgur.com/WMUHd.jpg[/IMG] yeaaaaaaaaaaah[/QUOTE] It's sorta like worms in space? With planets?
[vid]http://puu.sh/eRli[/vid] im so bored someone please give me something to do aaaaa
[QUOTE=Wyzard;34429540]Haha, nice image. :-) I haven't been reading FP as regularly in the past few months, and I'm not working with any game-related or graphics-related programming stuff like most projects in this thread are, which is why I'm mostly lurking.[/QUOTE] Heheh, couldn't resist. And yeah, I'm mostly lurking too (from now on that is). Since I just got bashed over of something I posted that didn't include a flashy demonstration. [editline]28th January 2012[/editline] [QUOTE=Naarkie;34429701][vid]http://puu.sh/eRli[/vid] im so bored someone please give me something to do aaaaa[/QUOTE] Add video chat support to CleverOmegle. [sp]trololololololo[/sp]
[QUOTE=Naarkie;34429701][vid]http://puu.sh/eRli[/vid] im so bored someone please give me something to do aaaaa[/QUOTE] Clean your room. Then, modify a NES emulator to have genetic algorithms control the player, using memory locations for fitness (Oh god please do it)
[QUOTE=Maurice;34429689]It's sorta like worms in space? With planets?[/QUOTE] Yeah, pretty much Worms.add(Galcon).scale(gameDesignSkill).
[QUOTE=Hexxeh;34429250]Do we have any Windows Phone developers who'd be interested in writing a Facepunch application? We have Android and iOS covered, that just leaves Windows Phone in terms of major platforms.[/QUOTE] Can do, where is the API documentation?
[QUOTE=Dotmister;34429792]Can do, where is the API documentation?[/QUOTE] On the previous page.
[QUOTE=COBRAa;34429645](when I made it thread safe, it lost a lot of its speed).[/quote] that's because you're using a spinlock - don't do that
[QUOTE=Dotmister;34429792]Can do, where is the API documentation?[/QUOTE] Basic documentation is a few pages back, but if you need more help regarding API usage, I'm available via Steam and MSN. Please note one of the conditions of use of the API, is that your application MUST be free of charge. No paid versions or ads, but you can put a donate link inside your app if you wish. I'm providing a free service, so I don't really want people profiting off of that service. Plus I want folks to get free apps.
No, it was the lua_open that caused it to slow down, not the lock. Right now there is only one lock, and that's for a global var (no other way around it, microhttpd doesn't support lambadas for its callback).
[QUOTE=COBRAa;34429842]No, it was the lua_open that caused it to slow down, not the lock. Right now there is only one lock, and that's for a global var (no other way around it, microhttpd doesn't support lambadas for its callback).[/QUOTE] this is not very threadsafe anyway: [cpp] LuaAPILock::LuaAPILock() { int mine = LockCount; LockCount++; while(LockCount > mine && LockCount != 1) // If it's one, we are the only ones waiting ; } [/cpp]
Here's some quick benchmarks I've written: Averaging all results over 10 requests Forum index ------------------------- Standard: 1.56s | 61719.2 bytes API: 1.51s | 3025.2 bytes API was 1.03x faster API was 20.4x smaller General Discussion thread list ------------------------- Standard: 1.48s | 114499.7 bytes API: 1.77s | 13321 bytes Standard was 1.2x faster API was 8.6x smaller Programming WAYWO January 2012 page 75 ------------------------- Standard: 1.79s | 191571.2 bytes API: 2.16s | 30533 bytes Standard was 1.21x faster API was 6.27x smaller
[QUOTE=swift and shift;34429862]this is not very threadsafe anyway: [cpp] LuaAPILock::LuaAPILock() { int mine = LockCount; LockCount++; while(LockCount > mine && LockCount != 1) // If it's one, we are the only ones waiting ; } [/cpp][/QUOTE] I heard that it was ran in a critical section so it should be. What would you say I should do?
Got some basic lighting working in my completely un-original top-down Zombie iPhone game. [IMG]http://i.imgur.com/APpqT.jpg[/IMG] FPS goes low when the iPhone takes a screenshot, it plays way above that. Oh my god those compression artifacts.
[QUOTE=COBRAa;34429883]I heard that it was ran in a critical section so it should be. What would you say I should do?[/QUOTE] If it is run in a critical section then it should be, but I don't see where you're setting up any critical sections. (In fact if you are running a critical section, why are you locking?) If you really want to roll your own spinlock, use something like this: [cpp] int handle; void lock() { __asm__("spin:\n" "movl $1, %eax\n" "xchgl %eax, (_handle)\n" "testl %eax, %eax\n" "jnz spin"); } void unlock() { __asm__("movl $0, %eax\n" "xchgl (_handle), %eax"); } [/cpp]
Recursion works: [code]fib: 1 ifle drop leave . drop 1 sub dup 1 sub (fib) swap (fib) add . (fib) out 10 outc [/code] [IMG]http://i.imgur.com/fPLDr.png[/IMG]
[url=https://github.com/c0bra61/luaserver/commit/d63d1609f3b58de3eb3fa53bfded991ee8591152]oh my god what are you doing cobra[/url]
Okay, there was a bug that made it impossible to make an API request for some folks, it's related to the way in which cookie auth works. So now, if you get a "no session error", just use the authenticate action (only requires username/password args) and you're good until the new session expires. This replaces the checklogin action.
More enviroment [URL=http://imageshack.us/photo/my-images/835/69948238.png/][IMG]http://img835.imageshack.us/img835/7980/69948238.png[/IMG][/URL]
Teach me your tricks with lighting :C
[QUOTE=dije;34431848]Teach me your tricks with lighting :C[/QUOTE] It's really easy, i just made a sprite that follows the player in front of the other sprites. [url]http://imageshack.us/photo/my-images/11/sprlight.png/[/url]
[QUOTE=Sebixxx;34432000]It's really easy, i just made a sprite that follows the player in front of the other sprites. [url]http://imageshack.us/photo/my-images/11/sprlight.png/[/url][/QUOTE] creative solution
So yesterday after reading the post about the 4chan game bot, I decided to blatantly steal the id- I mean write my own. I got a question. I'm using HtmlAgilityPack for the scraping, and I want to add post functionality. So, I try to get the captcha image, but it just won't bloody show up. Using [csharp] doc.DocumentNode.SelectSingleNode("descendant-or-self::div[@id='recaptcha_image']/img") [/csharp] returns null, and using [csharp] doc.DocumentNode.SelectSingleNode("descendant-or-self::img") // or doc.DocumentNode.SelectSingleNode("descendant-or-self::img[2]") [/csharp] either gets the title image (the one at the top, that's random), or the image directly after the captcha (happens to be a little red dot). Any ideas?
[img]http://images.devs-on.net/Image/V6qHNPEG8O2y8Kd-steamwebapiatmas.png[/img] fleshing out interfaces and the https/http wrapper modules today [editline]28th January 2012[/editline] [QUOTE=bobthe2lol;34432084]So yesterday after reading the post about the 4chan game bot, I decided to blatantly steal the id- I mean write my own. I got a question. I'm using HtmlAgilityPack for the scraping, and I want to add post functionality. So, I try to get the captcha image, but it just won't bloody show up. Using [csharp] doc.DocumentNode.SelectSingleNode("descendant-or-self::div[@id='recaptcha_image']/img") [/csharp] returns null, and using [csharp] doc.DocumentNode.SelectSingleNode("descendant-or-self::img") // or doc.DocumentNode.SelectSingleNode("descendant-or-self::img[2]") [/csharp] either gets the title image (the one at the top, that's random), or the image directly after the captcha (happens to be a little red dot). Any ideas?[/QUOTE] I get the feeling that while you have the right DOM element (I've checked), it's not actually there until post-initial DOM load due to JavaScript appending it.
[QUOTE=amcfaggot;34432091] I get the feeling that while you have the right DOM element (I've checked), it's not actually there until post-initial DOM load due to JavaScript appending it.[/QUOTE] Of course, I didn't think of that. Thanks [editline]28th January 2012[/editline] You were able to check? boards.4chan.org seems down from my end.
[QUOTE=swift and shift;34430048]If it is run in a critical section then it should be, but I don't see where you're setting up any critical sections. (In fact if you are running a critical section, why are you locking?) If you really want to roll your own spinlock, use something like this: [cpp] int handle; void lock() { __asm__("spin:\n" "movl $1, %eax\n" "xchgl %eax, (_handle)\n" "testl %eax, %eax\n" "jnz spin"); } void unlock() { __asm__("movl $0, %eax\n" "xchgl (_handle), %eax"); } [/cpp][/QUOTE] You should put a LOCK prefix on the XCHG instruction, otherwise if two cores end up on the XCHG instruction in a decent sync, both will acquire the lock And you should really put a PAUSE instruction in there too, otherwise it'll be detecting possible memory order violations which slows it down a lot while its checking for them
[QUOTE=bobthe2lol;34432130]Of course, I didn't think of that. Thanks [editline]28th January 2012[/editline] You were able to check? boards.4chan.org seems down from my end.[/QUOTE] It's up for me.
[QUOTE=amcfaggot;34432216]It's up for me.[/QUOTE] Alright. Also, congrats on 2000 posts. Edit: Wtf? It's like I'm IP banned. boards.4chan.org/b is fine when going there behind tor, but not when I go there directly, then I get an ERR_CONNECTION_RESET...
[QUOTE=bobthe2lol;34432276]Alright. Also, congrats on 2000 posts. Edit: Wtf? It's like I'm IP banned. boards.4chan.org/b is fine when going there behind tor, but not when I go there directly, then I get an ERR_CONNECTION_RESET...[/QUOTE] I've had stuff like that happen before, do a trace to boards, it's not them most likely.
[QUOTE=Sebixxx;34431694]More enviroment [/QUOTE] Pretty! The environment reminds me of this old game for some reason: [IMG]http://i.imgur.com/HcVsc.png[/IMG]
Sorry, you need to Log In to post a reply to this thread.