...

View Full Version : Should i learn php for game development?



Dennis3979
02-29-2012, 09:18 PM
I want to get into game design but i dont really know what programing language to learn first. Are there languages that would work better with a specific genre of game or where i want to distribute it? also if there are any collage classes i can take to help me learn please let me know.

Keleth
02-29-2012, 09:32 PM
If you want to develop a website/web game, PHP can work (though there are probably better languages, python being one IMO). If you're actually looking to build a piece of software you can have people download, you need to learn a compiler based language like C++/Java.

There are a ton of college classes for this sort of stuff, there are degrees focused solely on it, though they are, of course, not necessary. Its not like we can list off what those classes are... each college has different names for their courses.. you'll have to look it up yourself.

Dennis3979
02-29-2012, 09:40 PM
Thank you! all look into this python right away. but dose the specific genre matter for example i will have a much harder time programing an rpg then i would an action game in python?

Keleth
02-29-2012, 11:48 PM
Not really... there are probably better languages for producing games anyway, but I know python is popular for application based softwares, on a low budget.

Its hard to say what to recommend, as not sure what your goal/intention is. Even in the end, with python, you won't really be able to do much in the way of graphics or such... what are you trying to make?

cnoevil
03-01-2012, 12:38 AM
I don't think php or python either one is what you are looking for if you want to a shoot 'em up action game. They would ok choices for a role playing game though.

c++ can be a little difficult to master right off if you don't have any experience with programming at all...on the other hand, "C" is about as fast as you can get without going to assembler.

IF you want to try a shoot 'em up and are willing to put the work in to learning a language like "java" you could get away with it. There are even a number of good resources for learning java free on line.

The java trails tutorials: http://docs.oracle.com/javase/tutorial/index.html

The jmonkey game engine: http://jmonkeyengine.org/

enjoy...

Mark

Dennis3979
03-01-2012, 08:59 PM
Not really... there are probably better languages for producing games anyway, but I know python is popular for application based softwares, on a low budget.

Its hard to say what to recommend, as not sure what your goal/intention is. Even in the end, with python, you won't really be able to do much in the way of graphics or such... what are you trying to make?

I plan on making an rpg to post on the web i dont expect to be having battle field graphics.My goal is to have something free toplay but i can update with new things when i can i want to learn as i go if that possible.I plan on going free to play to iphone if i do get a good amount of people playing it for a small profit. i think thats about as specific as i can get.


post on the internet
update able content
and convert to be multiply form

im not trying to get in over my head but if i can find some starting ground for what i want to active it would help out alot

Dennis3979
03-02-2012, 09:36 AM
Not really... there are probably better languages for producing games anyway, but I know python is popular for application based softwares, on a low budget.

Its hard to say what to recommend, as not sure what your goal/intention is. Even in the end, with python, you won't really be able to do much in the way of graphics or such... what are you trying to make?

To be as specific as i can i want to make an rpg turn based to post on the web i want to be able to update it and add new content when i can and i want to be take it online for multiplyer. so what do you think still go with python or learn something else?

(i understand i sound a little over my head here but id be willing to put the time in if i can just get some starting ground)

Dennis3979
03-02-2012, 09:41 AM
I don't think php or python either one is what you are looking for if you want to a shoot 'em up action game. They would ok choices for a role playing game though.

c++ can be a little difficult to master right off if you don't have any experience with programming at all...on the other hand, "C" is about as fast as you can get without going to assembler.

IF you want to try a shoot 'em up and are willing to put the work in to learning a language like "java" you could get away with it. There are even a number of good resources for learning java free on line.

The java trails tutorials: http://docs.oracle.com/javase/tutorial/index.html

The jmonkey game engine: http://jmonkeyengine.org/

enjoy...

Mark

no i want to make a rpg but whats more complected to code i always wanted to know

Keleth
03-02-2012, 03:14 PM
Everything is complicated in its own way... Like I said, python limits you, graphically speaking... If you want to make something like maple story, eg, small, cheap, but requiring graphics, you need to go complier based, Java or c++ (I disagree that c++ is harder then Java.. I miss pointers in Java)... If you want to go browser based, even php can work, based on how intense you want to go. again, without details, advice is limited.

