Good tips n tricks to learn coding ?
category: code [glöplog]
shuffle2: i like how you manage to see the difference between pleks case and the one in the faq.
is bad due to many things, the important ones are readability and predictability.
is good since it does not need to make a copy of the current value of iter for executing the loop whereas the postfix notation would. it's a matter of instructing the compiler to generate more efficient code.
Code:
x=x/++x;
is bad due to many things, the important ones are readability and predictability.
Code:
for (iter=container.begin(); iter!=container.end(); ++iter) { ... };
is good since it does not need to make a copy of the current value of iter for executing the loop whereas the postfix notation would. it's a matter of instructing the compiler to generate more efficient code.
rasmus: I can't tell if you're being sarcastic to me or not, so:
The main problem with reading from p and deref then increment in the same call is simply that it is undefined behavior. In fact, I only pointed it out because codepad.org will error out on any warnings.
In both cases (parameter evaluation and the example the faq gives), the same basic issue causes problems.
As for prefixing iterator increments in loops...yes, I do that, but normally only for STL types. Maybe a bad habit, but whatever :p
*still confused since I read your reply as sarcastic*...
The main problem with reading from p and deref then increment in the same call is simply that it is undefined behavior. In fact, I only pointed it out because codepad.org will error out on any warnings.
In both cases (parameter evaluation and the example the faq gives), the same basic issue causes problems.
As for prefixing iterator increments in loops...yes, I do that, but normally only for STL types. Maybe a bad habit, but whatever :p
*still confused since I read your reply as sarcastic*...
lol @ Adok. if you're still referring to articles you wrote when you were 12, there's something seriously wrong.
button: But not regarding me.
Huge crowd sources for those who loves software renderings :
http://laurent.horus.free.fr/hugecrowd32sources2008.zip
The Cartoon Fish sources, for those who loves asm and dos:
http://laurent.horus.free.fr/The%20Cartoon%20Fish%20(Source%20Code%20by%20LCF%20as%20BARTi%20of%20NoooN).zip
http://laurent.horus.free.fr/hugecrowd32sources2008.zip
The Cartoon Fish sources, for those who loves asm and dos:
http://laurent.horus.free.fr/The%20Cartoon%20Fish%20(Source%20Code%20by%20LCF%20as%20BARTi%20of%20NoooN).zip
when i was 12, i had friends, i went outside to play and socialize, and i never wrote a tutorial on that. hmmm... maybe i should have. Adok could have made some very clever conclusions from that.
What worked for me after all:
Find a nice demoscener group.
Code.
Have fun coding, by only doing it, when you want to...
fin.
Find a nice demoscener group.
Code.
Have fun coding, by only doing it, when you want to...
fin.
after Fen's last post, something pop'ed out in my head. something that ive actually wondered and pondered about for very long time. please feel free to comment and come with suggestions and experiences in conjunction with the subject: "How to make a demo in collaboration with members from the same demogroup". I find it very difficult to cooperate on a demo by sending sourcecode over the internet, actually one needs "imho" a good idea and plan if its going to be a successfull one. its been a long time since i did exchange ideas and sourcecode over the web, it seems like i just dont think its fun anymore to do. because i had the experience before to actually be in the same city with a coder, gfx artist or musician for that matter and then work on a demo by exchanging ideas to and forth by have meetings once in a week or even crash at the same house for a weekend and work on demo like that. imho the last one is the best one! because then its much easier to cooperate. doing it on the web works for some, quite good ive heard, but it isnt the same thing. you feel like you are working on a production all alone, and its very difficult if you have an idea in your head to actually transmit it via the internet unless you have a plan and drawing and all that, but that is very difficult because maybe not everyone are agreed on, or have such a passion for an idea. blah, do you get what i say or. does anyone from any demogroups any longer have meetings and work on a demo (whatever kind of demo it may be, a joke-demo, serious demo or just some experimental demo) by have meetings, like fairlight or any other groups? or do you work on a demo only by doing it from your home. or maybe if you work at a games company you have meetings at work and work on the demo from there. i wonder how it is working out nowadays.. ive usually sit alone and code alot, and its pitty that nothing really gets out there, because its easy to say "this isnt good enough, i have to polish it more", when you work alone most of the time. and then its just alot of code and in the end you arent satisified with the outcome and then the code just lies there never being used.
The best way to code is not to code at all, but learn to do graphics or music and find a demogroup and pester your groupmates to do all your ideas because coders can't think for themselves. Really, we're all idiots. Also naked.
thanks everyone for your advices, that's awesome :)
i'm gonna read all the lastest ones at leisure tonight :)
i'm gonna read all the lastest ones at leisure tonight :)
it might be a better idea just to start coding something very simple instead of reading all the "advice" here. its not a matter of seeking pathways or "advice" its a matter of dedication and reaching a goal.
and then years later finding out that the skill level you idolized as a beginner doesn't make you a master of anything. just have fun with it and think less, do more. think about problemsolving, not about how to become the president of the usa.
and then years later finding out that the skill level you idolized as a beginner doesn't make you a master of anything. just have fun with it and think less, do more. think about problemsolving, not about how to become the president of the usa.
1 Code something
2 Code another thing
3 Goto 1
2 Code another thing
3 Goto 1
start by coding some simple sine plasmas, fire effect, starfields, copperbars etc.. or you can find some ideas from this list
hehe before coding those effects i'm learning the bases, coding simple programs, and then coding 2d effects first maybe ? (SDL) before going to 3d ?
Do what you want! The is no "best" way.
No, you're not allowed to do what you want until you've beaten the atari st sprite record! Until then it's copper bars and sine plasmas.
lol, and then to "fit" pouet jokes, i'lli have to code a "noise" intro ? right ? :)
noise prods are old news.
to be hip you gotta code for amstrad cpc now ;)
to be hip you gotta code for amstrad cpc now ;)
Setting simple goals (if your primary goal is graphics programming that does mean plasmas, bitmap distorts, starfields et cetera) to get a basic hold of the language(s) and platform you're using is effective. As soon as you, inevitably, start to feel the need to expand (e.g building a whole, somewhat more complicated demo) other issues like reusable code, structuring, solid I/O, timing, audio and just the whole thing of forming a bigger usable whole will automatically become your focal point of attention. And that will improve over the years.
Goal-oriented coding and building experience that way. Oh hell, this has been said so many times.
Goal-oriented coding and building experience that way. Oh hell, this has been said so many times.
and of course AssImp
also, start drinking double - or better triple - the coffee you're drinking now (+1).
What wysiwtf said, hahaha. Also coder porn is sooo in right now. Just hard to produce.
Speaking of goals.. one thing I did a while back was 'lunch break games'. I spent a week doing it, and the goal was to write a complete (usually simple/crappy) game within my lunch break (~45 minutes after eating).
More recently I try to do something with raymarching, or something for my iOS apps during lunch. Today I'll write colour transformations in YUV space (after spending over a week of lunch times doing the same in HSV/HSL and variants, and spending ages optimising, and finding it's still unacceptably slow ;( ).
More recently I try to do something with raymarching, or something for my iOS apps during lunch. Today I'll write colour transformations in YUV space (after spending over a week of lunch times doing the same in HSV/HSL and variants, and spending ages optimising, and finding it's still unacceptably slow ;( ).
...which ended up highly productive :) If anyone is in need of fast colour processing where accuracy isn't critical, look into YUV rather than HSL/V. You can do the RGB->YUV and back transforms nice and fast without any conditionals (or the evil atan I found in one alternative).
psonice: interesting. i have an realtime hsv tool that is not the fastest in the world. and i think its not 100% correct either. and its written i C#. :p