Page 1 of 1

Character customization

PostPosted: Wed Dec 05, 2012 2:18 pm
by D3Ateliers
Hey guys, I was just wondering if any knows how you would create character customization via multiple animations and save/load variables.

Re: Character customization

PostPosted: Wed Dec 05, 2012 10:07 pm
by AliceXIII
alot of differnt ways to do it, but you need to take into consideration do you want GE to handle file i/o or do you want to manually handle file i/o?

all in all it's very easy to 1 save variables and load them back into memory for use and 2 to tie animations to the variables in use.

just depends if you want GE to handle i/o or whether you want to manually, manually is a little hard for some people to get used to but alot more rewarding in the control you get over your data.

Re: Character customization

PostPosted: Thu Dec 06, 2012 2:21 pm
by D3Ateliers
I want an outside file that GE creates when you execute the save function.

+I live near you....

Re: Character customization

PostPosted: Thu Dec 06, 2012 11:46 pm
by AliceXIII
I want an outside file that GE creates when you execute the save function.


let me give an example of what i mean:

Code: Select all
void loadLvl()
{
    int i;
    FILE * lvlF;
    lvlF=fopen(LoadSaveTag, "rb");
 
    if(lvlF)
    {
        fread(STORAGE, sizeof(STORAGE), 1, lvlF);
        i=ASIZE*6;
        tACTORCOUNT = STORAGE[i];
        oACTORCOUNT = STORAGE[i+1];
        for(i=0; i<ASIZE-1; i++)
        {
            tAnim[i]=STORAGE[i];
            oAnim[i]=STORAGE[i+ASIZE];
            tX[i]=STORAGE[i+ASIZE*2];
            tY[i]=STORAGE[i+ASIZE*3];
            oX[i]=STORAGE[i+ASIZE*4];
            oY[i]=STORAGE[i+ASIZE*5];
        }
    }
    fclose(lvlF);
}
void saveLvl()
{
    int i;
    FILE * lvlF;
    lvlF=fopen(LoadSaveTag, "wb");
 
    if(lvlF)
    {
        for(i=0; i<ASIZE-1; i++)
        {
            STORAGE[i]=tAnim[i];
            STORAGE[i+ASIZE]=oAnim[i];
            STORAGE[i+ASIZE*2]=tX[i];
            STORAGE[i+ASIZE*3]=tY[i];
            STORAGE[i+ASIZE*4]=oX[i];
            STORAGE[i+ASIZE*5]=oY[i];
        }
        i=ASIZE*6;
        STORAGE[i]=tACTORCOUNT;
        STORAGE[i+1]=oACTORCOUNT;
        fwrite(STORAGE, sizeof(STORAGE), 1, lvlF);
    }
    fclose(lvlF);
}


^^thats manual file i/o it'll do what you want as in create an outside file when you hit a save button it would have to be reworked to save animations.

i/o inside GE will yield the same results it to me personally feels hindering i only do manual i/o myself.

so which way are you wanting to do it in?

+I live near you....


hmmm really where? if you dont mind?

Re: Character customization

PostPosted: Fri Dec 07, 2012 12:57 pm
by D3Ateliers
so which way are you wanting to do it in?


I would prefer outside...

hmmm really where? if you dont mind?


Justin, Fort Worth, Rome, in there somewheres.

Re: Character customization

PostPosted: Sun Dec 09, 2012 12:58 am
by AliceXIII
sorry it took me awhile to get back to you on this, i was getting into the project so much i forgot about this..

i just remembered today that i was going to help you with this, although right now im currently working on a map editor at the moment i can get to your problem after i finish it up!

so just hang on for a little bit and i'll be back.