Reading int[] in the game map

I have a method setGameMap() which has return type: int[] . It contains a set of tiled map stored in arrays. If i want to call this array in another class, how do I set the tiles one by one using for loop? ( e.g. castleMap[i] ) as i want to setCell using LayerManager.
for (int i = 0; i < gs.getGameMap().length; i++) {
int column = i % 30;
int row = (i - column) / 30;
castleLayer.setCell(column, row, ?????)
It requires int instead of int[]. What should i put on the question marks?
How to convert int[] to int?

How to convert int[] to int?You can't just cast an array of values to a single value.
What would be the integer value of this array: [1,2,3,4,5]?

Similar Messages

  • How can i have my page fron facebook bigger now it's so small i can even read it and the game are really to small too

    When i open facebook using firefox i cant paly game or read the page because it's too small and when i use explorer i dont have that problem everything is normal

    -> Tap ALT key or press F10 to show the Menu Bar
    -> go to Help Menu -> select "Restart with Add-ons Disabled"
    Firefox will close then it will open up with just basic Firefox. Now do this:
    -> Update ALL your Firefox Plug-ins https://www.mozilla.com/en-US/plugincheck/
    -> go to View Menu -> '''Zoom''' -> click '''Reset''' -> '''Page Style''' -> select '''Basic Page Style'''
    -> go to View Menu -> Toolbars -> unselect All Unwanted toolbars
    -> go to Tools Menu -> Clear Recent History -> '''Time range to clear: select EVERYTHING''' -> click Details (small arrow) button -> place Checkmarks on '''Cookies, Cache''' -> click '''Clear Now'''
    -> go to Tools Menu -> Options -> Content -> place Checkmarks on:
    1) Block Pop-up windows 2) Load images automatically 3) Enable JavaScript
    -> go to Tools Menu -> Options -> Security -> place Checkmarks on:
    1) Warn me when sites try to install add-ons 2) Block reported attack sites 3) Block reported web forgeries 4) Remember Passwords for sites
    -> go to Tools Menu -> Options -> Advanced -> Network -> Offline Storage (Cache): click '''Clear Now''' button
    -> Click OK on Options window
    -> click the Favicon on SearchBar -> click '''Manage Search Engines''' -> select all Unwanted Search Engines and click '''Remove''' -> click OK
    -> go to Tools Menu -> Add-ons -> Extensions section -> REMOVE All Unwanted/Suspicious Extensions (Add-ons) -> Restart Firefox
    You can enable your Known & Trustworthy Add-ons later. Check and tell if its working.

  • How to create a map that is larger than the game in width and height?

    hi,
    i wounder how i can create a map(not the design) that is larger than the game in width and height, part of it will appear in the main page and anther part you can move to it after you press the arrow symbol, but the map is just one image so i want put it in line and out line the game page, and the out line part includes buttons and symbols the player can use, but it will be in line and the other part will be out line when you press the left arrow or the down arrow, how i can do that?
    and is that possible to animate it so when the player press the arrow, will give it action to start the animation in one sec, i know how to animate it if that possible but i don't know which code i will use for the mouse click with the arrow symbol, and how to use the same code in the same symbol to start anther animation depending on which part of the map is on?

    I don't know a lot about mask and masked layers and how to work with the normal layers beside i will use some 3D graphics but not in the background, i will explain all this to you to be more clearly.
    first i am using action script 3.0
    close ex,
    you have 2d map"image"  900*300 pixel.
    this image contains some 2d symbols when you click will go to anther normal map (anther normal layer) so they must appear.
    your game 320*320 px, and the place the map will show on 300*300, and there's basics objects will be in most pages including the page that show the map so i don't know a lot about how this will work with mask layers.
    so you can only see the left side of the map image and what it contains, while there's two arrows one to the left and one to the right there's three cases here,
    first when it show the left side(start from x:0 to x:300), the left arrow will not active when you press and the right arrow will start an animation that make the map image move to the mid side in one sec when you press.
    in mid side (start from x:301 to x:600) the same left arrow will active when you press to send you back to the left side while the same right arrow will be active to send you not to the mid side but to the right side,
    when moved to the right side the same left arrow will be active to send you to the mid and the right will not active when you press and depending on that,
    first how to make the large image appear with the three sides in the same place without effecting the other objects "like disappearing them" ?
    and the codes i need in the same left or right arrow symbol to make different actions with the same symbol when clicked depending on which part of the map is on.

  • How do I get Adobe Reader to stop trying to open the game Diversion and find a better "opener"?

    I downloaded the game Diversion at least 4 times but I couldn't find it.  When I finally did, it turned out that Adobe Reader was trying to open it.  How do I fix this with the right "tool" for the job?

    What is your operating system?
    What is "game Diversion"?

  • I play solitaire from the ( Game Center) I can be up 50-75 pts but opponent suddenly jumps up to 200pts.  How is that done. Opponent wins and doesn't use( undos). I want to play along but is so frustrating when they are so ahead of me HIV read everything.

    I play solitaire fr the (game center on I pad.   I can be up 75 points but suddenly opponent jumps 50-100 points ahead of me.   I tap the cards and know the original solitaire game. But ca cot understand how the win so quickly.  I hv tried reading material abt this but find no answer.  Anita

    Read the reviews for the app and see if others have the same issue. If they do, then you know it's not just you and could be something with the app or something.

  • I play games on facebook but the games while i type keeps getting smaller where now i have to squint to read or make the words bigger but makes it harder to click on stuff cause the words over lap the buttons.

    i used to have to scroll up n down cause the games were full screen now it only fills a part of it, theres more white than game. i go to internet explorer but it has too much lag so i use firefox. i had np at beginning but its slowly getting worse and it isnt a facebook prob. ive asked others if theyre having those probs and theyre not. if its something i can fix through firefox plz let me know how, but if it isnt me then i thought you should know of a bug.

    Oh no... NOT THE 99-PAGER!!! Anything but THAT!!!

  • Is there any way to read the Value mapping input values dynamically?

    Hi all..
    I have a scenario where i have used value mapping. now the issue is when the input is not having any corresponding output value in value mapping then i should get null as output. can anyone suggest how can this be achieved?..
    Regards
    Anu.

    Hi,
    Do you know if the value in not maintained/found in the value mapping then it returns the same value as a result at runtime.
    So, simply if and else will help you to get your desired result..
    SourceField ---> ValueMapping------>|
                                        |----->equalS---IF---->Then -----> Map constant (null) ----> Target
    SourceField------------------------>|
    Else ---->map (SourceField ---> ValueMapping) --->Target.
    Regards,
    Sarvesh

  • Need help on mobile gaming development basic  {working the game main menu}

    package Assignment1;
    import java.io.IOException;
    import java.util.Random;
    import javax.microedition.lcdui.Canvas;
    import javax.microedition.lcdui.Display;
    import javax.microedition.lcdui.Graphics;
    import javax.microedition.lcdui.Image;
    import javax.microedition.lcdui.game.GameCanvas;
    import javax.microedition.lcdui.game.Sprite;
    public class a1Canvas extends GameCanvas implements Runnable{
        private Display display;
        private Sprite ufoSprite;
        private Image backgroundImage;
        private long frameDelay;
        private int ufoX;
        private int ufoY;
        private int ufoXDir;
        private int ufoXSpeed;
        private int ufoYSpeed;
        private Random rand;
        private Sprite[] roidSprite = new Sprite[3];
        private boolean gameOverState;
        //constructor
        public a1Canvas(Display display){
            super(true);
            this.display = display;
            frameDelay = 33;
            gameOverState = false;
        public void start(){
            display.setCurrent(this);
            //start the animation thread
             rand = new Random();     // Initialize the random number generator
             ufoXSpeed = ufoYSpeed = 0; // Initialize the UFO and roids sprites
            try {
                backgroundImage = Image.createImage("/background.jpg");
                ufoSprite = new Sprite(Image.createImage("/ufo.png"));
                //initialise sprite at middle of screen
                ufoSprite.setRefPixelPosition(25,25);
                ufoX = (int)(0.5 * (getWidth()- ufoSprite.getWidth()));
                ufoY = (int)(0.5 * (getHeight()- ufoSprite.getHeight()));
                ufoSprite.setPosition(ufoX, ufoY);
                Image img = Image.createImage("/Roid.png");
                roidSprite[0] = new Sprite(img, 42, 35);   //create 1st frame-animated asteroid sprite
                roidSprite[1] = new Sprite(img, 42, 35);
                roidSprite[2] = new Sprite(img, 42, 35);
            } catch (IOException ex) {
                System.err.println("Failed to load images");
            Thread t = new Thread(this);
            t.start();
        public void run() {
            while (!gameOverState){
                update();
                draw(getGraphics());
                try{
                    Thread.sleep(frameDelay);
                }catch(InterruptedException ie){}
            gotoMainMenu(getGraphics());
        private void draw(Graphics graphics) {
            //clear background to black
            graphics.setColor(0, 0, 0);
            graphics.fillRect(0, 0, getWidth(), getHeight());
            //draw the background
            graphics.drawImage(backgroundImage, getWidth()/2, getHeight()/2, Graphics.HCENTER | Graphics.VCENTER);
            ufoSprite.paint(graphics);
            for(int i=0;i<3;i++){
                roidSprite.paint(graphics);
    flushGraphics(); //flush graphics from offscreen to on screen
    private void update() {
    // Process user input to control the UFO speed
    int keyState = getKeyStates();
    if ( (keyState & LEFT_PRESSED) != 0 )
    ufoXSpeed--;
    else if ( (keyState & RIGHT_PRESSED) != 0 )
    ufoXSpeed++;
    if ( (keyState & UP_PRESSED) != 0 )
    ufoYSpeed--;
    else if ( (keyState & DOWN_PRESSED) != 0 )
    ufoYSpeed++;
    ufoXSpeed = Math.min(Math.max(ufoXSpeed, -8), 8);
    ufoYSpeed = Math.min(Math.max(ufoYSpeed, -8), 8);
    ufoSprite.move(ufoXSpeed, ufoYSpeed); // Move the UFO sprite
    checkBounds(ufoSprite); // Wrap UFO sprite around the screen
    // Update the roid sprites
    for (int i = 0; i < 3; i++) {
    roidSprite[i].move(i + 1, 1 - i); // Move the roid sprites
    checkBounds(roidSprite[i]); // Wrap asteroid sprite around the screen
    // Increment the frames of the roid sprites; 1st and 3rd asteroids spin in opposite direction as 2nd
    if (i == 1)
              roidSprite[i].prevFrame();
    else
              roidSprite[i].nextFrame();
    // Check for a collision between the UFO and roids
    if ( ufoSprite.collidesWith(roidSprite[i], true) ) {
    System.out.println("Game Over !");
    gameOverState = true;
    }//if
    }//for
    public void stop(){
    gameOverState = true;
    private void checkBounds(Sprite sprite) {
    // Wrap the sprite around the screen if necessary
    if (sprite.getX() < -sprite.getWidth())
         sprite.setPosition(getWidth(), sprite.getY());
    else if (sprite.getX() > getWidth())
         sprite.setPosition(-sprite.getWidth(), sprite.getY());
    if (sprite.getY() < -sprite.getHeight())
         sprite.setPosition(sprite.getX(), getHeight());
    else if (sprite.getY() > getHeight())
         sprite.setPosition(sprite.getX(), -sprite.getHeight());
    private void gotoMainMenu(Graphics graphics) {
    graphics.setColor(0, 0, 0);
    graphics.fillRect(0, 0, getWidth(), getHeight());
    graphics.setColor(255, 0, 0);
    graphics.drawRect(0, 0, getWidth()-1, getHeight()-1);
    graphics.setColor(255, 255, 255);
    graphics.drawString("GAME NAME", getWidth()/2 -50, 30, Graphics.LEFT | Graphics.TOP);
    graphics.setColor(255, 0, 0);
    graphics.drawString("Main Menu", getWidth()/2 -50, 50, Graphics.LEFT | Graphics.TOP);
    graphics.setColor(0, 255, 0);
    graphics.drawString("Start Game", getWidth()/2 , 80, Graphics.LEFT | Graphics.TOP);
    graphics.drawString("Instructions", getWidth()/2 , 110, Graphics.LEFT | Graphics.TOP);
    flushGraphics();
    int keyState = getKeyStates();
    if ( (keyState & FIRE_PRESSED) != 0 ){
    System.out.println("game start");
    gameOverState = false;
    The problem i am facing is :
    the FIRE button is not functioning, i put a system.out.println and it didnt print.
    i am unsure whether i put the key input listener at the correct function
    this button is supposed to start the game again.
    What i want to do :
    i want to display the main menu when i launched the game
    when game is over, it will display back to the main menu again
    when i press the fire button it will play the game again.
    i hope someone can help me on this :)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

    kdoom wrote:
    The problem i am facing is :
    the FIRE button is not functioning, i put a system.out.println and it didnt print.
    i am unsure whether i put the key input listener at the correct function
    this button is supposed to start the game again.
    What i want to do :
    i want to display the main menu when i launched the game
    when game is over, it will display back to the main menu again
    when i press the fire button it will play the game again.
    i hope someone can help me on this :)You didn't have to create a whole new post just for the formatted code, silly. You could have just replied in the old thread. Anyway:
    Step through the program and think about what each line is doing. Most importantly:
        public void run() {
            while (!gameOverState){
                update();
                draw(getGraphics());
                try{
                    Thread.sleep(frameDelay);
                }catch(InterruptedException ie){}
            gotoMainMenu(getGraphics());
        }This says that while the game is being played, update( ), then draw( ). When the game is over, call gotoMainMenu( ).
       private void gotoMainMenu(Graphics graphics) {
            //do a bunch of graphics stuff
            int keyState = getKeyStates();
            if ( (keyState & FIRE_PRESSED) != 0 ){
                System.out.println("game start");
                gameOverState = false;
        }This says to do a bunch of graphics stuff, and then to check the key states. If fire is being pressed, print something out and set gameOverState to false. This check only happens once. When the state is being checked, most likely the user will not be pressing any keys, so the code is done.
    Also, simply setting the gameOverState variable to false outside of the loop you use it in won't do anything. For example:
    boolean doLoop = true;
    int count = 0;
    while(doLoop){
       count++;
       if(count > 10){
          doLoop = false;
    doLoop = true;Would you expect that second doLoop = true to start the while loop over?

  • Problem using the applet for the game design!

    import java.awt.*;
    import java.applet.*;
    import java.awt.event.*;
    import javax.swing.*;
    import java.util.Random;
    /* <applet code="Gameshtap2.class" width ="500" height="600">
    </applet>
    public class Gameshtap2 extends Applet implements ActionListener,KeyListener,MouseListener,MouseMotionListener,Runnable
    Thread t;
    Button b1,b2;
    int y=0;
    int Xpos=480;
    char keyChar='A';
    public void init()
    t=new Thread();
    b1=new Button("Start");
    b2=new Button("Stop");
    add(b1);
    add(b2);
    b1.addActionListener(this);
    b2.addActionListener(this);
    addKeyListener(this);
    this.requestFocus();
    this.setFocusable(true);
    addMouseListener(this);
    addMouseMotionListener(this);
    public void paint(Graphics g)
    int no;
    g.drawArc(0,y,100,100,30,300);
    g.drawLine(50,y+50,50+(int)(50*Math.cos(3.14159/6)),y+50-(int)(50*Math.sin(3.14159/6)));
    g.drawLine(50,y+50,50+(int)(50*Math.cos(3.14159/6)),y+50+(int)(50*Math.sin(3.14159/6))); 
    for(int i=0;i<10;i++)
       no=(int)(Math.random()*600);
       g.drawOval(Xpos,no,10,10);
       if(Xpos<=480 && Xpos>=0)
         Xpos=Xpos--;
        if(Xpos>480 || Xpos<0)
          Xpos=480;
    public void actionPerformed(ActionEvent e)
    if(e.getSource()==b1)
         if (t == null)
              t=new Thread(this);
              t.start();       
    } else if(e.getSource()==b2)
         if(t!=null)    
                  t = null;
    public synchronized void keyPressed(KeyEvent ep)
    switch(ep.getKeyCode())
         case KeyEvent.VK_DOWN:y+=10;
                              if(y>=490)
                                 y=0;
                              else if(y<=0)
                              y=490;               
                   repaint();     
                            break;    
        case KeyEvent.VK_UP:y-=10;
                              if(y>=490)
                                 y=0;
                              else if(y<=0)
                              y=490;     
                   repaint();
                            break;    
       default:keyChar=ep.getKeyChar();
    public  synchronized void run()
    while(true)
         repaint();
       try
            t.sleep((int)(Math.random()*200));
       catch(InterruptedException e1)
           e1.printStackTrace();
    public void keyReleased(KeyEvent er)
       System.out.println("released");
    public void keyTyped(KeyEvent er)
       System.out.println("Typed");
    public void mouseClicked(MouseEvent me)
      int m=me.getX();
      int p=me.getY();
       showStatus("X coordinate is:"+m+"Y coordinate is:"+p);
    public void mouseMoved(MouseEvent mp)
    public void mouseDragged(MouseEvent mn)
    public void mousePressed(MouseEvent mr)
    public void mouseReleased(MouseEvent mc)
    public void mouseExited(MouseEvent ma)
    public void mouseEntered(MouseEvent ml)
    we are trying to implement the game where the big arc controlled by the keyboard is gobbyling up
    the smaller circles,but we are unable to run this program
    regards,
    Jack

    It would be better if you posted this in one of the GUI forums.
    Those forums are for addressing programming problems related to general java issues. Which is what you have.
    Also +"unable to run this program"+ doesn't explain the problem unless you don't know what appletviewer is.

  • Keeping an int value the same

    Hey,
    I am fairly new to java, and I take it at school. I am working on an AI for a tictactoe board. My problem is that I need to somehow initalize an integer based on certain conditions, and then I need to keep that integer the same throughout the game. The integer is named "me" its in the code posted below.
    Thanks in advance!
    class Kuivila extends Player
        public Kuivila(String name)
             super(name);  //call superclass constructor
        public int getMove(int[] board, int whoami)
             int s;
             int whoareyou;
             if (whoami==1)
                  whoareyou=2;
             //if (whoami==2)
             else
                  whoareyou=1;
              final int oCorner = 0;
              final int oEdge = 1;
              final int oCenter = 2;
              int me==99;
       if (whoami==2)
                   return Defence(board,whoami,whoareyou);
    /// otherwise ---          
              if (me!=oCorner && me!=oEdge && me!=oCenter)
              {      if (board[0]==whoareyou || board[2]==whoareyou || board[6]==whoareyou || board[8]==whoareyou)
                        me = oCorner;
                    if (board[1]==whoareyou || board[3]==whoareyou || board[5]==whoareyou || board[7]==whoareyou)
                        me = oEdge;
                    else
                        me = oCenter;
    /// then ---
              if (whoami==1)     
                   return Offence(board,whoami,whoareyou, oCorner, oEdge, oCenter, me);
              return 0;
         ///End Basic Maneuvers//////////////////////////
         ///Defence//////////////////////////////////////
         public int Defence(int[] board, int whoami, int whoareyou)
      /// More Code Here     
         public int Offence(int[] board, int whoami, int whoareyou,int oCorner,int oEdge,int oCenter,int me)
              //int m1=oCorner;
              if (board[6]==OPEN)
                   return 6;
              /// If PLAYER2 Goes Corner ///     
              if (me==oCorner)
         /// More Code Here
         /// If PLAYER2 Goes Edge ///     
              if (me==oEdge && board[4]==OPEN)
         /// More Code Here
              if (me==oEdge)
         /// More Code Here
    }

    What I'm trying to get is:
    I want the code to check the first move of the opponent. THis is done through 'me' . 'me' starts at 99, just as a random number. The first time the class is invoked it will go to
         if (me!=oCorner && me!=oEdge && me!=oCenter)
              {      if (board[0]==whoareyou || board[2]==whoareyou || board[6]==whoareyou || board[8]==whoareyou)
                        me = oCorner;
                    if (board[1]==whoareyou || board[3]==whoareyou || board[5]==whoareyou || board[7]==whoareyou)
                        me = oEdge;
                    else
                        me = oCenter;
              }and change 'me' to either 0,1 or 2. The problem is, when the class is called on again it redefines 'me' as 99. I need a way to keep it at 0,1 or 2 once it has been changed from 99.

  • Sattelite A110-178 cannot run the game The Da Vini Code

    My sattelite A110-178 can't run the game "The Da Vini Code". following error occurs:
    Exeption encountered! Would you like more info (will take several seconds to determine)?
    when I choose "yes", following lines appear:
    (Slayer)Exeption address
    [no game crash info]
    IMAGE HELP STACK:
    TArchive::operator=+A9D22
    MAP FILE STALKWALK:
    All I can do then is press "OK"
    the programm shuts down, and that's the end of it.
    I don't know what this means, is there a problem with my hard-or software?
    If anyone can help me, and translate my computers code-language, I'll be gratefull for that,
    because this is not a cheap game,
    thanks in advance,
    Davina
    Message was edited by: Davina Deleye

    Hi
    Firstly a question: Did you use the original game or maybe a copy?
    I have found some infos that some users get this error because they used not original game CD!
    But if it happens with the original and only with this single game so I presume there could be something wrong especially with the game compatibility.
    Maybe the game doesnt support the graphic driver version or something different.
    I dont know if you will find a exactly solution here in the forum because its especially a forum about common issue and problems with Toshiba units.
    Try to visit the support sites of the game manufacture. Maybe there you will find more details and FAQs about this game.

  • Port Forwarding....The game or application you've ...

    "Conflict
    The game or application you’ve selected conflicts with an application () you’ve already assigned to another device.
    Please remove the other application or select the same device."
    I haven't assigned anything.  I'm trying to open ports for the Xbox Live Service and I get this "Conflict" error!
    Any help please.
    PS I'm just back with BT after a Sky holiday

    The following page should help.
    Port forwarding problems
    You need to disable uPnP if you are going to map ports manually, otherwise you will get a conflict.
    There are some useful help pages here, for BT Broadband customers only, on my personal website.
    BT Broadband customers - help with broadband, WiFi, networking, e-mail and phones.

  • Large Scale Game Maps In WPF

    I attempted to create a map in WinForms, where my window centered on a small portion of a much larger map my character would walk through.
    However, according to research, I wonder if WinForms is the way to go.  I have read suggestions to create as many as 900 Picture Boxes (as tiles) for my map, then creating some sort of zoom effect to have my window only show, say, 20x40 while my character
    explored dungeons, etc.
    Maybe this IS the way to go?..... as stated in those tutorials, it required a percentage of a percentage of memory, which is what I am going for.
    I opened a project in WPF, which appears to have some more flexibility.  There is a Main Window, then a Grid... could I make the whole map in the grid then have my Main Window as my focal point while, say, I code the Grid to shift as I move, or vice
    versa?

    I have extensive experience with wpf but I do line of business applications.
    I think you'll find wpf is significantly slower when manipulating large amounts of graphics.
    On the other hand, you can do whizzy stuff like animations and you can make the controls and stuff look fancy very easily.
    I've never done anything like you're describing but I've played plenty of games a bit like that.
    I'd be inclined to have a small map in a corner with an overview and a relatively small number of objects on screen as tiles. Maybe the central one and either one or two of the bordering layers.
    You can easily scale stuff but I'd consider layers.
    Show a basic map until you're in the tile then overlay more detail on the one you enter.
    You can layer stuff in wpf easily and there's even this thing called an adorner layer which goes on top of everything else.
    You know VS is written in wpf?
    The drag and drop handles on controls in your designer are adorners.
    I'm not so sure about the zooming thing but yes you can do that.
    There's even a zoombox control
    https://wpftoolkit.codeplex.com/wikipage?title=Zoombox
    I wouldn't worry about memory so much.
    Focus on your design.
    Oh
    One thing is perhaps worth mentioning.
    A visual can only have one parent.
    http://social.technet.microsoft.com/wiki/contents/articles/29964.wpf-tips-only-one-parent.aspx
    Which means if you have an image which is used in two places you need to mark it:
    x:Shared="False"
    So it's a new copy each time, or copy it in code.
    Hope that helps.
    Technet articles: Uneventful MVVM
    All my Technet Articles

  • K9N neo - F, Stuttering / harddrive over reading / caching noticeable in games.

    I've been experiencing a really strange issue, my hard drive seems to be over reading / caching , It's mostly noticeable in BF2, and in world of warcraft, it sputters for a split second then the game goes back into smooth game play. It happens every 20 seconds or so really irritating lol. My settings for the games are medium detail levels nothing to taxing on the ram, the system I had previously 3000+ w/ DDR 400 1 gig and a 9800 pro I had no issues and it actually loaded maps faster under the same graphic settings. One harddrive is a sata samsung 160 gig, the other is an IDE 120 gig western digital. Both 7200 rpm 8 megs cache. The previous system I had ran these games fine with no issue under the same graphic settings, so it's really odd.
    Some of the things I've tired:
    I tried using a totally different hard drive with the OS / games and it does the same thing
    I've ran a diag tool on both harddrives and they check outfine
    I've checked out the ram specs and tried setting them manually, 5 5 5 12, and using auto (thinking it may be something with the ram possibly.)
    I've disabled SMART in bios which didn't do anything.
    I've messed around with disabling spredspectrum which didn't do anything
    I tired using on board sound and ditching the audigy thinking mabey the sound was causing lag issues, cause when it sputtered the sound would lag for a split second, unfornately didn't do anything.
    Any suggestions would be greatly appericated, it's a really strange issue that I haven't encountered before, tried everything I could think of. Thanks.

    Not sure about it. Have you tried to benchmarks for the HDD? Did you do any bios flashing recently? Have you tried reset the bios? If increased the PCI-X bus to 104MhZ is there any different?    
    Quote from: slicksickwilly on 22-August-06, 11:47:07
    I also play WoW.. I get the stuttering too. I cant completely get rid of it but i got it down to a minimum. If i read your post right you have 1gig of ram.. Same here. WoW runs best on 2 gigs. When you hearth into IF or ride the gryphon there are so many new items/textures loading that your pagefile is working overtime hence the hard drive light is in contant flicker. The best solution as i said is to get 2 gigs of ram.. Another solution that i used that seemed to help is to set my pagefile to a diff hard drive. I run 2 Seagates 8meg cache 7200 rpm and disabled pagefile on drive c and put it on drive f. By putting it on another drive it will run faster with less hickups as you utilize both drives for better performance instead of one. If you want to try it let me know ill tell you how..
    Please create your own rig and post it in details including the PSU and Bios revision so others can help you!! Not sure if your HDD need to update the firmware from the Seagate if you're using the SATAII. Gd luck.

  • Adjusting sound volume from inside the game???

    hi there all,
    how can i adjust the pc volume from the game?? like in options menu....
    TiA

    Use something like this to set the volume for the Clip. Then play it.
    If you need to access it in an option menu, save the value (mute)0..100 (load) and allow the user to select the volume from a cobmo box or list box containing 0, 10, 20 ... , 100.
      public static void setVolume(Clip clip,int volumePercent)
        try
          if (clip.isControlSupported(FloatControl.Type.VOLUME))
            FloatControl volumeControl = (FloatControl) clip.getControl(FloatControl.Type.VOLUME);
            volumeControl.setValue((float) (volumePercent / 100.0));
          else if (clip.isControlSupported(FloatControl.Type.MASTER_GAIN))
            float value = (float)(volumePercent / 100.0);
            FloatControl gainControl = (FloatControl) clip.getControl(FloatControl.Type.MASTER_GAIN);
            float dB = (float)(Math.log(value == 0.0 ? 0.0001 : value)/Math.log(10.0)*20.0);
            gainControl.setValue(dB);
        catch (Exception exception)
          println("Problem in Media.setVolume");
          exception.printStackTrace();
      }

Maybe you are looking for