Search:

Type: Posts; User: BlueGooGames

Search: Search took 0.01 seconds.

  1. Thanks for all your help. I finally found a...

    Thanks for all your help. I finally found a method that would make it work pretty much with much less code that I first thought. While circling round to find what pixels collide, as soon as a get...
  2. Hmm.. I'm not sure I follow how that would help...

    Hmm.. I'm not sure I follow how that would help me. I draw the background, and I also have a parallell collision map as an object, which I work with to find out when I collide, and now the angle of...
  3. I'm not sure what you mean by modelling, but I...

    I'm not sure what you mean by modelling, but I have a collisionmap as a char[] of the bitmap x/y coords, to tell me where it's mountain or air, so I know if I collide or not. So as soon as I collide...
  4. It's a pixelbased collisionmap, so there are no...

    It's a pixelbased collisionmap, so there are no known angles. That's why I need to estimate the angle of the collided pixel, by looking at neighboring pixels to find a plane to make a normal from.
    ...
  5. Thanks, I got all that. I have everything except...

    Thanks, I got all that. I have everything except the normal of the wall. That's what I'm trying to figure out.

    The real issue here is that the wall is uneven, and goes in and out, so I made a...
  6. I'm using this to calculate how an object will...

    I'm using this to calculate how an object will bounce of a surface, which I need the normal for, at least that's what I think it is called, but I probably describet it in a incorrect way.

    I get...
  7. Getting normal between two angles (Logical question)

    I'm doing a routine where I get an indefinite number of values from 0-360, which are angles in degrees. I want to calculate the normal, which is the average in the middle of the start and end angle....
  8. Thanks a lot, that worked out great. Have coded...

    Thanks a lot, that worked out great. Have coded PHP for 10 years, never had to use that before. But now when coding a game, that was handy :)
  9. Bidirectional loop? (Increase/decrease depending on values)

    I have two values: x_start and x_end. From time to time any value can be the highest.
    How can I make a single for or while-loop to iterate through x in any directions to count either from x_start to...
  10. Thanks, I finally got it. Your help is very much...

    Thanks, I finally got it. Your help is very much appreciated! I'll keep that in mind for my credits of my amazing game.. ;)
  11. In the start of this thread, it was (unsigned...

    In the start of this thread, it was (unsigned char), but later I changed to (id) because I thought that would make it return a pointer. But it isn't?
  12. I don't think the compiler (Xcode) complains with...

    I don't think the compiler (Xcode) complains with casting before malloc, but it doesn't help to do it like this either:

    unsigned char *myChar = malloc(50);

    I still get this on return:...
  13. Ok, so to return a pointer, i kinda figured out i...

    Ok, so to return a pointer, i kinda figured out i need to set the return type to (id) instead of (unsigned char), is that correct?

    But of course this gives me another error. I like this a lot, so...
  14. Heh, thanks for the tutorial. I have long...

    Heh, thanks for the tutorial.
    I have long wondered if there's a difference where you put the *.

    Are these two the same?

    unsigned char* myChar = [self makeChar];
    unsigned char *myChar = [self...
  15. Thanks! I'm trying to change the code to what I...

    Thanks! I'm trying to change the code to what I think you mean as below, but I'm not quite there... Got rid of those warnings, got a new one.

    Apparently I don't want an int, the value of myChar[5]...
  16. Obj-C/C mix - return makes integer from pointer without a cast

    Hi, this is my first post here, and I'm sure I'll be back for more later! :)

    I'm learning Obj-C, and stumbled on some C code that I find useful, but as I'm a totally new to this, I find it a...
Results 1 to 16 of 16