Register for your free account! | Forgot your password?

Go Back   elitepvpers > MMORPGs > Conquer Online 2 > CO2 Programming
You last visited: Today at 09:53

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



Another question about programming languages

Discussion on Another question about programming languages within the CO2 Programming forum part of the Conquer Online 2 category.

Reply
 
Old   #1
 
xBlackPlagu3x's Avatar
 
elite*gold: 0
Join Date: Jan 2011
Posts: 286
Received Thanks: 71
Question Another question about programming languages

So I'm probably well-known for asking questions about programming, especially about what it takes to make a server. Well I guess this is another question but in a way it's a different question.

PHP:
  • Ability to make classes
  • Ability to make functions
  • Database Connections are made easy
  • I have taken an extreme liking to PHP

Is it possible to code a Conquer server using PHP? That'd be a seriously, legit class project for my Advanced Computers course. Not only would that allow me to be efficient with PHP, but it would allow me to sell my web development services for a much higher price, because I'd be much more qualified than I already am. The only reason why I ask is because I have heard from a friend that someone has already done it but has never released the information of how they did it publicly, or even that they did it using PHP.

Don't post if it's something like: 'You suck', 'PHP is dumb', 'Web development is dumb', 'You're stupid for even thinking of something like this', 'Yeah but it makes the server slow it's not worth it'*

*You can tell me it makes the server loading/ping slower, but also tell me why, how and most importantly, how much slower? If it raises the ping on a 216kb/s connection by 100ms, I don't really care. If I get a decent VPS/Dedicated Server with a legit internet connection, it won't make TOO much of a difference. I understand that on a slower connection (like mine), the ping would PROBABLY be in the 1000s. Obviously I would love correction if I'm wrong, but not to the point of where it becomes flame.

Thanks,
xBlackPlagu3x
xBlackPlagu3x is offline  
Old 09/10/2011, 23:08   #2


 
KraHen's Avatar
 
elite*gold: 0
Join Date: Jul 2006
Posts: 2,216
Received Thanks: 793
It would be possibe to make a server in PHP. But just because you can doesn`t mean you should.

PHP isn`t compiled to machine code, not even IL, it`s an interpreted language by the server, it`s purpose isn`t creating an application like a server emulator, where tons of data are processed and isn`t like a web-based MMO server when you need to send fewer packets.
KraHen is offline  
Old 09/11/2011, 00:20   #3
 
xBlackPlagu3x's Avatar
 
elite*gold: 0
Join Date: Jan 2011
Posts: 286
Received Thanks: 71
I don't really see any harm in doing a PHP server I mean if anything, when submitting an application to join a team for web development I could say I coded a ******' server using PHP. I understand that it's not ANYWHERE CLOSE to as efficient as C# or C++ or even Java, but how unefficient could it be?
xBlackPlagu3x is offline  
Old 09/11/2011, 03:33   #4


 
Korvacs's Avatar
 
elite*gold: 20
Join Date: Mar 2006
Posts: 6,125
Received Thanks: 2,518
PHP would be massively inefficient compared to a server written in a language which compiles to something, it just simply isn't designed with this in mind. I think anyone looking to hire someone whos good with PHP would absolutely not hire you if you brought this up at an interview, it would demonstrate some ability yes, but also the fact that you considered this viable at one time or another and that would be a downside.

PHP also has some very significant arguments to not be used, the threading support which you would require for a server is virtually non-existent the best you could hope for would be either pcntl_fork() or to execute another script through the CLI from the one your using, neither of which are truly separate threads.

PHP sockets are synchronous, i've read that you can 'apparently' get async sockets, although from what ive seen on the subject in order to achieve these supposed async sockets you require a recv in a loop, which screams sync to me and definitely not async, which makes trying to manage your sockets alot more difficult.

Theres also massive security implications which you would need to consider. Also memory usage is likely to be pretty high due to the problems with threading, and im not sure about CPU, probably higher than normal due to the number of scripts you will need to be running to get around your threading issues.

I think the phrase "Just because you can, doesn't mean you should" sums this up best.
Korvacs is offline  
Old 09/11/2011, 15:45   #5
 
Coksnuss's Avatar
 
elite*gold: 0
Join Date: Jul 2006
Posts: 557
Received Thanks: 65
I tried that once ages ago for a conquer client... You will soon run into problems like maximum script execution time, memory limit problems, persistent states of objects and so much more. PHP is just not designed to act as a server. Also it would be very difficult (if not impossible) to interact with the server (admin commands and so on).

Unless you have much time to spend (just to learn that PHP isnt the language of choice) - Don't even try to do that.
Coksnuss is offline  
Old 09/11/2011, 18:44   #6
 
elite*gold: 0
Join Date: May 2011
Posts: 1,769
Received Thanks: 756
PHP is coded in C and it's open source, so yea it's possible.
BaussHacker is offline  
Old 09/11/2011, 19:35   #7


 
Korvacs's Avatar
 
elite*gold: 20
Join Date: Mar 2006
Posts: 6,125
Received Thanks: 2,518
Quote:
Originally Posted by BaussHacker View Post
PHP is coded in C and it's open source, so yea it's possible.
Not if you want to host it on someone elses webserver where you dont have access to the PHP installation.
Korvacs is offline  
Thanks
1 User
Old 09/12/2011, 03:19   #8
 
xBlackPlagu3x's Avatar
 
elite*gold: 0
Join Date: Jan 2011
Posts: 286
Received Thanks: 71
Well maybe I'll do PHP someday once I can do it in a real programming language, just for the experience of PHP scripting.

Close please.
xBlackPlagu3x is offline  
Old 09/14/2011, 20:55   #9


 
KraHen's Avatar
 
elite*gold: 0
Join Date: Jul 2006
Posts: 2,216
Received Thanks: 793
Not worth the effort and/or time IMO.
KraHen is offline  
Reply


Similar Threads Similar Threads
Programming question
08/17/2010 - 9Dragons - 10 Replies
Hello Elitepvpers! I see that ppl can make bot's that are undetectable. Could someone give me a hint or explain to me how to program a undetectable bot? I'm a Java programmer and got avg programming skill's. GG stops the Java Robot Class so that won't work. Or there must be a way that GG won't detect the program :P I won't release it, it's just for myself and to learn more stuff. I hope someone could help me.
Programming Question
04/03/2009 - General Gaming Discussion - 0 Replies
Hey, I have been trying to port some code into any language, and not having any luck at all. A user on here (Atheuz) gave me some old source to an old bot he used to use, but my knowledge is not far enough to fill in the blanks. I tried porting in C++, but had too much trouble. I was wondering if anyone could try this for me, I would greatly appreciate it. Basically it's a bot for Phoenix Dynasty Online, that simply right clicks monsters. The memory addresses will have to be adjusted...
Question about programming
11/21/2008 - CO2 Programming - 0 Replies
i am wanting to make some programs for conquer and i program in vb6 and i was wondering if anyone would be willing to share and tutorials with me and if so i would like that



All times are GMT +2. The time now is 09:53.


Powered by vBulletin®
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2024 elitepvpers All Rights Reserved.