Path: chuka.playstation.co.uk!news From: "Ben James" Newsgroups: scee.yaroze.freetalk.english Subject: Re: Main Game Loop Technique Date: Mon, 15 Jul 2002 20:20:03 +0100 Organization: PlayStation Net Yaroze (SCEE) Lines: 33 Message-ID: References: NNTP-Posting-Host: du-031-0142.claranet.co.uk X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2600.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 It wont harm the performance noticably. The nice thing about a structured language like C is that it's meant to be readable. At the high level you're talking about, go with what keeps things simple. I would say (ha!) only code that is called many times per frame needs to be optimised - things like collision detection or drawing lots of particles at once. -Ben "That's just my opinion, I could be wrong" "Rikki Prince" wrote in message news:agt0rq$d9k30@www.netyaroze-europe.com... > "Ben James" wrote in message > news:agse0k$d9k26@www.netyaroze-europe.com... > > It's not really worth worrying about to be honest. The checks are > only done > > once per frame and will take up a tiny fraction of 1% of the CPU > time. I > > tend to use a case statement but the results the same. i.e: > > Cheers. I usually use the case statement, but for ease of > demonstration, I just used IFs. How about if I called a function > containing the code, each time the case was selected? Would that harm > the performance much? Having it all seperated into functions would > make the code a bit easier to read, write and debug... > > Cheers, > Rikki > >