How to make a wall for a game

hello developers
I’m sharing a long time to find out how to make a wall for my game but now where is it.
Can someone help me?
its a wall for an iphone/ipod game.
It must be a wall that a sprite will stop walking it’s not a killer object but a stop object.
oh and are there differants in programing in ipad/iphone?
Thanks for help
Grtz Jimmy

I don't know what's you point on the wall and the player but you should do something as that:
-(IBAction)goLeft
     if (player.x > wall.xo && player.x < wall.xI)
              // you are in the wall go right
          if(player.y > wall.yo && player.y < wall.yI)
             // you are in the wall go right
             player.x ++;
          else ; // you are up or down of wall
-(IBAction)goRight
    if (player.x > wall.xo && player.x < wall.xI)
          if(player.y > wall.yo && player.y < wall.yI)
             // you are in the wall go left
             player.x --;
           else ; // you are up or down of wall

Similar Messages

  • Tutorial for Macromedia MX 2004 how to make a UI for a game or movie?

    My email is [email address deleted by host] I'm looking for some tutorials or links to help me start a UI in Director/Mx2004 for a project I know the Halo 2 UI was done in Director was wondering if anyone knew some tutorials or could help me out thank you.

    If you want help with Director then please repost in the Director forum.

  • How to make "Levels" in simple java game

    I just wanted to know if anybody knew how to make "Levels" in a java game. In my case, it is to change two polygons that are used in the background. I think you have to use an array of some kind, but i dont really know.
    Here is my source, the polygons are by the massive ///////// areas.
    I cut out the majority of the program, because it was too long.
    public class collision extends Applet implements MouseListener,MouseMotionListener
        private  Image rickImage,mazeImage;
       Image Buffer;
       Graphics gBuffer;
       int x, y;
       int[] LeftWallX = {0,204,204,149,149,162,162,243,260,235,259,232,260,230,207,207,0};
       int[] LeftWallY = {500,499,402,402,341,324,227,191,157,141,135,123,116,109,86,1,1};
       //int[] PlayAreaX = {204,204,149,149,162,162,243,260,235,259,232,260,230,207,207,263,263,245,282,262,274,257,273,250,184,184,170,170,208,216,216};
      // int[] PlayAreaY = {499,402,402,341,324,227,191,157,141,135,123,116,109,86,1,1,86,103,115,129,138,147,155,201,230,323,340,384,384,402,499};
       int[] RightWallX = {500,500,263,263,245,282,262,274,257,273,250,184,184,170,170,208,216,216};
       int[] RightWallY = {500,0,1,86,103,115,129,138,147,155,201,230,323,340,384,384,402,499};
       boolean mouseInside, collide;
       boolean rolled = false;
       boolean msg = true;
       int sX=204,sY=490,sW=12,sH=9;
       //Declare the rectangles
       Rectangle  movingRect,finshBloc,startBloc,oopsBloc;
       //Declare the polygons
       Polygon leftWall,playerArea,rightWall;
            ///Initiate
            public void init()
                 rickImage = getImage(getDocumentBase(), "rick.jpg");
                 mazeImage = getImage(getDocumentBase(), "maze1.jpg");
                 collide=false;
                 Buffer=createImage(getSize().width,getSize().height);
                 gBuffer=Buffer.getGraphics();
                 rightWall=new Polygon(RightWallX,RightWallY,18);
                 playerArea= new Polygon(PlayAreaX,PlayAreaY,31);
                 leftWall= new Polygon(LeftWallX,LeftWallY,17);
            public void paint(Graphics g)
                 drawStuff();
                 g.drawImage (Buffer,0,0, this);
    */

    I'm not exactly sure in your case what you are trying to accomplish. If all you want to do is make new polygons for your levels then you will simply need a Vector of type level (or polygon). Store multiple levels/polygons in that vector. This can be done many ways, probably the most efficient way would be to create a class Level of sorts and create each level object from there. This way you have all your levels stored into that vector.
    I have made programs where the levels/mazes are randomly generated based on certain parameters (this way you would not need to define any specific level). This can be done inside the Level class and added to the vector so that when a level is randomly generated there are literally infinite possibilities. I would suggest posting all your code or at least a breakdown UML diagram of what is going on in your entire program.

  • How to make a form for input in web interface builder

    Hi expert:
        How to make a form for input in web interface builder?I have already used it to do PS planning, but I don't know how to  draw lines and checkboxes . Thanks in advance.
    Allen

    WAD:
    Open the WAD and create a new template. On the left hand navigation you will have several Web Items available. Under 'Standard' you have 'Analysis' item. Pull that into your template to the right. Under the Properties tab you need to pick the query [form/layout] that you have built in Query Designer.
    You will also find other items such as Button group, Checkbox, drop down, list box etc available. Pick and drag into the template whatever it is you require. Lets say you want a button. Under the Properties tab select the 'Command' that you require. You could use standard commands that are available there. You could also define functions and commands that you require.
    Query Designer:
    Open the QD and drag the characteristics and key figures that you require into the rows and columns of the QD. You would need to specify restrictions under the Filter tab of the QD based on the granularity of data that you require. You would need to remember that the key figures need to be made Input Ready [do this by clicking on KF and on the planning tab select "change by user and planning functions"].
    This shouldgive you a start. After you've explored it yourself a bit we can discuss further and I can certainly provide you additional details/material on these areas.
    Srikant

  • How to make a group for selectd Object javascript

    How to make a group for selectd Object javascript

    There is currently no native way to email groups from iPad.
    The only way to do this is if your recipients are already members a a distribution group controlled elsewhere such as a Google Group or an  Exchange Organisation, then you can email the distribution group address which will then in turn forward to the individual email address of the members.
    Does it have to be email as currently you would have to add each recipient to the email manually.
    iOS to my knowledge doesn't support contact groups in context other than organisation.

  • How to make S-Curve for Primavear P6 by using BI publisher?

    Hi,
    Anyone knows how to make S-Curve for Primavear P6 by using BI publisher? I can display colunm such as planned unit, but not cumulative value. So I can't plot S-curve.
    Thanks
    Wang Xin
    Edited by: 957906 on 09-Sep-2012 03:26

    The problem with the datagridview is that it can only show one table.
    For more tables 3th party datagrid's are better. 
    Although you can start with using the old datagrid. Despite what is written on MSDN is it a complete different control then the datagridview. You can add in to your toolbox by right clicking on it and then add it.
    The datasource of a DataGrid can be a complete dataset which is showed with all its relations.
    Success
    Cor

  • How to make a CheckBox for a report parameter?

    Hi,
    How to make a CheckBox for a report parameter?
    thanx

    design ur parameters forms using forms and call ur report form there

  • How to make a installer for iphone application

    hi, dear all, I have made a iphone application by XCode , it can running perfect on emulator . I want it can be install on real device , how to do it ? how to make a installer for my iphone application ?
    thanks to your response .

    If you go to the iPhone DEV area on Apple.com you can get a installer app once you are a developer. This installer will let you use apps for your own use. This installer app also supports up to X amount of phones you can install the application on. I thought it was set at 100 but could be now up to 500.

  • How to make a program for backgroung processing used servlet

    how to make a program for backgroung processing used servlet

    well i need the coding part written in servlet ,in which servlet is always ready for accepting a client request.

  • How to make exception rules for Stylish rules which change fonts?

    How to make exception rules for Stylish rules which change fonts?
    I use [https://addons.mozilla.org/en-US/firefox/addon/stylish/ Stylish add-on] to change specific fonts to other fonts of my choice, but I have a problem. I want to change the font Arial to Tahoma in almost all pages I visit, but with the exception of websites as wikipedia.org. Because of this, I find myself having a very long list of domains to change Arial to Tahoma, only because I don't want that rule to apply to wikipedia.org and additional one or two other websites.
    The current rule I'm using is, (my actual list is a lot longer, but this is just an example):<br/>
    '''''@-moz-document domain("mozilla.org"), domain("thefreelibrary.com"), domain("sil.org"), domain("ethnologue.com") {'''''<br/>
    '''''@font-face { font-family: 'Arial'; src: local('Tahoma'); }'''''<br/>
    I can't use the following rule because I don't want it to apply to wikipedia.org:<br/>
    '''''@font-face { font-family: 'Arial'; src: local('Tahoma'); }'''''

    Try something like this:<br />
    <br />
    <pre><nowiki>@font-face { font-family: 'Arial'; src: local('Tahoma'); }
    @-moz-document domain(wikipedia.org){
    @font-face { font-family: 'Arial'; src: local('Arial'); }
    </nowiki></pre>

  • How to make itunes account for free

    how to make itunes account for free?

    Since you're posting here, you already have an Apple ID. Click here and follow the rest of the instructions.
    (93518)

  • How to make resizable false for JcomboBox

    hi ,
    I am using JCombobox , but it resizes when length of data inside it is
    increses.I am in trouble because of that.
    Would anybody how to make resizable false for Jcombobox
    --Harish                                                                                                                                                                                                                                                                                                                                                                                   

    Set a preferred size on the combo box, e.g.
    box.setPreferredSize(new Dimension(150,box.getPreferredSize().height));

  • How to make font larger for turbo tax

    how to make font larger for turbotax

    There doesn't appear to be a setting in TurboTax to make the font bigger.
    But you can go to Applications/System Preferences/Displays/Display and pick Resolution:Scaled and experiment with different resolutions, which will make the fonts look bigger.
    There are also zoom settings in System Preferences/Accessibility/Zoom.

  • HT201436 how to make personal ringtone for each contact

    how to make personal ringtone for contacts

    You create the ringtone - Google will find several ways to do this.
    Then sync them to your iphone.
    Then go to the contact and select the ringtone you want

  • How to make jar file for this compilation method ?

    can any one tell me how to make jar file for this compilation
    D:\java\browser\IEInJava>javac -classpath jdic.jar;. IEInJava.java
    D:\java\browser\IEInJava>java -cp jdic.jar;. IEInJava
    *this is a compile code:-*
    D:\java\browser\IEInJava>javac -classpath jdic.jar;. IEInJava.java
    *and this is a run code:-*
    D:\java\browser\IEInJava>java -cp jdic.jar;. IEInJavanow how make JAR file ?

    Assuming IEInJava only uses classes inside the jdic jar, this is one way. D:\java\browser\IEInJava> jar cf yourjar.jar IEInJava.classThen to run it you would use D:\java\browser\IEInJava> java -cp jdic.jar;yourjar.jar IEInJavaAnother way would use the jar manifest file to specify the Main-Class and Class-Path.

Maybe you are looking for