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!

Best lib?

This is a discussion on Best lib? within the PSP Development Forum forums, part of the PSP Development, Hacks, and Homebrew category; Hi, Im wondering what is the best lib to use for a 2D game, OSLib? Also i there a sample ...

Reply
 
LinkBack Thread Tools
Old 08-15-2008, 10:50 PM   #1
 
basfreak's Avatar
 
Join Date: Dec 2007
Location: Netherlands
Posts: 147
Trader Feedback: 0
Default Best lib?

Hi,

Im wondering what is the best lib to use for a 2D game, OSLib?
Also i there a sample that plays a PMF movie?

Greetz.

Last edited by basfreak; 08-15-2008 at 11:14 PM..
basfreak is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 08-16-2008, 12:24 AM   #2
Raining
 
wicked_fable's Avatar
 
My Mood: Relaxed
Join Date: Jun 2005
Real First Name: Daniel
Location: In The Fog...
Just Played: Persona 4
Posts: 545
Trader Feedback: 0
Default

Well, OSLib is very popular. It was used to make many things lately like Sakya's LightMP3 application and SG57's Boxhead: PSP Style game. In my opinion, it seems like a pretty good option. Do a little bit of research and you can see what it can do.
__________________
wicked_fable is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 08-16-2008, 12:42 AM   #3
 
basfreak's Avatar
 
Join Date: Dec 2007
Location: Netherlands
Posts: 147
Trader Feedback: 0
Default

Ok, and is there a tutorial on how to install?
I tried one time but i failed
basfreak is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 08-16-2008, 01:04 AM   #4
Raining
 
wicked_fable's Avatar
 
My Mood: Relaxed
Join Date: Jun 2005
Real First Name: Daniel
Location: In The Fog...
Just Played: Persona 4
Posts: 545
Trader Feedback: 0
Default

Yup: http://oslib.playeradvance.org/doku.php?id=day1
__________________
wicked_fable is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 08-16-2008, 01:11 AM   #5

lol
 
Anti-QuickJay's Avatar
 
Join Date: Aug 2006
Real First Name: Robert
Location: Whittier, CA
Just Played: Madden 10
Posts: 5,791
Trader Feedback: 0
Default

Yea I think oslib is the best for 2d.
Anti-QuickJay is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 08-16-2008, 01:33 AM   #6

Developer
 
Join Date: Aug 2007
Location: Australia
Posts: 657
Trader Feedback: 0
Default

http://www.psp-hacks.com/forums/viewtopic.php?id=66708
__________________
Xsjado7 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 08-16-2008, 03:47 AM   #7
 
basfreak's Avatar
 
Join Date: Dec 2007
Location: Netherlands
Posts: 147
Trader Feedback: 0
Default

And is there a easy way to animate?
Or just in a while i++
and load image[i] ?
basfreak is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 08-16-2008, 05:01 AM   #8

Developer
 
Raphael's Avatar
 
Join Date: Jan 2006
Location: Germany
Posts: 919
Trader Feedback: 0
Default

triEngine supports both sprite animation and playback of .pmp videos. The latter can even easily be taken apart and integrated into any other library.
http://www.fx-world.org/wordpress/?p=43
__________________
Raphs board rules #31: Excessive use of punctuation is either a sign of a lesser ego or a small mind. Avoid it if you don't want to look like a total moron.
Raphs board rules #17: When you need to ask whether you are capable of doing something, you are not.
Raphs board rules #2: Exploits aren't found by changing version numbers, blindly merging data into a file or turning your PSP upside down.
Raphs board rules #1: If you have no clue how exploits work, don't come up with ideas about them.
Raphael is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 08-16-2008, 05:02 AM   #9

...in a dream...
 
SG57's Avatar
 
Join Date: Jul 2005
Posts: 4,957
Trader Feedback: 0
Default

I wrote an animation class for OSlib. I need to update it to have a memory management system (so you can have say 2 of hte same animations going at once yet they use the same resources).
__________________
SG57 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 08-16-2008, 05:14 AM   #10

Developer
 
homemister91's Avatar
 
Join Date: Sep 2007
Location: AUS
Posts: 281
Trader Feedback: 0
Default

how fast is openTRI?
__________________
Heres to the Wyvern,
Heres to getting Wyvern,
Heres to staying Wyvern,
And if you can't get Wyvern.......
You should become a kingsman!

http://arnold.hyperphp.com/ arnold, Light_AleX and my releases

