1. Post #881
    Logcat and multitouch!

    Reply With Quote Edit / Delete Windows 7 Netherlands Show Events Dumb Dumb x 1 (list)

  2. Post #882
    voodooattack's Avatar
    October 2009
    1,939 Posts
    Not using it, and that's final.
    Reply With Quote Edit / Delete Windows 7 Egypt Show Events Agree Agree x 1 (list)

  3. Post #883
    Person
    geel9's Avatar
    June 2008
    5,602 Posts
    I've been working on a Runescape private server in C# recently. Most others are in Java (I know of only one other that's in C#), and they are all horrible abominations under the hood. I decided to write a better one in C#, so now I am.

    Runescape's packet protocol is very (and intentionally) convoluted. They use either little, "middle," or big endian, in addition to "Special A, B, C" datatypes (they're just simple arithmetic operations). The use of these is seemingly random--packet 105 may have three shorts, but each short could be a different endian order, etc. However, packets will always be consistent--packet 105 will always have three shorts with that exact order.

    After finishing the login process, I wrote the player movement/chat code. Then I wrote the Item code--in such a way that it makes it easy to write a subclass of Item and, using reflection magic, automatically populate a list of "special" Item classes. In addition to that, I had to load Item information from the Runescape cache, which was annoying as hell. I eventually just modified the source of the client to, when it loads the items, write their information to a file, since I didn't want to have to work out reading from the cache myself.

    My latest accomplishment is getting NPCs working. They can't move or attack yet, but they can spawn and whatnot. It's easy to write custom code per-NPC; just write a subclass of NPC and override the GetIDS() method, which returns an integer array of the IDs this NPC is written for.

    Picture of NPCs:



    The server and client are version 317, which is a very, very old version, but from my experience, its packet protocol is the most documented.
    Reply With Quote Edit / Delete Windows 8 United States Show Events Programming King x 30Disagree x 2Winner x 1Informative x 1Dumb x 1 (list)

  4. Post #884
    WhatTheEf's Avatar
    November 2010
    532 Posts
    I made a simple program that plays Ocarina sounds using Beep();

    http://dl.dropbox.com/u/59459111/BeepOcarina.zip
    What do you guys think?
    Neat function so I gave it a try:



    I don't think Fluffy's gonna sleep.
    Reply With Quote Edit / Delete Windows 7 Anonymous Proxy Show Events Funny Funny x 7 (list)

  5. Post #885
    Person
    geel9's Avatar
    June 2008
    5,602 Posts


    Added NPC chat (as well as the ability to do things when the player clicks the NPC).
    Reply With Quote Edit / Delete Windows 8 United States Show Events Programming King Programming King x 4 (list)

  6. Post #886
    T3hGamerDK's Avatar
    January 2011
    2,551 Posts
    I'm currently working on a graphics abstraction layer (GAL) for the Parrot Virtual Machine. The cool thing about this is that it allows other languages running on Parrot VM to use it.
    This means I write my code once, and Java programmers, Javascript programmers, Python, Perl, or Haskell programmers, can start using my library.
    I write it once, and people can use it in any language using the Parrot VM. This shit is amazing!
    Reply With Quote Edit / Delete Mac Denmark Show Events Winner Winner x 2 (list)

  7. Post #887
    ben1066's Avatar
    August 2009
    1,025 Posts
    Yay phys...
    Reply With Quote Edit / Delete Windows 8 United Kingdom Show Events Funny Funny x 20 (list)

  8. Post #888
    Gold Member
    Jawalt's Avatar
    August 2007
    3,478 Posts
    Ugh, I'm at the point in my language where I've got to make a line-by-line debugger of some sort or SOMETHING :( it's hard to figure out where my code fucks up.
    Reply With Quote Edit / Delete Windows 7 United States Show Events Friendly Friendly x 3 (list)

  9. Post #889
    Crescent fresh
    Perl's Avatar
    January 2011
    1,003 Posts
    Ugh, I'm at the point in my language where I've got to make a line-by-line debugger of some sort or SOMETHING :( it's hard to figure out where my code fucks up.
    What language are you writing it in?
    Reply With Quote Edit / Delete Windows 7 Estonia Show Events

  10. Post #890
    Gold Member
    Jawalt's Avatar
    August 2007
    3,478 Posts
    What language are you writing it in?
    C# as sort of a proof-of-concept deal, but I want to rewrite it in C eventually. For portability/speed, and the language doesn't really gain much being written in C# over C.
    Reply With Quote Edit / Delete Windows 7 United States Show Events

  11. Post #891
    Gold Member
    Armandur's Avatar
    March 2009
    666 Posts
    Neat function so I gave it a try:

    *video*

    I don't think Fluffy's gonna sleep.
    Made a morse code beeper with that once.



    I finally made a working game of 11x11 Hnefatafl
    Reply With Quote Edit / Delete Windows 7 Sweden Show Events Winner Winner x 1 (list)

  12. Post #892
    Gold Member
    Jawalt's Avatar
    August 2007
    3,478 Posts
    Blurgh just found a 'deal-breaker' with my language. Back to the drawing board :(

    Edited:

    Actually maybe not.
    Reply With Quote Edit / Delete Windows 7 United States Show Events

  13. Post #893
    Crescent fresh
    Perl's Avatar
    January 2011
    1,003 Posts
    Blurgh just found a 'deal-breaker' with my language. Back to the drawing board :(

    Edited:

    Actually maybe not.
    if it's C# can't you go through the code evaluation step by step using breakpoints?
    Reply With Quote Edit / Delete Windows 7 Estonia Show Events

  14. Post #894


    Multi-touch and buttons!
    Reply With Quote Edit / Delete Windows 7 Netherlands Show Events Informative Informative x 1Programming King Programming King x 1 (list)

  15. Post #895
    Gold Member
    Jawalt's Avatar
    August 2007
    3,478 Posts
    if it's C# can't you go through the code evaluation step by step using breakpoints?
    Yes, but all the code is in different places the way I've set things up, it's hard to follow.
    Reply With Quote Edit / Delete Windows 7 United States Show Events

  16. Post #896
    Crescent fresh
    Perl's Avatar
    January 2011
    1,003 Posts
    Yes, but all the code is in different places the way I've set things up, it's hard to follow.
    Then add some sort of global function for a 'tick' system so you could break it, maybe
    Reply With Quote Edit / Delete Windows 7 Estonia Show Events

  17. Post #897
    Dotmister's Avatar
    May 2008
    898 Posts
    Ugh, I'm at the point in my language where I've got to make a line-by-line debugger of some sort or SOMETHING :( it's hard to figure out where my code fucks up.
    You could probably get pretty far with just a "debugger;" statement which pauses execution and outputs a stack trace + some kind of variable dump perhaps with some form of assert so you can conditionally output it.
    Reply With Quote Edit / Delete Windows 7 United Kingdom Show Events Agree Agree x 2 (list)

  18. Post #898
    Gold Member
    Parakon's Avatar
    November 2008
    8,520 Posts


    touched up the pissing mini-game, this is on hard mode, which is probably induced by drinking a lot, sleep deprivation, or a combination of both.
    Reply With Quote Edit / Delete Windows 7 Canada Show Events Winner Winner x 22Funny Funny x 4Informative Informative x 1Programming King Programming King x 1 (list)

  19. Post #899
    I gave enough money to buy a soda.
    Funley's Avatar
    May 2010
    1,407 Posts


    touched up the pissing mini-game, this is on hard mode, which is probably enduced by drinking a lot, sleep deprivation, or a combination of both.
    I would go see a doctor if my dick was a black rectangle and i piss yellow smoke.
    Reply With Quote Edit / Delete Windows 7 Finland Show Events Funny Funny x 18Agree Agree x 3Disagree Disagree x 1 (list)

  20. Post #900
    Gold Member
    Parakon's Avatar
    November 2008
    8,520 Posts
    haven't gotten around to the cock art yet, and it wouldn't be very SFW
    Reply With Quote Edit / Delete Windows 7 Canada Show Events Informative Informative x 6Programming King Programming King x 1 (list)

  21. Post #901
    Person
    geel9's Avatar
    June 2008
    5,602 Posts


    Fraps fucked up the mouse cursor or something. Also NPC->Player dialogue does work, I just didn't show it.
    Reply With Quote Edit / Delete Windows 8 United States Show Events Winner Winner x 11Funny Funny x 1Disagree Disagree x 1 (list)

  22. Post #902
    Gold Member
    robmaister12's Avatar
    January 2008
    4,969 Posts
    Cleaned up the texture weight code for my terrain, looks a lot better now:



    Edited:

    ewww jpg compression... anyone know of an image host that doesn't jpg compress everything?
    Reply With Quote Edit / Delete Windows 7 United States Show Events Artistic Artistic x 5 (list)

  23. Post #903
    NovembrDobby's Avatar
    April 2007
    1,147 Posts
    ewww jpg compression... anyone know of an image host that doesn't jpg compress everything?
    Try uploading it to imgur as a gif.
    Reply With Quote Edit / Delete Linux United Kingdom Show Events Disagree Disagree x 1 (list)

  24. Post #904
    Map in a box's Avatar
    July 2009
    7,201 Posts
    I don't see much jpeg rape
    Reply With Quote Edit / Delete Windows XP United States Show Events Agree Agree x 6Disagree Disagree x 4 (list)

  25. Post #905
    Thanks guys, I think I will make the Nokia Lumia 920 with Windows Phone my next smartphone.
    Vault's Avatar
    May 2012
    1,235 Posts

    I think I'm going to make a Pokemon clone to start out, I haven't really gotten into making things move yet, but I guess I'm fine right now.
    Reply With Quote Edit / Delete Windows 7 United States Show Events Funny Funny x 3Friendly Friendly x 1 (list)

  26. Post #906
    Gold Member
    Lexic's Avatar
    March 2009
    6,123 Posts
    Cleaned up the texture weight code for my terrain, looks a lot better now:

    Kinda looks like carpet?
    Reply With Quote Edit / Delete Mac United Kingdom Show Events

  27. Post #907
    Gold Member
    HeroicPillow's Avatar
    July 2009
    4,607 Posts
    I've been using GWEN for a little while now, and it's pretty great. There's just a few small bugs here and there that i've found with docking.

    (it has annotations describing what's happening if you don't understand)

    So i'm working on figuring out why this happens. I added an issue to the bugtracker in the meantime.
    Reply With Quote Edit / Delete Windows 7 United States Show Events Agree Agree x 1 (list)

  28. Post #908
    Eudoxia's Avatar
    July 2009
    6,009 Posts
    Polymorphism.



    Each one of those boxes is a different function all under the same name.
    Reply With Quote Edit / Delete Windows 7 Uruguay Show Events

  29. Post #909
    Fat & Ugly
    elih595's Avatar
    October 2009
    789 Posts
    http://pastebin.com/2hHbTMQG



    I'm trying to make the red ball collide with the blue square but only 2 sides work. I can't figure out what is causing it.
    Reply With Quote Edit / Delete Windows 7 United States Show Events

  30. Post #910
    Gold Member
    Dr Magnusson's Avatar
    July 2008
    2,694 Posts
    http://pastebin.com/2hHbTMQG



    I'm trying to make the red ball collide with the blue square but only 2 sides work. I can't figure out what is causing it.
    The collision checks run on line 61 & 64, and 67 & 70 respectively, are completely identical. Sure you didn't forget to change the +/- operators somewhere in there?
    Reply With Quote Edit / Delete Windows 7 Denmark Show Events

  31. Post #911

    February 2007
    112 Posts
    http://pastebin.com/2hHbTMQG



    I'm trying to make the red ball collide with the blue square but only 2 sides work. I can't figure out what is causing it.
    I didn't look long enough to figure out the problem but for starters your 4 if statements are sets of identicals. Line 61 is identical to line 64. Same with Lines 67 and 70. So each one is overriding the last's value set to PlayerX and PlayerY

    Heh, someone beat me to it.
    Reply With Quote Edit / Delete Windows 7 United States Show Events

  32. Post #912
    AtomiCasd's Avatar
    June 2011
    588 Posts


    Added NPC chat (as well as the ability to do things when the player clicks the NPC).
    Reverse engineering is really interesting for some reason.

    On a side note, how would I force a program that is hardcoded to connect to a remote ip, instead connect to some other ip I've specified?
    Reply With Quote Edit / Delete Windows 7 Norway Show Events Agree Agree x 1 (list)

  33. Post #913
    Andrew McWatters
    Dennab
    March 2011
    4,658 Posts
    Reverse engineering is really interesting for some reason.

    On a side note, how would I force a program that is hardcoded to connect to a remote ip, instead connect to some other ip I've specified?
    replace the ip address in memory
    Reply With Quote Edit / Delete Windows 7 United States Show Events Agree Agree x 2 (list)

  34. Post #914
    Gold Member
    Jookia's Avatar
    July 2007
    6,768 Posts
    Use your hosts file.
    Reply With Quote Edit / Delete Linux Australia Show Events Agree Agree x 13Disagree Disagree x 4Dumb Dumb x 1 (list)

  35. Post #915
    Gold Member
    AimlessGiant's Avatar
    March 2008
    3,103 Posts
    Almost done my frogger clone for college but the highscore table is giving me trouble <:C
    Reply With Quote Edit / Delete Windows 7 United Kingdom Show Events

  36. Post #916
    dajoh's Avatar
    March 2011
    625 Posts
    Reverse engineering is really interesting for some reason.

    On a side note, how would I force a program that is hardcoded to connect to a remote ip, instead connect to some other ip I've specified?
    Hook connect()/sendto(), or patch the executable.
    Reply With Quote Edit / Delete Windows 7 Sweden Show Events Agree Agree x 3Dumb Dumb x 1 (list)

  37. Post #917
    ben1066's Avatar
    August 2009
    1,025 Posts

    This isn't getting any better.
    Reply With Quote Edit / Delete Windows 8 United Kingdom Show Events Funny Funny x 2 (list)

  38. Post #918
    Gold Member
    Hypershadsy's Avatar
    February 2008
    2,408 Posts
    I hate to ask this here, but it's a small question with a quick one-word answer:

    What do you all use for webm recording, as seen in the OP?
    Reply With Quote Edit / Delete Windows 7 United States Show Events

  39. Post #919
    mmavipc's Avatar
    February 2009
    843 Posts
    Everyone, Click here please.
    Reply With Quote Edit / Delete Windows 7 United States Show Events

  40. Post #920

    January 2012
    416 Posts
    What if I don't want to be your friend?
    Reply With Quote Edit / Delete Windows 7 Canada Show Events Dumb Dumb x 14Funny Funny x 1Agree Agree x 1 (list)