cnoevil
03-02-2012, 05:30 PM
Dennis: Well if you want to make a role playing game I'd say it's very doable in php. But Keleth is right in that everything is complicated in it's own way. There doesn't seem to be any easy "royal road" to writing code. Regardless of which path you choose it will always come down to many layers of complexity and abstraction built one on top of the other. You make a choice, dig in and learn it.

Keleth: I think programming in c++ is more complex in the way you have to compose your files and build your executables. It seems to be that there is a bit more to grasp when it comes to including libraries and working with templates and what not. Java seems simpler to me in that regard. It is more straight forward when you want to access libs like opengl and directx with c++. Breaking loose from the windowing system in java can be a pain unless you use a decent graphics engine where someone else has already took the pain for you.

I agree about the pointers though. I like them and I don't get all hubbub about how unsafe they are, however;it's been so long since I've used pointers that they'd probably be unsafe in my hands at this point.

Mark

Keleth
03-02-2012, 05:38 PM
Heh, fair enough. I can see how the libraries issue becomes a concern at first, but I feel like its more of a hump to get over... once you do, it actually makes coding much easier. But as everyone can see, this is why selecting a language is not easy :p To each their own!

super3
03-02-2012, 05:44 PM
PHP is not really a good language to develop games in, at the moment. You could only really use it for the backend of game development, and you would have to learn HTML, CSS, Javascript(Ajaxy stuff too), and MySQL to get something working properly. You would have to get pretty good at Javascript to due something useful because no one really wants a game were the page refreshes everytime you click something. There are some games written with PHP and Javascript, but I don't recommend you go that route.

If you are looking at something just to get you started I highly suggest python. Here is a link to a little zombie shooter game (http://super3.org/zombie-factory) that I made in about a weekend or two. Want to do some more work on it, but I haven't got around to it. Shows what you can do with Python, and a cool little library for making games called Pygame (http://pygame.org/news.html). There are some awesome tutorials about this online that you can just google.

When I started I knew nothing about Python so its pretty easy to use, and a good language to start with. If you learn Java first you have to understand some of more underlying programming concepts like object oriented programming, which is difficult for someone just starting off.

Best of luck!

surreal5335
03-02-2012, 07:57 PM
for a turn based rpg with multiplayer feature... php is your man. If you want nice graphics incorporate html, css, and javascript, throw in some ajax and your interface will have a more streamlined interface that doesnt need to refresh to talk to php.

I wouldnt do your graphics with php, thats for logic, db managment, etc. Get nice and familiar with mysql, rpgs are long games and require save pointsto be loaded later.

Going web also has another anti-piracy advantage, much harder for others to use your game without your permision, great for subscription models.

I would avoid jquery, fast to build in but slow performance.

Keleth
03-02-2012, 08:01 PM
I would avoid jquery, fast to build in but slow performance.

Slow in performance? I haven't noticed that yet... I run a pen and paper gaming site, has maps, has graphics, the works, and it runs just as well as any other framework I've used, and developing the same stuff in raw JS would add a similar bloat to loading the framework. I'll look into it further, but given jQuery is the most commonly used JS framework, even used on a number of complex sites, while I don't doubt its slower then raw JS written by an expert, but learners or even just experienced dev's, I'd say its a better option. JS is so finicky, even small mistakes add on a lot of time.


Going web also has another anti-piracy advantage, much harder for others to use your game without your permision, great for subscription models.

I would also contend that a web based, namely PHP based, app is more ripe to security issues. PHP isn't the best for security, and experienced hackers can get through code, specially if you're new to the language. In addition, because its a direct serve model, getting files is easy. And since its not compiled, once a file is taken, reading it is just opening it. If you're interested in building something complex, running PHP to display information retrieved from an applet from something like Python is better.

dan-dan
03-02-2012, 08:59 PM
If you're new to coding and wanting to develop games, I would personally go for Java.

You'll get to learn 'object oriented programming' straight away, and it's easier to learn than other OOP languages.

You won't be restricted to the web with your games. You can create web apps, Android apps and stand alone apps.

It won't be easy, but nothing worth having is :)

You don't need to take college classes, though it depends on the type of learning you're most happy with. Get onto Amazon and look at the book reviews, then choose a book that best suits you! Then buy another and another. With any language, there's sooo much to learn! Fortunately there's a lot of resources to help you along the way!

One little hint, if buying books look at the published date. There's no point in learning depricated code haha.

Good luck whatever you do :)

