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

Text-based MMORPG Game (DB Scheme Question)

P: 1
Hello Experts.
This is my fourth time im starting to learn PHP/MySQL/AJAX

All the times i tried, was boring, because i was learning only the syntax commands.

Now i do another way. I decided to build up something that i would like to call "its mine!" So it will probably be simple text-based mmorpg game.

Everything goes well until this:
Database MySQL scheme. How would i build the tables?
I mean, i know how, but i also know that there will be fields that will frequently change it self (UPDATE * FROM ..), like: Hit Point bar, user_expience, skill_lvl, money_in_pack, world money etc etc etc...

Now i can do some ideal scheme, items -> 1 table, users -> 2 tables, maps -> 1 table etc...

But i guess its wrong? I cant put static and low-changing fields with frequently changing fields right? because the UPDATE command will go through the whole table right?

so i need to put the static together and frequently fields to separate each in a table? I guess so... what you say guys?
BTW, someone mentioned me about byte arrays or something? what is that? any docs for that? he said the frequently fields you can put inside the programm those fields, in cache, with bytes? 000111000111, 0011 will be - 1, and 1100 will be 24, etc... actually i dont get the whole idea of this guy(friend of mine) so can anyone direct me to some documents about that?

Now back to DB scheme, how do i connect it? using ID as i already seen somewhere?

look at my pseudo-scheme:

Expand|Select|Wrap|Line Numbers
  1. users_table {
  2.     +user_id AUTO_INCREMENT
  3.     +primary_key(user_id)
  4.     +user_continent(+nation) // by choosing your continent, user is automatically moves to speciefic server. (can be?)
  5.     +user details (
  6.     "loginname,firstname,
  7.     lastname,age,
  8.     dateofbirth,country,
  9.     email,password,icq,
  10.     referrer,textlogo
  11.     chatcolor,sexselect");
  12.     }
  14.     usersprofiles_table {
  15.     +uprofiles_id
  16.     +user_id
  17.     +user_perks // Choise of 3 perks. 3 possibilities to change.
  18.     +user_ranks
  19.     +user_levels // Depends on user's stats -> STR * INT * END * DEX / 1000 & = level.
  20.     +displayname
  21.     }
  23.     userstatus_table {
  24.     +status_id // Such as Administrator, SuperVisor, Moderator, Baron, VIP Player, Premium Player, Banned/Condemned
  25.     +user_id
  26.     }
  28.     stats_table {
  29.     +stats_id
  30.     +stat_name
  31.     +stat_req
  32.     +stat_desc
  33.     }
  35.     user_stats_table {
  36.     +ustats_id
  37.     +stats_id
  38.     +user_id
  39.     +ustats_value
  40.     +ustats_formula
  41.     }    

this is how do i see the scheme... now every table that is connected to users, i put user_id to load the table with users right?

im just stuck and dont get how to connect it all... if anyone give me an example from mine code with 2-3 table connected as it should be ill continue by this example myself.

Sorry for the salat. :) couldnt explain it better. :)
Jan 21 '08 #1
Share this question for a faster answer!
Share on Google+

Post your reply

Sign in to post your reply or Sign up for a free account.