14 Replies Latest reply on Apr 7, 2007 11:55 AM by Totherescue

    3D Games FORUM

    Totherescue
      I'm only 11 though I know how to make a charactor move around a screen with a gun and able to shoot enemies! Though this forum is to discuss the hard parts in a game like collison,boundaries,enemies,health engines, and more! Learn alot here by making these things. If you know anything please post here!
        • 1. Re: 3D Games FORUM
          ensamblador Level 1
          I am surprised. I was able to move a character only until 13 :)

          If you mind post questions individually, obviosly before usiang the search menu. Search for collision for example.
          • 2. Re: 3D Games FORUM
            Totherescue Level 1
            Ok I can do simple things like evenmmake a cursor but boundaries I've seen lots of tutorials for but what sucks is they have a couple billion scripts and I only want 1 SIMPLE BOUNDARE SCRIPT!!!!!!!!!!!!!!!!!!!
            • 3. Re: 3D Games FORUM
              Totherescue Level 1
              Ok I can do simple things like even mmake a cursor but boundaries I've seen lots of tutorials for but what sucks is they have a couple billion scripts and I only want 1 SIMPLE BOUNDARE SCRIPT!!!!!!!!!!!!!!!!!!!
              • 4. Re: 3D Games FORUM
                Level 7
                Hi Totherescue,

                Welcome to the world of Director. Hope you stay with it for many years to come.

                I'm impressed to hear you're 11 and already doing some complex things with the
                program. I have tutorials at:
                http://www.fbe.unsw.edu.au/learning/director/
                and a set or resources/links at:
                http://www.fbe.unsw.edu.au/learning/director/resources/
                The above URL links to all the best Director sites on the web and other useful
                info.

                If you have specific questions on how to do things, you can post here or in other
                forums. I have links to the all the various forums in my resources page.

                I wish you all the best with your Director journey.

                regards
                Dean

                Director Lecturer / Consultant
                http://www.fbe.unsw.edu.au/learning/director
                http://www.multimediacreative.com.au

                • 5. Re: 3D Games FORUM
                  alPartridge
                  Hello rescue,

                  Here's a simple approach to 2D collision. When a sprite moves inside a second sprite's boundary [the rectangle that surrounds the sprite] you can test that as a collision. (There are other ways to test this - but let's start with a simple one.) When you do this you simply create a behavior script (make sure behavior is the script type in the property inspector - it will have the little daisy gear in the thumbnail view) and then in that behavior script type something like this...


                  property pTarget

                  on beginSprite(me)
                  pTarget = ---- now here you can type the channel number of the target sprite
                  end


                  on exitFrame (me)
                  if sprite(me.spriteNum).loc.inside(sprite(pTarget).rect) then
                  beep()
                  end if
                  end

                  of course in practice you'll want to try to identify target sprites dynamically - one common way is to make targets 1 position away from the thing you expect will hit them. Or if you know for example that you want to check 1 projectile against a series of possible targets - you could repeat through a range of targets. You could also turn it around. This script is designed to go on the projectile, but you could just change the reference to me.spriteNum (that is a way to say the channel number of the sprite this script is attached to) to refer instead to the target. Then each target could get a copy of the script attached to them.

                  Since you are just starting to learn, I'd recommend reading Gary Rozenzwieg's book. See if you can find an old copy of Tab Julius' "lingo" (probably the best lingo text ever written and still applicable (though much of the code is probably depricated) and if you want something more recent you could read Dean's book. There are a ton of good ones out there to get you going.

                  The only other reccomendation I have for you is this. Before you go to far... learn about some basic programming concepts.
                  variable assignment, sequence, events and list structures. This will really, really help make everything clearer.

                  -- hope your journey goes well,

                  --al
                  • 6. Re: 3D Games FORUM
                    Totherescue Level 1
                    Hi everyone,
                    I have a 3D software called 3D canvas PRO! But how do you export a file in Shockwave 3D if anyone knows?
                    • 7. Re: 3D Games FORUM
                      alPartridge Level 1
                      Oops Just realized you were asking about collision in 3D. Well that's much simpler isn't it.

                      Okay: there are several ways to do it. Here's a simple one. The collision of one body against another in 3D space is often easily detectable based on the very simple question of distance between the position of one object and the position of a second object. That's how Podz works for example.

                      The script simply polls the distance between objects. The key is only asking for the stuff you need (strip out models and things you don't care about - so you don't waste time finding collisions between buildings for example.) So in the distance model you are determining if a 3D model is within n distance of some other model.

                      on exitFrame (me) -- in practice you'll want to have a main script that gets called and has multiple states
                      repeat with targetModelNum = 2 to 100
                      if member("3DWorld").model(1).transform.position.distanceTo(member("3DWorld").model \ [targetModelNum].transform.position < 1.0 then -- mind the line break here
                      beep()
                      end if
                      end

                      I wrote a tutorial four doug on projectile firing that uses the built in director collision method.

                      http://director-online.com/buildArticle.php?id=1076

                      You could also use Havok, or if you want to learn to do collision by the math, Paul discusses mesh triangle to point based collision math in his book Director's Third Dimension.

                      hth,

                      --al
                      • 8. Re: 3D Games FORUM
                        Level 7
                        alPartridge wrote:

                        > I wrote a tutorial four doug on projectile firing that uses the built in
                        > director collision method.
                        > http://director-online.com/buildArticle.php?id=1076

                        And I have some 3D tutorials (right colum)
                        http://www.fbe.unsw.edu.au/learning/director/#3d
                        Cover using Havok, collison detection using collision modifier and collison using
                        modelsUnderRay.

                        regards
                        Dean

                        Director Lecturer / Consultant
                        http://www.fbe.unsw.edu.au/learning/director
                        http://www.multimediacreative.com.au

                        • 9. Re: 3D Games FORUM
                          Level 7

                          alPartridge wrote:

                          > Here's a simple approach to 2D collision.

                          Question may have been about 3D but that 2D answer is good stuff to know.

                          regards
                          Dean

                          Director Lecturer / Consultant
                          http://www.fbe.unsw.edu.au/learning/director
                          http://www.multimediacreative.com.au


                          • 10. Re: 3D Games FORUM
                            Level 7
                            Totherescue wrote:

                            > Hi everyone,
                            > I have a 3D software called 3D canvas PRO! But how do you export a file in Shockwave 3D if anyone knows?

                            Hi Rescue,

                            I haven't used 3D Canvas Pro, but looking it up at:
                            http://www.amabilis.com/products.htm
                            it does list Shockwave 3D (w3d) as a format it exports to.

                            So, from the File pulldown menu, there's probably an Export option. When you chose that, a dialog box should
                            appear with a list of the various formats. Browse to find Shockwave 3D (w3d)

                            regards
                            Dean

                            Director Lecturer / Consultant
                            http://www.fbe.unsw.edu.au/learning/director
                            http://www.multimediacreative.com.au


                            • 11. Re: 3D Games FORUM
                              Totherescue Level 1
                              I am having a navigating probem! The problem is when the character moves around the area when he is turning lets say left he cannot go up and left at the same time. But I also do not know how the mouse can do a look turn. How do you do that stuff. I already can make a cursor and a charact that can navigate with killable enemies but the navigation engine would be harder for a player! Even If i made the turning of the character fast, well it just would not seem right for a game like that unless I added unkillable teamates type of game I guess it would be suitable and OK but I still want a advanced style cause I already know flash and how to hack it but with Director I prefer my own stuff anyways! I really need to know a good navigation style.
                              • 12. Re: 3D Games FORUM
                                duckets Level 1
                                To do a proper 'mouselook' with director, you need to use an xtra which will allow you to reset the mouse's position. The technique goes like this:

                                * When the game starts, set the mouse pos to the centre of the screen
                                --- then, each frame: ---
                                * Read the distance of the mouse to the centre of the screen
                                * Use the horizontal and vertical distance to rotate your viewpoint
                                * Reset the mouse position back to the centre, ready for a new measurement next frame

                                The reason you have to keep resetting the mouse position is that, if you don't, the cursor will reach the edge of the screen and stop, preventing you from turning further.

                                There's a free non-shockwave-safe xtra that can do it, here:
                                http://www.scirius.com/eng/index.html
                                (see the 'setMouse' xtra)

                                There's a shockwave-safe one here, but not free:
                                http://www.andradearts.com/
                                (see 'enhancer' xtra, or 'move cursor' xtra)

                                I have a few navigation (and collision) demos here:

                                Very simple - arrow keys to rotate & move the box:
                                http://robotduck.com/content/articles/director/3d/basics/controllableBox/index.htm

                                Same controls, but controlling a first-person cam, and includes collision with walls:
                                http://robotduck.com/content/articles/director/collision/modelsUnderRay/wallCollision_V-Ra y-FPS.htm

                                FPS mouse control without an xtra - not the same as 'real' mouselook though, click and hold on the viewport to walk, drag left right to rotate, up/down = forward & back:
                                http://robotduck.com/content/articles/director/collision/modelsUnderRay/wallCollision_V-Ra y-FPS_mouseMove.htm

                                hope these help!

                                - Ben
                                • 14. Re: 3D Games FORUM
                                  Totherescue Level 1
                                  Alright everyone I figured out how to turn and move at the same time myself using the software but I still need to know something. I know how to use the mouse to look turn now! (already did a long time ago though) But a problem. I need something to bring the mouse in the middle of the screen every 1.5 seconds! If anyone knows how to do this please tell me. I mean, I did figure out most of the stuff myself as a matter of fact.