Using layoutmanagers in a game.  Good idea?

Is it a good idea to use a layoutmanager to provide the layout for a map and use another layer where I draw the movements? Any suggestions what I should or should not do, techniques? This is for a 2d game schoolproject, but I have no experience in this area.

Forget about using swing/awt components. Check out some of the posts on javagaming.org.
The normal way to draw a map is making a grid of tiles that cover your map, with each grid or tile having a image.
Search dubble buffering, smooth scrolling, and tilesets.
Image[] images;  // image for each ground type;
int[][] tiles;   // contains the type of ground for each tile.
//  tiles = new int[worldWidth / tileSize][worldHeight / tileSize];
int minTileX = cameraX; // where we in the level.
int minTileY = cameraY; // camera is in tile coordinates.  ( keeping it simple :) )
for (int x = 0, tileX = 0; tileX < tilesAcross; x += tileSize, tileX++)
                for (int y = 0, tileY = 0; tileY < tilesDown; y += tileSize, tileY++)
                    Image image = images[tiles[minTileX + tileX][minTileY + tileY]];
                    g.drawImage(image, x, y, tileSize, tileSize, null);

Similar Messages

  • Is using ACFS for CFS is good idea?

    Hello Experts.
    Planning to build a RAC on following environment.
    Oracle Database Ver.: 11.2.0.3
    OS: Linux RHEL 6.1 - 64 Bit
    Servers: HP
    ASM and ACFS for storage.
    Here need a advice: Is using ACFS for CFS is good idea or anything else better than this?
    Thank you in advance:
    Ajazjn76.

    Hi,
    Great to think of Oracle11g 11.2.0.3 RAC(Don't forget to install Patch 13440962) but do consider below
    1.) Implementing ACFS is supported for Shared Oracle Home.
    2.) ACFS is a good option for storing Backups(Ex. RMAN,Exports etc)
    3.) Can be used as a NFS Shared drive for other NFS clients.
    You will also see a resource "ora.registry.acfs" just after you start creating/using ACFS.
    ACFS is cool to use using asmcmd commands or alter diskgroup sql statements.
    ACFS is as better like other Vendor Cluster File system.
    Thanks
    Deepak

  • Using A Palm Pilot Today Good Idea or are they becoming obsolete?

    I started using a Palm Pilot in 1997. I used one constantly until 2006 when I broke the Palm PDA I had at the time and did not replace it.
    I still use the desk top software (Palm One Ver 4.1.4).
    I would like to go back to using a Palm Pilot. I will probably break a few again so I would prefer an inexpensive model and I am only interested in the To Do List, Addresses and Calender features. I use Vista now and will move on to Windows 7 shortly.
    What model do you suggest I purchase and where is the best place to buy them.?
    and
    How long do you think we will be able to keep using these devices or will they eventually get overwhelmed by Black Berries, iPhones and Pre's?
    Thanks for your help
    Brian Smith
    Nanaimo
    Vancouver Island 
    British Columbia
    Post relates to: None

    There is a version of Palm Desktop for Vista, but I'm not familiar with the details or whether it is compatible with your device. Check out this article:
    Palm Support : Palm Desktop 6.2 and HotSync Manager (Windows)
    http://kb.palm.com/wps/portal/kb/common/article/32​859_en.html

  • HT1222 I like the new iOS 7 for iphone... But i think it's not a good idea to allow switch the iphone on flight mode when it is locked.. What happens if your iphone is stolen or lost? You couldn't be able to locate it using find my iphone... Can i remove

    I like the new iOS 7 for iphone... But i think it's not a good idea to allow switch the iphone on flight mode when it is locked.. What happens if your iphone is stolen or lost? You couldn't be able to locate it using find my iphone... Can i remove this from the bottom menu?

    And have your phone set to require a passcode before it can be accessed.

  • I want to use a fantom diamond as an external hard drive for my mac, is this a good idea?

    Using a Macbook pro, with Snow Leopard (I think), and my memory is full so I want to store my stuff on an external hard drive. I found a 2T Fantom Diamond EHD, but I'm now learning that I have to convert to NTFS-3g. I'm not computer savy so I want to know if this is a good idea, or should I look for something different. Also, can I set up the EHD as the default path for itunes?

    This is not the forum for MacBook Pro owners.
    You just need to reformat the drive in Disk Utility and erase the drive and have  Mac HFS.
    If you did need to use NTFS then you would not want -3G but Paragon NTFS for OS X x. 10.0
    Or buy something that isn't pre-formatted to Windows NT file system.
    First though make sure you have backups of your system. TimeMachine being used now?
    http://macperformanceguide.com/Mac-TimeMachine-drive.html
    http://www.apple.com/support/timemachine/
    Maybe cleanout some files you don't need.
    Install a larger notebook hard drive even.
    http://www.macsales.com/firewire has a lot of choice in Mac compatible drives and enclosures so you don't need to worry about Fantom not working at some point.
    https://discussions.apple.com/community/notebooks/macbook_pro
    https://discussions.apple.com/community/mac_os/mac_os_x_v10.6_snow_leopard

  • Use of "Rel" Attribute in Links -- Good Idea?

    Hi --
    I was reading about various SEO methods recently and came
    across several
    pages which advocate the use of the "Rel" attribute on a
    hyperlink. The idea
    being that the "Rel" may influence how a search engine views
    a link and
    possibly help with ranking. For example: <a
    href="help.html" rel="Help">
    need help?</a>.
    Sounds like a good idea, but the more I read the confused I
    became. A Danny
    Sullivan article about use of the attribute "nofollow" used
    by major search
    engines made sense. It was the other article I read which
    used all
    different types of attributes that confused me such as
    rel="met colleague",
    rel="alternate". Is there someplace I can go to find a list
    of widely
    accepted attributes?
    Anyone have any experience with this?
    John

    Thanks, Joe. Yep, the source is the best place to start.
    Should have
    thought of that myself.
    I suspect you're assessment is correct...won't hurt, might
    help.
    Thanks again.
    John
    "Joe Makowiec" <[email protected]> wrote in
    message
    news:[email protected]..
    > On 02 Apr 2008 in macromedia.dreamweaver, Tarvardian
    wrote:
    >
    >> Is there someplace I can go to find a list of widely
    >> accepted attributes?
    >
    > How 'bout the source?
    >
    >
    http://www.w3.org/TR/html401/struct/links.html#adef-rel
    >
    > Note that it has a set of defined values:
    >
    >
    http://www.w3.org/TR/html401/types.html#type-links
    >
    > In looking over the documentation, and given my
    understanding of the way
    > things work in the here and now, I suspect that it's one
    of those "Won't
    > hurt, might help" kind of things.
    >
    > --
    > Joe Makowiec
    >
    http://makowiec.net/
    > Email:
    http://makowiec.net/contact.php

  • Considering using 20" Imac with larger external monitor - good idea?

    I've just returned my 24" Imac for a refund due to the uneven brightness issue. I want a set up for my illustration work, but can't justify the price of a mac pro + monitor. Therefore I'm considering a 20" Imac 2.4 GHZ, and connecting an external 23/24" monitor that has better consistent brightness than the Imac screens, e.g. the Dell 2407WFP-HC or an 23" Apple cinema display. The idea is that, any problems with gradients on the Imac screen won't bother me as I'll be using it merely as a web browser.
    Is this a good idea? Will there be any problems running a larger monitor of the Imac - any compatibility issues etc. Can anyone recommend a good screen around the £500 mark or under? I basically want a screen that isn't obviously brighter on one side than the other, as the Imac appears to be.

    I know uneven lighting is a complaint among 24" iMac users - and I've seen two myself. But not all of them have the problem. You might want to consider trying another before giving up on them. Having said that - take a look at Samsung displays. I don't know what they run in the UK but I'm very impressed with the ones we have at work.

  • Is using a taskbar icon in .exe combined with windows service a good idea as part of an alarm system?

    My client wants an alert system and his focus is on the taskbar.  He wants the icon to change, (and ideally even blink) and also to have some beeping when a new work request comes in.  It needs to run constantly, and grab the attention of an operator
    who may not be paying much attention to the screen.
    I’m excited to develop this, but after years of web development, I feel paralyzed.  I must be making this harder than it needs to be, but here’s my plan…  I'll start with a windows form, which will run minimized, and have an icon that looks like
    a hammer in the taskbar.  A timer would continually check for a new service requests.  When it sees one it would change the toolbar icon to a red x and sent a few dozen beeps out to the operator.  I think I need a windows service running that
    checks periodically to see if my windows exe is running.  If not, it should start it up.  Perhaps this could be a scheduled task, rather than a service.  
    Some of my questions are;
    How do I change the taskbar icon on the fly?
    Is this a good idea, or is there an easier way?
    Snippets of code or related articles are most welcome!
    Thanks!

    So I created a windows form and added a timer to check for unacknowledged requests.  If it finds any, it changes the icon on for the taskbar, and makes a beep.  Simple, but it works.  However, I'm having a beep of a time trying to figure out
    where to put the ico files so they are where they need when I publish it.  Others seem to suggest adding them using the properties of the application, under application / resources / Icon and manigest blah blah blah.  But I can only seem to add one
    there.  I need the three different ones.  I'm confused!  Any suggestions?
            private bool iconBig = true;
            private Icon redcross = new Icon("..\\NewRequest.ico");
            private Icon redcross2 = new Icon("..\\NewRequest2.ico");
            private Icon hammer = new Icon("..\\Hammer.ico");
     private void timer1_Tick(object sender, EventArgs e)
                List<WorkRequest> myWorkRequests = WorkRequestData.WorkRequest_unAcknowledged();
                if (myWorkRequests.Count > 0)
                    for (int i = 0; i < 5; i++)
                        SystemSounds.Beep.Play();
                        if (iconBig == true)
                            iconBig = false;
                            this.Icon = redcross;
                            this.Refresh();
                        else
                            iconBig = true;
                            this.Icon = redcross2;
                            this.Refresh();
                else
                    this.Icon = hammer;
                    this.Refresh();

  • Is it a good idea to use ABAP objects for reports?

    Hello Experts,
    Is it a good idea to use ABAP objects instead of the traditional ABAP for coding reports?

    Hi,
    Go throught Document it will Give you eight Reasons why OOABAP Should be used.
    https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/37c5db90-0201-0010-3a9b-d0a5288f3c15
    Must go through
    Regards,
    Gurpreet

  • Building pages to use dbms_scheduler like in OEM, is it a good idea?

    In OEM, there's already full featured web pages to administrate scheduler objects, sometimes, OEM is very heavy in load, during my first testing, it even make my db server hang, run out of swap. But I try to build a simple page to submit jobs using dbms_scheduler, it works file and quite light weighted.
    So is it a good idea to build scheduler administration pages in Apex? will it be like reinvent a wheel?

    This is what I am trying to do but have run into the 'insufficient privileges' problem. I am actually trying to give our users the ability to schedule some of the jobs associated with their application. I've been able to submit a job through Toad under the schema used by the application. But I'm not sure whether I need to grant the appropriate privileges to run the scheduler package to the flows schema as well. I have also been able to schedule the job through the SQL Workshop in the APEX application builder, but I can't do it through the application. Any suggestions?
    Sue
    Edited by: suewia on Jan 6, 2010 7:14 AM

  • Hi Guys! I have an Imac with Mac OS X version 10.5.8 and bought a wireless keyboard. Unfortunately I can´t use the volume buttons on the keyboard. I have checked almost everything, does anyone have any good idea?

    Hi Guys! I have an Imac with Mac OS X version 10.5.8 and bought a wireless keyboard. Unfortunately I can´t use the volume buttons on the keyboard. I have checked almost everything, does anyone have any good idea?

    Hello, try kguy's solution here...
    https://discussions.apple.com/thread/2332457?start=0&tstart=0
    First, Go to System Preferences, keyboard, and click on the Keyboard tab
    Make sure that the checkbox by "Use all F1, F2, etc, keys as standard function keys" is NOT checked.
    Next, click on the Show All button, and select Bluetooth. You should see your Apple Wireless Keyboard listed on the left side of the screen.
    Click once to select it, and then click the gear icon at the bottom of the box, and choose Disconnect.
    Power off the keyboard by holding down the power button on the keyboard for a few seconds until it show "keyboard Off on your imac screen, then turn it back on again.
    The device should appear once again in your bluetooth list.
    Try out the volume control buttons now, and see if that cleared things up

  • Is it good idea to use style sheet for the bgcolor of a table that is just

    is it good idea to use style sheet for the bgcolor of a table that is just being used for formatting

    Hi,
    CSS is a way to do so. I don't think that there is any problem with using CSS on any kind of table
    Frank

  • HT201441 this is bullshite again, i just updated the phone my partner gave me and now is locked and he doesn't remember ever using icloud and all my icloud accounts are not working, *** what's this now Apple ? good idea to secure us but seriously many wil

    this is bullshite again, i just updated the phone my partner gave me and now is locked and he doesn't remember ever using icloud and all my icloud accounts are not working, *** what's this now Apple ? good idea to secure us but seriously many will have t

    If your device is disabled...
    Connect to your computer in recovery mode per the instructions in http://support.apple.com/kb/HT1212
    You may need to do this more than once.

  • When you double click the circle buttom, and the little bar pops up from what you have been using... is it using data while being in there? is it a good idea to minimize evertthing out of there often so its not using more data ? or does it not matter?

    when you double click the circle buttom, and the little bar pops up from what you have been using... is it using data while being in there? is it a good idea to minimize evertthing out of there often so its not using more data ? or does it not matter?
    thanks!

    Not sure if it uses data, but that allows you to multitask.  To save battery life you should close out of all the apps.

  • Use of flash buttons - not a good idea?

    Hi guys
    I've been advised in an earlier post against the use of flash
    buttons. As someone relatively new to Adobe products I'm interested
    to know how flash buttons don't seem to be supported but flash
    moves or indeed flash websites are in abundance and seemingly have
    no problems, or personally speaking I've not had problems viewing
    such websites in the past. I'm not contending the opinion I was
    given but as someone on a learning curve I think it would be
    invaluable to learn how one works and not the other.
    Also, what would be a suitable alternative to flash buttons,
    I'm considering using jpg images which change on mouse-over using
    javascript.
    Mike

    sigh - i was trying to be nonjudgemental. one may have a site
    where seo is a nonissue and they know that their audience has the
    latest flash-equipped browser (like mine, for example. while i
    choose to not use flash for different reasons, i don't rely on
    search engines as a meaningful source of business and/or leads.)
    quote:
    Originally posted by:
    Newsgroup User
    I'll say it. It's the mark of the amateur, and DEFINITELY not
    a good idea.
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    ==================
    "joeq" <[email protected]> wrote in message
    news:gl8igt$am9$[email protected]..
    > not saying they're a good idea or a bad one - but my
    understanding is that
    > flash buttons are a) potentially not accessible to all
    your users, b) not
    > indexable by search engines, and c) more labor intensive
    to update. all or
    > none
    > of these things might matter to you based on the target
    audience of your
    > site.
    >

