Graal Forums  

Go Back   Graal Forums > Development Forums > Future Improvements
FAQ Members List Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 05-19-2007, 05:51 PM
Twinny Twinny is offline
My empire of dirt
Twinny's Avatar
Join Date: Mar 2006
Location: Australia
Posts: 2,422
Twinny is just really niceTwinny is just really nice
Send a message via AIM to Twinny
Clientside Cache Files

My title probably sucks.

Anyhoo, savelines/savevars() clientside is good and all but it would be great if there was an additional option to cache/encrypt them i.e. clientside scripts could read them but players won't be able to open the file up in wordpad to see their actual contents.

The reason being for this is that I want to save alot of basic information on the clients computer once it's received e.g. quest information/progress. Saving it on comp would save additional triggers later on but I don't exactly want players messing around with descriptions.

With my luck, something like this can already be done so If anyone has any ideas/criticisms/abuse: go for it .
Reply With Quote
  #2  
Old 05-19-2007, 05:57 PM
Deadly_Killer Deadly_Killer is offline
Registered User
Join Date: Feb 2002
Posts: 227
Deadly_Killer is on a distinguished road
PHP Code:
function onCreated()
{
  
temp.text "Hello, how are you?";
  
  for (
temp.0temp.10temp.I++)
  {
    
temp.text base64encode(temp.text);
  }

  echo(
"Encrypted: " temp.text);
  
  for (
temp.0temp.10temp.I++)
  {
    
temp.text base64decode(temp.text);
  }
  
  echo(
"Decrypted: " temp.text);

__________________
- Zidane / Zidaya
Reply With Quote
  #3  
Old 05-19-2007, 05:59 PM
Twinny Twinny is offline
My empire of dirt
Twinny's Avatar
Join Date: Mar 2006
Location: Australia
Posts: 2,422
Twinny is just really niceTwinny is just really nice
Send a message via AIM to Twinny
base64encode() would be sexy if you could use a key. If I looped all my encryptions a certain amount of times, would that work as a type of key?
Reply With Quote
  #4  
Old 05-19-2007, 06:04 PM
Deadly_Killer Deadly_Killer is offline
Registered User
Join Date: Feb 2002
Posts: 227
Deadly_Killer is on a distinguished road
Quote:
Originally Posted by Twinny View Post
base64encode() would be sexy if you could use a key. If I looped all my encryptions a certain amount of times, would that work as a type of key?
I guess.. (key?)
__________________
- Zidane / Zidaya
Reply With Quote
  #5  
Old 05-21-2007, 11:23 PM
Inverness Inverness is offline
Incubator
Inverness's Avatar
Join Date: Aug 2004
Location: Houston, Texas
Posts: 3,613
Inverness is a jewel in the roughInverness is a jewel in the rough
Make an md5 of the data sent to client, with a key added of course. Store the md5 in clientr flags or in server files, and then check it when the player logs in. Players would still be able to view the files but they would not be able to edit them without the check failing.

Personally I haven't found a reason yet to actually save text on a client's computer.
__________________
Reply With Quote
  #6  
Old 05-22-2007, 01:09 AM
Twinny Twinny is offline
My empire of dirt
Twinny's Avatar
Join Date: Mar 2006
Location: Australia
Posts: 2,422
Twinny is just really niceTwinny is just really nice
Send a message via AIM to Twinny
Quote:
Originally Posted by Inverness View Post
Personally I haven't found a reason yet to actually save text on a client's computer.
I think it would be useful to save all text-based data which needs to be read but doesn't exactly matter if it's tampered with. Stuff like quest info (with diary progress), weapon descriptions. I think it would be better than triggering the information or storing it in clientr. variables.
Reply With Quote
  #7  
Old 05-22-2007, 02:29 AM
Inverness Inverness is offline
Incubator
Inverness's Avatar
Join Date: Aug 2004
Location: Houston, Texas
Posts: 3,613
Inverness is a jewel in the roughInverness is a jewel in the rough
Weapon descriptions would have to be updatable. And quest info might be good, but only if its customizable, otherwise you would just store the strings somewhere.

Btw, for quests, I think its best to use a weapon object for each quest so they can have their own scripts, events, stage detection, etc.
__________________
Reply With Quote
  #8  
Old 05-22-2007, 08:20 AM
Twinny Twinny is offline
My empire of dirt
Twinny's Avatar
Join Date: Mar 2006
Location: Australia
Posts: 2,422
Twinny is just really niceTwinny is just really nice
Send a message via AIM to Twinny
It would be a one off download for the main chunk of information. It shall receive a version number. Minor revisions (spelling errors etc) could be appended to the file. When a new version is available, it checks whether you have it and downloads it if you don't.

My quest system will differ greatly from that as well..think SCUMM style
Reply With Quote
  #9  
Old 05-22-2007, 12:18 PM
zokemon zokemon is offline
That one guy...
zokemon's Avatar
Join Date: Mar 2001
Location: Sonoma County, California
Posts: 2,925
zokemon is a jewel in the roughzokemon is a jewel in the rough
Send a message via ICQ to zokemon Send a message via AIM to zokemon Send a message via MSN to zokemon Send a message via Yahoo to zokemon
Quote:
Originally Posted by Inverness View Post
Weapon descriptions would have to be updatable. And quest info might be good, but only if its customizable, otherwise you would just store the strings somewhere.

Btw, for quests, I think its best to use a weapon object for each quest so they can have their own scripts, events, stage detection, etc.
Oh god Inverness...why did you just say that
__________________
Do it with a DON!
Reply With Quote
  #10  
Old 05-22-2007, 12:53 PM
Twinny Twinny is offline
My empire of dirt
Twinny's Avatar
Join Date: Mar 2006
Location: Australia
Posts: 2,422
Twinny is just really niceTwinny is just really nice
Send a message via AIM to Twinny
Quote:
Originally Posted by zokemon View Post
Oh god Inverness...why did you just say that
Next a weapon for every spell, for every skill and for every weapon .
Reply With Quote
  #11  
Old 05-22-2007, 12:55 PM
zokemon zokemon is offline
That one guy...
zokemon's Avatar
Join Date: Mar 2001
Location: Sonoma County, California
Posts: 2,925
zokemon is a jewel in the roughzokemon is a jewel in the rough
Send a message via ICQ to zokemon Send a message via AIM to zokemon Send a message via MSN to zokemon Send a message via Yahoo to zokemon
Quote:
Originally Posted by Twinny View Post
Next a weapon for every spell, for every skill and for every weapon .
:: explodes ::
__________________
Do it with a DON!
Reply With Quote
  #12  
Old 05-22-2007, 01:12 PM
Twinny Twinny is offline
My empire of dirt
Twinny's Avatar
Join Date: Mar 2006
Location: Australia
Posts: 2,422
Twinny is just really niceTwinny is just really nice
Send a message via AIM to Twinny
Quote:
Originally Posted by zokemon View Post
:: explodes ::
Gentlemen, we can rebuild him. We have the technology. We have the capability to build the world's first bionic man. Zero will be that man. Better than he was before. Better, stronger, faster.
Reply With Quote
  #13  
Old 05-22-2007, 01:26 PM
zokemon zokemon is offline
That one guy...
zokemon's Avatar
Join Date: Mar 2001
Location: Sonoma County, California
Posts: 2,925
zokemon is a jewel in the roughzokemon is a jewel in the rough
Send a message via ICQ to zokemon Send a message via AIM to zokemon Send a message via MSN to zokemon Send a message via Yahoo to zokemon
Quote:
Originally Posted by Twinny View Post
Gentlemen, we can rebuild him. We have the technology. We have the capability to build the world's first bionic man. Zero will be that man. Better than he was before. Better, stronger, faster.
You better not make every body part use a different WNPC!
You will blow up Graal
__________________
Do it with a DON!
Reply With Quote
  #14  
Old 05-22-2007, 01:29 PM
xXziroXx xXziroXx is offline
Malorian
xXziroXx's Avatar
Join Date: May 2004
Posts: 5,289
xXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant future
Quote:
Originally Posted by zokemon View Post
You better not make every body part use a different WNPC!
You will blow up Graal
Nah, he'll probably make every body part use a different wNPC and the head a DBNPC.
__________________
Follow my work on social media post-Graal:Updated august 2025.
Reply With Quote
  #15  
Old 05-22-2007, 01:35 PM
Twinny Twinny is offline
My empire of dirt
Twinny's Avatar
Join Date: Mar 2006
Location: Australia
Posts: 2,422
Twinny is just really niceTwinny is just really nice
Send a message via AIM to Twinny
Quote:
Originally Posted by xXziroXx View Post
Nah, he'll probably make every body part use a different wNPC and the head a DBNPC.
I was actually going to make a hierarchical object-based Zero but your idea is better!
Reply With Quote
  #16  
Old 05-22-2007, 01:39 PM
zokemon zokemon is offline
That one guy...
zokemon's Avatar
Join Date: Mar 2001
Location: Sonoma County, California
Posts: 2,925
zokemon is a jewel in the roughzokemon is a jewel in the rough
Send a message via ICQ to zokemon Send a message via AIM to zokemon Send a message via MSN to zokemon Send a message via Yahoo to zokemon
So cruel...
So cruel...

Back on topic.

I nominate this thread to now be about:
Adding a key to a new or existing set of encode/decode functions.
__________________
Do it with a DON!
Reply With Quote
  #17  
Old 05-22-2007, 09:25 PM
Inverness Inverness is offline
Incubator
Inverness's Avatar
Join Date: Aug 2004
Location: Houston, Texas
Posts: 3,613
Inverness is a jewel in the roughInverness is a jewel in the rough
Quote:
Originally Posted by zokemon View Post
Oh god Inverness...why did you just say that
Quote:
Originally Posted by Twinny View Post
Next a weapon for every spell, for every skill and for every weapon .
I have to hand it to you people, few have managed to piss me off so quickly. If you have a problem with my suggestions give an answer, get the facts, or shut your mouth. You all obviously lack enough knowledge to make a proper opinion. Take your bad sarcasm somewhere else.

Any decent quest is going to need a script, perhaps not each with their own weapon script but rather a class, that form of modularity is easy enough.
__________________
Reply With Quote
  #18  
Old 05-22-2007, 09:35 PM
xAndrewx xAndrewx is offline
Registered User
xAndrewx's Avatar
Join Date: Sep 2004
Posts: 5,260
xAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud of
Use your NPC-Server.
ANYTHING stored on the clientside has potential to cause problems.
I'm sure that the NPC-Servers can handle what you're asking it to do.
__________________
Reply With Quote
  #19  
Old 05-22-2007, 09:37 PM
Inverness Inverness is offline
Incubator
Inverness's Avatar
Join Date: Aug 2004
Location: Houston, Texas
Posts: 3,613
Inverness is a jewel in the roughInverness is a jewel in the rough
Quote:
Originally Posted by xAndrewx View Post
Use your NPC-Server.
ANYTHING stored on the clientside has potential to cause problems.
I'm sure that the NPC-Servers can handle what you're asking it to do.
I agree with this. You got serverside memory, use it.
__________________
Reply With Quote
  #20  
Old 05-22-2007, 09:51 PM
Deadly_Killer Deadly_Killer is offline
Registered User
Join Date: Feb 2002
Posts: 227
Deadly_Killer is on a distinguished road
Quote:
Originally Posted by Inverness View Post
I agree with this. You got serverside memory, use it.
got!
__________________
- Zidane / Zidaya
Reply With Quote
  #21  
Old 05-22-2007, 10:24 PM
Admins Admins is offline
Graal Administration
Join Date: Jan 2000
Location: Admins
Posts: 11,693
Admins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud of
I agree, best is to store data that should not be modified on server-side, and private modifyable data on client-side (like if you do some tool for saving comments about other players). If there is too much clientside data then you can still use md5 for making a checksum on the data and store the md5 checksum on serverside. You would need to update the checksum when you modify the file that should be protected.
Reply With Quote
  #22  
Old 05-23-2007, 12:38 AM
Inverness Inverness is offline
Incubator
Inverness's Avatar
Join Date: Aug 2004
Location: Houston, Texas
Posts: 3,613
Inverness is a jewel in the roughInverness is a jewel in the rough
Stefan, we need a way to delete client flags on logout so stuff isn't saved that will just be overwritten by an independent system.
__________________
Reply With Quote
  #23  
Old 05-23-2007, 12:39 AM
Twinny Twinny is offline
My empire of dirt
Twinny's Avatar
Join Date: Mar 2006
Location: Australia
Posts: 2,422
Twinny is just really niceTwinny is just really nice
Send a message via AIM to Twinny
Quote:
Originally Posted by Inverness View Post
Any decent quest is going to need a script, perhaps not each with their own weapon script but rather a class, that form of modularity is easy enough.
I don't limit myself so much . One weapon can easily handle a quest system without the need for other weapons/classes to handle quests.

Quote:
Originally Posted by Inverness
I have to hand it to you people, few have managed to piss me off so quickly. If you have a problem with my suggestions give an answer, get the facts, or shut your mouth. You all obviously lack enough knowledge to make a proper opinion. Take your bad sarcasm somewhere else.
Geez dude. Chill pill .

As for everyone else, What I want to store clientside would eventually be alot (i have alot of item descriptions/stats for instance) but it's the kind of data that only needs to be updated once in a while. Instead of chunking up clientr. variables (like Zodiac) or triggering this information, everytime it needs to be accessed. A md5 / checksum can be used on the cache file to make sure it is still valid. If not, update it.

It was just an idea but I'm going to follow through and test it a bit because I do see some potential
Reply With Quote
  #24  
Old 05-23-2007, 12:44 AM
Inverness Inverness is offline
Incubator
Inverness's Avatar
Join Date: Aug 2004
Location: Houston, Texas
Posts: 3,613
Inverness is a jewel in the roughInverness is a jewel in the rough
You don't need to store such information on clientside. Graal is not going to explode if you send a couple hundred bytes more to the client than normal.
Quote:
Originally Posted by Twinny View Post
I don't limit myself so much . One weapon can easily handle a quest system without the need for other weapons/classes to handle quests.
So you would prefer to script the event detection and all quest stage scripts of every quest on your server in one weapon? That would look extremely bad. It is much better to use classes.

You don't seem to realize the depth of programming required for a good quest so you try to oversimplify it, stop.
__________________
Reply With Quote
  #25  
Old 05-23-2007, 12:47 AM
Twinny Twinny is offline
My empire of dirt
Twinny's Avatar
Join Date: Mar 2006
Location: Australia
Posts: 2,422
Twinny is just really niceTwinny is just really nice
Send a message via AIM to Twinny
Quote:
Originally Posted by Inverness View Post
So you would prefer to script the event detection and all quest stage scripts of every quest on your server in one weapon? That would look extremely bad. It is much better to use classes.

You don't seem to realize the depth of programming required for a good quest so you try to oversimplify it, stop.
You seem so ready to narrow your field of vision. What sort of programmer instantly goes, "Can't be done! My way is better! You suck! You obviously have no talent at all!"

I mentioned what I'd base my engine on. It can easily be done but you obviously shut your mind before I begun so there's no reason to even try to bother explaining to you.
Reply With Quote
  #26  
Old 05-23-2007, 01:02 AM
Inverness Inverness is offline
Incubator
Inverness's Avatar
Join Date: Aug 2004
Location: Houston, Texas
Posts: 3,613
Inverness is a jewel in the roughInverness is a jewel in the rough
Quote:
Originally Posted by Twinny View Post
You seem so ready to narrow your field of vision. What sort of programmer instantly goes, "Can't be done! My way is better! You suck! You obviously have no talent at all!"
I said it would look bad, I never said it wouldn't function. Why cram all quests into one script when you can divide them among classes and load them when they're needed. Modularity at its finest.
Quote:
Originally Posted by Twinny View Post
I mentioned what I'd base my engine on. It can easily be done but you obviously shut your mind before I begun so there's no reason to even try to bother explaining to you.
A wise man once said, "assumption is the mother of all ****-ups." You're assuming far too much.

By the way, join me on #Scripting if you will, forums take too long
__________________
Reply With Quote
  #27  
Old 05-23-2007, 01:17 AM
Twinny Twinny is offline
My empire of dirt
Twinny's Avatar
Join Date: Mar 2006
Location: Australia
Posts: 2,422
Twinny is just really niceTwinny is just really nice
Send a message via AIM to Twinny
I may as well post my quest system idea for I would like some feedback.

Basically, i want to make a quest-enhanced mus item system. Basically, the items store what they can do for the quest. For example, a quest key would have an entry to open the ol' cellar door in it's vars. Instead of storing quests in a centralised storage area, the scripts are stored in files/vars.

Another example would be a carrot, a stick, some string and a horse. To solve this problem, you would tie the string to the carrot, and the string and carrot to the stick. You now have a 'Carrot tied to a stick'. This new object would have a var which says it can be attached to the horse: You now have a ride able horse .

Unfortunately I have to go right now (lift out the front but i'll expand soon)
Reply With Quote
  #28  
Old 05-23-2007, 01:23 AM
Inverness Inverness is offline
Incubator
Inverness's Avatar
Join Date: Aug 2004
Location: Houston, Texas
Posts: 3,613
Inverness is a jewel in the roughInverness is a jewel in the rough
Hmm, they way I prefer it to be is having a quest object check when it needs to do certain things and then manipulate everything else for the quest. Like for example. If you're on stage 5 or so, the quest would use a timeout to check if you've reached a certain location, then it advances stage. Stage 6 has a script that spawns a certain boss enemy and a loop is used to check the status of the enemy. When its dead the quest advances to stage 7 and you get your reward, then the script is unloaded now that the quest is complete.
__________________
Reply With Quote
  #29  
Old 05-23-2007, 02:17 AM
zokemon zokemon is offline
That one guy...
zokemon's Avatar
Join Date: Mar 2001
Location: Sonoma County, California
Posts: 2,925
zokemon is a jewel in the roughzokemon is a jewel in the rough
Send a message via ICQ to zokemon Send a message via AIM to zokemon Send a message via MSN to zokemon Send a message via Yahoo to zokemon
Inverness, you obviously haven't seen major issues that happened with certain servers that did as you said.

It is much better to use wNPCs as entire systems (Such as a quest system) then use "modules" that you insert via ways of a class, serverside text file, database, etc.

A weapon per item/quest type system is a thing of the past! It is what almost all new scripters do.
__________________
Do it with a DON!
Reply With Quote
  #30  
Old 05-23-2007, 02:38 AM
Inverness Inverness is offline
Incubator
Inverness's Avatar
Join Date: Aug 2004
Location: Houston, Texas
Posts: 3,613
Inverness is a jewel in the roughInverness is a jewel in the rough
Really, tell me why its a bad idea to have a class for each quest? Function conflicts are not a problem.
A quest must have its own script one way or another.

PS: Get on AIM >_>
__________________
Reply With Quote
Reply


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 01:41 AM.


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