Text-Based Web Game

Ye' old general discussion board. Basically, for everything that isn't covered elsewhere. Come here to shoot the breeze, shoot your mouth off, or whatever suits your fancy.
This forum is not for asking programming related questions.

Moderator: General Moderators

Post Reply
alecrespi
Forum Newbie
Posts: 4
Joined: Mon Apr 04, 2005 2:20 pm

Text-Based Web Game

Post by alecrespi »

Hi!
I'm new to the forum.
I used to program with Visual Basic.
But now, I would like to start develop some Text based web game.
(example: King of chaos)
I think that VB it's noto so indicate for that use...
what do you suggest me?
PHP?
and how to start?

Thank you in advance
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

PHP can handle it quite easily. It'd basically be a database of your game content, followed by a script that can build the content for presentation to a user, followed by a script that processes user inputs. You'll need to read up on security, as games bring out the cheaters, no matter what kind it may be. :?
timvw
DevNet Master
Posts: 4897
Joined: Mon Jan 19, 2004 11:11 pm
Location: Leuven, Belgium

Post by timvw »

if you already know visual basic (i mean, you are beyond the click&crash experience) why do you think that asp(.net) is not a good solution?

offcourse, as this is a php forum, you'll discover that it can be done in php quite easily too... or in perl... or in (insert language here)...

- if you are willing to learn something new, php seems a reasonable choice
- if your are looking for fast results, i think you'll get them faster if you continue writing vb/asp
Roja
Tutorials Group
Posts: 2692
Joined: Sun Jan 04, 2004 10:30 pm

Re: Text-Based Web Game

Post by Roja »

alecrespi wrote:Hi!
I'm new to the forum.
I used to program with Visual Basic.
But now, I would like to start develop some Text based web game.
(example: King of chaos)
I think that VB it's noto so indicate for that use...
what do you suggest me?
PHP?
and how to start?

Thank you in advance
Any language will work, as long as you know what you are doing, period.

That said, you'll find that the vast majority of existing web-based games are all driven by php:

Wordog
LOTGD
DragonSaga
The Kabal Invasion
Blacknova Traders
Quantum Star SE
CompWebChess

All of the above are highly popular, and coded in PHP. (Disclaimer: I contribute code to over half of them).

My suggestion is to find a game style you want to make, and either find an existing project that is similar, or start your own.
alecrespi
Forum Newbie
Posts: 4
Joined: Mon Apr 04, 2005 2:20 pm

existing game

Post by alecrespi »

Tahnk you all for the answers.

I know that ASP would be easier (somebody already told me) but I really think that PHP is the real future (it's only a thought).

For "cloning" a software... I liked so much a "battle" game on http://www.elderages.com (in ASP) and liked it so much.
My idea was to use a similar model to build up a game around gladiators fight.
The Human player could buy gladiators, waepons, shields, helmets... get a "formation", an "attacking style" and then attack his opponent (other player). :idea:
All drive through text based combat.

Hoping to be clear. 8O
and waiting for your answer again.
bye
Roja
Tutorials Group
Posts: 2692
Joined: Sun Jan 04, 2004 10:30 pm

Post by Roja »

What you describe sounds fairly similar to legend of the green dragon.

http://lotgd.sourceforge.net/

Give it a try, and see if it suits you. You can write modules for it, contribute to the development team, and more.. its a very active community.
alecrespi
Forum Newbie
Posts: 4
Joined: Mon Apr 04, 2005 2:20 pm

LOTGD

Post by alecrespi »

Hey!
I've just tried The Legend of The Green Dragon... it's great!
but it's also a bit complex for me.
As a first PHP coding exemple I was looking for something easier like
http://www.elderages.com or
http://www.dragonwar.net

If you can visit them, please tell me what you thing about them, and what you can suggest me to do.

Thank You again
User avatar
m3mn0n
PHP Evangelist
Posts: 3548
Joined: Tue Aug 13, 2002 3:35 pm
Location: Calgary, Canada

Post by m3mn0n »

Download Promisance and give that a go. Google around for it. It's on SF.net for sure.
Roja
Tutorials Group
Posts: 2692
Joined: Sun Jan 04, 2004 10:30 pm

Re: LOTGD

Post by Roja »

alecrespi wrote:Hey!
I've just tried The Legend of The Green Dragon... it's great!
Glad you like it!
alecrespi wrote:but it's also a bit complex for me.
Well, lotgd is only ~12,000 lines of code, which isnt that large for a modern text based web game. The Kabal Invasion is more than 3 times that size, and thats not including the (totally neccesary) backend libraries.

Complex is relative. lotgd isnt very complicated *code*. Its mostly procedural, with barely any OOP, so it really is pretty much what you see is what it does (minimal abstraction).

Granted,the game isnt super simple, and does have more than a few hours of replay time, so I'll agree that the game itself has some complexity.

However, if you are looking to code your own game, its really not a bad base to start from - I'm working on doing exactly that at my project (The Dragon Saga).
alecrespi wrote: As a first PHP coding exemple I was looking for something easier like
http://www.elderages.com or
http://www.dragonwar.net
First: The two look like mirror-images of each other with different text and graphics. They were both probably sold from the same script on ebay (snicker).

Second, they both present the same problem: They cant act as a coding example, because you cant SEE the code. They are not opensource games, so you cant learn from them, unlike lotgd.
alecrespi wrote:If you can visit them, please tell me what you thing about them, and what you can suggest me to do.
My suggestions havent changed. In order:

- Stick with the languages you are most comfortable with. If you know ASP, code in that. If that means starting from scratch, so be it.

- If you decide you'd rather start from someone else's code, find a good opensource project that is close to what you want. Lotgd isnt bad. Promisance isnt terrible either. But dont pick a closed-source game, where you cant see the code to learn from it.

- Once you pick an opensource game, see if you can find people to help with "modding" that game.. many times there is a community built around just that, and contributing code to the existing game is a win for both of you: You learn how to change the game, and they get new code to try.
alecrespi
Forum Newbie
Posts: 4
Joined: Mon Apr 04, 2005 2:20 pm

code example

Post by alecrespi »

OK it's all clear.
Thank you (Roja) your explanation was very good. :D
I think I'm gonna spend a lot of time reading and understanding LOTGD code. 8O
It's a good start, as you said, for the large programmers community around it.
Let's see what I am going to take out of my hat. :wink:
User avatar
m3mn0n
PHP Evangelist
Posts: 3548
Joined: Tue Aug 13, 2002 3:35 pm
Location: Calgary, Canada

Post by m3mn0n »

If you or anyone else wants a more simple start, check out Promisance. It's about 1/4th the size of Green Dragon (lines wise). And the game itself is so much more newbie-friendly and fundamentally simplistic in design when compared to Green Dragon.

It still is a rather advanced game compared to a lot out there, but there is a lot of room for improvement. Whereas with Green Dragon, the game is so detailed and expansive you have not as many options left as to how you want to develop the game play. And the core game play is not as flexible as Promisance because of how both of the games are designed. One is an empire-based world, and one is a player-based rpg world. The core strategy of the empire-based Prom world is very easily adjusted whereas GD is more linear.

That's just my view of them both, though. Maybe you'll enjoy Green Dragon much more than you would Promisance. And if you're an RPG fan, I definately recommend GD over Prom.
Post Reply