• What are you working on? V3
    2,001 replies, posted
[QUOTE=Marlamin;17695866]What are you trying to do? Looks way to complicated for me. :v:[/QUOTE] :v: Same thing you're doing, haha :D
[QUOTE=Druchii;17695886]:v: Same thing you're doing, haha :D[/QUOTE] Why don't just use PHP's built in XML parser? (SimpleXML, not the other one). It made my life way easier.
[QUOTE=Marlamin;17695903]Why don't just use PHP's built in XML parser? (SimpleXML, not the other one). It made my life way easier.[/QUOTE] Oh, i'm using this: [url]http://no2.php.net/manual/en/function.xml-parse.php[/url] (In what appears to be an odd convoluted sort of way...)
[QUOTE=Druchii;17696009]Oh, i'm using this: [url]http://no2.php.net/manual/en/function.xml-parse.php[/url] (In what appears to be an odd convoluted sort of way...)[/QUOTE] Here's an example how easy it is to just echo a character name. [code] //blabla you grab xml page through curl $load = curl_exec($curl); // curl shit $xml = new SimpleXMLElement($load); //parse xml page as simplexml array $char_name = $xml->characterInfo->character['name']; //location of the charname echo $char_name; [/code] I expanded this a lot etc and have a 300+ line file with all definitions and locations of different strings. Really handy, if you want it throw me a PM and I'll send it to you tomorrow.
[QUOTE=blankthemuffin;17688148]This is the worst attitude ever.[/QUOTE] It is, although I'm not doing any work for someone if I did it would be professionally done. When I'm trying to code my own website for the hell of it I tend to be lazy. I'm not going to be an uptight bitch about things.
[QUOTE=benjgvps;17685216]While you crazy people go and make wonderful things, I will be learning how to program my Arduino. I got it to flash an LED five times and then pause for one second. Yay me.[/QUOTE] You're not alone; I just finished designing a circuit board, etching it, soldering it, and programming it to flash the LEDs in a sequence. The result? An extremely basic UFO! [media]http://imgkk.com/i/-Q4uyz.jpg[/media] [media]http://imgkk.com/i/3lB6sR.jpg[/media] [media]http://imgkk.com/images/o9u4pS.jpg[/media]
[QUOTE=ZomBuster;17695498]Procedural "terrain" (just heightmapped coherent noise) [IMG]http://www.cubeupload.com/files/641400train.png[/IMG][/QUOTE] I like it. I just coded and drag and drop system for GWEN.
[QUOTE=garry;17697152]I like it. I just coded and drag and drop system for GWEN.[/QUOTE] omg hai garry. plz we can haz buttsecks? [highlight](User was permabanned for this post ("dumb" - garry))[/highlight]
[QUOTE=ZomBuster;17695498]Procedural "terrain" (just heightmapped coherent noise) [IMG]http://www.cubeupload.com/files/641400train.png[/IMG][/QUOTE] Looking good I'm thinking about adding procedural terrain to my planet renderer so I can have bigger planets. Because it's hard to have a big detailed planet with normal heightmaps without it being around 500 000 x 500 000px.
[QUOTE=eric_cartman;17697194]omg hai garry. plz we can haz buttsecks?[/QUOTE] Oh no! The fanboys found Garry's hideout!
[QUOTE=Marlamin;17696138]Here's an example how easy it is to just echo a character name. [code] //blabla you grab xml page through curl $load = curl_exec($curl); // curl shit $xml = new SimpleXMLElement($load); //parse xml page as simplexml array $char_name = $xml->characterInfo->character['name']; //location of the charname echo $char_name; [/code] I expanded this a lot etc and have a 300+ line file with all definitions and locations of different strings. Really handy, if you want it throw me a PM and I'll send it to you tomorrow.[/QUOTE] Holy crap that is simple! I have to look this function up :P Thanks for the heads-up. :buddy:
[QUOTE=ZomBuster;17695498]Procedural "terrain" (just heightmapped coherent noise) [IMG]http://www.cubeupload.com/files/641400train.png[/IMG][/QUOTE] Hmmm, assuming that the shaping is random, the colouring could be random as well. Have it generate a brand new image each time it is ran, then make it the desktop wallpaper. I would totally insert it into my startup folder! As for me, I have gotten through a well written guide for the Arduino's programming language that I printed off of Lulu. Messing around, I was able to control some LEDs from a serial terminal to the board. I am thinking of attempting a small quiz-type thing tommorow... Mind as well start from somewhere!
I'm still learning C++ at school and I haven't learnt about Pointers ect yet so my code looks ugly as ass, but this is what I've made so far :3 [img]http://i34.tinypic.com/1180u8p.jpg[/img] You can move using WASD, you can't go off the screen, and you can press Spacebar to shoot ugly ass black balls. There is also a second player tank that I've added but I haven't done the shooting yet. I'm hoping to start using classes for all my items soon but I want to learn on how to use BaseEntities/WorldEntities to make my code better :P
What are you using for rendering?
Sfml :) EDIT: 1,000th Post
I figured adding billions of buttons to bugspray's manage thing was getting stupid, so I decided to move a whole chunk of management stuff into a window. [media]http://i34.tinypic.com/112bdyr.png[/media] [editline]09:09PM[/editline] And on a side note, is it me or does the bottom of that window look like it has a subtle gradient effect? It's solid white...
Can't see a gradient effect.
[QUOTE=a2h;17705553]I figured adding billions of buttons to bugspray's manage thing was getting stupid, so I decided to move a whole chunk of management stuff into a window. [media]http://i34.tinypic.com/112bdyr.png[/media] [editline]09:09PM[/editline] And on a side note, is it me or does the bottom of that window look like it has a subtle gradient effect? It's solid white...[/QUOTE] I don't see a gradient either. If "Assigned to: unassigned" is wrong, you could try rewording it so it fits in better. Things like "Assigned: unassigned" or "Assigned: user a2h", or chop out the 'user' part so it's just "Assigned: a2h". Another alternative could be "Assigned status" or "Assignment status" for the label but that could be getting a bit wide for the form's alignment. Edit: Or, you could just chuck some angle or square brackets around the unassigned text, that could also work.
Are those buttons custom or are you using some browser which draws them like that? They look really nice.
I hate this code but can't think of a better way.. [code] if ( top < bottom ) { if ( top < left && top < right ) return Pos::Top; else if ( left < right ) return Pos::Left; else return Pos::Right; } else { if ( bottom < left && bottom < right ) return Pos::Bottom; else if ( left < right ) return Pos::Left; else return Pos::Right; } [/code] It's basically returning which is the shortest... top bottom left or right.
[QUOTE=garry;17706389]I hate this code but can't think of a better way.. [code] if ( top < bottom ) { if ( top < left && top < right ) return Pos::Top; else if ( left < right ) return Pos::Left; else return Pos::Right; } else { if ( bottom < left && bottom < right ) return Pos::Bottom; else if ( left < right ) return Pos::Left; else return Pos::Right; } [/code] It's basically returning which is the shortest... top bottom left or right.[/QUOTE] How about this? [code] if(top < bottom && top < left && top < right) return Pos::Top; if(bottom < top && bottom < left && bottom < right) return Pos::Bottom; if(left < top && left < bottom && left < right) return Pos::Left; if(right < top && right < bottom && right < left) return Pos::Right; [/code] [QUOTE=Overv;17706277]Are those buttons custom or are you using some browser which draws them like that? They look really nice.[/QUOTE] I think he's using images for them. On [url=http://anztf2mug.net/a2h/bugspray/]the bugspray website[/url] he's using images for "Reopen this issue", "Change assign" etc.
Doesn't work, what if bottom < top - the first if would return the wrong value.
[QUOTE=garry;17706636]Doesn't work, what if bottom < top - the first if would return the wrong value.[/QUOTE] How so? If bottom < top, then if(top < bottom) would be false. C++ uses short-circuit evaluation, and because they're all &&'ed together as soon as one is false the entire if statement is false so it wouldn't return top. Hence, then it'd move onto the next one, checking if bottom is the smallest, etc. Edit: Unless you've got two the same, but you could overcome that issue by using <= instead of < and just returning the smaller in the order of Top-Bottom-Left-Right.
[QUOTE=garry;17706636]Doesn't work, what if bottom < top - the first if would return the wrong value.[/QUOTE] I risk making myself looking like an idiot, but doesn't top < bottom return false if bottom < top? [B]Edit:[/B] Argh!! I hate getting ninja'd. :argh:
Oh yeah you're right, doh
Re the "Assigned to:" thing, he doesn't need to get rid of "to", he can just change unassigned to "nobody".
[QUOTE=garry;17706389]I hate this code but can't think of a better way.. [code]code[/code] It's basically returning which is the shortest... top bottom left or right.[/QUOTE] If a call to std::min isn't too expensive, maybe try this: [url]http://codepad.org/WbM68pB3[/url] [editline]11:35PM[/editline] It's inline.. so it should be OK (bits/stl_algobase.h line 149)
I'm trying to implement a multi threaded image downscaling algorithm. Now I'm looking for a queue where I can add elements to it and then wait for the queue to empty without using any CPU time. In the worker thread(s) I want to wait (with 0% CPU usage) for the queue to get an element and then get it (obviously). Does Java already have such a queue or do I have to make it myself? [B]Edit:[/B] Looks like such a queue doesn't exist. :frown: I'm kinda surprised actually since there are all kinds of weird multi threading specific queues and I thought this particular queue would be pretty common. Oh well, off to make my own. :D
Got a bit of docking working.. It works pretty much the same as the visual studio docking windows. [img]http://img154.imageshack.us/img154/6142/gwendocking.png[/img]
[QUOTE=Robber;17708321]I'm trying to implement a multi threaded image downscaling algorithm. Now I'm looking for a queue where I can add elements to it and then wait for the queue to empty without using any CPU time. In the worker thread(s) I want to wait (with 0% CPU usage) for the queue to get an element and then get it (obviously). Does Java already have such a queue or do I have to make it myself? [B]Edit:[/B] Looks like such a queue doesn't exist. :frown: I'm kinda surprised actually since there are all kinds of weird multi threading specific queues and I thought this particular queue would be pretty common. Oh well, off to make my own. :D[/QUOTE] You could probably extend [url=http://java.sun.com/javase/6/docs/api/java/util/concurrent/ThreadPoolExecutor.html]ThreadPoolExecutor[/url] to provide such functionality.
Sorry, you need to Log In to post a reply to this thread.