Jump to content


noob browser-based question


4 replies to this topic

#1 nyar999

    New Member

  • Members
  • Pip
  • 2 posts

Posted 01 April 2006 - 09:26 PM

I think there's a very blatant or obvious answer to this question, so it may seem stupid to ask it, but what the hell.

I'm a C# .NET programmer, but I've been thinking about game development recently.
What occurred to me: a browser-based MMORPG/MUD-esque text-based system for a small number of people.
Essentially, a way to DM Dungeons & Dragons-like games with friends long distance.
No fancy graphics or UI really, just a text-based game in the tradition of MUDs, but not over telnet.

The point at which I'm wondering about right now is client server synchornization. I had been planning on storing all the info in a database, and then just using queries to pull the info out when something happened. And maybe that would work if it was just a single-player game, but that wouldn't work (I don't think) for alerting people when someone leaves a room, or more importantly, for conversation between players. It was at that point I realized there's gotta be something pretty big that I'm missing that would add that sort of functionality.
Just googling for a little while brought up tcp and udp, which I've never really studied. I was wondering if those were the right categories to pursue to get the functionality I wanted, or if they are just a red herring.

Anyways, like I said, this is probably a pretty basic question, so sorry for that, but I don't want to make this any harder than it has to be.

Also, I'm not really looking for any ready-made stuff, I prefer to build everything myself, so if there's already a module or package out there that does something similar to this, it might be interesting for me to take a look at (to see how they run it), but it's ultimately not what I'm looking for.


Any help's appreciated, so thanks a lot.

-Mitch
"When childhood dies, its corpses are called adults and they enter society, one of the politer names of hell. That is why we dread children, even if we love them, they show us the state of our decay."

-Brian Aldiss

#2 Reedbeta

    DevMaster Staff

  • Administrators
  • 4979 posts
  • LocationBellevue, WA

Posted 01 April 2006 - 09:40 PM

One possibility would be to use Javascript (AJAX-style) to constantly query the server for updates. Of course this would put a fair amount of load on the server, probably not optimal. A Java applet would probably be the most elegant way to deliver this kind of functionality to the players. It's fairly easy to get network connections up and running in Java, as it provides built-in classes for TCP connections, HTTP requests and so forth. You could write the server in Java too, allowing the system to maintain active client connections (as opposed to HTTP's "connectionless" system) and notify people when server-side game events occurred.
reedbeta.com - developer blog, OpenGL demos, and other projects

#3 nyar999

    New Member

  • Members
  • Pip
  • 2 posts

Posted 01 April 2006 - 10:02 PM

AJAX had crossed my mind, however I had been hoping to maybe code in C#.NET since I'm most familiar with that. But I guess I could also use the Java and JS practice.
When you talk about writing the server in Java, do you have any resources for that? I've never really configured/built a server, we've always had a networks guy do that.

Thanks for your quick reply btw.
"When childhood dies, its corpses are called adults and they enter society, one of the politer names of hell. That is why we dread children, even if we love them, they show us the state of our decay."

-Brian Aldiss

#4 Reedbeta

    DevMaster Staff

  • Administrators
  • 4979 posts
  • LocationBellevue, WA

Posted 01 April 2006 - 10:31 PM

If you decide to go with AJAX, you can still write the server-side part in C#.NET. It's only the client-side engine that need be written in Javascript; the server-side part just needs to generate XML information, which can be done in pretty much any language. As for writing a server in Java, I don't have any specific Internet resources but I know the book "Java In a Nutshell" addresses this topic. Come to think of it, you could probably also write that server in C#.NET, it would just be trickier to get it to interoperate with the Java applet on the other end. It's too bad there's no such thing as a C# applet (or is there...?)
reedbeta.com - developer blog, OpenGL demos, and other projects

#5 monjardin

    Senior Member

  • Members
  • PipPipPipPip
  • 1033 posts

Posted 02 April 2006 - 11:25 PM

Theoretically, you can run client-side C# Windows Forms applications in Internet Explorer... I guess that would be a C# applet. Supposedly, it's safer than using ActiveX, but I'm sure there are security hoops to jump through. If this is just for you and your friends then that may be the way to go. Read up on TCP. It's very easy to use with C#.
monjardin's JwN Meter (1,2,3,4,5,6):
|----|----|----|----|----|----|----|----|----|----|
*





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users