22 Replies - 1034 Views - Last Post: 13 December 2012 - 12:52 PM
#1
Advice on planning a text based browser game in PHP
Posted 12 December 2012 - 08:31 AM
I am interested in creating a text based browser game. I am currently familiar with HTML, CSS, PHP, MySQL & a small bit of javascript. Would it be possible to create a large scale browser game with just these technologies? It should be noted that I am relatively new to programming/web development. (I have done 1 year in college and prior to that had no experience, I mostly do little projects in my own time.)
I have a great idea for a game which I think would be very popular, however I don't know if someone of my skill level could pull it off.
Anyway to get to the point:
1) Is it possible with the technologies I already know?
2) Can someone of my skill level pull something large scale off by learning the hard bits as they go?
3) Where do I start?
Let me elaborate a small bit on no. 3, how would I plan a large text based game? Obviously I want to start working on it ASAP but
I feel it needs to be planned perfectly for me to have a chance of being successful.
PS: Is it better to design web pages or program the scripts first?
I typically design web pages and then "fill in" the functionality as I go.
Thanks for reading & I'd appreciate any advice.
Thank You.
Replies To: Advice on planning a text based browser game in PHP
#2
Re: Advice on planning a text based browser game in PHP
Posted 12 December 2012 - 08:44 AM
#3
Re: Advice on planning a text based browser game in PHP
Posted 12 December 2012 - 08:48 AM
#4
Re: Advice on planning a text based browser game in PHP
Posted 12 December 2012 - 09:13 AM
Quote
Yes.
Quote
Well.. then, maybe not right away.
Quote
Ideas are great, but yes.. the trouble will be with when the rubber meets the road. Can you do it? sure.. will you do it in the next month? Probably not.
Quote
2) Can someone of my skill level pull something large scale off by learning the hard bits as they go?
3) Where do I start?
Let me elaborate a small bit on no. 3, how would I plan a large text based game?
1: Yes, 2: Maybe, 3. *sigh* Okay you need to write everything down. Plan it all out. Start high level of mechanics, core game take aways, fun points, etc.. then go deeper with factions, classes, background stories, world environments, etc... then deeper still with how to keep the game perpetually going, items, areas, etc.. then screens on how the user will interact with teh world.. database designs, milestones, a schedule, etc... Like an onion you gotta keep peeling back layers.
For example - the planning and requirements section outlined here:
http://wangnet.org/xnatutorial.html
Quote
That's where these projects tend to fail - poor planning. People want to jump into coding with only a vague idea where to go and momentum is lost without having a constrained world and core set of goals and milestones that need to get the game across (you know - before the gold plating aspect).
Quote
It's better to plan first.. but yes - you'll need pages to hold your scripts, right? So knock out a page frame (not a lot of detail) and then add your scripts.
#5
Re: Advice on planning a text based browser game in PHP
Posted 13 December 2012 - 10:21 AM
I posted a question yesterday asking for advice on planning a text-based browser game.
I am aware I cannot start coding anything until I have a concrete plan of action, something I don't have as of yet.
However I am still unsure of how to go about this.
My game would have a lot of "areas" where players could go.
E.g:
Pub, supermarket etc.
When a player enters an area they can see a list of all the other players in the same area and can do a variety of
different actions like buying a drink etc. etc.
Would creating the areas be as simple as having .php pages for each ?
When a user enters the area how would that be stored/recorded?
Would it just be a value in a database that gets updated.
Eg:
current_area |
Pub
Then if a user entered a supermarket, run an update query and change pub to supermarket?
Would this be an efficient way of doing it ?
I'm not looking for any code, I just would appreciate advice on the ways I could do this.
I want my game to be large and eventually have thousands of users.
I am willing to spend anywhere from 6 months - 3 years developing this and learning as I go to college.
(I'm 18, have done one year of a computer science degree)
Before that one year of college I had no programming experience so I'm relatively new to this technology,
I have some experience making small projects with PHP, MySQL, HTML, CSS & Javascript.
Do you believe in the time frame I gave, I could develop a large scale game ?
What techniques would I have to learn ?
I don't want to have many graphics in my game as it is text based.
I am somewhat familiar (or at least aware) of things like the PHP rand function.
I would use this to generate random events that could happen when players play the game?
This project is very intimidating to me right now but the game, if I could somehow pull it off, would be a hit I'm sure.
So please, any advice much appreciated.
Thanks for reading.
#6
Re: Advice on planning a text based browser game in PHP
Posted 13 December 2012 - 10:30 AM
Quote
Ideally - no. You would want one generic class that you can call that can be any area but the data you pull in and options you set make it one spot or another.
Quote
A database table of user ids, foreign keys (the location's id) would be appropriate.
Quote
Yes.. you would have a table called "locations" that would link up user ids and location ids.
Quote
...
(I'm 18, have done one year of a computer science degree)
...
Do you believe in the time frame I gave, I could develop a large scale game ?
Sure.
Quote
The languages, databasing, security, load optimization, level design, object abstraction, seemless updating, game scenerio writing, game stat adjustment/nerfing... etc
Quote
Then you need to be more so.
Quote
Yes.
#7
Re: Advice on planning a text based browser game in PHP
Posted 13 December 2012 - 10:39 AM
modi123_1, on 13 December 2012 - 10:30 AM, said:
Quote
Ideally - no. You would want one generic class that you can call that can be any area but the data you pull in and options you set make it one spot or another.
Quote
A database table of user ids, foreign keys (the location's id) would be appropriate.
Quote
Yes.. you would have a table called "locations" that would link up user ids and location ids.
Quote
...
(I'm 18, have done one year of a computer science degree)
...
Do you believe in the time frame I gave, I could develop a large scale game ?
Sure.
Quote
The languages, databasing, security, load optimization, level design, object abstraction, seemless updating, game scenerio writing, game stat adjustment/nerfing... etc
Quote
Then you need to be more so.
Quote
Yes.
Quote
So from just one class, I could create maybe 100+ "areas" and populate the page with the relevant data?
Where would this data be stored for me to pull it in ?
Thanks for the reply by the way.
#8
Re: Advice on planning a text based browser game in PHP
Posted 13 December 2012 - 10:46 AM
Quote
Yes.. in my typical game setup I have a few layers of classes that go into it. Say an "entity" class... then that can be used to derive a item, a user, and npc. I may have a whole monster manual of creatures used to attack my players, but they are all the same basic setup. A name, level, abilities/stats, attack power, attack action, defend power, hit points, and treasure drop.
So player X comes to an area.. the random roll says a monster jumps out. I check the area (location table) for typical monsters stationed there, randomly pick one - a goblin - (creature table), go to the that creature table to get all the details of a goblin.
The creature class is generic and so the player and the creature know how to work together regardless of the specific details.
Quote
In a database table.
#9
Re: Advice on planning a text based browser game in PHP
Posted 13 December 2012 - 10:52 AM
modi123_1, on 13 December 2012 - 10:46 AM, said:
Quote
Yes.. in my typical game setup I have a few layers of classes that go into it. Say an "entity" class... then that can be used to derive a item, a user, and npc. I may have a whole monster manual of creatures used to attack my players, but they are all the same basic setup. A name, level, abilities/stats, attack power, attack action, defend power, hit points, and treasure drop.
So player X comes to an area.. the random roll says a monster jumps out. I check the area (location table) for typical monsters stationed there, randomly pick one - a goblin - (creature table), go to the that creature table to get all the details of a goblin.
The creature class is generic and so the player and the creature know how to work together regardless of the specific details.
Quote
In a database table.
Wow thanks for the insightful answer, things are becoming clearer already.
My game is a little different to an action type game with attacks/violence etc.
Say for example a player in my game entered a pub.
I would run an update query changing the location in the location table to pub.
Then If I wanted to do an action like, buy a drink, for example.
How would the player buy the drink ? Is is simply all database work ?
#10
Re: Advice on planning a text based browser game in PHP
Posted 13 December 2012 - 11:04 AM
Quote
There's a ton of ways to do this, but off the top of my head - the class would have a list of all actions you can do at a location.. when the location loads it loads what actions are available (an array of booleans or something along that lines)... then only those actions are shown to the user (and make sure the options selected are constrained to the visible options)...
#11
Re: Advice on planning a text based browser game in PHP
Posted 13 December 2012 - 11:12 AM
modi123_1, on 13 December 2012 - 11:04 AM, said:
Quote
There's a ton of ways to do this, but off the top of my head - the class would have a list of all actions you can do at a location.. when the location loads it loads what actions are available (an array of booleans or something along that lines)... then only those actions are shown to the user (and make sure the options selected are constrained to the visible options)...
If each location had, say, 7-8 actions and there were 100 locations there would be 700-800 different actions in the game.
All of which would generate random outcomes and points would be added/deducted.
I understand this would have to be extremely organized.
Would there be an actions table with everything stored in it?
Sorry to ask so many questions, I'm just trying to get a better understanding from
someone who has experience with this kind of thing and not a user manual.
#12
Re: Advice on planning a text based browser game in PHP
Posted 13 December 2012 - 11:16 AM
Quote
All of which would generate random outcomes and points would be added/deducted.
Really? 100 unique locations with nothing sharing similar qualities? I mean just because pub A and pub B have different data does not preclude them from being the same entity.
#13
Re: Advice on planning a text based browser game in PHP
Posted 13 December 2012 - 11:19 AM
modi123_1, on 13 December 2012 - 11:16 AM, said:
Quote
All of which would generate random outcomes and points would be added/deducted.
Really? 100 unique locations with nothing sharing similar qualities? I mean just because pub A and pub B have different data does not preclude them from being the same entity.
There wouldn't necessarily be two types of the same area.
There could be a:
cinema, pub, night club, supermarket, police station, library etc. etc. etc. (as many as I can think up and program)
#14
Re: Advice on planning a text based browser game in PHP
Posted 13 December 2012 - 11:23 AM
#15
Re: Advice on planning a text based browser game in PHP
Posted 13 December 2012 - 11:32 AM
modi123_1, on 13 December 2012 - 11:23 AM, said:
Can I ask what is odd about it? Would it normally be done another way (or the way you mentioned).
Would your way reduce the workload and be more efficient?
Quote
Yes. It's just quite confusing trying to figure out how my game will work (back-end wise) with a limited programming knowledge.
Just out of curiosity, how long would it typically take you to complete a large game?
(I'm assuming you're adept in the field.)
I just want to figure out a time frame for myself to finish the game.
|
|

New Topic/Question
Reply



MultiQuote








|