+ Reply to Thread
Page 1 of 3 123 LastLast
Results 1 to 10 of 27

Thread: How to create a text based web browser game

  1. #1
    Join Date
    Apr 2009
    Location
    Uppsala, Sweden
    Posts
    9,547
    Blog Entries
    5
    Rep Power
    98

    How to create a text based web browser game

    Before I knew any web developing at all me and some friends wanted to create a text based web browser game, and it was my task to do the actual coding. So since none of knew how to do it I started to Google and did that for many many hours, without any luck. Most results were only people who wanted to get their own and got a reply like: "Then you have to learn how you do it". I got really frustrated and then gave up. There's actually much information about the topic on the net if you're a little bit more specific, which you of course can't if you don't know anything about what you'll gonna need for creating a game. In this tutorial I will show what you need to learn and what you will use to create a text based web browser game, observe that this could be made in some different ways but I'll show one of them.







    HTML


    First you will need to learn HTML. HTML is a markup language which means it's not a programming language. HTML is the very base since this is what will make web pages. A HTML document can also simply be called web page. Everything you will learn later will in one way or another alter the web page by doing something with the HTML. So you can say that HTML is your actual pages. To learn HTML a good walk through tutorial can be found here: HTML Tutorial









    CSS


    When you have learned HTML good enough there's time to learn CSS. But don't hurry it's better that you learn one thing good enough before you continue with the next one. CSS makes your pages look nice by adding styles to your HTML elements such as color, size, margins etc. Neither CSS is a programming language and is "only" used to set the styles of your HTML pages. If you want a good walk through tutorial about CSS you can found it here: CSS Tutorial








    JavaScript


    Now you should be able to create static web pages, so now it's time to learn Javascript. JavaScript is a lightweight programming language which simply means it's not so complex. JavaScript is usually embedded in the HTML page directly to modify the HTML elements. JavaScript is used to make your web page more dynamic by adding the possiblity of changing the current page while it's open or when it loads depending on different things such as the time of the day or the user's browser just as an example. An other example on what you can do that you'll probably need when doing a game is ticking counters and other changing values. To learn JavaSCript you can use this walk through tutorial JavaScript Tutorial or visiting the JavaScript tutorial section here on CodeCall Javascript - CodeCall Programming Forum










    PHP


    PHP is another programming language we'll use. PHP is a server-side programming language which means everyhing will be executed on the server, then it will return HTML to the browser where it will be showed. Since all code is executed on the server the user can't see the code so therefor we could have secret things in the code, such as database connection. PHP is a good at connection to a lot of different types of data bases and one of the things we'll use it for is to connect to our database where we store all the users and other information. PHP is free to download and must be installed on your server if it isn't already. All the languages above (HTML, CSS and JavaScript) don't need to be installed to use. To learn PHP you can use this walk through tutorial PHP Tutorial or visiting the PHP tutorial section at CodeCall PHP Tutorials - CodeCall Programming Forum











    MySQL


    MySQL is a database, the data stored in a MySQL database is stored in tables. The database we will use to store all information in the game. Then we'll use PHP to get or set info from/to the database and by using this we can create users and keep all information about them and also show it on our pages by returning it to the browser with the PHP as plain HTML. To "order" your database to do something you'll need to use queries which looks something like this "SELECT LastName FROM Persons", queries could be used through our PHP code which means we use the PHP could to send "orders" to the database to retrieve/change information. You can learn about MySQL together with PHP here PHP MySQL Introduction






    Now when you know what to use and have learned all this you'll much easier found the information you'll need. A tip for a tutorial showing you how to do a log in system and other thing needed for a big project is Building a Big Project, Part 1 created by WingedPhanter. One thing to remember, from no experience to a complete web browser game is not a one week project, not even one month, it will take a lot of time to do, but now you know what to do to be able to create one. Hope you found this informative and have good luck learning, if you need any more help just leave a comment below

  2. CODECALL Circuit advertisement
    Join Date
    Always
    Location
    Advertising world
    Posts
    Many

     
  3. #2
    Jordan Guest

    Re: How to create a text based web browser game

    Do I have to use PHP or can I use Perl/Python/Ruby/etc?

    Nicely written, +rep

  4. #3
    Join Date
    Apr 2009
    Location
    Uppsala, Sweden
    Posts
    9,547
    Blog Entries
    5
    Rep Power
    98

    Re: How to create a text based web browser game

    Quote Originally Posted by Jordan View Post
    Do I have to use PHP or can I use Perl/Python/Ruby/etc?

    Nicely written, +rep
    Quote Originally Posted by Vswe View Post
    I will show what you need to learn and what you will use to create a text based web browser game, observe that this could be made in some different ways but I'll show one of them.
    Does this answer your question?

  5. #4
    Join Date
    Apr 2009
    Location
    Trapped in my own little world.
    Posts
    2,487
    Rep Power
    33

    Re: How to create a text based web browser game

    pwnd?

  6. #5
    Jordan Guest

    Re: How to create a text based web browser game

    lol, fair enough but I think it deserves a better title. IE: How to make a text-based web browser game using PHP, JavaScript and MySQL.

  7. #6
    Join Date
    Apr 2009
    Location
    Uppsala, Sweden
    Posts
    9,547
    Blog Entries
    5
    Rep Power
    98

    Re: How to create a text based web browser game

    It's made for people that don't know what they need to use, not for people that know JavaScript, PHP and MySQL and wonder how to create the actual game since this tutorial doesn't show any code or something else like that.

  8. #7
    Join Date
    Jul 2006
    Posts
    16,491
    Blog Entries
    75
    Rep Power
    143

    Re: How to create a text based web browser game

    Nice overview. +rep
    Programming is a branch of mathematics.
    My CodeCall Blog | My Personal Blog

  9. #8
    technica's Avatar
    technica is offline Learning Programmer
    Join Date
    Oct 2009
    Posts
    64
    Rep Power
    0

    Re: How to create a text based web browser game

    Good one mate.

  10. #9
    Join Date
    Nov 2009
    Location
    London
    Posts
    866
    Blog Entries
    3
    Rep Power
    14

    Re: How to create a text based web browser game

    Nice one vswe +rep

  11. #10
    cubedude's Avatar
    cubedude is offline Newbie
    Join Date
    Jun 2010
    Location
    Third rock from the Sun
    Posts
    6
    Rep Power
    0

    Re: How to create a text based web browser game

    nice one i was in the same situation but you acutally don't need javascript cause that just the flashy stuff you can only do it with html, css, php and mysql thats how i did my game.

+ Reply to Thread
Page 1 of 3 123 LastLast

Thread Information

Users Browsing this Thread

There are currently 3 users browsing this thread. (0 members and 3 guests)

Similar Threads

  1. How To Make A Text-Based Browser Game?
    By HaX in forum Website Design
    Replies: 6
    Last Post: 08-09-2011, 12:51 AM
  2. [Browser Based Text Game Project] Still a long way
    By alexandrji in forum General Programming
    Replies: 3
    Last Post: 07-11-2011, 01:57 AM
  3. Tennis - Browser Based Game
    By dbest in forum Request Services
    Replies: 0
    Last Post: 08-09-2010, 11:21 PM
  4. How to create a text based web browser game
    By Vswe in forum Tutorials
    Replies: 8
    Last Post: 03-23-2010, 04:44 PM
  5. How to create a text based web browser game
    By Vswe in forum Game Design Tutorials
    Replies: 8
    Last Post: 03-23-2010, 04:44 PM

Tags for this Thread

Bookmarks

Posting Permissions

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