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!

2D RPG Engine Project

This is a discussion on 2D RPG Engine Project within the PSP Development Forum forums, part of the PSP Development, Hacks, and Homebrew category; EDIT 08/18: I figured people might check the 1st post here, and it's WAY old... EDIT 11/18: Actual screenshot on ...

Reply
 
LinkBack Thread Tools
Old 08-07-2005, 12:31 AM   #1
 
framerate's Avatar
 
Join Date: Aug 2005
Location: Indiana
Posts: 389
Trader Feedback: 0
Default 2D RPG Engine Project - Screenshot!

EDIT 08/18:

I figured people might check the 1st post here, and it's WAY old...

EDIT 11/18:

Actual screenshot on the current build. Zelda sprites for test purposes.
Progressing nicely....



So I've only spent a few hours at it tonight, and my C skills aren't as good as they should be, but I've decided to teach myself PSP Programming by making a basic 2D homebrew RPG engine.

Starting with the movement engine, I wrote the basic program that will keep track of your X/Y Coordinates on the screen. It currently limits the boundries to 100x1000, but this will be tweaked as I add more.

I'M ONLY RELEASING THIS CODE AS A LEARNING PROCESS.
I figure there's a lot of you out there like me just getting started with PSP programming. So do what I did. Install the SDK, look at Guess PSP, Snake, and the Maze Gen (all are great programs that show different aspects of the PSP programming) and play around with it.

DO NOT DOWNLOAD EXPECTING A GAME. IT ONLY PRINTS X/Y COORDINATES TO THE SCREEN AT THIS POINT.

This hopefully will evolve into something great, but it depends on how busy work and my dotcom business keeps me...

http://www.framerate.info/psp/test.zip for this test code.

