Page 1 of 1

Computer Science Project

Posted: Fri Jun 17, 2016 3:57 pm
by Thaywood
I am a student trying to find some advise, i am currently developing a game for a course work project. The info below are what i plan to add however i was wondering if there is any thing more complex to add as the project does need to be quite complex. A* or Dijkstra shortest path are currently in use but preferably algorithms that for NPC, quests, and monsters (battle) in game, any advise will be greatly appreciated.

(Multiplayer Role Playing Game/quests & battle/2D)
Including: HTML, CSS, JavaScript, Node.js, MySQL

Complexity
A* Pathfinding {moving player around area}
Relational Database {storing player stats, items, quests}
Sharing data over LAN/internet {allow multiple players to play live at same time}

Re: Computer Science Project

Posted: Fri Jun 17, 2016 5:21 pm
by hallsofvallhalla
I am not sure what exactly you are asking but also remember all the algorithms for battle, level up, items, ect.. That balance in itself can be very difficult. Decide where your code lies, server or client and if you are using Nodejs should you use MongoDB instead of MySQL. Also I am sure you will be using Socket.io as well.

Re: Computer Science Project

Posted: Fri Jun 17, 2016 5:43 pm
by Thaywood
Thanks for the reply and the advice of the mongoDB i have made prototype using node.js and socket.io. I am trying to make the code mainly server side to be more secure. How would you recommend to store the player storage within the database eg for items and quests, as separate fields or as a long string and separating the string into an array by splitting. Let me know what you think?

Re: Computer Science Project

Posted: Fri Jun 17, 2016 5:48 pm
by a_bertrand
If you are in AI development, then I would look how to handle hordes, and not single entities.

Re: Computer Science Project

Posted: Fri Jun 17, 2016 5:51 pm
by Thaywood
I am hoping to have something like hordes in the game as they will be free roaming round the map. Do you have any ideas of where to start?

Re: Computer Science Project

Posted: Fri Jun 17, 2016 6:03 pm
by hallsofvallhalla
If you use Mongo then just create a class or rather a item object then you can store the whole object without much overhead. Same with nearly everything else. I have not found a good Nodejs to MySQL lib so I am not sure on that one.

Re: Computer Science Project

Posted: Fri Jun 17, 2016 6:48 pm
by Thaywood
Thanks for the help about the class. Well i am using c9.io to run the game while i develop it, i may think a battle in a screen like the classic RPG style will be best and easily under stood by many. What do you think is it worth sticking with the RPG style battle or change to a different battle system? Any ideas? I was thinking of an idea where there the player looks left and right to find any monsters before entering a new area. What do you think about this? I just thought make it slightly different compared to other games but not too different.

Re: Computer Science Project

Posted: Mon Jun 27, 2016 11:31 am
by Thaywood
Hi again,
i am trying to implement the moving of the player in game using A* pathfinding, do you have any advise on storing the grid locations in the game area where the player is standing. I currently have it as an array, of 0 and 1, however i feel this is very inefficient as storing this will take allot of space. Would storing in a database be quicker, or storing it on the server, or client (however this could lead to some hacking to be able to move on non-moving placeholders.)

Re: Computer Science Project

Posted: Mon Jun 27, 2016 1:25 pm
by a_bertrand
A* algorithm is pretty simple to work with a grid, but you could work just with a list of "blocking" points if you feel that it takes too much resources. The other solution is that instead of moving in "pixel" you move in "cells" while a cell is multiple pixels so for example if a cell is 32x32 pixels, you will have 32x32 less cells in your grid ;)

Re: Computer Science Project

Posted: Wed Jun 29, 2016 10:46 am
by Thaywood
Would you recommend storing this grid as array on the server of node.js. Or would you store it in a database?