Welcome to Phrogram Sign in | Join | Help
in Search


colisions not working

Last post 08-11-2008, 7:52 PM by Da Phrogger. 14 replies.
Sort Posts: Previous Next
  •  07-05-2007, 2:49 PM 4845

    colisions not working

    well the thing is i'm trying to use the colision detector that phrogram has but it's just not working...

    i use de addcatagory and enablecolisions but the hascolision function never returns true!

    can somebody please help me out?

  •  07-05-2007, 4:09 PM 4846 in reply to 4845

    Re: colisions not working

    try only enabling collisions on one of the models, not both.  This may or may not work.  But I think I had a similar problem and this method solved it. 
  •  07-06-2007, 5:15 AM 4852 in reply to 4845

    Re: colisions not working

    When you run the Facing3D example - under 5) Advanced Learning Examples / 3D -
     does the arrow pop the spheres when it reaches them?  If so, that's you best working example of enabling and responding to collisions.
  •  07-06-2007, 2:48 PM 4856 in reply to 4852

    Re: colisions not working

    or send your program - or a cut down version for us to look at
    Managed DirectX and XNA ? Check out http://www.thezbuffer.com
  •  07-07-2007, 10:35 AM 4860 in reply to 4845

    Re: colisions not working

    thank you all for your help. I sort of got it working... the problem was that phorgram doesn't detect colisions between models from the same class.
  •  07-07-2007, 11:03 AM 4861 in reply to 4860

    Re: colisions not working

    Can you explain what you mean. Phrogram should detect all collisions unless I am misunderstanding you.

    An example program would help here.


    Managed DirectX and XNA ? Check out http://www.thezbuffer.com
  •  07-11-2007, 6:24 AM 4873 in reply to 4861

    Re: colisions not working

    sorry about saying it works before testing it... i really thought i had found out what was wrong.

    anyway i have no time to fix that now. maybe in august i'll try again but now i have another question.

    is it possible to create a splash screen in 2D by using sprites or what ever, and then using 3D stuff.

    i've tryed using code from space junk and it didn't  work

     

    PS: i'm sorry for "stealing" space junk's code but i'm on a deadline and it was the best example i could find

  •  07-25-2007, 4:15 PM 5001 in reply to 4873

    Re: colisions not working

    ITs hard to mix 2d and 3d right now. You could start in 2d and switch to 3d after the splash screen but I don't know if there is a way to switch back. You certainly cannot mix them on the same screen in the current version.
    Managed DirectX and XNA ? Check out http://www.thezbuffer.com
  •  09-05-2007, 1:08 PM 5280 in reply to 5001

    Re: colisions not working

    could you open multiple instances of Phogram.  For instance:  in my 3d program could I call another .exe of phrogram that is 2d?  in the file i/o class you can open another file.  Can you open another phrogram, while running a program?  Does this make sense.  Thanks in advance. 

     

  •  09-05-2007, 1:18 PM 5281 in reply to 5280

    Re: colisions not working

    You can only run one instance of the Phrogram IDE at a time.

    You should be able to run multiple EXEs created by Phrogram but each would be in its own window. An EXE runs within its on Process in windows and they are very purposely kept apart by windows to make sure there are no interactions. In fact for most purposes each program thinks its the only thing running the CPU makes each program see its own set of memory and it has no clue when other programs get switched in.

    I don't think there is any way to run one EXE from another in Phrogram either, though for the same reasons as above it would not solve the problem here. You might just have to wait a while longer and see if any future changes solve this ;-)


    Managed DirectX and XNA ? Check out http://www.thezbuffer.com
  •  09-05-2007, 2:14 PM 5282 in reply to 5281

    Re: colisions not working

    a separate window would work for what I want.  I would like to use a 2d window as the menu for my 3d program.  But could I send variables from one .exe to another.  For example could I send the player score from my 3d .exe to an accumulator in my 2d .exe (while both are running) and then save the variable?

    for instance.  

     

    I press  F1 while playing my 3d game.  The 2d menu pops up.  I press the save button.  It saves the variable "player score" that is being held in the 3d .exe.  Is this possible?

  •  09-05-2007, 3:03 PM 5283 in reply to 5282

    Re: colisions not working

    Even if there was a way to run one EXE from another there is no easy way to send information from one to another since each program is running in isolation from the other. There are technically ways to do it which we could possibly think about wrapping at some point but its probably a long way down the list.

    Instead I think a way to show a new window, or some kind of dialog from within the current window would suffice for what you want.

    But right now there is no way to do what you want especially in 3d mode where these is no way to reallydraw much i the way of 2d shapes beyond the label to draw text. We hear the feedback though...


    Managed DirectX and XNA ? Check out http://www.thezbuffer.com
  •  09-06-2007, 7:03 AM 5285 in reply to 5283

    Re: colisions not working

    No worries, It would probably take me longer to figure out the logic and code than it would for you to wrap the class.  Besides, my new project is to learn c++, so that will keep my busy for a while.  I am currently familiar with java, vb.net, and phrogram.  But the university i will transfer to teaches everything is c++.  So I have a year to get a head start.

  •  08-11-2008, 11:58 AM 7037 in reply to 5285

    Re: colisions not working

    This reply is a bit late, but the solution I have should work anyway. Basically, when you need a menu in your 3D game, you make a 3D menu, or a 2D menu with 3D models. I know this limits you to keyboard-only controls, but it's better than nothing.
  •  08-11-2008, 7:52 PM 7049 in reply to 5285

    Re: colisions not working

    irwanday, maybe instead of making the seperate exe files send variables back and forth(which very well might not be possible anyway), why don't you just make a txt file and write the variables there and then read them from the other exe. This would work both ways, and you could always just write over the previous variables to prevent confusion. I haven't tried it myself but it might work.
    I wonder... do phrogs eat phlies????
View as RSS news feed in XML