Pages

Tuesday, April 4, 2006

l33t

How cool, my blog entry has an actual pi symbol. I feel so special.

I was working on Zork so very long ago and I actually came up with some question that I would like to ask peoples.

If I make this a service, that people connect to. Does that mean all the detail about rooms, and objects be stored in a database instead objects. Do I only interact with the database, or do I keep details about room ‘in memory’ until a person leaves a room.

I’ve probably skipped over a great lot of detail (Do people still remember Zork?). But I want to enjoy some popcorn.

-= Comments
1. Zooba | April 3rd, 2006 at 11:29 pm

Yes, I remember Zork

Keep in mind that even if you store the details in objects, the objects will still have to be stored in a database. Possibly this is a level of abstraction which is easy to achieve and convenient for this purpose, perhaps not.

Since multiple people will conceivably be using the room (similar to a MUD - maybe look for some code for these) you need to be careful about who keeps what information. In my experience, usually the server maintains everything and input/output is echoed to the client.

As usual, it is possible to produce this without using OO techniques at all, though it may require a greater stretch of the mind, since this is a problem that lends itself to OO. However, a RDBMS could also easily be used. It basically comes down to what you are used to and how much abstraction/performance loss you’re prepared to live with.

2. Andrew B Coathup | April 4th, 2006 at 7:09 pm

What is the most efficient, what is the most scalable?

What works for ten rooms? for 100 rooms? for 1000 rooms?

What works for ten users, a 1000, 100,000 users?

Use the database with sensible caching. That is my two cents.

No comments:

Post a Comment