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
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

Graphics Programming

  • 10-06-2003 7:30pm
    #1
    Closed Accounts Posts: 390 ✭✭


    I am currently thinking about doing a game for my 4th year project in college next year and now I am starting some of the ground work. I am trying to get through some of the stuff in the FAQ section based on graphics etc. Anyway that aside, what I want to knowis whether I should focus on DirectX or OpenGL, does it matter which i use/learn.

    Yours roar_ie


Comments

  • Closed Accounts Posts: 413 ✭✭sobriquet


    I had the same experience last year - I did a game for my 3rd year project.

    First, a question - are you doing a graphics oriented project, or are you writing a game? The distinction is important - if you're doing graphics work (in the guise of a just-about-playable game), then you can concentrate on all the low-level stuff, but if you're intending to write a complete game, you'd better get a higher level API. You won't be able to do both succesfully.

    I wanted to learn graphics programming more specifically than games programming. Keeping the focus narrow is generally preferable, I think. I chose OpenGL over D3D (remember that GL vs DX is a void argument - DX is a complete gaming API, GL just does graphics). A few reasons: outside of gaming, D3D is almost completely nonexistant - you won't find a GIS visualizer that only runs on big SGI machines done in it.

    Like I said, if it's a proper game you want to write, get a higher level API - SDL (http://www.libsdl.org), ClanLib (http://www.clanlib.org), there's heaps of them.

    Now - and if you only pay attention to one part of my rant, please let it be this - if you do choose to do graphics programming, get a library that saves you from having to code stuff like input, audio etc. I used OpenAL (http://www.openal.org) for audio, which works well with GL, and I used DevIL (http://www.imagelib.org) for handling images for textures. However using something like GLFW (http://hem.passagen.se/opengl/glfw/) for input and threading would have saved about month of dev time, and god only knows how much debugging time.

    Mail me, and I can send you my Tech Manual, if you like.


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


    Yeah go with OpenGL, it's just easier to learn. What sort of game are you going to do, and have you got a supervisor for it yet? Just doing "a game" doesnt usually go down with them all that well, it usually has to have some particular merit..


  • Closed Accounts Posts: 49 trunks


    If you are going with OpenGL watch your HardWare, most collage PC are pecies of sh1t, and you might end up running on there systems

    and you could end up spending your final days of development wrecking your head, riping out all you code to make it faster

    just someting to bear in mind for May next year, :D


  • Closed Accounts Posts: 27 BraveSirAndrew


    Trunks makes a good point about knowing what you've got in college. If you decide to go with Direct3D, which - and I'm probably going to get attacked for saying this - I suggest you do, be aware that NT only supports up to version 3, which is pants. You're going to need 98, 2000, or XP to use the latest versions, which is 9 at the moment.

    Deciding which API to use, OpenGL or Direct3D, is not as easy now as it used to be. The newest version of DirectX, as far as Direct3D goes anyway, is a breeze to use compared to the previous versions. I have just finished my degree project, which is a graphics engine based on Direct3D 9, and I have to say I'm glad I choose it. Shader programming is far easier than in OpenGL, and thats what you're going to want to be looking at for the really cool effects. Granted, Cg can be used with OpenGL, but it means you're going to have to learn the Cg API as well as OpenGL. Direct3D 9 comes with a great shader framework, which makes shader programming as easy as it gets.

    I'd be more than happy to send you a copy of my dissertation if you want a look.


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


    Of course noone's going to attack you for recommending DirectX!! At the moment shader programming is much easier with DirectX's HLSL alright, but that'll change soon enough once OpenGL 2.0 and glslang gets finalized. For this reason I don't think Cg is going to last long, so I wouldn't spend too much time learning the API (even though it is exceedingly simple, and not all that different from the DirectX HLSL).

    Besides, I found it best to learn shader programming from as low-level as possible (vertex programs, register combiners etc) since that helps you fully understand the workings of the pipeline (the hard bit imo), and you can extend this to whatever shader language is popular at the time.

    ..but anyway. I don't think the OpenGL vs Direct3D thing will be agreed on any time soon, it's more a matter of preference really. I still say OpenGL is very easy to understand, and right for beginners. Having said that though, I haven't had a look at DirectX in a good while... I wouldn't mind having a look at that dissertation too.


  • Advertisement
  • Closed Accounts Posts: 390 ✭✭roar_ie


    doing graphics work (in the guise of a just-about-playable game)
    I wanted to learn graphics programming more specifically than games programming

    My plan was to do a playable game, in which graphics aren't necessarially needed to be all that great, however still up to scratch, as i want to spend more time on the AI instead. I wanted to learn how to do games programming.
    be aware that NT only supports up to version 3, which is pants. You're going to need 98, 2000, or XP to use the latest versions, which is 9 at the moment.

    Currently the operating system in used in college is Windows 2000, or at least the ones I use.

    So I take it that I might be best off learning OpenGL.

    Any more information is much appreciated.


  • Closed Accounts Posts: 3,322 ✭✭✭Repli


    Originally posted by roar_ie
    Currently the operating system in used in college is Windows 2000, or at least the ones I use.
    If you are going with OpenGL watch your HardWare, most collage PC are pecies of sh1t, and you might end up running on there systems

    roar_ie you're in kevin st right?
    Did you ever check out that lab right beside the students union office, it has an SGI altix 3000 at the back of the room which can only be used by computer science students in their final year
    check it out :P


  • Closed Accounts Posts: 413 ✭✭sobriquet


    My plan was to do a playable game, in which graphics aren't necessarially needed to be all that great, however still up to scratch, as i want to spend more time on the AI instead. I wanted to learn how to do games programming.
    My advice would be to get a high level API, touching the graphics as little as possible.

    I think Crystal Space (http://crystal.sourceforge.net/) would be a good bet - it handles most things you'd need - and graphics wouldn't be a worry. For the AI, the Python scripting in it could be very handy.

    I had the hardware problem too. I couldn't get the technicians to upgrade the drivers on brand new hardware P4-2Ghz, 512Mb, Radeon 7200s, so I was getting crap FPS counts. I brought my own (quite old) box in for the final demo.


  • Registered Users, Registered Users 2 Posts: 83 ✭✭bort


    go with OpenGL and get all the GLUT stuff which makes it all much easier to learn
    and theres about a million different examples and stuff out there
    also u can program in C and on linux which makes performance n stuff much better


  • Closed Accounts Posts: 392 ✭✭Skyclad


    I did my Final year project using openGL, though similarly it was heavily AI focused. No regrets either, everything worked like a charm.

    For your project demo you should be able to borrow a laptop witha decent gfx card or whatever, or if the worst comes to the worst, haul a box in with you for the day.

    A lot of people do it jsut to make sure there wont be any unforseen issues with different hardware etc anyway, and its almost a necessity if you are using any hardware specific calls.

    I have never needed to use DX, and there are some truly terrific sites out there for progging in GL - nehe.gamedev.net ,
    www.gametutorials.com

    GOod luck, I know I found there is nothing like a game to keep the motivation going when the long nights work kick in.

    Dave


  • Advertisement
  • Registered Users, Registered Users 2 Posts: 95 ✭✭Mr.StRiPe


    What was your final year project Dave?


  • Closed Accounts Posts: 392 ✭✭Skyclad


    Cluedo vs AI players


  • Registered Users, Registered Users 2 Posts: 2,325 ✭✭✭Q_Ball


    Cluedo Vs. AI players sounds v. interesting, how did it go? I'm doing Comp Sci. in Kevin street (starting 2nd year diploma) and i'm already looking forward (planning wise ;) ) to the final degree project (if i get that far..) and all this talk about writing shader programs is scaring me! :ninja:


  • Closed Accounts Posts: 392 ✭✭Skyclad


    There was a huge amount of work involved, and I didnt get it finished to my own satisfaction ( I spent about ~500 hours on it including writeup I would say)

    Did get a first for it though :)

    If you are really interested pm me and Ill send you on the writeup, and the code once I have a version Im happy with.

    Dave


  • Registered Users, Registered Users 2 Posts: 2,518 ✭✭✭Hecate


    Originally Posted by Repli:
    Did you ever check out that lab right beside the students union office, it has an SGI altix 3000 at the back of the room which can only be used by computer science students in their final year

    Actually it's an Origin 2000, and not a very good one at that, it's only got one processor!. DIT scriping the pennies as usual :)


  • Registered Users, Registered Users 2 Posts: 1,709 ✭✭✭Balfa


    Originally posted by Hecate
    Actually it's an Origin 2000, and not a very good one at that, it's only got one processor!. DIT scriping the pennies as usual :)

    Plus, if he's doing game rather than graphics, it's probably not that important ;)


Advertisement