Use mouse for first person game

I have programed one first person game using Java 3D and am working on a new idea and I hope to be able to run it through a web browser.
The problem I am having is using the mouse in the game were it does not leave the applet window when moved and I can keep track of how much movement it makes so I can make it function like a normal FPS (the mouse is moved in a certain direction and the character turns that direction the amount the mouse was moved). If someone could point me toward a class or of anyway this can be done that would be great. Thanks.

Java does not have built-in support for direct polling of the mouse.
One hack that I've used to get around that is in the Robot class.
If the mouse exits the applet window from the left side, I can use Robot.moveMouse(int x, int y) to move the cursor back to the right side. This let's me force the mouse to be within the applet window at all times.
Its pretty hacky, and I believe you're going to have to get the user to sign some special permissions to use this in an applet, but there's not much alternative.
good luck
-Cuppo

Similar Messages

  • Using java2D for first person shooter type of game

    i read that java2d uses opengl under the hood.. if so that will make it fast as java3D. can java2d be used to create first person shooter game with good performace compare to C/C++ ??
    discuss.

    Q: Could it be used to make Wolfenstein?
    A: Yes.
    Q: Could it keep step with the latest 3D game / engine.
    A: No.
    I heard there are a lot of crazy assembly level optimizations that gaming companies do to get the performance.

  • Performance issue in browsing SSAS cube using Excel for first time after cube refresh

    Hello Group Members,
    This is a continuation of my earlier blog question -
    https://social.msdn.microsoft.com/Forums/en-US/a1e424a2-f102-4165-a597-f464cf03ebb5/cache-and-performance-issue-in-browsing-ssas-cube-using-excel-for-first-time?forum=sqlanalysisservices
    As that thread is marked as answer, but my issue is not resolved, I am creating a new thread.
    I am facing a cache and performance issue for the first time when I try to open a SSAS cube connection using Excel (using Data tab  -> From Other Sources --> From Analysis Services) after daily cube refresh. In end users system (8 GB RAM but around
    4GB available RAM), for the first time, it takes 10 minutes to open the cube. From next run onwards, its open up quickly within 10 secs.
    We have daily ETL process running in high end servers. The configuration of dedicated SSAS cube server is 8 core, 64GB RAM. In total we have 4 cube DB - out of which for 3 is full cube refresh and 1 is incremental refresh. We have seen after daily cube
    refresh, it takes 10 odd minutes to open the cube in end users system. From next time onwards, it opens up really fast with 10 secs. After cube refresh, in server systems (32 GB RAM, around 4GB available RAM), it takes 2 odd minutes to open the cube.
    Is there, any way we could reduce the time taken for first attempt ?
    As mentioned in my previous thread, we have already implemented a cube wraming cache. But, there is no improvement.
    Currently, the cumulative size of the all 4 cube DB are more than 9 GB in Production and each cube DB having 4 individual cubes in average with highest cube DB size is 3.5 GB. Now, the question is how excel works with SSAS cube after
    daily cube refresh?
    Is it Excel creates a cache of the schema and data after each time cube is refreshed and in doing so it need to download the cube schema in Excel's memory? Now to download the the schema and data of each cube database from server to client, it will take
    a significant time based on the bandwidth of the network and connection.
    Is it anyway dependent to client system RAM ? Today the bigest cube DB size is 3.5 GB, tomorrow it will be 5-6 GB. Now, though client system RAM is 8 GB, the available or free RAM would be around 4 GB. So, what will happen then ?
    Best Regards, Arka Mitra.

    Could you run the following two DMV queries filling in the name of the cube you're connecting to. Then please post back the row count returned from each of them (by copying them into Excel and counting the rows).
    I want to see if this is an issue I've run across before with thousands of dimension attributes and MDSCHEMA_CUBES performance.
    select [HIERARCHY_UNIQUE_NAME]
    from $system.mdschema_hierarchies
    where CUBE_NAME = 'YourCubeName'
    select [LEVEL_UNIQUE_NAME]
    from $system.mdschema_levels
    where CUBE_NAME = 'YourCubeName'
    Also, what version of Analysis Services is it? If you connect Object Explorer in Management Studio to SSAS, what's the exact version number it says on the top server node?
    http://artisconsulting.com/Blogs/GregGalloway

  • HT1349 When i click the buy it's asking me for a security question cause of the first time of using device for purchasing a game,but im already using this device before

    It's really not working..i always
    Buying an iTunes card and redeeming in one device but asking me a
    Security question cause of first time using device
    For purchasing oh my i already using this device

    Joiz wrote:
    {snip}. . . I don't remember..i know my email add and my password but I dont know the answer. . .
    There's not much anyone here can do for that particular issue.
    Your best bet is to seek assistance from iTunes Support.  If there is an alternate way to accsess your account, it will only be through them.
    http://www.apple.com/support/itunes/

  • Using Java for scripting in games - which technology to use?

    Hi, I'm currently in the process of implementing a java scripting implementation for a 3D game engine. Any suggestions on which java technology to use? It will handle high level game specific logic and a gui. So there will be a native implementation of awt created as well. I'm starting off with win32 and will port to mac and linux later.
    I'm thinking J2ME-CDC, but then theres CDLC, the personal edition, and so on. CDC and CDLC are nice since the jvm code is included but the CDC one needs to be ported to win32 (anyone already do this?)

    J2ME is designed for small consumer devices such as mobile phones, pda, pagers, set-top boxes and so on.
    You'r designing something for windows, mac and linux so I'd suggest standard edition rather than micro edition.
    I'm confused as to what you want to do though.
    Also, "porting" a java program shouldn't really be an issue (unless you've used lots of JNI or Runtime stuff).
    Basically though I don't really understand what you want to do, I did have some idea, but then you started talking about Micro Edition.

  • Cache and performance issue in browsing SSAS cube using Excel for first time

    Hello Group Members,
    I am facing a cache and performance issue for the first time, when I try to open a SSAS cube connection using Excel (using Data tab  -> From Other Sources --> From Analysis Services) after daily cube refresh. In end users
    system (8 GB RAM), for the first time, it takes 10 minutes to open the cube. From next run onwards, its open up quickly within 10 secs.
    We have daily ETL process running in high end servers. The configuration of dedicated SSAS cube server is 8 core, 64GB RAM. In total we have 4 cubes - out of which for 3 is full cube refresh and 1 is incremental refresh. We have seen after
    daily cube refresh, it takes 10 odd minutes to open the cube in end users system. From next time onwards, it opens up really fast with 10 secs. After cube refresh, in server systems (16 GB RAM), it takes 2 odd minutes to open the cube.
    Is there, any way we could reduce the time taken for first attempt ?
    Best Regards, Arka Mitra.

    Thanks Richard and Charlie,
    We have implemented the solution/suggestions in our DEV environment and we have seen a definite improvement. We are waiting this to be deployed in UAT environment to note down the actual performance and time improvement while browsing the cube for the
    first time after daily cube refresh.
    Guys,
    This is what we have done:
    We have 4 cube databases and each cube db has 1-8 cubes.
    1. We are doing daily cube refresh using SQL jobs as follows:
    <Batch xmlns="http://schemas.microsoft.com/analysisservices/2003/engine">
    <Parallel>
    <Process xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ddl2="http://schemas.microsoft.com/analysisservices/2003/engine/2" xmlns:ddl2_2="http://schemas.microsoft.com/analysisservices/2003/engine/2/2" xmlns:ddl100_100="http://schemas.microsoft.com/analysisservices/2008/engine/100/100" xmlns:ddl200="http://schemas.microsoft.com/analysisservices/2010/engine/200" xmlns:ddl200_200="http://schemas.microsoft.com/analysisservices/2010/engine/200/200">
    <Object>
    <DatabaseID>FINANCE CUBES</DatabaseID>
    </Object>
    <Type>ProcessFull</Type>
    <WriteBackTableCreation>UseExisting</WriteBackTableCreation>
    </Process>
    </Parallel>
    </Batch>
    2. Next we are creating a separate SQL job (Cache Warming - Profitability Analysis) for cube cache warming for each single cube in each cube db like:
    CREATE CACHE FOR [Profit Analysis] AS
    {[Measures].members}
    *[TIME].[FINANCIAL QUARTER].[FINANCIAL QUARTER]
    3. Finally after each cube refresh step, we are creating a new step of type T-SQL where we are calling these individual steps:
    EXEC dbo.sp_start_job N'Cache Warming - Profit Analysis';
    GO
    I will update the post after I receive the actual im[provement from UAT/ Production environment.
    Best Regards, Arka Mitra.

  • Best mouse for a person with trembling hands

    My Grandfather recently acquired a new Mac (an iBook) on which I am typing this message.
    I didn't want to let him use the integrated track pad because I found it very unpractical, so I ordered an Apple (wired) mouse for him. Unfortunately his hand is often trembling, and he has very little space to move the mouse, so we need to lift the mouse to move it without affecting the pointer's position an be able to move the pointer from the top-left corner to the bottom-right corner of the screen.
    All this causes him great difficulty (pointing precisely and lifting the mouse) so I wondered if a mouse with a track ball would be more suitable.
    What do you think ?

    Are you thinking of the VERTICAL Mouse? I read about those, too, and thought one would be ergonomically great . . . So bought one.
    I lasted about 3 days and gave up. In theory, they're great. But I don't think they're good unless you have large hands. They sure don't seem to be made for women. I have small hands and where the mouse hits as it rests against my thumb/fleshy area of my hand isn't comfortable and in fact, after a while hurts. I think the mouse is just too big for me. You need a wide hand.
    And your arm has to rest on your desk at exactly the right angle or the thing is annoying to work with. I also don't know that it would be so hot for someone with trembling hands, because your hand is in such a specific position, your fingers in fact, could tremble.
    Also, because your arm rests on the desk and your hand around the mouse, every time you move or adjust your position, you have to pick up the mouse and reset yourself. And it's clunkier to hold than other mice and sliding it around is clunkier.
    I like the idea of the vertical mouse so much and I might use it from time to time as a change of pace, but I can't recommend it unless you know for a fact it will fit your hand comfortably. I bought mine online. Couldn't find anywhere to audition it live.

  • I can use iMessage with all iPhone uses except for ONE person.  That person can use iMessage with all other users, but not with ME.  What's the problem???

    I can use iMessage with all other iPhone users that I communicate with, except for ONE person.  When I send to that person, it always goes through as a text message.  This person can use iMessage with pther people, but when they send me a message, it always goes as a text.  Why can we both communicate with other people using iMessage, but not with one another?

    Hi Russell,
    1) If you have OD set up and "editor" has UID 1111, then when they log in to any machine that's bound to OD as editor, they will get UID 1111. Therefore, there won't be any of these permission errors. This is typically the recommended approach.
    2) I assume you mean "You'd prefer to not using open directory?" Whatever the case, OD isn't mandatory with Xsan -- it's just that with multiple user accounts, managing them centrally tends to be easier. For 3 or 4 accounts and 3 or 4 machines maybe it's no big deal. If you go larger, it could get a lot more complicated. That said, if you set it up such that each machine has the exact same set of users (as you said, Mary = UID 502, Fred = UID 503, William = UID 504), then you can do what you want. Mary can log in from multiple machines at the same time, and in general you won't have permissions problems. Of course, if you try and read and write the same file from multiple workstations at the same time, you will get file locking issues, which will prohibit somebody from successfully writing the file.
    File locking issues are different from general permissions errors. The former basically says "hey, someone else is editing this file. Therefore I won't let you edit it right now... you can read it if you want though." Permissions means somebody saves it, and Xsan thinks you saved it and own the file, when you really don't.
    Quad-Core PMG5, 4 GB RAM, 7800 GT, 1 TB disk.   Mac OS X (10.4.4)  

  • HT3702 Im being charged £5.99 everytime i use itunes for an in-game purchase? I want to know why and if it is refundable?

    Im being charged each time i use itunes to purchase through a game i play. Ive read about the 1 usd charge to check and see if there is enough funds in my account and granted ive tried before with no funds in it. This seems a little excessive for a holding charge and it hasnt been refunded either! Any help would be appreciated thanks in advance

    I'm not sure what what you are asking - are the items that you are buying in the game listed as being £5.99, are you being overcharged for them, or you being charged for the items plus an additional £5.99 ?
    The $1 (or approximate local equivalent) holding charge when you change your card details should be refuned within a few days or so, depending upon the bank. If holding charges when you change your card details aren't being refunded then you can contact iTunes Support via this page : http://www.apple.com/support/itunes/contact/ - click on Contact iTunes Store Support on the right-hand side of the page, then Purchases, Billing & Redemption

  • Using RMI for first time (Serializable??)

    Hi, I am trying to do this assignment using Java RMI, and this is my first encouter with RMI. I am getting an error when I am trying to call a function remotely that returns a Vector of data. I get this error:
    Error in lookup: java.rmi.UnmarshalException: error unmarshalling return; nested
    exception is:
    java.io.WriteAbortedException: writing aborted; java.io.NotSerializableException: Registered
    Registered are the objects that are stored in my vector. What does it mean by NotSerializable?

    Here is my "data" registered(i know its named weird...)
    import java.io.Serializable;
    public class Registered implements Serializable {
         private static final long serialVersionUID = 1L;
         public String username;
         public String password;
         public boolean loginStatus;
         public String hostname;
         public int port;
         public Registered(String name, String pass){
              super();
              username=name;
              password=pass;
              loginStatus=false;
              hostname=null;
              port=0;
         public String getName(){
              return username;
         public String getPassword(){
              return password;
         public String getHostname(){
              return hostname;
         public int getPort(){
              return port;
         public boolean getLoginStatus(){
              return loginStatus;
         public void setHostname(String hostname) {
              this.hostname = hostname;
         public void setLoginStatus(boolean loginStatus) {
              this.loginStatus = loginStatus;
         public void setPort(int port) {
              this.port = port;
    }

  • Using FaceTime for first time on mini iPad

    When I verify my apple Id to use face time, it goes back to sign in page for FaceTime. I have checked my apple Id and it says it is verified. If I use another device to try FaceTime myself it says my email address is not available to FaceTime.
    The apple website shows illustrations for set up showing FaceTime on off button. When I go into FaceTime icon on my mini iPad I do not have an on off button.

    Hello,
    Here is an Apple help article on this issue: http://support.apple.com/kb/ht4319
    I hope that helps.
    Regards,
    Jake

  • Mail acts like I'm using it for first time when I've had it for years

    I've used Apple Mail for several years and have my accounts set up, but when I launched it today, I got the "Welcome to Mail" interface and it's asking me to set up my accounts.
    I had this problem before, but forgot how to fix it. I would like to be able to get at all my old emails and all of that.

    Probably little value in reinstalling Mail -- the issue is likely within your User Account, and not the application. Removing the com.apple.mail.plist file and the Mail folder from Home/Library/Preferences and Home/Library/Mail will allow you to have a fresh start. You can test this in advance by the following:
    Create a New User Account, and as that New User try to set up this one or both Gmail accounts. If not familiar with setting up a New User Account, see:
    http://docs.info.apple.com/article.html?path=Mac/10.5/en/8235.html
    This will be a useful test, and it not meant to suggest a permanent switch to the New User Account, but rather a test of the Mail application outside of your normal User Account and its existing setup data.
    Ernie

  • Using isync for first time to update address book

    I just upgraded to Tiger and thought finally I could back up my contacts from my Motorola RAZR V3i.
    However the sync process only works one way i.e. updating the phone from the address book on the Mac, and does not import any contacts from the phone.
    Is this normal I can't find an answer elsewhere
    thx

    Synchronising is a two-way process, once all set-up correctly.
    From experience I've found its best to start off with your data on the Mac first, although by using the Merge on First Sync option, in theory, you should be able to get your contacts from the phone. This doesn't always seem to work.
    I don't know anything about Motorola phones, but if they have an option to Send all Contacts by Bluetooth (as vCards), use that to import your data in Address Book initially.

  • Using mouse for keypress slows program

    I noticed that using a mouse to press/hold the device buttons
    onscreen in the Device Central Emulator significantly slows a movie
    framerate. Using the keyboard keys to press/hold does not slow
    framerates. I can replicate this in a very simple movie with no
    animation, using only code to measure the framerate. Anyone else
    notice this?

    This is not something that is easily done in Java. Try to do it another way.

  • Used itunes for first time. Now when I open Firefox none of my previous tabs show and it opens itunes. I want my old tabs back!

    Firefox automatically opens to itunes. I seem to have lost all my other tabs. When I look at firefox options, it still says it will open to my home page but it does not. It opens to itunes and all my other tabs are missing.

    It is possible that there is a problem with the files sessionstore.js and sessionstore.bak in the Firefox Profile Folder.
    Delete the files sessionstore.js [2] and sessionstore.bak in the Firefox Profile Folder.
    * Help > Troubleshooting Information > Profile Directory: Open Containing Folder
    * http://kb.mozillazine.org/Profile_folder_-_Firefox
    If you see files sessionstore-##.js with a number in the left part of the name like sessionstore-1.js then delete those as well.<br />
    Deleting sessionstore.js will cause App Tabs and Tab Groups and open and closed (undo) tabs to get lost, so you will have to create them again (make a note or bookmark them).
    See also:
    * [1] http://kb.mozillazine.org/Session_Restore
    * [2] http://kb.mozillazine.org/sessionstore.js

Maybe you are looking for

  • New line character (/n ) getting introduced in the response XML in Biztalk 2010

    Hello, In one of our enviornment, we have started facing an issue that the response XML does not get structered correctly, hence when the response is finally redenered, there is a /n in the response fields. this is for all string fields that do not h

  • How to handle the error in Oracle9i Application Server?

    After installing the Oracle9i Application Server ,Oracle8i 1.7 Database,I visit the link"http://localhost" ,then click "Jsever (demo)". Then ,there appears "500 Internal Server err". The log file: mod_jserv.log [24/01/2002 09:25:32:031] (EMERGENCY) a

  • Copy Version-Budget data copied from one version to another-How to view Data in Copied Version.

    Dear All, Budget Data is copied from one Version to another Version using Tools>copy Version option. How can you view Data copied to new Version, when you receive a message Version is successfully copied. I think we can do that by selecting appropria

  • Video Compression Help

    Hey guys and gals, I just finished my music video assignment for media production class and everyone thought it was really good, albeit a bit weird haha. I want to put it up on YouTube or Google Video but I dont want it to look crappy. I have like 10

  • Kanban - External procurement with multiple vendor

    Hi Gurus, We are working on implementation of Kanban for external procurement (Scheduling agreement) in my organisation. As per the business requirement, some of the components are supplied by more than one vendor. As per the standard process, Kanban