Inspired By The Demoscene: Beginner Starting His Journey In Graphics Programming.. Seeking Advice

Started by
9 comments, last by Radikalizm 7 years, 8 months ago

Hi everyone!

So ever since I watched a few youtube videos of demos created by people from the demoscene, I have been fascinated by Graphics Programming. The way it allows us to express our creativity, artistic vision, and at the same time, showcase our programming prowess is something that have made a big impression on me.

However, knowing how ardous this road is, I was hoping if anyone who have taken the plunge into Graphics Programming could share some advice, or point me in the right direction ?

I have some programming experience (namely Python) though I wouldn't call myself a very 'experienced' programmer. In addition, I have done majority of the college level math classes in the past: calculus, linear algebra, discrete mathematics- though I'll have to admit, that's largely forgotten by now ^_^

From my understanding, I would need to:

1. Learn C++:

I will be picking up a book or two on the subject soon, but if anyone have any good suggestions of a book on C++ that they think would be perfect for a beginner please let me know!

I know that C++ is one of the more complex languages when it comes to programming and that one never stops learning when it comes to C++ because of the plethora of libraries it has, but for Graphics Programming, what are some of the key programming concepts or area of focus I should pay more attention to while learning C++? And just how much fluency I would need to acquire before I should even attempt to learn about Graphics Programming? (once I have the fundamentals down? once I have reached an intermediate level?)

