Need help on setting up the strucute for a SideScrolling game

I am using the tile approach and put the objects in a 2D array. For objects that move and interact with the chracters beyond just being there I have a list. The first group of Objects are called bricks and the second is World Objects. Bricks' locations are confined to the grid, but worldObjects' locations aren't. In the levelcreator I''ve made for the game you can select a brick and place it down and select a worldObject and place it down on the grid. I was wondering how I should make it so worldObject's aren't confined to the grid in the levelcreator. I've also made it so the levlecreator is zoomed out more than in the game. The grid consists of 75x75 tiles in the game and 50x50 tiles in the levelcreator. To switch from the levelcreator to the game I simply multiply by 1.5. Any suggestions. Or should I make it so All objects lie on the grid? Thanks. Any questions just post them here

make the world objects totally independent of the grid while the bricks be dependent on it. have the world objects in a list with their positions stored in the object itself. When your doing, say, collision checking with bricks, just take their positions and see if the cell it occupies has a brick in it.
personally i won't use a 2d array for a side scrolling game, the level tends to be rather large and a giant 2d array wastes annoying amounts of memory.

Similar Messages

  • I need help with setting up time machine for backup

    I would like help with setting up time machine for backup.

    You will need an external hard drive (formatted for a Mac).
    Then you plug it in and go to system preferences>time machine and select the external HD and turn it on.
    The backups are automatic.
    Barry

  • Need help in setting up Group Policy for same user in local system and Terminal server

    Hi All,
    Currently our remote users are using our network using VPN client over internet.
    They are generally at their home computer and doing VPN as they have to work only in one RDP server for application.
    We actually have a OU created for these RDP users and assign then some strict policy like they can not use any other .exe,they can not user any explorer ,they can not even use windows explorer when they are on RDP they just use one exe of their application.
    Now what my management want is they want their home computers in Domain and want them to login via their same credentials they are using for RDP but they don't want them to restrict in their home computers with any strict policy.
    Now my confusion is how can I configure different policies for same users or same OU.
    Can any one guide me please...

    you can achieve this fairly easily with group policy.
    create an OU and put your remote desktop servers in that OU.
    configure both user and computer policies in a group policy and link it to that ou.
    you need to enable loopback mode - you may want it in merge or replace depending on your other policies you have. Probably replace though I would guess. this is set in the computer configuration > admin templates > system / group policy section.
    now remove the policy you have currently setup for your users on the users OU containing the rdp users. If you want you can move these users back to your main users OU.
    when your users login to the RDP server the settings in the user section of the GPO linked to the RDP Servers OU will apply.
    when the user logs in to their own computer the policies from the user OU and computer OU will apply - but not the more restrictive RDP OU.
    hope that makes sense.
    Regards,
    Denis Cooper
    MCITP EA - MCT
    Help keep the forums tidy, if this has helped please mark it as an answer
    My Blog
    LinkedIn:

  • Need help with re-prompting the user for input .

    I am trying to wright a code the re prompts the user for input if they enter anything but an integer but I keep getting a "char cannot be dereferenced" error when I try to compile.
    Here's what I have got:
    import java.util.Scanner; // imports Scanner methods
    public class SandBox
      public static void main(String[] args)
          // re-prompting test
          Scanner in = new Scanner(System.in);
          System.out.println("Please enter an integer: ");
          String i = in.nextLine();
          for(int a=0; a<i.length(); a++)
              if( (i.charAt(a).isDigit()) ) {
                  System.out.println("Thank you!");
                  break;
                } else {
                    System.out.println("Please try again");
                    continue;
          int b = Interger.parseInt(i);
      }// end of class
    }//end of main method
     

    Sorry for double posting but it won't let edit my last post.
    I would prefer to go through it without using try catch because it takes longer though I will use it if I cannot get the other way working. I currently have two versions of the code both using try catch and the other way but both say that they "cannot find symbol" when I try to parse. here are both versions of the code:
    import java.util.Scanner; // imports Scanner methods
    public class SandBox
      public static void main(String[] args)
          // try catch test
          boolean inputIsFaulty = true;
          int inputInt = 0;
          Scanner in = new Scanner(System.in);
          do {
             System.out.println("Please enter an integer: ");
             String i = in.nextLine();
             for(int a=0; a<i.length(); a++)
                if (Character.isDigit(i.charAt(a))) {
                  System.out.println("Thank you!");
                  inputIsFaulty = false;
                } else {
                    System.out.println("Please try again");
            while (inputIsFaulty);
          inputInt = Integer.parseInt(i);
      }//end of class
    }//end of main method
    import java.util.Scanner; // imports Scanner methods
    public class SandBox2
      public static void main(String[] args)
          // try catch test
          boolean inputNotOK = true;
          int inputInt = 0;
          Scanner in = new Scanner(System.in);
          do {
             System.out.print("Please enter an integer: ");
             String inputStr = in.nextLine();
             try {
                inputInt = Integer.parseInt(inputStr);
                // this line is only reached if the parse works
                inputNotOK = false;
             catch (NumberFormatException e) {
                System.out.println("You didn't enter a proper number.  Please Try again.");
          while (inputNotOK);
          inputInt = Integer.parseInt(imputStr);
      }//end of class
    }//end of main method
     

  • Need help/hints/tips with a method for connect 4 game.

    Hi!
    I'm currently trying to get my "movepiece"-method to make it so that players can only drag a piece into the empty square at the bottom row, and if the square is not empty the method will move up one row and check if it's empty if not, repeat until
     6 are checked if no one is empty then move is invalid.
    I've been trying out while loops and for loops but i think i might set the wrong conditions for exiting the loop...
    Here the code for the method without any loops simply adds pieces.
            /// <summary>
            /// Method that performs the actual move.
            /// The old piece gets overrun by the attacking piece. 
            /// The attacking piece's position becomes null.
            /// </summary>public Piece[,] MoveAttackpiece(int[,] changearray)
    int origX = changearray[0, 0];
    int origY = changearray[0, 1];
    int targetX = changearray[1, 0];
    int targetY = changearray[1, 1];
    pieceArray[targetX, targetY] = pieceArray[origX, origY]; //swap
    return pieceArray;
    The game is using winforms and a 2D array(pieceArray)to draw the game board
    I'm using a Constants class for declaring the height and width of the board, which the pieceArray is based on, Namely const int BOARDESIZEx and BOARDERSIZEy.
    And while i'm at it when i did different loops for tryng to make the piece move down/up (based on if a square in bottom row was empty or not) the program crashes and i get the "Null Reference Exception unhandled"
    at this part in the game.CS (the earlier code reside in a class named Squares.cs)
    if (changearray != null)
    //Building string to print (split over several rows for readability but also to avoid calculations)
    Piece attackpiece = pieceArray[changearray[1, 0], changearray[1, 1]];
    string message = "";
    if (move % 2 == 1) message += "TURN " + move / 2 + ":\r\n"; //integer division, as there are two draws per turn
    message += attackpiece.Name + ": "; //Walker:
    message += IntegerToChar(changearray[0, 1]); //Walker: A
    message += (changearray[0, 0] + 1) + " - "; //Walker A1 -
    message += IntegerToChar(changearray[1, 1]); //Walker A1 - B
    message += (changearray[1, 0] + 1); //Walker A1 - B2
    if (move % 2 == 0) message += "\r\n"; //blank row inserted after each completed turn
    Board.PrintMove(message);
    I've tried making
    While(piecearray[targetX, targetY]!=null)
    pieceArray[targetX, targetY]==pieceArray[targetX, targetY +1];
    return array;
    but that didn't work and i don't really know how to make the game start at bottom row.
    I appreciate any help or tips on how to get this to work since it's the only thing left for making the game work as intended.
    Cheers and thanks for reading.
    PS: if there's anything you wonder just ask and i'll explain as much as i can.
    Regards Gabbelino
    Student at the University of Borås, Sweden

    Let's look at what's wrong with the following code.
    While(piecearray[targetX, targetY]!=null)
    pieceArray[targetX, targetY]=pieceArray[targetX, targetY +1]; // I assume the "==" in your post above was a typo.
    Suppose, for the sake of argument, that targetX is 2 and targetY is 3, and that pieceArray[2,3] is not null. The line inside the loop will then become...
    pieceArray[2,3] = pieceArray[2, 4];
    ...and this line will keep being executed as long as pieceArray[2,3] is not null, which if pieceArray[2,4] is not null will be forever (infinite loop).
    I suspect that your loop should look something like this...
    for(int i = 0; i < BOARDSIZEy; i++)
    // Look for the first available square in the target column.
    // When found, set the piece on that square then break out.
    if(pieceArray[targetX, i] == null)
    pieceArray[targetX, i] = pieceArray[origX, origY];
    break;

  • Urgently need help on setting up the ESM MANAGEMENT CONSOLE

    Gooday everyone,
    As i was trying to setup a demo ESM just to test out something before it goes into production server .
    and i always hit up into issue where everytime i will receive a message which is : Object reference not set to an instance of an object .
    after this message appear , i was unable to complete the ESM MANAGEMENT CONSOLE setup .
    moreover we have the NOVELL Edirectory server setup wizard , so i was using the we have no idea what was going on about it . Besides that , the login user name and password seems to be correct our system using are NOVELL ENDPOINT SECURITY 3.5 ( need to upgrade to 4.1IR in later after the 3.5 version are setup .. )
    is there any PRO will come to help ? we need this setup to run as usual ASAP :(any PRO can help will be much appreciated .
    thanks .
    from : NX ( a normal user start to use NOVELL ESM :( )

    nxgame,
    It appears that in the past few days you have not received a response to your
    posting. That concerns us, and has triggered this automated reply.
    Has your problem been resolved? If not, you might try one of the following options:
    - Visit http://support.novell.com and search the knowledgebase and/or check all
    the other self support options and support programs available.
    - You could also try posting your message again. Make sure it is posted in the
    correct newsgroup. (http://forums.novell.com)
    Be sure to read the forum FAQ about what to expect in the way of responses:
    http://forums.novell.com/faq.php
    If this is a reply to a duplicate posting, please ignore and accept our apologies
    and rest assured we will issue a stern reprimand to our posting bot.
    Good luck!
    Your Novell Product Support Forums Team
    http://forums.novell.com/

  • Hook IMac pro to second monitor, Dell U2410.  Need help on setting from the laptop.

    What setting are needed to set up external monitor Dell U2410 monitor.  I am make progress but still need to need the setting internal to the Imac Pro.
    I am transmitting to the monitor.  The screen saver is there.  Hit F3 key causes anknowledgement. but open web pages they do not transfer.
    I have used the system preferance which acknowledges the presence of the monitor.
    Need suggestion if you have them.
    Thanks,
    Bobby

    The external hard drive should mount on your old iMac through USB. USB2 is backwards-compatible, only consequence is that you'll have to be patient with the long wait for your files to copy over the slower USB1 or 1.1.
    Another alternative is to directly connect the two Macs via the ethernet cable. Instructions are here:
    http://docs.info.apple.com/article.html?path=Mac/10.4/en/mh914.html
    Note that you most likely need a crossover ethernet cable (versus a standard straight-though cable), based on this article:
    http://docs.info.apple.com/article.html?artnum=42717

  • I need help putting icons in the toolbar for quick access to my favorite site

    In the old firefox i was able to put small icons in the toolbar area. Now I am not sure how to put those back on because it deleted all of them when i updated to the 4.0 firefox. How can i put them 0n agian??

    Check that you still have the "Bookmarks Toolbar items" placed on the Bookmarks Toolbar
    * Make sure that you have the "Bookmarks Toolbar" visible: "View > Toolbars"
    * Check in "View > Toolbars > Customize" that the "Bookmarks Toolbar items" is on the Bookmarks Toolbar
    * If the "Bookmarks Toolbar items" is not on the Bookmarks Toolbar then drag it back from the Customize window onto the Bookmarks Toolbar
    * If you do not see the "Bookmarks Toolbar items" then click the "Restore Default Set" button
    This can also be caused by a problem with the file places.sqlite that stores the bookmarks and the history.
    * http://kb.mozillazine.org/Bookmarks_history_and_toolbar_buttons_not_working_-_Firefox

  • HT1766 Need help!  I downloaded the app. for solitaire and the phone went really weird help please

    Please help me I don't know how to back up my phone I can't calls in because I downloaded solitaire

    Stop being impatient.
    What app?
    What is meant by "weird"?
    Downloading apps does not prevent the phone from working as a phone.
    Have you tried removing the app?

  • I need help with setting up my Sun Java Studio Creator

    Hello all, i need help with setting up the Studio Creator, i"m new to all that staff so is there anyone to help me just a little with all that if yes email me at [email protected] or get me on AOL Instant Messanger with the screen name: wretch17
    thanks :-)

    Hi,
    Welcome to the Creator community! Thanks for your interst in Sun Java Studio Creator. Please feel free to post any question related to creator on this forum .
    Take a look the creator website at
    http://developers.sun.com/prodtech/javatools/jscreator/
    CreatorTeam

  • Need help w/ setting up ports to run a server for America's Army

    Need help w/ setting up ports to run a server for America's Army. I read wat u need to change the ports but i dont understand wat to put. here is wat the site says
    Q: How do I run my own server?
    A: Quick and dirty server info:
    1. Edit RunServer.bat to change the map.
    2. Run RunServer.bat
    Or:
    server.exe LAN MAPNAME.aao (Host a LAN game)
    server.exe global MAPNAME.aao (Host a Public game)
    Also: When you create a server setup and want to allow other users to join your server, you need make sure the following ports are open for outgoing and incoming traffic in your firewall: 1716 (UDP), 1717 (UDP), 20025-20045 (TCP), and 20047 (TCP). Failure to open these ports will prevent the server from accepting connections from other players or prevent other players from being able to see your server online.
    There are several settings that also need to be defined in your server configuration INI file (in the Windows version, these files are located in “My Documents\America’s Army Server Settings\{settings file name}.ini”).
    [Engine.GameEngine]
    ServerActors=Andromeda.AndromedaMBS
    [Andromeda.Andromeda]
    GameServerIp=
    Make sure that you set the actual IP address of the America’s Army Server under GameServerIp= (for example, “GameServerIp=000.000.000.000”). The supplied address must be your actual internet IP address, if this is left blank or you supply the IP address for your internal network (such as 192.168.0.x), your server will not be able to accept connections from the internet.
    If your server.ini file contains the setting shown below, please change the QueryPort setting to 20025. This setting can also be removed, as the default setting is port 20025.
    [Andromeda.AndromedaMBS]
    QueryPort=20025
    Punkbuster user fix correction.
    If [Engine.GameEngine] block has been changed to read as below:
    [Engine.GameEngine]
    ServerActors=IPDrv.AndromedaMBS
    Please add the following block to your INI file:
    [IpDrv.AndromedaMBS]
    QueryPort=20025
    (Last Updated: 2006-04-20)

    Your images are not stored in the catalog. They are stored in folders on your computer. If you imported images that were already on your computer using the "Add" Option they are still in that same folder. If you imported images from your camera then they are in the folders that you specified when you imported. The catalog points to those images wherever they are located, and records all of the adjustments that you make to the image. When you send an image to Photoshop for further editing and save that image in Photoshop, it is normally saved back in the same folder as the original image.
    Images are not "saved" in Lightroom. The basic default workflow in Lightroom is to store all of the adjustments in the catalog, leaving the original image completely unmodified. The catalog becomes the central controlling mechanism. It is a database that contains pointers to where the images are located and a record of all adjustments made to those images using Lightroom. Properly managed, you only have those original master files and secondary files for the ones that you have sent to Photoshop for further adjustment. When you want to provide a copy for someone else, you use the export dialogue for that purpose. I often export JPEG images to share with others or to post on the web. After I have usedthe JPEG for its intended purpose I delete it.

  • I Need help!!! The card I used when I first set up my account I lost it so now I can't download any music cause it's wanting a number of that card I lost... Someone tell me what I can do???

    I Need help!!! The card I used when I first set up my account I lost it so now I can't download any music cause it's wanting a number off that card and I don't have it anymoe... Someone tell me what to do please???

    Add another good card and delete the old one, Yu can also purchase and redeem an iTunes gift card and hthen delee the bad credit card.  Yu need a valid payment method for update as well even purchasing free apps if the account was set up with a credit card.

  • HT5312 I want to purchase an APP on my ipad. When I enter the answers to the security question, it comes back invalid. The answers are correct. I need help re-setting my answers.

    I want to purchase an APP on my ipad. When I enter the answers to the security question, it comes back invalid. The answers are correct. I need help re-setting my answers.

     Account Security Team (AST) 
    Check the AppleCare number for your country here:
    http://support.apple.com/kb/HE57
    Call them up, and let them know you would like to be transferred to the Account Security Team.

  • I actually need help but cannot find the answer. Please.......Lately when open a new tab it does not open with a blank page. I don't want to set my homepage as

    I actually need help but cannot find the answer.
    Please.......Lately when open a new tab it does not open with a blank page. I don't want to set my homepage as blank as when I first open Firefox, it automatically loads my hotmail page. But then if I open other pages I don't get a blank page. Help, please?
    Thank you.
    ''[Personal information removed by moderator. Please read [[Forum and chat rules and guidelines]], thanks.]''

    hello, please refer to [[New Tab Page – show, hide and customize top sites]] in order to switch the feature off.

  • I buy for mac app but not for the iPad, so how do I reinstall a program that has already purchased? I need help because I bought the imovie'11 but when he opened it only brought 8 movie trailer templates instead of the 15 it says on the program. How do I

    I buy for mac app but not for the iPad, so how do I reinstall a program that has already purchased? I need help because I bought the imovie'11 but when he opened it only brought 8 movie trailer templates instead of the 15 it says on the program. How do I solve this problem? Once paid for a program incomplete. I also liked that the AppStore itself had a button to reinstall programs already bought, because it is very hard to understand how to do this in the store, only option is to install and hide purchase, and how do I reinstall, attention'm talking about reinstalling a computer mac, not an ipad or iphone.
    Thank you.

    Prodesigntools.com , go ahead and download the software from there and use your serial number to serialize it.

Maybe you are looking for