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:
[img]http://puu.sh/uhWe[/img]
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.
[QUOTE=Vault;35922175]I made a simple program that plays Ocarina sounds using Beep();
[url]http://dl.dropbox.com/u/59459111/BeepOcarina.zip[/url]
What do you guys think?[/QUOTE]
Neat function so I gave it a try:
[vid]http://dl.dropbox.com/u/34571219/wha.webmvp8.webm[/vid]
I don't think Fluffy's gonna sleep.
[t]http://puu.sh/uiqK[/t]
Added NPC chat (as well as the ability to do things when the player clicks the NPC).
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!
Yay phys...
[VID]http://dl.dropbox.com/u/11197643/brokenrotation.webm[/VID]
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.
[QUOTE=Jawalt;35926736]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.[/QUOTE]
What language are you writing it in?
[QUOTE=Perl;35926748]What language are you writing it in?[/QUOTE]
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.
[QUOTE=WhatTheEf;35925724]Neat function so I gave it a try:
*video*
I don't think Fluffy's gonna sleep.[/QUOTE]
Made a morse code beeper with that once.
[IMG]http://dl.dropbox.com/u/5342745/hnefatafl.png[/IMG]
I finally made a working game of 11x11 [URL="http://en.wikipedia.org/wiki/Hnefatafl"]Hnefatafl[/URL]
Blurgh just found a 'deal-breaker' with my language. Back to the drawing board :(
[editline]12th May 2012[/editline]
Actually maybe not.
[QUOTE=Jawalt;35926959]Blurgh just found a 'deal-breaker' with my language. Back to the drawing board :(
[editline]12th May 2012[/editline]
Actually maybe not.[/QUOTE]
if it's C# can't you go through the code evaluation step by step using breakpoints?
[img]http://dl.dropbox.com/u/18131951/Screenshots/screenshot_2012-05-12_1835_1.png[/img]
Multi-touch and buttons!
[QUOTE=Perl;35927302]if it's C# can't you go through the code evaluation step by step using breakpoints?[/QUOTE]
Yes, but all the code is in different places the way I've set things up, it's hard to follow.
[QUOTE=Jawalt;35927583]Yes, but all the code is in different places the way I've set things up, it's hard to follow.[/QUOTE]
Then add some sort of global function for a 'tick' system so you could break it, maybe :v:
[QUOTE=Jawalt;35926736]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.[/QUOTE]
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.
[IMG]http://niggaupload.com/images/ZNkGY.gif[/IMG]
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.
[QUOTE=Parakon;35928489][img]http://niggaupload.com/images/ZNkGY.gif[/img]
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.[/QUOTE] I would go see a doctor if my dick was a black rectangle and i piss yellow smoke.
haven't gotten around to the cock art yet, and it wouldn't be very SFW
[vid]http://dl.dropbox.com/u/4093439/conversations.webm[/vid]
Fraps fucked up the mouse cursor or something. Also NPC->Player dialogue does work, I just didn't show it.
Cleaned up the texture weight code for my terrain, looks a lot better now:
[img]http://i.imgur.com/vATsH.jpg[/img]
[editline]12th May 2012[/editline]
ewww jpg compression... anyone know of an image host that doesn't jpg compress everything?
[QUOTE=robmaister12;35929267]ewww jpg compression... anyone know of an image host that doesn't jpg compress everything?[/QUOTE]
Try uploading it to imgur as a gif.
I don't see much jpeg rape
[t]http://puu.sh/ulTA.png[/t]
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.
[QUOTE=robmaister12;35929267]Cleaned up the texture weight code for my terrain, looks a lot better now:
[img]http://i.imgur.com/vATsH.jpg[/img]
[/QUOTE]
Kinda looks like carpet?
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)
[media]http://www.youtube.com/watch?v=fA1lOoVart4[/media]
So i'm working on figuring out why this happens. I added an issue to the bugtracker in the meantime.
Polymorphism.
[IMG]http://dl.dropbox.com/u/27619601/Public%20Pictures/poly.png[/IMG]
Each one of those boxes is a different function all under the same name.
[url]http://pastebin.com/2hHbTMQG[/url]
[URL=http://filesmelt.com/][IMG]http://filesmelt.com/dl/Sequence_1.gif[/IMG][/URL]
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.
[QUOTE=elih595;35930308][url]http://pastebin.com/2hHbTMQG[/url]
[URL=http://filesmelt.com/][IMG]http://filesmelt.com/dl/Sequence_1.gif[/IMG][/URL]
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.[/QUOTE]
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?
[QUOTE=elih595;35930308][URL]http://pastebin.com/2hHbTMQG[/URL]
[URL="http://filesmelt.com/"][IMG]http://filesmelt.com/dl/Sequence_1.gif[/IMG][/URL]
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.[/QUOTE]
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.
[QUOTE=geel9;35926018][t]http://puu.sh/uiqK[/t]
Added NPC chat (as well as the ability to do things when the player clicks the NPC).[/QUOTE]
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?
Sorry, you need to Log In to post a reply to this thread.