andreasb Posted November 29, 2009 Share Posted November 29, 2009 Hello, I've been learning MySQL and PHP for the last 2-3 years. Though, I've had long pauses and months without touching PHP. Now, I started at a new school this autumn, and I found that some of my old school mates, which I hadn't seen for a while, wanted to make a online text based game. They said that I could join the project, because they needed a scripter, as none of them could script (only designers). We got project plans, a small budget (for hosting + domain(s)) and a good team of designers, managers, etc. Now, I've been analyzing and playing other text based games for years as I find them entertaining. But now the question for me is: How should this be done? Should I use PHP OOP? I've never tried it, and I don't know why I should use it either, so therfor I ask you. Should I use cronjobs? I've read that cronjobs is mostly for games with small databases, as a cronjob on a large database could take hours before it's finished. I know that a lot of people asks about MMORPG text based games. I would say that the difference between me and "a lot of them" is that I got a lot of programming experience already. I just need to know how to optimize and structure the website. Quote Link to comment https://forums.phpfreaks.com/topic/183332-not-just-another-mmorpg-text-based/ Share on other sites More sharing options...
KevinM1 Posted November 29, 2009 Share Posted November 29, 2009 IMO, it'd be dumb not to use OOP for this. Think about MMOs, and what can be mapped to objects with little work. Loot, equipment, characters, virtually everything related to combat (the attacks themselves, status effects, weapons, armor...), etc. You're going to be generating, using, and passing around this info on the fly. Moreover, various objects naturally contain other objects (characters have equipment, attacks and/or equipment can apply status effects on other characters, etc). Keeping things in this LEGO-esque building block fashion (which is essentially what OOP boils down to - the construction of parts that can be combined into larger things) is a good way to look at the design. For me, an MMO practically begs for OOP. Quote Link to comment https://forums.phpfreaks.com/topic/183332-not-just-another-mmorpg-text-based/#findComment-967679 Share on other sites More sharing options...
Cosizzle Posted November 29, 2009 Share Posted November 29, 2009 First off, I personally feel that working on any type of large project is a great way to learn, developing quick small jobs makes it hard to evaluate your skills, make mistakes and learn from them. Secondly if you had a lot of programming experience you would know a little more about OOP especially if you plan to use PHP5. I don't say this to be mean but Object Oriented Programming is the fundamental for so many of todays well built applications. I suggest you look into class design with OOP! Through out your project be sure to come and ask questions and seek help if it's needed! Quote Link to comment https://forums.phpfreaks.com/topic/183332-not-just-another-mmorpg-text-based/#findComment-967681 Share on other sites More sharing options...
andreasb Posted November 29, 2009 Author Share Posted November 29, 2009 Thanks for the fast reply. Any site you would recommend to me when it comes to learning OOP? These "Simple OOP" videos on YouTube aren't really encouraging as it seems to take a lot of time to make small functions which just writes "Hello", or anything that could be done with a variable alone. As Cosizzle posted before I managed to post, I will answer him too. It was wrong for me to say that I have "a lot of experience". What I ment was that I have more experience than most other guys I've seen creating topics about "how to create online games", those who doesn't even know what programming language to use. And thanks for your answer ! Quote Link to comment https://forums.phpfreaks.com/topic/183332-not-just-another-mmorpg-text-based/#findComment-967685 Share on other sites More sharing options...
Cosizzle Posted November 29, 2009 Share Posted November 29, 2009 Ya... writing something so simple as 'helloworld' would take a bit of scripting to do. Don't let this throw you off though! The reason why is because of how information is being passed. You are technically creating an object of 'helloworld' and manipulating that object while protecting it's core data (or private data) You'll need to do some reading, OOP is a complex topic, heck im still learning it after 3 or 4 years of working with it... for starters check out http://www.devarticles.com/c/a/PHP/Object-Oriented-Programming-in-PHP/ or http://www.phpdeveloper.org/news/5719 honestly google is your friend here... Don't get discouraged though, take it in small bites (that what OOP is after all) Quote Link to comment https://forums.phpfreaks.com/topic/183332-not-just-another-mmorpg-text-based/#findComment-967698 Share on other sites More sharing options...
andreasb Posted November 29, 2009 Author Share Posted November 29, 2009 Thanks a bunch for your tips. I will read the links you've provided, and maybe I'll get my father to teach me OOP, as from what he said OOP is pretty similar in almost every OOP-supported programming language. Quote Link to comment https://forums.phpfreaks.com/topic/183332-not-just-another-mmorpg-text-based/#findComment-967702 Share on other sites More sharing options...
KevinM1 Posted November 29, 2009 Share Posted November 29, 2009 Thanks for the fast reply. Any site you would recommend to me when it comes to learning OOP? These "Simple OOP" videos on YouTube aren't really encouraging as it seems to take a lot of time to make small functions which just writes "Hello", or anything that could be done with a variable alone. Well, there are no doubt some OOP tutorials here at PHP Freaks you could look at. I also recommend the books PHP 5 Objects, Patterns, and Practice by Matt Zandstra and Design Patterns: Elements of Reusable Object Oriented Software by the Gang of Four. Quote Link to comment https://forums.phpfreaks.com/topic/183332-not-just-another-mmorpg-text-based/#findComment-967703 Share on other sites More sharing options...
andreasb Posted November 29, 2009 Author Share Posted November 29, 2009 Nightslyr: Thank you, I'll see if I can order at least one of those books from Amazon (I assume they're there) the coming week . Quote Link to comment https://forums.phpfreaks.com/topic/183332-not-just-another-mmorpg-text-based/#findComment-967704 Share on other sites More sharing options...
Orionsbelter Posted November 29, 2009 Share Posted November 29, 2009 Cron jobs are for turn base game really. you may also want to learn CSS as these games need to look nice in order to get people to play them. JavaScript will help you make it more dynamic and JavaScript will give your game more movement. Quote Link to comment https://forums.phpfreaks.com/topic/183332-not-just-another-mmorpg-text-based/#findComment-967710 Share on other sites More sharing options...
gergy008 Posted November 29, 2009 Share Posted November 29, 2009 Lets just say if you do go anywhere with this, I'll be happy to be a beta tester for you ^^ Quote Link to comment https://forums.phpfreaks.com/topic/183332-not-just-another-mmorpg-text-based/#findComment-967712 Share on other sites More sharing options...
andreasb Posted November 30, 2009 Author Share Posted November 30, 2009 @blmg911: Let's say I want to create a farm/plantation which each hour adds money into an account. Would a cronjob fit to do that work? @gergy008: Thank you. I'll let you know if we need any . Quote Link to comment https://forums.phpfreaks.com/topic/183332-not-just-another-mmorpg-text-based/#findComment-968114 Share on other sites More sharing options...
plznty Posted November 30, 2009 Share Posted November 30, 2009 haha my circumstances match yours. My mates always had the ideas and i was the one spending hours implementing them.. Then spending hours trying to do very hard things just because they think its a "good idea". I would recommend using cron jobs, depends on your database layout and amount of data you will be gathering. Cron jobs is a great way to update money etc which is needed for MMORPG's. Quote Link to comment https://forums.phpfreaks.com/topic/183332-not-just-another-mmorpg-text-based/#findComment-968123 Share on other sites More sharing options...
aeroswat Posted November 30, 2009 Share Posted November 30, 2009 Just curious is this for profit or for fun? If for fun I would recommend not using a web based language and instead use something like C/C++. Look into MUD's and MUSHes. There are several types where you can download uncompiled code for and add your own code to it. It may be hard if you have never touched a language like this at all and it will DEFINATELY be hard if you are completely new to OOP. Quote Link to comment https://forums.phpfreaks.com/topic/183332-not-just-another-mmorpg-text-based/#findComment-968140 Share on other sites More sharing options...
andreasb Posted November 30, 2009 Author Share Posted November 30, 2009 Well... Both profit and fun, I guess. At least some of my friends was hoping that we could profit a bit from it, he-he. I want to have the game online, so I guess I'll have to use a web based programming lang. Quote Link to comment https://forums.phpfreaks.com/topic/183332-not-just-another-mmorpg-text-based/#findComment-968143 Share on other sites More sharing options...
aeroswat Posted November 30, 2009 Share Posted November 30, 2009 By a web based language i'm talking about languages devoted to the development of websites and not applications. MUD's (Multi User Dungeons/Domains) or MUSHes (Multi User Shared Hallucination/Habitat) are both types of games that are played via a telnet client. You can imagine them as RPG's without pictures. The client connects to the program and interacts with it. This changes a database(generally custom made) and reads everything from this constantly updated database. Check it out. If you get good enough at coding this could be a VERY viable solution. I used to work on one of these myself. They are fun, addicting, and if you get good enough you can make it into a full fledged game (with graphics and all) Quote Link to comment https://forums.phpfreaks.com/topic/183332-not-just-another-mmorpg-text-based/#findComment-968150 Share on other sites More sharing options...
plznty Posted November 30, 2009 Share Posted November 30, 2009 Well... Both profit and fun, I guess. At least some of my friends was hoping that we could profit a bit from it, he-he. I want to have the game online, so I guess I'll have to use a web based programming lang. Demand more of a cut if you do . Its easy enough said and you should be rewarded for making it happen! Quote Link to comment https://forums.phpfreaks.com/topic/183332-not-just-another-mmorpg-text-based/#findComment-968184 Share on other sites More sharing options...
aeroswat Posted November 30, 2009 Share Posted November 30, 2009 Also I'm interested in joining the team as well. Please send me the details if you need someone else Quote Link to comment https://forums.phpfreaks.com/topic/183332-not-just-another-mmorpg-text-based/#findComment-968192 Share on other sites More sharing options...
andreasb Posted November 30, 2009 Author Share Posted November 30, 2009 Thank you . If we expand our team we will most likely need beta testers only. Hopefully I'll find some more coders within my country borders, as it'll be easier for us to work together. Quote Link to comment https://forums.phpfreaks.com/topic/183332-not-just-another-mmorpg-text-based/#findComment-968326 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.