By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
432,537 Members | 1,743 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 432,537 IT Pros & Developers. It's quick & easy.

Browser Game Caching and Design

P: n/a
Chu
Hello All-

I'm writing a game using asp.net (c#). The game is a browser-based Role
Playing Game. I'm trying to determine the best way to design the game
with scalability in mind.

The Player class will hold info about the player, such as hit points,
weapons and armor that are equipped, and other stats specific to the
player. Each page on the site will require some or all of the info
stored in the player object.

I'm assuming that there would be lots of overhead with re-creating the
player object each time the page is refreshed. Is there some type of
caching mechanism I can use to cache the player object?

A few things to keep in mind:

Player 1 could be logged in and choose to attack another player who
could be logged in or not. If the player being attacked is not logged
in, the info about that player would obviously come from the database
and not the cache. On the other hand, if the player is logged in, it
should come from the cache.

If there are 50 players logged in at the same time, would this type of
caching system become way too much of an overhead in terms of ram
storage? Where's the best tradeoff, I could either get lots of CPU and
DB overhead by recreating the player object on every page load or I
could get the overhead in RAM storage by keeping a cache.

Would any of the session state methods work (such as using a database
session state to save each player object?) Or perhaps a simple static
hashtable that stores a player object?

I appreciate any thoughts or tips that can be provided here.

Thanks

R.S

Feb 21 '06 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Chu
bump

Feb 28 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.