Maybe you are looking for

  • How can I get the CC desktop app to work properly?

    Hi, I purchased a subscription and now I'm trying to install Adobe CC applications on my computer. Unfortunately NOTHING is working the way it should- I have tried calling support but they haven't called me back anymore. Today I finally managed to ge

  • BB10 - Link does not sync new Contact note entries and crashes

    Hi - can anyone help. Link 1.1.1.26 syncs new entries on both my Windows 7 PC and Q10 both ways, including any text in the Notes field. But adding or changing a Note to an existing entry does not sync. In Link Settings I have Contacts (and Calender)

  • How to use a webservice in  JSPDyn page

    hai,    I have created one webservices but i donot how to use that webservices in JSPDyn page.   can anyone give solution for this problem Rds Shanthakumar

  • Historical data / structural authorizations compatability ?

    Hi, I'm working on a new BI7 project which is extracting  structural authorisations from HR. What I'm not sure about is what will happen in the following scenario: During 2007, manager 1 in org unit 123 is responsible for employee 1. In 2008, employe

  • TEM: when attendee is in Waiting list status, workflow should triger notifi

    Dear Professionals, In TEM, we have a scenario where, if an employee/attendee has booked for an event and in waiting list status, when his waiting list status changes to normal booking (bacause of the cancellations in normal booked) a notification ma