2. Brush up on Linear Algebra and more specifically, have a solid understanding of the use and applications of Vectors and Matrices? (these seems to be the most important mathematical concepts when it comes to Graphics Programming right? as they are related to transformation and animation.

Are there anything else beside these two? Quaternions? Trigonometry?

3. Choose between DirectX or OpenGL

Personally I would probably pick OpenGL as it's crossplatform, so what comes next is understanding the entire openGL pipeline, its libraries, etc? glsl, shaders?

With so many things yet to learned, and how much depth Graphics Programming actually covers, it truly feels a little daunting.

If you were to advice a novice on how he should get started, what would be the step by step approach you would suggest? What would you recommend him to learn first, second, third.. etc. What learning materials would you recommend?

Advertisement

Welcome to the wonderful world of graphics programming! I'll try to answer some of those questions for you.

1. Learn C++:

Any language which has access to a well-documented graphics library will do, so you don't necessarily have to go for C++. Honestly, if this is your first experience with programming I'd actually recommend going for something like C#. There's plenty of awesome libraries or wrappers available to do graphics related programming and it'll allow you to get up and running more quickly. It's going to be a while before you can get any real benefit out of working in C++ anyway, so it might be a smaller hurdle to get over by sticking with a more "approachable" language. I know a lot of people have different opinions on this though, so I'll let others add their opinions to this as well.

2. Brush up on Linear Algebra and more specifically, have a solid understanding of the use and applications of Vectors and Matrices?

Absolutely! Understanding linear algebra and trigonometry is going to help you out a lot if you want to make any progress. Once you advance a bit further it can become useful to have a good grasp of some elementary concepts in calculus, like differentials and integrals. Once you're at the point where you need those you should have an understanding of the following mathematical concepts you're going to need to advance. It's best not to worry about very complex things for now, just basic linear algebra can already get you far.

3. Choose between DirectX or OpenGL Personally I would probably pick OpenGL as it's crossplatform, so what comes next is understanding the entire openGL pipeline, its libraries, etc? glsl, shaders?

The fact that the OpenGL standard is supported on multiple platforms does not mean that it will work out of the box across multiple platforms or even across multiple graphics hardware vendors. OpenGL is notorious for being very inconsistent in these cases. If you're starting out I wouldn't focus on getting things to work on multiple platforms just yet. Start off with one and see how far you get. Worry about the mess that is cross-platform graphics development later.

If you want to focus on actually implementing graphical techniques (i.e. you actually want to write code and shaders to get thing to show up on screen asap) I'd actually recommend going with something a little higher level than plain DirectX or OpenGL. I'm a bit out of the loop on publicly available graphics engines, but there's plenty of them out there. I know libraries like Ogre used to be very popular, but I haven't had a look at any of those libraries in years. Even working in Unreal and Unity for experimenting with shaders and such can be a great introduction without too much stuff getting in your way.

I'd recommend looking at OpenGL and DirectX once you understand the needs and requirements of graphical applications a bit better, or if you're just really passionate about having a look at more architectural stuff.

The most important thing is to experiment a lot and to not worry about not getting things right immediately. Don't be intimidated by the complex looking math and such. Find sample implementations for things, play around with them, try to understand them and try to connect them mentally to their mathematical description.

Good luck!

I gets all your texture budgets!

If you are focused on graphics programming, then I would suggest you try a different approach first.

It will take you a long time to learn enough to have a graphics framework you can experiment in if you write everything yourself.

I would suggest you start by looking at online sites that let you play without having to re-invent the wheel.

For example spend some time looking at shadertoy. Look at some of the simpler shaders until you think you understand them. Then change them and see if you are right. You can change the code in the browser and instantly see the effect your changes have had.

Once you are comfortable doing that, then you can start looking at what to do next.

The most beautyful part of demoscene is, in my opinion, the old demos for ZX Spectrum , C64, and MS-DOS. That old taste is the most genuine for the Spirit of what demoscene really means. With that perspective, it is not a bad idea to use old versions of Allegro libraries (DOS) or SDL, though those are for C. For C++ we have SFML in any version. Of course may be possible to be even more rewarding to do all yourself or with little help from high level libraries, but I reccomend to be fluent in 2D before try 3D. I read very good critics about Pygame, the all famous lib for Python

Are you trying to get into the demo scene or real-time video game graphics or offline rendering?

-potential energy is easily made kinetic-

Are you trying to get into the demo scene or real-time video game graphics or offline rendering?

Trying to get into the demo scene, what they do is real time rendering via procedural generated graphics i believe.

shadertoy looks really awesome. I will definetly play around with that first !

In regards to learning a new language, I was planning on learning a new language anyway so I really don't mind spending the extra time.

In your opinion, would it be better to start out with C or C++ ? I know C++ and C# are heavily used for game development, but for Demoscene, and Graphics Programming where one actually makes all his stuff, and where efficiency, size and speed are also more of a concern, then C or a Cish C++ is often used right?

When looking around online, some people have said that it's better to start out with C as C is a lot smaller in comparison to C++ and is stricter, which makes C a little easier to learn. But, on the other hand, there's also the opinion that starting with C sometimes makes people fall into bad habbits when they do try to write code in C++ as they often fall back to writing in a more C style code. is this true?

Lastly, does anyone know of any other Graphics Programming communities or forums? (other than this one of course.)

Here is something I've been slowly digesting, its used in the demo scene. http://9bitscience.blogspot.com/2013/07/raymarching-distance-fields_14.html

-potential energy is easily made kinetic-

When looking around online, some people have said that it's better to start out with C as C is a lot smaller in comparison to C++ and is stricter, which makes C a little easier to learn. But, on the other hand, there's also the opinion that starting with C sometimes makes people fall into bad habbits when they do try to write code in C++ as they often fall back to writing in a more C style code. is this true?

Being C++ an extension of C, at the core there's really not much difference between both of them... C++ just adds new stuff to the language, abstracts some others and fixes a few little things here and there, to the point that you could almost compile C code on a C++ compiler without problems... so, by learning C you're already learning the basics of C++...

Also C makes you think more at the metal level, you could easily figure out the assembly produced by your code in C... and that's good... if you then move to C++ and see how it abstracted some things, you can figure out what's going on on those abstractions (nothing is pure magic), and you can decide if it's good for what you're doing or not...

But don't give it too much thought, as long as you understand what's going on with the code you write no matter what you learn first or after... the important thing is to take the next step in your career ;)

"lots of shoulddas, coulddas, woulddas in the air, thinking about things they shouldda couldda wouldda donne, however all those shoulddas coulddas woulddas ran away when they saw the little did to come"

C - as one of the most popular language in the universe - will be good for you at any production level, but you must find your own favorit programming language to work.

This topic is closed to new replies.

Advertisement