Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting
FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 01-22-2014, 07:34 PM
sssssssssss sssssssssss is offline
Cyril Rain
sssssssssss's Avatar
Join Date: May 2003
Location: Texas, USA
Posts: 1,134
sssssssssss will become famous soon enough
SQLite for Facebook/Mobile Devices

Is there any difference in using SQLite vs DBNPCs for a Facebook or mobile device server in terms of lag and performance? Which is the better option? Does it even make a real difference?
__________________
Cyril Rain
Creator and leader of SLX
Admin of Elysium
Elysium's Facebook Page: http://facebook.com/GraalOnlineElysium
Graal Forum Thread: http://forums.graalonline.com...
Graalians Thread: http://www.graalians.com...



Last edited by sssssssssss; 01-23-2014 at 01:27 AM..
Reply With Quote
  #2  
Old 01-23-2014, 04:09 AM
Hezzy002 Hezzy002 is offline
Registered User
Join Date: Jul 2011
Posts: 247
Hezzy002 is a jewel in the roughHezzy002 is a jewel in the rough
how are sqlite or dbnpcs even interchangable
Reply With Quote
  #3  
Old 01-23-2014, 04:16 AM
sssssssssss sssssssssss is offline
Cyril Rain
sssssssssss's Avatar
Join Date: May 2003
Location: Texas, USA
Posts: 1,134
sssssssssss will become famous soon enough
Saving this.vars in a dbnpc vs storing it in sql.
__________________
Cyril Rain
Creator and leader of SLX
Admin of Elysium
Elysium's Facebook Page: http://facebook.com/GraalOnlineElysium
Graal Forum Thread: http://forums.graalonline.com...
Graalians Thread: http://www.graalians.com...



Last edited by TSAdmin; 01-24-2014 at 02:44 PM.. Reason: Section about a deleted message was removed.
Reply With Quote
  #4  
Old 01-23-2014, 05:29 AM
cbk1994 cbk1994 is offline
the fake one
cbk1994's Avatar
Join Date: Mar 2003
Location: San Francisco
Posts: 10,718
cbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond repute
Send a message via AIM to cbk1994
DB NPC flags are typically stored in memory.
__________________
Reply With Quote
  #5  
Old 01-23-2014, 11:44 AM
sssssssssss sssssssssss is offline
Cyril Rain
sssssssssss's Avatar
Join Date: May 2003
Location: Texas, USA
Posts: 1,134
sssssssssss will become famous soon enough
Does that make it worse? Does sql not store in memory? I'm not very knowledgeable with those specifics Chris. But tryin to learn some right now. :/
__________________
Cyril Rain
Creator and leader of SLX
Admin of Elysium
Elysium's Facebook Page: http://facebook.com/GraalOnlineElysium
Graal Forum Thread: http://forums.graalonline.com...
Graalians Thread: http://www.graalians.com...


Reply With Quote
  #6  
Old 01-23-2014, 01:36 PM
Torankusu Torankusu is offline
Elite Member
Torankusu's Avatar
Join Date: Jun 2001
Posts: 10,065
Torankusu has a spectacular aura aboutTorankusu has a spectacular aura about
http://forums.graalonline.com/forums...03&postcount=3

Depends on what you need to do.
__________________
Quote:
Originally posted by Spark910
Think befreo you type.
Reply With Quote
  #7  
Old 01-23-2014, 01:45 PM
Torankusu Torankusu is offline
Elite Member
Torankusu's Avatar
Join Date: Jun 2001
Posts: 10,065
Torankusu has a spectacular aura aboutTorankusu has a spectacular aura about
Quote:
Originally Posted by sssssssssss View Post
I know it's server-side I didn't realize I said it was client-side you knob...

Saving this.vars in a dbnpc vs storing it in sql. You don't have to be a **** I was just making sure sql was ok to use on mobile and Facebook servers and if there was any real difference in efficiency between the 2. Damn son...

Some things ive decided to use sql for instead of a dbnpc are things like items dbnpc method thread

PHP Code:
function onCreated() 

  
/* 
    Format: 
    this.item_id = {Name, Internalname, Image, ActionWeapon, Canbedropped}; 
   */ 
  
  
this.item_100 = {"Block""block""block.png""-No Item"1}; 

Instead of storing items like that, you can create a table with sqlite instead.

There are instances here you will need scripted interactions where dbnpcs are a better option.

Aside from that, my experiences are limited so I can't shed much more light on the subject. Sorry.
__________________
Quote:
Originally posted by Spark910
Think befreo you type.
Reply With Quote
  #8  
Old 01-23-2014, 02:01 PM
sssssssssss sssssssssss is offline
Cyril Rain
sssssssssss's Avatar
Join Date: May 2003
Location: Texas, USA
Posts: 1,134
sssssssssss will become famous soon enough
No, you helped a lot. Thank you. I had thought I heard somewhere that you shouldn't use sql for mobile devices or facebook, but apparently that was wrong as well. I'm very acquainted with SQL from PHP, so I'm more used to that route and would prefer it. I appreciate the help.
__________________
Cyril Rain
Creator and leader of SLX
Admin of Elysium
Elysium's Facebook Page: http://facebook.com/GraalOnlineElysium
Graal Forum Thread: http://forums.graalonline.com...
Graalians Thread: http://www.graalians.com...


Reply With Quote
  #9  
Old 01-24-2014, 02:44 AM
cbk1994 cbk1994 is offline
the fake one
cbk1994's Avatar
Join Date: Mar 2003
Location: San Francisco
Posts: 10,718
cbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond repute
Send a message via AIM to cbk1994
Quote:
Originally Posted by sssssssssss View Post
Does that make it worse? Does sql not store in memory? I'm not very knowledgeable with those specifics Chris. But tryin to learn some right now. :/
Since it's all stored in memory you have to be very careful what you store in DBNPC flags, especially if you expect lots of players (otherwise it quickly scales past anything reasonable).
__________________
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 03:20 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.