Results 1 to 29 of 29

Thread: [RESOLVED] Deciding on a language and library

  1. #1

    Thread Starter
    Hyperactive Member metalmidget's Avatar
    Join Date
    Mar 2007
    Location
    Melbourne, Australia
    Posts
    342

    Resolved [RESOLVED] Deciding on a language and library

    OK, so there are a million threads on this already, and I've read most of them, but I was after some advice for a specific project I'll be starting after I've finished exams, and my current game.
    I'm going to make a clone of an awesome old game I used to play in primary school- The Incredible Machine. You might have played it, it's basically a puzzle-based Rube Goldberg type game. I'm planning to write the engine and make a prototype level, and get that working. Then I'll create a level editor to make it easy and fast to make lots of levels, and probably release that with the game so people can make their own levels if they want. Understand that I realise this is a big project, and I'm way off even beginning anything that will be in the actual game, as the next paragraph will reveal.

    Anyway, I'm not sure what language to go with for this. At the moment I'm considering VB.net, C#, or C++, none of which I know. Yeah, I realise I should know the language before I try to make a brilliant game, which is why I want to be sure about the language before I start learning it and ultimately make a game.

    So from all the reading I've been doing, here is how I see it in terms of pros and cons:
    VB.net
    Pros
    It's similar to VB6, which I'm reasonable at, so it's easiest at this stage.
    It's the focus of this forum.
    The syntax is easiest, with words rather than symbols.
    Cons
    It's not as fast as C++.
    It's not what the pros use.
    It's not something I see myself using long-term: The mechatronics engineering/computer science course I start at uni next year focuses on C at first, then moves on to C++ in later years(it's a 5 year double degree). I have no way of knowing what I'll use long, long term though.

    C#
    Pros
    It's closer to what I'll have to use next year (C).
    As far as I'm aware, it's more prevalent in games programming.
    Cons
    I'd have to learn it from scratch.
    It's not as fast as C++
    If I'm going to learn a new language which is C-derived, I may as well go C++

    For both VB.net or C#, I'm not sure whether having to use managed DirectX (if that's what I decide on) would be a Pro or a Con. Advice?

    C++
    Pros
    It's closest to what I'll use next year (C).
    It's very fast.
    It's what the pros use.
    Cons
    I'd need considerable effort in learning it before I could make a game
    The syntax is harder, although I'm sure I could pick it up without too much difficulty.

    Wow, this post is getting long.
    I also need to decide on a graphics library. From what I've read, they are both just as good as each other in terms of performance, and it's really a matter of preference in most cases. Again, I've never used either, so this is something I'll have to learn before I actually start the game. This is how I see it at the moment. (Oh and this is 2D by the way)

    DirectX
    Pros
    It includes everything I'll need- user input, sound etc. Not just graphics.
    It's more OO.
    MSDN.
    Cons
    Harder to learn?
    No portability.

    OpenGL
    Pros
    Portability.
    Easier to learn?
    Good documentation- coloured books.
    I'm told it works well with any language.
    Cons
    Would need extra add ins for things other than graphics.
    Not as OO, although I don't think it's a huge issue.

    Right, well anyone who's still reading must be insane or determined.
    Basically I'm after 2 things:
    Any specific advice as to what would be the best choices for what I'm going to attempt to make.
    An indication of whether what I've written for each language and library is accurate, or if I've been misled.

  2. #2
    Frenzied Member
    Join Date
    Mar 2006
    Location
    Pennsylvania
    Posts
    1,069

    Re: Deciding on a language and library

    Right, well anyone who's still reading must be insane or determined.
    Basically I'm after 2 things:
    Any specific advice as to what would be the best choices for what I'm going to attempt to make.
    An indication of whether what I've written for each language and library is accurate, or if I've been misled.
    Wasn't that long. Read it all in less than a minute

    I've never tried OpenGL before but DirectX seems to be more.. used.. and since it's by Microsoft, you can easily find documentation on it via msdn and it may be easier to learn because of that. Also, the cool thing about DirectX is that you don't need to actually learn it. The only thing you have to know is how to initialize a device and render which is like 10 ~ 20 lines of code. Everything else you would learn completely depends on what type of project you are doing.

    Please, please, don't use VB .Net with DirectX. Visual Basic .Net is such a high leveled language and all of the online examples are in C++ and C# anyways. It would be such a pain converting all online examples to visual basic .net. Also, when showing it to other people, they're going to be like, "lol why'd you make it in vb .net"

    Personally, I know both C# and C++. They are both GREAT for making games. The fact that they are object oriented greatly helps when developing projects with DirectX.

    Which to choose, though? Well, a game is a serious test of your limits and skills. It puts all of you skills and talents into test. Personally, I would go with the language you know better. If you know C, then go with C++. If you know lots of VB .Net or VB6, go with C#. Basically, use whichever one you know better. If you know neither, go with C# because there isn't as much pointer hell and stuff like that. When games get to thousands upon thousands of lines of code, all of those pointers, reference types, object disposing, etc. can get pretty confusing and unless you are extremely experienced, it'll probably crash. That being the case, just avoid it! C# takes care of all of this garbage collection, there aren't really any pointers, and everything is pre-defined to being either a direct type or indirect type so that really eliminates that aspect.

    So, all in all, I would go with C# if you don't know either. Or, if you know VB6.

    However, if you know C very well and are familiar with the idea of pointers and feel as if you can handle it, go with C++

  3. #3
    G&G Moderator chemicalNova's Avatar
    Join Date
    Jun 2002
    Location
    Victoria, Australia
    Posts
    4,246

    Re: Deciding on a language and library

    I prefer OpenGL but thats just me..

    Portability is one of the top things on my list (aswell as not being owned by Microsoft). "Add-ons" for a game using OpenGL aren't hard.. OpenAL is a good audio library.. theres GLAUX, etc.

    Its a big ask to write a game engine. Personally, for a project that won't need tweaking left-right-and-center.. I'd just download Irrlicht or CrystalSpace.

    Thats not to say.. writing your own engine isn't good experience.. its just one hell of a learning curve.

    I'd start with DirectX and C#.. then move your way up to other languages and libraries.

    chem

    Visual Studio 6, Visual Studio.NET 2005, MASM

  4. #4

    Thread Starter
    Hyperactive Member metalmidget's Avatar
    Join Date
    Mar 2007
    Location
    Melbourne, Australia
    Posts
    342

    Re: Deciding on a language and library

    So it looks like C# and DirectX are a good option. I have one concern with C# though- isn't there some rule in the EULA about microsoft owning anything you write in C#? I've heard various people allude to it but, but never heard anyone actually explain it. What's the deal with that?
    metal

  5. #5
    G&G Moderator chemicalNova's Avatar
    Join Date
    Jun 2002
    Location
    Victoria, Australia
    Posts
    4,246

    Re: Deciding on a language and library

    Thats actually when you use XNA. The XNA framework EULA has something with regards to any distribution of any game you write is owned by Microsoft. XNA also makes you distribute the source code (to xbox360 or PC), unless you pay some obscene amount.

    That is how it was when it first came out. Whether its changed or not I'm not sure.

    As long as you use C# and DirectX (not the XNA wrapper classes for DirectX), then you're in the clear.

    chem

    Visual Studio 6, Visual Studio.NET 2005, MASM

  6. #6
    PowerPoster
    Join Date
    Dec 2003
    Posts
    4,787

    Re: Deciding on a language and library

    To be fair, if Microsoft are releasing the technology they use to write games for the xbox etc I'd expect them to make you pay to keep the code. You've only got to look at the cost of a PS2 compiler 9not sure about the ps3) but its a hell of a lot of money. i think Microsoft have made a good move opening up and releasing XNA.

    Just my 2 cents.

    As for the post c#/Direct x will teach you allot and the stuff you ill learn you can port to c++ if you need to... eventually

  7. #7

    Thread Starter
    Hyperactive Member metalmidget's Avatar
    Join Date
    Mar 2007
    Location
    Melbourne, Australia
    Posts
    342

    Re: Deciding on a language and library

    Ahh, so it's XNA. That's alright then. I guess if it's only for XNA it's not so unreasonable. When professional game studios make a game for a certain console they have to pay to get all the dev tools and such, don't they? Difference is, when the game's finished they make back this money many times over (in theory).
    Besides, being able to use XNA to make open source stuff has got to be better than it being locked up for microsoft's eyes only.
    K, well it looks like C# and DirectX is the way to go. Time to go do some downloading methinks.
    Thanks again fellas.
    metal

  8. #8
    G&G Moderator chemicalNova's Avatar
    Join Date
    Jun 2002
    Location
    Victoria, Australia
    Posts
    4,246

    Re: Deciding on a language and library

    Quote Originally Posted by Pino
    To be fair, if Microsoft are releasing the technology they use to write games for the xbox etc I'd expect them to make you pay to keep the code. You've only got to look at the cost of a PS2 compiler 9not sure about the ps3) but its a hell of a lot of money. i think Microsoft have made a good move opening up and releasing XNA.

    Just my 2 cents.

    As for the post c#/Direct x will teach you allot and the stuff you ill learn you can port to c++ if you need to... eventually
    My school has all of the PS2 headers and such. They are the ugliest looking header files you'll ever see.

    They are also like $10,000 to purchase.

    chem

    Visual Studio 6, Visual Studio.NET 2005, MASM

  9. #9
    Interweb adm/o/distrator Paul M's Avatar
    Join Date
    Nov 2006
    Location
    Australia, Melbourne
    Posts
    2,306

    Re: Deciding on a language and library

    C++/OpenGL!

    It is an awesome combo, but from what i know OpenGL isn't used much in games development anymore since the new releases of DirectX. But XNA is really good, stick with that for now there is a lot of documentation and starter kits to help you get off the ground

  10. #10
    PowerPoster
    Join Date
    Dec 2003
    Posts
    4,787

    Re: Deciding on a language and library

    Quote Originally Posted by chemicalNova
    My school has all of the PS2 headers and such. They are the ugliest looking header files you'll ever see.

    They are also like $10,000 to purchase.

    chem
    I've heard some very bad reviews about Sonys development tools in general. Microsoft seem to be leading the way on that front.

    Pino

  11. #11
    G&G Moderator chemicalNova's Avatar
    Join Date
    Jun 2002
    Location
    Victoria, Australia
    Posts
    4,246

    Re: Deciding on a language and library

    Quote Originally Posted by Pino
    I've heard some very bad reviews about Sonys development tools in general. Microsoft seem to be leading the way on that front.

    Pino
    This is true. My tutor tells us all the time how horrible programming for the PS2 was.. just, everything about it apparently had 10 more steps than were required.

    chem

    Visual Studio 6, Visual Studio.NET 2005, MASM

  12. #12

    Thread Starter
    Hyperactive Member metalmidget's Avatar
    Join Date
    Mar 2007
    Location
    Melbourne, Australia
    Posts
    342

    Re: [RESOLVED] Deciding on a language and library

    Hate to bust in on your conversation, but I have another question. What version of DirectX would you recommend I use? From what I understand using 10 would only make it so that my game won't work on anything but Vista with the latest graphics card. So how far back should I go? 9? 8? Are the version numbers different for managed directX? Sorry, I really have no idea about the version history, I've paid no attention to DirectX until now.
    Oh and seeing as this is only a 2D game, should I use D3D and just draw everything to the same Z value? Or should I be using something different to D3D to do 2D stuff?

  13. #13
    Frenzied Member
    Join Date
    Mar 2006
    Location
    Pennsylvania
    Posts
    1,069

    Re: [RESOLVED] Deciding on a language and library

    Do you have access to a vista computer? Do you only have XP? Only have vista? It kind of depends..

    DX 9 works on XP and Vista and DX 10 is just vista. That being the case, I'd go with DX 9. However, Vista is going to be the future (?) so it may be beneficial starting with DX 10. However, many people still have XP, and that being the case, if you want to send your game to friends and family, you're going to either have to buy them all a new laptop for christmas or program in DX 9.

    Also, DX 9 has a lot of documentation and most games right now are being written in DX 9. Give it a couple years or several years, and it may become DX 10, but for the next couple years, I'd use DX 9.


    Also, just use Direct3D. It's simple, really. You draw everyone onto the same z component; i use 0. I'm recreating Pong right now and I am using D3D. It's quite simple, really. I just use Textures to import my graphics and sprites to draw the texture onto the screen. When I eventually (if) finish Pong, I'll be sure to post the source code. So far, I am very pleased with how it's going. Hopefully the same will be in your case.

    Feel free to post again if you need more help.

  14. #14

    Thread Starter
    Hyperactive Member metalmidget's Avatar
    Join Date
    Mar 2007
    Location
    Melbourne, Australia
    Posts
    342

    Re: [RESOLVED] Deciding on a language and library

    OK so if I'm using DX9 with C#, do I have to use managed directX? Or is managed directX an alternative that you can use on .net if you want to?
    Also, hasn't MS discontinued support for managed DX in favour of XNA, which I don't really want to use?

  15. #15
    Frenzied Member
    Join Date
    Mar 2006
    Location
    Pennsylvania
    Posts
    1,069

    Re: [RESOLVED] Deciding on a language and library

    I got to go so I'll make this one quick.

    Yea, you've got to use managed DirectX. You're using the framework so it would only make sense to do so. I don't know if there is a way to not use it though, but you shouldn't anyways.

    Ehhh, even Microsoft did, they've put enough work into it whereas you don't need any more support from them anyways. I've heard some rumors that the DirectX team broke up and now there is only a XNA team but that may be false. Either way, it's all documentated already so screw them. Also, this means everyone is going to be using the same SDK and version and there will be less confusion when releasing source code, I hope!

  16. #16
    type Woss is new Grumpy; wossname's Avatar
    Join Date
    Aug 2002
    Location
    #!/bin/bash
    Posts
    5,682

    Re: [RESOLVED] Deciding on a language and library

    You should also consider SDL if you are only doing 2D games.

  17. #17
    G&G Moderator chemicalNova's Avatar
    Join Date
    Jun 2002
    Location
    Victoria, Australia
    Posts
    4,246

    Re: [RESOLVED] Deciding on a language and library

    Quote Originally Posted by wossname
    You should also consider SDL if you are only doing 2D games.
    ..which is a ******* to set up properly

    chem

    Visual Studio 6, Visual Studio.NET 2005, MASM

  18. #18

    Thread Starter
    Hyperactive Member metalmidget's Avatar
    Join Date
    Mar 2007
    Location
    Melbourne, Australia
    Posts
    342

    Re: [RESOLVED] Deciding on a language and library

    OK, so I've been having a look round the gamedev forums, and come across SlimDX, which is an open source thing being written by volunteers to replace MDX. I think they're basically just trying to provide something that isn't XNA, to be a longer term solution to replace MDX, seeing as it isn't going to be updated anymore. They have a wiki if you want to read about it.
    Has anyone here worked with it? Or can anyone give some advice about this? From what I've been told it's extremely similar to MDX, with the benefit of not having been deprecated. People on gamedev have said that pretty much all of the MDX samples found online could be easily applied to SlimDX, so learning it shouldn't be a problem.
    Thoughts?
    Cheers,
    metal
    Last edited by metalmidget; Nov 13th, 2007 at 01:16 AM. Reason: Added link to wiki

  19. #19
    Frenzied Member
    Join Date
    Mar 2006
    Location
    Pennsylvania
    Posts
    1,069

    Re: [RESOLVED] Deciding on a language and library

    I've always found open source libraries a bit .. well, nevermind. But really, I have been using Direct3D to re-create Pong and it is going along great! Really, Direct3D is really simple so set up. Just add the references to your project and import their namespace and then just start using. It's quite simple. Perhaps you should try out DirectX first? I'm sure you wouldn't regret it.

  20. #20

    Thread Starter
    Hyperactive Member metalmidget's Avatar
    Join Date
    Mar 2007
    Location
    Melbourne, Australia
    Posts
    342

    Re: [RESOLVED] Deciding on a language and library

    I think you've misunderstood me. SlimDX isn't a whole new library like opengl or anything. It's wrapper classes for DirectX, just like MDX. The only real difference (from what I'm told) is that development and support is going to continue on into the future, for DX10 and beyond, unlike MDX which will phase out as MS abandons and drops support for it, and as it becomes obselete. It's for people who use .Net (C#, really), who are looking to leave MDX, seeing as it's deprecated, but wanting to stay with DX, but not wanting to use XNA. To quote a book, "I trust I make myself obscure?" (Now you say "Perfectly.")
    metal
    PS- I just reread my post, and I can see how you thought what you did. My bad.

  21. #21
    Frenzied Member
    Join Date
    Mar 2006
    Location
    Pennsylvania
    Posts
    1,069

    Re: [RESOLVED] Deciding on a language and library

    Oh, alright. Sounds cool. When working with Direct3D, I enjoy writing my own wrappers for my game, or any library for that matter. And that being the case, if I started out using a wrapper of a library as my base and continued to wrap around that, I think that I would have more abstraction than necessary. However, if it works for you, go right ahead =)

  22. #22

    Thread Starter
    Hyperactive Member metalmidget's Avatar
    Join Date
    Mar 2007
    Location
    Melbourne, Australia
    Posts
    342

    Re: [RESOLVED] Deciding on a language and library

    I wouldn't have a clue how to write my own wrapper classes, that sort of thing is a fair way off yet, I think. So yeah, I'm still tossing up over whether to use SlimDX, or to bite the bullet and learn C++. It's a language I'll have to learn one day anyway, and the extra time required to learn it before I can get into my game doesn't really bother me. I enjoy a language for its own sake. I've found a whole book online that seems really good from the bits I've "flicked through" if that's possible on a computer. It's on Amazon for $27 I think, and gamedev.net used it for one of their workshops, so it must be alright!
    C++ will probably be hard, but it'll be worth the effort, and I'll enjoy the challenge, methinks.
    Cheers,
    metal

  23. #23
    Frenzied Member
    Join Date
    Mar 2006
    Location
    Pennsylvania
    Posts
    1,069

    Re: [RESOLVED] Deciding on a language and library

    I learned a bit of C++. I hated it. That's not saying you will hate it as well though.

    I mean, the language itself is fast and you can do anything, yes anything, in it. However, I am a perfectionist and the code I write in C++ just looks disgusting. All of these pointers, no syntax highlighting, sloppy looking code whether it is written well or otherwise, etc.

    When I write code in C#, it looks pretty It actually looks efficient and well done. However, if I try to write it in C++, it just looks like a piece of junk. If you are writing a game, C++ would probably be ideal, but C# is just as good =)

    I know everything I'm saying right now sounds stupid, but when you're writing a 1,000+ line code game and you have all of these blocks of code that look like crap and are riddled with triple pointers to a character array to an integer casted as a blah blah blah! It's too much! My small, underdeveloped brain cannot handle such. That's not to say some can, however.

    I have almost finished my Pong game and I am very pleased with it. I wrote it in C# 2005 using Direct3D and I am really proud of it. I remember trying to start it off in C++ but it just didn't feel right. I couldn't imagine myself managing 15 classes within one project in C++. All of the pointers, bad syntax (opinion), and just the way things are programmed in C++. I just prefer C#'s way of doing such.

    I'm just sharing some experiences with you. I really do encourage you to learn C++; at least a bit of it. However, I urge you farther to program your game in a language you are most comfortable with. And with that, I'm off to bed.

  24. #24

    Thread Starter
    Hyperactive Member metalmidget's Avatar
    Join Date
    Mar 2007
    Location
    Melbourne, Australia
    Posts
    342

    Re: [RESOLVED] Deciding on a language and library

    Yeah, I see what you mean, but I've had exactly the opposite reaction. I've just done little bits of it and I'm loving it. It's not as easy to pick up, as say, VB6, but so far that's only because everything is symbolic instead of words. I can't wait to finish exams and really get deep into the language, and then we'll see if I still like it or not... Oh and
    Quote Originally Posted by Fromethius
    ... no syntax highlighting, ...
    What? I'm seeing syntax highlighting right in front of me... Maybe it's just not to the same extent as C#. Besides, that's the IDE, not the language.
    Cheers,
    metal

  25. #25
    G&G Moderator chemicalNova's Avatar
    Join Date
    Jun 2002
    Location
    Victoria, Australia
    Posts
    4,246

    Re: [RESOLVED] Deciding on a language and library

    You think your game would have more classes in C++ than in C#? LOL!

    Your main execution point is within an object in C#...

    chem

    Visual Studio 6, Visual Studio.NET 2005, MASM

  26. #26

    Thread Starter
    Hyperactive Member metalmidget's Avatar
    Join Date
    Mar 2007
    Location
    Melbourne, Australia
    Posts
    342

    Re: [RESOLVED] Deciding on a language and library

    I think his point wasn't that there would be more classes to manage in C++, but that it's harder to manage them. That's how I read it, anyway.

  27. #27
    Frenzied Member
    Join Date
    Mar 2006
    Location
    Pennsylvania
    Posts
    1,069

    Re: [RESOLVED] Deciding on a language and library

    Yes, exactly. Thank you

    And about the syntax highlighting. Usually when I program in unmanaged C++, which is what you're doing, no; if not, you can pretty much disregard all of what I've just said. But anyways, when I program in unmanaged C++, there isn't really much of it. Also, the intellisense never really shows up, and bleh, it's not very fun to program in. Anyways, gotta go to school now. C ya

  28. #28
    G&G Moderator chemicalNova's Avatar
    Join Date
    Jun 2002
    Location
    Victoria, Australia
    Posts
    4,246

    Re: [RESOLVED] Deciding on a language and library

    Quote Originally Posted by Fromethius
    Yes, exactly. Thank you

    And about the syntax highlighting. Usually when I program in unmanaged C++, which is what you're doing, no; if not, you can pretty much disregard all of what I've just said. But anyways, when I program in unmanaged C++, there isn't really much of it. Also, the intellisense never really shows up, and bleh, it's not very fun to program in. Anyways, gotta go to school now. C ya
    Heaps of things can fix that.. using a better IDE for one..

    chem

    Visual Studio 6, Visual Studio.NET 2005, MASM

  29. #29

    Thread Starter
    Hyperactive Member metalmidget's Avatar
    Join Date
    Mar 2007
    Location
    Melbourne, Australia
    Posts
    342

    Re: [RESOLVED] Deciding on a language and library

    Quote Originally Posted by Fromethius
    Also, the intellisense never really shows up...
    By far the most important thing I've learned from these forums came from the VB.net tips section:
    Pressing ctrl-space forces the intellisense to pop up no matter you're typing, even if you haven't even started yet! It's brilliant. Like the tip says, it's great for long variable names, or long form names, and a whole bunch of other times.
    metal

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width