[C Help] Graphics Confusion
[C Help] Graphics Confusion
Meh...
I've tried sooo hard.
I've looked for such a long time and posted in many, many places...
I want to make a game, but I don't know how to properly display graphics on the PSP using C.
I did many tutorials, but none of them help me out with what I need.
Can someone post a sample in C for what is needed to blit a white pixel on the screen and move it around with the D-Pad using X and Y variables?
I know C very well, and I've created many text based programs. I want to take the next step and develop an actual game.
This would help me out very greatly. Thanks in advance!
^L^
I've tried sooo hard.
I've looked for such a long time and posted in many, many places...
I want to make a game, but I don't know how to properly display graphics on the PSP using C.
I did many tutorials, but none of them help me out with what I need.
Can someone post a sample in C for what is needed to blit a white pixel on the screen and move it around with the D-Pad using X and Y variables?
I know C very well, and I've created many text based programs. I want to take the next step and develop an actual game.
This would help me out very greatly. Thanks in advance!
^L^
It's a bit more than justa white dot... it's a whole cursor with some other stuff.
http://forums.ps2dev.org/viewtopic.php?p=66475#66475
If you read from there down, there's an update to that code to work with the TV modes.
http://forums.ps2dev.org/viewtopic.php?p=66568#66568
http://forums.ps2dev.org/viewtopic.php?p=66475#66475
If you read from there down, there's an update to that code to work with the TV modes.
http://forums.ps2dev.org/viewtopic.php?p=66568#66568
Thanks very much for this. However, both of those have a lot of extra coding for TV Out. I was wanting just a simple example.J.F. wrote:It's a bit more than justa white dot... it's a whole cursor with some other stuff.
http://forums.ps2dev.org/viewtopic.php?p=66475#66475
If you read from there down, there's an update to that code to work with the TV modes.
http://forums.ps2dev.org/viewtopic.php?p=66568#66568
I was wanting something simple like this....
Code: Select all
int x=70;
int y=70;
int main() {
SceCtrlData pad;
pspDebugScreenInit();
SetupCallbacks();
initGraphics();
printf("Test");
while(1){
sceCtrlReadBufferPositive(&pad, 1);
if(pad.Buttons & PSP_CTRL_UP) {
y-=1;
}
if(pad.Buttons & PSP_CTRL_DOWN) {
y+=1;
}
if(pad.Buttons & PSP_CTRL_RIGHT) {
x+=1;
}
if(pad.Buttons & PSP_CTRL_LEFT) {
x-=1;
}
putPixelScreen(0xFFFFFFFF,x,y);
}
flipScreen();
sceKernelSleepThread();
return 0;
}
I've been doing it on my PSP. It's no big rush so I haven't minded.Tinnus wrote:Maybe you should look into SDL :) MUCH easier, and faster, than plotting one pixel at a time :)
Also, you can code and debug your game in your desktop, and just recompile & tweak for PSP later.
And... I checked out SDL a while ago. I couldn't figure out how to set it up.
There are plenty of PSP programs that use SDL that you can look at for how you use SDL on the PSP. There are also plenty of simple SDL examples out there that you could then try on the PSP. The only major difference between using SDL on the PC and on the PSP is the makefile.
If you google around, it's easy to find places that explain SDL... like this:
http://www.friedspace.com/cprogramming/sdlpixels.php
If you google around, it's easy to find places that explain SDL... like this:
http://www.friedspace.com/cprogramming/sdlpixels.php
Honestly, as long as you can't understand something as simple as a program framework with SDL, you won't be able to program any games more complicated than "click the red rectangle". Just go slowly and learn stuff as you go. The idea is to go from the bottom up, not the other way around.
Let's see what the PSP reserves... well, I'd say anything is better than Palm OS.
I don't recomend PSP's scene newcomers using libraries like SDL. That's because writing some dot to the screen could sound silly, but it's didactic, indeed. Loading and writing sprites on the screen without the knowledge of what happens behyond the scene isn't really useful. If i find it, i will post my very first approach to PSP's framebuffer...
I actually am really good with C, I just could never get the graphics.c to work with any program I made like other people could. And whenever I did, it would, the screen would flicker black and white whenever I would run the game.jean wrote:I don't recomend PSP's scene newcomers using libraries like SDL. That's because writing some dot to the screen could sound silly, but it's didactic, indeed. Loading and writing sprites on the screen without the knowledge of what happens behyond the scene isn't really useful. If i find it, i will post my very first approach to PSP's framebuffer...
And I don't know how to install the SDL. I'm sure ti would be pretty easy to use, but I'm really unfamiliar with Cyqwin and PSPToolchain and whatnot.J.F. wrote:There are plenty of PSP programs that use SDL that you can look at for how you use SDL on the PSP. There are also plenty of simple SDL examples out there that you could then try on the PSP. The only major difference between using SDL on the PC and on the PSP is the makefile.
If you google around, it's easy to find places that explain SDL... like this:
http://www.friedspace.com/cprogramming/sdlpixels.php
-
- Posts: 160
- Joined: Wed Jul 12, 2006 7:09 am
Re: [C Help] Graphics Confusion
http://visilab.unime.it/~filippo/Nanode ... s/Docs.htm^L^ wrote:Meh...
I've tried sooo hard.
I've looked for such a long time and posted in many, many places...
I want to make a game, but I don't know how to properly display graphics on the PSP using C.
I did many tutorials, but none of them help me out with what I need.
Can someone post a sample in C for what is needed to blit a white pixel on the screen and move it around with the D-Pad using X and Y variables?
I know C very well, and I've created many text based programs. I want to take the next step and develop an actual game.
This would help me out very greatly. Thanks in advance!
^L^