QJ.NET | Videos | Forums | iPhone | MMORPG | Nintendo DS | Wii | PlayStation 3 | PSP | Xbox 360 | PC | Downloads | Contact Us
Forums | Gaming News | Videos | Downloads | Today's Posts | Mark Forums Read | Chat | FAQ | Members List | Contact

QJ.net Game Discussion - PSP, Xbox, Wii, PS3, PSP Homebrew, and PSP Guides

Go Back   QJ.net Game Discussion - PSP, Xbox, Wii, PS3, PSP Homebrew, and PSP Guides > Developers Corner > PSP Development, Hacks, and Homebrew > PSP Development Forum
The above video goes away if you are a member and logged in, so log in now!

Three new tutorials added (3D c++)

This is a discussion on Three new tutorials added (3D c++) within the PSP Development Forum forums, part of the PSP Development, Hacks, and Homebrew category; Hi folks, I have added three new tutorials. Texture tutorial: This is the first of a series of tutorials on ...

Reply
 
LinkBack Thread Tools
Old 11-10-2007, 01:27 PM   #1
 
Join Date: Oct 2007
Location: Netherlands
Posts: 44
Trader Feedback: 0
Default Three new tutorials added (3D c++)

Hi folks,

I have added three new tutorials.

Texture tutorial: This is the first of a series of tutorials on texturing, this will simply explain some basic and function and let you use a texture for a triangle. No optimisations yet in this tutorial.

FPS counter: I will show you how ot create a frame per second counter. Updates every second

Screenfading tutorial: This tutorial explains how screenfading can be done. It is really easy

Hope you all like the updates

http://www.ghoti.nl/PSPtutorials.php

greets ghoti
Ghoti is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 11-10-2007, 01:30 PM   #2

Developer
 
Bubbletune's Avatar
 
Join Date: Apr 2007
Posts: 1,493
Trader Feedback: 0
Default

As always, nice work
Bedankt!
__________________
Bubbletune's Release Site
Bubbletune is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 11-10-2007, 04:12 PM   #3
 
Join Date: Sep 2007
Posts: 105
Trader Feedback: 0
Default

This is great! Thanks for these tuts. Bookmarking now..
Gusjdt is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 11-10-2007, 06:01 PM   #4


Developer
 
Xfacter's Avatar
 
Join Date: May 2006
Posts: 114
Trader Feedback: 0
Default

Quote:
char buffer[256];
sprintf(buffer, "texture.png");
texture = loadImage(buffer);
Extremely unnecessary. Please remove this to prevent confusion.
__________________

For game downloads and development updates, check out my website.
http://xfacter.wordpress.com/
Xfacter is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 11-11-2007, 06:19 AM   #5
 
Join Date: Oct 2007
Location: Netherlands
Posts: 44
Trader Feedback: 0
Default

Quote:
Originally Posted by Xfacter
Extremely unnecessary. Please remove this to prevent confusion.
What exactly do you mean? not using the sprintf but just passing the "texture.png" directly to the function? because that does not work when I try that :s

Quote:
Originally Posted by JumpR
As always, nice work
Bedankt!
Thanks!
Jij ook bedankt he altijd leuk reactie te krijgen van Nederlanders

Quote:
Originally Posted by Gusjdt
This is great! Thanks for these tuts. Bookmarking now..
No problems I like to do it and it also is useful for me because sometimes I use things that are not so great and people correct me like Xfacter and so I learn also
Ghoti is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 11-11-2007, 06:34 AM   #6

Developer
 
yaustar's Avatar
 
Join Date: Jun 2006
Location: UK
Posts: 2,317
Trader Feedback: 0
Default

Code:
 texture = loadImage("texture.png");
Works.
yaustar is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 11-11-2007, 06:55 AM   #7
Banned for LIFE
 
Join Date: Oct 2006
Location: East London, England
Posts: 2
Trader Feedback: 0
Default

Yaustar what is the purpose of the buffer other than to get on my nerves ? I remember yeldarb doing it for images too.
eldiablov is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 11-11-2007, 06:56 AM   #8
 
Join Date: Oct 2007
Location: Netherlands
Posts: 44
Trader Feedback: 0
Default

Quote:
Originally Posted by yaustar
Code:
 texture = loadImage("texture.png");
Works.
Yes indeed thanks for that, in a simple sample it did not work but I know now why and it works so indeed you guys were right will change it in the tuts
Ghoti is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 11-11-2007, 06:57 AM   #9
Banned for LIFE
 
