• What are you working on? February 2012
    3,497 replies, posted
  • [QUOTE=chimitos;34765339]From what I've herd, you needed to have signed up for it a while ago. Someone correct me if I'm wrong.[/QUOTE] Aw man.
  • [QUOTE=supersnail11;34765776]Check your PMs[/QUOTE] Thanks man but its alright, I am under 18 also.
  • [QUOTE=toaster468;34766010]Thanks man but its alright, I am under 18 also.[/QUOTE] More of that I kinda told my parents that it was 18 or older before I noticed that it doesn't ask for a DoB and it wouldn't matter. So if I did make an app and got a playbook in the mail, they'd know something was up. [editline]19th February 2012[/editline] So go nuts
  • I hate stupid bugs. Those ones where your eyes just trick you and you're stuck at it for 30 minutes. This is what I was stuck on: [CODE]sf::Texture menuDimage; menuDimage.LoadFromFile("img/menuDefault.png"); sf::Sprite menuD(); menuD.SetTexture(menuDimage);[/CODE] I couldn't find anything wrong with that (it was the sf::Sprite menuD(); that was wrong, if you couldn't tell already).
  • Prepare yourselves [img]http://dl.dropbox.com/u/45554193/images/terminal%20gui%20wooo.png[/img] My roguelike is approaching playability
  • That moment when you fix something faster than Intellisense. ffffffffffffffffffff- my automerge Does anyone else code waaayyyy better at night than in the day?
  • [QUOTE=Bumrang;34766421]That moment when you fix something faster than Intellisense. ffffffffffffffffffff- my automerge Does anyone else code waaayyyy better at night than in the day?[/QUOTE] Yes, because during the day your brain has to think about all this bullshit. And your working memory is filled with bullshit like "hey let's play vidya games", and "hey you should totally do something". During the night it's all calm and quiet and you can fill your working memory with things like programming.
  • I've decided, for no discernible reason, to write an Android app. How similar is Java to C++?
  • I figured that syntax would be similar enough but actual function implementation and class declaration and all the runtime stuff would be completely different. Sure glad I don't have to deal with con/destructor though. I'll write a few hello worlds to get used to it, then tackle my desired app.
  • [csharp] public class Dicks{ public static void main(String[] args){ System.out.println("Milliseconds since the Unix Epoch: "+System.currentTimeMillis()); } } [/csharp] One thing I dislike about Java: NO OPERATOR OVERLOADS GRR
  • I made a quick and dirty program to draw images as text. [img]http://img88.imageshack.us/img88/1239/outputt.png[/img]
  • [QUOTE=Jawalt;34764980]Not trying to hate but the codebase would become a leaky mess in just a few people's turns. I don't mean it in a dick way, but I've been working on learning C for a while and I still wouldn't be comfortable writing code others are going to work extensively with.[/QUOTE] [url]http://www.hpl.hp.com/personal/Hans_Boehm/gc/[/url] [editline]19th February 2012[/editline] it works brilliantly, i've used it in a few projects [editline]19th February 2012[/editline] just replace all your malloc() calls to GC_MALLOC(), all your realloc() calls to GC_REALLOC() and remove your calls to free()
  • [QUOTE=Catdaemon;34759809]Decided to pick up my C++ project again. I haven't written any code for a while. [img]http://img.meteornet.net/uploads/mg688n/ss.png[/img] I decided that the first thing I'd do is plug my console library into GWEN. Was surprisingly easy, and more astoundingly my old code works :v: Can someone explain GWEN_CONTROL_INLINE to me? I can't figure out how it works, only how it's used.[/QUOTE] I tried to minimize the usage of macros in GWEN, but there are a few that should probably be better documented. [cpp]// To be placed in the controls .h definition. #define GWEN_CONTROL( ThisName, BaseName )\ public:\ typedef BaseName BaseClass;\ typedef ThisName ThisClass;\ GWEN_DYNAMIC( ThisName, BaseName )\ ThisName( Gwen::Controls::Base* pParent, const Gwen::String& pName = "" ) #define GWEN_CONTROL_INLINE( ThisName, BaseName )\ GWEN_CONTROL( ThisName, BaseName ) : BaseClass( pParent, pName ) #define GWEN_CONTROL_CONSTRUCTOR( ThisName )\ ThisName::ThisName( Gwen::Controls::Base* pParent, const Gwen::String& pName ) : BaseClass( pParent, pName )[/cpp] So as you can see GWEN_CONTROL_INLINE calls GWEN_CONTROL.. which... typedef's BaseClass to whatever your baseclass is (so in code you can do things like BaseClass::Function()). typedef's ThisClass to whatever your class is (so you can do ThisClass::BlahBlah - for example when passing hooking up events). GWEN_DYNAMIC just sets some stuff up to allow for safe typecasting when dynamic_cast isn't available (using gwen_cast) And then it creates the constructor line. Normally you'd use GWEN_CONTROL_INLINE if you were defining the classes constructor in your the class definition. Otherwide you'd use GWEN_CONTROL in your header, and GWEN_CONTROL_CONSTRUCTOR in your body.
  • Multiple frame importing from spritesheets: [IMG]http://puu.sh/hvjs[/IMG] The frames don't go in the right order but that's an easy fix.
  • [QUOTE=Map in a box;34768339][csharp] public class Dicks{ public static void main(String[] args){ System.out.println("Milliseconds since the Unix Epoch: "+System.currentTimeMillis()); } } [/csharp] One thing I dislike about Java: NO OPERATOR OVERLOADS GRR[/QUOTE] This and typedefs would make java so much easier to use.
  • [QUOTE=Map in a box;34768339][csharp] public class Dicks{ public static void main(String[] args){ System.out.println("Milliseconds since the Unix Epoch: "+System.currentTimeMillis()); } } [/csharp] One thing I dislike about Java: NO OPERATOR OVERLOADS GRR[/QUOTE] Would be nice but there are other bigger reasons to dislike Java. Honestly in C# I never use operator overloading. [editline]19th February 2012[/editline] Just thought of a nice project to do for my portfolio. Going to create an asp.net service for error reporting which automatically creates new issues on GitHub.
  • [QUOTE=high;34769804]Would be nice but there are other bigger reasons to dislike Java. Honestly in C# I never use operator overloading.[/QUOTE] It's extremely useful for some of the built-in types though. The things that annoy me are no generics for value types, no initializers and no extension methods. A co-worker showed me {{}} "initializers", but those are usually not a good idea.
  • [QUOTE=PieClock;34768845]Multiple frame importing from spritesheets: [IMG]http://puu.sh/hvjs[/IMG] The frames don't go in the right order but that's an easy fix.[/QUOTE] Not sure if someone asked before, but what theme is that? (And the wallpaper)
  • [img]http://i.imgur.com/rv3rK.jpg[/img] [img]http://i.imgur.com/cfTsp.png[/img] Which background should i use for a login screen?
  • [QUOTE=alexaz;34770118] Which background should i use for a login screen?[/QUOTE] First one
  • In the past 2 days I've been working on recreating the rating list on the old Facepunch. It just started working and I'm currently testing it with [url=http://www.facepunch.com/threads/1160387?p=34765308&viewfull=1#post34765308]people on the forums[/url].This project wasn't as technically involved as WebCraft, but it was a nice little challenge nonetheless. [t]http://puu.sh/htay[/t] What to do when you need the ratings of every post on Facepunch without access to the database? It would be a lot more tricky on other forums, but luckily Facepunch gives us a head start by providing the ticker. The ticker informs us of new posts being made on the forum, so we don't need to scrape every subforum and every thread. We can now build a list of posts: [t]http://puu.sh/hw1i[/t] As you can see, the ticker gives us all the information we need to fill this table in: [img]http://puu.sh/hw1F[/img] The rest would seem easy, we just send a request for the rating list for every collected post id. There is also the problem that every rating list request will capture just what happened up until that time. If someone rates the post after that, it will not be recorded. The solution is to give users a reasonable time frame to rate a post before requesting the rating list. We could simply wait a month before collecting the ratings of each post, but then the displayed statistics wouldn't be very interesting. The challenge here is to find a balance between a reasonable rating time frame and a reasonable update delay. I've set that delay at 24 hours right now. That means that if your post gets rated now, the rating will have been added to your list tomorrow and if anyone rates your post after that, it will not be recorded. Initially I had in mind that at 0:00 GMT every day, a cronjob would come along and collect all ratings of posts from 24 hours ago and earlier. This turned out to be not very feasible when I discovered that users on Facepunch write no less than 15 thousand new posts every day. So, instead I merged the ticker listening script with the rating scraper. Instead of doing it all at once, it collects the rating of ~4 posts every 10 seconds. [t]http://puu.sh/hw4F[/t] In the past 39 hours, this has already resulted in an large amount of data: [t]http://puu.sh/hw5v[/t] Luckily collecting the data was the hardest part of this project and retrieving statistics is simple. A few examples are listed below: [quote]User with the most [img]http://www.facepunch.com/fp/ratings/programming_king.png[/img] ratings? [img]http://puu.sh/hw6U[/img] Who did garry rate? [img]http://puu.sh/hw89[/img][/quote]
  • [QUOTE=supersnail11;34766237]More of that I kinda told my parents that it was 18 or older before I noticed that it doesn't ask for a DoB and it wouldn't matter. So if I did make an app and got a playbook in the mail, they'd know something was up. [editline]19th February 2012[/editline] So go nuts[/QUOTE] Ok, so I guess I'll use it then, thank you.
  • [QUOTE=Darwin226;34770013]Not sure if someone asked before, but what theme is that? (And the wallpaper)[/QUOTE] Theme is Soft 7, you can find it on Deviant Art and I'll leave a profile message with a link the the wallpaper when I get back on my Desktop if I remember.
  • And I actually implemented this thing into the game now, only works with that hat. I also made it kill all the enemies on the screen. [img]http://i.imgur.com/q7nHM.gif[/img] Bowser didn't stand a chance. And to think, I could be doing something productive with my time!
  • [QUOTE=Maurice;34770395]And I actually implemented this thing into the game now, only works with that hat. I also made it kill all the enemies on the screen. [img]http://i.imgur.com/q7nHM.gif[/img] Bowser didn't stand a chance. And to think, I could be doing something productive with my time![/QUOTE] Now make a double rainbow [editline]19th February 2012[/editline] Only for that hat
  • [QUOTE=Maurice;34770395]And I actually implemented this thing into the game now, only works with that hat. I also made it kill all the enemies on the screen. [img]http://i.imgur.com/q7nHM.gif[/img] Bowser didn't stand a chance. And to think, I could be doing something productive with my time![/QUOTE] Wait... Does it go back in time?
  • [QUOTE=Darkwater124;34770461]Now make a double rainbow[/QUOTE] [img]http://i.imgur.com/xo7LA.gif[/img]