Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

C# & OpenGL

Options
  • 22-11-2005 6:02pm
    #1
    Registered Users Posts: 4,037 ✭✭✭


    I'm doing a C# game using OpenGL but I'm a complete newcomer to both.
    There are lots of good tutorials on th web but can anyone recommend a good book on the subject?
    Just a few basics on things like collision detection, AI, movement, texturing etc.
    Any help would be greatly appreciated.


Comments

  • Registered Users Posts: 1,481 ✭✭✭satchmo


    GameDev.net has a good section on books with reviews and such, would be a good place to start. I doubt you're gonna find many books on C# and OpenGL though, most people use it with C++ - you're better off going with the online tutorials for that.


  • Registered Users Posts: 4,037 ✭✭✭lukin


    Thanks satchmo, there are some good tutorials on that site here: http://www.gamedev.net/reference/list.asp?categoryid=31#217
    I can't d'load a hard copy of them and take them away though.
    Pity.


  • Closed Accounts Posts: 17,208 ✭✭✭✭aidan_walsh


    lukin wrote:
    Thanks satchmo, there are some good tutorials on that site here: http://www.gamedev.net/reference/list.asp?categoryid=31#217
    I can't d'load a hard copy of them and take them away though.
    Pity.
    Print them?


  • Registered Users Posts: 1,272 ✭✭✭i_am_dogboy


    How big is the game and how long have you got to work on it? Since you are using C# you could use managed direct 3d, it's nice and easy to learn and it's got loads of functionality built in, personally I prefer OpenGL but managed D3D is in my opinion a better opinion if you are just starting off. I haven't used OpenGL in C# yet but usually it's easy enough to follow tutorials in one language and apply it in another.

    Did you look on the sharpgl web site? That's the only C# OpenGL binding I know of, surely they have at least some basic tutorials on their site.

    As far as the collision detection, AI and mechanics are concerned you're not going to find many C# tutorials on them, but I'd say there's plenty of people with source willing to help out there. Have a look at the .net section in the gamedev forums.

    www.gamasutra.com is a good site for general game related articles/tuorials etc. www.flipcode.com and www.thezbuffer.com both have a good amount of .net stuff on them.


  • Registered Users Posts: 4,037 ✭✭✭lukin


    How big is the game and how long have you got to work on it? Since you are using C# you could use managed direct 3d, it's nice and easy to learn and it's got loads of functionality built in, personally I prefer OpenGL but managed D3D is in my opinion a better opinion if you are just starting off. I haven't used OpenGL in C# yet but usually it's easy enough to follow tutorials in one language and apply it in another.

    Did you look on the sharpgl web site? That's the only C# OpenGL binding I know of, surely they have at least some basic tutorials on their site.

    As far as the collision detection, AI and mechanics are concerned you're not going to find many C# tutorials on them, but I'd say there's plenty of people with source willing to help out there. Have a look at the .net section in the gamedev forums.

    www.gamasutra.com is a good site for general game related articles/tuorials etc. www.flipcode.com and www.thezbuffer.com both have a good amount of .net stuff on them.

    It's got to be done in OpenGL I'm afraid (college project).
    I'll have a look at those links, thanks.


  • Advertisement
  • Registered Users Posts: 4,037 ✭✭✭lukin


    www.gamasutra.com is a good site for general game related articles/tuorials etc. www.flipcode.com and www.thezbuffer.com both have a good amount of .net stuff on them.

    Flipcode is shut down, thezbuffer is all DirectX stuff, gamasutra is mostly news on the game industry.


  • Registered Users Posts: 1,481 ✭✭✭satchmo


    The articles are still up on Flipcode, but they're not much use to a beginner. There's some good general GL tutorials here at Concordia university, and if you're using GLUT I reckon the lighthouse 3D tutorials are the best. (If you prefer SDL, check out SDL.NET).

    Most of these will be aimed at C++, but it shouldn't be too much bother to port them to C# - at a guess I'd say the OpenGL stuff should be the same, just the windowing/interface stuff will be different.


  • Registered Users Posts: 4,037 ✭✭✭lukin


    satchmo wrote:
    Most of these will be aimed at C++, but it shouldn't be too much bother to port them to C# - at a guess I'd say the OpenGL stuff should be the same, just the windowing/interface stuff will be different.

    Is there a way you can change C++ code to C# in .NET? Some sort of command to convert it at the click of a mouse? Unlikely I suppose.


  • Registered Users Posts: 1,481 ✭✭✭satchmo


    Very unlikely. Some of the NeHe tutorials (as well as the bascode on the front page) have C# ports, you can probably work it out by comparing the two.


  • Registered Users Posts: 4,037 ✭✭✭lukin


    Thought so. I know you can convert java code to C#. I might try that.


  • Advertisement
  • Registered Users Posts: 1,272 ✭✭✭i_am_dogboy


    lukin wrote:
    Flipcode is shut down, thezbuffer is all DirectX stuff, gamasutra is mostly news on the game industry.
    Anything useful on gamasutra is in the features section, there are some really good articles on collision detection and AI, I think most of the are linked from the articles section on gamedev.net.

    Most of the opengl code will be almost exactly the same in java as in C#, the only differences being GUI stuff and data structures in some cases. It'll be easier to convert from C++ than java I would think, seeing how C++ and C# support pointers directly and they pretty heavily in opengl, whereas in java you'll see loads of floatbuffers, intbuffers and other things that you won't necessarily have in C#.

    You doing the games course in carlow by any chance?


Advertisement