Random Homebrew: Stardust
game
Friends: Coding 'n Cracking - Nymphaea - PS3 Forum - darkforestgroup - daxhordes.org - Tgames - coldbird - gopsp.it - pspstation.org - prometheus - hgoel.info - MakeSmartTV - ps vita

[Tutorial] Introduction to programming using C (IV)

Discuss about your favorite (gaming...or not) devices here. The most popular ones will end up getting their own categories
Programming discussions for your favorite Device

Re: [Tutorial] Introduction to programming using C (IV)

Postby Sirius » Wed Jun 27, 2012 3:19 pm

But if C/C++ is not good to develop games why psp's games are developed using C? also my little research on google says that most of the thrid generations PC games use C++ :P



sorry for the bad english
Sirius
 
Posts: 128
Joined: Sat Dec 18, 2010 3:31 pm

Re: [Tutorial] Introduction to programming using C (IV)

Postby m0skit0 » Thu Jun 28, 2012 11:25 am

Sirius wrote:why psp's games are developed using C?

Huh? Most PSP games are made using C++, not C (you can see this if you've done some RE work on PSP games). Homebrew-made SDK is C-based, but this doesn't mean official Sony game SDK is for C. I don't think so. And anyway, in PSP you cannot make games in Java because there's no JVM. C/C++ is native, Java/Python/C# is not. Also for PSP you don't care about the game being multi-platform. And anyway, PSP SDK doesn't offer any other alternative, so you just have to do it that way.

Sirius wrote:also my little research on google says that most of the thrid generations PC games use C++

But who said C++ is not good for making games, dude? :roll: Of course most of modern PC games use C++, because C++ is compiled to native machine code and it is fast. Also DirectX is also made in C/C++, so this is a normal choice. As I said above, for games that doesn't use lastest generation graphics or blazing speed effects, you don't want to use C/C++ (if the target platform offers alternatives...).

Resuming: it's a matter of choosing the right tool for that job. No more, no less.
I wanna lots of mov al,0xb
Image
"just not into this RA stuffz"
User avatar
m0skit0
Guru
 
Posts: 4787
Joined: Mon Sep 27, 2010 6:01 pm

Re: [Tutorial] Introduction to programming using C (IV)

Postby Xian Nox » Fri Jun 29, 2012 5:45 pm

m0skit0 wrote:
Sirius wrote:why psp's games are developed using C?

Huh? Most PSP games are made using C++, not C (you can see this if you've done some RE work on PSP games). Homebrew-made SDK is C-based, but this doesn't mean official Sony game SDK is for C. I don't think so. And anyway, in PSP you cannot make games in Java because there's no JVM. C/C++ is native, Java/Python/C# is not. Also for PSP you don't care about the game being multi-platform. And anyway, PSP SDK doesn't offer any other alternative, so you just have to do it that way.
Q: If gcj could compile for the PSP like gcc (iirc, the pspsdk used gcc), this would mean the JVM isn't necessary, right?
Spoiler
Disturbed0ne wrote:PS. EVERYONE should like girls. they're just so soft. :oops:
Moderator 80% corrupt. That's funny, I don't feel corrupt. In fact, I feel pretty good.
What looks like a blog of mine can be seen here.
User avatar
Xian Nox
Moderator
 
Posts: 6051
Joined: Fri Nov 05, 2010 5:27 pm
Location: /home/xian/n-field

Re: [Tutorial] Introduction to programming using C (IV)

Postby wistine » Fri Jun 29, 2012 6:22 pm

Hello everyone, so here I wish I had good advice I'm a beginner I currently learning C language but I wonder if I have to just learn the basics of me and then launched into programming psp or must I learned from A to Z all C and then launched me into programming, someone could advise me if you like me thank you?

Sorry google translation! :D
wistine
 
Posts: 35
Joined: Tue Mar 27, 2012 12:54 pm

Re: [Tutorial] Introduction to programming using C (IV)

Postby asgard20032 » Sat Jun 30, 2012 1:08 am

wistine wrote:Hello everyone, so here I wish I had good advice I'm a beginner I currently learning C language but I wonder if I have to just learn the basics of me and then launched into programming psp or must I learned from A to Z all C and then launched me into programming, someone could advise me if you like me thank you?

Sorry google translation! :D


First, its alway better to learn the language itself, no psp specific stuff. Learn on a PC, and stick to that. Also, PSP start to be a little outdated... Don't waste your time learning PSP thing. In few year, when everyone will stop using PSP, you will discover you just wasted time learning useless thing. If you started learning that 1-2 year ago, I wouldn't have said that, but juste face it... Now its the psvita, and currently, its not a success. If you really want to learn something useful, learn to program on a PC, and use what you learn on an Android... (In the 2 last year, PSP was still used, but now, its rare I see someone with a PSP. Those who already know PSP programming, then alright, they can continue, but since PSP will be dead in less than 2 year, don't worth the time.)

Just learn C, then use SDL to do some game, or GTK+ to do some more serius program (after all, a game is not serius... but fun) like a calculator and other thing.
Whats good about SDL, is it can be used on Android.

Just face it, currently, the tendency is toward celular and ipod/iphone and PC. Handled gaming console are on a decline. Of course, gaming console like XBOX and PS3 are also a tendency, but Sony and Microsoft are not willing normal user to do programming. Although Microsoft started a little to be more open, we can do some game for the Xbox with XNA, you are still limited to the .net framework and XNA library, so you can't use all you want. The best thing you can do is learn C, because contrary to other language, that will maybe will be replaced(although, I don't think C# and Java will be replaced so soon), you can be sure on one thing, C has influenced the most popular language at the moment, and will continue to influence future language. So future programming language has lot of probability to be also C-like syntaxe. If you know C, you won't have difficult at all learning next gen language. Just concentrate on the future.
Image
asgard20032
 
Posts: 259
Joined: Thu Jan 20, 2011 1:16 pm
Location: Milky Way, Solar system, Earth, North America, Canada, Québec..... In front of my computer

Re: [Tutorial] Introduction to programming using C (IV)

Postby wistine » Sat Jun 30, 2012 5:44 am

Thank you asgard 20032 very much for answering!
Do not worry regarding the consoles I have the psp 5.50 gen D3, vita 1.69 ps and a PS3 but not good topic.

As for the C language I would follow your advice, I would learn a little more than the basics and I ensuites orienterais to a GTK SDL as its what I will not be easy but I am motivated to learn, if the functions printf, scanf, else, if so .... variables, guidelines prépocésseur (library) I learned recently I managed to understand and coded some interesting things with codeblocks on my pc but for now I'm stuck at the modulo%

Thank you for your answer! :)
wistine
 
Posts: 35
Joined: Tue Mar 27, 2012 12:54 pm

Re: [Tutorial] Introduction to programming using C (IV)

Postby asgard20032 » Sat Jun 30, 2012 5:47 am

wistine wrote:Thank you asgard 20032 very much for answering!
Do not worry regarding the consoles I have the psp 5.50 gen D3, vita 1.69 ps and a PS3 but not good topic.

As for the C language I would follow your advice, I would learn a little more than the basics and I ensuites orienterais to a GTK SDL as its what I will not be easy but I am motivated to learn, if the functions printf, scanf, else, if so .... variables, guidelines prépocésseur (library) I learned recently I managed to understand and coded some interesting things with codeblocks on my pc but for now I'm stuck at the modulo%

Thank you for your answer! :)


modulo is actually the remainder of a division.

Example: c = 2000 % 2

c = the remainder of 2000 divided per 2
modulo 2 is a good way to know if the number is odd or not.
Image
asgard20032
 
Posts: 259
Joined: Thu Jan 20, 2011 1:16 pm
Location: Milky Way, Solar system, Earth, North America, Canada, Québec..... In front of my computer

Re: [Tutorial] Introduction to programming using C (IV)

Postby m0skit0 » Sat Jun 30, 2012 11:35 am

Xian Nox wrote:Q: If gcj could compile for the PSP like gcc (iirc, the pspsdk used gcc), this would mean the JVM isn't necessary, right?

Sure thing. But you already have psp-gcc for that :mrgreen:
I wanna lots of mov al,0xb
Image
"just not into this RA stuffz"
User avatar
m0skit0
Guru
 
Posts: 4787
Joined: Mon Sep 27, 2010 6:01 pm

Re: [Tutorial] Introduction to programming using C (IV)

Postby wistine » Sat Jun 30, 2012 1:01 pm

asgard20032 wrote:
modulo is actually the remainder of a division.

Example: c = 2000 % 2

c = the remainder of 2000 divided per 2
modulo 2 is a good way to know if the number is odd or not.


Thank you for showing me a basic example, I finally understand, given that's how I see it now!

Here is an example:
7% 2
simplified to the spot I say in how many times 2 goes into 7
the answer is 3 because 2x3 = 6 and the modulus is the remainder of the division modulo therefore 7% 2 = 1

It's good thank you, I compressed it was made ​​simple!
wistine
 
Posts: 35
Joined: Tue Mar 27, 2012 12:54 pm

Previous

Return to Programming

Who is online

Users browsing this forum: No registered users and 0 guests