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 5 of 5
  1. #1
    New to the CF scene
    Join Date
    Jul 2013
    Posts
    2
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Question Where do I start?

    First of all, allow me to apologize in the case I posted in the wrong section, but I suspect this is the correct one as Java seems the best solution for me. Before you read my post, understand I have absolutely no knowledge about coding, and can only pop out a HTML page.

    Now, allow me to bring the subject in.
    I have been wanting to design a strategy game ever since I could read the letters on the computer screen, but knowing I would never get a team to work with me, decided to take the easier path - making it all text.

    So my question is this: can Java be used to make an online text game where players simultaneously vote on certain actions?

    If you have the time, please take a very quick read through. Just before the quick tutorial ends, you will see the aftermath of the actions, for example: "XXX does A and receives B."

    Now, I've been doing it with players and doing the necessary calculus by myself. If the players receive 20 food units, I have to add them to the current food granary count. However, with more than 6 players it can be astonishingly overwhelming, and I want to make it in a way that a program can round up all the votes, do the calculus, and leave to me only the writing part.

    So I ask you again, can Java do this? If not, can you be kind enough to direct me to a language that can? Someone suggested using Flash AS3, but Java seems more biased with doing calculus operations. (As the horrendous tutorial on codecademy.com shows)

    Thanks you lots.

  • #2
    Supreme Master coder! Old Pedant's Avatar
    Join Date
    Feb 2009
    Posts
    25,023
    Thanks
    75
    Thanked 4,323 Times in 4,289 Posts
    Yes, JAVA can do this. In Java Server Pages (better known as "JSP").

    ** BUT **
    (a) You asked the question in a JavaSCRIPT forum. Java and JavaScript are about as similar as Austrian and Australian. That is, their names start with the same first few letters.
    (b) You mentioned codeacademy.com, but they don't offer tutorials in Java. They only offer JavaScript, PHP, Python, and Ruby.
    (c) So I'll bet you really wanted an answer about JavaScript, which runs in the browser. Java and JSP must be run on a *server*. That is, a central machine that many different users connect to.
    (d) If you want this to work by having several different user on several different computers then you *MUST* use a server. Meaning that JavaScript, which runs in the browser on a single computer, is irrelevant to the task.

    In short, you are almost surely asking the wrong question in the wrong forum.

    More than likely, you will want to use a simple server-side system for this. Probably PHP (though you *could* use Java and JSP, but it's much harder to learn). (Or you could use JavaScript with something called "node.js" but if you want to do this on the cheap, you'll probably stick with PHP, because you can find ISP's that offer PHP for under $5 a month.)

    By the by, this probably also means you need to get your own domain.

    But you could maybe start by taking some tutorials on PHP.
    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:

    alucardiff (07-10-2013)

  • #3
    Supreme Master coder! Old Pedant's Avatar
    Join Date
    Feb 2009
    Posts
    25,023
    Thanks
    75
    Thanked 4,323 Times in 4,289 Posts
    Oh, and by the way, I doubt seriously you have been doing "calculus". I'm almost certain you mean "calculations." Calculus is a moderately advanced branch of mathematics.
    http://en.wikipedia.org/wiki/Calculus
    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.

  • #4
    New to the CF scene
    Join Date
    Jul 2013
    Posts
    2
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by Old Pedant View Post
    Oh, and by the way, I doubt seriously you have been doing "calculus". I'm almost certain you mean "calculations." Calculus is a moderately advanced branch of mathematics.
    http://en.wikipedia.org/wiki/Calculus
    Oh, damn you. I'm not exactly versed in english, neither it is my first language. Happy, you *******?

    So it turns out it wasn't exactly the wrong forum; since by my understanding you are clearly saying JavaScript is of better use to me than Java itself, yes?

    In a nutshell, I'll get on the JavaScript road and get into PhP. Oh, and it is its own domain, as far as I know. That "Powered by Wordpress" is just for decoration. It's not mine per se, it's of one relative of mine that's been making web pages for a long, long time.

    Right then. Call me and I'll get you an eBeer.

  • #5
    Supreme Master coder! Old Pedant's Avatar
    Join Date
    Feb 2009
    Posts
    25,023
    Thanks
    75
    Thanked 4,323 Times in 4,289 Posts
    WOW! Really? Truly, I would NEVER have guessed that English is not your first language. My humble apologies, then, for hassling you over a minor word difference. You could teach English to many of the people I know around here!

    I honestly don't think you need to worry about JavaScript for a while to come. Everything you want to do you could do in the PHP code, along with HTML in the browser. JavaScript would possibly be useful later, just to improve the user interface, but for a text-based game I do not see it being necessary. So I would definitely recommend that you spend your time on PHP, instead. And since Wordpress is written in PHP, that means you know your site will support it.
    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.


  •  

    Posting Permissions

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