homemister91 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 08-16-2008, 05:43 AM   #11

Developer
 
Raphael's Avatar
 
Join Date: Jan 2006
Location: Germany
Posts: 919
Trader Feedback: 0
Default

As fast as you can get a PSP engine without directly interfacing the hardware
__________________
Raphs board rules #31: Excessive use of punctuation is either a sign of a lesser ego or a small mind. Avoid it if you don't want to look like a total moron.
Raphs board rules #17: When you need to ask whether you are capable of doing something, you are not.
Raphs board rules #2: Exploits aren't found by changing version numbers, blindly merging data into a file or turning your PSP upside down.
Raphs board rules #1: If you have no clue how exploits work, don't come up with ideas about them.
Raphael is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 08-16-2008, 06:20 AM   #12
 
_df_'s Avatar
 
Join Date: May 2007
Posts: 121
Trader Feedback: 0
Default

Well I always liked SDL, since its portable and I can write the same game with little to no change for my desktop, psp + gp2x. Having a PC version helps so much in debugging.
__________________
-- Code Monkey : Sarien, Fishguts, Cracks and Crevices --

"Did IQ's just drop sharply while I was away?" (Ripley)
_df_ is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 08-16-2008, 06:24 AM   #13

Developer
 
Raphael's Avatar
 
Join Date: Jan 2006
Location: Germany
Posts: 919
Trader Feedback: 0
Default

True, but using SDL comes at the cost of a big speed penalty on PSP. Matter of choice though really - speed vs. portability.
__________________
Raphs board rules #31: Excessive use of punctuation is either a sign of a lesser ego or a small mind. Avoid it if you don't want to look like a total moron.
Raphs board rules #17: When you need to ask whether you are capable of doing something, you are not.
Raphs board rules #2: Exploits aren't found by changing version numbers, blindly merging data into a file or turning your PSP upside down.
Raphs board rules #1: If you have no clue how exploits work, don't come up with ideas about them.
Raphael is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 08-16-2008, 07:51 AM   #14

...in a dream...
 
SG57's Avatar
 
Join Date: Jul 2005
Posts: 4,957
Trader Feedback: 0
Default

Raphael - IIRC SDL was converted to use the GU and is much faster then the old software rendering...
__________________
SG57 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 08-16-2008, 08:42 AM   #15


Developer
 
Join Date: Aug 2006
Posts: 79
Trader Feedback: 0
Default

An alternative is JGE++ which allows to develop the game for both PSP and windows, it makes debbugging and development really easy.
It has been discontinued but has quite a lot of features.

http://jge.khors.com
wololo is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 08-16-2008, 09:00 AM   #16

Developer
 
Raphael's Avatar
 
Join Date: Jan 2006
Location: Germany
Posts: 919
Trader Feedback: 0
Default

Quote:
Originally Posted by SG57 View Post
Raphael - IIRC SDL was converted to use the GU and is much faster then the old software rendering...
Yeah, there seems to be some gu code inserted and also an option to link to PSPGL... but then again, SDL is just a big hack in itself IMO. It tries to push other APIs (like OGL or DX) inside it's own rather limited (again IMO) interface. Definately not my type of choice, but anyone can make up his own mind on this.
__________________
Raphs board rules #31: Excessive use of punctuation is either a sign of a lesser ego or a small mind. Avoid it if you don't want to look like a total moron.
Raphs board rules #17: When you need to ask whether you are capable of doing something, you are not.
Raphs board rules #2: Exploits aren't found by changing version numbers, blindly merging data into a file or turning your PSP upside down.
Raphs board rules #1: If you have no clue how exploits work, don't come up with ideas about them.
Raphael is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 08-16-2008, 01:24 PM   #17
 
brethren's Avatar
 
Join Date: Apr 2007
Posts: 464
Trader Feedback: 0
Default

i've just done a rough port of sdl game engine from here http://www.zefix.tv/sge2d/
and i have to say that i'm not impressed with the speed of sdl on the psp. i think its probably better to stick with libraries developed specifically for the psp....who knows maybe iwn will finally release pge
brethren is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 08-16-2008, 01:39 PM   #18
 
basfreak's Avatar
 
Join Date: Dec 2007
Location: Netherlands
Posts: 147
Trader Feedback: 0
Default

Anyone tips @ pmf playing and animation?
basfreak is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 08-16-2008, 03:22 PM   #19

Developer
 
Raphael's Avatar
 
Join Date: Jan 2006
Location: Germany
Posts: 919
Trader Feedback: 0
Default

Well, .pmp is basically a .pmf, just in a different container but if you specifically need a .pmf player you're pretty much out of luck - the closest you can get is by using the pmf sample code from magiK on ps2dev.org back from when he found the avc decoding mechanism. It's not too noob-friendly really though and integrating it into a library isn't all that easy.
If you just want an easy out-of-box solution for video playback, there's nothing else than pmplib from triEngine.
__________________
Raphs board rules #31: Excessive use of punctuation is either a sign of a lesser ego or a small mind. Avoid it if you don't want to look like a total moron.
Raphs board rules #17: When you need to ask whether you are capable of doing something, you are not.
Raphs board rules #2: Exploits aren't found by changing version numbers, blindly merging data into a file or turning your PSP upside down.
Raphs board rules #1: If you have no clue how exploits work, don't come up with ideas about them.
Raphael is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 08-16-2008, 03:38 PM   #20

Developer
 
homemister91's Avatar
 
Join Date: Sep 2007
Location: AUS
Posts: 281
Trader Feedback: 0
Default

BTW i have been using OSLib and started using openTRI and it seams from my point of view that OSLib is more nood freindly, but openTRI has a faster rendering engine.
__________________
Heres to the Wyvern,
Heres to getting Wyvern,
Heres to staying Wyvern,
And if you can't get Wyvern.......
You should become a kingsman!

http://arnold.hyperphp.com/ arnold, Light_AleX and my releases

homemister91 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 08-16-2008, 04:31 PM   #21

Developer
 
Raphael's Avatar
 
Join Date: Jan 2006
Location: Germany
Posts: 919
Trader Feedback: 0
Default

Quote:
it seams from my point of view that OSLib is more nood freindly, but openTRI has a faster rendering engine.
Well, I'd call it a fact But in regards to the pmplib, you cannot make video playback any noob-friendlier

Code from the sample:
Code:
int main(int argc, char **argv)
{
	SetupCallbacks();
	triLogInit();
	
	char* result = pmp_init();
	if (result != 0)
	{
		triLogPrint("ERROR: %s\n", result);
		sceKernelExitGame();
	}
	printf("pmp_init() succeeded.\n");

	// playback can always be interrupted by pressing START
	result = pmp_play( "test.pmp", 1, GU_PSM_4444 );
	if (result != 0)
	{
		triLogPrint("ERROR: %s\n", result);
		sceKernelExitGame();
	}
	
	while (isrunning && pmp_isplaying())
	{
		sceKernelDelayThread(1000);
	}
	pmp_stop();

	triLogShutdown();
	sceKernelExitGame();
	return 0;
}
If you take out the safety checks and common code, it's 5 lines of code to playback a video and wait for it to finish
__________________
Raphs board rules #31: Excessive use of punctuation is either a sign of a lesser ego or a small mind. Avoid it if you don't want to look like a total moron.
Raphs board rules #17: When you need to ask whether you are capable of doing something, you are not.
Raphs board rules #2: Exploits aren't found by changing version numbers, blindly merging data into a file or turning your PSP upside down.
Raphs board rules #1: If you have no clue how exploits work, don't come up with ideas about them.
Raphael is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 08-16-2008, 04:53 PM   #22

Developer
 
homemister91's Avatar
 
Join Date: Sep 2007
Location: AUS
Posts: 281
Trader Feedback: 0
Default

yeh i agree.
But i was talking about 2d rendering and image loading.
OSLib has much more functionality.
-=Double Post Merge =-
How can i maximise openTRI's image drawing. I am using vram and swizzle ATM.
__________________
Heres to the Wyvern,
Heres to getting Wyvern,
Heres to staying Wyvern,
And if you can't get Wyvern.......
You should become a kingsman!

http://arnold.hyperphp.com/ arnold, Light_AleX and my releases


Last edited by homemister91; 08-16-2008 at 04:58 PM.. Reason: Automerged Doublepost
homemister91 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 08-16-2008, 05:19 PM   #23

Developer
 
xart's Avatar
 
Join Date: Dec 2005
Posts: 1,873
Trader Feedback: 0
Default

I too using openTRI for OpenChoice project, OSLib is a good lib for getting started but you will bump into issues, and openTRI comes in source code type so can fix any errors in the lib that you find quite easy.

I like openTRI as it has some realy nice functions and is designed for the PSP
and supports simple 2d image stuff easer than OSLib, I found it lacking on images
__________________
www.xart.co.uk

coreXlib, old school library.

ColorSync Display Profiles for MacBook (LG LCD) & New MacBook (AUO LCD)
Profile for LG LP133WX1
Profile for AUO B133EW01
xart is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 08-16-2008, 05:38 PM   #24

Developer
 
Raphael's Avatar
 
Join Date: Jan 2006
Location: Germany
Posts: 919
Trader Feedback: 0
Default

Quote:
Originally Posted by homemister91 View Post
How can i maximise openTRI's image drawing. I am using vram and swizzle ATM.
If you want to do scaling/blending on the images, try to use paletted images where possible. Maybe I'm gonna include a quantizer to palettize truecolor images to 8/4bit sometime in the future. For quality it's probably better to use a good graphics software like Photoshop or GIMP to do that step.
If you just need raw blits of images without scaling or transparency (background tilemap) then try to use the same pixelformat as you setup your framebuffer with, without swizzling and use the triBltSprite function. That's the fastest image drawing you will ever get (at the cost of no blending,etc.)
__________________
Raphs board rules #31: Excessive use of punctuation is either a sign of a lesser ego or a small mind. Avoid it if you don't want to look like a total moron.
Raphs board rules #17: When you need to ask whether you are capable of doing something, you are not.
Raphs board rules #2: Exploits aren't found by changing version numbers, blindly merging data into a file or turning your PSP upside down.
Raphs board rules #1: If you have no clue how exploits work, don't come up with ideas about them.
Raphael is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 08-16-2008, 05:43 PM   #25

Developer
 
homemister91's Avatar
 
Join Date: Sep 2007
Location: AUS
Posts: 281
Trader Feedback: 0
Default

thx i will try it
-=Double Post Merge =-
do i use it like this;
Quote:
triImage* image;
image = triImageLoad(luaL_checkst ring(L, 1), TRI_VRAM);
triBltSprite(x, y,0.0f,0.0f, image);
__________________
Heres to the Wyvern,
Heres to getting Wyvern,
Heres to staying Wyvern,
And if you can't get Wyvern.......
You should become a kingsman!

http://arnold.hyperphp.com/ arnold, Light_AleX and my releases


Last edited by homemister91; 08-16-2008 at 05:50 PM.. Reason: Automerged Doublepost
homemister91 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 08-16-2008, 06:05 PM   #26

Developer
 
Raphael's Avatar
 
Join Date: Jan 2006
Location: Germany
Posts: 919
Trader Feedback: 0
Default

Quote:
Originally Posted by homemister91 View Post
thx i will try it
-=Double Post Merge =-
do i use it like this;
Parameters are same as triDrawSprite, so yes.
It needs a call to
Quote:
void triSpriteMode( triFloat width, triFloat height, triFloat angle );
beforehand though to set the width/height of the sprite drawing.
So just add a triSpriteMode( image->width, image->height, 0.f ); after the triImageLoad call.

NOTE TO SELF: Add a fallback to image width/height if triSpriteMode isn't set.
__________________
Raphs board rules #31: Excessive use of punctuation is either a sign of a lesser ego or a small mind. Avoid it if you don't want to look like a total moron.
Raphs board rules #17: When you need to ask whether you are capable of doing something, you are not.
Raphs board rules #2: Exploits aren't found by changing version numbers, blindly merging data into a file or turning your PSP upside down.
Raphs board rules #1: If you have no clue how exploits work, don't come up with ideas about them.
Raphael is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 08-16-2008, 06:09 PM   #27

Developer
 
homemister91's Avatar
 
Join Date: Sep 2007
Location: AUS
Posts: 281
Trader Feedback: 0
Default

thx
I am now using openTRI as the core for LPHMv2
Awesome
-=Double Post Merge =-
how do i draw the sprite with alpha?
-=Double Post Merge =-
don't worry i got it now.
__________________
Heres to the Wyvern,
Heres to getting Wyvern,
Heres to staying Wyvern,
And if you can't get Wyvern.......
You should become a kingsman!

http://arnold.hyperphp.com/ arnold, Light_AleX and my releases


Last edited by homemister91; 08-16-2008 at 06:21 PM.. Reason: Automerged Doublepost
homemister91 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 08-16-2008, 08:38 PM   #28
 
Join Date: Jul 2007
Posts: 296
Trader Feedback: 0
Default

Quote:
That's the fastest image drawing you will ever get (at the cost of no blending,etc.)
.
_dysfunctional is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Tags
lib

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 11:43 AM.



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