Join Date: Oct 2006
Location: East London, England
Posts: 2
Trader Feedback: 0
Default

These tuorials made me look at c++ differently. Its looks cleaner than C. Is there a tut on loading models and blitting them and animating them ?
eldiablov is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 11-11-2007, 07:04 AM   #10
 
Join Date: Oct 2007
Location: Netherlands
Posts: 44
Trader Feedback: 0
Default

Quote:
Originally Posted by eldiablov
These tuorials made me look at c++ differently. Its looks cleaner than C. Is there a tut on loading models and blitting them and animating them ?
Well yes I think that c++ helps with creating code which is better to read. I do not know if everyone agrees but I think with the help of classes you can order your source a lot better. I like this way of programming in any case

Well I am busy with creating a tutorial at the moment which let you load up triangulated .obj files to let the readers get a feel on how to write code that loads up models but I will not create a super perfect model loader which let you load up everything you want (simply because I can't create a super perfect model loader ) but I think it will be a very handy tutorial for you guys when you want to load 3d models.
Ghoti is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 11-11-2007, 07:05 AM   #11
Banned for LIFE
 
Join Date: Oct 2006
Location: East London, England
Posts: 2
Trader Feedback: 0
Default

Just borrow a model loader from someone else and demonstrate how to use it. That would be easier IMO.
eldiablov is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 11-11-2007, 07:11 AM   #12
 
Join Date: Oct 2007
Location: Netherlands
Posts: 44
Trader Feedback: 0
Default

Quote:
Originally Posted by eldiablov
Just borrow a model loader from someone else and demonstrate how to use it. That would be easier IMO.
yes it would be easier but not as much fun and ofcourse when you understand the basics you can create on exactly to your needs without unneccesary overhead so it would mean that it will work more efficient or faster i hope
Ghoti is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 11-11-2007, 07:29 AM   #13
Banned for LIFE
 
Join Date: Oct 2006
Location: East London, England
Posts: 2
Trader Feedback: 0
Default

Aah yes, adapt it to your needs, very true. I look forward to your next tut.
eldiablov is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 11-11-2007, 07:47 AM   #14
 
 
Join Date: Mar 2007
Location: Neverland
Posts: 44
Trader Feedback: 0
Default nice..

Cool tutorials, keep it up

Nederlanders nemen QJ over Kijk als je wilt ook eens op mn site die in mn sig staat. Wij gaan ook tuts aanbieden
feddemaster is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 11-11-2007, 10:49 AM   #15

Developer
 
yaustar's Avatar
 
Join Date: Jun 2006
Location: UK
Posts: 2,317
Trader Feedback: 0
Default

Quote:
Originally Posted by eldiablov
Yaustar what is the purpose of the buffer other than to get on my nerves ? I remember yeldarb doing it for images too.
In this example, nothing. What it can be used for is to generate file names/paths from other information.

e.g
Code:
const int MAX_CHAR_BUFFER = 256;
char buffer[MAX_CHAR_BUFFER];
for( int i = 0; i < MAX_NUM_IMAGES ++i )
{
	snprintf( buffer, MAX_CHAR_BUFFER, "randomName_%d", i );
	textures[i] = loadImage( buffer );
}
yaustar is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 11-11-2007, 10:53 AM   #16
 
Join Date: Oct 2007
Location: Netherlands
Posts: 44
Trader Feedback: 0
Default

Quote:
Originally Posted by feddemaster
Cool tutorials, keep it up

Nederlanders nemen QJ over Kijk als je wilt ook eens op mn site die in mn sig staat. Wij gaan ook tuts aanbieden
Thanks ! hope they help

Ja je gaat het haast denken he
Ghoti is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 11-11-2007, 10:55 AM   #17

Developer
 
placo23's Avatar
 
Join Date: Aug 2007
Posts: 726
Trader Feedback: 0
Default

Quote:
Originally Posted by eldiablov
Yaustar what is the purpose of the buffer other than to get on my nerves ? I remember yeldarb doing it for images too.
I use it like this:

Code:
char image_name[56];
int i;
for (i=0; i<DECK_SIZE; i++ ) {
         sprintf ( image_name, "./cards/%s.png",cards[i]);
         imgObj[i] = oslLoadImageFile(image_name, OSL_IN_RAM, OSL_PF_8888);
}
But be carefull with that, as you're using a buffers, and it tends to be slightly slower than loading image by image

UPDATE
D'oh! Yaustar posted almost the same thing as I posted... Well anyways.. that one uses OSLib to load the image
__________________
Placo23

Spoiler for Wanna see my Apps?:
Why not donate and become part of this selected list?
Spoiler for Donators:
DarkSeveN - 5.100.000
--DylanDangles--2.000.000
Zuiver - 100.000
AlwaysAmiYumi - 10.338.63
placo23 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 11-11-2007, 11:02 AM   #18
 
Join Date: Oct 2007
Location: Netherlands
Posts: 44
Trader Feedback: 0
Default

Quote:
Originally Posted by placo23
I use it like this:

Code:
char image_name[56];
int i;
for (i=0; i<DECK_SIZE; i++ ) {
         sprintf ( image_name, "./cards/%s.png",cards[i]);
         imgObj[i] = oslLoadImageFile(image_name, OSL_IN_RAM, OSL_PF_8888);
}
But be carefull with that, as you're using a buffers, and it tends to be slightly slower than loading image by image

UPDATE
D'oh! Yaustar posted almost the same thing as I posted... Well anyways.. that one uses OSLib to load the image
Quote:
Originally Posted by yaustar
In this example, nothing. What it can be used for is to generate file names/paths from other information.

e.g
Code:
const int MAX_CHAR_BUFFER = 256;
char buffer[MAX_CHAR_BUFFER];
for( int i = 0; i < MAX_NUM_IMAGES ++i )
{
	snprintf( buffer, MAX_CHAR_BUFFER, "randomName_%d", i );
	textures[i] = loadImage( buffer );
}
Yes I also use it in Boxy II with the animated backgrounds but I now use it everywhere but now I know I have to remember not to do it.
Ghoti is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 11-12-2007, 10:18 AM   #19
 
Jomann's Avatar
 
Join Date: Aug 2006
Location: Washington
Posts: 758
Trader Feedback: 0
Default

so could an lua noob like me learn c++ with this?
__________________
[URL="http://jomann18.deviantart.com/"][IMG]http://img242.imageshack.us/img242/5020/bestsigeveraw1or8.png[/IMG][/URL]
[COLOR=Red][B][SIZE=3][URL="http://jomann18.deviantart.com/"]Hey look its a link to my deviant art maybe you should click it just for kicks eh?[/URL][/SIZE][/B][/COLOR]
Jomann is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 11-12-2007, 10:21 AM   #20

Developer
 
Bubbletune's Avatar
 
Join Date: Apr 2007
Posts: 1,493
Trader Feedback: 0
Default

Quote:
Originally Posted by Jomann
so could an lua noob like me learn c++ with this?
I don't think so, these 3D tutorials are for already experienced people, I suggest you to read the tutorials at psp-programming.com to start off with
__________________
Bubbletune's Release Site
Bubbletune is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 11-12-2007, 10:39 AM   #21

Developer
 
yaustar's Avatar
 
Join Date: Jun 2006
Location: UK
Posts: 2,317
Trader Feedback: 0
Default

Quote:
Originally Posted by JumpR
I don't think so, these 3D tutorials are for already experienced people, I suggest you to read the tutorials at psp-programming.com to start off with
Not even that, psp-programming doesn't teach C++.

Read: http://parabellumgames.wordpress.com...c-programming/
yaustar is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 11-12-2007, 10:40 AM   #22
 
Jomann's Avatar
 
Join Date: Aug 2006
Location: Washington
Posts: 758
Trader Feedback: 0
Default

Quote:
Originally Posted by JumpR
I don't think so, these 3D tutorials are for already experienced people, I suggest you to read the tutorials at psp-programming.com to start off with
oh ok thanks, i have already done so and made a program (hello world) so i will start again! thanks
__________________
[URL="http://jomann18.deviantart.com/"][IMG]http://img242.imageshack.us/img242/5020/bestsigeveraw1or8.png[/IMG][/URL]
[COLOR=Red][B][SIZE=3][URL="http://jomann18.deviantart.com/"]Hey look its a link to my deviant art maybe you should click it just for kicks eh?[/URL][/SIZE][/B][/COLOR]
Jomann is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 05-05-2008, 03:02 AM   #23
 
Join Date: Mar 2008
Posts: 3
Trader Feedback: 0
Default

thanks
jyaan is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Tags
added , tutorials

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off



All times are GMT -8. The time now is 10:59 AM.



Use of this Web site constitutes acceptance of the TERMS & CONDITIONS and PRIVACY POLICY
Copyright © 2009, QJ.NET. All Rights Reserved.
Contact Us