Jump to content

Recommended Posts

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.

Link to comment
https://forums.phpfreaks.com/topic/183332-not-just-another-mmorpg-text-based/
Share on other sites

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.

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!

 

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 :)!

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)

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.

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.

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.

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)

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!

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.