Text based browser game [closed]
Asked Answered
G

5

6

I wanted to create a text based browser game, so how should I go about? I can do programming in asp or jsp or php that is not a barrier, but I am unaware of what steps that one needs to follow while attempting to make such games. So please guide me.

please also recommend me a programming language for making the same.

Gree answered 19/9, 2009 at 10:54 Comment(7)
Have you used a database before?Mystical
Yes, but not in real time, only practiced. But I have a lot of time I can learn any aspect that is required.Gree
Very less information. What exactly is the game?What will be the gameplay?Best thing to do is grab a pen and paper and write down what all you want in the game and the gameplay.Ac
It will be a game based on the football manager games that u have..Gree
"I can handle any programming language" - that's a bold claim, to say the least.Chasitychasm
I know.. but you should interpret it as "I dont have a problem with languages. i.e I can do it even if it is php or asp or jsp" Plz that is what i meanGree
You could try using Quest. It has a desktop app for Windows only, but also a web-app. The community is not very big, but it's something. Quest can be found here. If you wish, I can help you understand the basics of Quest. Send me an email or a message if you want help.Leung
M
5

One of the simplest browser games is just a series of static pages with links on each page leading to other pages. Often there will be some "story" on the page followed by a few choices you can make. Different choices lead to different pages.

The next step up is to use dynamic pages instead. When loading a new page, the browser can send some variables to the server and the server can generate a page on the fly. This saves you the effort of creating lots of similar pages by hand, and also allows you to do things like random outcomes.

However, if you want to keep a lot of user state (such as inventory, skills, or whatever), it becomes cumbersome (and insecure) to continually pass this from server to browser to server. This is what session handling is for: it remembers a user for a while, and lets you remember some variables at the server side.

If you want a more interactive game, you would need to look into Javascript and perhaps AJAX, which allow things to change in the browser without needing to load a new page.

In terms of language, I would suggest Python CGI, 'cause I like Python. Start with something simple so you can get a better idea of what you're working with, before you design something large.

Have fun!

Mystical answered 19/9, 2009 at 11:28 Comment(1)
If you're writing Python, best author to WSGI (either directly or through a framework if you prefer). You can deploy it through CGI for quick testing, but then you're not limited to slow CGI when the game needs better performance.Toon
U
1

Sounds like you could map it out using a state machine (in any of your chosen languages)...could be a fun little project (:

Urinalysis answered 19/9, 2009 at 11:36 Comment(1)
I love the idea of a state machine for a text-based game, and have been writing a server-side game engine to do just that in Java. Thanks for the idea, it has been fruitful.Hunter
J
1

create a map - basically a two-dimensional array of "rooms" - alternatively you can make it three dimensional if you need to have your character go up and down as well...

then in the game when the player moves character to the south, just find that room in the array.

array could contain all required things related to the room (description, objects, NPCs etc.)

Jenijenica answered 19/9, 2009 at 11:42 Comment(0)
I
0

Personally I would make a text based game in python and then get that to talk to a webserver. that way you can test the game without so much hassle.

What kind of game are you looking to write?

you have to think about what the user might do as well. They can duplicate their window and send the same information twice. They can click back which might mess up the game. You could get the user to submit the time and a session ID each time they click submit.

p.s. continuation passing style is one way to emulate the ability to call an return. It's not an easy way to write things though.

Impinge answered 19/9, 2009 at 11:30 Comment(0)
L
-1

Design. Implement. Test. Play.

If it is a text-based browser game, you should go with HTML. :)

Langsdon answered 19/9, 2009 at 10:58 Comment(2)
But it will be complicated... just like those football manager games..Gree
Then definitely PHP, ASP, JSP, or one of the others.Langsdon

© 2022 - 2024 — McMap. All rights reserved.