Post Reply 
Zinga's quick C tutorial
Author Message
SchmilK
Noob

Posts: 4,698.2833
Threads: 359
Joined: 16th Apr 2007
Reputation: 0.38918
E-Pigs: 82.0266
Offline
Post: #11
RE: Zinga's quick C tutorial
Awesome zinga!  

I am so upset with myself for not attending any classes in college. :(   Instead i paid people in beer to do my projects and i just skirted by with guesses on the tests :(  

(come to me for suggestions on how to earn a 0.8 GPA in college)

I never would have thought I would want to program anything in my life..now it is something i want to do alot, but have managed to get hibbyware to make the one program i realy needed created (hwhex.exe for prx updating from 3.90 to 3.95 and 4.01) :)  

Hopefully your tutorials continue, I promise to pay attention to your classes!

limneosgreen Wrote:Take my advice, don't try to install custom themes ... it's possible to brick ur psp.. why just don't change wallpaper
30/09/2008 03:37 PM
Find all posts by this user Quote this message in a reply
ZiNgA BuRgA
Smart Alternative

Posts: 17,023.4213
Threads: 1,174
Joined: 19th Jan 2007
Reputation: -1.71391
E-Pigs: 446.0333
Offline
Post: #12
RE: Zinga's quick C tutorial
PSPkiller Wrote:
Mc Cabe Wrote:woot i understood that :P

I've  had a go at  the C++ video tut's on 3D Buzz. they sort of  made sense and were slightly funny and entertaining, but  by the 3rd video i was completely lost...

SchmilK Wrote:Awesome zinga!  

I am so upset with myself for not attending any classes in college. :(   Instead i paid people in beer to do my projects and i just skirted by with guesses on the tests :(  

(come to me for suggestions on how to earn a 0.8 GPA in college)
Lol at above two posts :P



Thanks for the comments everyone. :)  Just wondering, has anyone managed to actually get the program running?
01/10/2008 01:19 AM
Visit this user's website Find all posts by this user Quote this message in a reply
ZiNgA BuRgA
Smart Alternative

Posts: 17,023.4213
Threads: 1,174
Joined: 19th Jan 2007
Reputation: -1.71391
E-Pigs: 446.0333
Offline
Post: #13
RE: Zinga's quick C tutorial
Alright, since I didn't really get many confirmations of success, I'll continue on, but I'll formalise some concepts without going much into code at the moment.



Don't worry too much if you don't really understand most of this - it's not terribly important, so as long as you get the general gist of what I'm trying to say, you should be fine.

Computer Programs
All a computer CPU does (for the most part) is execute instructions.  Thus, all you give it, when you write a program, is a series of instructions, ie, do this, followed by that, then that... (and so on).
However, there exists control flow statements which allow your program to jump to various places - this stops programs from being just a static set of instructions.

Here's an example of what I mean (this isn't real code, duh):

Code:
1
2
3
4
5
6
7
8
9
10
11
Stand up.
Walk towards ball.
Bend over.
Pick up ball.

(^ Above are "static" instructions - now we'll stick in a "control flow" statement)

If the ball is red,
   throw it at the nearest person.
Otherwise,
   drop it on the floor.

(note the use of full-stops in the above - these typically translate to the semicolons that typically end C statements (see first post) - also recall that the if statement doesn't have a semicolon after it (you don't stick a full stop after an if))

Note the "if" statement above - if the condition (ball is red) is true, the person will (or should) "execute" the next statement, "throw it at the nearest person", and then skip the statement defined in the "otherwise" clause.

Control flow is a very important concept in programming, as you typically write a program to adapt to different conditions.
(if you've ever tried making some games with Game Maker, or even something like Starcraft's Campaign Editor, you've probably come across conditionals; this is basically the same thing, though a little more formal)

The if statement is probably by far, the most widely used control flow statement.  Wee'll look at the while statement (this basically allows a set of instructions to keep being executed whilst the condition is true, aka a loop) later on, along with functions.


Variables
Probably the other fundamental component of programs, along with control flow, is variables.  I'm sure you've all experienced variables before, either in maths, or if you've tried making a game before - you'll typically want your program to, a) record information, and b) adjust to different inputs.

A programming variable isn't much different - all it really is, is just a bit of memory where you can store some info.  The variable can be changed and read from.


Wee'll focus on integer type variables mainly - it's the most widely used type anyway.  Integer variables can only be used to store integer number values.

01/10/2008 06:25 PM
Visit this user's website Find all posts by this user Quote this message in a reply
Necro-Bot
Non-existent

 
Post: #14
Thread Revived!!!
[Image: gd9au.jpg]
14/02/2009 01:17 PM
Quote this message in a reply
Pirata Nervo
NervOS Developer

Posts: 699.4765
Threads: 39
Joined: 20th Jun 2007
Reputation: -0.79225
E-Pigs: 19.2466
Offline
Post: #15
RE: Zinga's quick C tutorial
Nice tutorials Zinga, they're pretty easy for beginners, I am sure a lot of people will read them and find them useful. I'd stick this thread if I were you

14/02/2009 01:17 PM
Visit this user's website Find all posts by this user Quote this message in a reply
boogschd
boogyman
Worlds End

Posts: 4,954.3196
Threads: 90
Joined: 29th Nov 2007
Reputation: 4.19708
E-Pigs: 43.6852
Offline
Post: #16
RE: Zinga's quick C tutorial
/pastes boogers on it

lol

Hi Nervo
14/02/2009 01:26 PM
Visit this user's website Find all posts by this user Quote this message in a reply
ZiNgA BuRgA
Smart Alternative

Posts: 17,023.4213
Threads: 1,174
Joined: 19th Jan 2007
Reputation: -1.71391
E-Pigs: 446.0333
Offline
Post: #17
RE: Zinga's quick C tutorial
^ Lol.


Thanks for the compliments :P
14/02/2009 08:55 PM
Visit this user's website Find all posts by this user Quote this message in a reply
feinicks
One day... we Fly...

Posts: 6,124.6050
Threads: 531
Joined: 27th Mar 2008
Reputation: 2.35695
E-Pigs: 210817.3958
Offline
Post: #18
RE: Zinga's quick C tutorial
/stickies...

wait...

/can't

◄◄••• 天使たちの夢か? •••►►

[Image: ewualizer.gif]
My works!
16/02/2009 05:58 AM
Find all posts by this user Quote this message in a reply
Necro-Bot
Non-existent

 
Post: #19
Thread Revived!!!
[Image: Necropost.jpg]
17/10/2009 01:35 PM
Quote this message in a reply
Joom
WOOP
Worlds End

Posts: 4,206.7320
Threads: 417
Joined: 20th Mar 2009
Reputation: 5.41709
E-Pigs: 134.1772
Offline
Post: #20
RE: Zinga's quick C tutorial
Necro! :D

[Image: ROVBdMh.png]
3DS Friend Code: 5000-6045-4964
17/10/2009 01:35 PM
Find all posts by this user Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)

 Quick Theme: