Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 7 of 7
  1. #1
    New to the CF scene
    Join Date
    May 2013
    Posts
    2
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Advice on technologies

    Hi guys,

    I'm new to this javascript scene but have been programming for years and I need some direction on the best technologies to use for the stuff I want to do.
    Also, if you have any links on how to do your suggestions feel free to leave them; I am capable of finding information once set on the right path though so don't feel obligated

    I'll make the list brief and will elaborate if you don't understand what I'm looking for.

    Map creation
    I need to make a tiled map system where the maps are stored either in a database or separate files. I was using XML in past projects which worked fairly well. After googling it seems that JSON is where I want to go, but I'd like some informed suggestions

    Server
    This is going to be a small-to-large scale server I want to run the game on. My research leads me to believe a node.js webserver could be used, but if I can make a c#/java/c++ in charge of server sending information to a javascript/HTML5 front-end I can do that too. I'm looking for something that I can run on a computer somehow and easily push changes to clients with.


    Databases
    I really haven't found much useful information on this. If I can run a native server then I can use the plethora of easily accessible database options available through that. Otherwise, which databases are the easiest to work with in JS?

    ----------

    I think that's all the info I really am looking for right now. With those three cores I should be able to come up with something workable solution.

    Thanks for any and all help,
    Panderus

  • #2
    Senior Coder Dormilich's Avatar
    Join Date
    Jan 2010
    Location
    Behind the Wall
    Posts
    3,253
    Thanks
    12
    Thanked 341 Times in 337 Posts
    I'm looking for something that I can run on a computer somehow and easily push changes to clients with.
    definitely Node (e.g. with SocketIO). and as an added bonus, you can code front-end and back-end in the same language.

    if you consider using Node, also look at the extensions (template engines, router frameworks, etc.) Express seems to be very common.

    if you plan to use a lot of callbacks, look into Promises (Node has an implementation), it helps resolve nesting.


    Otherwise, which databases are the easiest to work with in JS?
    most of what I’ve read use a NoSQL DB. among that, MongoDB is often cited.


    After googling it seems that JSON is where I want to go, but I'd like some informed suggestions
    JSON seemlessly integrates into JS (hence the name), and is dead easy to operate on (you don’t need an API for it, like for XML).


    Also worth looking at: new ES5 (ECMAScript 262 5th edition) features (like Object.create() and a ton of other useful features). it might not be universally supported in browsers, but Node definitely will.
    The computer is always right. The computer is always right. The computer is always right. Take it from someone who has programmed for over ten years: not once has the computational mechanism of the machine malfunctioned.
    André Behrens, NY Times Software Developer

  • Users who have thanked Dormilich for this post:

    panderusps (05-29-2013)

  • #3
    Supreme Master coder! Old Pedant's Avatar
    Join Date
    Feb 2009
    Posts
    25,189
    Thanks
    75
    Thanked 4,341 Times in 4,307 Posts
    But you also mentioned "I can make a c#/java/c++ in charge of server..."

    If you understand any/all of those technologies, you might find them more flexible and more powerful than Node.js

    I'd probably avoid C++, but C# (that is, ASP.NT) and Java (that is, JSP) are wonderful choices. And then your choice of what database to use is pretty much unlimited. I'd personally opt to go with MySQL, just because it's free, but if you are using an ISP for your hosting you may find that SQL Server (for example) is included in the cost, so it would also be a fine choice.

    I think your real problem is you have too many choices, so you need to choose the one(s) you are most comfortable with.
    An optimist sees the glass as half full.
    A pessimist sees the glass as half empty.
    A realist drinks it no matter how much there is.

  • Users who have thanked Old Pedant for this post:

    panderusps (06-10-2013)

  • #4
    Senior Coder Dormilich's Avatar
    Join Date
    Jan 2010
    Location
    Behind the Wall
    Posts
    3,253
    Thanks
    12
    Thanked 341 Times in 337 Posts
    Quote Originally Posted by Old Pedant View Post
    If you understand any/all of those technologies, you might find them more flexible and more powerful than Node.js
    Admittedly, JavaScript is so unfamiliar if you come from a strong C/Java background, that you might want to drop it soon (because everything (and I mean everything) is so different).

    though if you’re up for a real challenge ...
    The computer is always right. The computer is always right. The computer is always right. Take it from someone who has programmed for over ten years: not once has the computational mechanism of the machine malfunctioned.
    André Behrens, NY Times Software Developer

  • #5
    Senior Coder rnd me's Avatar
    Join Date
    Jun 2007
    Location
    Urbana
    Posts
    4,296
    Thanks
    10
    Thanked 584 Times in 565 Posts
    maps:
    these are infrequently updated and can be built using about anything, so they can live as static json files that you upload to a server somewhere. json will be more flexible and easier to consume by JS than XML.

    server:
    you don't need to do everything at once or by yourself. you can use node and php together or on different servers to build your application. node+socket.io is outstanding for push on-available data to client, nothing is simpler or easier to wire up to client-side JS. .net has a socket.io ripoff, signalR, which is almost as easy to use client-side.

    on the other hand, node.js is bit of a PITA to deploy and serve both pages and data from. Apache or IIS is better for simply dishing out a folder to a url, collecting log info, and remote management. a cheap webhost can serve up the domain and resources, while invisible off-site JS wires-up the real-time interaction and data management.

    consider a third rail: 3rd party services to manage your real-time communication. you may have head of parse, ape, firebase, or pusher.

    some are software you run, some are completely remote services, but they all could separate message delivery from app logic. i highly recommend you don't try to tackle both yourself at first.


    databases:
    again, something to consider is S3, firebase, google spreadsheets, et al. you might not have to mange, secure, and deploy your own storage. online storage is pretty cheap, and might be able to run faster for less money than a custom setup on a virtual private host would. socket.io can store a lot in ram, so you don't need to commit every message to a DB just to get it from one php user to another like many amateur mysql-based real time setups. node can connect to many DBs or just dump json files if you only have a few megs of data to mess with at any one point...
    my site (updated 13/9/26)
    BROWSER STATS [% share] (2014/5/28) IE7:0.1, IE8:5.3, IE11:8.4, IE9:3.2, IE10:3.2, FF:18.2, CH:46, SF:7.9, NON-MOUSE:32%

  • Users who have thanked rnd me for this post:

    panderusps (06-10-2013)

  • #6
    New to the CF scene
    Join Date
    May 2013
    Posts
    2
    Thanks
    3
    Thanked 0 Times in 0 Posts
    Thanks a lot for the replies!

    I've been reading up on most of the things mentioned and I'm going to be aiming for a

    client(HTML/CSS/JS) -> server(Node +socket most likely) -> DB (NOSQL ?)

    setup where all client messages pass through the server for validation/database storage if needed.

    server:
    you don't need to do everything at once or by yourself. you can use node and php together or on different servers to build your application. node+socket.io is outstanding for push on-available data to client, nothing is simpler or easier to wire up to client-side JS. .net has a socket.io ripoff, signalR, which is almost as easy to use client-side.
    I plan on doing everything myself for the most part (unless I find a team that wants to work on it further along in development) but definitely not all at once. I'm using this as an attempt to learn a new technology and build a portfolio so the more I can do on my own the more it'll impress, so to speak.
    I'm also looking into something more asynchronous to start with expansion to realtime after the basic technology is in place.

    Admittedly, JavaScript is so unfamiliar if you come from a strong C/Java background, that you might want to drop it soon (because everything (and I mean everything) is so different).

    though if you’re up for a real challenge ...
    I am! They're the best kind of projects!

    JSON seemlessly integrates into JS (hence the name), and is dead easy to operate on (you don’t need an API for it, like for XML).
    This is my eventual route but I think I've found a solution where I won't need to save to a disk until I'm ready to implement the real-time aspect.


    Thanks again for all the replies! They've been invaluable to the design of my game

    I'll be sure to stick around and add to the helpfulness around here (at least I'll try to anyways)

  • #7
    New to the CF scene
    Join Date
    Jun 2013
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I got a good advice by reading this post. Expecting more like this from you peoples.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •