#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2013
    Posts
    12
    Rep Power
    0

    PHP+JS "Mini Game" [moved from PHP]


    Hello. I have a browser-based game and I want to include in it a "Mini games" to train stats.
    these games will be based on PHP, and JS.
    These "mini games" are very simple, but I have no clue how to do this since I never been in this business before.
    My goal, for the first mini game, is to make a mini game that challanges the user to click X Times on a key in the keyboard (such as "K") in a limited time.
    If the player passes, he will gain attack stat (just one query).
    How do I start?

    Thanks in advance..
    Last edited by requinix; October 2nd, 2013 at 03:14 PM.
  2. #2
  3. No Profile Picture
    Super Moderator
    Devshed Specialist (4000 - 4499 posts)

    Join Date
    Jul 2003
    Posts
    4,008
    Rep Power
    2791
    You would start by learning the basics of Javascript and PHP. What are you actually asking here?
    [PHP] | [Perl] | [Python] | [Java] != [JavaScript] | [XML] | [ANSI C] | [C++] | [LUA] | [MySQL] | [FirebirdSQL] | [PostgreSQL] | [HTML] | [XHTML] | [CSS]

    W3Fools - A W3Schools Intervention.
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2013
    Posts
    12
    Rep Power
    0
    Originally Posted by Winters
    You would start by learning the basics of Javascript and PHP. What are you actually asking here?
    I am professional PHP programmer, but I have no idea about the JS part.
  6. #4
  7. Lord of the Dance
    Devshed Expert (3500 - 3999 posts)

    Join Date
    Oct 2003
    Posts
    3,597
    Rep Power
    1906
    You could start searching for JavaScript tutorial.
    Just remember w3schools is not recommended to use.

    Maybe look at this:
    http://www.codecademy.com/tracks/javascript
  8. #5
  9. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2013
    Posts
    22
    Rep Power
    0
    Most HTML5 games are heavy Javascript based.
    PHP will not be used more of part except when AJAX request and/or DB connect.

    Probably you don't even need to do much of dynamic rendering in PHP either. Try to search for JS template Library such as Mustache or dust.js

    If you are specifically looking for HTML5 game, there are game specific Javascript libraries / engines (both free and commercial - like impactJS) that handles many complicated event handling such as physic control. Even though you might fee like you might not even feel like you are not upto that level to use those game library. It might be good idea to start learning those from the beginning. It will help to start things much quicker. It's like jQuery library, nowadays, developers often start coding with jQuery even before thinking about what it will be actually use for.

    also checkout Contruct2 game engine (from scirra.com), you can even build games without little or no Javascript knowledge. you can literally build game by drag-n-drop. This is a commercial game engine but you can try for free.

IMN logo majestic logo threadwatch logo seochat tools logo