pouët.net

Go to bottom

Motivation.

category: general [glöplog]
Let me take this time to say "hi"....hi.

Okay, now that formalities are out of the way, I would just like to ask all of you coders out there. How the hell do you have the drive to memorize all the crap neccesary to write something for even a simple OpenGL program.

(example)
Code:ZeroMemory( &pfd, sizeof( pfd ) ); pfd.nSize = sizeof( pfd ); pfd.nVersion = 1; pfd.dwFlags = PFD_DRAW_TO_WINDOW | PFD_SUPPORT_OPENGL | PFD_DOUBLEBUFFER;


Im just a musician in my group, but would actually like to buckle down and work on any prod's for the sake of taking stress off of the 1 coder we have in our group and maybe even making our demos better. However seeing all the syntax just to creat a GL window is disheartening.

How did you guys get yourselves to learn this? Any witty acronyms or pieces of wisdom you could share to help my learning?
added on the 2006-01-27 08:09:14 by Rubicante Rubicante
usually, you cut and paste that sort of stuff from some crap tutorial, put it in a class or a function and forget about it. after that, you only need to remember glBegin(AUTO_GENERATE_OBJECT); and glVertex384d(COOL_OBJECT);
added on the 2006-01-27 08:19:12 by skrebbel skrebbel
Well, the younger of us, like I of 14 years, and have alot of free time and no friends, see it as a necessary passion to keep us in line and off drugs :P
added on the 2006-01-27 08:40:04 by ferris ferris
Yeah, I actually work and goto college, so im usually pretty busy.

@skrebbel

Yeah, I could try a bit that way, however it seems like cheating.
added on the 2006-01-27 08:44:25 by Rubicante Rubicante
i just open a new document and paste one line i got from the master

New Text Document.c
Code:ChangeDisplaySettings,CreateWindow,SetPixelFormat,wglMakeCurrent;


and than press F5 and F1 madly till it works.
added on the 2006-01-27 09:11:26 by the_Ye-Ti the_Ye-Ti
i use flo demomaker.
"makedemo.exe -randseed=4532"
and there it is
added on the 2006-01-27 10:23:58 by astu astu
well, i'm an amiga coder, so its different. But I headbut the keyboard until it generates executable code.

I guess this would work for all platforms, although it does make weird patterns on your face.
added on the 2006-01-27 10:59:12 by xeron xeron
Skrebbel is right. But if you want to get into details, put the function is question to google and read the documentation as well.
added on the 2006-01-27 11:15:28 by Preacher Preacher
learning by doing
added on the 2006-01-27 11:27:12 by hcdlt hcdlt
chicks! I do it all for the chicks!
added on the 2006-01-27 11:42:06 by quisten quisten
Guineapigs dressed as witches! I do it all for the guineapigs dressedd as witches!

BB Image
Well for one, ditch OpenGL.
Secondly, everyone rips their initcode, hacks it together once and never touches it again. (Which is why e.g. half of the demos exit on F12 - hello nehe)
added on the 2006-01-27 12:19:43 by Gargaj Gargaj
Dunno, but I think ogl init code is kinda slim compared to dx.
added on the 2006-01-27 12:32:20 by tomaes tomaes
Well,. yey I once coppied the same NeHe part too. But I write in SDL now which does these things automatically. I don't know if it's cheating but it's not necessary to write all that crap to just open a window, you just need a window and to be able to start writting glAnything. You want to make teh algorithm. So, instead of being frustrated, I either copied these stuff or now I use SDL to make that automatically. SDL rules!

As for the other think, I never try to remember all these stuff. The stuff I use frequently, come in my mind naturally, I mean if you use specific stuff frequently your brain learns them. I wouldn't care about initing a window though, I just need to do it once at the beginning and forget about it..
added on the 2006-01-27 12:46:35 by Optimus Optimus
And I thought that would be a great thread about motivation for demomaking. I really need to talk about this thing. We are all motivated and demotivated then for what we make. I was really curious about motivation techniques and stuff in the scene, but I guess it's the wrong thread..
added on the 2006-01-27 12:47:59 by Optimus Optimus
tomaes: dx9 init is very clean and slim, while dx7 was a awful iirc (i missed dx8)
added on the 2006-01-27 13:05:53 by makc makc
but well, optimus is right, we're going off topic.

rubicante: as for me, i like to know what i do and so i didn't c/p but opened PlatformSDK instead. when beginning, take your favorite tutorial series and play only with the Draw() part - win32 windows creation and message loops is not what you're interested in at that point.
also, as you'd like to help your coder, why not just using the code he provides you for setup and basic drawng? :)
added on the 2006-01-27 13:12:10 by makc makc
download kauhanen, the mighty demomaker by iso. you will never have to learn even scripting with that!
added on the 2006-01-27 13:20:01 by nosfe nosfe
i'd just like to point out that spending your first weeks of coding learning the ins and outs of opening a window, when you just want to make a demo, is NOT good for motivation. Cheating or not, go with the ripped code :D
added on the 2006-01-27 13:56:27 by psonice psonice
Psionice and makc are right. And don't forget to learn "simple" programming, which is things like opening files, allocating memory and the like, as well, because it's both educational and necessary at some point.

When I started, things were much easier.. it was those two mysterious lines,

asm mov ax, 13h
asm int 10h

and off you went.
added on the 2006-01-27 13:59:27 by Preacher Preacher
Tomaes: then you never coded :) D3D is basically Direct3DCreate + CreateDevice and thats all. you can add additional checks of course but OpenGL has pixelformats, DC's, all that you need.
added on the 2006-01-27 15:01:21 by Gargaj Gargaj
I was basically referring to older dx versions [and not just the init process, but the rather long way you needed to go until you had something useful on your screen], since I didn't touch that shit for many years. No need for the mendatory "you can't code, h4h4" arrogance. :)
added on the 2006-01-27 15:14:29 by tomaes tomaes
I don't code openGL or d3d, but the thing I learnt from php and the like is that the best and easiest solution is what skrebbel BB Image said. the day I figured out how classes work in PHP, my life changed, and my hair began to grow back. :)
added on the 2006-01-27 15:48:56 by kelsey kelsey
Rubicante: skrebbel just steals my demo-engine. he's a bloody thief!
added on the 2006-01-27 17:01:03 by kusma kusma
Does D3D produce smaller files or what?
almost all coders use D3D these days?
added on the 2006-01-27 17:23:46 by Heulanith Heulanith

login

Go to top