6 ms·
C++ Game Programming for Artists * First we pick a nice API, let's see, yeah SDL with OpenGL is a good choice * Let's create a full screen surface and set the
by VMG 14y ago
C++ Game Programming for Artists
* First we pick a nice API, let's see, yeah SDL with OpenGL is a good choice
* Let's create a full screen surface and set the happy little flags to make it a double buffer
* Let's just write some happy little class wrappers for our main game components. There we are.
* We start with a happy little box twirling around. Just gently use the OpenGL API and map the textures so that they fit. A happy little light lives in the upper right corner. Now lets add some other boxes over there.
* Ever so softly write some game logic. If you're feeling adventurous, try using multiple threads, but don't forget to use some locks.
* To finish it all up, we just plug in the user input. How wonderful!
See you next time when we write an operating system!
- WickyNilliams 14y agoI thought this was going to be a snarky response at first - "I'm a programmer so I can't do art; as an artist can you do programming?!" - but I was wrong. I'd love for there to be a Bob Ross style course on game programming, his soothing voice combined with his rose-tinted vision of everything would be awesome. Happy little clouds
- dkersten 14y agoI'd love for there to be a Bob Ross style course on game programming I'd certainly watch it and I already know how to program!
- krapp 14y agoJust remember when it comes to your code, there are no exceptions, only 'happy accidents.'
- adrianhoward 14y agoOne language I used in the past (Pop-11) made a very deliberate pedagogical decision to not have errors or exceptions - it had 'mishaps'. Names are important ;-)
- aerique 14y agoIf you don't mind Unity check out http://www.cookingwithunity.com/ http://www.cookingwithunity.com/
- VMG 14y agoIt's meant to be a little snarky - from a macro level everything looks simple if you just segment it into ten steps. The problem is that each steps contains many many details and years of experience and hard work that can't even be verbalized properly.
- deleted 14y ago[deleted]
- drblast 14y agoI'm reminded of the John Gnagy art lessons where you make everything out of boxes. But the flow tended to be like: Box -> Two boxes -> Three boxes -> Horse! I guess it made it seem plausible that you can draw things just fine with rectangles. Never got the hang of it though.
- SpriteAttack 14y agoTry and read the earlier post. I think they do explain the approach a lot better. I don't intend to make you into the next daVinci but enable my readers to create decent game art or at the very least better looking place holder art for their games.
- tripzilch 14y ago> It's meant to be a little snarky - from a macro level everything looks simple if you just segment it into ten steps. The problem is that each steps contains many many details and years of experience and hard work that can't even be verbalized properly. What part of the tutorials did you find hard to follow? Yes it's hard to verbalize the "why?"'s of the choices made in the tutorial, but that's why you just have to plonk down with Inkscape and recreate what's in the tutorial. That's not too hard, is it? To manipulate the spheres and boxes so they appear like in the tutorials, a programmer isn't daunted by an unknown GUI, are they? The only way to learn it is by experience, actually doing the exercises. You can't explain the "why?" beforehand, but as you simply follow the steps, you will encounter the same states/stages as the original artist/author did, and the choices they made will become obvious only after you experienced them from that point of view. (you can't use words to teach that kind of understanding) FTR, I did do a number of the tutorials a while back already. But then, I already knew how to draw. Except on paper and in raster-based image editors. Working with vectors in Inkscape was a new and very fun experience. Plus it turns out to be super-useful for taking PDFs apart! Also the workflow from the tuts was something I might not have trivially figured out myself: Find an existing object whose shape has the qualities you need (or a circle or box if needed), duplicate it, tweak it, get to know the deformation effects, set operations, etc, whatever you have to do to have to tweak as little actual vector nodes as possible. But to do this, you need a type of 2D spatial insight, and you can only train and practice it, nobody can explain it until you got your hands dirty a bit. But a programmer should be able to do that. It is however a terribly frightening step for a programmer to take: "Okay, I'm doing this, but I don't know WHY ..." I totally get that, I feel the same way and hate it when a coding tutorial does it. But for drawing it's different, it's more like those "VIM kata's" that were posted a while back on HN. Ok they too explained the "why?", but the main intent was to train that muscle memory. And fortunately it turns out you don't even need much muscle memory to make cool things with vector drawings (unlike, say, pencil-and-paper drawings) which is why they're particularly good for people that can't really draw freehand. That said, of course there are certain parts of drawing/art that can be taught with words and explanations. But they are advanced topics like perspective or colour theory. That may be one thing where I can imagine somebody with no graphical experience to (possibly) go wrong with these tutorials: they will probably pick awful colour combinations at first. Also they may not understand when it's a good idea to add a black border around something for good contrast (in cartoony drawings), fortunately the author does (IIRC) point out this trick. But it's the same as for shadows or any other type of drawing "trick", you just gotta wonder "why doesn't my image look quite as good as this other one?" and then look very hard what's the difference. And the nice thing about vectors is that unlike paper drawing, you can actually go back and insert those shadow or outline shapes between the layers of your image, so you can just keep non-destructively playing around until you get the exact result you intend. That's a lot harder with Photoshop or GIMP, not only will you be cruising through the undo-history, when your inspiration can effortlessly draw freehand sketch lines that take you minutes to make look acceptable, it becomes very frustrating (that's why you want to practice that on paper first, and then buy a drawing tablet :) ). With vector-drawing it's more like cutting paper shapes and arranging them (like Southpark :) ), except that in this case, doing it on the computer is actually easier than messing around with scissors and glue.
- fnbaptiste 14y agoI would so watch that
- selvan 14y agoWhen you look at arts explained in the tutorial, objects are getting their shape from simple square, rectangles & circles. It is easy to comprehend. In your case, even not many programmers would understand whats SDL. Why shouldn't be writing C++ game programming or operating system, easy to comprehend for Artists?. If we had made writing OS easy for Artists, OS landscape would be much different than whats today.
- justincormack 14y agoBecause c++ was not designed for that. But watch this about Corona in half an hour for something designed to be easier http://seb.ly/2012/01/live-iphone-coding-video-now-online/ http://seb.ly/2012/01/live-iphone-coding-video-now-online/
- binarycrusader 14y agoTo add to that, I'd highly recommend something like Spriter to complement the above: http://www.brashmonkey.com/spriter.htm (No affiliation, but I did back the kickstarter...) Lots of developers undervalue the importance of a good set of tools for the asset pipeline.
- tripzilch 14y agoIf you copy what he's doing in those tutorials, you will learn something. If you just copy someone's code by typing, you will not. That's the difference. Or are you saying you can't even follow the exact steps in that tutorial to result at a very similar image? If you just read the tutorial, you won't learn much about drawing. He could explain all the choices he made, and you may feel better about knowing that, but the end-result will be initially about just as wonky as it would otherwise have been.
- SpriteAttack 14y agoThanks for the great comment... I couldn't have said it better myself... The tutorials are written to follow, play and then create your own variations of what you just learned.
- tripzilch 14y agoWell, thank you for the great tutorials :) I played with Inkscape before, but before these tuts I never managed to actually produce something useful with it. Only a week later I was making things like this: http://i.imgur.com/iluDL.jpg http://i.imgur.com/iluDL.jpg [1] -- I know it's nothing like your tutorials and they were indeed also partly done in GIMP, but Inkscape was incredibly useful for quickly trying out different styles when masking out the fore- and backgrounds. I only had a rough idea what I was going for at first, and trying out different variations of shading was a much quicker process than it would have been with just GIMP. Also, combining several (linear/radial) gradients so they fill the background just right like that, I wouldn't even have attempted in GIMP (and instead end up with something that only looks sorta right). BTW do you happen to know what is the best format to save in, so that somebody with Adobe Illustrator can easily use it? A friend of mine who was doing the lettering (not shown) had some issues loading them so I ended up sending him huge rendered PNG images (which worked, but I hate it how any semi-serious graphics design project can turn into tens of megabytes just so you don't have pixels on A2 :) ). OTOH, I don't think he tried very hard, next time I'll make sure he has Inkscape installed so he can do the conversions himself. [1] these are partial images used as posters for a party tomorrow, and yes I am aware that the maya calendar thing is a few weeks later.
- SpriteAttack 14y agoI don't think you got the idea right. I am not trying to teach programmers to repaint the mona lisa. I am just providing a different approach and tutorials on how to use inkscape to create game assets that are good enough to be used in games. If you would have taken the time to read the first posts of my blog you would have realized that.
- VMG 14y agoThis wasn't meant to be an attack, I've really enjoyed the tutorial and will definitively look at it if I was to do some art. I was just making a little fun about how the non-threatening language can make the reader feel stupid if he chooses to misunderstand it. No offense intended.