html based game

Started by
8 comments, last by _Bebe_ 17 years, 9 months ago
There are lots of different mmorpgs that are html based on the net. For example: http://cities.totl.net/cgi-bin/game This game have lots of possibilities, you can make infinite number of items, there's entire system of making new items from other items. Nice action points based system. Is there any info on the internet on how to make this kind of game? I have a basic knowledge of html and I don't even know where to start :/ please... anyone?
Advertisement
thats not an html game. it is scripted in CGI, a web scripting language. many of these online games are either scripted in CGI or PHP. ;)
yes, in fact you cannot have a html based MMO game without having some server side programming. That can be done in many languages, but I will suggest php for starters.
While you can't make a mmo with just html becuase you need php or another server side language like php. You can make a text game with your basic knowledge of html. They are like choose your own adventure books. YOu write a little paragraph and then have links to other pages for the action the player might be able to take

example

You run into the beach looking for you dog
and you can't find him. What do you do

then in links you have

look for your dog
go home to make posters

and build your own text game like that

:)/$/
Quote:Original post by meeshoo
yes, in fact you cannot have a html based MMO game without having some server side programming. That can be done in many languages, but I will suggest php for starters.

I have to agree that PHP will probably be your best bet, but I do love me some Perl CGI. MMMMmmm, tasty..
------------------This is so stupid!
You also could learn how to use cookies and store user data in there, but as the last post said it would be a choose your own adventure.

If you learned a little scripting such as PHP you could potentially make a very simple rpg game.

-sevans
-Sevans
cwncool: 'CGI' is not a programming language. It is the protocol by which your program (which could be in any language) communicates with the web server, so that it can get data from a form and send HTML data back out to the user.

OP: You can't do any programming just in HTML, because it doesn't compute anything - it just defines how to format the text. The usual process is to present an HTML form to the user, such that it will generate either a GET "query string" or a POST message (that's the input side of CGI), and specify a URL to your program. The web server, if properly configured, then starts up your program, feeds it the data (GET query strings appear in an environment variable, and how you access that depends on what OS and language are involved; POST messages appear on the standard input, so you read them as if you were reading user input), and then takes your program's output (which needs to be tagged at the beginning with some special stuff that indicates what kind of data it is) and feeds it back to the user. Normally for a web game, you design this to be "re-entrant": That is, the output of your program is always another HTML page with a form on it, which can invoke your program again.

Normally you write these sorts of things in a scripting language, such as Perl, Python or PHP. These languages are generally The Right Tool For The Job(TM), as opposed to low-level languages such as C++. In particular, because they are not compiled, you can upload them to the web server and not have to worry about compiling. (With C++ source you would need some kind of access to the web server's compiler: you can't just upload a binary, unless the web server runs on the same basic sort of hardware *and* operating system as you compiled it on).

For more information, I recommend here.
Thank you all for help.

It's too bad that it's impossible to extract from those game pages the core to experiment with it and learn :/
Quote:Original post by _Bebe_
Thank you all for help.

It's too bad that it's impossible to extract from those game pages the core to experiment with it and learn :/


You should have a look around for open source cgi games. Dont neglect &#106avascript ofcourse. &#106avascript can compute stuff but is unsecure.<br><br>Making a CGI game is not as difficult as you think. A good starting point firstly however will be to develop or use an abstract framework. Such that you dont need to continuaully capture data manually from the input stream(s).
----------------------------

http://djoubert.co.uk
I search, but I just can't find any open source cgi game.

I guess that learning cgi from the basics is the only way for me now :/

This topic is closed to new replies.

Advertisement