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
    Apr 2014
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Creating browser-based game, need answers to some very basic stuff..

    So the answer might take a while to write, so if you don't have time or just don't want to answer that stupid questions, skip. So I'm thinking about joining the programming school this summer, as I have really huge wish, to make awesome medieval-based with interactive map browser-based game and as you can understand I just started to look around the very basic tutorials of javascript, html I heard that I will need php and mysql as well, but that's for the question part:
    1.What do I need to learn to make advance browser-based game ? It would be pretty much hybrid of travian and erepublik, as I heard I will need javascript, html, php, mysql and well painting program, but those articles are rather old, so did anything change ? Or are those 4 languages enough to make advanced browser-based game ?
    2.If so, which does every language do ? (I'm rather stupid than lazy for not understanding this one) Which one is for design of the web ? which one is for engine of the game ? (I mean like, resource counting, troops/buildings building cost and time and so on ?) And mysql is kind of server which holds all that information ? still needing some stuff said about it... *If I want to make interactive map like at erepublik, do I need even other language ? Or is one of those 4 capable of creating it ?
    3.Is stupid again.. I know, sorry... how can you merge 4 languages into one website ? As I understand php and mysql is working together, but how will php read html or javascript code ?
    4.Why can't I just use javascript over html ? As it seems pretty similar...
    5.I will probably have more questions later on :/

    P.S Thanks to anyone who helps and sorry for these kind of questions, as it seems pretty stupid to myself and sorry for my english as well...

  • #2
    Master Coder felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, Australia
    Posts
    6,642
    Thanks
    0
    Thanked 649 Times in 639 Posts
    The PHP reads the data using mySQL and then generates the HTML, CSS, and JavaScript that is passed to the browser. The browser then runs the JavaScript which updates the HTML and CSS and can also make calls to the server to run more PHP. These five languages are designed to work together with each providing one piece of the overall process.

    In each case the versions of the language are signifcantly different now from what they were a few years ago.

    HTML - defines your page content
    CSS - defines how your page looks
    JavaScript - provides the browser interactions
    PHP - provides the server interactions
    mySQL - stores the data

    In no instance can one of these be substituted for another as each serves a completely different purpose.
    Stephen
    Learn Modern JavaScript - http://javascriptexample.net/
    Helping others to solve their computer problem at http://www.felgall.com/

    Don't forget to start your JavaScript code with "use strict"; which makes it easier to find errors in your code.

  • #3
    Master Coder
    Join Date
    Jun 2003
    Location
    Cottage Grove, Minnesota
    Posts
    9,549
    Thanks
    8
    Thanked 1,095 Times in 1,086 Posts
    Wow, that's an ambitious project.

    I've never played any of those games, but looking at the maps and graphics, just that part alone will take a lot of graphic arts, and a lot of time to create.

    I'm just curious about the differences between all these games. What is the point of them? Or what is the goal?

  • #4
    Senior Coder
    Join Date
    Apr 2010
    Posts
    1,559
    Thanks
    76
    Thanked 105 Times in 104 Posts
    It will take you a minimum of 3 - 5 years to produce a playable text based game that is half decent. That is assuming you have a team of 3 people.
    Why not take this free open source game and build on it? Jamin dropped the project and it's up for everyone. It's a playable medieval game, just keep the core and build on it. That way it'll take you 6 months to do.

    Dragon Knight Mod Index v2.0
    Been a sign maker for 7 years. My business:
    American Made Signs

  • #5
    New to the CF scene
    Join Date
    Apr 2014
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by mlseim View Post
    Wow, that's an ambitious project.

    I've never played any of those games, but looking at the maps and graphics, just that part alone will take a lot of graphic arts, and a lot of time to create.

    I'm just curious about the differences between all these games. What is the point of them? Or what is the goal?
    Yeah it's maybe too much for me now, but I'm willing to create it
    the point in that kind of games (in travian etc.) is to finish building somekind of building, after the 1 years of playing (or faster if server is 3x or so), in erepublik, there is no really that winning point, it's just you playing to change the eworld, from it's map to it's politics

    Quote Originally Posted by felgall View Post
    The PHP reads the data using mySQL and then generates the HTML, CSS, and JavaScript that is passed to the browser. The browser then runs the JavaScript which updates the HTML and CSS and can also make calls to the server to run more PHP. These five languages are designed to work together with each providing one piece of the overall process.

    In each case the versions of the language are signifcantly different now from what they were a few years ago.

    HTML - defines your page content
    CSS - defines how your page looks
    JavaScript - provides the browser interactions
    PHP - provides the server interactions
    mySQL - stores the data

    In no instance can one of these be substituted for another as each serves a completely different purpose.
    Thanks !! the last 6 lines were that what I was looking for

    Quote Originally Posted by myfayt View Post
    It will take you a minimum of 3 - 5 years to produce a playable text based game that is half decent. That is assuming you have a team of 3 people.
    Why not take this free open source game and build on it? Jamin dropped the project and it's up for everyone. It's a playable medieval game, just keep the core and build on it. That way it'll take you 6 months to do.

    Dragon Knight Mod Index v2.0
    that really hits my morale :/ Tho I think I can manage to do it in 2 years, as far as I expect learning languages (or what I need from them) in 1 year and then writing the game in 6-12 months
    why not to build on already created game ? well it's not fun and it doesn't feel like you did it, I guess it's enough of reasons to create just your game...

    ok, so I have 1 more question, what do I start from ? Do I go HTML+CSS -> JS -> PHP+mysql ? Thanks

  • #6
    Master Coder felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, Australia
    Posts
    6,642
    Thanks
    0
    Thanked 649 Times in 639 Posts
    Quote Originally Posted by eimatam View Post
    ok, so I have 1 more question, what do I start from ? Do I go HTML+CSS -> JS -> PHP+mysql ? Thanks
    That's one possible path to follow. The alternative would be to learn JavaScript last but keep the rest of the order the same.
    Stephen
    Learn Modern JavaScript - http://javascriptexample.net/
    Helping others to solve their computer problem at http://www.felgall.com/

    Don't forget to start your JavaScript code with "use strict"; which makes it easier to find errors in your code.

  • #7
    Senior Coder
    Join Date
    Apr 2010
    Posts
    1,559
    Thanks
    76
    Thanked 105 Times in 104 Posts
    I own a text based browser game and started in April 2007. So I have a lot of experience trust me.
    HTML is what you need to learn way before anything. It's the most simple programming (that I've come across) and it'll be needed throughout your game. Depending on how you go about it.

    CSS is to make it flashy, some CSS is good for validations and stuff. JS isn't needed unless you really need it for certain things.

    PHP & MYSQL is the core of your system. 95% of your files will be PHP and be interacting with the MYSQL database.

    So this should be your order HTML > (BEGINNER CSS) > PHP > MYSQL
    Been a sign maker for 7 years. My business:
    American Made Signs


  •  

    Posting Permissions

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