Jump to content

Creating a Web Browser RPG


Infiltration

Recommended Posts

I already know HTML and CSS, so I've built the site and styled it decently, I made a few things with photoshop and such.My question is about scripts though, I want to make scripts like "attack player" "attack monster" and have the player receive money, experience, etc if they win and lose it they lose.I know PHP is what this is used for, my question is how deep into PHP will I have to be into to create scripts? I've spent the last 2 weeks just doing html and css and I got them locked down I think, but PHP seems really difficult (at least for me) er basically, will I have to go into like High level scripting where I'd have to have a few months of experience or is this something you learn around the middle?I just want to learn how to write these scripts, I really don't want to learn the entire language if I don't have to because I don't want to spend even more time on this project since I'm doing it alone.but if i have to I'll start reading every tutorial I can find :)

Link to comment
Share on other sites

I know PHP is what this is used for, my question is how deep into PHP will I have to be into to create scripts? I've spent the last 2 weeks just doing html and css and I got them locked down I think, but PHP seems really difficult (at least for me) ##CUT##but if i have to I'll start reading every tutorial I can find :)
yes, ^^ that.you will not "lock down" PHP in 2 weeks.go to "school" first - http://www.w3schools.com/php/default.asprun through the PHP section once and then ask for clarification here.
Link to comment
Share on other sites

Yeah I wasn't saying I was going to master it in two weeks, I DID run through it and read a few tutorials, which was why I made the post.I know it's going to take me a while, especially since I can't understand a lot of it. but I was asking if it would be possible to just learn what I need to know to complete my project now and then learn the language as a whole later, and what exactly I'd need to know to be able to do what I am planning to do. I don't want to learn things I probably won't be using because it will take up more time. I'm just focusing completely on the project right now and getting it done rather than just learning languages. I mainly asked because as I read through most of these things, I couldn't possibly see how they'd be of use to me, but then again that's probably because I'm not seeing how I can incorporate that into a script.

Link to comment
Share on other sites

PHP is not the ideal place to start this thing. If you have to call a server script every time your player moves or shoots, the waiting time will drive your user insane. You will update BIG things using PHP probably (like high scores, maybe playing maps) but the real work of animating the game will happen with JavaScript.I suggest learning how to animate a page element first. Just create a blue square or something using HTML and CSS and figure out how to move it from place to place. Hints:The object will need absolute positioning. Movement occurs when you update the object's style.top and/or style.left properties.If you don't want things to "jump", you'll need a timing device, like the built-in setTimeout() function.

Link to comment
Share on other sites

Well actually, maybe I should've been a bit more informative.It will be a completely text based game with some images. Nothing too flashy.Example: www.outwar.comAttacking players, monsters, etc will be as simple as clicking a link. Which would then bring up the attack page of the player fighting another playerI do plan on making a sort of system where players can move around manually, just like a dot representing them on a map but not ANYTIME soon.For now I just want very basic attacking, log in page, forum, etc. I am going to just learn PHP as a whole, I was just hoping I could learn what I needed to know instead of the entire thing because chances are I know I won't need to know everything so I'll end up taking too much time. But atleast I get to learn the language while making the game :)

Link to comment
Share on other sites

Start with basic communication, then. Create a SIMPLE form in HTML. Use it to send ONE text string to a PHP script. Have the PHP script echo the string back to your browser. You can't do much of anything else until you can do all those things.

Link to comment
Share on other sites

Yeaaah, a good attitude.. well sorta. It's not really enough to just -learn- what you need to make it in some cases, not saying you need to lock down all the correct architectural standards, such as a design patterns, oop and structered coding to make your RPG work, but it is probably a good idea to look into it. A year and a half ago, I took a step into programming with no background at all, PHP was my first language, and my only real intention was to create a text based mafia RPG, sure I did it. But I realised (not only that I passionate about programming :)) but in order to keep performance, security and effciency I had to delve further in.Really, what i am trying to say is, don't rush it. Sure you can make a game, but is it secure? Does is run well, if its a text based RPG then you have to expect your gonna get some traffic (not saying you will, but you might) so you need to be sure your pages render quickly. So, just take a look into coding standards in php, when you find the time.Now onto the topic at hand, to create a game RPG you need to look probbaly in the following areas of PHP: - Databases, I assume your probably gonna use MySQL so take a look at that, but the php website has a lot of info on other database drivers. (What I have though prob a bit much for you now, but I have a abstraction layer that allows me to switch between different drivers in my custom framework for what Daatabse I wish to use) - Sessions - Important for transferring data between pages, for example, username and password. Word of warning, be sure to take correct precautions to prevent session keys being stolen by methods such as session hijacking. Off the top of my head just those I can really think of if you wanna keep it generall basic, but if you dont wanna fiddle around making all that stuff, you could always use a framework. Now, personally myself i hate to use someone elses code, people might call be stupid, but meh that just me, I like to try my hand at making my own and learn from my mistakes. (Best way to learn tbh)You could look at CodeIgnitor, CakePHP, Zend. But they may prove to be a little too robust for your current project and probably do require some knowledge of of Object Orientation within PHP to use. Nevertheless feel free to add my MSN : devari.nwn@hotmail.co.uk if you require any advice or further help, I am usually on and dont mind offering a hand here and there. And good luck, its a bold move :)P.S: And no you will not lock down PHP in 2 weeks, you never stop learning new things, plus they keep releasing new stuff in the updates, so it kind makes it hard to truly lock it down.

