#Server/database

22 messages · Page 1 of 1 (latest)

ocean beaconBOT
#

@rancid timber

BravestKid Uploaded Some Code

Hi so I plan to use mysql or something like that with my node server before I start tho how easy or hard is this task going to be? I have no knowledge of mysql so YAY any way i plan to send stats created by my server to the database so they save for players things like level etc etc any way here are all my server files

Uploaded these files to a Gist
#

@rancid timber

BravestKid Uploaded Some Code

Shared Files: THIS FILE is where the stats are and the stats are changed in the world-entity file and changed within the OnActionAttack_Fired() function

Uploaded these files to a Gist
rancid timber
#

@agile tide I had to change the file extention for these to upload i closed the other post... using the .mjs extention just makes node treat the file as a module rather than common js i had to use .mjs to resolve an issue i've forgotton what that issue was tho

rancid timber
#

@vague barn you said mither you about server side stuff so here it is as my server is now would it be straightforward to add the values in defs.js into a sql database?

vague barn
vague barn
#

something like noSQL may be easier for you off the bat (for example mongodb) as you won't need to spend time pre-planning the schemas for all your database tables, but either way works. with SQL you need to start with designing your database tables based on the information you want to store

rancid timber
#

then a login of some kind

vague barn
# rancid timber So the plan is to store stats (around 5 or so), inventory (weapons), quests... e...

you may not need to store quests in DB, you can it's not objectively wrong but personally I'd look at storing those as a file (JSON, whatever) or even internally in the code if you make a clean way to define quests internally. I only say that because quests are likely not often changing or modified, and there is less positive benefit from storing them inside a DB. you probably want your quests to be stored in memory during execution of the server/client, and not need to retrieve them from a DB on-demand. this is a debatable point, but it's my view on it

#

it also may be hard to properly structure SQL databases to allow for storing quests with special functionality, flexibility, etc. storing things like logins/inventories are more structured and those properties lend themselves to being stored in a relational database more easily

#

though, storing something like a players completed quests in the relational database is easier. if you want to store more free-form/unstructured information in the database like quests, and other data that may have an unknown structure, then you can use some noSQL DB like mongo

rancid timber
rancid timber
#

Someone said something about using RUbyrails but i know nothing about it the code loooks straightforward like posting it to db ... thoughts?

tidal trail
#

if this is a single player you could potentially save the current level of the player etc in local storage

vague barn
rancid timber
rancid timber
rancid timber
#

anywas........ cut a long story short

#

im not sure if he just wants the code basically