Can I make a online game using javascript? [closed] - javascript

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
I'm wondering in making an online easy game that runs on the browser and all I wanna know is: if I want two players to play one against the other one, online, can I make this game using HTML for the front-end and javascript to the backend rules of the gmae or do I have to use a server-side language, such as PHP for the to make one player playing against another one?
thanks
EDIT:
Today I know how vague this question is, and I'm trying to fix it.
Actually I was looking for experience with other developers and I was a complete newbie. I would like to close this topic, but I can't. I apologize for wasting your time.

Believe it or not, but Javascript is also a server side language. I suggest looking into node.js. Node.js will allow you to write all of your server-side logic in Javascript, while leaving you to write your front-end logic with whatever you see fit (read: HTML and Javascript)
This tutorial might be of interest to you. It uses web sockets + node.js to create a real-time multiplayer game.

maybe you think creating game is simple especially online game !.
it is not simple ! and you need more than javascript. firstly you need create a framework and you can write by php. also you will need creating a database and graphic designer. if you can do all these you can start to write on a game engine like unity3d unreal game engine or blender. however this job will take too much time. if you create a group and work togather maybe you can create an amazing game shortly

Related

Which one do I choose [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 2 years ago.
Improve this question
I'm about to create a web application first but even though I manage the development with rails, graph and react. should I use python thinking more in the future of the application, if it grows in time? Or if you know about a technology stay first with it for development and then migrate?
Couple of option you can choose for web application
Use GRAND Stack : GraphQl +Reactjs + Apollo server+ Node js + Neo4j(instead of this use any other database which you are comfortable)
If web app event based : Then user Nodejs as server-side technology (MERN)
If web app as Data-computation/ Algorithms solution : then Go we React(Front end) +Nodejs(orchestration/ Middle layer) + Python(application layer/or back-end )+ any DB
Yes, i say every framework is good enough, in the long run every thing comes down to one question, how efficient code did u write?
Django
You can use django if you are interested in python. It is a famous framework which has its own ORM and many security built in features another option is flask
I will share my experience.
Recently, coded a website in laravel 5.5, at first everything was fine but when the number of user(s) grew to >50k. The site became slow and my servers showed 100% cpu usage. Later i changed the code, tried to remove nested loops, optimized my queries and used cache technologies like memchached. The site is working fine now.
i hope that answers your question.
I hope the best for you,
Happy Coding

Want to create a new application for website traffic monitoring ( analysis ) [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
I want to create my own application for monitoring traffic of my website without using any third party tools like google analytics. In which I want to log screenshots, user details, page details and cookies. So what technology should I opt so as to achieve this goal and which will be best suited and what work flow should I follow.
I've never done this kind of work previously so I'm new to this. Any help would be greatly appreciated.
The technologies I know are : javascript, nodejs, django(python).
You will have to break down your application as it is a humongous task to create something like GA.
You will have to track many user activities(click,spend time etc).so you can do that in plain js or use a cross-platform lightweight library(angular.js) that can make your life a little easy.
Now since you will have to send large set of traced data to you database with minimum latency,use Node.js in this scenario.Simple Ajax call would also work but then it would be very slow.
Now comes your database.Prefer NoSql since it suits your requirement of unstructured data ,preferrablly MongoDb which can help you with its own mapReduce,large storage capacity
.Since there will be lot of calculation involved you can use your python knowledge which can help you process data a lot faster.you can use other languages as well(eg.Go)
Your processed data and results can then be stored in Redis(which acts as a caching layer).
you can use sophisticated graphic library like d3.js,Highcharts.js for displaying Graphical data on the client-side.
There are a lot of factors that can be involved.This is just a very basic outline of what you could do.

MySQL vs JSON vs Firebase as a database option [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 8 years ago.
Improve this question
I am currently developing a site to track credits gained from exams, and how these stack up against the user's goal credits.
I know JavaScript fairly well, but don't know any PHP.
What would be the best option to use as a database? Please, I am a beginner and I will be getting answers from advanced programmers. To me, your opinions count so please don't close this as asking for opinions.
MySQL
I could use this on a PHP site, but it would involve me learning PHP. What are the benefits and would they outweigh the hassle of learning a whole new language?
JSON
Would it work if I used JSON files for data storage, and used xmlHttpRequest() to read and write information?
Firebase
Would Firebase work as a fully operating database?
If you know javasript very well and aren't willing to learn a new server side language, I would recommend using Firebase. They way it works is very similar to if you had built your own REST api and just made ajax calls to it.
I wouldnt recommend using json to store data. Anytime you want to read there would be more data sent over the network than necessary and when you get enough data it would be impractical. Databases exist to avoid storing data in a file and simply reading/writing to the file.
Using php wouldnt be the best idea. It is a very powerful language, but it is incredibly easy to write major bugs with it. If you were to use it I would recommend learning a web framework because it would fix most of the bugs that you would write yourself. Heres a list of a bunch of php frameworks http://www.phpframeworks.com/. I think that there would be more benefits to you actually learning php. For starters, every developer should have more than 1 language in their toolbox. You should be able to approach a problem and know what the best way to solve it is and that starts with the exposure to different languages and technologies. Learning another language will take a decent amount of time, but you will get much more out of it than releasing your site a little bit earlier.
So to sum it up, I would use php(or any other scripting language for that matter) with a web framework. Your site would be more secure with the web framework and you will become a much better, more valuable developer by taking the time to learn something new.

How to make Online iPhone "Card Game" with HTML5 [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 9 years ago.
Improve this question
What are the necessary things for creating card game on iPhone??
The purpose of this app is to share the ideas by using cards.
Each player will draw a card and do what the cards order to do such as write the comments on those topics and so on.
I'm quite new for the programing. I don't want to learn Objective-C. It is quite hard for me.
I have searched on google that PhoneGab can port HTML5,CSS&JavaScript to be an iPhone app.
So the things that I must learn are HTML5,CSS & JavaScript only?
This app must have many players to play for sharing the ideas. Therefore, must I learn other programing languages? such as, php.. to manage each player data (profile).
Moreover, I would like to use points, badges, leader board in this app, too
How about and SDK or any software to help me write code easier?
(p.s. Sorry for my bad English)
That's a great idea!
You will probably have to learn all that languages and depending on the things you want php will be included...
My advice: if you are new on programming and will have to study a while, I say it is better to do a native iPhone app. A web app will have tons of things you will have to worry about so the app can run on different devices... So, will be more complicated to deal with that kind of stuff than learn and develop a native iPhone app...
Including that you want to use features like badges and leaderboards, all native on each device, so you don't have to worry on creating something from zero, like in a web app...
I hope it helped!

Can I use javascript to write xml files, or will I have to learn php/asp/mysql/something else? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 3 years ago.
Improve this question
I understand this question has been asked before, but I couldn't think of a simple definition of my problem to put in it's place. I am learning to do this informally, so I'm not exactly sure how to phrase questions/search for answers yet.
I'm trying to build a simple checklist program as I learn javascript - I'm doing this by hand without using any libraries (so no jQuery, just basic javascript). I have a functioning DOM interface getting formatted by CSS, all running in and editing the contents of a <div>, so that side of things seems fine.
I'm testing this off of my HDD and have no intention of hosting it anywhere.
Currently, I'm trying to solve my data storage problem without installing php/mysql/apache. I'd like to have each task list nested "subtasks" when selected, with one level of nesting.
To do this I'd like to create a new XML file every time I create a new task, and then append it's information to a list file (list.xml) so that I can navigate list.xml to dynamically display all the current primary tasks.
I've since learned that you cannot simply create new .xml files with javascript alone, for security reasons. While this makes sense, I'm now looking for other solutions.
What is the simplest way to store this information as it's entered? One solution I've considered is having just one XML file (so I always know what to point the script to), and using "<id>" nodes to slave subtasks to their respective primaries. This would, however, create a very long and disorganized XML file that would become cumbersome and annoying to traverse, forcing me to write a tricky method for looping through it.
Should I continue as I am to simply complete the project and help lock in my skills (it will be my first complete "program" with a gui of any kind that wasn't dictated by a guide or lesson), or should I bite the bullet and go through the annoying php install (I did this on my last tower and it was a frustrating time-consuming mess) and learn php/mysql/apache for all the server-side nonsense?
sry about tl;dr please help my pynchonesque code masters will kill me
You can't do much in web programming with only user side. Sooner or later you will have to learn also server side. And installing PHP is not so annoying. You can use wamp server. It has very simple installation.
If you're learning Javascript, I'd recommend staying with Javascript (don't jump over to PHP or some such just because it'll save you 5 minutes in configuration).
There are a number of really nice Javascript serverside frameworks that will happily write files to the file system or talk to a database for you. Node.js is currently the most popular. I don't want to start a flame war about how or why Node is superior to PHP, I'm simply saying that if you're a beginner, I wouldn't mix apples and oranges and just stay within one language.

Categories