Seite 335 von 340 ErsteErste ... 235 285 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 LetzteLetzte
Zeige Ergebnis 10.021 bis 10.050 von 10174

C/C++ Programming Help Thread

This is a discussion on C/C++ Programming Help Thread within the PSP Development Forum forums, part of the PSP Development, Hacks, and Homebrew category; Zitat von ButMan Yea i know and it works thanks but now when i have pressed X it works but ...

  
  1. #10021
    QJ Gamer Gold
    Points: 17.453, Level: 84
    Level completed: 21%, Points required for next Level: 397
    Overall activity: 0%

    Registriert seit
    Jul 2005
    Ort
    everywhere
    Beiträge
    3.526
    Points
    17.453
    Level
    84
    Downloads
    1
    Uploads
    0

    Standard

    Zitat Zitat von ButMan Beitrag anzeigen
    Yea i know and it works thanks but now when i have pressed X it works but the background keep flashing from white to black.And only the first menu item is showd, but when i go down the next buttons show but the first option is still in the select color...It's kinda weird got some suggestions?
    code:
    Code:
    int main() {
    	SetupCallbacks();
    	initGraphics();
    	pspDebugScreenInit();
    	SceCtrlData pad;
    	int State=0;
    	State=0;
    	while(1){
    		sceCtrlReadBufferPositive(&pad,1);
    		
    		if(State==0){
    			timer++;
    			for(foo=0;foo<10;foo++) {
    				if((pad.Buttons & PSP_CTRL_CROSS) && (select == 0)) {
    					printTextScreen(200,foo*10+70,menuItems[foo],black);
    				}
    				printTextScreen(200,select*10+70,menuItems[select],red);
    				if((pad.Buttons & PSP_CTRL_UP) && (timer > 10) && (select > 0)) {
    					select--;
    					timer = 0;
    				} else if ((pad.Buttons & PSP_CTRL_DOWN) && (timer > 10) && (select < 9)) {
    					select++;
    					timer = 0;
    				}
    				if((pad.Buttons & PSP_CTRL_CROSS) && (select == 0)) {
    					State=1;
    				}
    			flipScreen();
    			}
    		}else if(State==1){
    			pspDebugScreenClear();
    			printTextScreen(5,5, "blabla", red);
    			flipScreen();
    			sceDisplayWaitVblank();
    			if(pad.Buttons&PSP_CTRL_CIRCLE){
    				pspDebugScreenClear();
    				State=0;
    			}
    		}
    			if((pad.Buttons & PSP_CTRL_CROSS) && (select == 0)) {
    		State==1;
    		}
    	
    	}
    	return 0;
    }
    that's because the screen is never cleared at the menu, so it's always being drawn to the framebuffer, and the framebuffer is never cleared for when their's a change, which is why the select stays the same, as for the black->white flashing, in your old code you filled the screen white(which also acted as a screen clearer), i don't see that here, so i'm not sure why it'd be flashing white


    1. Failed....again...
    2. http://slicer.gibbocool.com/ stay updated on all my projects
    3. it'll be 5 years in june, that's nearly 1/4 of my life on this planet that i've visited these forums, what a ride it has been

  2. #10022
    QJ Gamer Gold
    Points: 13.372, Level: 75
    Level completed: 31%, Points required for next Level: 278
    Overall activity: 0%

    Registriert seit
    Nov 2008
    Ort
    CAD
    Beiträge
    693
    Points
    13.372
    Level
    75
    Downloads
    19
    Uploads
    4

    Standard

    okay, so I'm trying to use the regular intraFont lib by benHur in my C++ program, I know how to use intraFont but the only problem is, C++ has some issues with the fact of making pointers out of voids.
    does someone know how to work around this?
    Geändert von mootjeuh (02-11-2010 um 10:42 AM Uhr)

  3. #10023
    QJ Gamer Gold
    Points: 17.453, Level: 84
    Level completed: 21%, Points required for next Level: 397
    Overall activity: 0%

    Registriert seit
    Jul 2005
    Ort
    everywhere
    Beiträge
    3.526
    Points
    17.453
    Level
    84
    Downloads
    1
    Uploads
    0

    Standard

    Zitat Zitat von mootjeuh Beitrag anzeigen
    okay, so I'm trying to use the regular intraFont lib by benHur in my C++ program, I know how to use intraFont but the only problem is, C++ has some issues with the face of making pointers out of voids.
    does someone know how to work around this?
    haha, mootjeuh, u be in luck, just today i changed the code to work in c++, i'll upload the new intrafont.cpp and libccc.cpp, all i did was change the void's to typecasted them to what they needed to be, i plan to take it further and remove malloc/free into new/delete, but it works in c++ now

    edit: just realized i added one line that refrences some stuff in my code, so i've updated the file so it should work fully now
    Angehängte Dateien Angehängte Dateien
    1. Failed....again...
    2. http://slicer.gibbocool.com/ stay updated on all my projects
    3. it'll be 5 years in june, that's nearly 1/4 of my life on this planet that i've visited these forums, what a ride it has been

  4. #10024
    QJ Gamer Gold
    Points: 13.372, Level: 75
    Level completed: 31%, Points required for next Level: 278
    Overall activity: 0%

    Registriert seit
    Nov 2008
    Ort
    CAD
    Beiträge
    693
    Points
    13.372
    Level
    75
    Downloads
    19
    Uploads
    4

    Standard

    dude you saved my life =D thanks man! really appreciated
    Geändert von mootjeuh (02-11-2010 um 10:42 AM Uhr)

  5. #10025
    QJ Gamer Green
    Points: 2.003, Level: 27
    Level completed: 2%, Points required for next Level: 147
    Overall activity: 0%

    Registriert seit
    Jun 2009
    Beiträge
    61
    Points
    2.003
    Level
    27
    Downloads
    0
    Uploads
    0

    Standard

    Does some1 knows the code to printf the pommel, tachyon and baryon of the psp...I already found 1 but i needed a homemade header file but the download link is gone

    Here's also a much easier question that I just can't figure out for some reason: I wanna print the cpu speed like
    Code:
     printf("%-14s: %d mHz\n", "CPU Speed", scePowerGetCpuClockFrequency());
    	          printf("%-14s: %d mHz\n", "Bus Speed", scePowerGetBusClockFrequency());
    But then in printextscreen from graphics.h Cause for some reason my program wont work whit pspdebug
    Geändert von LegendMythe (01-06-2010 um 12:13 PM Uhr)

  6. #10026
    QJ Gamer Gold
    Points: 14.678, Level: 78
    Level completed: 57%, Points required for next Level: 172
    Overall activity: 0%

    Registriert seit
    Nov 2006
    Beiträge
    1.523
    Points
    14.678
    Level
    78
    Downloads
    0
    Uploads
    0

    Standard

    Is there still interest in creating VSH prxes?

  7. #10027
    QJ Gamer Gold
    Points: 13.372, Level: 75
    Level completed: 31%, Points required for next Level: 278
    Overall activity: 0%

    Registriert seit
    Nov 2008
    Ort
    CAD
    Beiträge
    693
    Points
    13.372
    Level
    75
    Downloads
    19
    Uploads
    4

    Standard

    Zitat Zitat von Mr305 Beitrag anzeigen
    Is there still interest in creating VSH prxes?
    well, I haven't given up on my libVSH that's for sure ;)
    I want to update it but I don't have any ideas for new functions

  8. #10028
    Points: 1.356, Level: 20
    Level completed: 56%, Points required for next Level: 44
    Overall activity: 0%
    Achievements:
    First 1000 Experience Points

    Registriert seit
    Jan 2010
    Ort
    asdf
    Beiträge
    6
    Points
    1.356
    Level
    20
    Downloads
    0
    Uploads
    0

    Standard

    Hey, can you or someone explain thoroughly how to compile.

  9. #10029
    QJ Gamer Green
    Points: 2.003, Level: 27
    Level completed: 2%, Points required for next Level: 147
    Overall activity: 0%

    Registriert seit
    Jun 2009
    Beiträge
    61
    Points
    2.003
    Level
    27
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von clearlyjunk Beitrag anzeigen
    Hey, can you or someone explain thoroughly how to compile.
    What are you having problems with? Do you already have something like cygwin, minipspw ore pspdev?

    If you have , put your program files (main.c and makefile) in a folder and call it "Project" and paste the folder on your "c" drive then open cmd (go to start tipe cmd in the search thingy and then klik cmd) then type "cd/" and hit enter then type "cd Project" and hit enter then type "make" then hit enter it wait it'll make an EBOOT

    If you still have problems tell me what you wanna make and give you error code and tell me your os(Ubuntu,Windows, Linux , mac)

  10. #10030
    QJ Gamer Gold
    Points: 13.372, Level: 75
    Level completed: 31%, Points required for next Level: 278
    Overall activity: 0%

    Registriert seit
    Nov 2008
    Ort
    CAD
    Beiträge
    693
    Points
    13.372
    Level
    75
    Downloads
    19
    Uploads
    4

    Standard

    Zitat Zitat von clearlyjunk Beitrag anzeigen
    Hey, can you or someone explain thoroughly how to compile.
    you gotta be kidding, there's a tutorial about this

  11. #10031
    Points: 1.356, Level: 20
    Level completed: 56%, Points required for next Level: 44
    Overall activity: 0%
    Achievements:
    First 1000 Experience Points

    Registriert seit
    Jan 2010
    Ort
    asdf
    Beiträge
    6
    Points
    1.356
    Level
    20
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von LegendMythe Beitrag anzeigen
    What are you having problems with? Do you already have something like cygwin, minipspw ore pspdev?

    If you have , put your program files (main.c and makefile) in a folder and call it "Project" and paste the folder on your "c" drive then open cmd (go to start tipe cmd in the search thingy and then klik cmd) then type "cd/" and hit enter then type "cd Project" and hit enter then type "make" then hit enter it wait it'll make an EBOOT

    If you still have problems tell me what you wanna make and give you error code and tell me your os(Ubuntu,Windows, Linux , mac)
    Thanks :) thats gonna be helpful, but i was reading the tutorial by Acess_denied, and i didnt really understand how to create a MakeFile. :\

    Zitat Zitat von mootjeuh Beitrag anzeigen
    you gotta be kidding, there's a tutorial about this
    Thats why i actually posted up here. Could you please link a tut for me thats specific to the psp, or tell me where to go?

  12. #10032
    QJ Gamer Green
    Points: 2.003, Level: 27
    Level completed: 2%, Points required for next Level: 147
    Overall activity: 0%

    Registriert seit
    Jun 2009
    Beiträge
    61
    Points
    2.003
    Level
    27
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von clearlyjunk Beitrag anzeigen
    Thanks :) thats gonna be helpful, but i was reading the tutorial by Acess_denied, and i didnt really understand how to create a MakeFile. :\



    Thats why i actually posted up here. Could you please link a tut for me thats specific to the psp, or tell me where to go?
    Here's a short tut how to make a makefile:
    1)First open bloc notes, if you dont have bloc notes you can try using Microsoft visual (it's free) ore codeblock (also free)
    2)Then don't type anything, but click directly the "save as" button.
    3)Then under the browser whit all your folders you'll see to phrases :"filename" and " "save as" (it may be different cause i got a dutch pc wich i'm trying to translate)
    4)the cange the save as to "all filles" and type as filename:"Makefile"(and not.txt)
    5)Close blocknotes and open your makefile
    6)Open your makefile with blocnotes and paste your makefile text and save it
    If this don't work and it saves it as txt, then go to your sdk directory and then go to psp/sdk/samples/controller and copy the makefile, then open it with bloc notes and erase the text and type your normal makefile text

    hope this'll work

    Anyways does anyone else knows a sample ore source of a plugin
    Geändert von LegendMythe (01-10-2010 um 09:31 AM Uhr)

  13. #10033
    xMod.
    Points: 4.576, Level: 43
    Level completed: 13%, Points required for next Level: 174
    Overall activity: 0%

    Registriert seit
    Oct 2008
    Ort
    Melbourne, Australia
    Beiträge
    675
    Points
    4.576
    Level
    43
    My Mood
    Daring
    Downloads
    0
    Uploads
    0

    Standard

    Anyways does anyone else knows a sample ore source of a plugin
    In the templates folder.
    I hate those monkeys ZOMG!
    -~Slasher~-
    http://i18.tinypic.com/4m848p5.gif

  14. #10034
    QJ Gamer Gold
    Points: 13.372, Level: 75
    Level completed: 31%, Points required for next Level: 278
    Overall activity: 0%

    Registriert seit
    Nov 2008
    Ort
    CAD
    Beiträge
    693
    Points
    13.372
    Level
    75
    Downloads
    19
    Uploads
    4

    Standard

    Zitat Zitat von clearlyjunk Beitrag anzeigen
    Thats why i actually posted up here. Could you please link a tut for me thats specific to the psp, or tell me where to go?
    sure, here you are: [TUT] Beginner C Programming Tutorials

  15. #10035
    QJ Gamer Gold
    Points: 13.372, Level: 75
    Level completed: 31%, Points required for next Level: 278
    Overall activity: 0%

    Registriert seit
    Nov 2008
    Ort
    CAD
    Beiträge
    693
    Points
    13.372
    Level
    75
    Downloads
    19
    Uploads
    4

    Standard

    okay, so I started working on a Vlf version of my image viewer (ASIV), but the only thing is with Vlf I can't compile with the pspiofilemgr (which I use for the browser). Does anybody how to work around that? I've tried editing my Makefile in every way possible :(

  16. #10036
    Points: 1.295, Level: 19
    Level completed: 95%, Points required for next Level: 5
    Overall activity: 0%
    Achievements:
    First 1000 Experience Points

    Registriert seit
    Jan 2010
    Ort
    london
    Beiträge
    1
    Points
    1.295
    Level
    19
    Downloads
    0
    Uploads
    0

    Standard

    Good information, thanks for sharing with us. It would be helpful for me....

  17. #10037
    QJ Gamer Gold
    Points: 17.453, Level: 84
    Level completed: 21%, Points required for next Level: 397
    Overall activity: 0%

    Registriert seit
    Jul 2005
    Ort
    everywhere
    Beiträge
    3.526
    Points
    17.453
    Level
    84
    Downloads
    1
    Uploads
    0

    Standard

    Zitat Zitat von rozoord Beitrag anzeigen
    Good information, thanks for sharing with us. It would be helpful for me....
    um, wat?
    1. Failed....again...
    2. http://slicer.gibbocool.com/ stay updated on all my projects
    3. it'll be 5 years in june, that's nearly 1/4 of my life on this planet that i've visited these forums, what a ride it has been

  18. #10038
    QJ Gamer Gold
    Points: 13.372, Level: 75
    Level completed: 31%, Points required for next Level: 278
    Overall activity: 0%

    Registriert seit
    Nov 2008
    Ort
    CAD
    Beiträge
    693
    Points
    13.372
    Level
    75
    Downloads
    19
    Uploads
    4

    Standard

    I'm guessing he's trying to bring his post count up to 10. God Damn Spammer ARGH:rtfm:
    That epic dude.

  19. #10039
    QJ Gamer Gold
    Points: 17.453, Level: 84
    Level completed: 21%, Points required for next Level: 397
    Overall activity: 0%

    Registriert seit
    Jul 2005
    Ort
    everywhere
    Beiträge
    3.526
    Points
    17.453
    Level
    84
    Downloads
    1
    Uploads
    0

    Standard

    Zitat Zitat von mootjeuh Beitrag anzeigen
    I'm guessing he's trying to bring his post count up to 10. God Damn Spammer ARGH:rtfm:
    he's apparantly not doing a good job, still at 1=-)
    1. Failed....again...
    2. http://slicer.gibbocool.com/ stay updated on all my projects
    3. it'll be 5 years in june, that's nearly 1/4 of my life on this planet that i've visited these forums, what a ride it has been

  20. #10040
    Developer
    Points: 8.092, Level: 60
    Level completed: 72%, Points required for next Level: 58
    Overall activity: 0%

    Registriert seit
    Jul 2008
    Ort
    Grand Rapids! MI
    Beiträge
    125
    Points
    8.092
    Level
    60
    Downloads
    5
    Uploads
    2

    Standard

    i think its time to leave that in the past get back to some sort of talk about programming *hint hint*

  21. #10041
    QJ Gamer Gold
    Points: 13.372, Level: 75
    Level completed: 31%, Points required for next Level: 278
    Overall activity: 0%

    Registriert seit
    Nov 2008
    Ort
    CAD
    Beiträge
    693
    Points
    13.372
    Level
    75
    Downloads
    19
    Uploads
    4

    Standard

    Today, I made a little function that allows me to set the alpha value of an image (for the libGE library). But whenever I try to use it for a fade in effect, my PSP crashes. Here's the code, maybe I did something wrong?
    Code:
    void SetAlphaValue(ge_Image *image, u8 alpha)
    {
    	u8 r, g, b, a;
    	image->alpha = alpha;
    	int key = 0;
    	int i, j;
    	
    	for(i = 0; i < (image->textureWidth*image->textureHeight); i++) {
    		r = image->data[i] & 0xff;
    		g = (image->data[i] >> 8) & 0xff;
    		b = (image->data[i] >> 16) & 0xff;
    		a = (image->data[i] >> 24);
    		for(j = 0; j < image->nColorKeys; j++) {
    			if(image->data[i] == image->ColorKeys[j]) {
    				key = 1;
    				break;
    			}
    		}
    		if(!key) image->data[i] = r | (g << 8) | (b << 16) | ((a - (a-alpha)) << 24);
    		key = 0;
    	}
    }
    Geändert von mootjeuh (02-03-2010 um 10:12 AM Uhr)

  22. #10042
    QJ Gamer Gold
    Points: 17.453, Level: 84
    Level completed: 21%, Points required for next Level: 397
    Overall activity: 0%

    Registriert seit
    Jul 2005
    Ort
    everywhere
    Beiträge
    3.526
    Points
    17.453
    Level
    84
    Downloads
    1
    Uploads
    0

    Standard

    Zitat Zitat von mootjeuh Beitrag anzeigen
    Today, I made a little function that allows me to set the alpha value of an image (for the libGE library). But whenever I try to use it for a fade in effect, my PSP crashes. Here's the code, maybe I did something wrong?
    Code:
    void SetAlphaValue(ge_Image *image, u8 alpha)
    {
    	u8 r, g, b, a;
    	image->alpha = alpha;
    	int key = 0;
    	int i, j;
    	
    	for(i = 0; i < (image->textureWidth*image->textureHeight); i++) {
    		r = image->data[i] & 0xff;
    		g = (image->data[i] >> 8) & 0xff;
    		b = (image->data[i] >> 16) & 0xff;
    		a = (image->data[i] >> 24);
    		for(j = 0; j < image->nColorKeys; j++) {
    			if(image->data[i] == image->ColorKeys[j]) {
    				key = 1;
    				break;
    			}
    		}
    		if(!key) image->data[i] = r | (g << 8) | (b << 16) | ((a - (a-alpha)) << 24);
    		key = 0;
    	}
    }
    are you sure the image is 8bit per color?
    1. Failed....again...
    2. http://slicer.gibbocool.com/ stay updated on all my projects
    3. it'll be 5 years in june, that's nearly 1/4 of my life on this planet that i've visited these forums, what a ride it has been

  23. #10043
    QJ Gamer Gold
    Points: 13.372, Level: 75
    Level completed: 31%, Points required for next Level: 278
    Overall activity: 0%

    Registriert seit
    Nov 2008
    Ort
    CAD
    Beiträge
    693
    Points
    13.372
    Level
    75
    Downloads
    19
    Uploads
    4

    Standard

    does anyone know how to export a class

  24. #10044
    QJ Gamer Silver
    Points: 10.263, Level: 67
    Level completed: 54%, Points required for next Level: 187
    Overall activity: 0%

    Registriert seit
    Jun 2006
    Ort
    UK
    Beiträge
    2.326
    Points
    10.263
    Level
    67
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von mootjeuh Beitrag anzeigen
    does anyone know how to export a class
    A C++ class? What do you mean by 'export'?

  25. #10045
    QJ Gamer Gold
    Points: 13.372, Level: 75
    Level completed: 31%, Points required for next Level: 278
    Overall activity: 0%

    Registriert seit
    Nov 2008
    Ort
    CAD
    Beiträge
    693
    Points
    13.372
    Level
    75
    Downloads
    19
    Uploads
    4

    Standard

    Zitat Zitat von yaustar Beitrag anzeigen
    A C++ class? What do you mean by 'export'?
    Yes, a C++ class. And by "export", I mean to export the class (that contains my functions) to a PRX module so that it can loaded and used as a library.
    I already know how to do this with normal functions. But not with classes.

  26. #10046
    words are stones in my <3
    Points: 35.274, Level: 100
    Level completed: 0%, Points required for next Level: 0
    Overall activity: 0%

    Registriert seit
    Jul 2005
    Ort
    Spokane
    Beiträge
    5.008
    Points
    35.274
    Level
    100
    My Mood
    Lonely
    Downloads
    1
    Uploads
    0

    Standard

    Zitat Zitat von yaustar Beitrag anzeigen
    A C++ class? What do you mean by 'export'?
    Whoa whoa whoa. Is that... yaustar? You're alive! :humped:

    How've you been? Been working on anything since Harry Potter 5?


    ON TOPIC:

    Don't suppose anyone has any good references to entity management in an RPG? As in character class design, take for example a modern MMORPGm like LotrO. You got your hunter, your champion, your burglar, etc. These are defined as character classes, though are all these really their own base class or are they later inherited by the super Character class, etc.?

    I guess I'm asking because there are numerous ways I can go about character creation but I guess I'm a little lost as to what should be the main, base class for a player. (if you don't understand what I'm saying I'll try and re-word it, or I might post an example).

    ...at what speed must I live.. to be able to see you again?...

    Projects

    You can support my Open World 3D RPG for PSP by voting for it here


  27. #10047
    QJ Gamer Bronze
    Points: 5.583, Level: 48
    Level completed: 17%, Points required for next Level: 167
    Overall activity: 0%

    Registriert seit
    May 2007
    Beiträge
    127
    Points
    5.583
    Level
    48
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von SG57 Beitrag anzeigen
    Don't suppose anyone has any good references to entity management in an RPG? As in character class design, take for example a modern MMORPGm like LotrO. You got your hunter, your champion, your burglar, etc. These are defined as character classes, though are all these really their own base class or are they later inherited by the super Character class, etc.?
    dont subclass like that, they dont differ enough. Whats the diff between a rogue + a fighter? rogue has higher dex, fighter higher strength. work out your skills + stats, then give your hunter a higher dex + critical hit skill. give rogue higher sneak skill. give fighter high melee skill.

    this is all humanoid base class stuff.
    -- Code Monkey : Sarien, Fishguts, Cracks and Crevices --

    "Did IQ's just drop sharply while I was away?" (Ripley)

  28. #10048
    words are stones in my <3
    Points: 35.274, Level: 100
    Level completed: 0%, Points required for next Level: 0
    Overall activity: 0%

    Registriert seit
    Jul 2005
    Ort
    Spokane
    Beiträge
    5.008
    Points
    35.274
    Level
    100
    My Mood
    Lonely
    Downloads
    1
    Uploads
    0

    Standard

    Yea, I think you're right _df_, I'm not looking for incredible scalability of my classes so it's best to keep it simple, here's a very general idea....

    Whether a Character is the Player or a Non-player, it doesn't matter so. The pure virtual base class a 'hunter/burglar/champion' would inherit should contain the health, power, level and attributes every character has.

    Health, Power and Level are all amounts the current player has. Meaning Health and Power and Level are NOT the maximums, rather the current amount of health and power and the current Level.

    Strength (for dmg), Dexterity (for accuracy), Vitality (for health), Speed (for rate of attack), etc. These will all be numerical values affected by the gear and level of the character and used as 'maximums' for certain conditions (eg, max health is calculated from Vitality * 10)

    Now, every character has a 3D character model representation as well as a 3D weapon model representation. No dua-wielding, no two-characters, none of that. Very straightforward - Biped model, Weapon model. I think putting these in base class as well would be logical, I could have these be class specific, eg Champs have 2 weapons, etc. but nah, simple stuff, Biped and Weapon.

    Lastly, in this particular game, all characters have an assortment of skills that are granted by the equipment/gear currently being worn and by the characters level (level up, get new skill). I think this can be done using a pure virtual 'factory' of skills. In other words, a virtual STL vector of a 'skill' class. I can add/remove a character's skills by simply adding/removing that particular 'skill' object from the vector. Now, in order to have this factory be in the pure virtual Character class, it must be capable of 'executing' any and all skills all the classes have. This is good when we think of an auto-attack skill, however this means a Mage could have access to the skills a Rogue has, and vice versa, which can be good or bad depending on the situation. I mean, if I were to expand upon my game in the future and I decided my Rogue can blast fireballs, well shoot that's easy with this design.

    One thing though.. if I am not able to wrap up all the skills possible in the game into one generic class (if this Skills class poses a problem), I can move the factory of skills (vector of Skill objects) into each sub-class so only characters of the class Rogue have access to Rogue skills. This allows for a much more specific subset of skills geared to the Rogue making it work(eg, I don't need to worry about a dynamic 'range' of a skill if all a Rogue's skills are the same range, etc.) but the draw back is the expandability in the future if I want my rogue to do a fireball from the mage's subset of skills, he can't access them (though I could use a cheap hack and re-route a mage skill to a rogue skill )

    Anyways, sorry for this wall of text, if anyone bothers to read it and wants to help me expand upon my idea please go right ahead - especially you C++ gurus (yaustar if you can be bothered to take a look I'd greatly appreciate it!)

    ...at what speed must I live.. to be able to see you again?...

    Projects

    You can support my Open World 3D RPG for PSP by voting for it here


  29. #10049
    QJ Gamer Silver
    Points: 10.263, Level: 67
    Level completed: 54%, Points required for next Level: 187
    Overall activity: 0%

    Registriert seit
    Jun 2006
    Ort
    UK
    Beiträge
    2.326
    Points
    10.263
    Level
    67
    Downloads
    0
    Uploads
    0

    Standard

    How've you been? Been working on anything since Harry Potter 5?
    Worked on HP6 and Need for Speed Shift PSP. I have been okay, looking at various other technologies (Fe.g lixel for Flash) and just building up lots of reference material as usual.

    Don't suppose anyone has any good references to entity management in an RPG?
    You may want to consider a Composite Pattern:
    Cowboy Programming » Evolve Your Hierarchy

  30. #10050
    words are stones in my <3
    Points: 35.274, Level: 100
    Level completed: 0%, Points required for next Level: 0
    Overall activity: 0%

    Registriert seit
    Jul 2005
    Ort
    Spokane
    Beiträge
    5.008
    Points
    35.274
    Level
    100
    My Mood
    Lonely
    Downloads
    1
    Uploads
    0

    Standard

    I have been looking forward to your response, yaustar. Trust you to be hard at work :)

    I read through that article and I really like the idea of 'basic building blocks', as I've come to call it, for each of my required classes. I particularly like how building onto a class is either creating a new component to add to it or simply adding a pre-existing component to it. In the end, doesn't this mean I could end up with, say, 40 source files each relatively small in size?

    I would love to see some C++ source code of this pattern, I think I've been following something of the sort all along (as in, couldn't one say using a 3D vector class to handle storing positions/velocities/orientations a composite pattern?)

    ...at what speed must I live.. to be able to see you again?...

    Projects

    You can support my Open World 3D RPG for PSP by voting for it here



 

Tags for this Thread

Forumregeln

  • Es ist Ihnen nicht erlaubt, neue Themen zu verfassen.
  • Es ist Ihnen nicht erlaubt, auf Beiträge zu antworten.
  • Es ist Ihnen nicht erlaubt, Anhänge hochzuladen.
  • Es ist Ihnen nicht erlaubt, Ihre Beiträge zu bearbeiten.
  •  





Alle Zeitangaben in WEZ -8. Es ist jetzt 09:15 PM Uhr.

Use of this Web site constitutes acceptance of the TERMS & CONDITIONS and PRIVACY POLICY
Copyright © , Caputo Media, LLC. All Rights Reserved. Cluster .