4 Replies - 1549 Views - Last Post: 05 August 2009 - 09:22 PM Rate Topic: -----

#1 Susinagi  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 1
  • Joined: 05-August 09

Browser Based Games

Posted 05 August 2009 - 06:35 PM

Hello i am Wanting to make a Browser Based game like the two i have been playing
Tribal wars and Unification Wars
but i don't know where to start any ideas?
Is This A Good Question/Topic? 0
  • +

Replies To: Browser Based Games

#2 sparkart  Icon User is offline

  • D.I.C Addict
  • member icon

Reputation: 113
  • View blog
  • Posts: 691
  • Joined: 16-February 09

Re: Browser Based Games

Posted 05 August 2009 - 07:20 PM

View PostSusinagi, on 5 Aug, 2009 - 05:35 PM, said:

Hello i am Wanting to make a Browser Based game like the two i have been playing
Tribal wars and Unification Wars
but i don't know where to start any ideas?


Maybe giving us a detailed background of your experience might help us show you the right path.


The first thing that I would suggest you to do (assuming you have no programming experience) is learn HTML. It isn't really a programming language but more of a markup language as it doesn't have any programmatic features. HTML just allows you to instruct the web browser to display things the way you want it.

Once you have a familiarity with HTML learn some client-side scripting (Javascript). This allows you to create dynamic content (in simplistic terms, it performs actions based on events like a button click).

The real juice with browser-based games starts when you learn PHP and MySQL. You could think of PHP as something similar to Javascript but it is classified as server-sided scripting. MySQL allows you to perform database querying.

To wrap it up learn these languages:
-HTML
-Javascript
-PHP
-MySQL

... and you'll be on your way.



I hope this post was helpful.


P.S.
Here's a decent website to get you started: http://www.w3schools.com/
Was This Post Helpful? 0
  • +
  • -

#6 Martyr2  Icon User is offline

  • Programming Theoretician
  • member icon

Reputation: 4444
  • View blog
  • Posts: 12,318
  • Joined: 18-April 07

Re: Browser Based Games

Posted 05 August 2009 - 07:25 PM

Well first you need to come up with the game ideas. Before you actually try and build the game, it is good to know all the details of your game mechanics first. This means some hard thought and a paper and pencil. Write out all the ideas, story line, how things work from money to points to battles or challenges etc. Once you have this put together, then you will have an idea of what you need to accomplish and can go onto the technologies that will best meet those needs.

Typically games like that are coded in a server-side language like PHP. So if you don't know any of these languages, it is best to go to the bookstore and pick up a nice beginner tutorial style book on how to program with these languages. These languages also tend to work with databases. PHP works the best with MySQL and so you can find books specific to PHP and one for MySQL or find books that combine the two.

Then I suggest you learn the languages and do small little example applications until you feel you are of an intermediate level programmer with the language. I suggest this because games are not a very easy thing to put together and have them work half as well as you want to unless you know your stuff. Before tackling a game, I always recommend that you have a few good solid applications under your belt. The last thing you want to do is try and dive into a game with a language you barely know and end up way over your head.

To help facilitate your learning, you will want to buy a web host (or find a free one to play on) that runs PHP and has MySQL databases. There you can use those resources to learn your programming and eventually use it to build your game.

So recap on what you need....

1) A written plan on what your game is about, how it works, and what it needs in resources.
2) You need to pick a language and database that works well for online games. I recommend PHP and MySQL.
3) You need a book on PHP, MySQL or both.
4) You need a web host that offers PHP and MySQL access. Either pay for one or find one for free. I suggest you pay so that you have a top notch platform to use for your game later. You will need it.
5) Learn your language of choice and the database to at least an intermediate level. (Build a few good solid web applications as practice)
6) Then you can start implementing your plan from paper using a language you are comfortable with and off you go.

You can also use our PHP web forum for questions and help with your code. We have some resources there too for help building games, coming up with attack formulas etc. So I suggest you check it out.

Hope this helps and good luck with your game! :)
Was This Post Helpful? 1

#7 sparkart  Icon User is offline

  • D.I.C Addict
  • member icon

Reputation: 113
  • View blog
  • Posts: 691
  • Joined: 16-February 09

Re: Browser Based Games

Posted 05 August 2009 - 07:34 PM

View PostMartyr2, on 5 Aug, 2009 - 06:25 PM, said:

Well first you need to come up with the game ideas. Before you actually try and build the game, it is good to know all the details of your game mechanics first. This means some hard thought and a paper and pencil. Write out all the ideas, story line, how things work from money to points to battles or challenges etc. Once you have this put together, then you will have an idea of what you need to accomplish and can go onto the technologies that will best meet those needs.

Typically games like that are coded in a server-side language like PHP. So if you don't know any of these languages, it is best to go to the bookstore and pick up a nice beginner tutorial style book on how to program with these languages. These languages also tend to work with databases. PHP works the best with MySQL and so you can find books specific to PHP and one for MySQL or find books that combine the two.

Then I suggest you learn the languages and do small little example applications until you feel you are of an intermediate level programmer with the language. I suggest this because games are not a very easy thing to put together and have them work half as well as you want to unless you know your stuff. Before tackling a game, I always recommend that you have a few good solid applications under your belt. The last thing you want to do is try and dive into a game with a language you barely know and end up way over your head.

To help facilitate your learning, you will want to buy a web host (or find a free one to play on) that runs PHP and has MySQL databases. There you can use those resources to learn your programming and eventually use it to build your game.

So recap on what you need....

1) A written plan on what your game is about, how it works, and what it needs in resources.
2) You need to pick a language and database that works well for online games. I recommend PHP and MySQL.
3) You need a book on PHP, MySQL or both.
4) You need a web host that offers PHP and MySQL access. Either pay for one or find one for free. I suggest you pay so that you have a top notch platform to use for your game later. You will need it.
5) Learn your language of choice and the database to at least an intermediate level. (Build a few good solid web applications as practice)
6) Then you can start implementing your plan from paper using a language you are comfortable with and off you go.

You can also use our PHP web forum for questions and help with your code. We have some resources there too for help building games, coming up with attack formulas etc. So I suggest you check it out.

Hope this helps and good luck with your game! :)


I totally disagree with this post.

It's like getting the idea of how to walk to that position over there, but without the skill to do so.


Worry about the skill first.

Also, you could check out WAMP (for Windows) for your own web server on your PC for testing purposes (or even to have your own website).

This post has been edited by e_barroga: 05 August 2009 - 07:35 PM

Was This Post Helpful? 0
  • +
  • -

#8 SixOfEleven  Icon User is offline

  • using Caffeine;
  • member icon

Reputation: 945
  • View blog
  • Posts: 6,342
  • Joined: 18-October 08

Re: Browser Based Games

Posted 05 August 2009 - 09:22 PM

I would have to agree with Martyr2 in this regard. He has excellent insight in, and knowledge of, the requirements needed to create top-notch software. His suggestions pretty much parallel what I have suggested in this article here on DIC. http://www.dreaminco...topic106820.htm

Granted, the article was written more for those interested in creating desktop games but the principles would be the same for browser based games, learn the language, start small, work your way up and definitely have a solid plan.

You should have a solid knowledge of the language of choice, which would more than likely be PHP & MySQL for browser based games but it wouldn't have to be. There are other options such as Java. (Runescape was written in Java.)

If your game is graphical then you may also want to look into Flash/Actionscript eventually. One Flash browser based game I used to play is called Dragon Fable.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1