We'll see where it takes me tomorrow. I'd like to get some basic graphics or perhaps an event trigger programmed. We'll see...
__________________
[URL=http://www.framerate.info/psp][IMG]http://www.framerate.info/_hosted/imageupload/signature.gif[/IMG][/URL]

Last edited by framerate; 08-18-2006 at 06:16 AM.. Reason: update
framerate is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 08-07-2005, 12:38 AM   #2
 
marketkid82's Avatar
 
Join Date: Jul 2005
Location: cali
Posts: 876
Trader Feedback: 0
Default

Cool?
__________________
[center]
Just because your paranoid, doesn't mean someones not following you. (Member since 7/20/05)
[img]http://acrility.net/Animation2.gif[/img]
:ROFL::ROFL::ROFL:
Throw a tomato at a forum member
[img]http://instagiber.net/smiliesdotcom/otn/funny/tomato.gif[/img] [img]http://www.garpland.com/v2/html/emoticons/Boo.gif[/img]
[/center]
marketkid82 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 08-07-2005, 12:42 AM   #3
PREMIUM Member
 
PorpoiseOfEmail's Avatar
 
Join Date: Aug 2005
Posts: 35
Trader Feedback: 0
Default

Good Luck. From experience though, i recommend you find some people to help you out if you want something decent. Trust me, trying to do gfx, music, story, battle system and stats is not a solo job ^^
PorpoiseOfEmail is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 08-07-2005, 12:48 AM   #4
 
framerate's Avatar
 
Join Date: Aug 2005
Location: Indiana
Posts: 389
Trader Feedback: 0
Default

heh yeah.. well they told me that too for my dotcom (social networking, 5 subject news, and a "yellowpages" of hip places around the world, yet I have it over 50% done by myself and I'm just now trying to add a 2nd coder but having trouble finding what to tell him to do!

Most of my work is just a learning experience anyways, I like learning new things... so this is just another of those. So far it's going well. It all just depends on how much time I have to put into it.

If you want to offer me some help via AIM, my name is youaremylast on there, I'd love to see some basic code you used to show the images in SIMON!

(I'm sure if someone really wanted to help, I wouldn't refuse it.. just at this point I need to make some progress on my own)
__________________
[URL=http://www.framerate.info/psp][IMG]http://www.framerate.info/_hosted/imageupload/signature.gif[/IMG][/URL]
framerate is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 08-07-2005, 12:56 AM   #5
 
framerate's Avatar
 
Join Date: Aug 2005
Location: Indiana
Posts: 389
Trader Feedback: 0
Default

Also....

(in a perfect world) All I'm setting out to do at this point is the basic engine. Load a gfx background, and either random or load a .txt file with event triggers. Event triggers would be start battle, getItem, or change map..

Battle engine would just be fight or run... Simple (i've done it before on a TI-86 ha. but that's not REAL progamming).

So my goal is rather realizable for one person...

If it works that far, then you're right. It' be nice to have someone helping with story/gfx/sound etc...

We'll see how it goes... even if I don't get past my initial vision, I'm sure someone else could use it to continue..
__________________
[URL=http://www.framerate.info/psp][IMG]http://www.framerate.info/_hosted/imageupload/signature.gif[/IMG][/URL]
framerate is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 08-07-2005, 01:37 AM   #6
PREMIUM Member
 
PorpoiseOfEmail's Avatar
 
Join Date: Aug 2005
Posts: 35
Trader Feedback: 0
Default

Quote:
Originally Posted by framerate
heh yeah.. well they told me that too for my dotcom (social networking, 5 subject news, and a "yellowpages" of hip places around the world, yet I have it over 50% done by myself and I'm just now trying to add a 2nd coder but having trouble finding what to tell him to do!

Most of my work is just a learning experience anyways, I like learning new things... so this is just another of those. So far it's going well. It all just depends on how much time I have to put into it.

If you want to offer me some help via AIM, my name is youaremylast on there, I'd love to see some basic code you used to show the images in SIMON!

(I'm sure if someone really wanted to help, I wouldn't refuse it.. just at this point I need to make some progress on my own)
Hahaha. Well, i can easily show you how to do image display like i do in Simon. Unfortunately depending on the size of your project it may be terribly innefficient due to the fact the eboot would get too large in size ^_^. I'm going to release the source for simon soon. The code is pretty clean, but it lacks comments, and ofcourse comments will help. ;]

but if you want a quick...simple..run down of imgs here:
http://www.psp.to/tools/
convert your jpg into code and shove into bitmap.c

add #include "bitmap.c" to your main file and make sure pg.h is included:

pgFillvram(0); //fills bg
pgPrint4(4,7,0xffff,"Pres ents"); //for text (xloc,yloc,color, char string)
pgBitBlt(160,40,80,80,2,i mage_seclogo); //(xloc,yloc,width,height, array name in bitmap.c)
pgScreenFlipV();
pgWaitVn(200); //pause
PorpoiseOfEmail is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 08-07-2005, 09:25 AM   #7
 
framerate's Avatar
 
Join Date: Aug 2005
Location: Indiana
Posts: 389
Trader Feedback: 0
Default

Thanks man, I'm gonna try that here in a sec (I dreamt about PSP code last night hah)

The worst part about programming for the PSP is the lack of documentation (but we're still early in it's life cycle).. hard to learn this stuff on your own.

So far everyone has been really cool =)

Thanks again for the image code.
__________________
[URL=http://www.framerate.info/psp][IMG]http://www.framerate.info/_hosted/imageupload/signature.gif[/IMG][/URL]
framerate is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 08-07-2005, 10:30 AM   #8
 
framerate's Avatar
 
Join Date: Aug 2005
Location: Indiana
Posts: 389
Trader Feedback: 0
Default

question...

pgBitBlt(160,40,80,80,2,i mage_seclogo); //(xloc,yloc,width,height, array name in bitmap.c)

you're passing 6 variables, but only telling me what 5 of them are =)

Im displaying my text but it's all garbled on screen. My goal right now is to get a full screen image to display... Any help on that?
__________________
[URL=http://www.framerate.info/psp][IMG]http://www.framerate.info/_hosted/imageupload/signature.gif[/IMG][/URL]
framerate is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 08-07-2005, 10:54 AM   #9
PREMIUM Member
 
PorpoiseOfEmail's Avatar
 
Join Date: Aug 2005
Posts: 35
Trader Feedback: 0
Default

Quote:
Originally Posted by framerate
question...

pgBitBlt(160,40,80,80,2,i mage_seclogo); //(xloc,yloc,width,height, array name in bitmap.c)

you're passing 6 variables, but only telling me what 5 of them are =)

Im displaying my text but it's all garbled on screen. My goal right now is to get a full screen image to display... Any help on that?
o lol. whoops. Well, you can look in the function in pg.c. Its decently documented. Even then, if you scan the code, you should get the gist of it ^_^
PorpoiseOfEmail is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 08-07-2005, 11:01 AM   #10
 
framerate's Avatar
 
Join Date: Aug 2005
Location: Indiana
Posts: 389
Trader Feedback: 0
Default

Yeah I got it to display right by looking at some code on psp.to. when I set the background to an image, the size/resolution of my text changes majorly. I know this is simple, but now I just have to learn why that's happening (I assume it's since I'm drawing to a buffer instead of straight to screen?)

Yay!
__________________
[URL=http://www.framerate.info/psp][IMG]http://www.framerate.info/_hosted/imageupload/signature.gif[/IMG][/URL]
framerate is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 08-07-2005, 12:37 PM   #11
PREMIUM Member
 
PorpoiseOfEmail's Avatar
 
Join Date: Aug 2005
Posts: 35
Trader Feedback: 0
Default

Quote:
Originally Posted by framerate
Yeah I got it to display right by looking at some code on psp.to. when I set the background to an image, the size/resolution of my text changes majorly. I know this is simple, but now I just have to learn why that's happening (I assume it's since I'm drawing to a buffer instead of straight to screen?)

Yay!
pgBitBlt(160,40,80,80,2,i mage_seclogo); //(xloc,yloc,width,height, array name in bitmap.c)

That 2 in the function call is for magnitude. If you looked at pg.c, you'd have seen that. ;p
Putting a 2 there means youre stretching it. If you want perfect res you'll want to put a 1.
PorpoiseOfEmail is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 08-07-2005, 03:40 PM   #12
 
framerate's Avatar
 
Join Date: Aug 2005
Location: Indiana
Posts: 389
Trader Feedback: 0
Default

hey now! I looked at pg.c! I just didn't post back about it

I'd really like to see your source for simon, if you have it ready at all soon... I notice on the score you seem to be using printf to print it, instead of doing some sort of RGB hack with pgPrint() like I'm trying to do... (I'm pretty sure it's just my inability to remember my old graphics knowledge...)

I've made some great progress today though, I'm displaying the images and still keeping track of the movement/location. Now I'm just going to connect the image to the movement...

EDIT: to clarify my problem, using pgPring() to print the text works fine, if I clear the screen after every button input.. but then if I get that damn flicker.. So I'm trying to set up double bufferring (which I assume is the easiest fix for this). From what I remember, that's the easiest and most efficient way to get rid of the flicker, but I'm just not 100% on how the PSP does it
__________________
[URL=http://www.framerate.info/psp][IMG]http://www.framerate.info/_hosted/imageupload/signature.gif[/IMG][/URL]
framerate is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 08-07-2005, 04:40 PM   #13
PREMIUM Member
 
PorpoiseOfEmail's Avatar
 
Join Date: Aug 2005
Posts: 35
Trader Feedback: 0
Default

Quote:
Originally Posted by framerate
hey now! I looked at pg.c! I just didn't post back about it

I'd really like to see your source for simon, if you have it ready at all soon... I notice on the score you seem to be using printf to print it, instead of doing some sort of RGB hack with pgPrint() like I'm trying to do... (I'm pretty sure it's just my inability to remember my old graphics knowledge...)

I've made some great progress today though, I'm displaying the images and still keeping track of the movement/location. Now I'm just going to connect the image to the movement...

EDIT: to clarify my problem, using pgPring() to print the text works fine, if I clear the screen after every button input.. but then if I get that damn flicker.. So I'm trying to set up double bufferring (which I assume is the easiest fix for this). From what I remember, that's the easiest and most efficient way to get rid of the flicker, but I'm just not 100% on how the PSP does it

I'll go ahead and post the SIMON source with the next update which should either be today or tomorrow. Hopefully that'll help.
Im having issues getting sound to work ;[
PorpoiseOfEmail is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 08-07-2005, 05:19 PM   #14
 
framerate's Avatar
 
Join Date: Aug 2005
Location: Indiana
Posts: 389
Trader Feedback: 0
Default

Aww sorry to hear it. i've gotten about all I'm going to get done on my project for the weekend. I think I'm going to take it easy tonight and play with it more tomorrow a bit...

I'll look for your source soon, I have a feeling it'll help answer a few of my graphics questions.
__________________
[URL=http://www.framerate.info/psp][IMG]http://www.framerate.info/_hosted/imageupload/signature.gif[/IMG][/URL]
framerate is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 08-11-2005, 06:33 PM   #15
 
caste's Avatar
 
Join Date: Jun 2005
Posts: 34
Trader Feedback: 0
Default

i'm terrible at c++, i just picked it up this week. but i wanted to see if i could pass the x and y variables on to the position of a text character and have it move around with the d pad. here's my very sloppy, very ghetto results.
Attached Files
File Type: zip movement2.zip‎ (44.7 KB, 25 views)
caste is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 08-12-2005, 09:07 AM   #16
 
framerate's Avatar
 
Join Date: Aug 2005
Location: Indiana
Posts: 389
Trader Feedback: 0
Default

Nice work =) I don't have the PSP to test it on yet, but I'm going to have a look at it soon. I was going to do something like this soon...

My concept is something like a square on the left side of the screen (height of 100% of the screen with equal width) will be the movement area. I'm working on putting a background image of some grass for now.. with a static picture of a guy moving on it..

the left over on the right will keep track of debug information like x/y coords and eventually HP/MP and level...

Perhaps we could work on it together some time.
__________________
[URL=http://www.framerate.info/psp][IMG]http://www.framerate.info/_hosted/imageupload/signature.gif[/IMG][/URL]
framerate is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 08-12-2005, 09:09 AM   #17
 
framerate's Avatar
 
Join Date: Aug 2005
Location: Indiana
Posts: 389
Trader Feedback: 0
Default

Send me an email or AIM (youaremylast) I can send you some updated code that has the beginnings of the BMP code and such
__________________
[URL=http://www.framerate.info/psp][IMG]http://www.framerate.info/_hosted/imageupload/signature.gif[/IMG][/URL]
framerate is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 08-12-2005, 10:03 PM   #18
 
framerate's Avatar
 
Join Date: Aug 2005
Location: Indiana
Posts: 389
Trader Feedback: 0
Default

Some updated code, in case anyone is keeping track.

It uses a new menu with BMP image display (all just placeholders for now).

Press triangle to get back to the menu.

I need to use double buffering to get rid of the flicker, but using pg.c doesn't seem too easy? Suggestions are welcomed.

This is good code if you're just starting PSP programming, see how object oriented should work with respect to the menu system..

http://www.framerate.info/psp/rpg_test.zip
__________________
[URL=http://www.framerate.info/psp][IMG]http://www.framerate.info/_hosted/imageupload/signature.gif[/IMG][/URL]
framerate is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 08-13-2005, 08:49 AM   #19
 
caste's Avatar
 
Join Date: Jun 2005
Posts: 34
Trader Feedback: 0
Default

hey, i haven't gotten a chance to im you yet, but the zip you just uploaded is still you're original code you posted a few days ago.

i'd like to see what you're doing with bitmaps, i haven't taken the time yet to learn how to call images
caste is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 08-13-2005, 09:26 AM   #20
 
framerate's Avatar
 
Join Date: Aug 2005
Location: Indiana
Posts: 389
Trader Feedback: 0
Default

Quote:
Originally Posted by caste
hey, i haven't gotten a chance to im you yet, but the zip you just uploaded is still you're original code you posted a few days ago.

i'd like to see what you're doing with bitmaps, i haven't taken the time yet to learn how to call images
EDIT: you were right, I uploaded the wrong zip.. SHould be fixed now =)

Images really aren't that hard, www.psp.to/tools has a tool to convert them to a c file which you can call from your program (I call an image in my menu(); function, check it out!

I'm just trying to figure out how to do the map images.. if you take an image off the upper left hand corner (by moving the background to make the impression of movement) the PSP locks up... So I think I'm going to have to redraw the frame every time?

I'm thinking (if anyone has any thoughts) read in a txt file that has something like:

GGGGGRGGGG
GGGGRGGGGG
GGGGGRGGGG
GGGGGBGGGG
GGGGGRGGGG

(where G would be interpreted as a grass tile, R as a river, B as a bridge, T as a tree etc)

Then the character would stay stationary in the center and when you moved it would take your location and update the screen by redrawing the shifted tiles to give the impression of movement... (flicker is going to be REALLY bad I'm sure.. if anyone can point me towards some simple double buffering tutorial or other way to lose the flicker I'd appreciate it)
__________________
[URL=http://www.framerate.info/psp][IMG]http://www.framerate.info/_hosted/imageupload/signature.gif[/IMG][/URL]
framerate is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 08-13-2005, 10:06 AM   #21
 
caste's Avatar
 
Join Date: Jun 2005
Posts: 34
Trader Feedback: 0
Default

ha, sorry, i don't know how i redownloaded the original. anyway, i'm going to go through that code and see what i can discern, it doesn't seem too bad.
caste is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 08-13-2005, 10:21 AM   #22
 
framerate's Avatar
 
Join Date: Aug 2005
Location: Indiana
Posts: 389
Trader Feedback: 0
Default

SEe my edit.. you were right. I uploaded the wrong one =(

But I fixed it now!
__________________
[URL=http://www.framerate.info/psp][IMG]http://www.framerate.info/_hosted/imageupload/signature.gif[/IMG][/URL]
framerate is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 08-13-2005, 05:29 PM   #23
 
framerate's Avatar
 
Join Date: Aug 2005
Location: Indiana
Posts: 389
Trader Feedback: 0
Default

Quote:
Originally Posted by caste
hey, i haven't gotten a chance to im you yet, but the zip you just uploaded is still you're original code you posted a few days ago.

i'd like to see what you're doing with bitmaps, i haven't taken the time yet to learn how to call images
If those links are yours in your sig, I definitely think we could work together.. It's going to be a learning experience for both of us, I'm sure.. But I'm serious about finishing this.
__________________
[URL=http://www.framerate.info/psp][IMG]http://www.framerate.info/_hosted/imageupload/signature.gif[/IMG][/URL]
framerate is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 08-15-2005, 09:30 PM   #24
 
FinalChad's Avatar
 
Join Date: Jul 2005
Posts: 14
Trader Feedback: 0
Default

any idea how i could modify pgBitBlt in pg.c to take in a certain color and make it transparent?

edit: whoops, I got it.
FinalChad is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 08-18-2005, 05:14 PM   #25
 
Join Date: Jun 2005
Posts: 16
Trader Feedback: 0
Default

Hi there,

I'm just trying to get to grips with the Primitive Graphics stuff and was wondering if you could answer a quick question. Why does the text not appear in white in the following code?

Code:
// Modified Hello World - My First App for the PSP

#include <pspkernel.h>
#include <pspdebug.h> 

#include "pg.h"
#include "colors.h"

PSP_MODULE_INFO("Hello World", 0, 1, 1); 

#define printf pspDebugScreenPrintf 

// Callback init and stuff skipped for clarity

int main(){
           
           //pspDebugScreenInit();
           SetupCallbacks();
           pgInit();
           //pgScreenFrame(2,0);
           //printf("Hello World");
           pgPrint(10,10,white,"Test PG Print!");
           pgScreenFlipV();
           sceKernelSleepThread();
           return 0;
}
I've commented ou the debugscreen and printf stuff, and I get a black screen which presumably is the pgScreenFlip. Am I missing a step out somewhere?

Also, is my makefile correct? Im using:

Code:
TARGET = hello
CFILES = main.c pg.c
OFILES = main.o pg.o
OBJS = main.o pg.o

CFLAGS = -O2 -G0 -Wall
CXXFLAGS = $(CFLAGS) -fno-exceptions -fno-rtti
ASFLAGS = $(CFLAGS)

EXTRA_TARGETS = EBOOT.PBP
PSP_EBOOT_TITLE = Hello World

PSPSDK=$(shell psp-config --pspsdk-path)
include $(PSPSDK)/lib/build.mak
Any help greatfully appriciated! Cheers,
S.
Slopey is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 08-18-2005, 05:32 PM   #26
 
framerate's Avatar
 
Join Date: Aug 2005
Location: Indiana
Posts: 389
Trader Feedback: 0
Default

Do you get the same black screen with pspDebugScreenInit() uncommented?
__________________
[URL=http://www.framerate.info/psp][IMG]http://www.framerate.info/_hosted/imageupload/signature.gif[/IMG][/URL]
framerate is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 08-18-2005, 08:04 PM   #27
 
framerate's Avatar
 
Join Date: Aug 2005
Location: Indiana
Posts: 389
Trader Feedback: 0
Default

Update.. I reworked the menu program.. if anyone's looking for a neat way to do a menu, I did:

printMenu(int selected): where you pass the selected option of the menu to a switch statement. It then prints the whole menu UNSELECTED and uses the switch to print the one you're on as the SELECTED color..

menuAction(int selected): is just a switch statement with the options of the menu and what functions they call

and menu()": contorls both above

(something like this)

void menu() {
if (menuFlag==1) {
menuFlag=0;
}
int menu_selected = 1;
SceCtrlData control;

pgFillvram(BACKGROUND_COL OR);
printMenu(1);

while(menuFlag==0){
sceCtrlReadBufferPositive (&control, 1);
printMenu(menu_selected);
pgWaitVn(5);

if ((control.Buttons & PSP_CTRL_UP) && menu_selected > 1) {
menu_selected--;
}
if ((control.Buttons & PSP_CTRL_DOWN) && menu_selected < 4) {
menu_selected++;
}
if (control.Buttons & PSP_CTRL_CROSS) {
menuAction(menu_selected) ;
}

}

}

I'm working on adding the txt file map input and the simple graphic tiles right now... with the sprite in the middle and movement.. but it looks horrible on the single buffer.

IF ANYONE has a good example using pg.c and double buffering, please let me know. The Tank demo I've already seen... thanks! I should have an updated release soon!
__________________
[URL=http://www.framerate.info/psp][IMG]http://www.framerate.info/_hosted/imageupload/signature.gif[/IMG][/URL]
framerate is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 08-18-2005, 08:38 PM   #28
 
framerate's Avatar
 
Join Date: Aug 2005
Location: Indiana
Posts: 389
Trader Feedback: 0
Default



I know it's not much, but if anyone wants to play around with this screen, please do...
__________________
[URL=http://www.framerate.info/psp][IMG]http://www.framerate.info/_hosted/imageupload/signature.gif[/IMG][/URL]
framerate is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 08-23-2005, 11:57 AM   #29
 
framerate's Avatar
 
Join Date: Aug 2005
Location: Indiana
Posts: 389
Trader Feedback: 0
Default

Not a lot of interest in a 2-D RPG I guess =(

Oh well.. Coming along nicely =)
__________________
[URL=http://www.framerate.info/psp][IMG]http://www.framerate.info/_hosted/imageupload/signature.gif[/IMG][/URL]
framerate is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 08-23-2005, 12:18 PM   #30
 
Join Date: Jul 2005
Location: H-Town, Louisiana
Posts: 358
Trader Feedback: 0
Default

So youre making an rpg... :drool: :drool: :drool:

Is this going to be an actual RPG or is it going to be something like Lua and you can mod it to your liking??
Axeus is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Tags
engine , project , rpg

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 05:22 AM.



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