Link to comment
Share on other sites

Thanks for your reply Gex.Actually I despise those mafia games :) I'm actually looking to take text based web browser games to a higher level, my "dream" is to add elements of actual mmorpgs and combine them with what text based rpgs are all about.I've spent months planning everything, thinking of future things I'd like to add and things that would make the game fun and stand out.I don't want the typical "you rob a bank, you get 5$, 5/10 energy left."I want a leveling system where players can level up by killing monsters or other players, skills, being able to attack monsters in a "party" just to name a few.I know I won't master php (I was talking about html and css) and I AM doing this for the sake of programming because I do want to eventually master (yes master) all aspects of programming. It's just I have all these ideas in my head and I want to express them, but since I don't know the language, I can't! It's frustrating as you could possibly imagine. and yes, I do want to write my own scripts, I don't want anything already done. I want to know how to do it and understand it. It's just when I read scripts, I don't understand a thing... Your post was very informative and I will add your msn. So how did your game turn out?

Link to comment
Share on other sites

Glad to hear it, and my game turned out alright, but like you I got tired of the same generic idea and wanted to express a more unique concept. Hence I looked into more robut idealisms. Nevertheless, I wish you luck on your RPG, and i'll be sure to check it when you have done. :)

Link to comment
Share on other sites

##CUT##Off the top of my head just those I can really think of if you wanna keep it generall basic, but if you dont wanna fiddle around making all that stuff, you could always use a framework. Now, personally myself i hate to use someone elses code, people might call be stupid, but meh that just me, I like to try my hand at making my own and learn from my mistakes. (Best way to learn tbh)You could look at CodeIgnitor, CakePHP, Zend. But they may prove to be a little too robust for your current project and probably do require some knowledge of of Object Orientation within PHP to use. Nevertheless feel free to add my MSN : devari.nwn@hotmail.co.uk if you require any advice or further help, I am usually on and dont mind offering a hand here and there. And good luck, its a bold move :PP.S: And no you will not lock down PHP in 2 weeks, you never stop learning new things, plus they keep releasing new stuff in the updates, so it kind makes it hard to truly lock it down.
hear, hear !!
Thanks for your reply Gex.Actually I despise those mafia games :) I'm actually looking to take text based web browser games to a higher level, my "dream" is to add elements of actual mmorpgs and combine them with what text based rpgs are all about.I've spent months planning everything, thinking of future things I'd like to add and things that would make the game fun and stand out.I don't want the typical "you rob a bank, you get 5$, 5/10 energy left."I want a leveling system where players can level up by killing monsters or other players, skills, being able to attack monsters in a "party" just to name a few.I know I won't master php (I was talking about html and css) and I AM doing this for the sake of programming because I do want to eventually master (yes master) all aspects of programming. It's just I have all these ideas in my head and I want to express them, but since I don't know the language, I can't! It's frustrating as you could possibly imagine. and yes, I do want to write my own scripts, I don't want anything already done. I want to know how to do it and understand it. It's just when I read scripts, I don't understand a thing... Your post was very informative and I will add your msn. So how did your game turn out?
that's the trouble with being a "baby genius" :)one's intelligence is still more than their ability to express it.you can "tell" the adults that, "baaah bah ta-taa na-naa" but those darned adults just don't get it ! they be morons i tell you !!
Link to comment
Share on other sites

hear, hear !!that's the trouble with being a "baby genius" :)one's intelligence is still more than their ability to express it.you can "tell" the adults that, "baaah bah ta-taa na-naa" but those darned adults just don't get it ! they be morons i tell you !!
I hear ya :)
Link to comment
Share on other sites

I hear ya :)
LOVE the sig !! [mind-meld=active] :) as for the bold part; "obfuscation is the way those in power hold on to it by hampering the growth of competition"
Link to comment
Share on other sites

I agree, I learnt early on they tend to overwhelm people with cryptic words and nonsense to throw away the less than patient meat, of course, a nice dictionary often helps to simplify these little tech terms they like to use to hide away the basic principles. :)

Link to comment
Share on other sites

I agree, I learnt early on they tend to overwhelm people with cryptic words and nonsense to throw away the less than patient meat, of course, a nice dictionary often helps to simplify these little tech terms they like to use to hide away the basic principles. :)
to be fair though, sometimes it is required for the sake of precision & accuracy.of course that would be of benefit (or infact required) when you are a "college level" student, "down" here in grade school, all we need are the basics without knowing the finer nuances that DO exist.
Link to comment
Share on other sites

to be fair though, sometimes it is required for the sake of precision & accuracy.of course that would be of benefit (or infact required) when you are a "college level" student, "down" here in grade school, all we need are the basics without knowing the finer nuances that DO exist.
quite, its not that i don't understand the terms or the concepts, I do.. but if your new to all this I can see how it can become overwhleming.. but if ti was all easy, my gran would be doing it.
Link to comment
Share on other sites

quite, its not that i don't understand the terms or the concepts, I do.. but if your new to all this I can see how it can become overwhleming.. but if ti was all easy, my gran would be doing it.
true, i think that's got to be some part of the reason FB deprecated FBML.
Link to comment
Share on other sites

  • 4 weeks later...

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...