Page 1 of 2

PHP and ...?

Posted: Thu May 06, 2010 6:20 pm
by Qunox
Hello everyone I'm new to PHP game development and i am done watching the MMORPG tutorials.
I wanted to know what combination i should go with as i don't have any real experience.

Should i go with PHP and Java?
Or maybe PHP and AJAX?
Or maybe PHP and Flash?

What do you guys recommend for a new developer that has no experience in either scripting languages.
I'v done some C++ and BlitzBasic(A long time ago).



Thank you all an hope to hear from the comunity, also please include pros and cons about the language combination.
:D

Re: PHP and ...?

Posted: Thu May 06, 2010 6:47 pm
by OldRod
PHP and Ajax is a strong combination, as is PHP/Java

Not tried working with Flash, so can't really comment on that :)

Re: PHP and ...?

Posted: Thu May 06, 2010 8:45 pm
by hallsofvallhalla
dpends on what you want to build really. Flash is more artist driven while ajax/Javascript is more coder driven.

If you mean php and javascript then same as ajax basically, just do not attempt to learn java, terrible. ..

Re: PHP and ...?

Posted: Thu May 06, 2010 9:45 pm
by Chris
I'd say no to Java, it used to be good and when I first started programming I used JSP for my websites instead of PHP, I do find it can be faster than PHP, but PHP has advanced and has quite a bigger library and functionality, PHP's syntax isn't much different but the small differences do help source errors easier. Secretly I still really love Java :oops:

Re: PHP and ...?

Posted: Thu May 06, 2010 9:55 pm
by Jackolantern
Chris wrote:I'd say no to Java, it used to be good and when I first started programming I used JSP for my websites instead of PHP, I do find it can be faster than PHP, but PHP has advanced and has quite a bigger library and functionality, PHP's syntax isn't much different but the small differences do help source errors easier. Secretly I still really love Java :oops:
I still like it as well, but in its places. I don't think any language can truly be "one language for every use" like it was billed. C# and the rest of .NET is the same way. You can use it for almost anything, but is it the most efficient answer for every solution? Not by a long shot.

To the OP:
As others have said, it really depends on what you want to make. Flash is more complicated, and more artist-driven than AJAX or Java, but it does a great job for games that require a lot of animation and effects. However, the way to code Flash to use PHP as a back-end is no where near beginner stuff, and is even quite ugly for advanced coders. Java has kind of lagged behind in browser-based game development. I really think there are better options now. PHP and AJAX is a potent combination. You can use mostly PHP and Javascript/AJAX for effects, use mostly AJAX for the game and PHP mostly for the back-end, or anything in-between.

Re: PHP and ...?

Posted: Fri May 07, 2010 4:10 am
by Qunox
Hmm, well depending on your answers i must say that it looks like FLASH is a more eycandy, sounds to me AJAX is a solid choice.
But whats the diffrence between AJAX and Java? Must i code the game compleatly in Java when i use Java or can i still use PHP as a backend.

Re: PHP and ...?

Posted: Fri May 07, 2010 9:09 am
by Chris
Java is another programming language that can be downloaded and embedded into a web page as an applet much like flash.
Ajax is a class in JavaScript which is used by browsers to dynamically call different web pages.

The pain with using JavaScript is the time the server takes to load PHP and the client to load the response. And the biggest pain with using JavaScript is that everyone can see your source so everything has to be double checked with PHP.

Re: PHP and ...?

Posted: Fri May 07, 2010 12:30 pm
by hallsofvallhalla
there are lots of ways to hide your javascript source. Like include files or encryption but I agree with Chris, it can be a pain. Ajax isn't a entire language of itself. It is just a extension of Javascript really.

Re: PHP and ...?

Posted: Fri May 07, 2010 12:38 pm
by Jackolantern
You can also obfuscate your Javascript code. Its not 100% secure, but if you get a strong obfuscator (not just one of the free ones in a browser) it can go a long way towards securing your code. You still would need to verify input on the server, though, but that will never change. You have to verify all input no matter what client-side technology you use.

Re: PHP and ...?

Posted: Fri May 07, 2010 12:54 pm
by Chris
Obfuscating can be easily made readable with some copying and replacing, There are probably websites out there that can unobfuscate for you. As for calling to other JavaScript files, Opera's Dragonfly will make short work of that. If someone wants to find a security loop in your JavaScript they will, no matter how difficult you make it, because anything you try to do to mask your JavaScript can easily be undone. If you are going to use JavaScript for a submitting data, It will always have to be checked server side first. That's the only thing you can do to make it secure.