Welcome to the Browser-Base Game Zone forums!
Download any free script and check how they did it. It's always much simplier that what you posted.
Can the characters be on multiple maps at the same time? The ERD says so but it seems quite weird .1. If you plan on having a few attributes, such as str, agi I would store them in the character table. If you plan on having tons, another table
2. Items modifying your stats is a quite complex problem, the solution I probably would go with is making item classes, such as potions, armor, weapons and handle them differently in php. Possible jsonify or serialize the data, for example potions, { hp: 100 } or { mana: 10 }.
3. Well, look at 2, and for weapons you could have something like { type: "sword", dmg: 10 }.There are many more ways to do it, but it should give you some ideas on how to do it
Quote from: Chris on November 18, 2011, 02:02:00 PMDownload any free script and check how they did it. It's always much simplier that what you posted.i didnt told that i want to get a simple result. i want to have a good result. others makes everythink over PHP and with much hardcoded if else switch case structure.. its simpler.. but it is not what i want.
Always a joy having to agree with Chris a bit
well chris, what if later in your game forums someone suggest to add new kind of ability or new kind of item.. so you have to go into the code
nvm.. after couple JeamBeam Cola mixes i made a new one.. the equipment table looks kinda strange, maybe it is possible to optimize it?
in one free script I have seen for loop which has read and update queries - it was some sort of mafia script where you trained to raise your skills, and you used turns/money in some field...so 100 turns it is for i=1 to 100 loop which makes 200 queries! they could solve that with 2 queries and more math