Starting MUD-like game

Started by
5 comments, last by robobrain 12 years, 5 months ago
Hello everyone,

So I am another one of those which want to create game.
I am programming in PHP and C# for few years now, I also have some experience with Java and ActionScript, and few days ago I decided that right now I have probably enough time to give it a try and use my free time to create some kind of web game I was thinkng for some time. The problem is that I have never worked with games, so I am not sure where to start. I thought it would be better if I will ask now, before I will lose 2-3 month and then I will figure it out that I am going in wrong direction :)

So general idea is game similar to old but still nice MUD game ( http://en.wikipedia.org/wiki/MUD ).

Right for now I have 2 doubts, but more will probably came when I will start. but for now:

1. So there would be locations on map where people can move and make some actions there. Let's say we have our player which is in Location called "Room".
Of course there is description of the room, let's say they are 3 exits there, and something is lying on the ground. Also I am planing to add some kind of graphics to rooms. But it will be just static image.
So our character will have at least 4 options:
- move to first direction
- move to second direction
- move to third direction
- look what is lying on the ground
That's just a simple example and making game like this would be probably easy to make. But still I have some doubts about it.
My idea of locations is about positions on the map. So every locations have X, Y and Z (basment, dungeons, stairs etc. ). The only question I have is how to store locations? Better idea is to store them all in database or maybe in XML files? Or maybe there is other solution?

2. Well MUD is multi-user, and my idea is also to create game where people can exist in the same world. So let's say we have our location where our characters is in, and then other player cames in. What I want to achieve is to show to both players that they are in the same location right after someone join this location. Also when other player will leave locations there should be information like "XXX left" (or something like this). That of course means I can't use php directly to make it work. What you guys think is best solution here?

I would be greatful for every help I can get.
Advertisement
1) You needn't store it with coordinates - it could simply be a graph with links joining your room nodes. Thus you can have irregular spaces and odd directions where required. As for whether to do this in a database or XML or whatever - do what you're most comfortable with. It'll be faster for development initially, and if you outgrow it, exporting data from one format and into another is usually trivial.


2) Have a look into AJAX, among other things. You could either leverage your C# background here and use an AJAX template in your VS IDE, or you could look into using the Javascript AJAX libraries directly with PHP.
I'm checking out the open-source WheelMUD right now. It's written in C# and I'm learning a lot by dissecting it.
I'm checking out the open-source WheelMUD right now. It's written in C# and I'm learning a lot by dissecting it. [/quote]
Thank you for a link, but from what I have read it's just another MUD, and as I said I don't want to create MUD but the game which is using overal idea of this kind of games.
Of course I am sure that I can find some very usefull ideas and solutions there but I think right now I need more basics.
And first step would be to have a few locations, where people can move, and see each other.

1) You needn't store it with coordinates - it could simply be a graph with links joining your room nodes. Thus you can have irregular spaces and odd directions where required. As for whether to do this in a database or XML or whatever - do what you're most comfortable with. It'll be faster for development initially, and if you outgrow it, exporting data from one format and into another is usually trivial.[/quote]
Oh right. I don't know why I didn't think about it earlier, and from top I thought it should be coordinates.

2) Have a look into AJAX, among other things. You could either leverage your C# background here and use an AJAX template in your VS IDE, or you could look into using the Javascript AJAX libraries directly with PHP.[/quote]
I am not so good with AJAX, just know some basics. So I will read more about it.

Thanks for all advices, if someone have more please write it here :)


2) Have a look into AJAX, among other things. You could either leverage your C# background here and use an AJAX template in your VS IDE, or you could look into using the Javascript AJAX libraries directly with PHP.

I am not so good with AJAX, just know some basics. So I will read more about it.

Thanks for all advices, if someone have more please write it here :)
[/quote]

Try jQuery for Ajax/Javascript needs. It's really easy.
Want to make Android Games?
Then check out the free RoboBrain SDK.
[size="2"][url="http://www.robobrain.org"]www.robobrain.org[/url]

[quote name='Vasquez21' timestamp='1320836523' post='4882071']

2) Have a look into AJAX, among other things. You could either leverage your C# background here and use an AJAX template in your VS IDE, or you could look into using the Javascript AJAX libraries directly with PHP.

I am not so good with AJAX, just know some basics. So I will read more about it.

Thanks for all advices, if someone have more please write it here :)
[/quote]

Try jQuery for Ajax/Javascript needs. It's really easy.
[/quote]

I have read some opinions, and how everything should work and now I have some doubts.
If I want to use AJAX, then I have to query database let's say every second. I know that's not a problem for a few users. But how it would work when you have let's say 50 or more users?

I have read some opinions, and how everything should work and now I have some doubts.
If I want to use AJAX, then I have to query database let's say every second. I know that's not a problem for a few users. But how it would work when you have let's say 50 or more users?


There are a lot of variables to consider before being able to answer that question. It depends a lot on your hosting service (or servers), what kind of database you're using, etc. For the most part, it should be ok if you have a good infrastructure.

Your game should definitely be designed to minimize the number of database queries required though. For example, if you enable in-game messaging/chat, don't do it through the database. Look into hosting a Jabber server or something like that. At most you should query and/or update the database when a player makes a move and push that out to the other players.
Want to make Android Games?
Then check out the free RoboBrain SDK.
[size="2"][url="http://www.robobrain.org"]www.robobrain.org[/url]

This topic is closed to new replies.

Advertisement