I became obsessed with RAM caching and i try to keep pushing every single millisecond down. (While talking about thousands of requests per second, every millisecond matters). Here is an example of caching rarely changing json file. I tried to keep it clean for readability when quickly looking through code and as quick as possible (performance).
Mostly i have improved visual side of sector render. Latencymeter (Ping) tends to be distorted by clients machine performance of synchronous tasks before real server response, therefore rather than real latency, it monitors time just right before server is called and right after some little while after receiving. With lower CPU/GPU performance on “HD option”, it can go up to higher numbers without real server latency being increased.
I wouldn’t call this a “bug” and for now i don’t intend to solve “latencymeter” monitoring really only server response.
“Improvement” of UI (login/register form), improvement and impementation of new sprites
MMORPG game based solely on HTML, CSS,JS+jQuery with turn based combat
JRPG style, PVE (solo/group [max 3]/dungeons/bosses), PVP(casual — offline and livePVP/ranked/3v3/Total PVP Server “Chaos mode” — PVP combats randomly inserted between PVE encounters — lorewise: Players have gone mad under some kind curse in the realm, so everyone see each other as monsters)
Main story line, side quests, each server will have unique and different map.
Unique items dropped from enemies (random stats, all item stat effects will be percentual) overall character stats max cap.
Possible microtransaction system — only visual items. Subscription (something like 5$ a month, just to support creators) — no waiting time after death and lower XP dept after dying?
Probable support of all systems (basically all systems, that have modern web browser — WIN, OSX, Linux, IOS, Android + Consoles?)
So far very good RAM usage, just the nwjs after logging in and rendering a sector, whole process takes only 25MB of RAM.
“Pixel art” graphics, option to turn on “prettier” graphics — better weather effects and 3D world effect with perspective (not just from top down)
It will be basically impossible to cheat in the game, because user periodically reads a game state from the server every second (so far quite good TTFB speeds 30–50ms on PHP7 free hosting endora)
Main controll algorithm will run once in a second (meaning the server will be “1tick”)
Game has simple brute-force preventer + you need to authorize from each new IP address via email — unauthorized IPs will have query limit once in a five seconds (BruteForce part of script preventing attacks have not yet shown negative effect on TTFB)
All information about players, partaken fights, trades and so on (basically all actions) will be zlib compressed and recorded, server will also periodally backup the DB once a day for possible rollbacks.
DB is local based in json format, passwords are bcrypted, user after successfully logging in will receive an access token, valid only for logged one current IP. Token will be used for communication with server instead constant revalidating the password. Token will be used for periodical reading of “gamestate” and also for sending an action requests to server. With access from unauthorized IP — possible hacker could guess the right token to username (highly unprobable with possible frequency of 1 guess in 5 seconds — the token will be revoked and deleted from database and the real user will be asked to revalidate his login with new token.
World map — with own PHP tool, the world is generated from an map image (png 2000x2000) -> 4M tiles into smaller sectors 50x50 -> 1600 smaller sectors (~7.33kB sector, ~11.7MB whole world). Player downloads and caches sectors he has visited even for future use.
Free hosting like an Endora (PHP7, limit 3 simultaneous processes at once) could possibly take care of 60 players at once without any lag and issues. Estimated bandwidth per second is guessed to be 0.5–1kB/s per user.
(most of the time just stuff that comes to my mind during a day and i “write it down” via my phone)
Levels:1–10 (to start with) XP to level:8,12,18,27,40,60,90,135,200
killXP:25% +/- for each level difference
Trade double handshake — after agreeing to trade, you will have to agree once again to cancel out possible scams.
Weather,Day/Night Cycle, Light/Shadows (shadow inset), rain, clouds, storms, weather affecting combat, lowered visibility?