Quote:
Originally Posted by cbk1994
I didn't say that, I said you should be careful not to abuse SQLite. The scaling properties of player flags and SQLite are completely different and you should keep those in mind as you structure your server.
Email is usually the best way to contact Stefan, although you'll usually only get a prompt reply if he's interested in what you're doing.
|
We heavily use SQL on delteria, but ALL PLAYER INFORMATION is stored on the player, so that this data only has to be used once. We have a migration Database that keeps the players synced with newest Updates.
Player Weapon Flags:
PHP Code:
clientr.item_Weapons_WoodenSword=1,"Weapons_WoodenSword,""""","Wooden Sword",delt_woodensword-icon.png,"Your ordinary one handed sword handcrafted with wood.",0,Item/Sword,"""meleeDamage,1"",""image_id,wooden"",""gani_prefi.........
Shop Player Flags (Shop Data is even stored on the player):
PHP Code:
clientr.shop_weapon_shop=STATIC,"weapons,",Currency_Delterian,0.5,"""Weapons_Apprentice,250"",""Weapons_BasicSword,250"",""Weapons_WoodenCane,250"",""Weapons_HunterKnife,250"",""Weapons_WoodenSword,250"",""Hunter_LongBow,25
This is so player only gets the data once or when its needed from the SQL Database!
Example: How we use SQL
So from my experience its really important like Chris Vimes said above on how you utilize SQLLite.
Important things you should worry/think about.
-Abuse the crap out of transitions (they look good on idevice and facebook)
PHP Code:
//Ex:addGuiAni(obj, "moveouttop", 0.3);
function addGuiAni(parentctrl, animation, time) {
with ((@parentctrl).createAnimation()) {
transition = animation;
duration = time;
}
(@parentctrl).bringToFront();
if (animation in {"moveouttop"}) {
sleep(time);
(@parentctrl).destroy();
}
}
-Limited to no timeouts, sometimes there needed if this is the case make sure you use if (level.players.size() == 0) return;
-Keep as much information as you can pertaining to the player on the player.
-Use as little particles as possible, although Stefan just recently enabled particle effects on Facebook Client they still work kinda bad.
-Utilize onmousedown for clicking on NPCs
PHP Code:
function onMouseDown() {
if (mousex in | this.x - 1, this.x + 4 | && mousey in | this.y - 2.5, this.y + 4 |) {
echo("Clicked!");
}
}
-Don't use Treeview (not supported)
-Don't use drop down boxes (Not supported/Removed)
-Modify your scrolls to be able to drag with your mouse, making
hScrollBar = vScrollBar = "alwaysOff"; they just look bad int he idevice world.
These are things we looked out for, I attached a code to this post, which will give your GUI Systems full Touch functionality.
// Supported Controls:
// onSwipe - Moving finger horizontally
// onHold - Holding finger in one place for a long time
// onDropped - Stopped holding finger
// onTap - Tapping finger quickly
// onDoubleTap - Double Tapping!
// onFlick - Flicking finger in a direction (scroll-only)
Example:
PHP Code:
// ~ Personal Tab
new GuiScrollCtrl("Achievements_Personal") {
visible = true;
profile = GuiDelteriaPartyScrollProfile;
vscrollbar = hscrollbar = "alwaysOff";
horizsizing = "width";
x = 0;
y = 80+60;
width = Achievements.width;
height = Achievements.height - y - 1;
[B][I][U] this.join("gui_touchscreen");
thiso.catchevent(this.name, "onTap", "onSelectFeat"); [/U][/I][/B]
}
Class: gui_touchscreen (Attached)