Inigoesdr
03-02-2012, 09:42 PM
I would also contend that a web based, namely PHP based, app is more ripe to security issues. PHP isn't the best for security, and experienced hackers can get through code, specially if you're new to the language. In addition, because its a direct serve model, getting files is easy. And since its not compiled, once a file is taken, reading it is just opening it. If you're interested in building something complex, running PHP to display information retrieved from an applet from something like Python is better.

Poorly written code is always going to be vulnerable to exploits on the web, regardless of the language. Python is no less vulnerable than PHP is depending how how you have either configured, and how careful the coder is. Also, both are scripting languages, so being able to read the PHP code is a spurious comparison. This is an example of why "which language is better" threads are generally counter-productive. Everyone has their own opinions and favorite languages. ;)

Keleth
03-02-2012, 10:12 PM
Fair point... though I thought you could encode/compile Python? Or is that simply a package?

Plus, as I understand it, if you build a server side applet, it wouldn't be visible from the front end? I thought that was one of the key advantages of utilizing Python?

Dennis3979
03-02-2012, 10:48 PM
Well thanks every one this really narrowed it down for me and all be looking into everyone suggestions you guys have been a big help when you didn't have to.

Thanks

Dennis3979
03-06-2012, 11:52 PM
(one last thing) Iv been thinking that it would spreed world much faster if i just upload on facebook in steed of hosting an independent website so can python code be uploaded to facebook?

M.Jackson
03-07-2012, 12:43 AM
I apologize for coming into this late.

I have done some work along these lines, so let me pass along some of what I had to learn.

The relation that you are describing seems to lend itself to being written in a number of languages, not a single language because your game will need to run in two different environments. One of a server and the other on the client ( their web-browser by what you are saying ).

You will likely have to write the basics of your interface in HTML5 with CSS3 and handle client-side logic in Javascript ( or Flash ). Unless you have authority to run programs on your server, you will undoubtedly have to choose from the languages that your provider allows ( best bet is to get the list from your provider and look at some example code of each language listed; whichever one you understand the most is the one you want to go with ). Then, you will need to store your data in either SQL or XML ( there are others, but, again, the options depend on your provider ).

As for Facebook, I have no idea what their requirements are, but I am inclined to believe that you could not go wrong with PHP and SQL for your server-side operations. the client-side is the same no matter what your server is unless you write your own client software.

Anjelina
03-07-2012, 11:07 AM
php is very good web development language but for game development i also want to suggest you either java, python or c++ . these all are good for game development.

M.Jackson
03-07-2012, 05:18 PM
Any programing language is equally capable of developing games with only minor differences between their eventual size and runtime speed. The problem is that the OP is discussing web games, which rules out developing in C++ or any other strictly compiled language without specific server situations. Same with python, perl, cgi, and rails; these are all contingent on your server offering support.

This is the problem with "which language" threads. The answer is generally: what languages are in your environment and, of those, which one are you best with?

Dennis3979
03-14-2012, 01:08 AM
Thank you to every one but iv come to a road block. Im having trouble finding a very detailed tutorial on the basics. Any books, text tut, and videos would help.

Inigoesdr
03-14-2012, 03:58 PM
See the resources sticky (http://www.codingforums.com/showthread.php?t=104161).

Dennis3979
03-15-2012, 10:03 AM
See the resources sticky (http://www.codingforums.com/showthread.php?t=104161).

Sorry if i sound like a noob or what ever... but is php like python or something?
im thats what im trying to learn.

Keleth
03-15-2012, 04:17 PM
Not sure what you mean by "like"... most programming languages are "like" each other... in the end, a good programmer is one who understands the logic behind code, then just applies a language. Its not good to "learn php"... instead, you should learn coding through PHP... the logic that applies to one language applies to most others, just the syntax changes.

So yes, PHP is like Python in that the logic that applies to either is the same... but its different in syntax, style, development methodology.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum