[Interested?] OldSchool Library
[Interested?] OldSchool Library
Hello all,
I'm working on a PSP library that allows you to create 2D games more easily, without having to learn PSP GE or GU. It's written in C, so it's useable in both C and C++.
For now there is an english and french documentation, but my english is not very good. I would just know if it interests somebody, so that I know if I should continue to work on it or not.
Here's an ALPHA version (this means it's still in development and some things might change): http://oslib.palib.info/OSLib.zip
Source: http://oslib.palib.info/OSLib_src.zip
It's now useable a bit. For example, you can play music and wav files, choose wether you want to stream it or not, load PNG files with an alpha channel, draw 4-point gradient rects, lines, text, message boxes, draw maps, rotate and stretch your images, make them transparent, draw on them by setting them as the current drawbuffer, mix differents pixelformats and so on very easily. It also includes a key handler, so you can get when a key was pressed or is currently held, set autorepeat values for some pressed keys. There are more features, and a lot of others are planned.
The library will be open source, LGPL or something so you can easily extend it. 3D is possible within the library context, but there's no integrated routine, you just have to use GU or GE in this case.
So, do you think it's useful, are some people interested that I continue to work on it?
Thank you in advance for your opinions :)
I'm working on a PSP library that allows you to create 2D games more easily, without having to learn PSP GE or GU. It's written in C, so it's useable in both C and C++.
For now there is an english and french documentation, but my english is not very good. I would just know if it interests somebody, so that I know if I should continue to work on it or not.
Here's an ALPHA version (this means it's still in development and some things might change): http://oslib.palib.info/OSLib.zip
Source: http://oslib.palib.info/OSLib_src.zip
It's now useable a bit. For example, you can play music and wav files, choose wether you want to stream it or not, load PNG files with an alpha channel, draw 4-point gradient rects, lines, text, message boxes, draw maps, rotate and stretch your images, make them transparent, draw on them by setting them as the current drawbuffer, mix differents pixelformats and so on very easily. It also includes a key handler, so you can get when a key was pressed or is currently held, set autorepeat values for some pressed keys. There are more features, and a lot of others are planned.
The library will be open source, LGPL or something so you can easily extend it. 3D is possible within the library context, but there's no integrated routine, you just have to use GU or GE in this case.
So, do you think it's useful, are some people interested that I continue to work on it?
Thank you in advance for your opinions :)
Last edited by Brunni on Thu Sep 14, 2006 6:29 am, edited 3 times in total.
Sorry for my bad english
Oldschool library for PSP - PC version released
Oldschool library for PSP - PC version released
-
- Posts: 8
- Joined: Sun Nov 13, 2005 7:23 am
Thank you for your replies, it's good not to feel to have done all this for nothing :) (sorry for the frenglish xD)
I don't know anything about SDL, sorry. But there is for sure a mean to do that, the only thing would be to convert your surface info to an OSL_IMAGE structure. I'll take a look at it.
For now I'm still working on it, yes. When finished, I'll try to do some simple games or applications with it and release their source code on this forum if it can interest somebody.
I don't know anything about SDL, sorry. But there is for sure a mean to do that, the only thing would be to convert your surface info to an OSL_IMAGE structure. I'll take a look at it.
For now I'm still working on it, yes. When finished, I'll try to do some simple games or applications with it and release their source code on this forum if it can interest somebody.
Sorry for my bad english
Oldschool library for PSP - PC version released
Oldschool library for PSP - PC version released
sprite function can easily be done, this is mine
x,y = position on screen
px,py = sprite position in picture (if you have multiple sprite in same picture)
sx,sy = size of the sprite
Code: Select all
void DrawSprite(OSL_IMAGE *ig, u16 x, u16 y, u16 px, u16 py, u16 sx, u16 sy)
{
ig->offsetX0 = px;
ig->offsetY0 = py;
ig->offsetX1 = px + sx;
ig->offsetY1 = py + sy;
ig->stretchX = sx;
ig->stretchY = sy;
ig->x = x;
ig->y = y;
oslDrawImageSimple(ig);
}
px,py = sprite position in picture (if you have multiple sprite in same picture)
sx,sy = size of the sprite
-
- Posts: 5
- Joined: Mon Jan 16, 2006 7:27 pm
Hi Brunni,
thanks for your work.
Is it the same project as PALIB wich is developped for the Nintendo DS ?
regards
psx frogger
thanks for your work.
Is it the same project as PALIB wich is developped for the Nintendo DS ?
regards
psx frogger
Last edited by psx-frogger on Tue Nov 21, 2006 6:52 am, edited 1 time in total.
Thank you for your replies. I'll try to traduce my doc in english then, because it seems to interest some people, but there's no warranty it will be enough to be understandable xD
It's Mollusk that programmed PALib, and he offered me some hosting for OSLib ^^
Mollusk > It seems harder because it's another world for you, but when you're in it, I wouldn't say it's really harder :-p
Orion_ > This could rather be done like this ;-)
Alain> There's no module playback functions for now, but I note it, it might come later. For now I want to finish the library so I can release it ;-)
It's Mollusk that programmed PALib, and he offered me some hosting for OSLib ^^
Mollusk > It seems harder because it's another world for you, but when you're in it, I wouldn't say it's really harder :-p
Orion_ > This could rather be done like this ;-)
Code: Select all
void DrawSprite(OSL_IMAGE *ig, u16 x, u16 y, u16 px, u16 py, u16 sx, u16 sy)
{
oslSetImageTileSize(ig, px, py, sx, sy);
oslDrawImageSimpleXY(ig, x, y);
}
Sorry for my bad english
Oldschool library for PSP - PC version released
Oldschool library for PSP - PC version released
I released a new version with a first try of english documentation!
You can download the latest zip, and read Doc/english.htm inside :-)
You can download the latest zip, and read Doc/english.htm inside :-)
Sorry for my bad english
Oldschool library for PSP - PC version released
Oldschool library for PSP - PC version released
Thanks for your great work.
in french:
Je débute avec la programmation sur psp et cette lib est vraiment l'idéal pour commencer à vrai dire j'ai hésiter entre SDL et OSLib, mais avec une doc bien faite et une simplicité d'utilisation certaine mon coeur à basculer vers ta superbe lib, continue sur ta lancée !
in french:
Je débute avec la programmation sur psp et cette lib est vraiment l'idéal pour commencer à vrai dire j'ai hésiter entre SDL et OSLib, mais avec une doc bien faite et une simplicité d'utilisation certaine mon coeur à basculer vers ta superbe lib, continue sur ta lancée !
Anyone out there who is looking for an easy to use and fast 2d library, give Oslib a try. Just to give you an idea of how fast it is. I am able to draw about 400 16x16 tiles EVERY pass while still keeping 60FPS.
The library is easy to use and the documentation covers almost everything you need to know to get started.
There are a few bugs in it but hopefully Brunni will get them figured out soon enough. I have only found one and found a way to get around it.
If I ever get my game finished, I will release it to show the capabilities of this library.
Brunni, would it be possible to make a built in function to display a nice "Powered by OSLIB" logo?
The library is easy to use and the documentation covers almost everything you need to know to get started.
There are a few bugs in it but hopefully Brunni will get them figured out soon enough. I have only found one and found a way to get around it.
If I ever get my game finished, I will release it to show the capabilities of this library.
Brunni, would it be possible to make a built in function to display a nice "Powered by OSLIB" logo?
Thanks :)
How would you like something like this for the logo?
For PSP: http://oslib.palib.info/samples/download/logo_15.zip
For (powerful) PC: http://oslib.palib.info/logo.zip
How would you like something like this for the logo?
For PSP: http://oslib.palib.info/samples/download/logo_15.zip
For (powerful) PC: http://oslib.palib.info/logo.zip
Sorry for my bad english
Oldschool library for PSP - PC version released
Oldschool library for PSP - PC version released
That's fine but can it be like "Powered by Oldschool Library" (so people know it's the engine and don't think that it's the name of the game)Brunni wrote:Thanks :)
How would you like something like this for the logo?
For PSP: http://oslib.palib.info/samples/download/logo_15.zip
For (powerful) PC: http://oslib.palib.info/logo.zip
It's not documented yet, but you have to create one with font2osl.exe (included in the tools folder) and then oslLoadFontFile("yourfont").
You can also convert an existing Windows font (run font2osl.exe without parameter for more info).
You can also convert an existing Windows font (run font2osl.exe without parameter for more info).
Sorry for my bad english
Oldschool library for PSP - PC version released
Oldschool library for PSP - PC version released
Transparency: oslSetAlpha with OSL_FX_ALPHA
Font: I used Verdana in my first demo, and it worked. Maybe I have broken something, I'll test it ^^
Font: I used Verdana in my first demo, and it worked. Maybe I have broken something, I'll test it ^^
Sorry for my bad english
Oldschool library for PSP - PC version released
Oldschool library for PSP - PC version released
Code: Select all
//transparency
oslSetAlpha(OSL_FX_ALPHA,alpha);
oslDrawImage(image);
//desactive transparency
oslSetAlpha(OSL_FX_RGBA,alpha);
well thats what i´ve tried ... doesn´t has any effect on the image ...Yodajr wrote:With "alpha" goes from 0 to 255Code: Select all
//transparency oslSetAlpha(OSL_FX_ALPHA,alpha); oslDrawImage(image); //desactive transparency oslSetAlpha(OSL_FX_RGBA,alpha);
I'm fairly new to programming for the PSP so forgive me if this is really simple stuff. I'm trying to use oslib to do some C++ programming and I've hit a few snags.
First, on line 60 of oslib.h you typedef a bool as a short. g++ complains that you can't redefine bool so I just put an #ifndef __cplusplus around that line. Is that correct or will it break something else?
Assuming that it was correct to not include that line, the second thing is that I'm getting multiple definitions of 'osl_powerCallback' in 'oslSetupFTrigo' while linking. This then breaks every oslib function that appears in my code.
My code (just a little test stub at the moment) compiles when I change the extension from .cpp to .c and remove -lstdc++ from the makefile.
Does anyone know where I'm going wrong?
First, on line 60 of oslib.h you typedef a bool as a short. g++ complains that you can't redefine bool so I just put an #ifndef __cplusplus around that line. Is that correct or will it break something else?
Assuming that it was correct to not include that line, the second thing is that I'm getting multiple definitions of 'osl_powerCallback' in 'oslSetupFTrigo' while linking. This then breaks every oslib function that appears in my code.
My code (just a little test stub at the moment) compiles when I change the extension from .cpp to .c and remove -lstdc++ from the makefile.
Does anyone know where I'm going wrong?