Dragon Basher: Official To Do List

  Prev 1 2 3 Next

Posted: 07‑14‑2016 22:27


QuaCzar


Fire Flipper
1815 posts

Joe said:


if the server sent the client map codes instead of just screens 1-4, I think it would simplify much of this.




Make it so (if you can). :)

-Joe


I'm trying to make the client accept the 1-4 code as well as the 2 character codes, at least during the transition, with functions that return a certain format from either code or a screen object or tileset. This change will also allow map caching in the future. I almost started doing that, too, but I think I'll just concentrate on one thing at a time right now.

-QuaCzar : SysOp | P2P Guide | Anarchy Leader | #1 Magic

 


Posted: 07‑14‑2016 22:46


QuaCzar


Fire Flipper
1815 posts
I think I'll split out another script file before making this change. (I already made it use the split out ItemID function file.) This one will only include static library functions that are least likely to change to take advantage of caching, slightly decreasing download and server processing time after the first load. I'll tuck away some functions there so they don't get in the way while I'm making the other changes.

-QuaCzar : SysOp | P2P Guide | Anarchy Leader | #1 Magic

 


Posted: 07‑15‑2016 20:23


QuaCzar


Fire Flipper
1815 posts
My own style is to put related functions into an object, which I put into its own .js file. This way, I always know which file to look in when I want to find some code. (I also use OOD/OOP encapsulation to put everything is in that one global variable so I can easily mix scripts.) If I did that here, for instance, the Cookie object would be in Cookie.js, which would have its own script tag. I'd also probably make a Screen.js that would include tilesets, rendering, scrolling, etc., and Chat.js for handling the chat window. I might look into something like that to better organize code relations, which I find makes editing easier.

-QuaCzar : SysOp | P2P Guide | Anarchy Leader | #1 Magic

 


Posted: 08‑20‑2016 18:06


QuaCzar


Fire Flipper
1815 posts
I'm moving the Tileset init to its own file, client-startscreen.js, next to client-itemid.js, but leaving a default random screen so this file is optional. I'm not sure if I'll move Cookie out or leave it. It's used in the init of the rest of the script.

-QuaCzar : SysOp | P2P Guide | Anarchy Leader | #1 Magic

 


Posted: 08‑20‑2016 18:09


QuaCzar


Fire Flipper
1815 posts
Another idea is an option to allow users a custom start screen stored in a local cookie, though I don't plan to do that unless someone wants it.

-QuaCzar : SysOp | P2P Guide | Anarchy Leader | #1 Magic

 


  Prev 1 2 3 Next

Hunt food, smith weapons, and prepare for battle! Can you stop
the Evil Que from taking over the entire game? Browser based multi-player
fantasy role-playing game that requires no downloads or plug-ins! Free to play forever!

By being at queville.com, you agree to our Terms of Service.