#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2007
    Posts
    2
    Rep Power
    0

    Choosing the right language


    I'm about rookie in programming, made a few small projects of games and programs, mostly Visual Basic and a tiny bit of Java.
    I think programming is really fun, and now I want to make a game that can be played in browser, and with graphics. This is alot of new things to me, never programmed anything for browser and never programmed any mentionable with graphics.
    As for the game I want to make, I haven't really thought much about it yet, Im thinking of just starting small and expanding the game with time. I tend to start several projects that I never finish, so I dont want to ask for too much of myself;p

    My question: What programming language do you think I should get into to make the game? The only language I know is usable for it is Javascript, but surely there must be more alternatives?
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2004
    Posts
    175
    Rep Power
    20
    JavaScript is just client side so you can't use that. You could use java with jsp or servlets. However after having quite a few java servlet projects I prefer using C# and ASP.NET to develop interactive websites, its just sooooo easy especially if you are using Visual Studio. You could even code it in VB with ASP.NET.

    I presume you will be storing data in a database which is easy you will have to learn about setting up a database and some SQL to get the information you want from it, its not difficult a quick google will easily find all the information you need.
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2007
    Posts
    2
    Rep Power
    0
    Thanks for the tip, I'll try it out
  6. #4
  7. Advanced Programmer
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2004
    Location
    Malaysia
    Posts
    452
    Rep Power
    42
    If your going to write a game, I always recommend C/C++ because of the number of API's and techniques that you can use. Whilst C# may be easier to pickup and learn, I find C++ less restrictive and easier to use when dealing with OpenGL or DirectX.

    Writing a game is easy. The hardest aspect of game development is designing the game itself.
    "Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms, munching magic pills and listening to repetitive electronic music."
    - Kristin Wilson, Nintendo, Inc., 1989.
  8. #5
  9. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2004
    Posts
    175
    Rep Power
    20
    Originally Posted by Andrew80
    If your going to write a game, I always recommend C/C++ because of the number of API's and techniques that you can use. Whilst C# may be easier to pickup and learn, I find C++ less restrictive and easier to use when dealing with OpenGL or DirectX.

    Writing a game is easy. The hardest aspect of game development is designing the game itself.
    i agree, but coding a web browser game in c/c++ will be quite complex when compared to coding it in c#/vb and asp.net.
  10. #6
  11. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2007
    Location
    Concord, California
    Posts
    20
    Rep Power
    0
    I used to do game programming with VB all the time. I started with GDI, then moved onto BitBlt API, then I used DirectDraw. If you're still using VB6, maybe it's a good time to learn a new language.

    Games running under web browsers. Hmm... Did you try publishing your game as an ActiveX form, so browser can run it as a form of ActiveX? It's just like designing VB games with forms, except there is one flat plane. So, try that.

    The performance has been always a big issue with VB6, they're just so slow and VB6 Runtime Library should accompany the Executable files everywhere they go(For Win98 and some other older OS.) If you will be doing some serious game programming, I strongly suggest using C++ as your language. SDL Library is extremely easy to use if you have some experience with DDRAW and understand how surfaces work(I don't think they flip surfaces in SDL tho.) Hope this helped.
  12. #7
  13. Contributing User
    Devshed Beginner (1000 - 1499 posts)

    Join Date
    Jun 2004
    Location
    Switzerland
    Posts
    1,152
    Rep Power
    1902
    As Thoku pointed out you'll need a server side language to implement the game logic. I suggest you take a look at php. It's a C-like language and quite easy to learn. It has tons of librarys for various things like object oriented database access and dynamic image generation and also comes with a very simple-to-use way to access mysql databases.

    Java-Servlets or JSP's are and ASP stuff are also some alternatives but so far I have found PHP to be the easiest option especially on small projects.

    You should only use Javascript for improving the handling of your pages on the user side. But as it is executed clientside i wouldn't trust it with anything really important...
    - Hugh of Borg

    The first thing young borg are taught: Keep away from Microsoft software!
  14. #8
  15. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2004
    Posts
    175
    Rep Power
    20
    Originally Posted by Hugh of Borg
    As Thoku pointed out you'll need a server side language to implement the game logic. I suggest you take a look at php. It's a C-like language and quite easy to learn. It has tons of librarys for various things like object oriented database access and dynamic image generation and also comes with a very simple-to-use way to access mysql databases.

    Java-Servlets or JSP's are and ASP stuff are also some alternatives but so far I have found PHP to be the easiest option especially on small projects.

    You should only use Javascript for improving the handling of your pages on the user side. But as it is executed clientside i wouldn't trust it with anything really important...
    the reason I didn't suggest php is because its much harder to add things like AJAX and moving into OOP languages is harder when you're first language has not been OOP. If that makes sense.

    p.s. I know you can develop OO PHP aplications its just a little fiddly when compared to using a full OO language like C# or Java.
  16. #9
  17. Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Feb 2006
    Location
    True
    Posts
    873
    Rep Power
    106
    I dont see why nobody here mentioned them yet, but you should learn Java and Java applets. They are preety easy, imo, to develop graphics for them and they work well in the browsers.
  18. #10
  19. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2005
    Location
    Romeoville, IL
    Posts
    129
    Rep Power
    14

    Question


    Originally Posted by Thoku
    the reason I didn't suggest php is because its much harder to add things like AJAX and moving into OOP languages is harder when you're first language has not been OOP. If that makes sense.

    p.s. I know you can develop OO PHP aplications its just a little fiddly when compared to using a full OO language like C# or Java.
    Hello,

    I've been browsing the "beginner game-making" threads, because, for some time, I've had an idea for a simple game I'd like to program to practice my programming skills. My main objective for my visit to DevShed today is to determine what language to write the game in.

    I would prefer PHP, as I have some basic knowledge of it, (PHP 4) but I found your recommendation to not use PHP interesting.

    In what ways is OOP "fiddly" in PHP? I've read that PHP 5 is more OO that its predecessors. I'd like to learn OOP. The concept of breaking a program into manageable chunks makes a lot of sense to me.

    I've also have tried to use the graphic functions in PHP 4 (on a different project, just to resize a graphic) and was totally confused, and had to resort to just using HTML to size the graphic (terrible, I know, but I had a deadline).

    I was wondering if PHP would be appropriate for my game, or if I should take a look at Java or some other language.

    The game I'd like to create is an online browser-based "Memory" game (you know that game we all played as kids, with the little tiles with pictures on one side, and pretty much blank on the other - the point of the game being to flip over two tiles and try to match pairs of pictures).

    I'm curious to hear people's opinions on if I should stay with PHP to create this game, or if this type of game is more suited to Java and go that route.

    Flash is out of the question, as it's so expensive, and I know a lot of people block Flash, or get irritated when a site is all "flashed out" (myself included! )

    I do have some programming experience, in C, Visual Basic 6, PHP 4 (as mentioned above), and SQL.

    Thanks in advance for your replies!

    ~*Miaow*~
  20. #11
  21. Contributing User
    Devshed Beginner (1000 - 1499 posts)

    Join Date
    Jun 2004
    Location
    Switzerland
    Posts
    1,152
    Rep Power
    1902
    Hi Miaow

    I like your idea of a browser based memory game. I think it's an adequate game for a first try.

    I recommend you go with PHP, especially since you already know it. You could of course do it with ASP, ASPX or JSP. But when trying new things it's best to stick with tools you already know...

    OOP in PHP is 'fiddly' in a sense that PHP started out as a strictly procedural language. All the OOP functionality and concepts were included later. Because of that OOP is less clean and elegant in PHP than it is in languages specially designed for OOP. Don't let that discourage you. It works just fine.

    But if you are new to OOP I suggest you choose another language to learn it (like Java for example) and stick with procedural programming for your first web game. When you got the hang of the web programming and have learned oop you can still start combining the two...

    Comments on this post

    • Miaow agrees : Thank you so much for yor input! :)
    - Hugh of Borg

    The first thing young borg are taught: Keep away from Microsoft software!
  22. #12
  23. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2007
    Posts
    8
    Rep Power
    0
    I would recommand Java. PHP is not bad - but I think type-unsafe and scripting languages very bad for learning as the first language. Simply because you may divise some ugly coding techniques (I'm not saying it's your case!). Generaly less strict the language is, more spaghetti code you may write.

    For instance ... a weird 3D array in PHP can be accessed like this
    $GLOBALS["myArray_".$x."_".$y."_".$z] ... and then you may read every field as a standalone variable (don't know why would anybody do that, but it's possible).

    At least Java forces you to organize your code into packages + have one class per file. So you have to think about what the class is doing and where you should put it.
  24. #13
  25. Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Feb 2006
    Location
    True
    Posts
    873
    Rep Power
    106
    I reccomend Java, which is NOT javascript, I think thats where you got confused and why some people answering the question may have gotten confused.

    Use Java and create an Applet, its perfect for playing games in a browser and using graphics..
  26. #14
  27. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2008
    Posts
    7
    Rep Power
    0
    I would advise you not to be too bothered about a language but focus on learning an API/technique. For instance if you learn OpenGL you can easily convert your code between C/c++, java (using JOGL or LWJGL) or Pyton, ruby etc as the "graphics" side of the code comprises of the same API calls.

    Problem with focusing on a particular language is that the code you wrote in Java for graphics (e.g. using Java 2d/3d) would be very different from your corresponding C++ game.
  28. #15
  29. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2008
    Posts
    25
    Rep Power
    0
    You can do *everything* with C ans ASM
    OS are done in C and ASM

IMN logo majestic logo threadwatch logo seochat tools logo