Click here to Skip to main content
11,579,093 members (72,789 online)
Rate this: bad
Please Sign up or sign in to vote.
See more: ASP .NET
I want to make a text based MMORPG in C# and ASP .NET. The game will involve constant, continuous updates for example the character/skill experience a player has. My question is, how would I store/update those skill experience variables?

Would I update the SQL Server database every single time a change is made to the "experience points" variables or would I only update the database at certain time intervals? What state management would be best to store such data that is continously updating and is private to each user? How might the requirements/techniques need to be changed if the website/web application becomes extremely popular with heavy traffic?

Thanks for any input!
Posted 8-Oct-12 10:30am
gladiatron at 8-Oct-12 17:30pm
I know its probably not the best parallel, but I am thinking the way chat applications work say on facebook. Basically, its a server socket program that's sat listening at a specific port, clients (aka gamers) connect to that server address and start sending messages i.e. playing game.

The server socket creates a tunnel directly with each client and also keeps a track of which clients are still in the game. Thinking of Texas Poker on Facebook. Once you have a sessioned tunnel created, you can use customised commands sent over TCP/IP to cause a certain action to happen. I would really love to see what others have to say on this.
FourCrate at 11-Oct-12 17:47pm
Thanks for your reply :)

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

Depends on the hardware you have available, and the number of users you are going to have.

You *could* have a layer sitting in-between your app and db which stores certain things inproc and updates the db on a timely basis, but personally I would always update the DB when a change occurs, storing in RAM is dangerous as if your application crashes uncommitted changes wouldn't be there.

For high turnover applications I usually INSERT UPDATE or DELETE exactly when it is meant to happen, and then CACHE the READ's, to minimise the reads from the database.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 OriginalGriff 183
1 Frankie-C 115
2 Afzaal Ahmad Zeeshan 85
3 Richard Deeming 60
4 Suvendu Shekhar Giri 60
0 OriginalGriff 933
1 Sergey Alexandrovich Kryukov 740
2 Abhinav S 573
3 F-ES Sitecore 420
4 Dave Kreskowiak 419

Advertise | Privacy | Mobile
Web03 | 2.8.150603.1 | Last Updated 27 Dec 2012
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100