Seite 3 von 340 ErsteErste 1 2 3 4 5 6 7 8 9 10 11 12 13 53 103 ... LetzteLetzte
Zeige Ergebnis 61 bis 90 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; not sure...you have to make sure you are sprintf'ing to update buffer[], everytime you change the score var, then print ...

  
  1. #61
    QJ Gamer Silver
    Points: 9.457, Level: 65
    Level completed: 36%, Points required for next Level: 193
    Overall activity: 0%

    Registriert seit
    Jun 2005
    Ort
    Canada
    Beiträge
    1.492
    Points
    9.457
    Level
    65
    Downloads
    0
    Uploads
    0

    Standard

    not sure...you have to make sure you are sprintf'ing to update buffer[], everytime you change the score var, then print it out.

    As far as animations, yeah theoretically an array of images should be fine, then have a for loop to blit it, with vsyncwaits in there to control how fast the animation is....I was having problems getting it running stable that way. So instead I just loaded all the animation pics up seperately and wrote out a long ass function to play the animation (refering to the explosion when you die in my helicopter game) Works good for me, if not the best way...


    PSN: Shatterdome

  2. #62
    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

    ok, now how do i do an array, like int array() { or what?

    ...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


  3. #63
    Developer
    Points: 5.116, Level: 45
    Level completed: 83%, Points required for next Level: 34
    Overall activity: 0%

    Registriert seit
    Jun 2005
    Ort
    Sydney, Australia
    Beiträge
    128
    Points
    5.116
    Level
    45
    Downloads
    0
    Uploads
    0

    Standard

    SG57 -
    Check out Google, as C on the PSP is much the same as C on the PC, so any standard array tutorial will work on PSP, but to get you started -
    Code:
    int ia[6] = {0, 1, 2, 3, 4, 5}; 
    // initialise array and put numbers into it
    
    OR
    
    int x[6]; // init array
    int x[4] = 2; // put a number only in #4 of the array
    And for a multidimensional array -
    Code:
    int psp_resolution[480][272];
    This looks like a good tutorial for arrays - http://vergil.chemistry.gatech.edu/r...al/arrays.html
    Developer of Airstrike

  4. #64
    Developer
    Points: 5.116, Level: 45
    Level completed: 83%, Points required for next Level: 34
    Overall activity: 0%

    Registriert seit
    Jun 2005
    Ort
    Sydney, Australia
    Beiträge
    128
    Points
    5.116
    Level
    45
    Downloads
    0
    Uploads
    0

    Standard

    Shatterdome, it does support the use of seperate channels but from what I've seen it only supports a single stream at a time :Argh:

    Sorry about that. I'm not sure if it's possible, but John_K ported it specifically for his Media Center, so chances are if it was he skipped over it just because it was easier and he simply didn't need it.

    My suggestion would probably be to use Mp3 for the background music / person's PSP/MUSIC and use another library for the sound effects.
    If anyone else has any better suggestions, feel free to save the day =)

    -PS-
    I'm working on getting a simple file browser for Mp3's, so that a user can select an Mp3 from their MUSIC folder to play. First off, if anyone has already done it, and are fine to release the source code, please do, or if else, I'll release my source code when I'm done with it.
    Developer of Airstrike

  5. #65
    QJ Gamer Green
    Points: 25.223, Level: 95
    Level completed: 88%, Points required for next Level: 127
    Overall activity: 0%

    Registriert seit
    Jan 2006
    Beiträge
    4.289
    Points
    25.223
    Level
    95
    Downloads
    0
    Uploads
    0

    Standard

    Well, lostjared released his reuseable file browser, but he uses SDL and it confuses me, otherwise I would implement it in my programs...

  6. #66
    QJ Gamer Silver
    Points: 9.457, Level: 65
    Level completed: 36%, Points required for next Level: 193
    Overall activity: 0%

    Registriert seit
    Jun 2005
    Ort
    Canada
    Beiträge
    1.492
    Points
    9.457
    Level
    65
    Downloads
    0
    Uploads
    0

    Standard

    I guess SDL doesn't support MP3's ? I am more interested in getting custom soundtracks in my game right now, over sound effects anyways...

    I'm gonna take a look into how hard it would be to write a file browser....as long as the psp has functions to get a list of files in a directory or something similar, it wouldn't be too hard...
    PSN: Shatterdome

  7. #67
    QJ Gamer Silver
    Points: 9.457, Level: 65
    Level completed: 36%, Points required for next Level: 193
    Overall activity: 0%

    Registriert seit
    Jun 2005
    Ort
    Canada
    Beiträge
    1.492
    Points
    9.457
    Level
    65
    Downloads
    0
    Uploads
    0

    Standard

    Hey all....does anyone have any working examples of writing and reading binary or even text files from the ms ?

    I'm using some code that works compiled on the pc to read and write from a file, but for some reason when compiling on the psp it disorts numbers... heres what i'm using...

    Code:
    void savehighscores(void)
    
      {
    
    
         FILE * savegame;
         savegame = fopen("savegame.dat","w");
        
    	 int i;
    
         rewind(savegame);
    
         for(i=0;i<10;i++)
         {
    
          fputc(highscores[i],savegame);
    
        
         }
    
    
    
          fclose(savegame);
    
    
    
    	
    
      }
    
    void loadhighscores(void)
    
      {
    
    
         FILE * savegame;
       
         int i;
    
    
         savegame = fopen("savegame.dat","r");
    
    
         rewind(savegame);
    
      //  do
      for(i=0;i<10;i++)
         {
    
    	  highscores[i] = fgetc(savegame);
    
    
    
        
    
         }
    //	while(feof(savegame) == 0);
    
    
          fclose(savegame);
    
    
    
    	
    
    
      }

    It writes to a file, but when it writes it changes the integers I have in there, and seems to read those changed integers fine...tis strange, any ideas ?

    thx
    PSN: Shatterdome

  8. #68
    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 dunno, but i can use that read from a .txt file, will it work for reading? Ill test it, also, hwo do i make an animation?!?!?!?!?

    i know its an array but i need an example!! i have blooked everywhere!! heres waht i know, i just tested this for an images actual dimensions

    Code:
    int array[1][0, 1][175, 125]
    int main() {
        blitAlphaImageToScreen(0, 0, array[0], array[1], ya, yax, yay);
    }
    theres an example of what i was trying it gave me warnings for the array[0] and array[1] calls, is that right?

    ...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


  9. #69
    Developer
    Points: 8.360, Level: 61
    Level completed: 70%, Points required for next Level: 90
    Overall activity: 16,0%

    Registriert seit
    Jun 2005
    Ort
    At my house...
    Beiträge
    886
    Points
    8.360
    Level
    61
    Downloads
    0
    Uploads
    0

    Standard

    For animation use a timer and then for every 5 or so #s blit a pic and clear. Sorry i am on my psp.

  10. #70
    QJ Gamer Green
    Points: 25.223, Level: 95
    Level completed: 88%, Points required for next Level: 127
    Overall activity: 0%

    Registriert seit
    Jan 2006
    Beiträge
    4.289
    Points
    25.223
    Level
    95
    Downloads
    0
    Uploads
    0

    Standard

    edit: NVM

  11. #71
    Developer
    Points: 7.058, Level: 55
    Level completed: 54%, Points required for next Level: 92
    Overall activity: 0%

    Registriert seit
    Oct 2005
    Beiträge
    408
    Points
    7.058
    Level
    55
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von Shatterdome
    Hey all....does anyone have any working examples of writing and reading binary or even text files from the ms ?

    I'm using some code that works compiled on the pc to read and write from a file, but for some reason when compiling on the psp it disorts numbers... heres what i'm using...

    Code:
    ...omitted...

    It writes to a file, but when it writes it changes the integers I have in there, and seems to read those changed integers fine...tis strange, any ideas ?

    thx
    I don't think you can trust fgetc and fputc to store numeric data unless you convert it to strings first. Fread and fwrite store binary or text more efficiently and you'll read the same thing you write.

    Example:
    fwrite(highscores, sizeof(highscores), 10, savegame);

    This will write the entire high score list in one line. Fread is basically the same.

  12. #72
    QJ Gamer Silver
    Points: 9.457, Level: 65
    Level completed: 36%, Points required for next Level: 193
    Overall activity: 0%

    Registriert seit
    Jun 2005
    Ort
    Canada
    Beiträge
    1.492
    Points
    9.457
    Level
    65
    Downloads
    0
    Uploads
    0

    Standard

    Thanks man, works perfect now...strang thing is fgetc and fputc do deal with ints even though it's called put char, and those functions worked fine on the PC with saving the stats of a character created by a random roller, but just wouldn't work on the psp for some reason...

    Regardless, fwrite and read will do just fine, as I always will know how much data i'm reading and writing...
    PSN: Shatterdome

  13. #73
    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

    ok, about my animation problem anyone? Twenty 2, you gave me how to do it, but i want an array because its easier right? and what about my array i posted code problem? how do i call things from my array? I just wish there was a good tutorial

    ...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


  14. #74
    Developer
    Points: 8.360, Level: 61
    Level completed: 70%, Points required for next Level: 90
    Overall activity: 16,0%

    Registriert seit
    Jun 2005
    Ort
    At my house...
    Beiträge
    886
    Points
    8.360
    Level
    61
    Downloads
    0
    Uploads
    0

    Standard

    you just call the number in the array with its number...and instead of using sprite1 and sprite2 for each blit, you just use the array.

  15. #75
    QJ Gamer Silver
    Points: 9.457, Level: 65
    Level completed: 36%, Points required for next Level: 193
    Overall activity: 0%

    Registriert seit
    Jun 2005
    Ort
    Canada
    Beiträge
    1.492
    Points
    9.457
    Level
    65
    Downloads
    0
    Uploads
    0

    Standard

    sg57, just google arrays + c and you will get tons of tuts, it's one of the more basic data types (althought technically not, but when you think abouts classes, structures and linked lists, it's a little mundane :P )

    int array[10];

    is an array with 10 spots labeled 0-9, array[1] = 2; sets the 2nd value of array to 2, array[0] accesses the first value, array[9] the last, for loops are a good way of traversing arrays...there.

    Now anyone have any problems installing libmad ? I checked it out and when I goto to make it, before having to copy any file it says i'm missing FPM or something...attached a screen cap of the error....i'm just trying to rebuild the pspsdk to see if it does anything, but maybe it's a common error, i'm hoping :P

    Nevermind, much googling later I solved it...
    Miniaturansicht angehängter Grafiken Miniaturansicht angehängter Grafiken C/C++ Programming Help Thread-libmaderror.jpg  
    Geändert von Shatterdome (02-15-2006 um 01:25 AM Uhr)
    PSN: Shatterdome

  16. #76
    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

    Thanks Shatterdome, i'll google arrays later, but all I wanted to know was how to call something in an array, so what you put should work if I made array[0-2] = blitAlphaImageToScreen(ya da ya da); then just say something like:

    Code:
    for(i=0; i<93479; i--) {
       sceKernelDelayThread(100);
       array[0];
       sceKernelDelayThread(100);
       array[1];
       sceKernelDelayThread(100);
       array[2];
    }
    That would make my animation go forever and change frames every 100 vblanks? Unless someone else has a better animation engine/effect?

    ...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


  17. #77
    QJ Gamer Silver
    Points: 9.457, Level: 65
    Level completed: 36%, Points required for next Level: 193
    Overall activity: 0%

    Registriert seit
    Jun 2005
    Ort
    Canada
    Beiträge
    1.492
    Points
    9.457
    Level
    65
    Downloads
    0
    Uploads
    0

    Standard

    You have the right idea, but arrays can't hold functions, only data types, so you're looking at...

    Code:
    for(i=0; i<93479; i--) {
       sceKernelDelayThread(100)  ;
       blitimage(x,y,array[0],x,y);
       sceKernelDelayThread(100)  ;
       blitimage(x,y,array[1],x,y);
       sceKernelDelayThread(100)  ;
       blitimage(x,y,array[2],x,y);}
    and you would make array[] an array of images...I was having problems doing that so I didn't use an array (for the explosion in my helicopter game), but in theory it should work fine...
    PSN: Shatterdome

  18. #78
    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

    ya, I noticed that, in your helicopter game, you had like 5 images of the explosion, and you had one of my own .mp3 playing? how? So, I can mkae
    Code:
    char/int explosion[2];
    char/int explosion[0] = blitalphaImageToScreen();
    char/int explosion[1] = blitAlphaImageToScreen();
    char/int explosion[2] = blitAlphaImageToScreen();
     
    while(1) {
    	blitAlphaImageToScreen(0, 0, 32, 32, explosion[0], and so on?);
    	explosion[++];
    	if(explosion[2] >= [3]) {
    		explosion[2] = explosion[0];
    }
    }
    that would assign the 3 images to an array, then blit the first one, and later, have the loop increase to the array thing, thus making an animation? How'd you do an animation for your explosion? Should I use a string instead? Or make a pointer to my images that happens to be inside the array also?

    ...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


  19. #79
    Developer
    Points: 5.116, Level: 45
    Level completed: 83%, Points required for next Level: 34
    Overall activity: 0%

    Registriert seit
    Jun 2005
    Ort
    Sydney, Australia
    Beiträge
    128
    Points
    5.116
    Level
    45
    Downloads
    0
    Uploads
    0

    Standard

    Not quite right there SG57...

    Code:
    int x = 0;
    while(1) {
    	blitAlphaImageToScreen(0,   0, 32, 32, explosion[x], and so on?);
    	x++;
    	if(x > 3) {
    		x = 0;
    }
    That's the way I'd do it. You have to understand explosion[number] implies that you need to input a number, it doesn't take any other form of input, so it'd just give you an error and say '++ not valid blah blah blah'

    Still though, with that code there, unless you're just doing a concept, it really doesn't work that well...

    The two main problems :

    You're in a while loop which won't let you do anything else at the moment, this would be placed somewhere in your main loop.

    Especially in this setup the images would flash by much too fast, I'm talking tenths of a second total here.

    Solutions :

    Because my main loop runs at a pretty specific interval, I use that loop as the loop for my animations.
    To get the images to hold a bit longer however, I had something similar to -


    Code:
    int anim = 1;
    int frame = 0;
    while (1) {
    
    // other code / codes here
    
    // imagine there are 5 frames in our animation
    
    if (frame > 6 && anim == 1) { // change frame here to effect how long it's displayed
         frame = 0; 
         x++;
    } 
    else frame++;
    
    if (anim == 1) blitAlphaImageToScreen(0,   0, 32, 32, explosion[x], etc);
    
    if (x > 5) { x = 0; anim = 0; } // saying if x > 5 our animation is over
    
    // other code / codes here
    
    }
    Obviously thats pseudo code, you need to reword a few things, but yeah.
    Developer of Airstrike

  20. #80
    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

    Ok, I think I get it, but if I put blitAlphaImageToScreen(); anywhere after the flipScreen();, I'm going to get flashy effects. Maybe I'll do something like,
    Code:
    Image* explosion1;
    Image* explosion2;
    Image* explosion3;
    //LOAD ALL THE IMAGES AND DEFINE THEM (JUST DON'T BLIT THEM)
    int time =0;
    void explosion = explosion1;
    while(1) {
    	blitAlphaImageToScreen(0, 0, 32, 32, explosion, ya da ya da);
    	time++:
    	if(time > 300 && time < 600) {
    		  explosion = explosion2;
    	} else if(explosion >= 600) {
    		explosion = explosion3;
    	 } else if(time > 900) {
    		  time = 0;
    	 }
    	 flipScreen();
    }
    This might be the one (if it works) that I will use. It loads all the images, blits explosion1, then the timer increases, and if the timer goes over 300 but under 600, then the explosion1, switches to explosion2, then if the timer goes over 600, explosion2 = explosion3, and if the timer goes over 900, then the timer is reset and it changes the explosion3, back to explosion1.

    ...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


  21. #81
    QJ Gamer Silver
    Points: 9.457, Level: 65
    Level completed: 36%, Points required for next Level: 193
    Overall activity: 0%

    Registriert seit
    Jun 2005
    Ort
    Canada
    Beiträge
    1.492
    Points
    9.457
    Level
    65
    Downloads
    0
    Uploads
    0

    Standard

    Yeah, this is where having the process of one frame of your program down is stone helps...

    such as every frame program..

    gets user input
    figures out what to do with it
    updates players and objects x y positions
    checks for collisions
    draws everything
    goto begining

    Also like smerity said, it depends on how often your looping etc...

    for an explosion you probably only want to blit it when a missile colides with something...for me it was easy because it was only when the player died, so when the player died I just transfered control of the loop to my playerdead() function which then just needed to draw all the buildings where they were last and then draw the explosion. and I could control how fast it plays with waitforscreens...

    Having an animated character or an explosion that will play as everything else moves around it is a little trickier....in that case you would probably have to count your frames and impose a FPS limiter so that animations weren't playing too quickly, because you can't use waitforscreens to slow down the explosion animation because it would slow down everything else as well....something i'm not looking forward to but am going to tackle in my next game
    PSN: Shatterdome

  22. #82
    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

    Ok, I'll use you rexplosion example for mine. But how would I get the last screen that was shown to display? Maybe just make everything that's moving, have the speed of 0, then everything will stop. I can easily have the explosion animation blit ontop of what's dieing.

    ...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


  23. #83
    QJ Gamer Silver
    Points: 9.457, Level: 65
    Level completed: 36%, Points required for next Level: 193
    Overall activity: 0%

    Registriert seit
    Jun 2005
    Ort
    Canada
    Beiträge
    1.492
    Points
    9.457
    Level
    65
    Downloads
    0
    Uploads
    0

    Standard

    in that case you need to...

    draw everything without movement - what you want blowing up
    then draw first explosion
    then flip
    wait for x amount of vsync
    then repeat and increment the explosion to 2nd, 3rd, 4th etc
    PSN: Shatterdome

  24. #84
    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

    Ok, im just going to test an animation program for a bullet and a gun. Ill have X fire a bullet. Ill have UP rotate the gun. Now, I think I understand the animation well enough to make the bullet "blit" at the end of the gun and have a little twisting effect. But I'm left in the dark when it comes to rotation an image. Cant even begin where to start. Ill search my cygwin files and stuf for something that rotates. But in the meantime, anyone know so I can save my self the trouble?

    ...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


  25. #85
    Developer
    Points: 5.116, Level: 45
    Level completed: 83%, Points required for next Level: 34
    Overall activity: 0%

    Registriert seit
    Jun 2005
    Ort
    Sydney, Australia
    Beiträge
    128
    Points
    5.116
    Level
    45
    Downloads
    0
    Uploads
    0

    Standard

    SG57 -
    Rotation of images is a bit of a stickler... Very hard to get right...

    Two main ways I looked at doing it -

    The First Way - Our Friends Sine and Cosine

    That was an earlier WIP of my rotation function. I've now gotten rid of the lines (they were because I didn't put 'if (x>imgx)' and 'if (y>imgy)' and also added a filter to remove the aliasing...
    What I did behind that was use a pretty standard rotation algorithm (I got it from a huge Computer Graphics book I have, covers 2D and 3D concepts, but it's the same algorithm as the one used here
    Code:
    int angle = 180, imgx = 100, imgy = 100;
    if ( angle != 0 )
    {
    int yx = 0;
    int xx = 0;
    int px = 0;
    int py = 0;
    int color;
        while (yx < imgy){
            while (xx < imgx){
                int xi = xx - (imgx/2);
                int yi = yx - (imgy/2);
    
                px = xi*cos(angle) - yi*sin(angle) + (imgx/2);
                py = xi*sin(angle) + yi*cos(angle) + (imgy/2);
    
                color = getPixelImage( px, py, cannon_o);
                putPixelImage(color, xx, yx, cannon);
    
                xx++;
               } // x <
            xx=0;
            yx++;
    } // y <
    } // if angle ! 0
    That actually ends up working fine. The problem (as always) is with the memory used in the process. For every pixel that is rotated, the pixel from the first image must be retrieved, and then the pixel in the next image has to be placed in the relevant spot. This ended up choking the VRAM and I ended up with v. slow (1 FPS) performance.
    NOTE - If you don't need performance / need to change the image's rotation every second, this is still a pretty good way to do it.

    The Second Way - Rotating the Vertices of which the image resides
    Dr Watson gave me a link to his game library, StarBugz game prototype and engine (using Gu) with source

    Background - Most graphics libraries used with PSP coding atm pastes an image onto a plane (texture onto a quad) and displays it like that. That means that you can support alpha and all that other jazz whilst it being extremely fast (as it uses the GPU)

    Having a look in there, I discovered he used a very clever short cut. Instead of rotating the image before hand, you just rotate the plane (quad) of which the image is on. This means that the GPU does all the work, and the GPU is very efficient at such transformations.

    Only problem? Dr Watson's code is in C++ ^_^

    The graphics library used by Yeldarb et al uses the same concept as Dr Watson's however, and so you can rotate the vertices of the plane, thus rotating the texture (image)
    NOTE - You can rotate the vertices (just point <x, y>) using the same algorithm as above, except replace imgx, imgy for vertx, verty or similar.

    At that point however, school started back up and I haven't really had a chance to code O_O

    I'm sure there are other techniques, but they were the ones I looked at so far...
    Good luck, may have to scratch up on your math for this one...
    Developer of Airstrike

  26. #86
    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 never really noticd this Smerity, but Me and You are the only ones that actually stay up as some of the late members. The only reason I am up so late, is because I want to learn more about coding, and I don't have school tomorrow (presidents day).

    ON TOPIC: So, your saying that you got your Airstrike rotating barrell working? Or are you still working on it? Also, when rotating, does it rotate the offsets? So I can have the bullet come out of the offset value where the end of the barrel is, cause in alot of shooters, they have a little ship thin going around, then multiple directions to shoot it from. That Geometry type shooter thing, that one has a rotating image that shoots from the 'barrel' so im assuming that the offset values rotate too, that way Ican assign the launching of the bullet from the offset value at the dn of the barrel.

    Hopefully you stay up a little late tonight Smerity, that way if I have questions you can hopefully answer them ?

    ...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. #87
    Developer
    Points: 5.116, Level: 45
    Level completed: 83%, Points required for next Level: 34
    Overall activity: 0%

    Registriert seit
    Jun 2005
    Ort
    Sydney, Australia
    Beiträge
    128
    Points
    5.116
    Level
    45
    Downloads
    0
    Uploads
    0

    Standard

    You really have to specify the technique you mean SG57.
    For example, offsets won't work in technique 1, but in technique 2 they will.

    On the Airstrike gun barrel, still working on it, but the concept is sound, just haven't had enough time recently to implement it.

    Off topic - Only 8:30 atm, but yes, I have stayed up very late coding, most devs have, it's just the whole timezone that distorts the sense that people are staying up late.
    Developer of Airstrike

  28. #88
    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

    Well, it's 2:13 am, here.

    Well, if you think my idea of having a barrell moving and something launching from it via an offset, what was your idea for a moving barrel, and still be able to launch stuff from it? In your game, your going to have to do something like that you know...

    ...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. #89
    Developer
    Points: 5.116, Level: 45
    Level completed: 83%, Points required for next Level: 34
    Overall activity: 0%

    Registriert seit
    Jun 2005
    Ort
    Sydney, Australia
    Beiträge
    128
    Points
    5.116
    Level
    45
    Downloads
    0
    Uploads
    0

    Standard

    Dude, I have no clue what you're on about, please explain.

    Do you mean offset as in where the object is emitted from?
    If so, it's v. easy, find a point just infront of the cannon and apply the exact same rotations to it as you do the cannon...
    Developer of Airstrike

  30. #90
    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 am going to make the barrell all its own image and rotate it on the actual 'cannon' body, just by making that one end a half circle, but i just need to know how to rotate an image 1 *, then I can make a 'for' statement and rotate it as much as I want. So basically, does anyone have a working rotating function that I can put into a prototype to call easily like:

    Code:
    int rotateImage(int width, int height, some other stuff) {
             do the fancy stuff here.
      return NewImage;
    }
    Something of the sort...

    ...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



 
Seite 3 von 340 ErsteErste 1 2 3 4 5 6 7 8 9 10 11 12 13 53 103 ... LetzteLetzte

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 .