PHP and ...?

C++, C#, Java, PHP, ect...
User avatar
Qunox
Posts: 64
Joined: Thu May 06, 2010 4:33 pm

PHP and ...?

Post 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
Here take a bad computer/programming-thingy joke:
"The best thing about UDP jokes is that I don’t care if you get them or not."
User avatar
OldRod
Posts: 1320
Joined: Sun Sep 20, 2009 4:26 pm

Re: PHP and ...?

Post 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 :)
User avatar
hallsofvallhalla
Site Admin
Posts: 12026
Joined: Wed Apr 22, 2009 11:29 pm

Re: PHP and ...?

Post 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. ..
User avatar
Chris
Posts: 1581
Joined: Wed Sep 30, 2009 7:22 pm

Re: PHP and ...?

Post 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:
Fighting for peace is declaring war on war. If you want peace be peaceful.
User avatar
Jackolantern
Posts: 10891
Joined: Wed Jul 01, 2009 11:00 pm

Re: PHP and ...?

Post 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.
The indelible lord of tl;dr
User avatar
Qunox
Posts: 64
Joined: Thu May 06, 2010 4:33 pm

Re: PHP and ...?

Post 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.
Here take a bad computer/programming-thingy joke:
"The best thing about UDP jokes is that I don’t care if you get them or not."
User avatar
Chris
Posts: 1581
Joined: Wed Sep 30, 2009 7:22 pm

Re: PHP and ...?

Post 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.
Fighting for peace is declaring war on war. If you want peace be peaceful.
User avatar
hallsofvallhalla
Site Admin
Posts: 12026
Joined: Wed Apr 22, 2009 11:29 pm

Re: PHP and ...?

Post 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.
User avatar
Jackolantern
Posts: 10891
Joined: Wed Jul 01, 2009 11:00 pm

Re: PHP and ...?

Post 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.
The indelible lord of tl;dr
User avatar
Chris
Posts: 1581
Joined: Wed Sep 30, 2009 7:22 pm

Re: PHP and ...?

Post 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.
Fighting for peace is declaring war on war. If you want peace be peaceful.
Post Reply

Return to “Coding”